From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Deisgn Pattern FSM in Labview

Solved!
Go to solution

 

How to Create Folllowing Desing Pattern using Labview OOP og JKI SMO or Actor Framework

 

 

 

 

SMC.PNG

0 Kudos
Message 1 of 11
(4,274 Views)
What design pattern? I see an ambiguous, undocumented drawing, but no design pattern.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 11
(4,245 Views)
Mike.

My application need one state machine controller. Which controls n number of slave state machine.

0 Kudos
Message 3 of 11
(4,230 Views)

yes we can do this using producer consumer architechture....

check this link  http://www.ni.com/white-paper/3023/en/..

 

There are  two ways to tell s thanks in forums : either give Kudos or  Marked Solutions

0 Kudos
Message 4 of 11
(4,221 Views)
The key is the messaging structure you put in place. User defined events are ideal for this purpose. This post and the one following highlight some key points.

http://www.notatamelion.com/2015/02/23/building-a-proper-labview-state-machine-design-pattern-pt-1/

OOP can be helpful, but not as an architecture.

The JKI state machine has the problem of using strings as the state variable. Is it event driven?

In terms of the AF, just say no. It's a very bad idea that scales terribly. Don't take my word for it, just look at all the problems reported on the forum.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 5 of 11
(4,211 Views)

Flying Spaghetti Monster?

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 6 of 11
(4,203 Views)

The Actor Framework might not be the right choice for you, but I don't think you should rule it out completely. I think it can be a very good architecture choice for many applications. I'm not sure if you're familiar with how it works, but the basic idea is that each "actor" you create is an object which inherits from the Actor object provided in the framework. Actors are asyncronously running processes, and the framework already has built in ways to launch actors and send messages from one actor to another. Really all you do when you create an actor is write the code that it should run in response to specific messages, which can involve sending more messages to other actors or itself.

 

I often make state machine actors by putting a state enum in the actor's private data and then having that actor send itself a message periodically and whenever it receives that message it checks its state and potentially sends other messages/does things it needs to.

 

I think what would point you towards using the Actor Framework would be if any of those slave state machines 1, 2, ... n will be the same as each other, because one of the biggest benefits of the Actor Framework is that you can launch multiple instances of a single actor you've written.

 

--Hope

0 Kudos
Message 7 of 11
(4,201 Views)
Solution
Accepted by topic author SaranVenkateshS

Hello saran1988,

 

On the starting window of LabVIEW,you can click on create project.

 

prettypwnie1.PNG

 

You will find the template of design pattern you're talking about. Below there is a quick description.

 

prettypwnie2.PNG

And if you're click on More information, you'll find the use case.

prettypwnie3.PNG

 

I think that all the info you need are in it.

 

Regards.

Sabri JATLAOUI - Certified LabVIEW Architect - Certified LabVIEW Developer
0 Kudos
Message 8 of 11
(4,189 Views)

Hi all,

 

Thanks for the Very Good Reply .

 

this kind of Application Deisgn . can be Done using C# so Easily ..

 

But .

 

Can Anybody give some example ?

 

 

0 Kudos
Message 9 of 11
(4,168 Views)

How about GOOP .

 

http://sine.ni.com/nips/cds/view/p/lang/en/nid/209038

 

is it possible to do these kind of application ?

0 Kudos
Message 10 of 11
(4,161 Views)