Sending a trigger:
triggerstatus = socket_read_line(socket_name)
if triggerstatus == “1”:
textmsg("Trigger successful: ", triggerstatus)
textmsg("Trigger failed: ", triggerstatus)
returns a trigger failed with a trigger status of -2
Insight help just gives “Command Cannot Be Executed” as the explanation for error code -2.
I have copy pasted the code from the integration practicum, and manually set a string in cell C20. Communication between the robot and cognex works, a few lines in the copy pasted code:
getvaluestatus = socket_read_line(socket_name)
if getvaluestatus == “1” :
textmsg("GetValue successful: ", getvaluestatus)
textmsg("GetValue failed: ", getvaluestatus)
rec = socket_read_ascii_float(3, socket_name)
returns the value i have put in cell C20.
What am i missing/how do fix?