PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

External digital triggering on multiple PXI-4472

Hello,

 

I sincerely hope that NI guys will again help me on this (as always before) since I cannot find documentation resource to solve it. Basically I need help to change only the trigger in the attached 2 VIs. Following is the story behind them.

 

I have 2 working applications that control a 2D shaking table for simulation of earthquakes. Both read up to 2 excitations from separate files, form a 2D waveform and pass it to their respective DAQ VIs. Each DAQ VI synchronizes the 2xAO (signal generation od 2 DACs from a PXI-6713) with 72xAI (acquisition of 72 channels from 9 DSAs PXI-4472, 8 channels each). Attached are the DAQ VIs:

 

1. Sync=4472 Trig=4472.vi [Traditional DAQ]

Limited "sngle shot" synchronized AIO. Buffered 2 waveforms with identical size are being fired sample by sample. WIth each sample being fired, 72 channels simultaneously acquire samples. The AIO starts simultaneously by the internal AI_START trigger from the ST-master (PXI-4472). The sampling/firing clock is broadcasted via the StarTrigger sourcing from the ST-master.

 

2. PXI_SyncTrig_TDMS.vi [DAQmx]

Unlimited sychronized AIO.Long 2 waveforms are being fired sample by sample - synhronized to them the 72 channels are acquiring simultaneously and TDMS-ing to a file. Again, the AI_START is the internal start trigger and timebase is broadcasted from the ST-master.

 

The TDAQ application is from 2003 but still in use, and the DAQmx is from 2008. Th PXI chassis is remote from me and switched off since the table controller is being upgraded from the old analog to a new digital. The new situation will require to provide the excitation waveforms in a file to the controller console (WindowsXP PC) and it will provide a digital trigger to start the acquisition (72xAI). So I am asked to "remove" the signal generation from both VIs, maintain the sampling timebase synchronization through the StartTrigger from the ST-master AND TO REPLACE THE AI_START FROM THE INTERNAL ST-MASTER TRIGGER TO AN EXTERNAL!

 

I see each PXI-4472 has the EXT-TRIG input but cannot locate a documet explaining its functionality, so following are my concerns:

 

1.

If EXT-TRIG is "always ON" functionality than I assume I only have to provide the digital pulse and the PXI-4472 will start preconfigured acquisition automatically?

 

1a.

If that is correct the fastest trigger application would be to provide the same pulse to all 9 PXI-4472s...?

 

1b.

If that is correct, a neater solution would be to route the "received" EXT-TRIG from the ST-master to the rest 8 PXI-4472s. How to do that in both VIs? (I cannot recognize a "useful" signal in the routing options lists)

 

2.

If EXT-TRIG needs to be "switched on" to be used to trigger a PXI-4472 - how is it done in both TDAQ and DAQmx VIs?

 

2a.

How is it routed from the ST-master to the rest 8 DSAs?

 

I am using a utility VI in the "PXI_SyncTrig_TDMS.vi" ("Get Terminal Name with Device Prefix.vi") which I am not sure how it works but I guess is crucial for the configuration of the "DAQmx Start Trigger (Digita Edge).vi".

 

I would really appreciate someone tell me the needed modifications for both VIs since I am helpless.

 

Thank you in advance,

Download All
0 Kudos
Message 1 of 14
(4,535 Views)

Hi Golubovski,

 

Thanks for your questions--I'll try to do what I can to address some of them.  Bear with me--I need to start with one thing at a time.  I understand you are looking for information on how to use the EXT TRIG input of the 4472 device.  You can find some documentation for this by looking at the DSA Manual on p. 2-18.  Also, searching around ni.com for search terms like "DSA Ext Trig" and the like brought up this example, which you may find useful.

 

It is very difficult for me to comment on how to implement the functionality using TDAQ.  Since it is our legacy DAQ driver, and it is much more specific to each device, the knowledgebase there is more limited to people who have used it before, and what is available by searching online.  I found one example here and another example there about synchronizing with TDAQ.  Is there any reason you are not able to re-write the TDAQ code with DAQmx?

 

If I understand correctly, you may have inherited this code from others (that is, you weren't the original developer).  Is there any way to contact the original developers for assistance?

 

Regards,

Andrew

National Instruments
0 Kudos
Message 2 of 14
(4,505 Views)

Andrew,

 

Thank you for helping me. The code is mine, but as you may well know - what you don't do every day you forget! The problem is that the location is remote to me and in the past I had occasionaly editited the code via RemoteDesktop or TeamViewer. But the system is swithed off next 3 weeks. I now realize why I am not able to see the PFI0 option on my PC - I am not connected to the PXI chassis directly, so my MAX does not produce options it doesn't see in my attached hardware.

 

Basically I have only a single modification to make appart from the removal of the signal generation (2x AO) and that is the trigger. At the moment both apps are triggered by the AI_START of the ST-master (PXI-4472 in slot 2). I presume the synchronization between the 9 PXI-4472s remain as it is now - AI_CLOCK timebase is broadcasted from the ST-master to the rest 8 DSAs...?

 

The idea is that afetr the controler is changed, the final application will be DAQmx based, file formats will be TDMS and TDM and everything else unified in that common sense.

 

So, since I am unable to use the DSA hardware pionout/functionality due to the absence of the corresponding hardware from my PC I'd be more than grateful if you could check some ideas for me. Following is my idea:

 

1. All 9 DSA cards remain in the single task created as "AI Voltage"

2. "Sample Clock" reads "Continious Samples" (assuming there is only a START trigger, not an END one).

3. Signal generation (2xAO) may be removed since it is not needed anymore OR may stay to define the end of the acquisition (to avoid external trigger fio that purpose) - what do you think is best?

4. Sampling clock distribution/sync remains as it is now ("DAQmx Timing" and "DAQmx Export Signal" propery nodes remain with the "PXI1Slot2/PXI_Star8" string)

 

Now the problematic part at the moment is as follows:

 

5. Start Trigger for the ST-master DSA

It starts its operation uncoditionally - as soon as it is ready

 

6. Start Trigger for the rest DSAs and MIO without the ST-master

Currently the UtilityVI ("Get Terminal Name wit Defice Prefix.VI") tells all DSAs and the MIO that their operation starts when teh ST-master strarts acquiring by instructing accordingly the "DAQ Start Trigger (Digital Edge).VI".

 

I would like to trigger the ST-master DSA via its PFI0 input (DI) and the rest 8 DSAs (and the MIO if signal generation remains) to StartTrigger as it is now - from the ST-master's START!

 

a.

So, does my VI need modification or just another "DAQmx Start Trigger (Digital Edge).VI" to tell the ST-master to expect a trigger on its PFI0 pin?

 

b.

If END trigger is an easy solution - how does it affect the diagram (I still have no clue whether it is issued via the same trigger line - I would expect it that way). WIth an END trigger I no longer need the signal generation in the diagramn to define when DAQ stops.

 

c.

Maybe the easiest solutuion is to connect all DSAs PFI0s to the same StartTrigger source and "tell" them to expect it on their PFI0 pin on the diagram?

 

I apologize for possible nonsense, I hope have expressed myself sufficiently for you to understand my problem.

Look forward to hearing from you again,

 

Roman

0 Kudos
Message 3 of 14
(4,501 Views)

Hi Roman,

 

Let's see if I'm following you:

1. You have no need for the AO voltage task at all.

2. You want to start all of your AI acquisitions for all of the channels for all of the DSA cards at the same time.

3. You want to send an external PFI trigger to start them.

 

If that's correct, you can do this pretty easily.  You'll simply set a start trigger VI on the top task which references the PFI0 line (or whatever external line you specify) and remove the bottom task completely.  By nature of the channel expansion you're employing, the 4472 card in slot 2 will drive the other 4472s. In other words, the 4472 in slot 2 will be the master, and the others will automatically be designated as slaves.  The master 4472 aligns with other 4472s by sharing its Master Sample Clock Timebase across the PXI backplane.  

 

You can read more details on this at the KB How Do National Instruments PXI Boards Map to the PXI Backplane? where it says: The PXI-4461, PXI-4472, and PXI-4474 DSA boards can send their internal clock signal through the PXI Star Trigger line to other PXI-4472 boards. This clock signal is an oversampling clock that can easily be used by other PXI DSA boards.  Also, you can see these devices listed in the KB PXI Devices That Can Send and Receive Star Triggers.  (Just another affirmation)

 

Here's the caveat: if you're using a PXIe chassis, you must use a timing card (such as a 6682) to drive the other 4472 devices.  This is documented in page 2-31 of the DSA manual. Are you using a PXI or PXIe chassis?  I mention it just to be thorough.

 

Now, to add an external trigger, you simply include the DAQmx Trigger VI in the task that has all of the channels.  Since you're using an external trigger, you just need to specify a PFI line, which should autopopulate based on the MAX configuration of the PXI machine.  If you wanted to generate an internal trigger and route it, that could also be an option.  I won't belabor the details, but here's an example which shows how to use a counter task to generate a trigger pulse internally.  Here's an example of channel expansion with DSA devices on PXI using a master/slave.

 

So with these things in mind, I'll try to answer your questions:

1. Yes, the tasks remain in the same AI voltage task.

2. Yes, the sample clock remains specified as having "continuous" timing

3. Yes, you can remove the AO if you are not using it.  What stops the acquisition in your code is either the error cluster giving a "true" for status, or the DAQmx Is Task Done VI reporting a "true" for the AO task.  You could also add a "stop" button if you wanted to manually stop it.

4. No--if you only have the top (AI) task, and you're using a PXI (not PXIe) chassis, then there should be no need for this routing.  This should be handled automatically, so the DAQmx driver identifies the 4472 in slot 2 to drive the other 4472s.

5. Not sure what you mean by this--but if you're looking to make this start on a trigger, you should only need to include that VI referencing the PFI line you want to trigger from.

6. Yes--this is what I'm talking about in #5 just above.  You will be triggering the whole task to start, so you all of the devices specified should start together, automatically.

a. I think I already explained above--let me know if that's not the case.

b. I'm still unclear why you need this END functionality.  Typically this is completed by ending your program in software and closing out references.  The alternative is setting up a Finite Acquisition (not Continuous), wherein you specify how exactly how long you want to run the acquisition and it will end automatically.

c. While this could be another feasible solution, I believe it's unnecessary.

 

Hope this helps,

Andrew

National Instruments
0 Kudos
Message 4 of 14
(4,473 Views)

Andrew,

 

Attached is the solution the way I understand the functionality of the "expanded selection". Yes, I understand the timing and triggering concept of the PXI the way you explain it. However, I do not know the expanded selection grasp of functionality, so I can't tell what is implicit and what is left for explicit wiring on the sync issue. The chassis is PXI-1006. Questions:

 

1.

Is the attched VI my working solution for extrenal START_Trigger and ST_Clock_Synchronization of the 9 DSAs?

 

2.

Assuming the clock distribution is implicit for the epanded slection, do I still need the [DAQmx Timing] and [DAQmx Export Signal] property nodes within the TRUE case of the case structure - or there should be nothing in between the "DAQmx Timing (Sample Clock).vi" and the "DAQmx Start Trigger (Digital Edge).vi"? Do I in any way need to route signals in my case - and if YES, should I use the "DAQmx Connect/Disconnect terminals. VI"s?

 

3.

Regarding the "END" issue - I need the controller to stop my DAQ (no use of a button). So one way is the controller provides a STOP trigger also. The other way is I know the duration of the excitation and implement that control like it is it currently in the attached VI. If there is a 2nd STOP pulse on the same line how can it be used to stop the DAQ, please elaborate...?

 

Thank you for the valuable support!

 

Roman

0 Kudos
Message 5 of 14
(4,469 Views)

Hi Roman,

 

The concept of channel expansion is actually pretty simple.  You are using it already, actually.  When you are specifying multiple devices in your input task, the DAQmx driver is automatically configuring those devices in the background so that one becomes the master, and others become the slaves.

 

Synchronizing DSA, S Series, and X Series Devices With a Single NI-DAQmx Task

 

Previously to synchronize devices, you had to explicitly write out which device should be the master/slave in your LabVIEW code.

 

For your questions:

1. Yes, this is what I meant in my previous post.  Try this out and see if it works for you.

2. No, these property nodes shouldn't be necessary (assuming I've understood what you're trying to do).

3. You'll not be able to use an external pulse trigger (in the truest sense of the word) with your current hardware configuration.  This is because the 4472s have no digital inputs--only analog inputs.  If you wanted to bring in a digital signal on an analog channel and set it up that way, you could.  Or, if you have another PXI card other than 4472s (such as a multifunction DAQ card) you could use that to detect a digital trigger (setting up a Change Detection Event, etc.)

 

For your current setup, I'd recommend reading just using an analog channel to read the digital signal.  You can use an channel on one of your 4472s to connect to the digital "stop" pulse.  As long as the pulse stays high for long enough for the 4472 to detect it (that is, 102.4KS/s or whatever speed you have specified), then  you should be able to just read in the data from that line, and do a comparison.  When it goes above a certain value, you output a true, and that stops your loop.  This is a method called "polling" for the data, but in your application I think it is the best way (fastest/easiest/not really a trade off).

 

The only caveat here is if your pulse is too quick to be detected by your DSA devices.  For instance, if the pulse is less than 1ms long, and you have a rate of 1kHz specified, you may miss the "stop" pulse.  If you specified the maximum rate this device can go, I'd say your minimum "stop" pulse width is 1/102.4kHz or about 10 us.

 

Regards,

-Andrew

National Instruments
0 Kudos
Message 6 of 14
(4,452 Views)

Andrew,

 

Thank you for helping me both solve and comprehend this issue. Attached is my final solution that I will wrap in the appropriate GUI shell and send it for test.I threw away the clock properties and the "expanded selection" should do the timing syncronization as well as the all DSA start trigger.

 

I can't rely on the analog trigger for the stop so I pass the expected size of excitation in [samples] assuming the file will be fired-out sample-by-sample with the same update rate as the sampling rate!

 

Is this OK according to you?

 

Roman

0 Kudos
Message 7 of 14
(4,450 Views)

Hi Roman,

 

I don't see anything that stands out as a huge issue in this code.  You may want to re-create the "Scan Rate" constant so that it's not being coerced into the DAQmx Timing VI, but that shouldn't give you much of a problem.

 

Have you tried the code out yet?

 

-Andrew

National Instruments
0 Kudos
Message 8 of 14
(4,439 Views)

Andrew,

 

It works - people have tested the shell I had sent to them and confirmed. Thank you again. One last dilemma, concerning the PXI-6713 MIO present in that chassis. It has 8 DIO lines. Is there any possibility to peform both START and STOP triggering with it? If edge triggering is not possible, maybe some kind of "eventing" change of level on the DI line used for triggering inside the DAQ loop? Any ideas?

 

Roman

0 Kudos
Message 9 of 14
(4,420 Views)

Hi Roman,

 

The 6713 only supports software-timed Digital I/O so the task will start and stop when it receives a software trigger. In other words, the task will start and stop after the Start and Stop Task commands are executed. Your only option for start/stop triggering will be to read whatever signal you want to start or stop the task off of, determine in software if the triggering condition is met, and then start/stop the task. To reduce latency you should read small blocks of data. 

 

Hope this helps!

Sean Ferguson
Application Engineering Specialist | RF and Reconfigurable Test
0 Kudos
Message 10 of 14
(4,384 Views)