Simultaneous Read/Write (CP1E ModbusRTU)

Andreik

Member
Join Date
Mar 2009
Location
Makati City
Posts
80
Good day,

I have a problem with Modbus-RTU. In fact I'm new in this one and having slow progress grasping it. I'm using Omron "CP1E-N60DT-D" connecting to Oriental Motor "ARD-KD".

I've understood how to Read/Write data one at a time during my tests. However, in application, I need to Read(03h) and Write(06h) at the same time (like our usual PLC I/O's) but I can't imagine how to do it.

By the way I'm using "CP1W-CIF11". I've read something about the built-in RS232C port capable for Modbus-RTU but I'd never found any technical data regarding this or is it possible to use 2 ports at the same time.

I'd appreciate any help I can get. Thank you very much.

Sincerely,
Andrei K.
 
It can not be done, unless both devices have the capability of running two Modbus separate Modbus routines simultaneously, each routine having with their own comm ports.

It seems like you've already discovered that Modbus is a Master-Slave protocolm where a message from the master to the slave can have only one function/command code. Since any given function/command code is either a read or a write instruction, and there is no function code that combines the two, a Modbus operation is either read or write.

Your idea of paralleling ports will not work because the slave drive has only the one port. Even if you could somehow configure the master to read on its one port and write on its other port at the same time, that would create a bus conflict, with two masters fighting each other on a single bus line (which is why one of the Modbus RTU RULES is that only one master is allowed).
 
I see, guess I have to choose either to command or monitor the Slave. Thank you very much for the input, now I should be able to move on.

It can not be done, unless both devices have the capability of running two Modbus separate Modbus routines simultaneously, each routine having with their own comm ports.

It seems like you've already discovered that Modbus is a Master-Slave protocolm where a message from the master to the slave can have only one function/command code. Since any given function/command code is either a read or a write instruction, and there is no function code that combines the two, a Modbus operation is either read or write.

Your idea of paralleling ports will not work because the slave drive has only the one port. Even if you could somehow configure the master to read on its one port and write on its other port at the same time, that would create a bus conflict, with two masters fighting each other on a single bus line (which is why one of the Modbus RTU RULES is that only one master is allowed).
 
The function code 23 is 'bidirectional'. I.e. you send and request data with one telegram. I don't think it is supported by all Modbus equipment. I've used it with Wago PLC and Vacon VFDs running ModbusTCP.

Kalle
 
It doesn't support that in this case. o_O

Guess I really have to choose 1 of the 2. Thank you very much.:ROFLMAO:

The function code 23 is 'bidirectional'. I.e. you send and request data with one telegram. I don't think it is supported by all Modbus equipment. I've used it with Wago PLC and Vacon VFDs running ModbusTCP.

Kalle
 
You can read and then write but have to program the two operations in the PLC - only one at a time.
 
@BobB,

It can't handle fast transitions though. And the data are jamming like party. :D
What do you mean by fast transactions? What sort of speeds are you expecting with modbus Serial?
There is no need for the data to be jamming like a party if the code is executed correctly.

We have tried to give you plenty of help & lead you in the right direction...
 
The function code 23 is 'bidirectional'. I.e. you send and request data with one telegram. I don't think it is supported by all Modbus equipment. I've used it with Wago PLC and Vacon VFDs running ModbusTCP. Kalle

That's right. I'd forgotten about 23 because it's so seldom implemented. Interesting to know that Wago/Vacon supports it.
 
The last time I looked at or used the 23 code, I found it quite slow compared to individual read/writes... but that could of been to do with the slave device also
 

Similar Topics

I'm super new to the Controls world. This is my first controls job and i never went to school or have a background. I was just a technician that...
Replies
21
Views
4,039
Hello everyone, I am an Automation Engineer in a manufacturing facility. There are multiple LANs here. Are there any recommended wifi adapters...
Replies
4
Views
1,612
This is arguably a Windows question, but it must be applicable to a lot of people. When we go to the shop floor to connect to a machine network...
Replies
7
Views
2,316
Wonderware Intouch, Kepware timing issue with "simultaneous" writing of many tags I have an Intouch application coupled with Kepware that is...
Replies
17
Views
7,017
Hello! I have a control panel with two hard-wired push buttons. One button to switching on, and another one to switching off. And I have an HMI...
Replies
5
Views
2,022
Back
Top Bottom