LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Highlight Execution code behaves differently

Solved!
Go to solution

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? 

0 Kudos
Message 1 of 8
(2,739 Views)

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…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 8
(2,721 Views)

Hi GerdW,
do you have maybe one example how should it be made?

I am total newbie

 

Best regards,
Vlado

0 Kudos
Message 3 of 8
(2,713 Views)
Solution
Accepted by topic author vladosaurus

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

check.png

Defining a cluster at the left, changing values inside a state, store in the shift register…

(The remaining stuff is irrelevant here.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 8
(2,703 Views)

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...

0 Kudos
Message 5 of 8
(2,694 Views)

Hi vlado,

 

"cluster" = "struct" ( a datatype collecting items of different other datatypes)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 8
(2,690 Views)

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.

grafik.png

 

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

 

 

Kudos are welcome...
0 Kudos
Message 7 of 8
(2,671 Views)

FYI - a "criterium" is a bicycle race.  Perhaps you meant "criterion"?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 8 of 8
(2,668 Views)