Author Topic: Productivity 2000 Modbus bit addressing  (Read 3014 times)

Phrog30

  • Guest
Productivity 2000 Modbus bit addressing
« on: June 30, 2017, 09:07:46 PM »
I'm playing around with the Productivity 2000 from AD.  I think I have figured out everything but addressing down to the bit level in an integer.  If I have an address of 410000, which is an integer, in the PLC I can specify to the bit level, but I can't get AHMI to work.  I've tried 410000.1, 410000:1, etc.

Anyone know if the Productivity can do bit level in AHMI?  If so, I would love a little direction.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: Productivity 2000 Modbus bit addressing
« Reply #1 on: July 01, 2017, 02:11:29 AM »
Bit level within integers are parsed by the driver and not the PLC, so if you have a good integer address, then the bit addresses will work. The way I test this is with at least two BasicLabels. For example, the first I will put 40001 in both PLCAddressValue and PLCAddressKeypad. Then I will add another and set PLCAddressValue to 40001.0

That only applies to reading. If you are looking to write to a bit level this becomes a bit trickier because there is a special function code for bit write mask that very few PLCs support.
« Last Edit: July 01, 2017, 02:16:53 AM by Archie »

Phrog30

  • Guest
Re: Productivity 2000 Modbus bit addressing
« Reply #2 on: July 01, 2017, 10:14:44 AM »
Sorry, I left out some important info.  I was using a basic button.  So, I was trying to write.  I was able to read to the bit level, however AHMI is base 0 and AD looks to be base 1.  I assume this is "normal"?  So, the issue is writing to the bit level.  You mention this is tricky.  Are there steps I can try?  I would think it's possible as I can do it in the C-More.  It's not that big of a deal, but I would like to get it working if it's possible.

Thanks,
James

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: Productivity 2000 Modbus bit addressing
« Reply #3 on: July 01, 2017, 10:58:09 AM »
The AdvancedHMI driver uses the Modicon style addressing which starts with a 1, but is really offset 0. For example, 40001 translates to function code 3 with offset 0.

If the PLC doesn't support function code 0x16, then the only way to write bits within an integer is to read the integer, alter the value, then write it back and hope within the read-to-write time period the PLC (or other source) did not also change something within the integer.

Phrog30

  • Guest
Re: Productivity 2000 Modbus bit addressing
« Reply #4 on: July 02, 2017, 09:00:47 AM »
Thanks archie.

coffin_dodger

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Productivity 2000 Modbus bit addressing
« Reply #5 on: November 08, 2019, 02:45:20 PM »
The AdvancedHMI driver uses the Modicon style addressing which starts with a 1, but is really offset 0. For example, 40001 translates to function code 3 with offset 0.

If the PLC doesn't support function code 0x16, then the only way to write bits within an integer is to read the integer, alter the value, then write it back and hope within the read-to-write time period the PLC (or other source) did not also change something within the integer.

Could you please elaborate on this answer.

How would AHMI write to bit 3 in 40001 for example?

Godra

  • Hero Member
  • *****
  • Posts: 1438
    • View Profile
Re: Productivity 2000 Modbus bit addressing
« Reply #6 on: November 08, 2019, 04:52:56 PM »
As it states, if your PLC doesn't support function code 0x16 then you have to do it yourself, similar to this:

https://www.advancedhmi.com/forum/index.php?topic=2518.msg15178#msg15178