LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Warning VISA Read 1073676294 (Hex 0x3FFF0006)

Solved!
Go to solution
Solution
Accepted by topic author Lablasc

In those types of ASCII protocols, messages are usually terminated by a given character (or couple of characters).

You remarked that the command string should be terminated with \n, which is a readable representation of the line feed character (1 byte), whose numeric value is 10 dec, 0xA hex.

Most probably, also the instrument answer messages are terminated this way, so the real answer would be something like "22.64,46.7\n". The protocol documentation should specify which is the termination character (TermChar) of the answer.

With VISA, you can configure (with the VISA Configure etc.) a termination character in such a way that, when this character is received, the read is immediately terminated, irrespective of the number of characters you input to the VISA Read (provided that the number of characters is always greater than the length of any answer message you may receive). This is obviously very convenient.

The Read would then end whenever one of the following events occurs first:

- the termination character is received

- the specified number of characters is received

- the timeout time elapses

Only in the last case you get an error out of the VISA Read.

I hope this clarifies the issue about the termination character.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
Message 11 of 14
(1,334 Views)

Thank a lot for your time to explain me the termination character.

Indeed, the answer is like "20.86,47.4\r", so I must put in the VISA Serial r.

 

I have seen that the constant created is by default an U8. How can I convert a char into an u8 ?

 

Thank a lot 🙂

 

0 Kudos
Message 12 of 14
(1,330 Views)

Hi Lablasc,

 

"\r" = CR = 13 = 0D(hex)…

Or in the LabVIEW help

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 13 of 14
(1,327 Views)

Perfect! 

Thank a lot! 

It works now :).

 

Thank you GerdW for all these advices and thank you pincpanter for your great explanation ! 🙂

 

Have a good day !

0 Kudos
Message 14 of 14
(1,314 Views)