JKI Discussion Forums
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Refactoring of the NI 3 button dialog

#1
User is offline   Michael Aivaliotis 

  • Group: JKI Team
  • Posts: 302
  • Joined: 15-March 06
  • Gender:Male
In this example, we show how you can refactor existing code. We have taken the 3 button dialog that ships with the base version of LabVIEW and upgraded it to use the JKI State Machine template. We have not added or changed any functionality. Also, we have not changed the way the functionality is implemented.

Here is a screenshot showing how the VI looked before the refactoring:
Attached Image: 3buttonbefore.png

Here is a screenshot showing how the VI looked after applying the JKI State Machine template:
Attached Image: 3buttonafter.png

We've attached the the refactored VI that has been written in LabVIEW 8.2. Remember that you need to have the JKI State Machine package installed in your version of LabVIEW. Click here for information on how to install the JKI State Machine.

Posted Image

Attached File  Three_Button_Dialog_CORE___JKI.vi (202.79K)
Number of downloads: 2115
The original VI is located at: <vi.lib>\Utility\error.llb\Three Button Dialog CORE.vi

Click here to watch a video that describes some of the design thought process used in the re-factoring:
Video: Refactoring the LabVIEW three button dialog
Michael Aivaliotis - VIPM Product Manager

VIPM Idea Exchange <<-- Post your VIPM Feature Requests Here
VIPM Online Documentation
JKI Product Support <<-- For urgent requests, submit a ticket
0 kudos

#2
User is offline   Michael Aivaliotis 

  • Group: JKI Team
  • Posts: 302
  • Joined: 15-March 06
  • Gender:Male
We just found a small bug in the release of this example. Thanks goes out to Darren Nattinger of National Instruments for pointing it out ;) . If you've downloaded it before Oct.14,2008 (3pm) then please re-download it. The original link has been updated.
Michael Aivaliotis - VIPM Product Manager

VIPM Idea Exchange <<-- Post your VIPM Feature Requests Here
VIPM Online Documentation
JKI Product Support <<-- For urgent requests, submit a ticket
0 kudos

#3
User is offline   wevanarsdale 

  • Group: Members
  • Posts: 1
  • Joined: 27-October 08

View PostMichael Aivaliotis, on Oct 12 2008, 11:28 PM, said:

In this example, we show how you can refactor existing code. We have taken the 3 button dialog that ships with the base version of LabVIEW and upgraded it to use the JKI State Machine template. We have not added or changed any functionality. Also, we have not changed the way the functionality is implemented...


Nice example... However, it is somewhat ironic that NI's Three Button Dialog CORE.vi appears in the hierarchy of your Three_Button_Dialog_CORE___JKI.vi.
Bill VanArsdale
0 kudos

#4
User is offline   Michael Aivaliotis 

  • Group: JKI Team
  • Posts: 302
  • Joined: 15-March 06
  • Gender:Male

View Postwevanarsdale, on Oct 27 2008, 08:56 AM, said:

Nice example... However, it is somewhat ironic that NI's Three Button Dialog CORE.vi appears in the hierarchy of your Three_Button_Dialog_CORE___JKI.vi.
Bill VanArsdale

Well yes, the reason of course is NI uses it in the General Error Handler.vi which we call in the Error Handler frame of our state machine.
Michael Aivaliotis - VIPM Product Manager

VIPM Idea Exchange <<-- Post your VIPM Feature Requests Here
VIPM Online Documentation
JKI Product Support <<-- For urgent requests, submit a ticket
0 kudos

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic