LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

auto tune

Solved!
Go to solution

I been running the PID auto tune wizard in lab windows cvi and can't seem to find how to determine if the operator canceled the operation. Is there anyway to determine this? I would appreciate any help!

 

 

Thanks

0 Kudos
Message 1 of 5
(3,664 Views)

Hi cjp1,

 

I'm a little confused on what you would like to happen if the Auto Tune Wizard is canceled.  Would you like there to be a pop-up message saying it was canceled, or perhaps have it create a log file so that you can look at it later?  You can easily modify the callback to the cancel button on the wizard so that it has whatever functionality you would like.

 

 

Regards,

Hassan Atassi
Senior Group Manager, Digital Support
0 Kudos
Message 2 of 5
(3,632 Views)

I don't see how to get at the cancel button callback function.

 

I start the wizard using

PidAutotuneShowDialog (pidHandle);

 

 

 

0 Kudos
Message 3 of 5
(3,620 Views)
Solution
Accepted by topic author cjp1

Hi cjp1,

 

After looking at the code for the wizard, you are correct and there is no callback function for the cancel button.  However, there is a workaround solution, although it is somewhat  of a hack.  Essentially, you will have to get the active panel, which would be the Autotune wizard panel, and then loop through all the controls to find the cancel button.  You can then create a function for when that button is clicked.  Attached is a small example that creates a pop-up window asking "Do you really want to cancel?" when the cancel button is hit.  In order to use the example, load the attached .c file into your project and be sure to #include the header file at the top of your main source fle.  Then call the command  HookDialogCancelButton, passing it your panel handle, directly after the line where you are displaying the autotune dialog box. For example:

 

 

HookDialogCancelButton(gPanelHandle);

 

 

 You can modify the CancelButtonCB callback on the attached .c file to have whatever functionality you desire. 

Regards,

Hassan Atassi
Senior Group Manager, Digital Support
Download All
0 Kudos
Message 4 of 5
(3,576 Views)
0 Kudos
Message 5 of 5
(3,333 Views)