05-17-2019 08:40 AM
Do you know that any number times zero is equal to zero?
I tried to clean up the Rube Goldbergs and redundancies that existed in the program making it a mess to understand. I also commented about the feedback nodes.
I think the problem is in your feedback nodes and your order of wiring up stuff. The double exclusive OR was already pointed out in earlier threads that it did not seem logical.
List all of the conditions under which you want to stop the program.
Your pseudocode mentions the just one.
Your LabVIEW code hints at others, but doesn't make sense logically with the XOR's.
I'm taking a guess and modified your program to fix that.
05-17-2019 09:44 AM
Almost too much flame to address in one post. I'll do my best.
RavensFan:
My java codes suggests I know how to maths, yes. I don't know how to LabView, though.
XORs do make sense logically. My truth table shows that this combination of gates exits the program IF AND ONLY IF the conditions are met. A truth table is a tool in logic to list all of the conditions under which I want to stop the program. You may have missed it.
Altenbach:
Moving the DAQ assistant anywhere except the current configuration doesn't allow the voltage reading to update while executing the inner loop. I want this.
I believe you that a state machine is probably better. However, unless I nail down some basics I don't have much chance of moving onto state machines.
Many thanks for the help. Your comments helped me consider the problem differently.
05-17-2019 10:22 AM
Your Truth Table says that the Stop button is TRUE until the stop button is pressed. This does not correspond with what you have coded. Currently your Stop button is FALSE until the stop button is pressed.
05-17-2019 08:04 PM - edited 05-17-2019 08:07 PM
Guess what. I know how to do logic and boolean tables. But you never adequately described what you were trying to do. The way your attached LabVIEW code didn't help clear up what your intentions were.
I gave you a cleaned up version of your VI based on what it seemed like you were trying to do. If it doesn't work like you need, then of course you should go and fix it so that it works. It is YOUR program. But you must admit that what I gave you was a cleaner starting point than your original mess. There is no need to claim you are going to flame people who are trying to help you get a functioning program.
I must say it isn't logical to me that you have a button called Stop Program, but it only stops the program if the magic combination of other inputs in your truth table are just right. If I'm your user, I'd expect Stop Program to do exactly what it says.