Toggle the outputs in a program (Set command)
THIS HOW TO DESCRIBES THE SET COMMAND.
The Set-command can be used to change the state of the robots inputs or outputs.
It can be used to set digital outputs to a given state, analog outputs to a given voltage or current or to change states of Modbus-registers and coils.
-
Go to the "Program"-tab (1) in the Program Robot section.
Click the "Structure"-tab (2) to find a pallette of the available commands.
Find and click the "Set"-command (3) in the commands pallette. - A Set-command is inserted into the program tree to the left.
Mark the "Set" command in the program tree, and click the "Command"-tab to see the details for this command.
The Set command gives 6 options:
A) Set a digital output to high or low.
This can be:
Digital Output 0-7 in control box
Configurable Output 0-7 in control box
Tool output 0-1 in tool connector
Or a MODBUS output configured in the Modbus Client section in the Installation tab. See article 16357 for this.
E.g. Set digital output 0 to High (24 V).
B) Set an analog output to a value.
If the analog output in the "I/O" tab is set to "Current" value is in mA.
If the analog output in the "I/O" tab is set to "Voltage" value is in Volts.
E.g. Set analog output 0 to 7,5 Volts.
C) Set an output to a function value.
This can be setting a MODBUS register to an integer value. The MODBUS register is configured in the Modbus Client section in the Installation tab, see article 16357.
A digital og analog output can also be chosen to be assigned a function value.
Digital outputs must be set to a boolean value (True/False) and analog outputs must be set to numeric.
The expression can be used to calculate the value assigned, e.g. to set digital output 1 to "DI[1] and DI[2]", thus digital output 1 will only be set to high, if both digital input 1 and 2 are high.
D) Increment an installation variable by one.
The installation variables are defined in the Variables section in the Installation tab.
Besides the actual output action, the Set command also offers two more optional options:
E) Change the payload of the robot.
This is very useful when using the output to operate a gripper, thus when an item is picked up or placed, the payload of the robot is changing. Using this may reduce Protective Stops in programs, since the payload will be correctly configured.
F) Change the current TCP settings. (only from software version 3.1)
If using e.g. dual grippers, the TCP can be changed after one gripper is used or similer. - In this example, we will set digital output 0 to high.