Loading…
Loading…
方法名称: Method_Read_Trend_All_LIGHT
方法ID: 0x49DD
方法标签: Read trend curv.
方法描述:
- {
- int nDataReadCount;
- int select;
- int count_retries;
- int tabnState[2];
- int nState;
- int x1;
- int nb_trend;
- int position;
- int nb_points;
- int sel_1;
- int sel_2;
- int sel_3;
- int sel_4;
- int MasterLength;
- int nTransaction;
- int reduce_points;
- long intput_tmp;
- long i;
- long varid[2];
- long nMaxBCT;
- long nBCT;
- unsigned int compareDW[29];
- unsigned int compareVal;
- long max_trend_entries;
- float max_y;
- float min_y;
- float max_y_2;
- float min_y_2;
- float max_y_3;
- float min_y_3;
- float max_y_4;
- float min_y_4;
- float flt_y;
- float max_1;
- float max_2;
- float max_3;
- float max_4;
- float min_1;
- float min_2;
- float min_3;
- float min_4;
- nb_trend = 0;
- position = 0;
- reduce_points = 0;
- x1 = 0;
- sel_1 = 0;
- sel_2 = 0;
- sel_3 = 0;
- sel_4 = 0;
- max_y = -1000000;
- min_y = 100000;
- max_y_2 = -1000000;
- min_y_2 = 100000;
- max_y_3 = -1000000;
- min_y_3 = 100000;
- max_y_4 = -1000000;
- min_y_4 = 100000;
- max_1 = 100000;
- max_2 = 100000;
- max_3 = 100000;
- max_4 = 100000;
- min_1 = 100000;
- min_2 = 100000;
- min_3 = 100000;
- min_4 = 100000;
- _set_comm_status(0x7F,1);
- _set_no_device(1);
- _set_all_resp_code(0);
- _set_device_status(0xFF,0);
- i = 0;
- send_command_trans(143,10);
- nBCT = _ivar_value(17644);
- nMaxBCT = _ivar_value(17645);
- if (nMaxBCT == 0 || nMaxBCT == 107 && nBCT == 0)
- {
- _add_abort_method(17673);
- compareDW[0] = 0x3a7d6d3d;
- compareDW[1] = 0x513e2d2d;
- compareDW[2] = 0x717a2f6a;
- compareDW[3] = 0x43755f46;
- compareDW[4] = 0x41247658;
- compareDW[5] = 0x6b3d3734;
- compareDW[6] = 0x76737076;
- compareDW[7] = 0x6137416f;
- compareDW[8] = 0x435b515d;
- compareDW[9] = 0x2b50534a;
- compareDW[10] = 0x26766a33;
- compareDW[11] = 0x626f235e;
- compareDW[12] = 0x61aa7347;
- compareDW[13] = 0x6e735477;
- compareDW[14] = 0x264c4c34;
- compareDW[15] = 0x3462787d;
- compareDW[16] = 0x3a7d6d3d;
- compareDW[17] = 0x513e2d2d;
- compareDW[18] = 0x717a2f6a;
- compareDW[19] = 0x43755f46;
- compareDW[20] = 0x41247658;
- compareDW[21] = 0x6b3d3734;
- compareDW[22] = 0x76737076;
- compareDW[23] = 0x6137416f;
- compareDW[24] = 0x435b515d;
- compareDW[25] = 0x2b50534a;
- compareDW[26] = 0x26766a33;
- _iassign(17644,110);
- send_command_trans(143,0);
- _iassign(17644,107);
- send_command_trans(143,0);
- for (i = 0; i < 25; i++)
- {
- compareVal = _ivar_value(resolve_array_ref(17672,i));
- if (compareDW[i] != compareVal)
- {
- break;
- }
- }
- remove_all_abort();
- }
- if (i == 0 && nMaxBCT != 110 || i == 25)
- {
- _iassign(17644,60);
- nTransaction = 70;
- MasterLength = 60;
- }
- else
- {
- _iassign(17644,16);
- nTransaction = 71;
- MasterLength = 16;
- }
- intput_tmp = _lvar_value(16684);
- if (intput_tmp != 33004)
- {
- nb_trend = nb_trend + 1;
- sel_1 = 1;
- save_values();
- }
- intput_tmp = _lvar_value(16686);
- if (intput_tmp != 33004)
- {
- nb_trend = nb_trend + 1;
- sel_2 = 1;
- save_values();
- }
- intput_tmp = _lvar_value(16687);
- if (intput_tmp != 33004)
- {
- nb_trend = nb_trend + 1;
- sel_3 = 1;
- save_values();
- }
- intput_tmp = _lvar_value(16688);
- if (intput_tmp != 33004)
- {
- nb_trend = nb_trend + 1;
- sel_4 = 1;
请登录以获得完整内容