Beijer Electronics (formerly QSI Corporation)

Manufacturer of Mobile Data and Human Machine Interface Terminals.
It is currently Mon Nov 20, 2017 2:20 am

All times are UTC - 7 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Tue Mar 06, 2012 3:05 pm 
Offline

Joined: Mon Mar 21, 2011 2:40 pm
Posts: 22
The MBregisterV2 object seems to loose the last two digits of a 9 digit 32bit integer. I do not get the loss of precision when a label to display the intValue of the MBvirtualRegister instead. I tried the virtual register after reading an earlier post where someone was getting a similar problem using "value" instead of "intValue" for a conversion to HEX. The virtual register does not have built-in label/display functionality like the MBregister object. It seems the MBregister object may be referencing "value" instead of "intValue" for its own conversion for display.

PS, the MBregister object can even be used to properly set a 32bit register with full precision. Only its display seems to be having problems.

Attached is code sample.


Attachments:
modbusinteger32test.qly [9.07 KiB]
Downloaded 192 times
Top
 Profile  
 
PostPosted: Wed Mar 07, 2012 12:54 am 
Offline
User avatar

Joined: Thu Mar 02, 2006 2:12 pm
Posts: 487
Location: Salt Lake City, Utah
What version of Qlarity Foundry are you using?

This is all you should need to display the value.
Code:
func ValueChanged()
    virtual_register_output.value = mbvirtualregister_1.strValue
endfunc

_________________
Ron L.

http://www.beijerelectronicsinc.com/


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 7 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group