Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

analog input, trigger PFI6 - need event to start acquisition

I have an analog trigger that starts a task creating another analog trigger after a period of time approximately 20 msec.  The second analog trigger begins the process.  Currently, I have the acquisition of data from another board beginning at the same time as the first analog trigger; which is incorrect for the work I am currently doing.  I need the acquisition to begin at the start of the second trigger - which has been confirmed.

I need an event allowing me to start a software function from the second trigger.  Is this possible?  I am writing my application in C#; but don't think I will have a problem handling C, C++, or visual basic.  Any help would be appreciated.  Seems like I should be able to create a task that would run at a starttrigger allowing me access to my code.
0 Kudos
Message 1 of 6
(3,569 Views)

Hi bfdiii,

I need a little bit of clarification regarding your application. My current understanding is that you have a single analog line that is going to have two analog level triggers on it 20ms apart. Is your ultimate goal to have an acquisition start 20 ms after a trigger is received? If this is the case then would you be ok with simply discarding the first 20 ms of your acquisition?

Best regards,

Jordan D
Applications Engineering
National Instruments
0 Kudos
Message 2 of 6
(3,546 Views)
Well, no.  I have two analog lines connected through the User ports which creating triggers at the PFI ports.
 
Pretty simple.
 
We start a gate task (on/off wave)
creating an anolog trigger which starts a waveform task (user defined wave)
at a random time within the waveform task, we get a new trigger which starts the trigger task (more or less a square wave)
 
Currently, we have the acquisition of the spectrometer starting at the gate task.  What we need is the acquisition starting at the trigger task.
 
Thanks for your help!!!
0 Kudos
Message 3 of 6
(3,537 Views)
bfdiii,

I think I understand your setup now but before I try to help you with some of the high level design I'd like to make sure we're on the same page:

1. You are going to start an analog output / or possibly a digital output (gate task)
2. This signal will be fed into a PFI line (so if it is an analog signal it should have a +5 V high)
3. This PFI line is internally wired to trigger a new waveform generation
4. This waveform is routed to a second PFI line which is internally configured to be the trigger for your spectrometer task on a different DAQ board.

Is this what you are trying to do?
Best regards,

Jordan D
Applications Engineering
National Instruments
0 Kudos
Message 4 of 6
(3,511 Views)
Yes, that is correct - this would be the goal.  It might be a little simpler if you use #3 to trigger the waveform and the spectrometer at the same time.  The will run for different lengths of time; but have the same starting point. 
 
 
I thought I had a solution to the problem by rearranging the order of the triggering.  Unfortunately, now I have run into the clock resource being used by another resource. 
 
If you take the gate task which is currently set up to trigger the spectrometer and drop it down to be triggered by the waveform, the same result should occur.  Unfortunately, it is required that the clock used for the waveform be the same as the clock used for the gate task (so the acquisition time would be correct). 
 
 
Bill
0 Kudos
Message 5 of 6
(3,502 Views)
I think we discovered a way around the problem.  Still moving forward.  Thanks for trying.
0 Kudos
Message 6 of 6
(3,492 Views)