11-01-2013
01:25 AM
- last edited on
05-30-2025
04:33 PM
by
Content Cleaner
Hello,
I'm developing a data-logging VI using multiple devices (4x PCI-6115 bridged by RTSI cable) where data is streamed to a TDMS file, and I had a question regarding synchronization and triggering. I've read through a bunch of whitepapers and examples, and was confused on the differences between various approaches to synchronization.
VI Objectives: In the VI, the user selects various channels of interest across various devices from which to log data. In "automatic mode" the VI should wait to receive a "prepare" signal from an external source. After the "prepare signal" is received, the VI should wait for a trigger signal at which point it logs data to a TDMS file until a reference trigger tells it to stop. In "manual" mode the user can "prepare" the machine with a boolean, then toggle another boolean to acquire data, then stop data logging with the same boolean.
I can post screenshots/VI tomorrow and will follow-up to assist with any questions regarding my issue. Any help is appreciated!
11-04-2013 11:33 AM
brehidran,
I think I have an idea of the scenario you are describing, but some code would probably allow me to get a better picture. A screenshot will suffice as well. I suspect you should be able to set up a pulse train using one of the devices onboard counters. You could choose when the pulse train signal begins generation, which would let you control when the devices begin acquisition.
Ryan
11-04-2013 12:27 PM
Hello,
Ryan, thanks for your response.
As I mentioned the multi-devices in single task approach works well on the simulated devices machine, but on the machine with physical cards it doesn't read from buffer when multiple devices are selected, only single device tasks.
Single-device task (can be multi channel)
Multi-device task
The sequence goes from "prepare" to "acquire" for creating the virtual channels then acquiring data.
Virtual Channel and Task Creation
Data Acquisition Loop
Note: In the code none of the automatic mode setups have been tested to work yet, I was trying to sort out the manual acquire mode first.
If the multi-devices on a single task approach works, I would like to use it for its simplicity. If I however, the recommended approach is to use a pulse train to synchronize the multiple devices, then that will suffice.
11-05-2013 09:03 AM
brehidran,
Could you send the 'Date and Time to Path.vi' that you have in the 'prepare' state?
Thanks,
Ryan
11-05-2013 12:26 PM
Sorry, I've attached the file.
Thank you for your assistance.
11-05-2013 01:46 PM
RyanP,
In further troubleshooting my system, I found that a loose RTSI cable connection was the culprit for the difference in operation between the simulated and physical devices computers. The manual acquire mode for the multi-device single task implementation works!
My question still remains, in that I'm curious how synchronizing multiple tasks via a master pulse train / clock would fair compared to the multi-device single task implementation.
Regards,
Brehidran
11-05-2013 11:44 PM - edited 11-05-2013 11:45 PM
Ryan-P,
So, I got to working on the auto-acquire state for the VI. I got the VI to accept a "prepare" trigger by using a "CI Cnt Edges" on CTR1 (in the current test config it watches PFI0 since I can't hook my function generator up to PFI3). Anyways when I turn on the function generator it counts an edge, sets the system to "prepare" mode and immediately bolts over to "autoStart" and begins logging data since the Start Trigger also watched PFI0 where the function generator is. Everything so far is great! (This is the attached version: HF_DAQ(noStop)).
My goal, however, would be to stop the data acquisition on the falling edge of the PFI0 trigger. I thought about using a ReferenceTrigger set to PFI0 falling edge + ReadPropertyNode with RelativeTo set to CurrentPos, but using the DAQmx TDMS Logging VI prohibits the use of a ReadPropertyNode. The problems I face are very similar to (http://forums.ni.com/t5/LabVIEW/DAQmx-TDMS-streaming/td-p/1334248), but I will be sampling ~10channels at 1 MS/s and wish to have the data streamed to disk and also be stopped from an external trigger. The data acquired during the VI's run is supposed to be synchronized to an external trigger. Would a triggerable pulse train implementation hooked to the AI-task's sample clock be advisable in this situation?
Thanks for your help!