Loading…
Loading…
Method Name: Output2SetupMethod
Method ID: 0x420F
Method Label: Output 2 Setup
Method Help: This method is used to setup or configure output 2.
- {
- char acStatus[3];
- char disp_string1[60];
- int wChoice;
- int wRetry;
- int wWait;
- int slen1;
- long Varid[1];
- slen1 = 60;
- _set_all_resp_code(0);
- _set_xmtr_all_resp_code(0);
- _set_device_status(0xFF,0);
- _set_xmtr_device_status(0xFF,0);
- _get_dictionary_string(19726337,(disp_string1),(slen1 ));
- ACKNOWLEDGE( disp_string1 );
- _add_abort_method(4118);
- wRetry = 0;
- wWait = 0;
- do
- {
- iOneLowUnsignedIntegerOutputIndexSC200 = 44;
- if( wWait == 0 )
- {
- wChoice = SELECT_FROM_LIST("|en|Select output function.","|en|Linear;PID;Logarithmic;Bilinear" );
- eType2 = wChoice;
- }
- send( 185, acStatus );
- if( acStatus[0] == 35 || acStatus[0] == 36 )
- {
- display_response_status( 185, acStatus[0] );
- _get_dictionary_string(19726342,(disp_string1),(slen1 ));
- DELAY( 2, disp_string1 );
- process_abort();
- }
- if( acStatus[0] == 33 || acStatus[0] == 34 )
- {
- display_response_status( 185, acStatus[0] );
- wWait++;
- }
- else wWait = 0;
- } while ( wWait != 0 );
- send( 187, acStatus );
- switch( wChoice )
- {
- case 0:
- do
- {
- iOneLowFloatOutputIndexSC200 = 48;
- if( wWait == 0 )
- {
- _get_dev_var_value(("|en|Input lower range value."),0,16621);
- }
- send( 184, acStatus );
- if( acStatus[0] == 35 || acStatus[0] == 36 )
- {
- display_response_status( 184, acStatus[0] );
- _get_dictionary_string(19726342,(disp_string1),(slen1 ));
- DELAY( 2, disp_string1 );
- process_abort();
- }
- if( acStatus[0] == 33 || acStatus[0] == 34 )
- {
- display_response_status( 184, acStatus[0] );
- wRetry++;
- }
- else if( acStatus[0] == 3 || acStatus[0] == 4 )
- {
- display_response_status( 184, acStatus[0] );
- wRetry++;
- }
- else wRetry = wWait = 0;
- } while ( wRetry != 0 || wWait != 0 );
- send( 187, acStatus );
- do
- {
- iOneLowFloatOutputIndexSC200 = 49;
- if( wWait == 0 )
- {
- _get_dev_var_value(("|en|Input upper range value."),0,16624);
- }
- send( 184, acStatus );
- if( acStatus[0] == 35 || acStatus[0] == 36 )
- {
- display_response_status( 184, acStatus[0] );
- _get_dictionary_string(19726342,(disp_string1),(slen1 ));
- DELAY( 2, disp_string1 );
- process_abort();
- }
- if( acStatus[0] == 33 || acStatus[0] == 34 )
- {
- display_response_status( 184, acStatus[0] );
- wRetry++;
- }
- else if( acStatus[0] == 3 || acStatus[0] == 4 )
- {
- display_response_status( 184, acStatus[0] );
- wRetry++;
- }
- else wRetry = wWait = 0;
- } while ( wRetry != 0 || wWait != 0 );
Please login for more