0% found this document useful (0 votes)
213 views

Modbus TCP Fanuc

Uploaded by

Mohamad Haziq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
213 views

Modbus TCP Fanuc

Uploaded by

Mohamad Haziq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

Machine Translated by Google

ER Series Industrial Robot ModbusTCP Debugging Manual

(RCS2 V1.7)
Machine Translated by Google

Revision history

Serial number date author version describe

1 2018.08.17 Wu Ma V1.0 first release

1. Modified individual language descriptions

2 2018.01.16 Wang Zhengqian V1.1 2. Modified the analog IO points, that is

Support floating point data

1. Added heartbeat detection bit (for


3 2018.03.05 Zhao Penghe V1.1.2
outside)

David Sun 1. IO variable new method update


V1.2
4 2019.12.26 Shi Weiqing 2. IO command update
V1.4
3. Added communication operation examples

5 2020.01.13 Shi Weiqing V1.5 1. Modify incorrect descriptions

The number of registers is expanded to 1500,

Wang Zhengqian
[1,100] is still the original definition ÿ

[101,1500] The register can be internally

Reading and writing in PLC

6 2022.01.10 V1.6 1. Add 2.4 ModbusTCP

Instructions section

2. Add 2.5 Multiprog medium reading

Write register chapter

3. Modify ModbusTCP point table

Han Zicong 1. Added Chapter 4 Simplified Command Machine


7 2023.07.11 V1.7
Instructions for use
Machine Translated by Google

Table of contents

Foreword........................................ ................................................................. ........................3

Chapter 1 Function Introduction ........................................ ................................................................. .......4

Chapter 2 Introduction to ModBusTcp protocol........................................ ..................................4

2.1 ModBusTCP protocol message................................................ .............................4

2.2 ModBusTCP protocol function code...................................... .............................5

2.3 ModBusTCP interface configuration...................................... .............................5

2.4 ModBusTCP command................................................ .................................................6

2.4.1 GetModConState.............................................................................................. 6

2.4.2 ReadModbusReg ............................................................................................. 7

2.4.3 WriteModbusReg.............................................................................................. 7

2.5 Reading and writing registers in Multiprog (PLC)...................................... ................................8

2.5.1 ER_RobModbusCnctState................................................................................ 8

2.5.2 ReadModbusReg ............................................................................................. 8

2.5.3 WriteModbusReg.............................................................................................. 9

Chapter 3 Interface Debugging ........................................ ................................................................. .....10

3.1 ModScan Debugging Assistant................................................ ........................................10

3.2 Example of virtual digital quantity interaction........................................ .............................12

3.3 Virtual analog quantity interaction example................................ .............................14

3.4 Remotely start the robot program...................................... .............................15

3.5 Remote loading of robot programs................................................ .............................16

3.6Remote program pointer................................................ .................................................18

3.7 Debugging Precautions................................................ .................................................19

Chapter 4 Simplifying the ModBusTCP command mechanism ................................ ...........................twenty one

4.1 How to use...................................... ................................................................. ....twenty one

4.2 Remotely start the robot program...................................... ......................................twenty two

4.3 Remote loading of specified programs...................................... ..........................................twenty three

4.4 Remote reset program pointer........................................ ..........................................twenty three

4.5 Clear all alarms remotely........................................ .................................................25

4.6 Precautions................................................ ................................................................. ....26

Chapter 5 ModBusTCP Point Table ........................................ ........................................28


Machine Translated by Google
ER Series Industrial Robot ModBusTCP Interface Debugging Manual

Preface

Overview

This manual is applicable to the control system RCS2 V1.31 and above, describing the Eston second generation controller

ModBusTcp protocol interface function introduction, including function introduction, protocol introduction, interface debugging and function point table.

Readership

This manual is intended only for those who are trained and familiar with various applicable national standards for "Control, Automation and Drive Engineering"

Field professionals.

ÿSystem manufacturer: Technical personnel who design the functions of automation systems.

ÿSystem integrator: refers to technicians who integrate automation equipment.

Precautions

ÿWhen installing and debugging these components, operators must strictly follow the instructions and explanations in this document.

ÿRelevant responsible persons must ensure that the application or use of the product meets all safety requirements, including relevant legal

laws, regulations, codes and standards.

ÿAlthough this document has been carefully prepared, since the products described in it are still being continuously updated, we may not check that the product

performance data, standards or other characteristics described in the document are always consistent with the actual ones after each update. Products are

consistent.

ÿThere will inevitably be some technical or editing errors in this document. We reserve the right to modify the document information at any time without prior notice. For

products that have changed, if the data, charts and text descriptions in this document have not been modified, we will no longer make a special statement.

ÿNo one is allowed to modify the software and hardware configurations other than those specified in the text document. ESTUN will not

We are not responsible for any consequences caused by this.

ÿWhen the units shown in the illustrations in this document are not specifically marked, the default unit is millimeters mm.

safety instructions

Risk of injury Failure to

comply with the safety instructions associated with this sign will endanger personal life and health.

Danger to the environment and equipment

Failure to comply with the safety instructions related to this sign may significantly harm the environment and equipment safety.

Instructions or Tips

This symbol indicates that the information can help you better understand the safety instructions.
Machine Translated by Google
ER Series Industrial Robot ModBusTCP Interface Debugging Manual

Chapter 1 Function Introduction

ModBusTcp protocol interface refers to the external logic controller (PLC, etc.)

(ModBusTCP) communicates with the robot, a communication method for reading and writing the virtual IO port of the robot. machine

The robot can interact with external devices through ModBusTCP without additional expansion of IO ports.

Chapter 2 ModBusTcp protocol introduction

ModBus is one of the most widely used fieldbuses at present. In 1999, it was launched with Ethernet operation.

ModBusTCP (Industrial Ethernet Protocol). ModBusTCP combines ModBus

Frames are embedded in TCP frames. IANA assigns TCP port number 502 to the ModBus protocol, which is the same as other industries.

Ethernet protocol does not have. ModBusTCP also has support for other industrial control equipment, such as industrial human-machine interfaces,

Frequency converters, soft starters, motor control centers, Ethernet I/O, various fieldbus bridges, etc.

2.1 ModBusTCP protocol message

ModBusTCP uses TCP/IP and Ethernet protocols to transmit ModBus information, so it is compatible with ModBus

Similar to the serial link data unit, the application data unit of ModBusTCP is the ModBus simple protocol data unit.

The data unit (PDU) is encapsulated according to the TCP/IP protocol. A TCP frame can only transmit one

ModBusADU, it is recommended not to send multiple ModBus requests or responses in the same PDU.

The following table shows the request and response messages of ModBusTCP:

Request: Transmission flag protocol flag length slave station number function code register starting address register length

length
2 2 2 1 1 2 2

(Byte)

Response: Transmission flag protocol flag length slave station number function code length data value…

length
2 2 2 1 1 1

(Byte)

4
Machine Translated by Google
ER Series Industrial Robot ModBusTCP Interface Debugging Manual

2.2 ModBusTCP protocol function code

The data structure of ModBus divides data into the following four types:

Holding Coils Readable and writable BOOL variable

Input Coils Read-only BOOL variable

Holding registers (Input Registers) readable and writable WORD type (16-bit) variables

Input registers (Holding Registers) read-only WORD type (16-bit) variables

Eston's ModBusTCP communication interface currently only supports reading and writing holding registers, that is, the following function codes:

Function code description

0x03 Read holding register

0x06 Write a single holding register

0x10 Write multiple holding registers

2.3 ModBusTCP interface configuration

The ModBusTCP interface configuration of the ER series robot is as follows:

IP: 192.168.6.68 (live system IP address)

Portÿ502

Acquisition cycle>200ms

Response timeout >150ms

The server determines whether a connection exists by detecting the client's request. If after connecting to the client, the

If no request from the client is received after 5 seconds, the server will automatically disconnect and re-listen to port 502.

The ER series robot encapsulates a layer of data structure in the ModBusTCP holding register.

address definition

40003 Read and write flag response

40004 Rob status information

Rob Send 40005~40014 currently loaded project name

40015-40018 for users (virtual digital output)

40019 Rob execution command status

5
Machine Translated by Google
ER Series Industrial Robot ModBusTCP Interface Debugging Manual

40020~40051 for users (virtual analog output)

40052 Rob operation instructions

40053 Global speed settings

Rob 40054~40063 Set the loading project name

Receive 40064-40067 for users (virtual number input)

40068~40099 for users (virtual input)

40100 Read and write flag request

40101

General … For users (the register has been opened to the internal PLC)

41500

2.4 ModBusTCP command

ModbusTCP command list:

ÿ GetModConState

ÿ ModbusTCP command ÿ ReadModbusReg

ÿ WriteModbusReg

2.4.1 GetModConState

This command is used to obtain the connection status of the robot and the outside world using modbus communication. Explain the command parameters

bright:

GetModConState IsConnected
ÿ IsConnected: connection status (Is Connected)

Data type: BOOL variable

Parameter meaning: Return the current connection status.

6
Machine Translated by Google
ER Series Industrial Robot ModBusTCP Interface Debugging Manual

Example 1:

GetModConState(BOOL0)

2.4.2 ReadModbusReg

This instruction is used to read the value of the specified Modbus register. Describe the command parameters:

ReadModbusReg RegisterID RegisterValue


ÿ RegisterID: Target register ID number (Target Modbus Register ID)

Data type: int, value range is 101~1500.

Parameter meaning: The ID number of the register you want to read.

ÿ RegisterValue: Target register value (Target Modbus Register Value)

Data type: INT variable

Parameter meaning: Return the read register value.

Example 1:

ReadModbusReg(101, INT0) //Read the value of register 101

2.4.3 WriteModbusReg

This instruction is used to set the value of the specified Modbus register. Describe the command parameters:

WriteModbusReg RegisterID RegisterValue


RegisterID: Target register ID number (Target Modbus Register ID)

Data type: int, value range is 101~1500.

Parameter meaning: The ID number of the register you want to modify.

RegisterValue: Target register value (Target Modbus Register Value)

Data type: INT variable

Parameter meaning: the register value you want to modify.

Example 1:

INT0.value = 100
WriteModbusReg(101, INT0) //Change the value of register 101 to 100

7
Machine Translated by Google
ER Series Industrial Robot ModBusTCP Interface Debugging Manual

2.5 Reading and writing registers in Multiprog (PLC)

The ER_ModbusTCP function library provides the function of reading and writing Modbus registers. The readable and writable index numbers are

The register values of 101-1500 can be used for data interaction with robot controllers and external Modbus devices.

2.5.1 ER_RobModbusCnctState

Function: Get the standard ModbusTCP connection status.

Input parameters:

Enable(BOOL): Continuously obtain the ModbusTcp connection status during TRUE.

Output parameters:

ModbusConcted(BOOL): TRUE means Modbus is connected.

2.5.2 ReadModbusReg

Function: Read the value of the specified Modbus register.

Input parameters:

EnRead (BOOL): Continuously obtains the register value during TRUE.

RegIndex (INT): Register ID number, supports input values in the range of 101-1500.

8
Machine Translated by Google
ER Series Industrial Robot ModBusTCP Interface Debugging Manual

Output parameters:

RegValue (WORD): The value of the register.

ValueValid (BOOL): TRUE indicates that the output value is valid.

IndexError (BOOL): TRUE indicates that the index number is out of range.

2.5.3 WriteModbusReg

Function: Write the value of the specified Modbus register.

Input parameters:

EnWrite (BOOL): The rising edge executes the operation of writing the value to the specified register.

RegIndex (INT): Register ID to be written, supports input value in the range of 101-1500.

RegValue (WORD): The value to be written to the register.

Output parameters:

Done (BOOL): TRUE indicates writing is completed.

IndexError (BOOL): TRUE indicates that the index number is out of range.

9
Machine Translated by Google
ER Series Industrial Robot ModBusTCP Interface Debugging Manual

Chapter 3 Interface Debugging

This section takes the ModBus debugging assistant ModScan as an example to explain how to use ModBusTCP communication.

The interface interacts with the robot, ModScan simulates the communication master station, and the robot serves as the communication slave station.

Special note: The command interaction in this chapter is a secure handshake mechanism.

3.1 ModScan Debugging Assistant

ÿ The debugging software interface is as follows:

ÿ Connection debugging steps

1. Connect the local computer to the robot control system. (You can ping the real-time system IP192.168.6.68)

2. Configure ModScan connection parameters


Machine Translated by Google
ER Series Industrial Robot ModBusTCP Interface Debugging Manual

Click ConnectionÿConnect to enter the following interface and configure the robot IP and port number.

First click protocol selection to configure the connection parameters, then click OK to complete the configuration and connect to the robot.

3. Set Address (starting address) to 1, set Length (length) to 100, and select 03 from the function code drop-down menu:

HOLDING REGISTER (holding register).

11
Machine Translated by Google
ER Series Industrial Robot ModBusTCP Interface Debugging Manual

3.2 Example of virtual digital quantity interaction

ÿ ModScan (PLC) sends a high level to the robot’s SimDI20 port;

By looking at the ModBus Tcp point table in Chapter 5 of this article, we can see that SimDI20 corresponds to robot register 40065

bit4.

12
Machine Translated by Google
ER Series Industrial Robot ModBusTCP Interface Debugging Manual

Before communication alternation:

After communication interaction: Double-click the 40065 register corresponding to ModScan to pop up the value writing window, check bit4 and click Update

Afterwards, SDin[20] on the teaching pendant becomes 1, indicating successful communication.

13
Machine Translated by Google
ER Series Industrial Robot ModBusTCP Interface Debugging Manual

3.3 Virtual analog quantity interaction example

ÿ ModScan (PLC) sends the value 25 to the robot’s SimAI1 port;

By looking at the ModBus Tcp point table in Chapter 5 of this article, we can see that SimAI1 corresponds to robot registers 40068 and

40069, the analog channel transmits floating-point data, and one analog channel corresponds to two register addresses.

The ModScan side needs to be set as shown in the figure below, the display format is changed to 32-bit floating point number, and the starting value is changed to 2.

In this way, the two registers 40068 and 40069 can display a floating point number (in practical applications with external devices

No settings need to be changed).

Before communication alternation:

After communication interaction: Double-click the 40068 register corresponding to ModScan to pop up the value writing window, and write Value to 25. Click

Update, the teach pendant side SAin[1] receives the value 25, and the communication is successful.

14
Machine Translated by Google
ER Series Industrial Robot ModBusTCP Interface Debugging Manual

3.4 Remotely start the robot program

ÿ ModScan (PLC) sends a command to start the running program to the robot (the stop and reset operation is similar to this);

By looking at the ModBus Tcp point table in Chapter 5 of this article, we can see that all operations that send commands to the robot must

There are two: ÿ The robot is in remote excitation state; ÿ All command operations are coordinated with the read and write flag register 40100

And the rising edge trigger is valid, the command register corresponding to remote start is 40052, and the value is 0x4.

ÿ Turn the key switch of the robot teach pendant to the remote state, and the robot will automatically activate the excitation and load the set

It is a self-starting program, as shown below.

15
Machine Translated by Google
ER Series Industrial Robot ModBusTCP Interface Debugging Manual

ÿ Make sure the values in the 40100 and 40052 registers are 0, first write 0x11 into the 40100 register,

At this time, the 40019 register status changes to 0x801 (this value indicates that the current system is waiting for commands),

Then write 0x4 into the 40052 register. At this time, the robot program starts and the 40019 register status changes.

is 0x404 (this value indicates that the startup command is executed successfully and continues to wait for new control rights). If the subsequent

Before sending other commands to the robot, the contents of registers 40100 and 40052 should be cleared to 0 first.

3.5 Remote loading of robot programs

ÿ ModScan (PLC) sends the loader command to the robot. The program name is estun.main, and then

The teaching pendant loads the program;

By looking at the ModBus Tcp point table in Chapter 5 of this article, we can see that all operations that send commands to the robot must

There are two: ÿ The robot is in remote excitation state; ÿ All command operations are coordinated with the read and write flag register 40100

And the rising edge trigger is valid. The corresponding command register for remote loading is 40052, the value is 0x80, and the value to be loaded is

The program name is stored in the next 10 registers starting with register 40054.

ÿ The hexadecimal values corresponding to the robot program name estun.main are 0x7365, 0x7574,

0x2E6E, 0x616D and 0x6E69, store the above values into 5 addresses starting with 40054.

Inside the container.

ÿ Make sure the values in the 40100 and 40052 registers are 0, first write 0x11 into the 40100 register,

At this time, the 40019 register status changes to 0x801 (this value indicates that the current system is waiting for commands),

Then write 0x80 into the 40052 register. At this time, estun.main is loaded on the teaching pendant, and the 40019 register status changes to

0x480 (this value indicates that the engineering command is loaded successfully and continues to wait for new control rights). If

16
Machine Translated by Google
ER Series Industrial Robot ModBusTCP Interface Debugging Manual

To subsequently send other commands to the robot, you should first clear the contents of registers 40100 and 40052.

0ÿ

Note: The name of the robot program is estun.main. There are two ways to know its corresponding hexadecimal value:

ÿ Manually load the estun.main program on the teach pendant, which will be in the 10 registers headed by 40005.

Displays the name of the currently loaded program.

ÿ Install Notepad++ software, which is a very useful text software. Create a new page and type in it.

estun.main, after selecting estun.main, click the menu bar plug-in->Converter->

ASCII->HEX, convert it into a hexadecimal number, then separate it every four digits, and separate the high and low words of each word

After changing the order of the sections, we get the result we need, as shown below:

17
Machine Translated by Google
ER Series Industrial Robot ModBusTCP Interface Debugging Manual

3.6 Remote reset program pointer

ÿ ModScan (PLC) sends a reset program pointer command to the robot, and the robot reloads and starts

program to return the PC pointer to the first line (if the robot is currently in motion, it will also respond to this

command, first stop the current motion and then reload the self-starting program).

By looking at the ModBus Tcp point table in Chapter 5 of this article, we can see that all operations that send commands to the robot must

There are two: ÿ The robot is in remote excitation state; ÿ All command operations are coordinated with the read and write flag register 40100

And the rising edge trigger is valid, the command register corresponding to the remote reset program pointer is 40052, and the value is 0x4000.

ÿ Set estun.main as the startup program, and the current PC pointer stays on line 5.

ÿ Make sure the values in the 40100 and 40052 registers are 0, first write 0x11 into the 40100 register,

At this time, the 40019 register status changes to 0x801 (this value indicates that the current system is waiting for commands),

Then write 0x4000 into the 40052 register. At this time, the robot reloads the estun.main program.

The PC pointer returns to the first line, and the 40019 register status changes to 0x4400 (this value indicates that the program pointer is reset

The command is successful and continues to wait for new control). If you subsequently send other commands to the robot, you should

First clear the contents of the 40100 and 40052 registers to 0.

18
Machine Translated by Google
ER Series Industrial Robot ModBusTCP Interface Debugging Manual

3.7 Debugging Precautions

ÿ This article introduces the default robot as a Modbus Tcp communication slave, and the external device as a Modbus Tcp

Communication master station. The robot only accepts connections from one master station. Multiple clients cannot connect to the machine at the same time.

(If you have this requirement, please contact Eston technical personnel); if the communication protocol part of the external device master station

It is compiled by individuals. You can use ModSim to test that the function is available before connecting to the robot.

ÿ In the IO communication part, whether the robot is in manual, automatic or remote mode, the system will respond to the processing, and

In the command operation part, the robot must be in remote and excitation state, and the triggering methods are all rising edge triggers.

To take effect, first open the control permission (40100) in order and then issue the corresponding command (40052).

ÿ During communication interaction, you should first make sure that the communication register addresses of the devices at both ends are correct, otherwise it will definitely not succeed.

achievement. When an external device sends data to the robot, you can first determine the register corresponding to SimDI.

Because it is most intuitive to see the SimDI signal reception from the teaching pendant. When the external device corresponding to SimDI

When the mail address is determined, other communication addresses can be determined based on the sequence offset of the robot communication point table.

When the external device receives the robot data, it can also determine the address through SimDO.

site.

ÿ When interacting with an external device, the external device can determine whether the command is based on the status information returned by the robot.

Whether the delivery is successful, each command has a corresponding success flag in the 40019 register. In addition, in the communication

19
Machine Translated by Google
ER Series Industrial Robot ModBusTCP Interface Debugging Manual

During the signaling process, if the error bit in the 40019 register is TRUE, you need to issue a reset state machine command.

command to clear the error, otherwise the system will not respond to subsequent commands.

ÿ When the robot communicates with Siemens PLC via ModBus Tcp to exchange analog data, the Siemens

Subdata storage is based on the low address byte as the high byte of the double word, and the high address byte as the low byte of the double word.

Bytes, so special attention needs to be paid to the correspondence during data interaction.

20
Machine Translated by Google
ER Series Industrial Robot ModBusTCP Interface Debugging Manual

Chapter 4 Simplifying the ModBusTCP command mechanism

Chapter 3 of this manual introduces how to operate Modbus registers to realize command exchange with the robot controller.

mutual. For security reasons, the operation method has strict verification; for user convenience, a streamlined command interactive machine has been added

system. (Simplified handshake mechanism)

4.1 How to use

There are two prerequisites for using this mechanism to send command operations to the robot:

ÿ The robot is in remote excitation state;

ÿ The value 0x88 needs to be written in the read and write flag register 40100;

Use the ModBus debugging assistant ModScan as an example, refer to Section 3.1 , after establishing a connection with the controller.

First, write 0x88 into the 40100 register. The status of the 40003 register changes to 0x88 synchronously. At this time, the command exchange is simplified.

The mutual mechanism takes effect, and then you can execute the corresponding command by assigning the bit bit of the 40052 register, and execute

After the operation is successful, you can observe the changes in the corresponding bits of 40019, as shown in the figure below.

40003: Write response register

40019: Command execution status register

40052: Command register

40100: Read and write flag register

21
Machine Translated by Google
ER Series Industrial Robot ModBusTCP Interface Debugging Manual

4.2 Remotely start the robot program

Use ModScan (PLC) to send running program commands to the robot (the pause reset operation is similar to this); first confirm

Ensure that it is currently in streamlined mode and the robot is in remote excitation state; all command operations must be coordinated with the command register

40052, the value corresponding to the remote startup robot program is 0x04. (If you need to send other commands to the robot, clear the 40052 register to 0)

ÿ Turn the key switch of the robot teach pendant to the remote state, the robot will automatically activate the excitation and load the set

It is a self-starting program, as shown below.

ÿ Make sure that the value of the 40052 register starts with 0x00, and then writes 0x04. At this time, the robot program starts running.

OK, the 40019 register also changes to 0x4.

22
Machine Translated by Google
ER Series Industrial Robot ModBusTCP Interface Debugging Manual

4.3 Remote loading of specified programs

Use ModScan (PLC) to send the loader command to the robot. The program name is estun.main

Also only need to operate the 40052 register and write the value 0x80.

ÿ The hexadecimal values corresponding to the robot program name estun.main are 0x7365, 0x7574,

0x2E6E, 0x616D and 0x6E69, store the above values into 5 registers starting with 40054 respectively.

ÿ Make sure that the value of the 40052 register starts with 0x00, then writes 0x80, and then loads the

estun.main, the 40019 register also changes to 0x80.

4.4 Remote reset program pointer

Use ModScan (PLC) to send a reset program pointer command to the robot, and the robot will reload and start remotely

program to return the PC pointer to the first line (if the robot is currently in motion, it will also respond to this command and stop first.

Stop the current movement and reload the remote self-starting program).

23
Machine Translated by Google
ER Series Industrial Robot ModBusTCP Interface Debugging Manual

ÿ Set estun.main as a remote self-starting program, and the current PC pointer stays on line 5.

ÿ Make sure that the value of the 40052 register starts with 0x00, then writes 0x4000, and the robot reloads

estun.main program, the PC pointer returns to the first line, and the 40019 register also changes to 0x4000.

24
Machine Translated by Google
ER Series Industrial Robot ModBusTCP Interface Debugging Manual

4.5 Clear all alarms remotely

Use ModScan (PLC) to send a clear all alarm command (reset the robot) to the robot, and an error occurs.

There are two situations (for ease of description, shown in binary below):

ÿ Modbus instruction execution error. For example, when executing the loading program, the register corresponding to the program name is empty, or

The program is in running state, and the program is started again; at this time, bit13 of Modbus status register 40019 will be set.

1. When this bit is set to 1, the system does not respond to any command. It is necessary to set the bit10 bit of the 40052 register to 1.

to reset.

After an execution error in the above figure, bit10 of 40052 needs to be assigned to reset.

ÿ An alarm occurs in the robot system, that is, an alarm is displayed in the status bar on the teaching pendant; for example, when starting the program, the safety door

Alarm, because the program is not running, bit13 of 40019 will also be set to 1. Then you first need to send 40052

Set bit10 of the register to 1. When the 40019 register changes to 0x00 again, then reset 40052 to 0x00.

Then write 0x10 to perform the operation of clearing the alarm and resetting it.

25
Machine Translated by Google
ER Series Industrial Robot ModBusTCP Interface Debugging Manual

First, you need to set bit10 of 40052 to 1, and clear the 40019 register to 0;

After the 40052 register is cleared to 0 again, write 0x10 (bit4 is set to 1), and execute the command to clear the teaching pendant alarm.

4.6 Precautions

(1) The simplified command interaction mechanism does not conflict with the original mechanism. When 0x11 is written into the 40100 register, the original

The mechanism takes effect. For usage, please refer to Chapter 3 ; when 0x88 is written to the 40100 register, the simplified command interaction mechanism takes effect.

26
Machine Translated by Google
ER Series Industrial Robot ModBusTCP Interface Debugging Manual

(2) When a command execution error occurs, bit13 of the 40019 register will be set to 1. At this time, the command can no longer be executed.

According to the command, bit10 of the 40052 register needs to be set to 1 to clear the instruction error and reset 40019 to 0x00.

(3) Each command is triggered by the rising edge. When executing the command, you first need to ensure that the value of the 40052 register is 0x00.

Only when a certain bit is assigned a value will there be a response; and only one command type can be responded to in the same cycle, that is, 40052 registration

The device can only have one bit with signal. When multiple bits have signals, the command will not respond.

(4) The pause signal is not affected by multiple signals and can be executed at any time.

27
Machine Translated by Google
ER Series Industrial Robot ModBusTCP Interface Debugging Manual

Chapter 5 ModBusTCP Point Table

As a server for ModbusTCP communication, Rob defines a data register area of 3000 bytes.

area (immediately MBDataBuffer : ARRAY [0..1499] OF WORD;)

Among them, MBDataBuffer[0]~MBDataBuffer[50] is the sending area of the Server (that is, the external PLC needs

To get relevant status information from Rob, read only)

Among them, MBDataBuffer[51]~MBDataBuffer[99] is the receiving area of the Server (i.e. external PLC

Need to write relevant operating instructions and information to Rob)

Among them, MBDataBuffer[100]~MBDataBuffer[1499] are general read and write areas of registers (can be found in

Read and write in Multiprog and instructions)

type local address register address definition illustrate Comment

MBDataBuff The value ranges from 1 to 256


ÿ

40001 heartbeat detection bit is used for communication connection detection


is[0] ring

MBDataBuff Current global speed The value is a percentage, i.e.


ÿ

40002 ÿ

is[1] Compare [1,100]

MBDataBuff Returns what the server has received

40003 Write permission response


ÿ

is[2] 400100 register value

bit0: manual operation mode

bit1: automatic operation mode

bit2: remote operation mode

bit3: enable status


MBDataBuff Rob status letter
40004 bit4: running status
ÿ

is[3] breath

bit5: error status

Send bit6: program running status

bit7: The robot is moving

do

MBDataBuff For example, the loaded engineering document

40005
is[4] Current loader File name: estun.test,
20 bytes
MBDataBuff Cheng name Then the value of each register is as follows:

40006
is[5] Down:
Machine Translated by Google
ER Series Industrial Robot ModBusTCP Interface Debugging Manual

type local address register address definition illustrate Comment

MBDataBuff [4]0x6573,
40007
is[6] [5]0x7475,

MBDataBuff [6]0x6E2E,
40008
is[7] [7]0x6D61,

MBDataBuff [8]0x696E
40009
is[8]

MBDataBuff
40010
is[9]

MBDataBuff
40011
is[10]

MBDataBuff
40012
is[11]

MBDataBuff
40013
is[12]

MBDataBuff
40014
is[13]

MBDataBuff SimDout[1-1
40015 DO 1-16 ÿ

is[14] 6]

MBDataBuff SimDoubt [17-


40016 DO 17-32 ÿ

is[15] 32]

MBDataBuff SimDoubt [33-


40017 DO 33-48 ÿ

is[16] 48]

MBDataBuff SimDoubt [49-


40018 DO 48-64 ÿ

is[17] 64]

29
Machine Translated by Google
ER Series Industrial Robot ModBusTCP Interface Debugging Manual

type local address register address definition illustrate Comment

bit0: command is 0

bit1: emergency stop command execution

Success (currently unavailable)

bit2: Start command execution

success

bit3: Stop command execution

success

bit4: Reset command execution


command register to 0
success

When, bit[0] is 1, and the command

bit5: The upper enable command is


Let the register be controlled by the command

Function (currently unavailable)

When , bit[0] is 0
bit6: The next enable command is
After the command is executed successfully,

Function (currently unavailable)


Corresponding success position 1

MBDataBuff Rob executes the order bit7: Load project command


40019 when regaining control

is[18] Order status success


And when the command is 0, bit8:
log out the project command
The previous success bit will be cleared

success

zero

bit9: Set global speed

success
Therefore, the command can be issued

bit10: Waiting for control


The status code is 0x801
bit11: Waiting for command

bit12: Waiting for command execution

line complete

bit13: Command execution error

error

bit14: Reset program indicator

Needle command successful

bit15: reserved

MBDataBuff Each two registers correspond to


40020 SimOut[1-1
is[19] AO 1-16 An analog point (floating

6]
…… ÿ

dot type)

30
Machine Translated by Google
ER Series Industrial Robot ModBusTCP Interface Debugging Manual

type local address register address definition illustrate Comment

MBDataBuff
40051
is[50]

bit2 (0ÿ0x4): machine

Robot program starts The robot must be far away

bit3 (0ÿ0x8): machine process excitation state, all

Robot program stopped Commands are triggered on rising edge

bit4ÿ0ÿ0x10ÿÿ Send, match reading and writing signs

Robot error reset Bit 40100 is 0x11

bit7ÿ0ÿ0x80ÿÿ (command status bit

MBDataBuff Rob operation finger Load project files When 40019 is 0x801
40052
is[51] make bit8 (0ÿ0x100): Can issue instructions)

Unregister the current project file Special: when the instruction is executed

bit9ÿ0ÿ0x200ÿÿ After failure or the state machine exits

Set global speed When it is wrong, you need to use bit10

bit10ÿ0ÿ0x400ÿÿ to reset command execution

Recei Instruction state machine reset device before it can be distributed again.

ve bit14ÿ0ÿ0x4000ÿÿ new instructions

reset program pointer

MBDataBuff
40053 Global speed value -
ÿ

is[52]

MBDataBuff
40054
is[53]

MBDataBuff
40055
is[54]

MBDataBuff
40056 Set the project name to 20 bytes
ÿ

is[55]

MBDataBuff
40057
is[56]

MBDataBuff
40058
is[57]

31
Machine Translated by Google
ER Series Industrial Robot ModBusTCP Interface Debugging Manual

type local address register address definition illustrate Comment

MBDataBuff
40059
is[58]

MBDataBuff
40060
is[59]

MBDataBuff
40061
is[60]

MBDataBuff
40062
is[61]

MBDataBuff
40063
is[62]

MBDataBuff
40064 SimDI[1-16] DI 1-16
ÿ

is[63]

MBDataBuff
40065 SimDI[17-32] DI 17-32
ÿ

is[64]

MBDataBuff
40066 SimDI[33-48] DI 33-48
ÿ

is[65]

MBDataBuff
40067 SimDI[49-64] DI 48-64
ÿ

is[66]

MBDataBuff
40068
is[67] Each two registers correspond to

……
SimAI[1-16] AI 1-16 An analog point (floating

MBDataBuff dot type)


40099
is[98]

MBDataBuff 0x11 Open rob command


40100 read and write flag bit
ÿ

is[99] Issue permissions

MBDataBuff
40101
is[100] For user (storage
Gener
… … Device value is open Read and write permissions

al
… … to internal PLC)

… …

32
Machine Translated by Google
ER Series Industrial Robot ModBusTCP Interface Debugging Manual

type local address register address definition illustrate Comment

MBDataBuff
41500
is[1499]

33

You might also like