Closed spsaswat closed 6 months ago
def readCameraPos(): return int(requests.get("http://localhost:8010/RestPLCService/getint?address=4020").json()["Value"])
def moveCamera(position): requests.get("http://localhost:8010/RestPLCService/setint?address=4010&value=%d" % position)
key positions = [1510, 1209, 908, 607, 306, 0]
Use the above fucntions to communicate with the gantry
import requests
requests.get("http://localhost:8010/RestPLCService/setint?address=4010&value=1300") print(requests.get("http://localhost:8010/RestPLCService/getint?address=4020").json()["Value"].json()%5B%22Value%22%5D))
This code snippet is working.
gantry communication successful
import requests
requests.get("http://localhost:8010/RestPLCService/setint?address=4010&value=1300") print(requests.get("http://localhost:8010/RestPLCService/getint?address=4020").json()["Value"])