Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Tek Scope works in NI_MAX but not with LabVIEW

Attached is a file containing exported file from I/O Trace on the serial port. Attached is a Tektronix TPS2014 oscilloscope that uses a USB-SER interface on COM15. SCPI commands sent through NI_MAX (viWrite) work fine as well as a VB.NET application I wrote. I can't get a LabVIEW 2011 SP1 function (Write) to work.

 

I have only been able to get one LV program to work (see attached). After cycling power on/off the scope Configure Trigger(Edge).vi will work once and only once, then won't work again.

 

I cannot see any reason why LV should be having any problem.

 

Thanks

Download All
0 Kudos
Message 1 of 4
(4,271 Views)

Since you are using a serial port, you shouldn't be able to just run that one VI on its own.  You need to setup the serial port with the Configure Serial Port in order to make sure you settings are correct (Baud Rate, flow control, start and stop bits, etc).  You also need to make sure you close out your VISA session (VISA Close).


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 2 of 4
(4,252 Views)

There are examples available in LabVIEW for serial I/O. Not sure what version you have, but in LabVIEW 2012 the example can be found in Help>>Find Examples>>Hardware Input and Output>>Serial. There is a basic serial port example with the Visa Configure Serial Port VI that was mentioned in the above post.

Taylor B.
National Instruments
0 Kudos
Message 3 of 4
(4,246 Views)

Yes, I tried those things which didn't work but I found the solution to my problem. This instrument is using all defaults for the serial port settings but requires a Line Feed Character. By using a text control set to '\' Codes Display I can get be assured to get the \n (line feed) properly set as opposed to using the string constant. Using I/O Trace was a big help in seeing what was going on. Thanks

0 Kudos
Message 4 of 4
(4,240 Views)