08-19-2013 05:05 PM
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?
Solved! Go to Solution.
08-20-2013 11:16 AM
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.
08-20-2013 11:20 AM - edited 08-20-2013 11:33 AM
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?
08-20-2013 11:47 AM
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.
08-21-2013 08:17 AM
So like this? And I would wire my digital out line from my daq, to the trig in to my daq?
08-21-2013 11:03 AM
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.
08-21-2013 11:23 AM
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.
08-21-2013 12:14 PM
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.
08-21-2013 01:02 PM
is my wiring logic correct?
08-21-2013 01:06 PM
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.