Loading…
Loading…
Method Name: Conversion_Table_Size
Method ID: 0x4108
Method Label: Volume/Mass Table
Method Help: The number of value pairs for conversion needs to be specified and the values have to be entered here.
- {
- long ids[2];
- long l_tempd;
- long l_temp_temp;
- int n;
- int l_Table_index;
- int l_number_of_entries;
- int l_entries_remain;
- int l_count_read_write;
- int l_point_number;
- int l_Last_two_bytes_flag;
- int l_current_entries_read;
- int i;
- int l_flag;
- int l_p1;
- int l_p2;
- int l_toExit;
- int l_Edit_point_number;
- int l_local_validity;
- float lf_volume_conversion_Factor;
- float lf_length_conversion_Factor;
- float lf_level[50];
- float lf_volume[50];
- float lf_Olevel;
- float lf_Ovol;
- float f_outl2;
- float f_outv2;
- char status[3];
- l_current_entries_read = 0;
- l_count_read_write = 0;
- l_Table_index = 0;
- l_Last_two_bytes_flag = 0;
- l_flag = 0;
- _iassign(16569,00);
- _iassign(16592,0x075C);
- PUT_MESSAGE(literal_string(653));
- _set_device_status(0xFF,0);
- _set_xmtr_device_status(0xFF,0);
- _set_resp_code(32,1);
- send_command_trans(142,0);
- if (status[0])
- {
- display_response_status(142,status[0]);
- process_abort();
- }
- l_number_of_entries = _ivar_value(16467);
- l_entries_remain = l_number_of_entries;
- while (l_entries_remain > 0)
- {
- _iassign(16570,l_count_read_write + 1);
- if (l_entries_remain > 7 + l_flag)
- {
- send_command_trans(142,9);
- l_entries_remain = l_entries_remain - 7 - l_flag;
- l_flag = 1;
- l_Last_two_bytes_flag = 1;
- l_current_entries_read = 7;
- }
- else
- {
- send_command_trans(142,l_entries_remain + (1 - l_flag));
- l_current_entries_read = l_entries_remain;
- l_entries_remain = 0;
- if (l_flag == 1)
- l_current_entries_read--;
- }
- l_count_read_write = l_count_read_write + 1;
- if (l_count_read_write > 1)
- {
- l_tempd = _ivar_value(16573);
- l_temp_temp = _ivar_value(resolve_record_ref(resolve_array_ref(16660,l_Table_index),16661));
- l_tempd += l_temp_temp;
- _iassign(resolve_record_ref(resolve_array_ref(16660,l_Table_index),16661),l_tempd);
- l_Table_index = l_Table_index + 1;
- }
Please login for more