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.

Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW State Machine Module

Solved!
Go to solution

Hi,

 

Has anyone used with succes the LabVIEW State machine module to develop a cRIO application.

 

How accessible is the code generatored to modifiy by manual means the, I presuem labview code that is generatored.

 

thanks

Michael

 

0 Kudos
Message 1 of 4
(2,651 Views)

Hi Michael,

 

From your post, I wasn't sure if you simply wanted to code an embedded state machine in a cRIO application, or you wanted to use the LabVIEW Statechart Module to create a cRIO application. The good news, is both of these options are a possibility. Take a look at the following links for more information about either method.

 

Create an Embedded State Machine with CompactRIO:

http://www.ni.com/academic/students/learn-rio/state-machine/

 

Programming FPGAs with LabVIEW Statecharts:

http://www.ni.com/tutorial/6221/en/

 

Alex C.

National Instruments 

Applications Engineer

Alex C.
Applications Engineering
National Instruments
0 Kudos
Message 2 of 4
(2,591 Views)

Hi Alex,

 

thanks for your reply.

 

My question was more towards, if you use the State Machine Module,

can you take the code generated from that module and modify it if necessary.

 

Just clarify the usage of State Machine here is not only the use of case statements as a programming method but also as a flow of nodes and edges to determine the control of an application depending on say, the robots present state... ie homed or not homed

 

Michael

 

0 Kudos
Message 3 of 4
(2,575 Views)
Solution
Accepted by topic author Michael.Proctor

Hi Michael,

 

You can certainly alter the code that the LabVIEW Statechart Module generates. It looks like the module simply creates a subVI in LabVIEW that performs the same functionality as the statechart. You can open this subVI and add any additional functionality you need or debug anything that doesn't perform correctly.

 

Alex C. 

National Instruments

Applications Engineer

Alex C.
Applications Engineering
National Instruments
Message 4 of 4
(2,569 Views)