LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

why I can't try to use Multithread_Serial example in labview 2015

I try to use by send packet  FFAADDFF,5D,A6,55,CHKSUM   from serial port but haven't any reponse , please help me. 

0 Kudos
Message 1 of 2
(2,632 Views)

I don't see where you are sending any data.  I only see you reading data.

 

And the Bytes at Port method is usually the wrong method to use.  In this case that loopis running as fast as it can and might only be grabbing a few bytes at a time on each iteration.  Your consumer loop looks like it wants to process complete packets of information.

 

You need to accumulate your data into a shift register, process it only when you are sure you have a complete message.

 

If you know you are always going to read 8 bytes (?  not clear how your checksum is calculated), the wire an 8 into VISA Read and get rid of the Bytes at Port.

 

Since it looks like you are expecting binary data, you should disable the termination character in your Serial Configure.  It is turned on and set for linefeed (x0A) by default.  If you ever get that byte in your data, your VISA read will stop prematurely there.

0 Kudos
Message 2 of 2
(2,611 Views)