Recommended Posts

Hi

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?

Rodney

 

 

 

 

 

MT100FM_Signal_quality.PNG

MT100FM_Signal_down.PNG

MT100FM_Signal_up.PNG

mt100fm_Channels.PNG

MT100FM_Extract.pdf

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

Hi

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?  

Rodney

 

 

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

Archived

This topic is now archived and is closed to further replies.