Jump to content

Recommended Posts

Good day, everybody,

 Never been in such situation before: communicating with Omron PLC's. To minimize number of modbus operations Omron programmer gives us information about control bits in 16-bit registers. We are reading and storing them in Unitronics 16-bit registers (MI). But now came thought that Vision MI max value is 32767(in case 15 of control bits are set to 1). But if all 16 bits are set, then value becomes 65535. All messed up in the head..


Vision is using signed 16bit registers and Omron unsigned, I think.


Do we have to use DW or ML variables in such case? Thank you for help.

Link to comment
Share on other sites

Hi Vidmas30,


It appears the issue is with signed and unsigned 16 bit registers. A MI is signed 16 bit register, with a range of -32768-32767. A unsigned 16 bit register would have a range of 0-65535. A 65535 for a Unsigned register will result in a value of -1 for a signed register. 


The bits will still translate directly, however. You can read the value, and break the value down into bits using the function block Vector > Numeric to bits.  It will take the MI, and break it does into MBs.


Alternatively, a DW is a 32 bit Unsigned register. 


I hope you find this helpful.



  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...