AdvancedHMI Software
General Category => Support Questions => Topic started by: rmac on March 19, 2017, 10:16:47 PM
-
Any idea of how to control/change the numeric format for the collection members in the basicdatalogger2?
I'm getting the values from the PLC in floating point format with >5 decimal places, but only want to round/save them in the log file with one or two decimal places.
Thanks.
-
If this is the only BasicDataLogger2 you are using in the project, the easiest would be to modify the code to always use 2 place.
- In Solution Explorer, expand down the AdvancedHMIControls project
- Expand down the \Components folder
- Right click BasicDataLogger.vb and select View Code
- Go to line 229 and edit the code like this:
StringToWrite &= "," & CDbl(item.LastValue).ToString("0.00")
-
Thank you for your reply Archie.
I'm using two instances of Basicdatalogger2 to write/update two separate log files.
Will try your suggestion as soon as I can.
-
It does work!
Thank you again for your prompt reply.