12-10-2015 01:41 AM
Hey Gerd, sorry if my answer was so wrong. I updated the VI as you advised, I took off all local variables, I'll test the VI right now.
In the past Ihad problems when not using local variables in while/for loops as the values did not update from one iteration to the other.
I see that in this case it is not the case, perhaps (surely) I was wrong in the past and I since then I always thought that local variables were the only item which would update at any new iterations of while loops, and I always used them for this reaso. It's at least two years that I use local variables and I never got any crushes and/or any kind of other software problems.
I see that I can avoid them and the values are anyway updated in new iterations, this is a good new and I will not use local variables anymore!
Don't take it personally, I just want things working asap with minimum effort ![]()
12-10-2015 01:58 AM
If I put 20 KHz frequency, the ms to wait will be 0.05.
You mean that only integer numbers can be wired into the wait function? I don't see it in the help, sorry!
If so, what can I do? Minimum ms to wait is 1? Cannot be smaller?
12-10-2015 02:18 AM - edited 12-10-2015 02:22 AM
Hi fabbro,
You mean that only integer numbers can be wired into the wait function? I don't see it in the help, sorry!
Let's read the help:
It clearly states the input type of Wait is an U32 value. Can you see this? U32 is an integer (I guess)…
Minimum ms to wait is 1? Cannot be smaller?
U32 values allow a value range of 0 (zero) to ~4*10^9 (2^32-1).
So minimum wait is ZERO. Next allowed value is ONE. Unit is given in the help: "millisecond"…
Also don't forget to read the last sentence of the "Note" section in the help!
Again: RTFM! Carefully!
If I put 20 KHz frequency, the ms to wait will be 0.05.
So you want to switch your DO with a delay of 0.00005s while the hardware allows just switching with atleast 0.002s between subsequent calls?
Did you read the user manual by now?
If so, what can I do?
By a better DAQ hardware. Buy one that is capable of generating PWM outputs…
To summarize the whole thread:
The solution to all your questions is to read the f*** manuals:
- before you buy hardware
- after you bought/received the hardware
- when you start to use (LabVIEW) functions you didn't used so far or you don't know how they operate
12-10-2015 02:32 AM
Ok, thanks Gerd for your help, all is clear now (unfortunately).
Anyway, no need to always be mean in the forums, just relax! I really cannot understand why everybody in a technical forum who has the answer to your question thinks he can talk to you unpolitely!
Thanks anyway for your precious help