10-18-2017 08:01 AM
Hi everyone,
I am trying to make a computer controlled measurment of my battery.
The problem comes in the "Time criterium check". It suppose to recognize when the time (that I set) pass by, and finish that task going to the "Step counter". It does everything properly in Highlight execution, but it doesnt work in a normal mode.
Does anyone have an Idea what could possibly go wrong?
Solved! Go to Solution.
10-18-2017 08:33 AM
Hi vlado,
using a statemachine is quite ok.
But using that much local variables isn't considered "good behavior"…
Create a (typedef) cluster with all information needed in the statemachine. Store it in a shift register. When you need specific items in one state you use UnbundleByName. When you want to save/change items you can use BundleByName…
10-18-2017 08:38 AM
Hi GerdW,
do you have maybe one example how should it be made?
I am total newbie
Best regards,
Vlado
10-18-2017 08:46 AM
Hi vlado,
I am total newbie
After half a year here in this forum (and probably using LabVIEW for the same time)?
With already a solution of your own?
one example
Defining a cluster at the left, changing values inside a state, store in the shift register…
(The remaining stuff is irrelevant here.)
10-18-2017 09:01 AM
I am doing my best, but I am a student and I dont have a lot of time for it. And the most of the time I dont know what is going to happen.
I dont get this cluster at all. I would know how to do such a thing in C, but not here...
10-18-2017 09:08 AM
10-18-2017 10:02 AM
Hi vlado,
it's quite tedious to follow the order of steps inside your step machine. I strongly recommend that you rearrange the order of your cases (and inside your Enum) as closely as possible to the usual order of steps. That would make ot much easier to scroll to your state machine.
Besides all that Gerd already has written: I don't see any reason why your comparison of "Time (min)" less equal "Elapsed Time" should behave differently in "Highlight Execution Mode" than in normal mode.
Of cause in rare cases it could happen, that "Elapsed time" is negative since you use "Tick Counts (ms)" for your timing evaluation. That value can overflow (after 49,7 days). If you want to be sure that this error never occurs, use "Get Date/Time" instead.
And another note: Your case "Read Ah" probably will never read back your Ah counter value, since you forgot to wire your "device information array" through all cases of your state machine.
Regards, Jens
10-18-2017 10:04 AM
FYI - a "criterium" is a bicycle race. Perhaps you meant "criterion"?