Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Working with the same PCI-6023E with two different tasks

Hi Jason,

 

I understand what you're saying.

 

Could you point to me any VI example which demonstrates what I need to do? (acquiring analog signal using a triggering train of 150 triggers)

 

Thanks,

 

Abe

0 Kudos
Message 11 of 18
(1,261 Views)

Hi Jason,

 

I understand what you're saying.

 

Could you point to me any VI example which demonstrates what I need to do? (acquiring analog signal using a triggering train of 150 triggers)

 

Thanks,

 

Abe

0 Kudos
Message 12 of 18
(1,261 Views)

Hi Abe,

 

I don't think you really need an example for this. You are practically almost there. I would just trigger your signals twice as fast. If you really want to see an example, the closest thing I can find would be under Tools -> Find Examples -> Hardware Input and Output -> DAQmx -> Analog Measurements -> Voltage -> Acq&Graph Voltage-Int Clk-Retriggerable.vi . Once again, just try triggering your trigger signal twice as fast within the same time frame.

 

Jason L

Product Support Engineer
National Instruments
0 Kudos
Message 13 of 18
(1,254 Views)

Hello Jason,

 

What exactly do you mean by saying :  I would just trigger your signals twice as fast ?

 

In my while loop I use the following three DAQmx VIs in the following order:

 

 (1) Configure Triggering Task  (rising edge) -> (2) Read data from task -> (3) stop task

 

These three operations are running in a while loop until 150 triggers were detected (this is the stop condition of the while loop).

 

Unfortunately, the code detects only 75 of them, so the loop obviosuly never ends.

 

My question is : how would you modify the operations order (bolded text above) in order to implement your suggestion?

 

Thanks,

 

Abe

0 Kudos
Message 14 of 18
(1,252 Views)

Abe,

 

I was referring to your hardware setup, not software. What are you using to trigger your task? Your triggering task can only detect rising or falling edges, not both. So I was thinking that when you trigger, you are toggling a signal. Everytime you toggle, the trigger will have a falling edge or a rising edge. If this is the case, then only every other toggle will trigger the task, thus you are only seeing half the triggers.

 

Jason L.

Product Support Engineer
National Instruments
0 Kudos
Message 15 of 18
(1,249 Views)

Okay, the triggering signal which I used is composed of 150 pulses. The time difference between two consecutive pulses in this train is ~200ms.

 

In my application I need to detect only the rising edge of these pulses - which is 150 as well.

 

You are correct that I have both rising and falling edges, but I have 150 of each one of them as I have 150 pulses altogether.

 

As far as I uderstand, if I'm coding correctly, the task should identify the 150 rising edges of these 150 pulses, but it detects only 75 of them.

 

Abe

 

 

 

 

0 Kudos
Message 16 of 18
(1,245 Views)

I would not start and stop the triggering, but use the trigger to clock a sample and keep reading until all samples are in.

Maybe you need to configure your triggering a bit more dedictated.

But if you look carefully through the examples and are not affraid to try to understand all crazy names in the example folder you should be able to find a correct example. 

greetings from the Netherlands
0 Kudos
Message 17 of 18
(1,243 Views)

Did you look at the example mentioned? Is your code actually starting and stopping the task with each iteration? If so, stop doing that. Starting and stopping a task is a lengthy process and you may be simply taking too long and hence missing half of the triggers.

0 Kudos
Message 18 of 18
(1,241 Views)