Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Trigger

Im using PXI 1031 chassis with a MIO 6025E series board and a PXI 8423 serial interface. The DIO function of 6025 board is used to control a stepper motor and read encoder pulses. I want to use the signal from an encoder as a trigger to start reading data from the serial devices on the serial interface, how do i do this?
0 Kudos
Message 1 of 3
(2,814 Views)
Thank you for contacting National Instruments.

I apologize for the delay in responding; our email box has been overrun lately.

First, normally when we talk about triggering, we are talking about configuring a DAQ board or boards so that they respond to some hardware stimulus without having to do any processing in the application development environment. For example, when we set up an acquisition to start on a digital edge, we download the instruction to the board, which then waits to see the trigger signal. When the board sees the signal, it begins acquiring immediately without requiring LabVIEW or some other environment to be �consulted� on the operation.

Here the case is a little different because we will need to respond to the stimulus (trigger) in LabVI
EW or whatever environment you are using. We will see a trigger and then execute code, which is different than seeing a trigger and executing a predetermined hardware operation. We normally try to avoid the situation of reacting via software because hardware is fast and software is slow.

Fortunately, this probably isn�t a problem here. Since serial communication is relatively slow, you should be able to poll the state of a counter, and see what the count is. When you detect that the count has increased�i.e. a pulse has occurred--you can react in software. You should be able to poll every few milliseconds at least. (For help on counter applications, search the built-in example finder in LabVIEW.) Simply read the counter in a fast loop that does nothing else. Then based on the result of that polling you can execute the code for your serial communication.

This method is probably your best bet, and the timing should work out on a reasonably fast machine. Hope it helps, and ag
ain I apologize for the delay in responding.

Regards,
Mike G.
National Instruments Support
0 Kudos
Message 2 of 3
(2,814 Views)
Thanks!
Now i know in which direction to work. Ill let you know if i face any problems in implementing this strategy.

regards
pavitra
0 Kudos
Message 3 of 3
(2,814 Views)