There are two sensors that are mounted on the pneumatic cylinder on the gripper. The sensors have three positions:
1) When Gripper is Open Signal 1 is ON and Signal 2 is ON;
2) When Gripper is Closed and has gripped part Signal 1 is OFF and Signal 2 is OFF;
3) When Gripper is Closed but without part Signal 1 is ON and Signal 2 is OFF.
I want in the third case the situation to be like:
If SIG(1001) AND SIG(-1002) THEN
PRINT 0: "There is no part in the gripper"
AND HERE TO STOP THE ROBOT WITH ERROR
END