Author Topic: Can't get basic label to put decimal in the right place.  (Read 2591 times)

MrOverCast

  • Newbie
  • *
  • Posts: 31
    • View Profile
Can't get basic label to put decimal in the right place.
« on: December 07, 2024, 05:34:25 PM »
Hi guys

im having this problem with the basic label where I cannot get the decimal to be in the right spot. I have a PLC reading data from a VFD via modbus RTU. Im reading the output current and the output frequency, But the basiclable is displaying 25.6 amps output current instead of 2.5 amps. Ive tried messing with the ValueScaleFactor and the NumericFormate and I couldn't get the decimal to go in front of the 2. Im at a lost right not

anyone have any ideas?

Productivity 2000 PLC
EV50 series 3 hp 220 V SIngle phase to 3 phase VFD

Thanks 

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5341
    • View Profile
    • AdvancedHMI
Re: Can't get basic label to put decimal in the right place.
« Reply #1 on: December 07, 2024, 05:51:08 PM »
ValueScaleFactor 0.1
NumericFormat 0.0

MrOverCast

  • Newbie
  • *
  • Posts: 31
    • View Profile
Re: Can't get basic label to put decimal in the right place.
« Reply #2 on: December 07, 2024, 05:57:06 PM »
ValueScaleFactor 0.1
NumericFormat 0.0

Tried that, Didn't seem to work :-\

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5341
    • View Profile
    • AdvancedHMI
Re: Can't get basic label to put decimal in the right place.
« Reply #3 on: December 07, 2024, 07:05:24 PM »
What if you do :

ValueScaleFactor 0.01

MrOverCast

  • Newbie
  • *
  • Posts: 31
    • View Profile
Re: Can't get basic label to put decimal in the right place.
« Reply #4 on: December 07, 2024, 07:37:08 PM »
What if you do :

ValueScaleFactor 0.01

Tried that too, Even tried .0 and that didn't work, For whatever reason It absolutely refuses to to put the decimal in front of the two, I wanted to make a bar graph, you know the blue red yellow green graph but it'll look dumb with it saying 25 amps.

Edit: also changing the scale factor messes with the values that are displayed. So If i have output voltage 245, If I change the scale factor the displayed output voltage is raised to 250 now. these are just really odd issues I cannot figure out
« Last Edit: December 07, 2024, 07:47:43 PM by MrOverCast »

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5341
    • View Profile
    • AdvancedHMI
Re: Can't get basic label to put decimal in the right place.
« Reply #5 on: December 07, 2024, 08:33:10 PM »
How is the value represented in the PLC? Is it multiplied by 100? Is it a floating point number?

MrOverCast

  • Newbie
  • *
  • Posts: 31
    • View Profile
Re: Can't get basic label to put decimal in the right place.
« Reply #6 on: December 07, 2024, 08:50:05 PM »
How is the value represented in the PLC? Is it multiplied by 100? Is it a floating point number?

Its a 16 bit integer if that answers your question, Im not 100% sure if its multiplied or how I would figurethat out. Im using the productivity suite program
« Last Edit: December 07, 2024, 08:54:45 PM by MrOverCast »

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5341
    • View Profile
    • AdvancedHMI
Re: Can't get basic label to put decimal in the right place.
« Reply #7 on: December 07, 2024, 09:33:57 PM »
What value do you see in the productivity suite?

MrOverCast

  • Newbie
  • *
  • Posts: 31
    • View Profile
Re: Can't get basic label to put decimal in the right place.
« Reply #8 on: December 07, 2024, 10:09:31 PM »
What value do you see in the productivity suite?

Hopefully this photo helps. Also forgot to say I Appreciate the response.

Obviously the numbers are missing the decimal

Output_frequency 65.3
Output_Current 2.73 etc

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5341
    • View Profile
    • AdvancedHMI
Re: Can't get basic label to put decimal in the right place.
« Reply #9 on: December 07, 2024, 10:49:42 PM »
Out of curiosity, add an AnalogValueDisplay using the same Modbus address

MrOverCast

  • Newbie
  • *
  • Posts: 31
    • View Profile
Re: Can't get basic label to put decimal in the right place.
« Reply #10 on: December 08, 2024, 12:44:15 PM »
Out of curiosity, add an AnalogValueDisplay using the same Modbus address

Its exactly the same.

Godra

  • Hero Member
  • *****
  • Posts: 1456
    • View Profile
Re: Can't get basic label to put decimal in the right place.
« Reply #11 on: December 08, 2024, 02:15:58 PM »
Are you using Modbus TCP or serial driver?

Just so you don't feel stuck with this issue, there is usually a few more things you can try:

- What numbers do you get if you don't use NumericFormat and keep ValueScaleFactor at 1
- Use a copy of your program and some Modbus simulator, point your program to it and then keep changing values in the simulator to see how they reflect in your program (and even with different NumericFormat and ValueScaleFactor)

MrOverCast

  • Newbie
  • *
  • Posts: 31
    • View Profile
Re: Can't get basic label to put decimal in the right place.
« Reply #12 on: December 08, 2024, 03:46:34 PM »
Are you using Modbus TCP or serial driver?

Just so you don't feel stuck with this issue, there is usually a few more things you can try:

- What numbers do you get if you don't use NumericFormat and keep ValueScaleFactor at 1
- Use a copy of your program and some Modbus simulator, point your program to it and then keep changing values in the simulator to see how they reflect in your program (and even with different NumericFormat and ValueScaleFactor)

leaving NumericFormat blank and scale factor 1 gives me 256.0 amps. Im using modbus TCP IP and my PLC is talking to the VFD via modbus RTU. My PLC has Both Ethernet and RTU

Godra

  • Hero Member
  • *****
  • Posts: 1456
    • View Profile
Re: Can't get basic label to put decimal in the right place.
« Reply #13 on: December 08, 2024, 05:14:41 PM »
What numbers do you get if you don't use NumericFormat and change ValueScaleFactor to 0.1 and then 0.01?

400007 register should be integer value and I would expect BasicLabel to show 256 instead of 256.0 (I might be wrong about this).

Godra

  • Hero Member
  • *****
  • Posts: 1456
    • View Profile
Re: Can't get basic label to put decimal in the right place.
« Reply #14 on: December 09, 2024, 04:44:37 PM »
Since you are getting weird results all together, I am thinking that there might be some corruption on your computer or in your program or with cabling.

I could be wrong as well.