Addressing in PM564 eth for reading Integer values
I am using PM564 ETH as slave and CI867 as master. On COM1 port i have connected a modbus serial device on RS485. Now for register addresses for the serial device are starting from 40001. How the adressing to be done in the PLC for reading data from serial device?
CI-867 is a TCP/IP module used with AC800M controllers.Hence, I am assuming you are using an ethernet to serial gateway.Since you are using PM564 ETH, you could directly communicate over its ethernet port and not on the serial ports.
There is no specific programming required in codesys for masters to read the PLC's modbus registers. The only configuration required is in automation builder i.e configuring COM-1 port as server/slave or appending Modbus Server to the onboard ethernet port and setting parallel connections to greater than 0.
For the format of Modbus adressing in AC500 PLCs, please refer to the codesys online help.
Please follow the below link, which I believe will help you.
I found many your questions about that matter. Could you attach a sketch of your configuration.
For me it is not clear which COM1 port you are asking for - (on PM564?), also why RS485 when you are asking for ETH and/or Modbus TCP/IP?
Just for example: I used RS485 Modbus RTU connection between PM554 COM1 (slave) and COM3 on PM856 (master) with RS232/RS485 transmitter. Then the addressing for integers in that case are:
%MW0.0 in PM554 (no any block here) = starting address %MW10#0 for MBRead block in PM856
For bits it is different.
From comments in your previous thread ...
> " Thats right..I am already using MOXAs for that purpose. But in CI867 each MOXA and serial devices connected to it are considered each devices. So no of slaves exceeding 70 which is max limit. So if i can incorporate PM564, I solve the problem to an extent."
So I'm assuming you are trying to get around the limit of 70 slaves per CI867 by writing a "data concentrator" in the AC500 controller.
There are a number of potential issues here that you need to be carefull of.
- This doesnt happen magically in the AC500. You need to write at least two interfaces ( one to the slaves and one to the master ) and you need to group all the various slaves into blocks of data before sending that data back to the CI867.
- You need to carefully consider what happens when one or more serial slaves go offline and your AC500 serial interface begins to retry data connections after a timeout period. If your retry period is 0.5 seconds and you retry 3 times, then it takes 1.5 seconds to skip over a failed slave. If you have 10 failed slaves, then you begin to have really serious delays in your multi-drop modbus serial interface. Thats fine for reading occasional values from a totaliser, but not for start / stop commands to motors.
- To avoid this, you need multiple serial interfaces in the AC500.
- Your AC500 PLC program will be inflexible - You'll need to re-program both the AC800M AND the AC500 if any registers change in the slaves.
- You can run multiple CI867's to get past the 70 slave limit.
- If you still feel that using the AC500 as a data concentrator is the best solution for your problem, there is no substitute for reading the documentation and understanding how modbus serial addressing works. The AC500 is programmed with CoDeSys and there are many good articles on the web explaing how CoDeSys addressing works. Be aware that some adressing is going to be dependant on how your serial slaves are designed and you'll need to read the manufactures documents as well.
Generally speaking ...
The different Modbus operations ( read coil, address , input) usually hit the various locations based on the located memory declarations.
%IX0.0 -> Modbus Input address of 10001
%QX0.0 ->Modbus Coil address of 00001
%MW0 ->Modbus holding address of 40001.