annulla
Visualizzazione dei risultati per 
Cerca invece 
Intendevi dire: 

VISA read message with multiple termination characters

Risolto!
Vai alla soluzione

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
Messaggio 1 di 3
3.683Visualizzazioni
Soluzione
Accettato da 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.

Messaggio 2 di 3
3.680Visualizzazioni

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

0 Kudos
Messaggio 3 di 3
3.674Visualizzazioni