Example Code

Simplified Queue Handler

Code and Documents

Attachment

Here is a polymorphic Queue handle suite to handle string queues. We created this tosimplify creating Queued State Machine (QSM) architectures. All of the basic functions plus more complex operations with the Queue are included. Some additional features are adding / pushing an array of strings. trapping errors, and logging the start time of every state. The dt.vi then calculates the delta time for every state in the QSM. Attached are LabVIEW 8.0 and 8.5 Versions.

I added Sample VIs using the Queue Handler. These are intended for demonstration only they are NOT functional.

I added modified the Queue handler to accecpt Variants which allows for the use of ENUMS. The enums require a little more complexity especially in the delta time (dt) section.

Visualize the Solution

CLA

LabVIEW, LabVIEW FPGA

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
Christian_L
Active Participant
Active Participant
on

Thanks for sharing this. Do you have a simple example that shows the use of the VIs in your library, like a template for starting a new application or VI?

authored by
Christian L, CLA
Systems Engineering Manager - Automotive and Transportation
NI - Austin, TX


  
Contributors