LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Even Structure Case Number

Solved!
Go to solution

Here is my implementation:  First I harvest the Event Structure Number and Name and stuff the resulting string into in an FG.  You can see I also tried to dynamically harvest the Number, but did not succeed. It appears only to support the statically visible frame under development.

 HarvestState Machine.pngTo Enqueue the events into the QSM the VI picks the reference of the control triggering the Event, and searches for it  in the list of previously harvested Event Selectors and use the loop index when it finds it. This also works if you are using multiple controls in a single event case.   If it doesn't find it in the list, it means that the queue has been stuffed from somewhere else than in an Event Case.  For this reason, the VI lets you input either a reference or a string indicating the source of the Enqueueing.

Enqueue QSM.pngIn the False case above (Reference input) the reference is upcast to a generic control.

 

This is the first time I post VI snippets, I don't know if I did it right.

 

The resulting debug screen shows the Source of the Event in the left column and "Action" (or State) stuffed on the QSM in the right column.

debug screen.pngThe last entry above has no Event number because it has been stuffed on the Queue from somewhere else in the program, where you then enter the desired text described where it has been stuffed from.

0 Kudos
Message 11 of 15
(1,312 Views)
You're welcome. Glad I could help.

--Q
Quentin "Q" Alldredge

Chief LabVIEW Architect, Testeract | Owner, Q Software Innovations, LLC (QSI)
Director, GCentral | Admin, LabVIEW Wiki | Creator, The QControl Toolkit
Certified LabVIEW Architect | LabVIEW Champion | NI Alliance Partner



0 Kudos
Message 12 of 15
(1,279 Views)

Hello,

 

Can I download this script off somewhere, please?

0 Kudos
Message 13 of 15
(469 Views)

Hi balint,

 


@balintkoszta wrote:

Hello,

 

Can I download this script off somewhere, please?


What is "this"?

Which "script" are you referring to?

 

When you talk about those snippets in previous messages: these are snippets! Download those snippets and drag&drop them into your block diagram… (Read the LabVIEW help on "snippets"!)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 14 of 15
(467 Views)

Hi GerdW,

 

I got it working, thanks for the info!

 

Many thanks,

Balint

0 Kudos
Message 15 of 15
(447 Views)