From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

correct connection in max but error in labview

i'm trying to connect tegam 1830a power meter to labview using usb-serial port

the device act correctly in max, but in labview the read visa function gives timeout error 

i send order *iDN? to the device , and its work in max but not in labview VISA ERROR.png

 

0 Kudos
Message 1 of 4
(2,704 Views)
You aren't appending a termination character. Right click on the string constant and select '\' Codes Display. Then append a \r or \n, whatever you have in MAX.
0 Kudos
Message 2 of 4
(2,694 Views)

Forgive me for saying this, but when you open VISA with MAX, you are much slower in asking for the VISA "Write" than when you wire the two functions sequentially in LabVIEW.  Try putting a delay of, say, 200 msec between the VISA Open and the first Write.  Similarly, put a delay between the Write and the Read.

 

I presume that you did exactly these steps in MAX, correct?  What about terminating the Write command -- did you have to give MAX a <CR><LF>?  (I don't see it in your VISA Write).

 

Bob Schor

0 Kudos
Message 3 of 4
(2,683 Views)

@Bob_Schor wrote:

Similarly, put a delay between the Write and the Read.


That wait is not needed since it looks like the Termination Character is being used.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 4
(2,673 Views)