Loading…
Loading…
Method Name: setup_wizard_method
Method ID: 0x414D
Method Label: Basic Setup
Method Help: Basic Setup - Set up the main parameters.
- {
- char status[3];
- int duty;
- int select;
- int ival;
- int switch1;
- int rel_select;
- int op_select;
- int len;
- float fval1;
- float fval2;
- _set_device_status(0xFF,0);
- _set_xmtr_device_status(0xFF,0);
- _set_all_resp_code(0);
- SET_NUMBER_OF_RETRIES(2);
- len = 60;
- ACKNOWLEDGE(literal_string(640));
- _add_abort_method(4118);
- while (1)
- {
- ival = _ivar_value(16431);
- if (ival == 53)
- op_select = SELECT_FROM_LIST(literal_string(660),literal_string(661));
- else
- {
- op_select = SELECT_FROM_LIST(literal_string(660),literal_string(662));
- if (op_select == 1)
- op_select = 2;
- }
- if (op_select == 0)
- {
- switch1 = _ivar_value(16429);
- duty = SELECT_FROM_LIST(literal_string(663),literal_string(664));
- if (duty == 0)
- {
- _iassign(16430,1);
- send(151,status);
- if (status[0])
- {
- display_response_status(151,status[0]);
- }
- if (switch1 == 0)
- {
- select = SELECT_FROM_LIST(literal_string(665),literal_string(666));
- if (select == 0)
- ival = 45;
- if (select == 1)
- ival = 48;
- if (select == 2)
- ival = 49;
- }
- else
- {
- select = SELECT_FROM_LIST(literal_string(665),literal_string(667));
- if (select == 0)
- ival = 44;
- if (select == 1)
- ival = 47;
- }
- _iassign(16388,ival);
- send(44,status);
- if (status[0])
- {
- display_response_status(44,status[0]);
- }
- _get_dev_var_value(literal_string(668),0,16428);
- send(150,status);
- if (status[0])
- {
- display_response_status(150,status[0]);
- }
- if (ival == 48 || ival == 49)
- {
- if (ival == 48)
- _fassign(16457,100);
- if (ival == 49)
- _fassign(16457,1000);
- DELAY_TIME(1);
- send(152,status);
- if (status[0])
- {
- display_response_status(152,status[0]);
- }
- }
- if (ival == 47 && switch1 == 1)
- {
- _fassign(16457,12);
- DELAY_TIME(1);
- send(152,status);
- if (status[0])
- {
- display_response_status(152,status[0]);
- }
- }
- if (ival == 44 && switch1 == 2)
- {
- _fassign(16457,0.83333333);
- DELAY_TIME(1);
- send(152,status);
- if (status[0])
- {
- display_response_status(152,status[0]);
- }
- }
- _get_dev_var_value(literal_string(669),0,16395);
- send(35,status);
- if (status[0])
- {
- display_response_status(35,status[0]);
- }
Please login for more