Div_by_zero

Modbus TCP/IP group read issue on P2K PLC

2 posts in this topic

Running a P2K that's connected via Ethernet to a proprietary greenboard (embedded C++ running on an ARM Cortex processor) that's equipped with Modbus comms.

The C++ programmer provided me with a Modbus register document.  The read only inputs (Modbus command: 04) section shows blocks 1 and 4 being 6 byte ASCII registers.  Blocks 7-13 are 2 byte integers.  Blocks 14-22 are 4 byte integers.  Blocks 24-31 are 2 byte integers.  Blocks 32-46 are 4 byte integers.   Blocks 48-51 are 2 byte integers, and block 52 is 4 byte integer.

If I do a single MRX and try to bring in all 52 blocks at once as a group, nothing looks right in a Data View.  I am assuming that MRX group reads have to be limited to like register sizes?  Meaning, I would need a group MRX for blocks 1-6, another one for blocks 7-13, another one for blocks 14-22..

Is this correct?

Thanks for any help.

   

Share this post


Link to post
Share on other sites

> If I do a single MRX and try to bring in all 52 blocks at once as a group, nothing looks right in a Data View.  I am assuming that MRX group reads have to be limited to like register sizes?

I doubt it.  Modbus is only responsible for transferring the bits.  Modbus does not know or care what format the data is, it just carries bits.  The application layer, the firmware in the P2000, is responsible for interpreting what the bits mean.  Modbus does not transfer any of the properties of the bits, either.   So there's no way data view (whatever that is the A-D world) or any application level layer knows what format the bits have, unless the application is told what the properties of the data are in configuration/programming.   DataView has to be configured to interpret the ASCII, the short and long integers appropriately.

Facts of life about Modbus.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now