LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Start and Stop Trigger using PXI-6120 and DigitalStartAndStopTrigger.vi not working :-(

Hello,

I've been trying for a while now to get my PXI unit to capture a waveform between a Start and Stop (Reference) Trigger using the NI example DigitalStartAndStopTrigger.vi downloaded from the NI website. However, whilst the start trigger and stop trigger seem to be working i.e. the VI runs and stops at  the correct times there is never any data read from my DAQmx compatible PXI-6120 card. So I can see the VI is running around the aquisition loop but the Property Node AvailSampPerChan is always returning zero... this has me slightly puzzled. I thought this might just be a driver issue so I've updated my box to the following software versions (see below) and installed the latest drivers e.g. DCDNov07.exe (also from the NI site) but nothing has changed.

my software as of now.

Labview 7.1 (with the 7.1.1 upgrade applied)
Max 4.3.0.49152
DAQmx 8.6.0f12
Trad DAQ 7.4.4f7

before I updated I had the same problem but with the following versions:

Labview 7.1 (with the 7.1.1 upgrade applied)
Max 4.2.1.3001
DAQmx 8.5.0f5
Trad DAQ 6.9.3f4

So to cut a long story short I still have the same problem with the triggers... does anybody have any ideas what is going wrong?

To add insult to injury it the traditional DAQ example ai_start-stop_d-trig.vi was almost working correctly before I did the upgrade. It had the strange behaviour of capturing the AI0 channel but on the wrong edges (e.g. if I set Start on Rise and Stop on Fall it would do the opposite, Start on Fall and Stop on Rise).

I'm going to leave my box doing a mass compile over night but i'd really like it if someone could suggest a solution or point me in the right direction.

Many thanks,

Mike




0 Kudos
Message 1 of 17
(4,325 Views)
Hi Mike
 
I have set up your system here with an S-Series using DigitalStartAndStopTrigger.vi and can find no problems.
 
I have a few surgestions for you though to check:
 
-  You say that although the start and stop triggering works you are recieving no data. Can you confirm for me that you have the correct physical channel selected for you input. The triggering runs separatly so your this will work whatever the chanel you are using for your anolog input.
 
 - I would recomend testing this in MAX first if you can confirm that the hardware is operating correctaly and is being refferenced to the channel then we can start looking for more problems inbthe software etc.
 
Have you changed the program from the example or are you using the origonal code?
 
Thanks
 
Graham


Message Edited by GrahamG on 11-27-2007 09:41 AM
Graham Green

Sr. Product Marketing Manager

National instruments
0 Kudos
Message 2 of 17
(4,294 Views)
I apologies for the spelling in the above reply - I forgot to check and now alas it is too late
Graham Green

Sr. Product Marketing Manager

National instruments
0 Kudos
Message 3 of 17
(4,287 Views)
Hi Graham

Thanks for offering your help... okay, I've...

1) Downloaded the example VI from the NI website again (http://digital.ni.com/public.nsf/allkb/BA775B0E445BFA79482571FE0032CCEB) to make sure I'm using a clean version.

2) Used MAX to check that I can aquire data from AI0, AI1 and AI2 all with no problems.

3) I configure the DigitalStartAndStopTrigger VI as follows:
        - Select "in/ai0" as my input channel (my input card is a PXI-6120 card and is named as "in" in Max)
        - Set the Number of Post Trigger Samples to "2" (otherwise I get an error when starting the VI)
        - Select "in/PFI0" with a Rising Edge as my Start Trigger
        - Select "in/PFI0" with a Falling Edge as my Reference Trigger (I've also tried using a different physical PFI line e.g. "in/PFI2")

4) I'm using the example WriteDigChan.vi to toggle the trigger lines (my output card is a PXI-6733 and is named as "out" in Max) and i
use the digital lines "out/port0/line0:7" to pulse the relivant PFIs... I've verified that the required lines go high/low in response to me clicking the VIs frontpanel buttons and are wired correctly using a scope.

5) I've verified that both the cards pass the self-tests in Max and that resetting the cards has no apparent effect.

I'm completely stumped as to the problem... getting close to throwing the lot out the window - if only my lab had a window
😉

Mike






0 Kudos
Message 4 of 17
(4,284 Views)
Opps, one final thing...

I've also verified that the trigger does behave the same regardless of which analogue input I select and when I said I get no data I mean absolutely no data e.g. AvailSampPerChan is always zero and therefore no data points are read.

Sorry just wanted to make that clear.

Mike
0 Kudos
Message 5 of 17
(4,282 Views)
Hi Graham,

I don't know if this helps but I often use the VI "3017.vi" downloaded from http://zone.ni.com/devzone/cda/epd/p/id/2345 which uses a Start Trigger and this works just fine so the problem seems to be mainly with the Reference trigger or the combination of the two triggers.

Mike
0 Kudos
Message 6 of 17
(4,279 Views)

Hi Mike

I'm on the case. I'm going to try and find a 6733 and set up what you have exactly. Will see what I can set up in our lab and get back to you when I think I have somthing remotly like your set up preferably that works.

Then hopefully this can all be resolved without resorting to flying PXI boxes. 🙂

Graham

Graham Green

Sr. Product Marketing Manager

National instruments
0 Kudos
Message 7 of 17
(4,274 Views)

Morning Mike

I have set up what I think is close to what you have in your lab. Though could I have a little more information on your values:

The fact that you are getting a return of 0 on your available samp per channel would suggest that your trigger is not starting, and yet it does trigger to stop correctly you say. this would indicate that it must have started so that stopping can comence.

What are the values you have set for Buffer size, Rate, samples per read and post trigger Samples?

Does the program end after the stop trigger is implemented?

lastly can you give me the details of triggering method. Are you using a digital train of users set digital pulses? how long is the program running?

Thanks

Graham Green

Sr. Product Marketing Manager

National instruments
0 Kudos
Message 8 of 17
(4,251 Views)
Hi Graham

I'm out of the lab today but I'll try and answer your questions as best I can...

1) What are the values you have set for Buffer size, Rate, samples per read and post trigger Samples?

At the moment I have all the values (e.g. sample rate, buffer size etc) unchanged apart from the ones I mentioned in my previous post (see above). I have in the past played around with changing the buffer sizes and rates in the example VI but as this appeared to have no effect on the behaviour I now have them setup as in the download.

2) Does the program end after the stop trigger is implemented?

Yep, if I toggle the trigger line high then low I see the program exits the read loop and the VI stops running as expected.

3) Lastly can you give me the details of triggering method. Are you using a digital train of users set digital pulses? how long is the program running.

I'm using the WriteDigChan.vi to manually toggle the first digital line of the PXI-6733 card which is wired directly to PFI0 of the PXI-6120 card. Generally, I just start the VI running  and then toggle the line high, wait a couple of seconds and then toggle it low.

To me it all looks like it should be acquiring samples but as I said yesterday it just refuses to fill the buffer with any data (and hence no samples are read).

Any ideas? and thanks for you help,

Mike
0 Kudos
Message 9 of 17
(4,240 Views)
Hi Graham.

Could you tell me what version of Labview and drivers you are running that appears to be working? I'm currently using the following...

Labview 7.1 (with the 7.1.1 upgrade applied)
Max 4.3.0.49152
DAQmx 8.6.0f12
Trad DAQ 7.4.4f7

which as far as I can tell is the latest versions of Max, DAQmx and Trad DAQ. I'm stuck using Labview 7.1.1 as we don't have a later version i'm afraid.

Also, I mentioned in a previous post I was planning on mass compiling all my Labview VIs. However,  when I tried this the other day I got a DLL error which I believe is related to the traditional DAQ update - can you advise me if I need to perform a mass compile and if so how I can get this to work.... cheers.

Many thanks,

Mike



0 Kudos
Message 10 of 17
(4,238 Views)