Method Name: methodSetupWizard
Method ID: 0x4007
Method Label: Setup Wizard
Method Help: The setup wizard will guide you through basic steps to setup the positioner on an actuator. You may skip this wizard if the valve and positioner have been factory configured and calibrated. Always isolate the valve from the process. The wizard allows setting Air Action. The valve move full open and full closed. You will be prompted if mode must be changed. The steps are in the following order: 1. Set Air action to Air to Open or Air to Close; 2. Run Find Stops, to set 0% to the valve closed position and to set 100% to full opened position. 3. Run Auto Tune to determine best dynamic parameters for position control. 4. Reset Basic Configuration and Calibration to Factory Defaults.
- {
- char nbr;
- char prevMode;
- char status[3];
- char tmpFlags;
- int result;
- long ids[2];
- float fMin, fMax;
- send(249, status);
- if( status[0] != 0 ) { display_response_status(249, status[0]); DELAY(3,"|en|Procedure aborted \nTry Again."); process_abort();; };
- if( (_ivar_value(16385) != 0) )
- {
- ACKNOWLEDGE("|en|This mode is not appropriate for the Setup Wizard. Click OK to change mode or Abort to exit Setup Wizard.");
- _add_abort_method(16390);
- _iassign(16684,(0));
- send(135, status);
- if( status[0] != 0 ) { display_response_status(135, status[0]); DELAY(3,"|en|Procedure aborted \nTry Again."); process_abort();; };
- nbr=0;
- do
- {
- nbr += 1; if( nbr == 10 ) { DELAY(3,"|en|Procedure aborted \nTry Again."); process_abort();; };
- send(249, status);
- } while( _ivar_value(16385) != 0 );
- }
- send(210, status);
- result=SELECT_FROM_LIST("|en|Air Action Configuration:",
- "|en|Skip This Task; Select Air Action");
- if( result == 1 )
- {
- _get_dev_var_value(("|en|Select Air Action"),0,16414);
- ACKNOWLEDGE("|en|Apply new changes to the device? Press:\n OK for YES\n ABORT for NO" );;
- PUT_MESSAGE("|en|Please Wait ...");
- send(165, status);
- if( status[0] != 0 ) { display_response_status(165, status[0]); DELAY(3,"|en|Procedure aborted \nTry Again."); process_abort();; };
- do { send(251, status); } while( status[0] == 0x20 );;
- send(210, status);
- }
- result=SELECT_FROM_LIST("|en|Find Valve Stops:",
- "|en|Skip This Task;Run Find Stops");
- if( result == 1 )
- {
- send(249, status);
- if( status[0] != 0 ) { display_response_status(249, status[0]); DELAY(3,"|en|Procedure aborted \nTry Again."); process_abort();; };
- if (_ivar_value(16681) == 128)
- {
- ACKNOWLEDGE("|en|Perform Find Stops is not allowed when device is in marginal power.");
- return;
- }
- ACKNOWLEDGE("|en|WARNING. This procedure will MOVE the valve. This will result in LOSS of process CONTROL. DO YOU WISH TO CONTINUE?");