EasyManua.ls Logo

Dobot CR5 - Page 109

Dobot CR5
111 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
DOBOT CR5 User Guide 6 Program Language
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
104
Example
Read 5 coils starting at address 0
Coils = GetCoils(0,5)
Return:
Coils={1,0,0,0,0}
As shown in Table 6.52, it indicates that the robot is in the starting state
Table 6.58 Set coil register command
Function
SetCoils(addr, count, table)
Description
Set the coil register in the Modbus slave
This command is not supported when the coil register address is from 0 to 5
Parameter
Addr: Starting address of the coils to set. Value range: 6 - 4095
count: Number of the coils to set. Value range: 0 to 4096-addr
table: Coil value, stored in a table
Return
None
Example
Set 5 coils starting at address 1024
local Coils = {0,1,1,1,0}
SetCoils(1024, #coils, coils)
Table 6.59 Read discrete input register command
Function
GetInBits(addr, count)
Description
Read the discrete input value from Modbus slave
Parameter
addr: Starting address of the discrete inputs to read. Value range: 0-4095
count: Number of the discrete inputs to read. Value range: 0 to 4096-addr
Return
Return a table, each with the value 1 or 0, where the first value in the table corresponds to the
discrete value at the starting address
Example
Read 5 discrete inputs starting at address 0
inBits = GetInBits(0,5)
Return:
inBits = {0,0,0,1,0}
As shown in Table 6.53, it indicates the robot is in running state

Table of Contents

Other manuals for Dobot CR5

Related product manuals