Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting ERROR in VISUAL BASIC

Hi,

I'm new to MEASUREMENT STUDIO and VB.

If I Open the SERIAL COM PORT, how can I test it to know if its open. What is the syntax in VISUAL BASIC for getting the code error ?

Thank you,

Adi,
0 Kudos
Message 1 of 2
(5,903 Views)
Hi Adi,

It depends. If you are using VISA then the ViOpen will generate some error messages as a result. You can check these errors in the VISA Programmer Manual. Page 5-85.
NI-VISA Programmer Reference Manual

If you are not using VISA but the CWSerial functions in MS, then it is very simple. You can use the CWSerial ExceptionOnError function and then use the Event OnError for that function. That will generate an error.
Hope this helps.


Ricardo S.
National Instruments.
0 Kudos
Message 2 of 2
(5,903 Views)