Home› Programming
Discussion
Back to discussions page
YOSHIHISA
Posts: 5 Apprentice
modbus TCP |
1.7K views
|
Answered | |
/ Most recent by YOSHIHISA
in Programming
|
8 comments |

Hi
I am trying communication between the PLC and Robotiq Universal Controller .
When reading is performed using the command of FC 03
I am trying communication between the PLC and Robotiq Universal Controller .
When reading is performed using the command of FC 03
Error response comes back.
The address specifies 0x03E8 (1000), but is it wrong?
Please give me the correct answer address.
Please also tell me the address to direct to the robot at the same time
Please also tell me the address to direct to the robot at the same time
Tagged:
Best Answers
-
louis_bergeron Posts: 94 Handy
@YOSHIHISA
Modbus TCP doesn't have a standard configuration file like other Fieldbus. They are normally pretty simple to configure on the Modbus TCP client side. Your PLC must have the Modbus TCP client option to get the ability to read and write to Modbus TCP I/O device. These devices are named Modbus TCP server like the Universal Controller for the gripper, it's a Modbus TCP server. In Modbus TCP, input and output registers are in a separate memory area so both of them start at 0. Which is not the case in Modbus RTU. To control the gripper you will then have to access input register starting at 0 and output registers starting at 0.
This is Modbus TCP client configuration made on a Universal Robot to communicate with the Universal controller with the gripper at the IP address 192.168.1.19. It writes at the register output 0,1 and 2 and read at the input registers 0 and 1.
In Modbus TCP registers are sometimes 16 bits so they will cover 2 bytes each. That the registers of the gripper.
In the example above, register output 0 contains 2304 which means: 1001 0000 0000. It indicates that the bit 0 (rACT) and 3(rGTO) of the first byte are ON.
If the Modbus client is not implemented in the PLC and you have to write the frame by yourself like this 09 03 07 D0 00 02 C5 CE. Then refer to the link in my previous post to know how Modbus TCP frames are built. the frame 09 03 07 D0 00 02 C5 CE only refer to Modbus RTU and will never get the right answer in Modbus TCP. In this example, 09 means the slave ID in the Modbus RTU. Devices are identified with IP address in Modbus TCP.
-
louis_bergeron Posts: 94 Handy
@YOSHIHISA
The two fingers gripper can connect directly to a Modbus RTU Master if the interface is RS-485. There is no need for a Universal Controller in between in this case. RS-485 settings are shown here:
https://robotiq.com/support/2f-85-2f-140/downloads-instruction-manual in section 4.7.1.
If your PLC has the Modbus RTU Master option, it will work. If not, it's going to be the hard way and you will have to program yourself this Standard Fieldbus protocol. The easy way will always be to have a Fieldbus <master> on a PLC to connect Fieldbus <slave> like the gripper or any other Fieldbus I/O. -
YOSHIHISA Posts: 5 Apprentice
Thank you for responding the other day.
Thanks to that, the robot hand is running smoothly.
I have one more question.
When moving the hand, first issue an activation command from the PLCEven if the communication is interrupted now, although it starts to move, even if the activation operationIt is control that requires.Is it possible to control without this activation operation?
What is the state if activation is required?
Thank you for your consideration.
Have you also double checked your IP address and communication settings? They can be found in section 3.5 of the manual
[email protected]
I am using modbus tcp type Universal Controller.
I also confirmed the IP address with PING
I am communicating programming by referring to Chapter 4 of "2F - 85 & 2F - 140 - Instruction Manual".
4.7.2. Read holding registers (FC03)
Request is: 09 03 07 D0 00 02 C5 CE
So I thought that the read address is different between RTU and TCP.
As response comes back, I think that protocols etc. are done normally.
Modbus RTU is a Fieldbus protocol running over a serial com port. It could be RS-232, RS-422 or RS-485. It's the protocol running inside the gripper and we use an RS-485 line. Modbus TCP is derived from this protocol but running over an Ethernet connection. The protocol is slightly different. It's the goal of the Universal controller to convert the Modbus TCP protocol (PLC side) to the Modbus RTU protocol (gripper side). What is explained in the Gripper manual, it's the Modbus RTU protocol the gripper is using. If you would like to program yourself a standard Fieldbus protocol, you can find documentation about how they work on the web, but it absolutely not required. Normally, PLC have a lot of Fieldbus master device available like EtherCAT, Ethernet/IP, Profinet, Modbus TCP and then with the according Universal controller, gripper registers are then directly accessible in the PLC. Only the Fieldbus need to be configured. Fieldbus configuration file can be found on support web page here: https://robotiq.com/support/2f-85-2f-140. If you PLC support Modbus TCP then you are supposed to simply configure the registers of the gripper. If the PLC doesn't support the Modbus TCP, a suggest you to change to a Fieldbus your PLC support. If you absolutely want to program yourself this standard protocol. You can find some information on this website regarding the Modbus TCP protocol: http://www.simplymodbus.ca/TCP.htm
Integration Coach
robotiq.com
[email protected]
https://robotiq.com/support/2f-85-2f-140
I can not find the modbus TCP configuration file on this website
I can not change to a Fieldbus , because the PLC does not support only modbus TCP.
If you do not have a modbus TCP configuration, do you know the address of the input output register, do you have any reference somewhere?
The PLC side supports modbus TCP, and it seems that reading and writing are possible if only the address is known.
That's all, thank you very much.
It has not worked well yet
Is it possible to connect directly to PLC?
Do I need a universal controller compatible with modbus RTU?
In that case, will I refer to "2F - 85 & 2F - 140 - Instruction Manual" as a reference?
If I connect directly, is modbus RTU communication?
Is the slave ID according to the instruction manual?
Are the communication speed settings as well as manual?