Calculating the correct Modbus address for DASMBTCP driver

ryangriggs

Lifetime Supporting Member
Join Date
Jun 2016
Location
USA
Posts
198
PLC: AutomationDirect DL06
Modbus driver: Wonderware InTouch DASMBTCP

Goal: read the C100 discrete value from the DL06.

I have successfully calculated "V" addresses and am able to read both 32-bit integers and floating point values using 400000 addressing.

However, I'm having trouble figuring out the DASMBTCP addressing scheme for discrete values.

According to the DL06 modbus docs, the C 'control relays' are considered Modbus data type "coil". Also, this doc says to "convert the address from octal to decimal, then add start of range, then add data type".

So:
100 octal = 64 decimal
Start of "C" range = 3072 decimal
64 + 3072 = 3136 decimal

What does it mean to "add the data type"? I can't find a table of "data type values" to add to the 3136 value. Or, are they referring to the 10000/30000/40000/100000/300000/400000 modbus addressing schemes for coils/inputs/holding registers?

I've tried using the address 103136 - always returns '0'.

I've tried using 3136 DO (per Wonderware docs, the DO = direct output, or coils). Always returns 'false'.

I've tried using the direct register address: 64 - always returns false.

What am I missing here?

Thanks for any pointers.
 
I don't have experience with this hardware but technically, Modbus coil addresses start with 0. Have you tried using "03136"? If the wonderware is strict, that is different than 3136.

Does the wonderware software tell you what Modbus function codes it is using or give you any error messages?
 
Thanks @ndzied1, you were exactly correct: DASMBTCP expects a leading ZERO in order to interpret the value as a Coil.

However, I discovered that you must add 1 to the address offset:

C100 = 64 decimal plus the 'C' memory starting address of 3072 = 3136, but you must add another +1 to reach the correct address.

Apparently Modbus is 1-based while the PLC's 'C' memory locations are indexed starting with zero.

Thank you for helping me solve this!

Best,
Ryan
 
No Prob. The 0 vs. 1 offset is always an issue as well and when you get to 32 bit values and floats it can get even more fun figuring out high byte/ low byte...

Glad it worked out for you!
 

Similar Topics

This application has a motor with encoder feedback that drives a linear actuator that moves in/out, and is at roughly 45 degs from horiz. As the...
Replies
19
Views
1,352
I need to keep a running pass/fail yield of the previous 5,000 parts produced. I have used this formula before to calculate average: AvgValue =...
Replies
6
Views
2,139
Does anyone know how to calculate the savings from now needing to run an air compressor all day? Basically I have a design that replaced 6 * 1"...
Replies
26
Views
4,803
I would like to refer to this document of which I used some data ...
Replies
1
Views
1,466
Seems like this should be a simple thing but I’m struggling with it. The basis is that I am trying to detect if a linear assembly is stopped or...
Replies
6
Views
3,075
Back
Top Bottom