PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronization - Master and Slave tasks.

For syncrhonisation (via hardware) of two modlues; one 4330 and 6361, shall I create one master task for the 4330 and then syncrhinise it with the 6361 module? Or create multiple channels say 5 from 4330 and 5 from 6361 and then specify one channel from 4330 to be the master and all the rest modules from 4330 and 6361 to be slave tasks?

 

Thanks, 

0 Kudos
Message 1 of 8
(5,923 Views)

Pepis21

 

Having one channel on the 4330 module as the master and then having the other channels as the slaves should be enough. You just need to make sure they share the same clock and they look for the same trigger so that they synchonise. 

 

This is quite a good white paper that outlines some synchonisation techniques: 

http://www.ni.com/white-paper/11369/en/

 

Let me know if this is what you are looking for.

 

Luke

0 Kudos
Message 2 of 8
(5,674 Views)

Luke, 

 

THanks for your comments. I will do some changes and upload the vi..I think we need to also make use of a flat sequence structure to ensure that the slave tasks initiate before the master ones right?

0 Kudos
Message 3 of 8
(5,663 Views)

Pepis21,

 

When it comes to which one to start first, if you have a look at the master slave section on the white paper I linked it indicates that the master task triggers the slave task so it may be best to initiate the master task first. I would recommend not using flat sequence structures in the application you are referring to because once it goes into the flat sequence it must complete it before the VI can end so it is possible to get stuck in the flat sequence structure. This can be undesirable when it comes to using hardware as the only way to stop running would be to abort which can leave the hardware hanging. It may be better to use error wires to force the data flow so that you can make sure one thing happens before the other.

 

What are you hoping to do with this application? 

 

Luke

0 Kudos
Message 4 of 8
(5,656 Views)

Hi Pepis21,

 

My name is George and I am an Applications Engineer at National Instruments. I see Luke has already done a good job of helping you but I found a couple of examples that you might find helpful.

 

Here is a tutorial that shows a few more examples of how to synchronise channels and devices using a couple of different methods;

 

http://www.ni.com/tutorial/11549/en/

 

You may be able to see some other synchronisation examples in the NI example finder within LabVIEW under “DAQmx” under “Hardware Input and Output”. I will also link an image of another example below that shows how to use error wires to force dataflow without using flat sequence structures as Luke suggested.

 

I hope these are useful for you.

 

Regards,

 

George

0 Kudos
Message 5 of 8
(5,621 Views)

For the PXI configuration, we also need to consider the phase locked loop circuit to avoid any phase issues.

 

Regards, 

 

Pepis21

0 Kudos
Message 6 of 8
(5,606 Views)

Dear George and Luke, 

 

Thanks for your replies. 

 

Luke -- Why shall the master task initiate first compared to slave tasks? The flattened sequence is to be used to ensure that the slave devices are armed before the master so that the slave devices do not miss the trigger (plus that the tasks will be wired with error wires to force flow execution). 

 

Regards, 

 

Pepis21

0 Kudos
Message 7 of 8
(5,605 Views)

Hi Pepis21,

 

It doesn't necessarily matter which task you initialise first just so long as you make sure they are both initialised before the trigger is sent.

 

Hope this helps.

 

Regards,

 

Luke 

0 Kudos
Message 8 of 8
(5,578 Views)