03-28-2006 03:56 PM
03-29-2006 03:19 AM - edited 03-29-2006 03:19 AM
Message Edité par TiTou le 03-29-200610:20 AM
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus
04-04-2006 09:14 AM
04-05-2006 04:53 PM
04-25-2006 03:21 PM
I am working on getting just the counter working by using
the program posted previously, and I am running into issues. Periodically I get
the error:
________________
Error -200141 occurred at DAQmx Read (Counter DBL 1Chan 1Samp).vi
Possible reason(s):
Data was overwritten before it could be read by the system.
If Data Transfer Mechanism is Interrupts, try using DMA. Otherwise, divide the input signal before taking the measurement.
___________________
It seems to work better if I use cascaded counters, but I need timer 0 for
analog channels when I run this code along with the program for the other
measurements.
I have tried averaging, and selecting different values for the millisecond
timer, and these did not seem to have an effect.
I tried different DAQms configurations and "Counter DBL 1Samp" seemed
to work the best.
The program will work for a while and then it will give me the above error
message.
If I use counter 0 as a cascaded counter input, the program runs fine. If I run
this with other analog channels, it errors out because the analog channels use
counter 0.
If I use counter 1 as a cascaded counter input, it seems to work better than a
single channel, but it will still error out with the above error.
If I use only counter 1, I get the error above even faster.
Also, none of the
configurations give measurements outside the While Loop.
The only place I can add a speed dial for the front panel is within the While
Loop.
Is there someway to get the signal to continuously send out of the while loop?
I thought if I could get the signal out of the while loop, I could condition it
anyway I wanted without the program erroring out.
Any suggestions would be much appreciated.
Thank you.04-26-2006 02:51 PM
Hello Electro-Frog,
I was not able to see what you were doing in your while loop from your previous
post. Are you doing a lot of data manipulation in your while loop?
I also noticed that you are using local variables in your program, these can
slow down your application which would contribute to error -200141 - which is
cause when you receive a second sample before reading the last.
Another thing you could try is to set the DAQmx Overwrite Property in the DAQmx
Read Property Node to Overwrite Unread Samples.
This will not error if you miss a sample.
Regards,
05-03-2006 10:45 AM
Regards,
05-03-2006 02:10 PM
05-04-2006 01:49 PM
05-09-2006 10:56 AM
I have managed to avoid getting the error with the
overwriting samples by using the attached program.
The display will still freeze up occasionally, but usually it will start
working again eventually.
Now my problem is that I am measuring the frequency correctly in measurement
and automation, but not in my program.
I put a 500 Hz signal in to test the system. The input was selected as 2
counters, large range, 2 Hz - 2.5 KHz.
In measurement and automation, I received data generally dead on 500 Hz,
sometimes a little different.
In my program I would sometimes get the correct reading for a second and then
it would change to decimal numbers with seemingly no relation to the frequency.
i.e. .21, .5, .11 and so on.
I tried changing the frequency, and sometimes this changed the number slightly,
sometimes it did not effect it, and sometimes the number changed either bigger
or smaller in the opposite direction of how I changed the input.
Does anyone have any idea why LabView is not reading the same as Measurement
and Automation?
Thank you,
Electo-Frog