10-18-2013 04:32 AM
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.
Solved! Go to Solution.
10-22-2013 10:44 AM
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).
Also I have attached an updated vi.
All the best,
10-23-2013 11:05 AM
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
10-25-2013 04:26 AM
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).
Could you include error code you are getting in your next reply. Thank you!
All the best,
10-25-2013 08:45 AM
Hi Max,
I have ammended the design as per your photo and it works a treat now. Thanks very much for your help.
10-25-2013 09:02 AM
Hi Liam,
Your welcome! I am glad that your problem is now solved.
Kind Regards,