Author Topic: Delta plc with advance hmi Addressing problem  (Read 8960 times)

oqapsking

  • Full Member
  • ***
  • Posts: 178
    • View Profile
Delta plc with advance hmi Addressing problem
« on: October 10, 2016, 12:50:39 AM »
hello
first i want u to know that am new in plc world and in vb programming

i tried to communicate with the plc throw the computer
so i started with dmt.dll the library of Delta automation
i built my first project it worked fine with serial com and local network
so i still want to build one that remotely control the plc or at least monitors it
the problem is in dmt library i can chose the ip but not the port
thats what made me look for anther modbus and brought me here

now i am trying to use advance hmi

i couldn't read or write any thing to or from the plc
the driver am using is ModbusTCPCom
the plc is delta dvp12se
i think my problem is with modbus addressing
for example i wanna read the address (d502)
when i write it in the address value  it says on the digital panel text ( invalid address ...)
so any one can tell me how to solve it
or show me how to transfer the address to the write way
with thanks
Issa Hirbawi

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Delta plc with advance hmi Addressing problem
« Reply #1 on: October 10, 2016, 03:47:35 AM »
The Modbus driver requires the use of Modbus style addresses, such as 40001 to read an integer. If your PLC supports Modbus, the documentation should give a cross reference from native addresses to Modbus addresses.

This post may also be of some help:

http://advancedhmi.com/forum/index.php?topic=765.msg4846#msg4846

oqapsking

  • Full Member
  • ***
  • Posts: 178
    • View Profile
Re: Delta plc with advance hmi Addressing problem
« Reply #2 on: October 10, 2016, 04:50:01 AM »
thanks for ur replay

the thing is i didn't understand it
to be exact is still don`t know exactly what to write the address value


these in the attachment r the protocol for delta communication
 
could u tell me what the register "D500" will be; i mean the value that i should put in address value to read it?

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Delta plc with advance hmi Addressing problem
« Reply #3 on: October 10, 2016, 08:47:39 AM »
Try 44596 or 44597

It appears the table only shows the offset and in hex. To read words, the address range is 4xxxxx

I found the offset for 500, then converted to decimal and added the 4 in front of it.

Also some devices start with an offset of 1, so you may have to add 1

oqapsking

  • Full Member
  • ***
  • Posts: 178
    • View Profile
Re: Delta plc with advance hmi Addressing problem
« Reply #4 on: October 10, 2016, 10:38:41 AM »
man it worked
u r the best

could u show me the steps how to do it ?
how did u know that the read is 4
and what is the stips to confert the address from d500 to 4597

with thanks

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Delta plc with advance hmi Addressing problem
« Reply #5 on: October 10, 2016, 04:41:49 PM »
The common Modbus addressing uses the 4xxxx range of addresses to read 16 bit integers or use function code 3.

In the first table addresses D256-D511 correspond to Modbus offset 0x1100-0x1155 (4352-4607 decimal)

D256 = 4352
D257 = 4353
D258 = 4354
.
.
D500 = 4596


Now take the offset value and precede it with a 4 to indicate it is a Modbus 16 bit register.

That gives D500 = 44596

oqapsking

  • Full Member
  • ***
  • Posts: 178
    • View Profile
Re: Delta plc with advance hmi Addressing problem
« Reply #6 on: October 10, 2016, 05:20:56 PM »
thanks man

now i understand it

i started now to build my project


and thanks a lot u have been very helpful
« Last Edit: October 10, 2016, 06:09:35 PM by oqapsking »

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Delta plc with advance hmi Addressing problem
« Reply #7 on: October 10, 2016, 06:05:36 PM »
The 4 only works for 16 bit integers. Bits will start with a 0 or 1

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Delta plc with advance hmi Addressing problem
« Reply #8 on: October 10, 2016, 06:13:57 PM »
oqapsking,

You should also check the posts in the link Archie provided previously (start from the very first post which shows common Modbus addressing and also check the video link and any pictures posted).

If you do a bit more research on Modbus, you might see something like this:

Coil Outputs - address range 0xxxxx (Boolean values or bit registers) should have Read/Write access
Digital Inputs - address range 1xxxxx (Boolean values or bit registers) should have Read Only access
Analog Inputs - address range 3xxxxx (Word values or 16-bit registers) should have Read Only access
Holding Registers - address range 4xxxxx (Word values or 16-bit registers) should have Read/Write access

Archie used decimal values since that appears to be the address format that AHMI controls accept.

For conversion of hex values to decimal, you can use Windows built-in calculator set to Programmer Mode (see the attached picture) or one of the online converters such as this: http://www.binaryhexconverter.com/hex-to-decimal-converter
« Last Edit: October 25, 2016, 05:35:47 PM by Godra »

oqapsking

  • Full Member
  • ***
  • Posts: 178
    • View Profile
Re: Delta plc with advance hmi Addressing problem
« Reply #9 on: October 10, 2016, 06:25:33 PM »
thank u man
u r the best

am really grateful

oqapsking

  • Full Member
  • ***
  • Posts: 178
    • View Profile
Re: Delta plc with advance hmi Addressing problem
« Reply #10 on: October 10, 2016, 06:27:33 PM »
oqapsking,

You should also check the posts in the link Archie provided previously (start from the very first post which shows common Modbus addressing and also check the video link and any pictures posted).

If you do a bit more research on Modbus, you might see something like this:

Coil Outputs - address range 0xxxxx (Boolean values or bit registers)
Digital Inputs - address range 1xxxxx (Boolean values or bit registers)
Analog Inputs - address range 3xxxxx (Word values or 16-bit registers)
Holding Registers - address range 4xxxxx (Word values or 16-bit registers)

Archie used decimal values since that appears to be the address format that AHMI controls accept.

For conversion of hex values to decimal, you can use online converters such as this: http://www.binaryhexconverter.com/hex-to-decimal-converter

thanks godra
it worked as this

0xxxx to  toggle the coil
1xxxx to read the coil value