Loading…
Loading…
Method Name: SetupMethodRelayB
Method ID: 0x428A
Method Label: Relay B Setup
Method Help: This method is used to setup or configure relay B.
- {
- 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(1455));
- _add_abort_method(17020);
- wRetry = 0;
- wWait = 0;
- do {
- iOneLowUnsignedIntegerIndexSC200 = 108;
- if (wWait == 0)
- {
- _get_dev_var_value(literal_string(1543),0,16861);
- }
- 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(195,acStatus);
- wRetry = 0;
- wWait = 0;
- do {
- iOneLowUnsignedIntegerIndexSC200 = 143;
- if (wWait == 0)
- {
- _get_dev_var_value(literal_string(1544),0,16921);
- }
- 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(195,acStatus);
- wRetry = 0;
- wWait = 0;
- do {
- iOneLowUnsignedIntegerIndexSC200 = 107;
- if (wWait == 0)
- {
- wChoice = SELECT_FROM_LIST(literal_string(1545),literal_string(1546));
- if (wChoice > 2)
- {
- wChoice++;
- }
- eTypeRelayB = 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(194,acStatus);
- switch (wChoice)
- {
- case 0:
- do {
- iOneLowFloatIndexSC200 = 110;
- if (wWait == 0)
- {
- _get_dev_var_value(literal_string(1547),0,16794);
- }
- 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(1527));
- }
- 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(194,acStatus);
- do {
- iOneLowFloatIndexSC200 = 109;
- if (wWait == 0)
- {
- _get_dev_var_value(literal_string(1548),0,16787);
- }
- 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(194,acStatus);
- do {
- iOneLowFloatIndexSC200 = 112;
- if (wWait == 0)
- {
- _get_dev_var_value(literal_string(1549),0,16802);
- }
- 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(194,acStatus);
- do {
- iOneLowFloatIndexSC200 = 111;
- if (wWait == 0)
- {
- _get_dev_var_value(literal_string(1550),0,16798);
- }
- 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(194,acStatus);
- do {
- iOneLowUnsignedIntegerIndexSC200 = 114;
- if (wWait == 0)
- {
- _get_dev_var_value(literal_string(1551),0,16869);
- }
- 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(194,acStatus);
- do {
- iOneLowUnsignedIntegerIndexSC200 = 113;
- if (wWait == 0)
- {
- _get_dev_var_value(literal_string(1552),0,16865);
- }
- send(190,acStatus);
- if (acStatus[0] == 35 || acStatus[0] == 36)
- {
- display_response_status(190,acStatus[0]);
Please login for more