Loading…
Loading…
方法名称: SetupMethodRelayA
方法ID: 0x4218
方法标签: Relay A Setup
方法描述: This method is used to setup or configure relay A.
- {
- char acStatus[3];
- char disp_string1[60];
- int wChoice;
- int wRetry;
- int wWait;
- int slen1;
- slen1 = 60;
- _set_all_resp_code(0);
- _set_xmtr_all_resp_code(0);
- _set_device_status(0xFF,0);
- _set_xmtr_device_status(0xFF,0);
- ACKNOWLEDGE("|en|Relay A should be removed from automatic control." );
- _add_abort_method(16907);
- wRetry = 0;
- wWait = 0;
- do
- {
- iOneLowUnsignedIntegerIndexSC200 = 66;
- if( wWait == 0 )
- {
- _get_dev_var_value(("|en|Input transfer setting."),0,16747);
- }
- send( 190, acStatus );
- if( acStatus[0] == 35 || acStatus[0] == 36 )
- {
- display_response_status( 190, 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( 190, acStatus[0] );
- wWait++;
- }
- else wWait = 0;
- } while ( wWait != 0 );
- send( 193, acStatus );
- wRetry = 0;
- wWait = 0;
- do
- {
- iOneLowUnsignedIntegerIndexSC200 = 101;
- if( wWait == 0 )
- {
- _get_dev_var_value(("|en|Input Fail Safe Mode."),0,16807);
- }
- send( 190, acStatus );
- if( acStatus[0] == 35 || acStatus[0] == 36 )
- {
- display_response_status( 190, 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( 190, acStatus[0] );
- wWait++;
- }
- else wWait = 0;
- } while ( wWait != 0 );
- send( 193, acStatus );
- wRetry = 0;
- wWait = 0;
- do
- {
- iOneLowUnsignedIntegerIndexSC200 = 65;
- if( wWait == 0 )
- {
- wChoice = SELECT_FROM_LIST("|en|Select relay function.","|en|Alarm;Feeder Control;Warning;Event Control;PWM Control;Freq Control" );
- if( wChoice > 2 ) { wChoice++; }
- eTypeRelayA = wChoice;
- }
- send( 190, acStatus );
- if( acStatus[0] == 35 || acStatus[0] == 36 )
- {
- display_response_status( 190, 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( 190, acStatus[0] );
- wWait++;
- }
- else wWait = 0;
- } while ( wWait != 0 );
- send( 192, acStatus );
- switch( wChoice )
- {
- case 0:
- do
- {
- iOneLowFloatIndexSC200 = 68;
- if( wWait == 0 )
- {
- _get_dev_var_value(("|en|Input Low Alarm Value."),0,16680);
- }
- send( 188, acStatus );
- if( acStatus[0] == 35 || acStatus[0] == 36 )
- {
- display_response_status( 188, 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( 188, acStatus[0] );
- wWait++;
- DELAY( 3,"|en|Please wait" );
- }
- else if( acStatus[0] == 3 || acStatus[0] == 4 )
- {
- display_response_status( 188, acStatus[0] );
- wRetry++;
- }
- else wRetry = wWait = 0;
- } while ( wRetry != 0 || wWait != 0 );
- send( 192, acStatus );
- do
- {
- iOneLowFloatIndexSC200 = 67;
- if( wWait == 0 )
- {
- _get_dev_var_value(("|en|Input High Alarm Value."),0,16668);
- }
- send( 188, acStatus );
- if( acStatus[0] == 35 || acStatus[0] == 36 )
- {
- display_response_status( 188, 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( 188, acStatus[0] );
- wRetry++;
- }
- else if( acStatus[0] == 3 || acStatus[0] == 4 )
- {
- display_response_status( 188, acStatus[0] );
- wRetry++;
- }
- else wRetry = wWait = 0;
- } while ( wRetry != 0 || wWait != 0 );
- send( 192, acStatus );
- do
- {
- iOneLowFloatIndexSC200 = 70;
- if( wWait == 0 )
- {
- _get_dev_var_value(("|en|Input Low Deadband Value."),0,16688);
- }
- send( 188, acStatus );
- if( acStatus[0] == 35 || acStatus[0] == 36 )
- {
- display_response_status( 188, 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( 188, acStatus[0] );
- wRetry++;
- }
- else if( acStatus[0] == 3 || acStatus[0] == 4 )
- {
- display_response_status( 188, acStatus[0] );
- wRetry++;
- }
- else wRetry = wWait = 0;
- } while ( wRetry != 0 || wWait != 0 );
- send( 192, acStatus );
- do
- {
- iOneLowFloatIndexSC200 = 69;
- if( wWait == 0 )
- {
- _get_dev_var_value(("|en|Input High Deadband Value."),0,16684);
- }
- send( 188, acStatus );
- if( acStatus[0] == 35 || acStatus[0] == 36 )
- {
- display_response_status( 188, 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( 188, acStatus[0] );
- wRetry++;
- }
- else if( acStatus[0] == 3 || acStatus[0] == 4 )
- {
- display_response_status( 188, acStatus[0] );
- wRetry++;
- }
- else wRetry = wWait = 0;
- } while ( wRetry != 0 || wWait != 0 );
- send( 192, acStatus );
- do
- {
- iOneLowUnsignedIntegerIndexSC200 = 72;
- if( wWait == 0 )
- {
- _get_dev_var_value(("|en|Input Alarm Off Delay Time in seconds (0-999)."),0,16755);
- }
- send( 190, acStatus );
- if( acStatus[0] == 35 || acStatus[0] == 36 )
- {
- display_response_status( 190, 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( 190, acStatus[0] );
- wRetry++;
- }
- else if( acStatus[0] == 3 || acStatus[0] == 4 )
- {
- display_response_status( 190, acStatus[0] );
- wRetry++;
- }
- else wRetry = wWait = 0;
- } while ( wRetry != 0 || wWait != 0 );
- send( 192, acStatus );
- do
- {
- iOneLowUnsignedIntegerIndexSC200 = 71;
- if( wWait == 0 )
- {
- _get_dev_var_value(("|en|Input Alarm On Delay Time in seconds (0-999)."),0,16751);
请登录以获得完整内容