Example 3, shows how Motoman_Trigger is modified to handle save or load
jobs. The jobs are stored in a directory on the host PC.
Motoman_Trigger script
def Handle_MOTOMAN_Trigger(value):
#this is called from robot by instuction SAVEV BXXX
print 'Handle_MOTOMAN_Trigger',value
if value == 3: # the robot set byte value to 3 for job management
LoadSave()
else:
#capture image
print 'CameraTrigger',ExecuteCmd('CameraTrigger','')
def Motoman_LoadSave():
print 'Motoman_LoadSave'
# This script handles the robot instructions LOADJ eller SAVEJ
MOTOMAN.LoadSave('timeout=5000') # timeout is in milliseconds
Motoman_Activate() - activate trigger after save or load job
print 'motoman activate utført'
|