랩뷰를 시작하면, 많이 듣는 말 중에 상태 머신(State Machine)이라는 단어가 아닐까 한다.
상태 머신 - 프로그램을 한다는 것은 어떠한 일들의 집합이다.
아래 그림이 JKI State Machine 을 블록 다이어그램에 올려놓았을 때, 기본 프레임이다.
상태 머신을 짜게 되면 상태 이동을 하기 위해 숫자, enum 등을 사용하는데, JKI SM(state machine)는 글자를 이용하여 상태 변화를 만든다.
각 상태는 케이스문안에 하나씩 구현해 놓으면 된다. 그리고 이동할 다음 상태를 입력해놓으면 그에 맞춰 상태 변화가 일어나면서 프로그램을 돌아가게 된다.
유한 상태 기계는 유한한 개수의 상태를 가질 수 있는 오토마타, 즉 추상 기계라고 할 수 있다. 이러한 기계는 한 번에 오로지 하나의 상태만을 가지게 되며, 현재 상태(Current State)란 임의의 주어진 시간의 상태를 칭한다. 이러한 기계는 어떠한 사건(Event)에 의해 한 상태에서 다른 상태로 변화할 수 있으며, 이를 전이(Transition)이라 한다. 특정한 유한 오토마톤은 현재 상태로부터 가능한 전이 상태와, 이러한 전이를 유발하는 조건들의 집합으로서 정의된다. - 위키피디아
VIPM
JKI State Machine v2018.0.7.45 by JKI
Released On: Fri, 25 Jan 2019 12:17:00 -0800
Author: JKI
Copyright: Copyright (C) 2005-2018, JKI
License: BSD
Compatible LabVIEW Versions: >= 2013.
Compatible OS Versions: ALL.
Repository Name: JKI Package Network
Description:
The JKI State Machineis a template you can use for quickly creating your own LabVIEW applications. This is the very same template that is used by the JKI team, nearly every day, and is the result of years of refinement by our team of LabVIEW experts. We encourage you to post any questions or comments to the JKI Software Forums. There you will find an active community of JKI software users, as well as JKI team members.
How to use:
Find the JKI State Machine in the palettes
1) Functions >> JKI Toolkits >> JKI State Machine
Use QuickDrop to place a JKI State Machine on the block diagram
1) Press Control+Space then type "JKI"
2) choose the "JKI State Machine" option that appears
Launch the JKI State Machine Explorer by either
A) Right-click on a State String, Case Structure, or Event Structure to launch JKI SM Editor
B) Press Control+Space then Control+J when you're on the block diagram of a VI containing a JKI SM
Using the Right-click menu on the JKI SM Parts for increased productivity:
- Select an item in the tree to make that frame visible
- Click back and forward to navigate the history
- Drag and drop frames to reorganize the order
- Right-click on items in the tree-view to rename, duplicate, delete, etc.
- Right-click on a state string and choose Goto State Frame to jump to that frame of the JKI SM.
- Right click on a state string or frame and choose Find Callers to find all callers of a state
- Right-click on a bundle or unbundle by name and choose Find Data Accessors to find all accessors of the data.
Special thanks to Jim Carmody for open sourcing his CaseSelect tool as a launching off point for the JKI SM Editor.
Release Notes:
- Now includes the JKI State Machine Editor (JKI SM Explorer window and LabVIEW right-click menu integration)
- Changed While Loop Label to JKI State Machine (2018)
- New Icons and Color Scheme, designed for the future!
- Major performance improvements to Support VIs ("Parse State Queue", "Add State(s) to Queue", and "Build State String with Arguments")
- Support VIs are now configured for "Inline SubVIs into Calling VIs" and "Subroutine" priority to reduce memory footprint and execution time
- Replaced deprecated FP.Open property with FP.State
- Added new arguments to "UI: Front Panel State" (Open, Standard, Close, Closed, Hidden, Hide, Maximize, Maximized, Minimize, Minimized)
- Special thanks to @mcduff14 and @drjdpowell for their performance improvement ideas and feedback on this thread https://github.com/JKISoftware/JKI-State-Machine/pull/3
Fixes
- Fixed Issue #9 (JKI SM Explorer VI keeps running when target VI FP is closed)
- Fixed Issue #10 (Editor Plug-ins that call "Term:Data Type" (as Variant) need a Request Deallocation to avoid LV crash)
- Fixed Issue with Find Data Accessors not always working well (failing to open and consuming CPU)
- Fixed Issue (SM Editor #79) where SM Explorer window does not disappear occasionally
- Fixed Issue (SM Editor #86) Can't open JKI SM Explorer for multiple JKI SM's on same BD
- Fixed Issue (SM Editor #89) Find Callers does not work on Idle, Event Structure frame
- Fixed Issue #13 Right-click menu item 'Insert "Add State(s) to Queue"' fails
This Package depends on these other packages:
jki_rsc_toolkits_palette >= 1.1
This Package Conflicts with these other packages:
jcarmody_lib_caseselect_(quick_drop_plugin) >= 0.0
jki_lib_state_machine_core >= 0.0
jki_state_machine_editor >= 0.0
jki_state_machine_helper >= 0.0
'LabVIEW > 에드온' 카테고리의 다른 글
MODBUS 모드버스 통신, RS-485 (feat. LabVIEW, MSB624RA) (0) | 2019.12.23 |
---|---|
SQLite Library (0) | 2019.12.17 |