Hilscher Modbus TCP module

I am needing some advice to point me in the right direction. I have a hilscher CAN BUS to modbus adapter, the manufacture of the machine has provided the device, as well as setup the modbus addressing. It is address I've not seen and I don't see a way to setup the device in Ignition to pull in the data.

That's not enough information to give you any definitive answers. It's not even clear if those are supposed to be Modbus register addresses or are just internal addresses for that device.

For starters, you could try addresses like this and see if you get any data:

  • [DeviceName]HR1
  • [DeviceName]1.HR1
  • [DeviceName]IR1
  • [DeviceName]1.IR1

or if you can use Modscan or some other Modbus utility to get a response that might be useful as well.

Looking at the manufacturer's website and manuals, it looks like you can map tags between 2 different protocols however you want. So this is either up to you, or your vendor pre-mapped them, but either way you'll need to know the Modbus registers that are used for the tags you listed. The tags you have are not Modbus registers, and if they are, you'd need to know if they're holding registers (4XXXX) or input registers (3XXXX).

So I checked out ModScan and maybe they are Input Status 1xxxxx?
I have sent another message to the vendor. I didn't think those addresses looked right, but I don't have a ton of exp. with Modbus, so I wasn't sure.
Thanks all for your replies.

HI all,

So I ckecked with the vendor, and finally got this after 20 emails back and forth.

|0.0|40001.0|Bool|Automatic Mode|1|
|0.1|40001.1|Bool|Manual Mode|1|
|0.2|40001.2|Bool|Cleaning Mode|1|
|0.3|40001.3|Bool|Standby Mode|1|
|0.4|40001.4|Bool|Emergency Stop Active|1|
|0.5|40001.5|Bool|Conveyor Release|1|
|0.6|40001.6|Bool|Reserve|1|
|0.7|40001.7|Bool|Reserve|1|
|1|40002|Byte|Reserve|8|
|2-5|40003-40006|Dword|Conveyor Speed|32|
|6-9|40007-40010|Dword|Piece Counter|32|
|10-11|40011-40012|Word|Program Number on Station A|16|
|12-19|40013-40020|Byte|Reserve|8|
|20.0|40021.0|Bool|Trigger Status Gun 1|1|
|20.1|40021.1|Bool|Trigger Status Gun 2|1|
|20.2|40021.2|Bool|Trigger Status Gun 3|1|
|20.3|40021.3|Bool|Trigger Status Gun 4|1|
|20.4|40021.4|Bool|Trigger Status Gun 5|1|
|20.5|40021.5|Bool|Trigger Status Gun 6|1|
|20.6|40021.6|Bool|Trigger Status Gun 7|1|
|20.7|40021.7|Bool|Trigger Status Gun 8|1|
|21.0|40022.0|Bool|Trigger Status Gun 9|1|
|21.1|40022.1|Bool|Trigger Status Gun 10|1|
|21.2|40022.2|Bool|Trigger Status Gun 11|1|
|21.3|40022.3|Bool|Trigger Status Gun 12|1|
|21.4|40022.4|Bool|Trigger Status Gun 13|1|
|21.5|40022.5|Bool|Trigger Status Gun 14|1|
|21.6|40022.6|Bool|Trigger Status Gun 15|1|
|21.7|40022.7|Bool|Trigger Status Gun 16|1|
|22-63|40023-40064|Byte|Reserve|8|
Any assistance on how I would process individual bits from a holding register would be appreciated.

That still makes no sense. Modbus holding registers are 16 bits. Not eight bits. A 32-bit value occupies two of them, not four of them.

While @pturmel has a point, I think the end device works with single bytes (possibly why everything of theirs maxes out at bit 7), but for your OPC Item path, for tags, they would resemble these examples:

[DeviceName]HR1.0 = Automatic Mode
[DeviceName]HR1.1 = Manual Mode
[DeviceName]HR1.2 = Cleaning Mode
[DeviceName]HR1.3 = Standby Mode

[DeviceName]HRI3 = Conveyor Speed (32-bit Integer = Registers 40003-40004)

[DeviceName]HR11 = Program Number Station A (16-bit Integer = Register 40011)

[DeviceName]HR21.0 = Trigger Status Gun 1

If you're lucky...

If you're not, they've put a single byte into one half of each register and ignored the other half of that register.

2 Likes

Yeah, that was my concern as well, but I'm hoping they didn't do that, otherwise this is gonna get messy.

HI all,

Thanks for the replies, and glad to see I'm not the only one. Kevin, can you explain the

HRI3

I still think their spreadsheet is wrong. The ModScan only shows data on the input registers, not holding registers. I will try what you have posted with using them in the 30001 input registers

Holding Register Integer

https://docs.inductiveautomation.com/display/DOC81/Modbus+Addressing

This is also what they provided

I am still confused if they are using Conveyor Speed and Piece Counter as 32 bit DWORD, why use 4 registers? Shouldn't this be two registers?

Yes, but they are clearly using four. Is it too late to fire them for incompetence?

1 Like

Can you point them at this topic and shame them into fixing it?

1 Like

I am going to, depending on what they say after they confirm all this with software engineer (that I haven't been able to just talk to)

I think they are actually using a mix of Discrete Input Registers and Input Registers.

Modscan is showing bits on only those.

Are you supposed to be able to write to any of these points?

No, this is strictly read only

This all looks to me like they're only using the first byte of each Modbus register and just ignoring the 2nd.

Not too bad for the boolean/bit data, but terrible for the multi-byte integer values.

Somebody was either lazy or didn't understand Modbus :confused:

3 Likes

If this is exactly what they are doing, and I have to get say conveyor speed,
Can I use

[DeviceName]IR3:8
[DeviceName]IR4:8
[DeviceName]IR5:8
[DeviceName]IR6:8

It's also labeled as a DWORD which i am not sure about. Double?

If all thats correct, how would I put the 4 together?