LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronous acquisition 4 analog signal and independently count TTL impulse

Hello!
I'm have NI DAQ board PXI-6115. I have problem:
Need synchronous acquisition 4 analog signal and independently count TTL impulse. When value counter will, at example, 5000 acquisition must stop. I'm read program in LV 7.1 but have a problem.  In HELP write:"You can create only one counter input channel at a time with this VI because a task can contain only one counter input channel. To read from multiple counters simultaneously, use a separate task for each counter". I make two different task, but error not disappear.
I don't know how escape this error?
Program VI with Front panel screen-shot in attach archive.
 

Message Edited by _Pavel_ on 05-23-2007 09:06 AM

0 Kudos
Message 1 of 10
(3,260 Views)
Hey Pavel,

Thanks for contacting National Instruments support.  Your program, in it's current state, is attempting to generate a finite pule train and count edges on the same card.  Finite pulse generation is a two counter device, where one counter generates the pulse train and the other counter gates the generation, or goes high when the generation is to start and low when it is finishes.  So no matter which counter you select for the count edges task you will get the error you describe. 

Is it possible to use the pulses that you are counting as an external clock?  If so then you could just generate 5000 pulses and you would only acquire 5000 samples. 

I have attached a modified example from your code.

Let me know what you think.  It only acquires 5000 samples as desired.

Regards,
Kenn North
Principal Product Manager - Search, Digital Analytics
http://ni.com/search
0 Kudos
Message 2 of 10
(3,228 Views)

Hello! Thank you very much.

On how many I have understood to use separateness two counters in this case it is impossible?

TTL the signal has frequency below, than an analog signal. Therefore to use it as hours it is impossible.

How it is possible to solve the given problem? Buy new counter? 🙂

0 Kudos
Message 3 of 10
(3,217 Views)
Hey Pavel,

Your original code was using the counter as the clock for your analog input.  So that is what I did.  If you don't want to use your counter as the clock it becomes problematic since now they won't be synchronized.  The counter uses a start trigger and if the Analog input uses it's own, faster, clock it will start when you hit run, but the counter will start when it gets the trigger at a later time.  Getting another counter won't help you, you need to think of a way to synchronize your tasks. 

You could just increase the frequency of your counter and stop when it hits a higher number.  The time that elapses will be the same in either case, but you will have acquired your data at the correct rate.

Regards,
Kenn North
Principal Product Manager - Search, Digital Analytics
http://ni.com/search
0 Kudos
Message 4 of 10
(3,208 Views)
Hello!
I have 4 independent analog signal and  they synchronous. As the clock their sum is used. But I'm already have TTL signal. This signal has smaller frequency, than analog and also it is independent of analog signals.(different source).   Now I realized a task of acquisition this 4 analog signal. But I as would like to know what amount TTL of pulses for this time was.
And have some problem. 😞
 
0 Kudos
Message 5 of 10
(3,201 Views)
Hey Pavel,

So are you wanting to generate the TTL pulse or do you have it from some other source?  If you have it from some other source you don't need to generate it and can simply count the pulse, and when you hit 5000 just stop the loop that you are doing the continuous analog input in.

Is this a certain amount of time you are trying to acquire, does it change from time to time?  Tell me more about what your overall application is, there may be a better way to do things.

Regards,
Kenn North
Principal Product Manager - Search, Digital Analytics
http://ni.com/search
0 Kudos
Message 6 of 10
(3,194 Views)
Hello!
 
I'm draw diagram data management on our device. Special device (current-freq conventor) - it is Ortec 439 (see here http://www.ortec-online.com/electronics/439.htm).
 
Pavel
0 Kudos
Message 7 of 10
(3,136 Views)
Hey Pavel,

Thanks for the diagram, that helped a lot.  Now I see what you mean in terms of the signals you are trying to read.  So, this modified vi simply runs until the count is greater than 500, you should be able to modify it if needed.

Regards,

Kenn North
Principal Product Manager - Search, Digital Analytics
http://ni.com/search
0 Kudos
Message 8 of 10
(3,113 Views)

Hello!

But this example make without use Retriggerable. As I remember when I use program without retriggerable, that program work very slowly. When I start use program with retriggerable - speed increase.

0 Kudos
Message 9 of 10
(3,108 Views)
Pavel,

Using retriggerable should not make any difference in the speed an Analog Input.  Once your counter hits 5000 are you wanting to then do it again?  I'm unclear why you would need it to be retriggerable.  We have changed quite a bit from your original application so I suggest you continue on with this vi and try to get it to work like it is.

Regards,

Message Edited by Kenn N on 06-05-2007 01:36 PM

Kenn North
Principal Product Manager - Search, Digital Analytics
http://ni.com/search
0 Kudos
Message 10 of 10
(3,105 Views)