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.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Need RS232 Commands corresponding to LABVIEW's VI's for Agilent's Tunable Laser Source 81680A

i am working with a Tunable Laser source 81680A from Agilent and using LABVIEW to interact with it. We need serial commands corresponding to LABVIEW VI's( like getWavelength, SetWavelength,etc)so that we can design a customized driver and issue the same commands on a serial port (say) using C (C++) programming Language.
0 Kudos
Message 1 of 8
(4,312 Views)
NI doesn't have a driver for this. Have you checked with Agilent to see whether they have one? If they don't, and since it sounds like you're already doing some communication with it, you might want to consider doing your own driver. There is a wealth of information on LabVIEW drivers on the Learn and Develop links of the Instrument Driver Network page. I would highly recomend writing the driver using VISA commands so that it would be portable between GPIB and RS-232 interfaces. Lastly, in order for a LabVIEW driver to be used in C or C++, you will need to create a DLL from the LabVIEW code so you will also need the LabVIEW application builder.
0 Kudos
Message 2 of 8
(4,312 Views)
Dennis -> i have already obtained the LABVIEW driver for 81680A; infact for the whole 8164A Lighwave measurement system which houses the tunable laser source (81680A) as a single module. Since i have the driver i need to know if and only if there is a possibility of obtaining corresponding RS232 commands for INstrument specific commands like (SetTLS Wavelength, GetTLSWAvelength etc).
One enthusiast suggested writing a program to monitor the serial port and record all the outgoing and incoming messages. Is there any other way?
0 Kudos
Message 3 of 8
(4,312 Views)
Okay, so the 8164 driver is for the 81680A. I checked that driver and it uses VISA. That means that the same driver can be used to control the instrument over both GPIB and serial. There's no difference in commands. Try changing your VISA Resource Name from GPIB::x to ASRL1::INSTR (for com1) and see if it works. In theory it should but sometimes the author of a driver doesn't take into account some slight differences between a serial instrument and a GPIB. If you have any problems, I don't know what you can do except complain to Agilent since it's theeir code.
0 Kudos
Message 4 of 8
(4,312 Views)
Thank You Dennis> I am using a serial communication Via RS232 and the VISA resource name ASRL1:INSTR works. i have tried that. INfact i have 4 serial ports and all are working(ASRL2,ASRL3,ASRL4). THe problem is "When i give an instrument specific command like 'Setwavelength','GetWavelength' from my Computer to set (or get)the wavelength of the tunable laser; i would like to know what exactly is passed over the serial link assuming that the link specifics like baud rate, start, stop, parity etc have been predefined. In brief i need to know the 'MESSAGE' over the serial link passed by the computer to the tunable laser module. If i can get a list of these instrument specific RS232 messages i think my work is accomplished.THank you
0 Kudos
Message 5 of 8
(4,312 Views)
Okay, now I think I know what you want. MAX comes with a utility called NI-Spy that can be used to capture VISA communication. Start it from MAX or Start>Programs>National Instruments.
0 Kudos
Message 6 of 8
(4,312 Views)
THank you Dennis. i used NI SPY, but it seems that from having a conference with Agilent experts; the 8164A system is not built for communications for RS232 type data transfers. There are problems with timing and data parsing which inhibit the data to be perceived properly using softwares like NI SPY and the like. To put it in short, things may work or may not. They have suggested to use GPIB which has a much better documentation of the command set. Once again thank you.
0 Kudos
Message 7 of 8
(4,312 Views)

Hi Vasudev,

 

Would you mind sharing the "whole 8164A Lighwave measurement system which houses the tunable laser source (81680A) as a single module."? I Thanks in advance!

0 Kudos
Message 8 of 8
(3,184 Views)