LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

start event immediately after reading parallel port status

Hello,

I have a spectrometer for acquiring triggered pulses spectra, it works fine with labview, but I need to make it start the acquisition immediately after an event read by the parallel port in order to distinguish odd and even pulses after this event (wich have different properties). I used a flat sequence: in the first frame I wait until the pin number 12 becomes 1, and in the other frame I start the acquisition of N triggered spectra (nothing else, all the initialization of the spectrometer is done before). 
What I saw is that it doesn't work: sometimes is takes 1 ms to jump to the second frame and I miss a pulse (pulses @ 1 kHz).

Is there a way to make it more efficient? To launch the triggered acquisition process immediately after the pin status switch?

Thank you very much,

Daniele

0 Kudos
Message 1 of 3
(2,391 Views)

Hi daniele,

      While it's not clear what is connected to the parallel port or what the trigger-options are on the spectrometer, in general it would be best to physically wire a trigger signal from source to destination.  Can the spectrometer be configured to acquire based on an external trigger?  Can pin 12 of the parallel port (via break-out board) be wired to spectrometer trigger-in?

 

Considering the 1KHz trigger rate, I wouldn't rely on a multi-tasking OS to implement a software trigger "Immediately". 

 

If aquisition must be triggered via software, event-based logic is desireable - I'm not sure whether that's possible here.  By Event-based, I mean use of LabVIEW Event functions.  There are some serial-port-pin (CTS,DSR,etc) event options available via "VISA Enable Event".  The logic would configure the event then wait on the event before invoking the data-aquisition, that is, IF it's even possible to get pin 12 to trigger an Event.

 

Luck/Cheers!

 

0 Kudos
Message 2 of 3
(2,367 Views)

Hi,

on the parallel port there is the signal coming from a mechanical shutter, the spectrometer is triggered directly from the laser source @ 1 KHz (the trigger signal is from source to destination as you wrote). The problem is that I have to start the acquisition immediately after the shutter is open. But it takes time between the recognition of the shutter state and the beginning of the acquisition from the spectrometer.
By the way, I will try to do a "visa enabled event",

thank you! 

0 Kudos
Message 3 of 3
(2,346 Views)