3000 then hww_info.data_cnt = 3000 endif duration = 0.01 starttime = hww_info.starttime + 5; call get_hww_data hww_data print "{ ""","data",""": [" for i = 0 to hww_info.data_cnt-2 do dpt = starttime + (i * duration) print "[",dpt,",",hww_data.values[i],"]," next i dpt = starttime + (i * duration) print "[",dpt,",",hww_data.values[hww_info.data_cnt-1],"]" print "]}" rem hww_data.ret_cnt will return the number of values fread from the file rem hww_data.value = X ; X is an number between 0 and 25 it is coded as following rem 0, 1, 2, 3 : Voltage Phase 1-4 rem 4, 5, 6, 7 : Current Phase 1-4 rem 8, 9,10,11 : Power Phase 1-4 rem 12,13,14,15 : Reactive Power Phase 1-4 rem 16,17,18 : Voltage Phase L1-L2; L2-L3 ; L3-L1 rem 19,20,21,22 : Time of zerro cross Voltage Phase 1-4 rem 23,24,25 : Time of zerro cross Voltage Phase L1-L2; L2-L3 ; L3-L1 rem you can calculate the Frequenz of each Voltage by the given time ?>