Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

error -50 ... using two counters at the same time

hello there,
 
I'm trying to run two counters at the same time with different frequencies and number of samples and get the following error:
 
Error - 50103
 
(counter number 1 works but the error just affects counter number 0)
 
My device: PCI-6024E
 
Please take a look at the picture for details!
 
Thank you,
kind regards Peter
0 Kudos
Message 1 of 10
(4,213 Views)
If you configure a counter to create a finite pulse frequency, a second counter is needed to perform this task. The second counter gates the first one. So if you configure counter 1 to generate a finite pulse frequency, counter 0 will be reserved, and can not be used for anything else, as long the generate finite pulse task is running.
 
Message 2 of 10
(4,187 Views)
Hello Andre,

thanks for your reply. I suggested that your explanation could be the reason :/. Can you give me an advise how to avoid this? It's necessary for my application that I can create two pulse trains simultaneously (I'm working on a plotter). The first motor needs a frequency between 1 and 100 kHz and the second between 100 and 1800 Hz.

Is it possible to change the configuration to "continuous pulses" and check the number of generated pulses in a loop or something like this?


please help me again,

kind regards peter
 
0 Kudos
Message 3 of 10
(4,170 Views)
If you would change to "continous pulses" you wouldn´t need a second counter per task, thats right. To count the generated pulses you would need a counter. So this does not improve your situation, still you would need two counter per motor. Best would be to use a counter-card (660x).
Maybe you could use an analog input, to count your generated pulses, but this will create a lot of overhead (you have to acquire your signal at a high rate and analyze de acquired signal to detect the number of pulses).
So from my point of view I don´t see a solution with your current hardware. You will need four counter for this application, so you either have to add a second multifunction board or use a counter-card.
 
Hope this helps!
 
André
 
0 Kudos
Message 4 of 10
(4,145 Views)
Hello Andre,

yeah I unerstand the problem, but I think it's weird to say that my NiCard has two counters, although I can't use the second counter simultaneously :).

Counting the edges brings to much overhead, like you said. That's why I'll use one counter for the high frequencies 1 - 100 kHz and generate the second pulse with a timed loop and a boolean that changes its state (smallest timebase 1 ms -> max. 500 Hz) and I can also add a delay of one millisecond so I'll get 250 Hz.


For the range from 1 till 100 kHz, should I take the 100 kHz timebase or the 20MHz timebase?

thanks for your help,

kind regards peter
0 Kudos
Message 5 of 10
(4,140 Views)
Use the 20 MHz Timebase, with the 100 kHz Timebase you don´t have enough Resolution to generate a good 98 kHz Signal for example, as the counter has to dived down your output-signal based on the Timebase somehow, so using the 100 kHz Timebase, the next possible lower frequency to generate would be 50kHz.

Message Edited by Andre_Saller on 09-12-2006 04:25 AM

0 Kudos
Message 6 of 10
(4,137 Views)
I suppose that there can occure problems with the 20 MHz timebase when I try to generate e.g. 2000 Hz   (Error..... either choose a different timebase or a different number of pulses to be generated ....). I had this problems before that's why I changed the timebase to 100 Khz.

But I will try it !!
kind regards peter


0 Kudos
Message 7 of 10
(4,132 Views)
hello andre,

I had an idea and want to ask you if it would make sense to take the 100 kHz timebase (1-10 kHz) for lower singals and the 20 MHz timebase for higher frequencies and set this option before I start the vi? (from C .. I'm using a dll)..

kind regards peter
0 Kudos
Message 8 of 10
(4,098 Views)
I guess you have to use such a solution. With the 100kHz you don´t have enough resolution for the high frequencies, with a 20 Mhz you might get a overfolw for the very low frequencies, so what you suggests seems to be a good solution: Let the user select a range first, accoring to the range you can use the 100kHz for the lower range and the 20 MHz for the upper range.
0 Kudos
Message 9 of 10
(4,094 Views)
Now it works! I thank you very much for your advise Andre! 😉

best wishes peter
0 Kudos
Message 10 of 10
(4,077 Views)