Beijer Electronics (formerly QSI Corporation)

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

All times are UTC - 7 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Wed Mar 11, 2009 12:25 pm 
Offline

Joined: Tue Mar 03, 2009 8:00 am
Posts: 5
If I am understanding the Help section in Qlarity, You can use either one to listen to the Commport?
The DelimitedCommv2 has parsing capibilty's built into the object as where the basic serial does not ?


Top
 Profile  
 
PostPosted: Wed Mar 11, 2009 12:37 pm 
Offline
User avatar

Joined: Thu Mar 02, 2006 2:12 pm
Posts: 487
Location: Salt Lake City, Utah
Yes, the DelimetedCommV2 object parses ASCII strings that have separating characters and ending characters for each packet. An example would be a comma-separated and semi-colon delimited list (i.e. abc,abc,abc,abc;).

Code:
'This code is in an instance of a DelimitedCommV2 object

func RecvdDataPacket(data[] as byte)
    dim tmp[] as byte
    'parse through items in a comma seperated list
    while getnextitem(data, ",", tmp) do
        _print(tmp)
    loop
endfunc


For the preceding example code, if the serial port received the string "abc,abc,abc,abc;", it would print "abc" four times.

_________________
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