07-12-2016 05:39 AM - edited 07-12-2016 05:41 AM
Hello,
I'm working in this code but I have some problems. In this project, I'm acquiring two analog signals (this signals are the same). My objective is record all the samples in a channel and the another channel that is the same signal I want to record the samples when there is an postrigger.
Depends on number of the samples, the program execute 'Record all the samples' or 'Postrigger Samples' but I want to execute both at the same time
My question will be. How could Record all the samples and Postigger samples execute at the same time?
Any answer will be helpful.
Thank you so much.
Pedro
07-12-2016 06:02 AM
Based on your code you are calling same channel in two places parallely and it will result in an error
07-12-2016 06:24 AM
Hi,
Thank you so much for you answer. I did a new code with only a channel. My idea is acquire a signal (For example sine signal) and with this signal record all the samples in mode continous in a place parallely and the another place paralley is recording postrigger samples.
Depend on number of the samples. Labview executes a place parallely or another place parallely. I would like to execute both parallely at the same time.
Thank you for your help .
Pedro
07-12-2016 06:42 AM
What you could do is have your trigger signal go into another AI channel and then you just monitor it to go high. You then log your data. A Producer/Consumer setup would help. The idea is that you have one task to read which can log all data and then use a queue to also send the data to another loop that can monitor the trigger signal and log the desired number of samples to a TDMS file.
07-12-2016 09:35 AM - edited 07-12-2016 09:36 AM
Hi,
Thank you for your help.
I understood your answer but I would like to have a same signal where I can be recording all the samples while I'm recording postrigger samples (when there is a trigger) . Could I do in DAQmx?
Thank you.
Regards.
Pedro
07-12-2016 10:25 AM - edited 07-12-2016 10:26 AM
You could also just record the continous sample and the time when the trigger happens. Then use the time of the trigger to cut the continous samples to get the triggered sample.
Alternatively, you can use two Analog Input channels, one triggered and one recording continously. Use a jumper wire to physically connect these two Analog Input channels.