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.

PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

Relative time management in LabView

Hi All, 

I'm new to LabView so I wanted to get some ideas on how to get started on the following task.   I have a PXI system and what I need to do is control an experiment with very precise timing (millisecond) .   I need to send out triggers or ramp up dc voltages but everything needs to be done at a well known time.   The experiment would start at  t=0 milliseconds and I would want to be able to tell it to do something at a time relative to t=0ms.   

What is the best approach to acomplish this with the timing and triggering features offered by DAQmx?   I would be glad to hear any suggestions that come to mind.

Thanks

Pedro.
0 Kudos
Message 1 of 2
(2,796 Views)

Hi Pedro,

If you need to send out digital triggers with 1ms accuracy I would recommend doing hardware timed digital output assuming you have a DAQ card that supports it. Most M-Series cards do. With this type of output task you can provide a digital waveform that is output timed to an external clock. You can use one of the DAQ cards on-board counters to generate this clock. It sounds like 1kHz would work for you Then a sample in the digital waveform would output each ms. An example of how to setup the digital task can be found in the LabVIEW  Example Finder. Go to Help >> Find Examples… >> Hardware Input and Output >> DAQmx >> Digital Generation >> Write Dig Chan-Ext Clk.vi.  An example of using a counter to generate a clock is under Hardware Input and Output >> DAQmx >> Generating Digital Pulses >> Gen Dig Pulse Train-Continuous.vi.

Since you said you were new to LabVIEW and DAQmx the Developer Zone article, Learn 10 Functions in NI-DAQmx and Handle 80 Percent of Your Data Acquisition Applications, is a great resource for getting started with DAQmx.

Please let me know if you have any questions and take care.

Thanks,

Nathan
NI Chief Hardware Engineer
0 Kudos
Message 2 of 2
(2,783 Views)