Author Topic: Modbus/TCP with AD Productivity 1000 PLC Cant Read/Write Floats  (Read 1978 times)

bcoop

  • Newbie
  • *
  • Posts: 7
    • View Profile
Modbus/TCP with AD Productivity 1000 PLC Cant Read/Write Floats
« on: February 21, 2021, 04:08:39 PM »
I am working with a Automation Direct Productivity P1-540 PLC Trying to read / write a 32bit Float, 
16bit integers are working fine,  I have tried changing swap bytes and swap words in the Modbus TCP Driver in all combination without success. I have used a test client and was able to read the float at the plc correctly
it appears its in Little-Endian Word swap format, but can not seem to get it to work in AdvHMI.
I have downloaded AdvancedHMIv399yBeta38 and previously tried AdvancedHMIv399xR1

Any Help would be greatly appreciated,

Bob
 

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5324
    • View Profile
    • AdvancedHMI
Re: Modbus/TCP with AD Productivity 1000 PLC Cant Read/Write Floats
« Reply #1 on: February 21, 2021, 04:30:19 PM »
Are you using the address modifier such as 40001@F

bcoop

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Modbus/TCP with AD Productivity 1000 PLC Cant Read/Write Floats
« Reply #2 on: February 22, 2021, 01:37:48 PM »
Archie, thank you very much, that did it.   40001@F
can this documentation be found somewhere ?

Bob


Godra

  • Hero Member
  • *****
  • Posts: 1449
    • View Profile
Re: Modbus/TCP with AD Productivity 1000 PLC Cant Read/Write Floats
« Reply #3 on: February 22, 2021, 06:48:12 PM »
You can get info here:

   https://advancedhmi.com/documentation/index.php?title=ModbusRTUCom
   https://www.advancedhmi.com/forum/index.php?topic=765.0

When in doubt where to find something, just use the Search feature of the forum.

bcoop

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Modbus/TCP with AD Productivity 1000 PLC Cant Read/Write Floats
« Reply #4 on: February 22, 2021, 10:12:16 PM »
Thanks for the info, I have been doing some searches today, lots of info on here.
appreciate the help

bob

bcoop

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Modbus/TCP with AD Productivity 1000 PLC Cant Read/Write Floats
« Reply #5 on: February 26, 2021, 09:49:49 AM »
Same Project - Have developed a problem using Modbus/TCP driver,  all of a sudden, only bools are able to read write.  the analog valves (reals and ints) have stopped functioning,  went back to an older backup and all works fine,
any ideas would could be happening  ?

Bob

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5324
    • View Profile
    • AdvancedHMI
Re: Modbus/TCP with AD Productivity 1000 PLC Cant Read/Write Floats
« Reply #6 on: February 26, 2021, 10:03:34 AM »
Try reducing the MaxGroupReadSize property. Maybe the driver made a group that was more than the PLC is capable of.

bcoop

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Modbus/TCP with AD Productivity 1000 PLC Cant Read/Write Floats
« Reply #7 on: February 26, 2021, 10:43:38 AM »
Thanks Archie, Tried reducing it down to 5 and also tried increasing it to 30, neither made any change.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5324
    • View Profile
    • AdvancedHMI
Re: Modbus/TCP with AD Productivity 1000 PLC Cant Read/Write Floats
« Reply #8 on: February 26, 2021, 11:30:22 AM »
Is the older backup that is working in the same version of AdvancedHMI?

bcoop

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Modbus/TCP with AD Productivity 1000 PLC Cant Read/Write Floats
« Reply #9 on: February 26, 2021, 11:56:46 AM »
yes, just saved off the project yesterday before this happened,  I added  .NET  installer setup project to the solution so I could create an installer for the app.  program worked fine after this, the installer that worked too,  restarted VS this morning and this issue appeared, the complied installed app still worked but  not running inside VS I had no word data, only bools  I have tried deleting the ModbusTCP driver and reinserting it,  tried removing the installer project and a few other things without success. I'm stumped

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5324
    • View Profile
    • AdvancedHMI
Re: Modbus/TCP with AD Productivity 1000 PLC Cant Read/Write Floats
« Reply #10 on: February 26, 2021, 12:10:40 PM »
Add another BasicLabel to the form and set PLCAddressValue to an INT register such as 40001. Then run the app and see if the label shows any error message.

bcoop

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Modbus/TCP with AD Productivity 1000 PLC Cant Read/Write Floats
« Reply #11 on: February 26, 2021, 02:04:20 PM »
did that, and the basic label reads the value,
looked a little deeper and found that all values read write or read only have their "PLCAddressValue" property cleared,
where the "PLCAddressKeypad" remains set to its original value. 
not sure how this occurred,   but at least I now know how to resolve the issue.

thankyou Archie for guiding me to this,  but still not sure how all 183 analog values lost their  "PLCAddressValue" property

Bob