Hi,
What do you think is the best practice for setting the min/max values of counters?
Repeatedly, I have heard complaints from customers who tried to set min/max values in exponential notation (for example: 3,402823E+38 for maximum value of a single-precision floating-point) and who corrupted their varexp.dat after editing it due to the comma in the exponential notation. So generally, I do not recommend using the exponential notation. In most cases this is okay, because normally measurements do have a defined min and max value.
But this is not true for counters and meters as they can grow indefintely. What do suggest to put as maximum in that case?
In my opinion we should use:
4294967295 for 32 bits not signed
2147483647 for 32 bits signed
18446744073709551616 for 64 bits not signed
9223372036854775807 for 64 bits signed
For example the smallest value 2147483647 represents 68 years if unit is second. 4080 years if units is minute.
Armin, I am surprised about the comma. Isn't a "." character instead ","?
Otherwise I advise you create a SPR.
Nico, it is rather an issue of working with Excel than a PcVue issue.
csv-delimiters and decimal separators are culture-dependant and therefore system-specific.
For example, by default, on German Windows systems the csv-delimiter is the semicolon and the decimal separator is the comma. If you save the varexp.dat the individual fields are separated by semicolon and the full number portion of the mantissa is separated from the rest of the exponential notation by comma, which results in an extra field in the row within the varexp.dat.
REG,314,MYPROJ,EZR,E1,159,CNT_ENERGY,,,,,,,,,"Some counter","",,,,,,B,0,0,0,2,0,0,0,0,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,0,0,3.402823E+38,0,0,65535,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"","","",,,"","",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,0,0,,,0,,,NETWORK1,DEVICE_100,2,286,,"",10,1,16,0,,0,-1,-2,-2,0,"",,,,,,,,,,,,,,,,,,,,,,,,,"",,
=> Save with Excel on German system as csv:
REG;314;MYPROJ;EZR;E1;159;CNT_ENERGY;;;;;;;;;"Some counter";"";;;;;;B;0;0;0;2;0;0;0;0;0;0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0;0;3,402823E+38;0;0;65535;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"";"";"";;;"";"";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0;0;;;0;;;NETWORK1;DEVICE_100;2;286;;"";10;1;16;0;;0;-1;-2;-2;0;"";;;;;;;;;;;;;;;;;;;;;;;;;"";;
Ludo: It is not always timespans what must be counted or metered. A typical thing which usually results in very high values is for example measuring amounts of energy consumption or generation.
OK Armin I got it now.
So, I suggest you configure the maximum column in Text format therefore Excel will not use it as numeric field.
Well, that's a simple and clear answer, thanks. Bad thing about it is that the column format is not stored in the file. So the user needs to remember setting it again everytime he edits the varexp.dat.
Yes, I agree.
But (always a but!), I think we should "educate" our customers explaining that it's not really convenient to edit the Varexp. I mean it's not the good way to work.
For me, the good way is to use ALWAYS a real Excel file and export in CSV MS-DOS format.
Roughly the procedure is:
1. Create a set of variables in PcVue and generate the Varexp
2. Open it, copy the lines and paste in your Excel document.
3. Then Copy/Paste in the Excel file changing some parameters (name, description...)
4. Save As "Varexp.dat" csv(MS-DOS)
Or.... use the AA :whistle:


