Author Topic: Decimal on number displayer, SevenSegment2 and Odometer  (Read 1240 times)

halosome

  • Newbie
  • *
  • Posts: 31
    • View Profile
Decimal on number displayer, SevenSegment2 and Odometer
« on: September 27, 2019, 08:00:30 PM »
My PLC use integer for float (x10), for example 123 means 12.3

I tried to manipulate SevenSegment2 and Odometer and they seem to be unable to display 12.3; The digitalPanelMeter can show 12.3 by setting decimalPosition to 1.

Anything I have missed? Or is there any around way?

Thanks

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Decimal on number displayer, SevenSegment2 and Odometer
« Reply #1 on: September 27, 2019, 09:45:50 PM »
On the Odometer after entering a PLC address in PLCAddressValue, you expand it down to set ScaleFactor to 0.1

halosome

  • Newbie
  • *
  • Posts: 31
    • View Profile
Re: Decimal on number displayer, SevenSegment2 and Odometer
« Reply #2 on: September 28, 2019, 12:50:16 PM »
Thanks it works!

There is another question, is it possible if i click the MomentaryButton, and it change a bit in an integer of a PLC address? Some thing like a PLC address to be 40001:10?


Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Decimal on number displayer, SevenSegment2 and Odometer
« Reply #3 on: September 28, 2019, 12:53:35 PM »
In Modbus your device must support function code 22 (bit mask write)

halosome

  • Newbie
  • *
  • Posts: 31
    • View Profile
Re: Decimal on number displayer, SevenSegment2 and Odometer
« Reply #4 on: September 28, 2019, 01:51:43 PM »
It's Productivity P2000 PLC. I am not sure if it support bit mask write. But if it supports, how can AHMI run code 22? I checked but don't see any method under ModbusTCPCom related to code numbers.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Decimal on number displayer, SevenSegment2 and Odometer
« Reply #5 on: September 29, 2019, 07:28:05 AM »
I am not sure if it support bit mask write. But if it supports, how can AHMI run code 22?
Whenever the driver is told to write a single bit within a word (e.g. 40001.0), it uses function code 22.