07-29-2013 03:27 PM
I have a PCI 6250 board and a SCC-68 box. I would like to use one of the analog inputs as a trigger signal to start acquiring an analog signal and to output a pulse signal simultaneously. This is used to measure the pressure due to a shockwave, which is a transient event that happens very fast.
However, when I run the code, there is an error-200279. I don't know why and how to solve it. Could you help me solve the problem? Also, I am a beginner on DAQ-mx. I will appreciate it if you could provide me any comments on the code. ( I am not quite sure whether the output of the pulse and the beginning of acquisition will be synchronized using the code of current form. Also, since I put the acquire function in a while loop, I don't know how the looping will affect the sampling rate)
Thank you!
Solved! Go to Solution.
07-29-2013 08:37 PM
You may want to go through this link, to understand why are you experiencing the error.
If I recognized correctly, the error should be popping up while reading the 'trigger signal'.
There could be multiple solutions, I presented two.
Solution1: Move the DAQmx Start Task.vi inside the loop and also make sure that it should run just once, as you cannot START an already STARTED TASK.
Find attached VI (blast transient acq_Solution1.vi) corresponding to above shown solution.
Solution2: Read the recent available samples and let older acquired samples be overwritten.
Find attached VI (blast transient acq_Solution2.vi) corresponding to above shown solution.
07-29-2013 08:37 PM
I have attached a modified example to get you started. The key thing that I think you are missing is how to set up a trigger, which is always inline with the task. Use the APFI0 terminal (Pin 20) as the source for your analog level trigger for your analog input task. Then use an Analog Comparison Event as the trigger for your counter output task. The Analog Comparison Event is a hardware pulse that is generated by the analog triggering circuitry when a configured analog trigger condition is met.
Hope this helps!
07-30-2013 09:05 AM
Moderator1983,
Thank you for your valuable comments and modifications. They really help!
07-30-2013 09:08 AM
JKMM,
Thank you for your comments and example! What you suggested is actually what I wanted to do initially, but I couldn't find a way to let the input and output share the same trigger. Now I know "Analog Comparison Event" can do the job. Thank you!
05-26-2014 10:49 AM
thanx so , i have saéme problem and this solution is the best