10-30-2013 03:54 PM
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
10-31-2013 06:38 AM
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).
10-31-2013 08:18 AM - edited 10-31-2013 08:19 AM
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.
10-31-2013 09:38 AM
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