Jump to content

Refactoring of the NI 3 button dialog


Michael Aivaliotis

Recommended Posts

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:

3buttonbefore.png

Here is a screenshot showing how the VI looked after applying the JKI State Machine template:

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.

 

jki-state-machine-button.png

 

Three_Button_Dialog_CORE___JKI.vi

The original VI is located at: \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

Link to comment
Share on other sites

  • 2 weeks later...
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

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.