07-11-2016 03:19 PM
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
Solved! Go to Solution.
07-11-2016 03:24 PM
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.
07-11-2016 03:29 PM
Yup you're right. Two VISA reads does the trick. Thanks!