Universal Robots Forum

Multi-line script sent to Secondary Interface does not run


I am sending the following multi-line script to the Secondary Interface:

def myScript():
 ec_init_reg = 16
 ec_init = 123
 write_output_integer_register(ec_init_reg, ec_init)

In this form, the script does not execute correctly. If I hardcode the variable values into the function call, however, it seems to work. Is using variable in scripts sent to the Secondary Interface not allowed? Are there other limitations on executing scripts through the Secondary Interface? Can I execute rather complex script through this method?

Thanks in advance for your help.