10-21-2013 05:57 AM - edited 10-21-2013 06:22 AM
I want to send trigger signal for another USB 6361 card using PFI15 output.
I've looked at "Multi-Device Sync-AI and AO Shared Timebase & Trig DSA" from NI Examples and didn't quite understand it.
Do I have to just put DAQ Timing Property Node with SyncPulse.MinDelayToStart on the line of DAQ Card that I want to be master and it will generate a trigger?
DAQmx Start Trigger should be connected to slave card with PFI15 port specified as a source or do I need to use GetTerminalNameWithDevicePrefix.vi with "ai/StartTrigger" string constant connected?
10-22-2013 04:10 AM - last edited on 11-05-2014 11:04 AM by dcarva
Dear Dide,
If you're just getting stated on synchronization in LabVIEW, i'd recommend to read a bit about the topic. You will find useful information specifically on these links:
http://www.ni.com/white-paper/5471/en/
<link no longer exists>
The main idea of running tasks in sync is to have both devices share one of the following in a master-slave connection:
Since USB does not have a dedicated bus for transmitting these signals, you will have to explicitly state which signal should be connected to which digital I/O. You can use advanced DAQmx functions for this, such as the Export Signal.vi and Connect terminals.vi .
If you get stuck or have other questions, let me know.
Kind regards:
Andrew Valko
NI Hungary
10-22-2013 12:20 PM
Do I have to just put DAQ Timing Property Node with SyncPulse.MinDelayToStart on the line of DAQ Card that I want to be master and it will generate a trigger?
No, that's specific to DSA synchronization and doesn't apply to the 6361.
DAQmx Start Trigger should be connected to slave card with PFI15 port specified as a source or do I need to use GetTerminalNameWithDevicePrefix.vi with "ai/StartTrigger" string constant connected?
On the master device, export the start trigger to the desired PFI line using DAQmx Export Signal. Physically wire this PFI line to some PFI line on your slave device. On the slave device, select the appropriate PFI line for your start trigger source.
Best Regards,
10-24-2013 06:51 AM - last edited on 11-05-2014 11:05 AM by dcarva
I build up a VI based on examples from <link no longer exists>.
I think I got the idea but it is still not working properly. I'm trying to synchronize two tasks using PFI ports (PFI14 is phisycally connected to PFI15) as each of them was run by different card (I don't have the other card right now), it should be possible I guess. So the Write.VI is waiting and after timeout returning an error. It seems like it wasn't trigerred?
Can You tell me what is wrong in this VI ?
10-24-2013 07:23 AM
Dear Dide,
The code looks like a good starting point, but there are a few things I'd like you to consider.
And finally, an advanced tip:
If you want to eliminate all delays in synchronization caused by wire propagation (its only about 2ns/m, but for some applications even this is too high) or gating delays, one great way of doing it is to use counters. With a counter, you can generate a continuous pulse train or a single pulse to one of the PFI lines, and you can route this signal with cables of equal length to all devices to be used as a clock or trigger. That way, you can make sure that the signal arrives to each card at the same time, down to the nanosecond.
I hope these pointers will help you get started.
Kind regards:
Andrew Valko
NIH
11-08-2013 04:27 AM
So I ended up making up this application:
Works really great if I wire "Dev2/ai/Start Trigger" constant to Analog Output Start Trigger source, but If I wire trigger source as shown on the image (simulating triggering through digital input by another device) I get nothing on the analog output. Seems like writing task is not triggered.
Do You have any idea why it doesn't work? (of course! - PFI 15 and PFI 14 are phiscally connected using a short wire) 🙂
11-08-2013 06:07 AM
I've already tried to send also a Sample Clock through PFI 12 -> PFI 13, but I still got nothing on Analog Output.
11-08-2013 01:14 PM - edited 11-08-2013 01:15 PM
Are you writing an empty array as shown in the screenshot? That would be a problem.
Best Regards,
11-08-2013 05:54 PM
I knew someone will point it out. I just put it for the screenshot I also removed some other piece of code that is not essential for the problem.
Replacing empty array is not a solution.
11-11-2013 05:13 AM
Dear Dide,
Let's identify the problem more specifically. The Output triggering can fail for two reasons:
Try using an Edge Counting task connected to PFI15 to see if the starter edge is sent correctly.
If you have routing issues, you can take a more direct approach with DAQmx Connect and DAQmx Disconnect. Connect PFI15 with ai/start trigger. Don't forger to disconnect the terminals in he cleanup phase as well.
Let me know if this helps.
Regards:
Andrew Valko
NI Hungary