Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

status output of viRead in different situation

According to the VISA there are three possible success codes froma viRead operation: VI_SUCCESS, VI_SUCCESS_TERM_CHAR and

VI_SUCCESS_MAX_CNT. What is not clear to me is which one has precedence and how this depends on the value VI_ATTR_ASRL_END_IN, VI_ASRL_END_TERMCHAR, VI_ATTR_TERMCHAR and VI_ATTR_TERMCHAR_EN.

 

Where can I find a detailed explanation?

 

 

0 Kudos
Message 1 of 3
(5,512 Views)

Hello,

 

You can access the VISA documentation navigating to Start >> All Programs >> National Instruments >> VISA >> Documentation >> NI-VISA Help. In the Index tab, type VIREAD or any of the methods that you have mentioned (e.g. VI_ATTR_ASRL_END_IN).

 

Regards,

 

MCOTO

0 Kudos
Message 2 of 3
(5,469 Views)

Thanks for answering back. I have read the docs but they are unclear to me. In particular, does it mean that I have check for different status code depending on the expected ending? Consider a case in which you sometimes need to wait for '\r' while in other you need 60 bytes. How would you write such a program?

0 Kudos
Message 3 of 3
(5,463 Views)