Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

analog trigger on BNC2120 / PXI3-6361

Solved!
Go to solution

Hi Nathan,

 

Please see attached screenshot (sampleclock.png). I've changed the Sample Clock VI source terminal to the 4331 Sample Clock (which is on ai4 in my setup).  This gives the error:

 

Error -200414 occurred at DAQmx Start Task.vi:9

Possible reason(s):
Requested sample clock source is invalid.
Property: SampClk.Src
Corresponding Value: /PXI1Slot4/ai/SampleClock
Task Name: _unnamedTask<1B>

 

I've also tried putting the 4331 SampleClock as the source terminal for the Sample Clock on the 6361 task line  (sampleclock2.png).  In this case, one "block" of signal appears on the upper and lower graphs (derived from the 4331 task and the digital-in task on the 6361 device), then the system waits for the trigger, after which the signal from the analog-in task on the 6361 begins collection. This results in unsynchronised signals (unsynchronised by the delay between the initial start of the VI, and the eventual external trigger.)

 

I have also tried removing the master-slave synchronising block (masterslave removed. png), but this doesn't affect the outcome.

 

Am I implementing your idea correctly?

 

Thanks,

Claire.

Download All
0 Kudos
Message 21 of 26
(950 Views)

Yeah, masterslave removed.png and sampleclk2.png are correct.  Would you mind attaching your .vi if you can?  I'm not sure where the extra block of data comes from, and I might need to try running your code to find out.

0 Kudos
Message 22 of 26
(935 Views)

Hi Nathan,

VI is attached as requested. Any ideas most welcome!

Cheers,

Claire.

0 Kudos
Message 23 of 26
(928 Views)

Oh wow, I should have noticed ealier - the ai/StartTrigger terminal is not wired in masterslave_removed.png.  I ran your VI with that wired and got perfect sync.  Without it, the two slave tasks are set to no trigger, so they just start as soon as you run the VI.

0 Kudos
Message 24 of 26
(923 Views)

Hi Nathan,

 

Thanks for picking up my stupid mistake...embarrassing.

 

I've run the VI with the start trigger connected...both with and without the external trigger (see attached text files). When I don't use the trigger, there is only about 2 milliseconds spread in the first timestamp across the channels. However, when I use the trigger, there is around 150ms spread in the first timestamp across the channels.

 

Do you see this with your setup?

 

Thanks,

Claire

 

Download All
0 Kudos
Message 25 of 26
(914 Views)

I didn't really notice, I was graphing the data on one graph with ignore timestamp on (so I could see if my boards were in sync).  One thing to be aware of is that timestamps are computed in software - it does not take external triggers in to account. This is because the device handles the start trigger on it's own, and starts sending data only after the trigger occurs.

 

I would use the timestamps from one task for all the data, since all three tasks should be in sync.

0 Kudos
Message 26 of 26
(908 Views)