IPB

Welcome Guest ( Log In | Register )

>> VI Package Manager 3.0 Released (Download Now) <<
 
Reply to this topicStart new topic
> Refactoring of the NI 3 button dialog
Michael Aivaliot...
post Oct 13 2008, 05:28 AM
Post #1



Group Icon

Group: JKI Team
Posts: 100
Joined: 15-March 06
Member No.: 3



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


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


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.



Attached File  Three_Button_Dialog_CORE___JKI.vi ( 202.79K ) Number of downloads: 1393

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


--------------------
Thank You
Michael Aivaliotis
VIPM Developer Team
Go to the top of the page
 
+Quote Post
Michael Aivaliot...
post Oct 14 2008, 09:55 PM
Post #2



Group Icon

Group: JKI Team
Posts: 100
Joined: 15-March 06
Member No.: 3



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 smile.gif . If you've downloaded it before Oct.14,2008 (3pm) then please re-download it. The original link has been updated.


--------------------
Thank You
Michael Aivaliotis
VIPM Developer Team
Go to the top of the page
 
+Quote Post
wevanarsdale
post Oct 27 2008, 03:56 PM
Post #3





Group: Members
Posts: 1
Joined: 27-October 08
Member No.: 2,580



QUOTE(Michael Aivaliotis @ Oct 12 2008, 11:28 PM) *
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
Go to the top of the page
 
+Quote Post
Michael Aivaliot...
post Oct 28 2008, 06:44 PM
Post #4



Group Icon

Group: JKI Team
Posts: 100
Joined: 15-March 06
Member No.: 3



QUOTE(wevanarsdale @ Oct 27 2008, 08:56 AM) *
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.


--------------------
Thank You
Michael Aivaliotis
VIPM Developer Team
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

 



RSS Lo-Fi Version Time is now: 3rd September 2010 - 09:29 PM