Author Topic: Advanced HMI doesn't like decimals?  (Read 4528 times)

MrOverCast

  • Newbie
  • *
  • Posts: 10
    • View Profile
Advanced HMI doesn't like decimals?
« on: June 23, 2024, 02:59:46 AM »
Hey guys

I was messing around with AdvancedHMI and I made it so that it displays current draw from a VFD. I can make any number to show but when I change the programming in the PLC to current . decimal AdvancedHMI goes out of wack and displays some weird numbers. Is this just a bug or something?

Heres an example

14 AMPS

13.400 AMPS advanced HMI doesnt like this format


Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5306
    • View Profile
    • AdvancedHMI
Re: Advanced HMI doesn't like decimals?
« Reply #1 on: June 23, 2024, 04:51:36 AM »
What version are you using? Which driver? Are you using a BasicLabel?

MrOverCast

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Advanced HMI doesn't like decimals?
« Reply #2 on: June 23, 2024, 05:55:46 AM »
Guess im using the newest version of AdvancedHMI, Modbus RTU, and yes I basically use the basic label for everything. Im using it with gx developer as well as with a FX3U plc

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5306
    • View Profile
    • AdvancedHMI
Re: Advanced HMI doesn't like decimals?
« Reply #3 on: June 23, 2024, 08:44:27 AM »
Is the value in the PLC encoded as a 4 byte REAL type? If so, do you use the address modifier like 40001@F

MrOverCast

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Advanced HMI doesn't like decimals?
« Reply #4 on: June 25, 2024, 01:52:15 AM »
In the plc the value is listed as a decimal, if that was you where asking. I was using address 400014, when you said 40001@F am I putting 1@F in with 4000 the PLCaddressvalue?

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5306
    • View Profile
    • AdvancedHMI
Re: Advanced HMI doesn't like decimals?
« Reply #5 on: June 25, 2024, 04:33:56 AM »
In the plc the value is listed as a decimal, if that was you where asking. I was using address 400014, when you said 40001@F am I putting 1@F in with 4000 the PLCaddressvalue?
If it is encoded as a 4 byte real inside the PLC, 400014@F will tell the driver that. Otherwise, it is interpreted as a 2 byte integer

MrOverCast

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Advanced HMI doesn't like decimals?
« Reply #6 on: June 26, 2024, 04:25:27 PM »
In the plc the value is listed as a decimal, if that was you where asking. I was using address 400014, when you said 40001@F am I putting 1@F in with 4000 the PLCaddressvalue?
If it is encoded as a 4 byte real inside the PLC, 400014@F will tell the driver that. Otherwise, it is interpreted as a 2 byte integer

I tried to put 400014@F in the PLCaddressClick and I got an invalid error

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5306
    • View Profile
    • AdvancedHMI
Re: Advanced HMI doesn't like decimals?
« Reply #7 on: June 26, 2024, 04:49:24 PM »
PLCAddressClick only takes booleans unless you are wanting to write a fixed value to the LC upon clicking the control

MrOverCast

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Advanced HMI doesn't like decimals?
« Reply #8 on: June 26, 2024, 08:54:20 PM »
PLCAddressClick only takes booleans unless you are wanting to write a fixed value to the LC upon clicking the control

My bad I meant PLCaddressValue

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5306
    • View Profile
    • AdvancedHMI
Re: Advanced HMI doesn't like decimals?
« Reply #9 on: June 26, 2024, 09:29:08 PM »
Are you using 3.99x or 3.99y ? @F only works in 3.99y

Try F40014

MrOverCast

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Advanced HMI doesn't like decimals?
« Reply #10 on: June 26, 2024, 09:51:29 PM »
Are you using 3.99x or 3.99y ? @F only works in 3.99y

Try F40014

I went ahead and tried F40014 and I get this weird number
Im also using D21 so I changed it to F40021, Also im using 3.99X

https://imgur.com/a/gtLpdBq hopefully this image works

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5306
    • View Profile
    • AdvancedHMI
Re: Advanced HMI doesn't like decimals?
« Reply #11 on: June 27, 2024, 08:09:06 AM »
That probably means it is not encoded as a floating point in the PLC. How do you see the value in the PLC?

Godra

  • Hero Member
  • *****
  • Posts: 1443
    • View Profile
Re: Advanced HMI doesn't like decimals?
« Reply #12 on: June 27, 2024, 02:14:28 PM »
MrOverCast, you should expand your testing and include more BasicLabel controls to cover surrounding addresses as well.

With 3 labels you can have each poll separate address, like F40013 and F40014 and F40015 just to see if any label might show a correct value.
The same goes for F40021 address.

You would be reading values only, so this should not affect your VFD at any time.

Godra

  • Hero Member
  • *****
  • Posts: 1443
    • View Profile
Re: Advanced HMI doesn't like decimals?
« Reply #13 on: June 27, 2024, 02:36:43 PM »
Just to show how read values differ, here is a picture of simulated reading of decimal value 31.4 stored at F40014 address.

You could also consider enabling or disabling byte and word swap in the driver itself if all the values are continuosly weird.


MrOverCast

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Advanced HMI doesn't like decimals?
« Reply #14 on: June 28, 2024, 12:15:46 AM »
MrOverCast, you should expand your testing and include more BasicLabel controls to cover surrounding addresses as well.

With 3 labels you can have each poll separate address, like F40013 and F40014 and F40015 just to see if any label might show a correct value.
The same goes for F40021 address.

You would be reading values only, so this should not affect your VFD at any time.

"like F40013 and F40014 and F40015 just to see if any label might show a correct value."

Duh I should've thought of that, Sorry I got it to work now. But for some reason it doesnt display it as a 4 digit value like how its shown in D22 It hops around from 2.90 to 3.30 then to 3.55555 then back to 3.60

I know it seems like a really dumb and petty issue but im using this to display a current value from a VFD and I don't want it to display as single digits such as 3, 4, 5, 6, 7, etc

https://imgur.com/a/gRflHeo

Edit: enabling swap and word bytes seems to make it a constant 6 digit number. 3.55555 4.00000 etc
« Last Edit: June 28, 2024, 01:59:39 AM by MrOverCast »