11-27-2018 07:11 AM
Hy guys!
I am working on a lap counter hobby projekt. I have two cars, one is controlled by the user (player) what is an input, and one with a myDAQ, this is the output. I also have two digital optical sensors, these are the lap counters.
The problem what I can't resolve is that if the user laptimer reach earlier the 10 laps, so the player has a better lap time as the myDAQ, then the myDAQ should automatically learn the better laptime (The program should overwrite the file what is already used in the program).
Could you please help me out?
11-27-2018 07:37 AM - edited 11-27-2018 07:46 AM
Hi Dombi,
why is there an additional wait in the case structures when you already have a wait in the main loop?
Why do you need to add 0?
Why is there a generic IO constant in the false case of the AO case structure?
Why do you initialize and cleanup two of your DAQmx tasks, but two other tasks not?
There is no error handling in your VI…
References should be kept in shift registers…
if the user laptimer reach earlier the 10 laps, so the player has a better lap time as the myDAQ, then the myDAQ should automatically learn the better laptime
IF "usertime" < "myDAQ time" THEN use "user time"
Seems like a simple comparison with a Select node…
11-27-2018 08:27 AM
Hi GerdW!
Firts of all I am really thankful for your fast answer.
why is there an additional wait in the case structures when you already have a wait in the main loop?
Because the myDAQ is checking too fast the lines and beause this the counter was too fast so I must use there an additional wait.
Why is there a generic IO constant in the false case of the AO case structure?
I can't answer this correctly. I use there a generic IO constant because I didn't know what I should use there, and with that VI the program worked.
I wanted to use just the TRUE part of that CASE, but if I don't wire something in the FALSE part for the output then the "RUN" button will be broken. Do you know what should I do in these cases?
IF "usertime" < "myDAQ time" THEN use "user time"
I know the logic, I understand it. The problem is that I don't know how to build up in LabVIEW and how to wire it.
Could you help me in these problems?
11-27-2018 10:01 AM
@Dombi_Kristóf wrote:
I wanted to use just the TRUE part of that CASE, but if I don't wire something in the FALSE part for the output then the "RUN" button will be broken. Do you know what should I do in these cases?
Just wire the reference through.
11-27-2018 10:02 AM
A couple of additional points:
Bob Schor