LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multi Device Synch AO Series via RTSI

Solved!
Go to solution

I have two analog output AO Series devices connected via RTSI.

I have defined the RTSI Cable in MAX and added the two boards.

 

I am having trouble getting the slave to use the master Sample Clock.

According to 'Timing and Synchronization Features of NI-DAQmx', synchronization will be seamless.

Attached is my sample VI.  Device 1 finishes, but Dev2 never does.

 

Any ideas?

 

I am using Windows 7, Labview 12

 

thanks

0 Kudos
Message 1 of 9
(2,966 Views)

Hi GretchenSkellyZimmer,

 

If you've added your RTSI cable to MAX and added the devices to the cable, the sample clocks should be shared as you've set your code up. Do both analog output tasks start and can you see output on it? Are you triggering your output to start?

 

Regards,

Matthew B.
Offering Manager
NI
0 Kudos
Message 2 of 9
(2,934 Views)

Thanks for your reply.  Yes, I have added the cable to MAX  (see image below - also tells you what AO Series device I have)

I am using 'No Trigger', so I assuming Dev1 is triggering, also going by the fact that the Dev1 Boolean goes green.  Dev2 Booleen does not go green.

 

RTSI Cable.jpg

0 Kudos
Message 3 of 9
(2,931 Views)

If you save it in LV 2011 or post a screenshot I could take a look (the project I'm working on is still using 2011 so I haven't upgraded yet).

 

 

Best Regards,

John Passiak
0 Kudos
Message 4 of 9
(2,928 Views)

Thanks for the offer!!  Here you go,

Gretchen

Synch Front Panel.png

Looks familiar, right?  Looks like the DAQmx Examples.

Here's the snippet

AO Finite Multi-Device.png

 

 

 

0 Kudos
Message 5 of 9
(2,922 Views)

Assuming the "Enabled" case of your diagram disable structure just passes through the task handle and error wire, the software looks good (which is actually unfortunate, I was hoping it would be something obvious).  You're not getting any software errors, right (the screenshot seems to indicate that you are getting no errors)?

 

As a troubleshooting step, could you try polling the Total Samples per Channel Generated property for Dev 2 inside your loop?

 

Untitled 6 Block Diagram _2013-10-08_14-44-24.png

 

If the samples generated number stays at 0, Dev2 isn't seeing the clock at all.

 

    1. Check that the RTSI cable is plugged in all the way on each device (but you've probably already done this).

    2. Could be a bandwidth issue on the RTSI cable?  The AO sample clock pulse is pretty narrow (2 timebase ticks I believe).
      1. Try unplugging all devices except Dev1 and Dev2.
      2. Try changing the AO Sample Clock Timebase (on the master device) to be 100 kHz instead of 20 MHz.
      3. Try running a counter output task at some moderate frequency (e.g. 1 kHz, 50% duty cycle) and use this signal for the AO sample clock on Dev2.
      4. Try sharing Master Timebase and Start Trigger instead of AO Sample Clock.
    3. Could be a defective RTSI cable?  You could try a continuity check or connect a scope to it if you have the equipment.

 

If the samples generated number increments to some number (0 < N < 1000) then Dev2 is seeing some of the clock edges but missed some.  Try the same steps as #2 above (bandwidth issue).

 

If it increments to 1000 then Dev2 saw all of the clock edges but the task isn't reporting that it is done.  If this is the case, somebody from NI would need to look into whether there is a bug with Is Task Done? when using an external clock on the 6723.  I don't have the hardware myself to check.  If this is your scenario, the sample clock was received properly and all samples would have been generated so it's just a matter of finding another way to exit your loop (could use Total Samples Per Channel Generated for example).

 

If it increments to >1000... well this just wouldn't make any sense since Dev1 is only supposed to issue 1000 sample clock pulses.  There would have to be noise on the RTSI line for this to happen in conjunction with a bug in DAQmx causing the Is Task Done? to not work with an external clock on your device.

 

 

Best Regards,

John Passiak
0 Kudos
Message 6 of 9
(2,916 Views)

THE ANSWER IS ..........   

 

                TotalSampPerChannelGenerated = 999                 (I asked for 1000.)

 

      Yikes!  What does that tell you?

 

0 Kudos
Message 7 of 9
(2,910 Views)
Solution
Accepted by GretchenSkellyZimmer

 

If you're consistently getting 999 samples then it's not a bandwidth issue (so ignore half of my previous post).

 

There's some bug or undocumented feature of the 6723 that's giving you this behavior.  The device is pretty old and I'm not too familiar with its inner workings, but I'll take a wild guess and speculate that your last sample is sitting in the latch and requires an additional sample clock edge to push it through (if this is true, it would mean that the synchronization was actually off by a whole sample clock period!):

 

www.ni.compdfmanuals370735e.png

 

 

 

Instead of sharing a sample clock, I would configure your tasks like this:

 

AO_Timebase_Sync.png

 

 

This way each device will generate its own clock and do what it needs to output all of the samples.  The tasks will start synchronously due to the shared start trigger and will not drift over time due to the shared timebase.

 

 

Best Regards,

John Passiak
Message 8 of 9
(2,903 Views)

Thank you SO MUCH, John_P1!

I implemented your suggestion (using shared timebase), and it worked!

Dev2 completed right away with 1000, not 999.  Should test with scope to make sure sine waves are lined up.

 

I then made another test:  I asked Dev1 to wait for a trigger.  both devices waited, and I used an external trigger to Dev1 and both devices responded.

 

Gretchen

0 Kudos
Message 9 of 9
(2,872 Views)