LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA read message with multiple termination characters

Solved!
Go to solution

Hi, I am using VISA to read data from my device. After writing, the device will always send an acknowledge sequence "OK" CR LF, followed by the data.

 

If I enable termination character, my program will only ever read "OK". However I can't set it to false and set a byte count because the number of bytes varies.

 

Is there a workaround to this problem? Maybe somehow ignore the first termination character?

 

Much thanks,

Ben

0 Kudos
Message 1 of 3
(2,992 Views)
Solution
Accepted by topic author ben93

What is the termination character for the actual data?

 

It sounds like you are getting

 

OK CR LF

Your data here .....   LF

 

Just let  line feed be your termination character.  Be sure to do TWO VISA Reads.  One to get the OK, the second to get the data.

Message 2 of 3
(2,989 Views)

Yup you're right. Two VISA reads does the trick. Thanks!

0 Kudos
Message 3 of 3
(2,983 Views)