LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Spectre_Dave

Add State Machine Code Snippet to Palette

Status: Declined

Any idea that has received less than 3 kudos within 3 years after posting will be automatically declined.

Add a code snippet of a basic State Machine to the Programming >> Structures palette.

 

Palette

Visualize the Solution

CLA

LabVIEW, LabVIEW FPGA
8 Comments
crelf
Trusted Enthusiast

But what type of state machine would you put there?  Enum?  String?  etc...?  A state machine isn't a structure - it's a design pattern, and NI's current method of giving you design patterns is to list them as templates (the list you get when you select File -> New). 

 

Hmmmm.  I wonder if it'd be a better idea to have a category in the palette that simply links to those items - then you'd be able to get access to all of them (state machines, producer/consumer patterns, etc). 

 

btw: I absolutely think it's a good idea to put items that you reuse in the palettes, but IMHO that's what VIPM is for.





Copyright © 2004-2024 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 4.0 License.
Spectre_Dave
Active Participant

I was thinking of a pretty simple SM with an enum.  Something that could be dropped down to create a fairly simple program.  This would give the novice user a starting point.Simple SM

Visualize the Solution

CLA

LabVIEW, LabVIEW FPGA
JackDunaway
Trusted Enthusiast

This idea is already implemented in a different way. Go to:

 

File > New > VI > From Template > Frameworks > Design Patterns > Standard State Machines

 

There are two benefits of the current implementation: it shows the State Machine architecture in the context of several other architectures, and it's far out of the way of people who have their own templates! I would not be opposed a single palette item called "Architectures" or something that links to the "New" screen.

Message Edited by JackDunaway (mechelecengr) on 10-01-2009 10:30 AM
Spectre_Dave
Active Participant

Great Idea - a link to the Architectures would be Ideal. 

 

I already place my templates there but I doubt that novices even know about the From Template.

Visualize the Solution

CLA

LabVIEW, LabVIEW FPGA
AristosQueue (NI)
NI Employee (retired)

> a link to the Architectures would be Ideal. 

 

Post that as a separate idea in the exchange and I'll kudos it. 

silmaril
Member

I'd give a negative kudos to this idea if it was possible.

The palette is full enough as it is.  As already pointed out: design patterns don't belong here.

 

The proposed link to the architectural templates sounds reasonable, though.

 

One additional thing to think about: 

There is no simple way to have a template that uses more than one file.

Every enum-based state machine needs a least two files: one VI and one type definition for the enum (using enums that are no type definitions is close to architectual suicide, IMHO).

 

Spectre_Dave
Active Participant
I have very complex Templates that consist of many VIs including Polymorphic VIs.
Visualize the Solution

CLA

LabVIEW, LabVIEW FPGA
Darren
Proven Zealot
Status changed to: Declined

Any idea that has received less than 3 kudos within 3 years after posting will be automatically declined.