LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sync WLS and USB DAQmx Tasks

In my system, Signal A is acquried wirelessly via a C-Series module in a WLS carrier and Signal B is acquired via a C-Series module in a USB carrier. I would like to start both tasks simultaneously. Sampling Rate and Samples to Read are the same for both devices. I have not found a knowledgebase article or forum thread that mentions syncing two separate C-Series devices.

 

How do I simultaneously start two C-Series devices? Does the fact that one is a wireless device complicate things?

 

 

SimultaneousStart.png

 

Andrew
0 Kudos
Message 1 of 5
(2,967 Views)

Tightly synchronizing a WLS device to a USB single slot carrier isn't really possible.  You can try starting them at the same time with the same timing settings, but because starting the task takes different amounts of time on various hardware, you devices could be off by 100s of milliseconds up to or more than a second.

 

Synchronization really requires a shared hardware starting point at minimum and preferrably a shared clock.  Unfortunatly, the single slot USB sleeves don't have external trigger terminals, so you can't trigger the two to start at the same time.

 

How tightly do you need the two synchronized?  The best possible with this setup is to call Start Task at the same time:

2011-05-18_104652.JPG

Seth B.
Principal Test Engineer | National Instruments
Certified LabVIEW Architect
Certified TestStand Architect
0 Kudos
Message 2 of 5
(2,964 Views)

Thanks for the prompt reply, Seth. I have a cDAQ-9178 and it has external trigger terminals, but I'm guessing the trigger you're talking about involves wiring the two devices together, so using a cDAQ instead of the carrier wouldn't help me? Is there a way to programatticaly tell two devices to share a clock? I tried this (below) and it didn't work. 

 

The more I think about it, tight synchronization between the two isn't crucial. The signal being acquired with the USB carrier is from an optical tach. During post processing I'm using that pulse to delineate between revolutions so I can cyclically average the data I'm acquiring with the WLS. Even if the two don't start at the same time, the signal from the tach will still tell me how many points constitute one revolution.

 

 SharedClock.png

Andrew
0 Kudos
Message 3 of 5
(2,957 Views)

Okay, if you have a 9178 then we have some options.  The quickest way to improve synchronization between two devices, particularly if they are only running for a short time, is to share a start trigger.  If you want them synchronized more tightly, you'll want to connect one of the trigger terminals from the WLS chassis to one of the BNC triggers on the cDAQ-9178 chassis.  Then, you can route the start trigger from the cDAQ-9178 task to one of the PFI terminals, then use the WLS PFI terminal to trigger the task on that device.  I've shown this below:

Synch WLS and cDAQ.png

 

If you wanted, you could wire the other two terminals to share the clock also, but if you don't need as tight of timing, then it's not critical.

 

Unfortunatly, without a hardware connection between the two, you can't share a clock because the clock is created in hardware on each device.

 

Let me know if you have any questions on this.

Seth B.
Principal Test Engineer | National Instruments
Certified LabVIEW Architect
Certified TestStand Architect
0 Kudos
Message 4 of 5
(2,954 Views)

Unfortunately the WLS is mounted on a part that rotates so it isn't possible to form a physical connection between the cDAQ to the WLS carrier. Thanks again for all of your input.

Andrew
0 Kudos
Message 5 of 5
(2,951 Views)