LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Syncronize two PXI 5421 signal generators

Hi,

 

I am trying to create a VI that uses two 5421 signal generators’ I need to synchronise them together and run through a sequence of amplitudes of a sine wave. One 5421 will start at an amplitude of 1 V and the other starts at 0.1V, after 100ms the first 5421 will reduce to 0.9V and the second 5421 will increase to 0.2V and so on until the amplitudes have reversed then the sequence will stop. I have managed to get that bit working but I am struggling to synchronise the two waveforms.

 

On a previous VI I have managed to synchronise two 5421’s with fixed sine wave amplitudes  by using the build array function and connecting the session signals to this and then using one set of TCLK functions. But when I try to build an array from the two session signals it says they are different session sizes.

 

I’ve attached the VI with the Variable amplitudes that I would like to synchronize together, I have also attached a Vi of the Sine wave generator that I have explained in the paragraph above.

 

 

Any help would be greatly appreciated.

 

Luke

Download All
0 Kudos
Message 1 of 2
(2,054 Views)

Hi Luke,

 

Spotted no one had got back to you on this. I've had a look your code and had a couple of suggestions.

 

In your varying amplitude VI, just wondering whether there was a reason for the For loops around your FGEN setup functions? From what I can see, you'll get away with getting rid of this. At the moment, each one creates a 1D array of one session at the auto-indexing output on the For loop.

 

When you build an array of those two in the same way you did in the first VI, then it creates a 2D one that the TCLK function can't handle. If you remove the for loops I've circled in blue in the picture... I believe you'd be able to combine them with the build array function?

 

Thanks

James

 

 

James P
0 Kudos
Message 2 of 2
(1,954 Views)