= hww_info.starttime) and (st_hww_start < hww_info.stoptime) then hww_data.vorlauf = ( st_hww_start - hww_info.starttime) / duration else hww_data.vorlauf = 0 endif call get_hww_data hww_data if hww_data.error == 0 then starttime = hww_info.starttime + duration * hww_data.vorlauf; print "{ ""","data",""": [" for i = 0 to hww_data.ret_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_data.ret_cnt-1],"]" print "]}" else print "{ ""","data",""": [",hww_data.error," ]}" endif 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 ?>