Beijer Electronics (formerly QSI Corporation)

Manufacturer of Mobile Data and Human Machine Interface Terminals.
It is currently Sun Nov 19, 2017 5:36 am

All times are UTC - 7 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: set to only one register
PostPosted: Tue Feb 28, 2012 4:31 am 
Offline

Joined: Wed Feb 15, 2012 4:40 am
Posts: 5
hi,
I am trying to write only one register using Modbus but is is not happening.
like multiple register (modbuscomm.setmultipleregisters(default, idnum, wrsa + 1, wrqty, wrarray))
is it any function for set only one register?
in above function idnum=id number of instruments
wrsa=address o0f register
wrqty=quantity of registers
wrarray=array of registers.(byte)


Top
 Profile  
 
PostPosted: Tue Feb 28, 2012 9:47 am 
Offline
User avatar

Joined: Thu Mar 02, 2006 2:12 pm
Posts: 487
Location: Salt Lake City, Utah
Yes, you can use the "SetRegister" function of the Modbus Comm or you can use a MBVirtualRegisterV2 object. If you are using the MBVirtualRegisterV2, then make sure the "registerType" is a 16 bit type and change the "value", "intValue" or "strValue" property to set the register.

Code:
MBVirtualRegister_1.intValue = 5


You can also make the object writeOnly.

Code:
'in MBVirtualRegister_1 "Code View"
init writeOnly := true

_________________
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