Beijer Electronics (formerly QSI Corporation)

Manufacturer of Mobile Data and Human Machine Interface Terminals.
It is currently Sat Nov 18, 2017 11:51 pm

All times are UTC - 7 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Tue May 04, 2010 2:49 am 
Offline

Joined: Wed Dec 17, 2008 1:27 am
Posts: 4
hello , how could i read or write multiple registers in qlarity? i had read or write to a single register , but when i have many registers to transfer i think that it will be more efficient to to do in a single transaction.

Regards,

Eric


Top
 Profile  
 
PostPosted: Tue May 04, 2010 8:09 am 
Offline
User avatar

Joined: Thu Mar 02, 2006 2:12 pm
Posts: 487
Location: Salt Lake City, Utah
If you are using the Modbus library that comes with Qlarity, it will automatically combine reads together if they are in addresses that are close to each other. To have more fine control over writing registers there is a function "SetMultipleRegister" of the ModbusComm object (see F1 for details). The code might look something like this.

Code:
'data is an array of 6 bytes
ModbusComm.SetMultipleRegisters(default, 0, 0, 6, data)

_________________
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