AdvancedHMI Software
General Category => Support Questions => Topic started by: honeydrop on August 07, 2017, 01:13:34 AM
-
Hi Archie,
i have problem with ScaleFactor property in ChartBySampling, it outputs wrong result with floating number scale factor, looks like it doesn't read the decimal point. That problem doesn't occure with integer number scale factor.
I'm using Omron PLC with SerialFINS driver.
example:
1) input=0-600
scale factor=0,5
output=5 (constant)
2) input=0-600
scale factor=0,1
output=1 (constant)
3) input=0-600
scale factor=1,5
output=0-600 (the result equal with scale factor=1)
4) input=0-600
scale factor=2,5
output=0-1200 (the result equal with scale factor=2)
5) input=0-600
scale factor=2,9
output=0-1200 (the result equal with scale factor=2)
-
What version of AdvancedHMI are you using? I seem to remember this being fixed, but I can't find it in the release notes. I did a quick test using version 3.99x with the Modbus driver and it appears to be working correctly.
-
Did you try decimal point?
-
Did you try decimal point?
Good catch... that is what I was trying to recall that was needed to fix the problem. Version 3.99x was changed to use Globalization list separators, which prior version was causing problems when the "," was used to separate different values.
-
What version of AdvancedHMI are you using? I seem to remember this being fixed, but I can't find it in the release notes. I did a quick test using version 3.99x with the Modbus driver and it appears to be working correctly.
I'm using version 3.99x.
I tried decimal point but it gave error (in attachment).
I tried scale factor=1,5 in BasicLabel and it worked (600x1,5=900).
Scale factor=1,5 in ChartBySampling gave wrong result (600x1,5=600).
-
The problem seems to be in anything that uses the PLCAddressItem, such as the AnalogValueDisplay. Try adding an AnalogValueDisplay to the form and set one of the addresses to verify if I am correct in my thinking.
-
The problem seems to be in anything that uses the PLCAddressItem, such as the AnalogValueDisplay. Try adding an AnalogValueDisplay to the form and set one of the addresses to verify if I am correct in my thinking.
you were right, i tried with AnalogValueDisplay and set the parameters, it still gave wrong result. I guess there is a conflict between comma (,) used to separate each parameter and comma (,) used in decimal number.
For AnalogValueDisplay, the format of PLCAddressValue: D0,1,b,a,1,5,0 (in attachment)
D0 : PLCAddress
1 : NumberOfElements
b : Name
a : Description
1,5 : ScaleFactor
0 : ScaleOffset
As you can see the number 1,5 is read as 1 instead of 1,5 because it assumes the comma (,) is the parameter separator.
-
Try this diver Patch 1 for version 3.99x:
https://sourceforge.net/projects/advancedhmi/files/advancedhmi/3.5/Patches
- Open your solution in Visual Studio
- In Solution Explorer expand down the AdvancedHMIDrivers project
- Right the Support folder and select Add Existing
- Browse to and select the file you downloaded and extracted
Make sure it asks you to replace the file
- Rebuild the solution
-
After doing some trials and errors, finally i get it worked.
1) I still used the original AHMI version 3.99x (no patch applied)
2) I changed the Number Format in Control Panel->Region->Additional Settings...
in Numbers Tab, i chose point (.) for Decimal symbol and comma (,) for List separator. AHMI's project will automatically uses that format.
3) Reopened the project, build, and nicely done :)
Thank you Archie for your help and support.