Signal Generators

cancel
Showing results for 
Search instead for 
Did you mean: 

programming multiple PXI-5412 in C

Hello,

 

I am looking for example C code (using NI-FGEN function calls) that shows how to work with multiple PXI-5412 contained in one chassis.  I've been going through the NI-FGEN examples, but haven't found an one that covers this topic.

 

I have a PXI-1036 chassis, a PXI-8360 MXI express card, and 4 PXI-5412 cards (each has a single channel).  What I am looking to do is create a single application that set these cards, loads in waveform data from file to each, and then generates output from all the cards simultaneously.

 

I am familiar with the NI-FGEN ArbitraryWaveform example, and have used that as a starting point for my application.

0 Kudos
Message 1 of 2
(4,799 Views)

What you are trying to do, in escence, is program all four signal generators independently, and then start them at once.

 

  • To do this in software, you'd call Initiate on all four, one by one, in a loop. But that will result in some amount lag and software jitter as the devices start one slightly after another.
  • You can use hardware triggers. Program all four device to start on a specific trigger and then send that trigger. This will give you pretty good (usually within one sample clock) synchronization across channels.
  • For the best possible synchronization, look into NI-TClk API. It gets installed with NI-FGEN and there are examples included. NI-TClk will synchronize and start the devices in a very, very tight manner. You still configure the devices using independent NI-FGEN sessions, but then synchronize and start using NI-TClk.
Marcos Kirsch
Chief Software Engineer
NI Driver Software
Message 2 of 2
(4,630 Views)