Loading…
Loading…
Method Name: SetupMethodRelayC
Method ID: 0x4212
Method Label: Relay C Setup
Method Help: This method is used to setup or configure relay C.
- {
- 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(literal_string(1595));
- _add_abort_method(16899);
- wRetry = 0;
- wWait = 0;
- do {
- iOneLowUnsignedIntegerIndexSC200 = 150;
- if (wWait == 0)
- {
- _get_dev_var_value(literal_string(1675),0,16741);
- }
- 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(197,acStatus);
- wRetry = 0;
- wWait = 0;
- do {
- iOneLowUnsignedIntegerIndexSC200 = 185;
- if (wWait == 0)
- {
- _get_dev_var_value(literal_string(1676),0,16801);
- }
- 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(197,acStatus);
- wRetry = 0;
- wWait = 0;
- do {
- iOneLowUnsignedIntegerIndexSC200 = 149;
- if (wWait == 0)
- {
- wChoice = SELECT_FROM_LIST(literal_string(1677),literal_string(1678));
- if (wChoice > 2)
- {
- wChoice++;
- }
- eTypeRelayC = 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(196,acStatus);
- switch (wChoice)
- {
- case 0:
- do {
- iOneLowFloatIndexSC200 = 152;
- if (wWait == 0)
- {
- _get_dev_var_value(literal_string(1679),0,16674);
- }
- 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,literal_string(1659));
- }
- 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(196,acStatus);
- do {
- iOneLowFloatIndexSC200 = 151;
- if (wWait == 0)
- {
- _get_dev_var_value(literal_string(1680),0,16666);
- }
- 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] == 343)
- {
- display_response_status(181884,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(196,acStatus);
- do {
- iOneLowFloatIndexSC200 = 154;
- if (wWait == 0)
- {
- _get_dev_var_value(literal_string(1681),0,16682);
- }
- 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(196,acStatus);
- do {
- iOneLowFloatIndexSC200 = 153;
- if (wWait == 0)
- {
- _get_dev_var_value(literal_string(1682),0,16678);
- }
- 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(196,acStatus);
- do {
- iOneLowUnsignedIntegerIndexSC200 = 156;
- if (wWait == 0)
- {
- _get_dev_var_value(literal_string(1683),0,16749);
- }
- 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(196,acStatus);
- do {
- iOneLowUnsignedIntegerIndexSC200 = 155;
- if (wWait == 0)
- {
- _get_dev_var_value(literal_string(1684),0,16745);
- }
- send(190,acStatus);
- if (acStatus[0] == 35 || acStatus[0] == 36)
- {
- display_response_status(190,acStatus[0]);
Please login for more