LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Triggering question

I have a very simple question, that probably has been answered a few times here, but I am not sure what the terms all mean. 
 
I would like my labview program to run, but delay before a TTL pulse is sent out to other computers.  At the same time that this TTL is sent, I would like the program to begin to acquire data.  I know that I will need to use the millisecond timer in there, but I have no clue how to get the TTL to send.  If there are any simple examples out there in labview 8.2 or 8.5, I would really appreciate it
 
Thanks in advance
 
Chris
0 Kudos
Message 1 of 7
(3,150 Views)
Chris,

    What kind of hardware you you using to send the TTL signal as well as the data collection?  What initiates the transition from the VI running to sending the pulse? A user input?  One approach would be a state machine that remains in an idle state until the TTL is needed and then transitions into a state which executes the nessecary events. 


0 Kudos
Message 2 of 7
(3,133 Views)
Martym

Currently we are using a USB-6008 for the application, but we are planning to upgrade to the M series USB (6211 or 6212).  The plan is to send a pulse immediatly when the program starts to run, and then another pulse to a different instrument after a certain amount of time passes.  Data acquisition will begin at a delayed time as well.  So the user will enter the time interval with the clock begining when the first pulse is sent.  I am completly new to DAQmx, having only used the DAQ assistant for data acquisition, so I really have no clue where to start.  I havent been able to find anything in the DAQ assistant to do this, but if there is a way, it would make it a lot easier.

The application for this is a wavemaker.  The initial pulse will be used to initialize the wavemaker, however there needs to be a delay before data can be acquired by labview as well as our other equipment, as the computers do not have the memory to store all the data.

Thanks
Chris
0 Kudos
Message 3 of 7
(3,118 Views)

Hi Martym,

What you are looking to do is called software timed digital output. We do have some examples in LabVIEW that will help you accomplish what you want to do. Before integrating this to your project I will suggest getting familiar with generating digital signals when a software even happens, help->find examples->Hardware Input and Output->Digital Generation. Examples like: “Write Dig Chan.vi”.

Let me know if it helps

Jaime Hoffiz
National Instruments
Product Expert
0 Kudos
Message 4 of 7
(3,104 Views)
I appologize for my ignorance in this matter, but is it possible to set up a digital output (5V TTL) using the DAQ assistant?  I really have no clue how to set up the code in using DAQmx.  I could figure it out eventually, but if it can be done using the assistant, that would make my life a lot easier.  Thanks for the help I have already gotten on this matter.
0 Kudos
Message 5 of 7
(3,071 Views)

Sure you can use the DAQ Assistant but a single digital pulse is simple with DAQmx functions as well. For the DAQ Assistant, when you get the Create New window, select Generate Signals>Digital Output>Line Output. Pick your channel and use the default of 1 Sample. Wire a True constant to the data input when you want a 1 and a false when you want a 0.

To use DAQmx, use the Create Virtual Channel and select type to be Digital Output. Create a constant or control for the physical channel input and select the line you want. Wire a DAQmx Write to the channel function and select that type to be Digital Output>Single Channel>Single Line>Boolean. Wire a True constant to the data input when you want a 1 and a false when you want a 0.

You can also (and should at some time) convert a DAQ Assistant to code. The assistant uses DAQmx and it's a good idea what is going on underneath the 'hood'.

0 Kudos
Message 6 of 7
(3,064 Views)
Thank you all for your help, thats what I like about using LabView, I have no clue what I am doing, but there always seems to be someone out there that understands this stuff!  I think that I should be able to figure it out now... hopefully!
0 Kudos
Message 7 of 7
(3,048 Views)