RX3i IC695CPE305 Modbus slave

sjohnson

Lifetime Supporting Member
Join Date
Feb 2010
Location
MI
Posts
247
A while back I Converted a GE PCM module over to Modbus TCP. Due to the Discontinue of the IC693CMM321 I am redoing this project again. I am Using a Schneider Electric TSXETG100 to Gateway Modbus TCP to RTU to Panel Meters. The CMM321 used COMM_REQ with BLKMOV. I see the RX3i uses Register mapping for when using Modbus as a slave. My question Where to start. Do I still use the BLKMOV with the proper channels to define how to communicate Modbus? Under the Modbus TCP address map tab it is all greyed out so I’m thinking you still use the BLKMOV without COMM_REQ. If someone could steer me in the right direction I would be greatly appreciated. Thanks
 
When the CPE305 is used as a MBTCP 'Slave' all you need do is turn that option 'ON' in the Hardware Configuration. On the Settings Tab set 'Modbus Address Space Mapping Type' to something other than 'Disabled' Then the MBTCP Address Tab is "Information" only, you can't change it, to use MBTCP you must use this map supplied.
You can change the quantity of some of the Address Ranges in the "Memory" tab of the CPU configuration.

Any "Modbus Register" that is read or written by the "Master" will be redirected to the corresponding "Controller Memory Address".
 
Last edited:
So if I have two devices lets say Channel 1 and channel 2 how is that defined? Do I use the same blockmov and move them registers to the corresponding? I have a Modbus on channel 1 registers starting %R00250 and the other device channel 2 Register %R00350. I see the holding register table on the mapping tab is 1-9999. So Am I using blkmov to read and write to the Modbus registers?
 
That would be one way. You need to get the data needed to be exchanged into addresses that you can access via MBTCP with your Master device. How it is done is irrelevant. Much of the data may already be in memory that can be directly accessed with a MB address.
You may want/need to move them into consecutive groups for efficiency.
 
Russ, Maybe I have not made available enough DETAIL in My question promotes DETAIL in Your Answer. :p

I know the GE Fanuc 9030 Uses COMM_REQ with the BLKMOV Instructions to communicate and perform tasks for using Modbus. This I know and it does work. Now the RX3i says that COMM_REQ are not needed when using the embedded Ethernet as a Modbus TCP as in the IC695CPE305 when using as a SLAVE/SERVER. BUT THE MASTER/CLIENT you still do. This is defined in the GFK-2224L. It says in GFK-2224L that when using the slave scheme it uses Modbus address mapping. I will not lie I am Not really Familiar with this and how it is implemented. My Meters are hooked to a Modbus TCP Gateway TCP to serial Master 2 wire. The IP address is 172.16.244.112 and the PLC ADDRESS is 172.16.244.111. There are two devices on the Modbus serial side with address 1 and 2. So since there is no example in the GFK-2224L for the Slave Scheme I am unsure how do I connect to the Gateway and define the registers so I can read and write on both channel one and channel two. It was more easily to understand with the 9030 because there were examples and more documentation on the GEIP site. So when you said "That would be one way. You need to get the data needed to be exchanged into addresses that you can access via MBTCP with your Master device. How it is done is irrelevant." Probable made me more confused with this statement.

So Question :
1. If you don't use COMM_REQ to Connect to the GATEWAY and Channel on the GATEWAY then What do you USE?
2. If you don't use the BLKMOV to define the registers on the channel then how.
3. If with the Modbus mapping is just moves the corresponding registers how does it know where to locate these?
 
I was thinking a bit. Also since the Gateway I am using has no way of initiating the Channel Opening the communication request. Don't I need to do the COMM_REQ because the PLC Actually MASTER/CLIENT? Maybe that's why I am confused because doesn't there have to be some Channel open and it knowing where it is looking for the information from.. There is only one PLC and The Gateway Modbus TCP to Serial..
 
Maybe I am the one who is confused. I interpreted that your Gateway is the Modbus TCP/IP Master device and the PLC is a Modbus TCP/IP Slave device in your setup.
Also on the Serial side the Gateway is the Master device and your I/O are the Slaves, but this has no affect on the PLC.

Is this correct? As a 'Slave' the PLC does nothing other than reply to its Master.
If not what is?
 
Last edited:
Russ, After Thinking yesterday I think I was wrong that's why I asked. The gateway was the master to the devices(METER)on serial side and for whatever reason I assumed it was on the plc. But after thinking it has to be connected and defined on the channel to swap messages. So if there already was a master connected then a slave may exchange registers. Right or wrong? In that case I think I am still in Deep DoDo. When I set up my COMM_REQ as the master the status returns a 1 or 16#0001 before it even triggers the one shot and says it is connected and puts a 2 in the IN of the COMM_REQ instead of a 8. I can manually trigger the one shot it will connect. But when it disconnects it does disconnect but the stat still has a 1 or 16#0001 and put a 2 in the IN of the COMM_REQ.So when reading the GFK-2224L I have a ticket in with GEIP support it has been over a week and I haven't heard anything. Unusual because they usually get back to me within a day or two..I apologize for making it confusing that's why I thought I should give better detail as once again I climbed a coconut tree looking for a banana.
 
We still need to decide who is the Master of the MBTCP side of this.
ONLY if the PLC is "Master" will a COMMREQ do anything for you.
Only if the 'Gateway' is a "Slave" will a COMMREQ do anything for it.
 
Yes I am Using chapter 9 of GFK-2224L. Since the Gateway has no way of initiating communications I would assume that the PLC must become the master and the Gateway must be the slave. Sometimes you need to regroup and start at the beginning. For test purposes I put my application aside and made a new Proficy Project. I made the project similar to the example on chapter 9 pages 27-31. It will connect and disconnect. I'm hoping I am just overlooking something. Maybe the RX3i is a little less forgiving...???????? But nerveless I have come up with the same results. I can open channel (connects) put a 1 or 16#0001 in %R02040 and an 8 in %R00301 as it should. I disconnect it puts a 2 in %R00301 and %R02040 remains a 1 or 16#0001 even though it has disconnected. I have checked with the gateway to make sure it has disconnected. It seems like the status is not updating correctly for some reason.

OpenChannel
NOCON LANIFOK,G,%I00096; NOCON LANOK,G,%I00093; H_WIRE; H_WIRE; H_WIRE; H_WIRE; H_WIRE; H_WIRE; H_WIRE; COIL ETH_READY,G,%M00001; END_RUNG;
NOCON ETH_READY,G,%M00001; NOCON DO_OPEN,G,%M00002; H_WIRE; H_WIRE; H_WIRE; H_WIRE; H_WIRE; H_WIRE; H_WIRE; POSCOIL OPEN_OS,G,%M00003; END_RUNG;
NOCON ETH_READY,G,%M00001; NOCON OPEN_OS,G,%M00003; MOVE_WORD 1 0 R02040,G,%R02040; H_WIRE; H_WIRE; H_WIRE; H_WIRE; H_WIRE; H_WIRE; RESETCOIL OPEN_FLT,G,%M00004; END_RUNG;
NOCON ETH_READY,G,%M00001; NOCON OPEN_OS,G,%M00003; BLKMOV_INT 8 0 8 2039 0 0 3000 R00301,G,%R00301; H_WIRE; H_WIRE; BLKMOV_INT 1 1 4 172 16 244 112 R00308,G,%R00308; END_RUNG;
NOCON ETH_READY,G,%M00001; NOCON OPEN_OS,G,%M00003; COMM_REQ R00301,G,%R00301 2 65536 **; C+1; H_WIRE; H_WIRE; H_WIRE; H_WIRE; H_WIRE; SETCOIL OPEN_FLT,G,%M00004; R+; C+1; C+1; C+1; H_WIRE; C-; V_WIRE; END_RUNG;
NOCON ETH_READY,G,%M00001; H_WIRE; EQ_INT R02040,G,%R02040 1 **; C+1; H_WIRE; H_WIRE; H_WIRE; H_WIRE; H_WIRE; COIL OPEN_SUCESS,G,%M00005; R+; C+1; C+1; C+1; V_WIRE; C-; H_WIRE;

CLOSECHANNEL
NOCON ETH_READY,G,%M00001; NOCON CLOSECHNNL01,G,%M00006; H_WIRE; H_WIRE; H_WIRE; H_WIRE; H_WIRE; H_WIRE; H_WIRE; POSCOIL CLOSCHNNELOS,G,%M00007; END_RUNG;
NOCON ETH_READY,G,%M00001; NOCON CLOSCHNNELOS,G,%M00007; MOVE_WORD 1 0 R02040,G,%R02040; H_WIRE; H_WIRE; H_WIRE; H_WIRE; H_WIRE; H_WIRE; RESETCOIL CLOSE_FLT,G,%M00008; END_RUNG;
NOCON ETH_READY,G,%M00001; NOCON CLOSCHNNELOS,G,%M00007; BLKMOV_INT 2 0 8 2039 0 0 3001 R00301,G,%R00301; H_WIRE; H_WIRE; BLKMOV_INT 1 0 0 0 0 0 0 R00308,G,%R00308; END_RUNG;
NOCON ETH_READY,G,%M00001; NOCON CLOSCHNNELOS,G,%M00007; COMM_REQ R00301,G,%R00301 2 65536 **; C+1; H_WIRE; H_WIRE; H_WIRE; H_WIRE; H_WIRE; SETCOIL CLOSE_FLT,G,%M00008; R+; C+1; C+1; C+1; H_WIRE; C-; V_WIRE; END_RUNG;
NOCON ETH_READY,G,%M00001; H_WIRE; EQ_INT R02040,G,%R02040 0 **; C+1; H_WIRE; H_WIRE; H_WIRE; H_WIRE; H_WIRE; COIL CLOSE_SUCESS,G,%M00009; R+; C+1; C+1; C+1; H_WIRE; C-; V_WIRE;
 
The logic you posted looks correct for opening and closing a channel (Modbus TCP commands 3000 and 3001). The value of 1 in %R2040 tells you that the COMMREQ instruction executed successfully.
Once the channel is opened, you need to execute one or more additional COMMREQ instructions to pass data between the PLC and the gateway. Look at the examples for setting up the COMMREQ for Modbus TCP commands 3003 and 3004. Use command 3003 to get data from the gateway and put it into PLC memory. Use command 3004 to send data from PLC memory to the gateway. You will need the Modbus memory map for the gateway to figure out the addresses within the gateway.
If you can show me a URL for the gateway's Modbus communications manual I can help you set up the BLKMOV instructions for the additional COMMREQs. I've just finished a startup where I have seven simultaneous Modbus TCP channels open with devices from three different manufacturers, so dealing with this is still fresh in my head.
 
Steve thanks.. Yes that's all I have since I cannot get it to connect and disconnect correctly. I set my application aside that does the read and writes till I can figure out why the status will not update correctly. I have to original PGM I converted over from a 9030 CPU350 with the CMM321 and I couldn't get that to work either same issue with the %R02041 status not updating correctly. so that is why I only have the open and close posted here to see if someone else with a CPE305 might give it a whirl and see if the issue is with that or if it was something in my PGM but I did it two ways with the same results..


Modbus TCP Filtering is disabled. The gateway works just fine with the 9030 connect disconnect read and write..it is the RX3i and the CPE305 that something is not quite right

that is the right pdf caddymac the gateway is pretty straight forward..
 
Last edited:
Dumb question, but are you using the latest firmware for the CPE305? First iterations of the CPE did not support Modbus. Any chance you could use an add-on Ethernet card?
 

Similar Topics

I have a system using Rx3I CRU320 redundant CPU with Proficy Machine Edition Software. In the hardware configuration of each CPU module, under...
Replies
14
Views
375
Hi, we are using Rx3i CRU320 redundant PLC system and we noticed a discrepancy between Primary and Secondary controller. Couple of variables (DI)...
Replies
8
Views
268
Hi there, I'm doing some extensive testing and commissioning with a slew of new Emerson PACSystems RX3i PLCs. It would be convenient to...
Replies
5
Views
95
Hi there, Trying to get some ascii serial communications working via RS485 (COMMREQ functions). I have attached our wiring for the COM2...
Replies
1
Views
963
Hello all, First time poster, long time viewer of these forums. Could not find my solution on here. We have had issues with a Comm Fail on an...
Replies
2
Views
364
Back
Top Bottom