Recommended Posts


I have an issue with the correct I/O type to use - the manual with the equipment appears to be inconsistent - however my newbie status maybe the issue....  

I have 3 different channels that according to the manual all use the same data type - integer - see attached PDF - MTM100FM_ extract

I have set up all 3 as  readholding U16 - see channels attachment (note channels are actually 1 less than the manual due to Modbus numbering)

the equipment has a display that shows all the 3 channels 

Signal Quality   range 90-95

Signal Strength Up range 80 -86

Signal Strength down range 80-86

if I do a to.byte conversion on Signal Quality per the manual I get the correct reading - somewhere between 90-95 per the display - so readholding U16 appears to be correct

the up and down are giving a reading in the 3500 range (see attachments) - outside the 0-2047 integer range of the manual

Am I using the correct I/O type?

if not what should I be using?












Link to comment
Share on other sites

Well, technically an "Integer" means a signed integer, so S16, but in this case it probably doesn't matter because you are under 32767.  It might be that you have to strip the high order bytes, so just apply a conversion of Value & 0x7ff.  But otherwise there is nothing wrong from the DAQFactory side.



Link to comment
Share on other sites


thanks for the response but I have a question re the syntax in your reply

you have Value & 0x7ff - is this a typo?

Only reason ask is that in your reply to a post I made re BCD conversion in Sept 2017 you said use  Value & 0xff

As a non programmer I am not sure of the logic /syntax of this low and High byte (Value >> 8) conversions

any chance you can give a quick explanation or point me to where in the Manual where these conversions are?  




Link to comment
Share on other sites

No, you said the range was 0 - 2047.  2047 is 0x7FF in hex.  Doing Value & 0x7ff strips off any bits above 2047.  Sometimes, devices that aren't a full 16 bit, will use the upper bits for status or other things, which may be why you are getting numbers in the 3500 range.

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.