LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Communicating with a PEM

Has anyone written a LABView program to communicate with a Photoelastic Modulator (PEM) from Hinds Instruments?  I have a very old LabWindows/CVI [C for Virtual Instrumentation] program that does this by sending the command "AO_VWrite (device_number, chan, voltage)" to the PEM.  AO_VWrite scales the voltage to a binary value and writes that value to the DAC in the analog output channel, which is wired to the PEM Controller.  (I think.)  The voltage is related to the wavelength of the light we're interested in and the PEM Controller interprets it as such.  It uses the input to send the proper electrical signal to the modulator head.
 
I'd like to accomplish this in LABView 8.5.1.  I'm communicating with the PEM Controller over a serial port.  Can I write the wavelength directly to the PEM using VISA Write (as a string)?  Not sure if it would know how to interpret this.  I'm guessing it needs a voltage.  How can I immitate the AO_VWrite command in LABView?
 
Many thanks!
Andrew
0 Kudos
Message 1 of 3
(3,362 Views)
According to this, there is a LabVIEW driver available for the controller. I have not used this equipment but looking at the data sheets, my guess is that the old code was designed to interface directly to the head and not the controller.
0 Kudos
Message 2 of 3
(3,359 Views)

Hi Andrew,

Was the LabWindows program used with a National Instruments DAQ board?  AO_VWrite is a Traditional NI-DAQ function.  As you said, it scales a value to a binary number and outputs that to the specified channel.  The NI-DAQ VI that is similar is AO Write.vi.  Using DAQmx you would create an analog output task and then use the DAQmx Write VI. 

For serial communication using VISA VIs, you will need to know the command set for the PEM.

Jennifer R.
National Instruments
Applications Engineer
0 Kudos
Message 3 of 3
(3,319 Views)