DOBOT CR5 User Guide 6 Program Language
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
90
Table 6.32 Input/output command
Get the status of the digital input port
Set the status of the digital output port (Queue
command)
Set the status of the digital output port (Immediate
command)
NOTE
Dobot robot system supports two kinds of commands: Immediate command and queue
command:
Immediate command: The robot system will process the command once received
regardless of whether there is the rest commands processing or not in the current
controller;
Queue command: When the robot system receives a command, this command will
be pressed into the internal command queue. The robot system will execute
commands in the order in which the commands were pressed into the queue.
Table 6.33 Digital input command
Get the status of the digital input port
index: Digital input index. Value range: 1 - 16
When an index is set in the DI function, DI(index) returns the status (ON/OFF) of this
speicified input port
When there is no index in the DI function, DI() returns the status of all the input ports,
which are saved in a table
For example, local di=(), the saving format is {num = 24 value = {0x55, 0xAA, 0x52}},
you can obtain the status of the specified input port with di.num and di.value[n]
if (DI(1))==ON then
Move(P1)
end
The robot moves to point P1 when the status of the digital input port 1 is ON
Table 6.34 Digital output command (Queue command)