PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

Monitoring PXI trigger with embedded controller

Hello-

 

I am running Labview RealTime on a PXI system:

 

PXIe-1062Q chassis

PXIe-8130 embedded controller

PXI-5422 arbitrary waveform generator

PXI-4220 bridge input

PXIe-6251 multifunction board

 

I am using the 5422 in script mode, with a program that runs through a variety of scripts. Each script responds to an external trigger and several software triggers. At a certain point in each script, I would like to output a marker and detect that marker in my main Labview RT control loop; upon receiving the marker, the program would take a series of samples from the 4220, process them, and perform other operations (e.g. communicating via TCP with other parts of my system). Basically the main program needs to wait until the "marker" event occurs before proceeding. Timing is fairly critical; events using the marker will occur about every 10 msec, and I am currently running my RT control loop at 10 kHz.

 

What I don't understand from the reading that I have done is how to get the main control loop to monitor or poll a PXI trigger line. I was thinking that I would make the marker output a pulse on one of the PXI trigger lines, and monitor that PXI trigger line at the embedded controller. Once the marker goes high, the main control loop will see it on the next iteration, and can proceed. But I have not seen any reference to vi's or functions capable of monitoring PXI lines on embedded controllers. Is this possible?

 

My backup plan is to route the analog output signal of the 5422 to my 6251, redigitize it, and trigger off the pattern that I am looking for. But this seems a bit silly since I should have access to the source digital-to-analog signal directly, coming from the 5422 through the PXI bus.

 

If I can't read PXI lines directly using the CPU (the 8130), can I instead route my marker on a PXI line to the 6251, monitor it there, and feed that signal into my software loop? Are there vi's / examples that explain how to do this? 

 

Basically, I am unclear how to properly use the PXI trigger bus, specifically how to read what is going on at those lines and bring that information into my Labview RT program. Any suggestions?

 

Thank you in advance for your help,
Steve

0 Kudos
Message 1 of 5
(4,637 Views)

Hi, Steve.

 

Are you experiencing the issue with marker events? or with the programming of the RealTime control loop? 

 

For references regarding markers, there is a great example in the LabVIEW Example Finder called Fgen Arb Waveform Marker.vi.  This VI will give you a good idea of how to route the markers to PFI lines on the 5422.  The PFI line can be used to trigger the acquisition of the 4220 module.  For more information on markers, check out the Output Triggers and Events section in this DevZone article.

Regards,

Sara Lewandroski
Applications Engineer | National Instruments
0 Kudos
Message 2 of 5
(4,612 Views)

Hi Steve,

 

You can configure a counter of your M-Series device to use a PXI trigger line as it's source. Then you can use a timed structure or an event structure to wait on an edge. For a timed structure, note that you should set your dt to 1 tick. I think this would accomplish what you're looking for.

 

Here's a screenshot of the timed loop implementation - this would also work with the timed sequence.

 

timedloopcounter.png

 

For an example using the event structure, check out the shipping example called "Gen Event for Ext Signal.vi".

 

Since the interrupt is periodic, I would recommend the timed loop. (I'm also a real-time guy, so I love the timed loop). You can set the priority versus other timed loops in your application and it also has a lot of handy built-in debug features for timing. Note that you shouldn't mix timed loop priorities and VI priorities. That is, if you decide to use timed loops, set your VI to normal priority and assign all your priorities using timed loops/timed sequences.

 

Gerardo

0 Kudos
Message 3 of 5
(4,602 Views)

Hello Gerardo,

 

I see that it has been some time since you posted the above response.  I was just curious to see if the Time Loop you mention is placed on the host?  I believe the PXI triggers can interact with the embedded controller slot (though I have yet to play with this option) but I would like to know if your set up could potentially be transferred over to the Host for a Windws-based micro-controller (i.e. the NI PXI-8102).  I have included a webpage and a picture contained in this webpage of the PXI Trigger Bus layout and it clearly shows PXI trigger connections between all chassis slots and the embedded controller.


Thanks a lot!

 

http://digital.ni.com/public.nsf/allkb/892204272FF2C0BE862575C500636AF6?OpenDocument

 

pxibackplane.JPG

0 Kudos
Message 4 of 5
(3,808 Views)

Hi Denn_Mann,

 

While there is no triggering circuitry in the embedded controller, you can use a DAQ card to register a user event as Gerardo mentioned above.  Using timed loops is not recommended outside of the LabVIEW Real-Time environment, so I would recommend using the example "Gen Event for Ext Signal.vi" from Help>>Find Examples>>Hardware Input and Output>>DAQmx>>Events.

 

Brian

 

Brian G.
0 Kudos
Message 5 of 5
(3,797 Views)