LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronizing 2 different pxi 5421's using ni-tclk and inverting one signal

Solved!
Go to solution

I have 2 PXI 5421 function generators. At preset  through my vi I load a  .hws file and the 2 generators output the same signal all in phase and triggering of the same point. What I fundamentally need to do is invert one signal 180 degrees and keep them still triggering off the same point.

 

im not sure how to either invert the signal on one 5421 or how to separate the code so that each signal generator is separate.

 

 

0 Kudos
Message 1 of 6
(2,602 Views)

Hello,

 

Thank you for your question. I suggest you to initialise each signal generator separately (not in a for loop).

It gives you more flexibility in configuration a specific channel. As I understand inverted signal is basically

signal multiplied by -1 and if you initialise signals separately you can do it just to one of PXIs 5421.

I have implemented it for you (see screenshot below). Don't forget to change resource names (PXI1Slot1, PXI1Slot2).

 

Inverted_signal.PNG

 

Also I have attached an updated vi.

All the best,

Message 2 of 6
(2,556 Views)

Hi Max,

 

Thank you so much for the reply, i only have version 12.1 so i edited my design according to your picture and it all works fine apart from inverting a signal. When i put the gain as -1 a error occurs. It looks like i can only put a positive number in the gain??

 

liam

0 Kudos
Message 3 of 6
(2,532 Views)
Solution
Accepted by topic author l_m_s

Hi Liam,

 

I did a quick research on your issue and I think it is worth trying to put "niFgen Configure Output Mode.vi" (red border on the screenshot) and set 

output mode input to "Arbitrary Waveform" (right click on the "Output mode" parameter -> create constant -> select "Arbitrary Waveform" from the dropdown list).

 

solution_1.PNG

 

Could you include error code you are getting in your next reply. Thank you!

All the best, 

0 Kudos
Message 4 of 6
(2,510 Views)

Hi Max,

 

I have ammended the design as per your photo and it works a treat now. Thanks very much for your help.

0 Kudos
Message 5 of 6
(2,506 Views)

Hi Liam,

 

Your welcome! I am glad that your problem is now solved.

 

Kind Regards,

0 Kudos
Message 6 of 6
(2,500 Views)