03-10-2016 11:42 PM
I try to use by send packet FFAADDFF,5D,A6,55,CHKSUM from serial port but haven't any reponse , please help me.
03-10-2016 11:56 PM
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.