05-22-2018 09:09 AM
I have recently installed NI FGen 18.1 which adds TClk support to the 2x NI PXIe 5123 AWG cards that I am using.
I am attempting to synchronise and trigger the oscilloscope card (5170R) and the two AWG cards (5123) simultaneously, with an independent waveform being transmitted on each of the 2 channels on each AWG card. This should mean that I can trigger the oscilloscope and 4 waveforms simultaneously.
I can currently trigger all 3 cards to work, but I cannot get both AWG cards to trigger BOTH AWG channels as well, only a single channel.
If I configure each AWG channel independently, I can load on the waveform no problem, but when it comes to getting the Session Ref for the TClk Configure Homogenous Triggers VI, the session ref for 2 channels on the same cards will come back identical Session Refs, which will throw out an error.
If I try to use one of the channels to get the session Ref, it won't trigger both channels, even when they both have identical session refs apparently.
To get around this I considered configuring both channels on the AWG together, the same way you would configure the channels on the oscilloscope. So I use ' 0,1 ' as the channel name so I can configure both channels. But what I can't do is work out how to load a separate waveform onto each channel. If I attempt to use ' 0 ' as a channel name to put a waveform on channel 0, I get an error basically saying that the channel name for that is different to the channel name used when configuring the AWG.
So... I basically need to find out how to use TClk to trigger both channels on both cards and the oscilloscope card all simultaneously.
There must be a way to do this, I have checked most of the examples provided for TClk but none of them deals with loading independent waveforms onto separate channels on the same card.
Hope you will be able to help. I have attached my program (in the state in which I configure each channel separately and try to use Session Ref to use TClk )
05-23-2018 08:18 AM - edited 05-23-2018 08:31 AM
Hi DParrish,
I cannot see your attachment; maybe you forgot to attach it or it was lost somehow?
Apart from that: What Waveform Generator Card are you using? I cannot find any information on an NI PXIe-5123; was it a typo and you actually referring to the 5423? Also, what controller are you using in your PXIe-1071 chassis?
05-23-2018 08:20 AM
Please find Files attached to this reply.
Many Thanks
05-23-2018
09:25 AM
- last edited on
12-09-2024
03:37 PM
by
Content Cleaner
Hi DParrish,
Thank you for the quick reply! Do you know the "niFgen Configure Channels.vi"? I don't know if this approach will work for you as I don't know your set-up, but I'd try the following for each FGen device:
1) Initialize the device (without a channel name)
2) Use the "niFgen Configure Channels.vi" to select both channels
3) Set Timing, Waveform setup, store waveform data etc. (as you are currently doing)
4) sync triggers and clock, and start the task with NI-TClk only using one Reference per device
To be honest, from looking at your VI, I am not sure how/where you configure your triggers. It looks to me like you are using the "niTClk Configure For Homogeneous Triggers (VI)" with the sessions wired in having no Start Trigger set. Correct me if I am wrong, maybe I just did not find it. Having no Start Trigger defined, "niTClk Configure For Homogeneous Triggers (VI)" will create a Start trigger for one of the sessions and export this one to the others. Do you know what exactly this setup will look like afterwards? Is it exactly what you want?
Apart from that I strongly recommend that you learn a little "restraint", namely to resist the temptation to put everything in one humongous Block Diagram. Having to scroll around in order to see all the code is no fun. E.g. it is not easy following your logic with wires going all over the place. What's the secret? Use SubVIs, especially ones where you have taken the (very minor) effort to create an icon for it, something as simple as a background square that has few words on it saying what the SubVI does. Now your top-level VI's Block Diagram can show important structures with most of the "busy work" taking place inside SubVIs with Icons like "Configure AWG", "Load Waveform into AWG Channel", "Set Triggers", etc. Simplifying your code by "hiding the details" will make it much clearer what you are doing in the top level, and much easier to read. As you are using large sections of exactly the same code multiple times (e.g. the Configure RFI Channel part) you will greatly benefit from making your code more modular!
It also helps keeping your wires straight, left-to-right, without exceptions.