LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronisation of 2 USB-6259

Solved!
Go to solution

Hello all,

i am trying to synchronize 2 USB-6259 Devices, one measures the AI-Current and anther is AI-Voltage. I think, i can not route the Start-Trigger via RSTI. Is it right? So i wanna use PFI0 of the first device to start my second device.

Now i receive a Error-89125. It said, PFIO can not be found. 

Should i use a wire to connect these two devices?

Can you help me? 🙂

Thanks for your help.

0 Kudos
Message 1 of 6
(2,291 Views)

You would definitely need to use physical wires to deliver shared timing signals between 2 USB devices.  And you'll be better off if the timing signal you share is a sample clock rather than a trigger, especially if you acquire over long-ish periods of time.

 

If each task makes its own independent sample clock, they will have slightly different timing from one another, simply due to tolerances of the primary timebase.  Many common NI DAQ boards spec their timebases at about 50 parts per million accuracy.  That'd be 1 per 20000.  If you acquired 100000 samples, the last ones might be misaligned by as much as 5 samples.

 

If you share a sample clock signal, sample times will maintain very close alignment and will not accumulate error.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 2 of 6
(2,286 Views)

thank you for your answer. I have tried.

I connected my device QM with the device ASIL1 via PFI0 as the timing signal.For the USB-6259 i use PFI0 pin(73) and D GND pin(88) and for the USB-6259(BNC) is PFI0.  

I used 2 these 2 Vis. But the problem is also the same one.  These Vis are programmed on the basis of the PCI or PXI. So i think they are not so much right.

Cloud you give me also some suggestions? TX

 

 

Download All
0 Kudos
Message 3 of 6
(2,260 Views)

I made 3 mods to the code with comments on each.  A lot of the text and labels got scrambled when I opened it up in a U.S. English installation, I wouldn't be surprised if they stay scrambled when you get it back.

 

There were 3 key things your code needed, all related to the following background info.  When planning to share a sample clock between devices or tasks, you should consider one task to be the master task and the other task(s) to be slave tasks.  The master task will need to export its sample clock signal and the slave tasks need to import and use it.  Further, the slave tasks need to be started first and the master task needs to start last.  Then all the tasks are ready to respond to the first sample clock at the same time.

 

So the 3 changes I made were:

1. I added sequencing to make sure the master task started last

2. I explicitly exported the master task's sample clock out to PFI0 on its own device

3. I explicitly configured the slave task to import a sample clock signal from PFI0 on its own device (you had it configured to import the signal from the other device.  DAQmx has no way of knowing you've done physical wiring to make that possible, hence the error.   Note: on a PXI system, DAQmx *can* know how to do such routing across the PXI's timing backplane.  But there's no similar standard across USB devices, it's all custom and up to the user to make such connections.)

 

I'd recommend that you connect both PFI0 and a DGND pin from one device to PFI0 and DGND of the other.  I don't know whether the USB connection alone establishes a common DGND or not.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 4 of 6
(2,240 Views)

Thank you for your answer! 

by the way, cloud you upload a picture about the code? Because the error: "Failed to Load Dynamic Library Because of Missing External Symbols or Dependencies, or Because of an Invalid File Format" .

0 Kudos
Message 5 of 6
(2,220 Views)
Solution
Accepted by topic author HighFivce

Sorry for the delay -- I don't usually have access to LV 2018, but that day I was at a system with a LV 2018 virtual machine.  I just got back to it today so now I can generate a screenshot for you.

 

 

-Kevin P

 

Synchro Versuch4 - modKP.png

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
Message 6 of 6
(2,201 Views)