Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Digital Trigger Vs Software Trigger.

Solved!
Go to solution

I'm running an MCC USB-FS1608 DAQ to measure multiple analog voltage channels. I also have a digital in TTL coming from an MTS 407 frequency controller. Inside my VI, I read a rising TTL signal from the MTS, send a signal to switch on the digital out, then I start my data acquisition. At 1 Hz, would it be better to control my digital out, (which sends a run command to the MTS which then actuates a  hydraulic piston) with a hardware trigger?

0 Kudos
Message 1 of 14
(9,202 Views)

Hello glskinner,

 

I am not familiar with the MCC DAQ drivers that have been created for LabVIEW as well as whether your device specifically supports digital triggers. If it does support digital start triggers then yes absolutely you can configure a Digital Output task to start outputting from a digital start trigger. The response would be much quicker based on hardware timing instead of software timing. Depending on the deterministic response you need, software timed I/O could take milliseconds whereas the hardware timing could be on the order of microseconds if not better. All of this will be dependent on your hardware however. Not all devices support digital triggering.

Ian M.
National Instruments
Message 2 of 14
(9,183 Views)

Thank you for your response...

 

My device has a Trig_IN as well as a counter It also has drivers for labview...But, I'm wondering...How would I set this up physically? I'm unsure how to work with the TRIG_IN and my device doesn't seem to have any support on the matter. I assume the set up is universal for all hardware types. I want to set the digital output to 1 (true) when the TTL is on it's rising edge. Any suggestions?

0 Kudos
Message 3 of 14
(9,181 Views)

Hardware communication in the sense that you are referring to is not necessarily universal. Especially when utilizing third party hardware/drivers. If the drivers they have created are built on top of NI-DAQmx then you could possibly use our functions to do this. To do the functionality you are wanting you would need to:

 

-Configure Digital Output task with the channel you want to output on

-Configure Digital Start Trigger giving it the channel you want to read from (TRIG_IN). For some hardware, they might allow rising edge triggers as well as falling edge triggers which would then be some property you would have to set.

-Configure write task to output a digital high or 1 on your digital output channel

-Start task

-Loop until finished

-Clear task

 

This is about as general and universal as it gets but the actual implementation of each step might be different based on the driver. Physically, the only changes you would have to make are wiring your digital start trigger into the TRIG_IN input instead of into one of the digital input lines.

Ian M.
National Instruments
0 Kudos
Message 4 of 14
(9,171 Views)

So like this? And I would wire my digital out line from my daq, to the trig in to my daq?

0 Kudos
Message 5 of 14
(9,157 Views)

The snippet I've attached is using the DAQmx libraries instead of your device drivers but the implementation should be similar. You configure the digital output task with the channel you want to output from. Then you configure the digital trigger VI with the channel you want to be the trigger input (TRIG_IN), configure what data you want to write when the trigger occurs then start the task. The task will not complete until either a timeout occurs (a trigger doesn't occur within a specified timeout), an error occurs or the stop button has been pressed.

Ian M.
National Instruments
0 Kudos
Message 6 of 14
(9,145 Views)

So physically, I wire my DI (TTL signal) to my TRIG_IN and keep my DIO wiring the same. so on rising edge on the trig_in, the DO task will output. Is there any way to make the stipulation for the trigger to my liking? For instance: if two rising edges are detected>output line.

0 Kudos
Message 7 of 14
(9,140 Views)

In DAQmx functions the DAQmx Start Trigger.vi has a setting for Digital Start Pattern which allows you to input a string that waits for the pattern you specify. Like I said however, this is for the DAQmx library. My assumption is that your device is working on top of these lower level library functions so they might be different for your drivers.

Ian M.
National Instruments
0 Kudos
Message 8 of 14
(9,137 Views)

is my wiring logic correct?

 

0 Kudos
Message 9 of 14
(9,133 Views)
Solution
Accepted by topic author glskinner

Yes, you need to wire the signal you want as the digital input to the TRIG_IN channel and then keep the same wiring for your digital out.

Ian M.
National Instruments
Message 10 of 14
(9,131 Views)