top of page

9.30.3.3.8. Wait for Analog

9.30.3.3.8. Wait for Analog Input

Open the ModbusRTU Slave instruction addition page, find “Wait for Analog Input Settings”, select AI name as the configured “Current” register, wait state as “>”, register value as 255, timeout as 5000ms. Click “Add” button, then click “Apply” button.

Figure 9.30-53 Adding a Wait for Analog Input Instruction

Now the robot program “testModbusRTUSlave.lua” has added a robot Modbus Slave instruction to wait for an analog input value. After starting the program, the robot will wait for the “Current” register value of the slave to be greater than 255. Since the timeout is set to 5s, if the “Current” signal is still not greater than 255 after 5s, the robot program will report a timeout error and automatically stop running.

Figure 9.30-54 Program for Waiting for Analog Input Register

Open the ModbusRTU Slave command addition page, find the “Wait for Analog Input Setting” (i.e., wait for AI input register setting). Select the AI name as the configured “Liquid Level” register, set the wait condition to “=”, the register value to 255, and the timeout to 5000ms. Click the “Add” button, and finally click the “Apply” button.

Figure 9.30-54-2 Add Wait for Analog Input

At this point, a Modbus RTU Slave command to wait for the AI input register value has been added to the robot program “test.lua”. After starting the program, the robot will continuously wait for the “Liquid Level” register value to equal 255. Since the timeout is set to 5s, if the “Liquid Level” signal still does not equal 255 after the robot waits for 5 seconds, the robot program will report a timeout error and automatically stop running.

9.30.3.4. Robot Status Feedback and Control via ModbusRTU Slave

The input register addresses 0x1010-0x104C of the collaborative robot ModbusRTU Slave are used to feedback real-time robot status (see Appendix 1: ModbusRTU Slave Address Mapping Table for specific address definitions). You only need to read the corresponding register values with the master device to obtain the corresponding real-time robot status data.

The coil register addresses 0x4040-0x405C of the collaborative robot ModbusRTU Slave are used for the master device to control the robot (see Appendix 1: ModbusRTU Slave Address Mapping Table for specific address definitions). Take coil address 0x4054 as an example. This address function is “Start Program”. When the robot is in automatic mode, the master device changes the value of address 0x4054 from 0 to 1, and the robot automatically starts running the currently configured program. Another example is coil address 0x4040, which is used to control the output of control box DO0. When the external master changes the coil address 0x4040 from 0 to 1, the control box DO0 automatically outputs effectively. Similarly, when the external master changes the coil address 0x4040 from 1 to 0, the control box DO0 output becomes invalid. On the ModbusRTU Slave settings page, click “Functional Digital Inputs (Coils)” to monitor all current functional digital inputs.

Figure 9.30-55 Digital input of the robot slave function

Attachment 1: Modbus Slave Address Mapping Table

Third-party Controller Address

Type

Name

Data Type

Function Code

R/W

0x3000

General Digital Output (Discrete)

DO0

BOOL

0x02

Read Only

0x3001

General Digital Output (Discrete)

DO1

BOOL

0x02

Read Only

0x3002

General Digital Output (Discrete)

DO2

BOOL

0x02

Read Only

0x3003

General Digital Output (Discrete)

DO3

BOOL

0x02

Read Only

General Digital Output (Discrete)

BOOL

0x02

Read Only

0x303F

General Digital Output (Discrete)

DO127

BOOL

0x02

Read Only

0x4000

General Digital Input (Coil)

DI0

BOOL

0x01, 0x05, 0x0F

R/W

0x4001

General Digital Input (Coil)

DI1

BOOL

0x01, 0x05, 0x0F

R/W

0x4002

General Digital Input (Coil)

DI2

BOOL

0x01, 0x05, 0x0F

R/W

0x4003

General Digital Input (Coil)

DI3

BOOL

0x01, 0x05, 0x0F

R/W

General Digital Input (Coil)

BOOL

0x01, 0x05, 0x0F

R/W

0x403F

General Digital Input (Coil)

DI64

BOOL

0x01, 0x05, 0x0F

R/W

0x4040

Robot Control

Control Box DO0

BOOL

0x01, 0x05, 0x0F

R/W

0x4041

Robot Control

Control Box DO1

BOOL

0x01, 0x05, 0x0F

R/W

0x4042

Robot Control

Control Box DO2

BOOL

0x01, 0x05, 0x0F

R/W

0x4043

Robot Control

Control Box DO3

BOOL

0x01, 0x05, 0x0F

R/W

0x4044

Robot Control

Control Box DO4

BOOL

0x01, 0x05, 0x0F

R/W

0x4045

Robot Control

Control Box DO5

BOOL

0x01, 0x05, 0x0F

R/W

0x4046

Robot Control

Control Box DO6

BOOL

0x01, 0x05, 0x0F

R/W

0x4047

Robot Control

Control Box DO7

BOOL

0x01, 0x05, 0x0F

R/W

0x4048

Robot Control

Control Box CO0

BOOL

0x01, 0x05, 0x0F

R/W

0x4049

Robot Control

Control Box CO1

BOOL

0x01, 0x05, 0x0F

R/W

0x404A

Robot Control

Control Box CO2

BOOL

0x01, 0x05, 0x0F

R/W

0x404B

Robot Control

Control Box CO3

BOOL

0x01, 0x05, 0x0F

R/W

0x404C

Robot Control

Control Box CO4

BOOL

0x01, 0x05, 0x0F

R/W

0x404D

Robot Control

Control Box CO5

BOOL

0x01, 0x05, 0x0F

R/W

0x404E

Robot Control

Control Box CO6

BOOL

0x01, 0x05, 0x0F

R/W

0x404F

Robot Control

Control Box CO7

BOOL

0x01, 0x05, 0x0F

R/W

0x4050

Robot Control

Tool DO0

BOOL

0x01, 0x05, 0x0F

R/W

0x4051

Robot Control

Tool DO1

BOOL

0x01, 0x05, 0x0F

R/W

0x4052

Robot Control

Pause

BOOL

0x01, 0x05, 0x0F

R/W

0x4053

Robot Control

Resume

BOOL

0x01, 0x05, 0x0F

R/W

0x4054

Robot Control

Start

BOOL

0x01, 0x05, 0x0F

R/W

0x4055

Robot Control

Stop

BOOL

0x01, 0x05, 0x0F

R/W

0x4056

Robot Control

Move to Home Position

BOOL

0x01, 0x05, 0x0F

R/W

0x4057

Robot Control

Manual/Auto Toggle

BOOL

0x01, 0x05, 0x0F

R/W

0x4058

Robot Control

Start Main Program

BOOL

0x01, 0x05, 0x0F

R/W

0x4059

Robot Control

Level 1 Reduction Mode

BOOL

0x01, 0x05, 0x0F

R/W

0x405A

Robot Control

Level 2 Reduction Mode

BOOL

0x01, 0x05, 0x0F

R/W

0x405B

Robot Control

Level 3 Reduction Mode (Stop)

BOOL

0x01, 0x05, 0x0F

R/W

0x405C

Robot Control

Clear All Faults

BOOL

0x01, 0x05, 0x0F

R/W

0x405D

Robot Control

Reserved

BOOL

0x01, 0x05, 0x0F

R/W

0x405E

Robot Control

Reserved

BOOL

0x01, 0x05, 0x0F

R/W

0x1000

Analog Input

AO0

INT16

0x04

Read Only

0x1001

Analog Input

AO1

INT16

0x04

Read Only

0x1002

Analog Input

AO2

INT16

0x04

Read Only

Analog Input

INT16

0x04

Read Only

0x100F

Analog Input

AO15

INT16

0x04

Read Only

0x1010

Robot Status

Enable Status (0-Disabled, 1-Enabled)

UINT16

0x04

Read Only

0x1011

Robot Status

Robot Mode (1-Manual, 0-Auto)

UINT16

0x04

Read Only

0x1012

Robot Status

Robot Operation Status (1-Stop, 2-Running, 3-Paused, 4-Dragging)

UINT16

0x04

Read Only

0x1013

Robot Status

Tool Number

UINT16

0x04

Read Only

0x1014

Robot Status

Workpiece Number

UINT16

0x04

Read Only

0x1015

Robot Status

Emergency Stop Status (0-Normal, 1-Emergency Stop)

UINT16

0x04

Read Only

0x1016

Robot Status

Soft Limit Fault

UINT16

0x04

Read Only

0x1017

Robot Status

Main Fault Code

UINT16

0x04

Read Only

0x1018

Robot Status

Sub Fault Code

UINT16

0x04

Read Only

0x1019

Robot Status

Collision Detection (1-Collision, 0-No Collision)

UINT16

0x04

Read Only

0x101A

Robot Status

Motion Completion Signal

UINT16

0x04

Read Only

0x101B

Robot Status

Safety Stop Signal SI0

UINT16

0x04

Read Only

0x101C

Robot Status

Safety Stop Signal SI1

UINT16

0x04

Read Only

0x101D

Robot Status

Control Box Analog Input AI0

UINT16

0x04

Read Only

0x101E

Robot Status

Control Box Analog Input AI1

UINT16

0x04

Read Only

0x101F

Robot Status

Tool Analog Input AI0

UINT16

0x04

Read Only

0x1020

Robot Status

Control Box Analog Output AO0

UINT16

0x04

Read Only

0x1021

Robot Status

Control Box Analog Output AO1

UINT16

0x04

Read Only

0x1022

Robot Status

Tool Analog Output AO0

UINT16

0x04

Read Only

0x1023

Robot Status

Control Box Digital Input (Bit0-Bit7: DI0-DI7, Bit8-Bit15: CI0-CI7)

UINT16

0x04

Read Only

0x1024

Robot Status

Tool Digital Input (Bit0-Bit15: DI0-DI15)

UINT16

0x04

Read Only

0x1025

Robot Status

Control Box Digital Output (Bit0-Bit7: DO0-DO7, Bit8-Bit15: CO0-CO7)

UINT16

0x04

Read Only

0x1026

Robot Status

Tool Digital Output (Bit0-Bit15: DO0-DO15)

UINT16

0x04

Read Only

0x1027

Robot Status

TCP Speed

FLOAT32 (Big Endian)

0x04

Read Only

0x1028

Robot Status

TCP Speed

FLOAT32 (Big Endian)

0x04

Read Only

0x1029

Robot Status

Joint 1 Position

FLOAT32 (Big Endian)

0x04

Read Only

0x102A

Robot Status

Joint 1 Position

FLOAT32 (Big Endian)

0x04

Read Only

0x102B

Robot Status

Joint 2 Position

FLOAT32 (Big Endian)

0x04

Read Only

0x102C

Robot Status

Joint 2 Position

FLOAT32 (Big Endian)

0x04

Read Only

0x102D

Robot Status

Joint 3 Position

FLOAT32 (Big Endian)

0x04

Read Only

0x102E

Robot Status

Joint 3 Position

FLOAT32 (Big Endian)

0x04

Read Only

0x102F

Robot Status

Joint 4 Position

FLOAT32 (Big Endian)

0x04

Read Only

0x1030

Robot Status

Joint 4 Position

FLOAT32 (Big Endian)

0x04

Read Only

0x1031

Robot Status

Joint 5 Position

FLOAT32 (Big Endian)

0x04

Read Only

0x1032

Robot Status

Joint 5 Position

FLOAT32 (Big Endian)

0x04

Read Only

0x1033

Robot Status

Joint 6 Position

FLOAT32 (Big Endian)

0x04

Read Only

0x1034

Robot Status

Joint 6 Position

FLOAT32 (Big Endian)

0x04

Read Only

0x1035

Robot Status

Joint 1 Speed

FLOAT32 (Big Endian)

0x04

Read Only

0x1036

Robot Status

Joint 1 Speed

FLOAT32 (Big Endian)

0x04

Read Only

0x1037

Robot Status

Joint 2 Speed

FLOAT32 (Big Endian)

0x04

Read Only

0x1038

Robot Status

Joint 2 Speed

FLOAT32 (Big Endian)

0x04

Read Only

0x1039

Robot Status

Joint 3 Speed

FLOAT32 (Big Endian)

0x04

Read Only

0x103A

Robot Status

Joint 3 Speed

FLOAT32 (Big Endian)

0x04

Read Only

0x103B

Robot Status

Joint 4 Speed

FLOAT32 (Big Endian)

0x04

Read Only

0x103C

Robot Status

Joint 4 Speed

FLOAT32 (Big Endian)

0x04

Read Only

0x103D

Robot Status

Joint 5 Speed

FLOAT32 (Big Endian)

0x04

Read Only

0x103E

Robot Status

Joint 5 Speed

FLOAT32 (Big Endian)

0x04

Read Only

0x103F

Robot Status

Joint 6 Speed

FLOAT32 (Big Endian)

0x04

Read Only

0x1040

Robot Status

Joint 6 Speed

FLOAT32 (Big Endian)

0x04

Read Only

0x1041

Robot Status

TCP Position X

FLOAT32 (Big Endian)

0x04

Read Only

0x1042

Robot Status

TCP Position X

FLOAT32 (Big Endian)

0x04

Read Only

0x1043

Robot Status

TCP Position Y

FLOAT32 (Big Endian)

0x04

Read Only

0x1044

Robot Status

TCP Position Y

FLOAT32 (Big Endian)

0x04

Read Only

0x1045

Robot Status

TCP Position Z

FLOAT32 (Big Endian)

0x04

Read Only

0x1046

Robot Status

TCP Position Z

FLOAT32 (Big Endian)

0x04

Read Only

0x1047

Robot Status

TCP Position RX

FLOAT32 (Big Endian)

0x04

Read Only

0x1048

Robot Status

TCP Position RX

FLOAT32 (Big Endian)

0x04

Read Only

0x1049

Robot Status

TCP Position RY

FLOAT32 (Big Endian)

0x04

Read Only

0x104A

Robot Status

TCP Position RY

FLOAT32 (Big Endian)

0x04

Read Only

0x104B

Robot Status

TCP Position RZ

FLOAT32 (Big Endian)

0x04

Read Only

0x104C

Robot Status

TCP Position RZ

FLOAT32 (Big Endian)

0x04

Read Only

0x104D

Analog Input

AO16

FLOAT32 (Big Endian)

0x04

Read Only

0x104E

Analog Input

AO16

FLOAT32 (Big Endian)

0x04

Read Only

0x104F

Analog Input

AO17

FLOAT32 (Big Endian)

0x04

Read Only

0x1050

Analog Input

AO17

FLOAT32 (Big Endian)

0x04

Read Only

Analog Input

FLOAT32 (Big Endian)

0x04

Read Only

0x106B

Analog Input

AO31

FLOAT32 (Big Endian)

0x04

Read Only

0x106C

Analog Input

AO31

FLOAT32 (Big Endian)

0x04

Read Only

0x2000

Analog Output

AI0

INT16

0x03, 0x06, 0x10

R/W

0x2001

Analog Output

AI1

INT16

0x03, 0x06, 0x10

R/W

0x2002

Analog Output

AI2

INT16

0x03, 0x06, 0x10

R/W

Analog Output

INT16

0x03, 0x06, 0x10

R/W

0x200F

Analog Output

AI15

INT16

0x03, 0x06, 0x10

R/W

0x2010

Analog Output

AI16

FLOAT32 (Big Endian)

0x03, 0x06, 0x10

R/W

0x2011

Analog Output

AI16

FLOAT32 (Big Endian)

0x03, 0x06, 0x10

R/W

0x2012

Analog Output

AI17

FLOAT32 (Big Endian)

0x03, 0x06, 0x10

R/W

0x2013

Analog Output

AI17

FLOAT32 (Big Endian)

0x03, 0x06, 0x10

R/W

Analog Output

FLOAT32 (Big Endian)

0x03, 0x06, 0x10

R/W

0x202E

Analog Output

AI31

FLOAT32 (Big Endian)

0x03, 0x06, 0x10

R/W

0x202F

Analog Output

AI31

FLOAT32 (Big Endian)

0x03, 0x06, 0x10

R/W


robotic arm
FAIRINO ROBOTIC ARMS

Contact

Location: 10637 Scripps Summit Court,

San Diego, CA. 92131
Phone: (619) 333-FAIR
Email: hello@fairino.us

© 2023 FAIRINO Proudly created By G2T

bottom of page