News:

  • August 17, 2026, 06:05:29 PM

Login with username, password and session length

Author Topic: Modbus address  (Read 16324 times)

DLTimmons

  • Hero Member
  • *****
  • Posts: 232
Modbus address
« on: February 14, 2018, 01:57:39 PM »
I'm working with a Emerson Drive they want a 6 digit Modbus address like 401040. I used a touch screen to talk to one of the drives and I had use 401040 as the address. If I use an offset of 1040 it is rejection it with exception code 2. Add a leading zero and designer gives me an Invalid type. Any ideals on how to send the 6 digit address?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6172
  • Yes Pinky, Do-more will control the world!
Re: Modbus address
« Reply #1 on: February 14, 2018, 03:47:25 PM »
There really is no such thing as a 6 digit address. All Modbus addresses translate to a certain function code and a 16 bit address. We just need to understand what the function code and 16  bit address is, and then we can tell you how to describe that Do-more.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

DLTimmons

  • Hero Member
  • *****
  • Posts: 232
Re: Modbus address
« Reply #2 on: February 14, 2018, 04:38:56 PM »
I'm using Function code 3. To get a Uitcor Screen to work I had to set the PLC address to 401040. What else could be giving me the exception code 2?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6172
  • Yes Pinky, Do-more will control the world!
Re: Modbus address
« Reply #3 on: February 14, 2018, 04:43:08 PM »
I'm sure the address is wrong, that's what code 2 means. But the address in the Modbus packet is only 16 bits (max of 65535) so the 401040 is definitely not being sent to the drive.

If this is Ethernet based, the best thing you could do is Wireshark the panel talking to the drive and let us look at it.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

DLTimmons

  • Hero Member
  • *****
  • Posts: 232
Re: Modbus address
« Reply #4 on: February 14, 2018, 04:53:12 PM »
It's RS485.  Seam a lot of people use there version of Modbus not the standard. Got in to that with a Prosoft card in an AB compact Logix rack, coils and register were mapped to the same block of memory.  coil 1 was bit 1 of register 1

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6172
  • Yes Pinky, Do-more will control the world!
Re: Modbus address
« Reply #5 on: February 14, 2018, 04:57:37 PM »
Do you have a spec?
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

DLTimmons

  • Hero Member
  • *****
  • Posts: 232
Re: Modbus address
« Reply #6 on: February 14, 2018, 05:21:20 PM »

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6172
  • Yes Pinky, Do-more will control the world!
Re: Modbus address
« Reply #7 on: February 14, 2018, 05:51:03 PM »
It sure looks like you should be reading 1 register using function 3 at address 1040 to read status. If you are doing that and the slave address is correct, and you are still getting code 2, I'm not sure what to say.

I would probably back up and try other stuff and see if I could get anything working.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

DLTimmons

  • Hero Member
  • *****
  • Posts: 232
Re: Modbus address
« Reply #8 on: February 14, 2018, 06:08:37 PM »
Thanks for looking. I will start tomorrow and see I can get something to work.

ADC Product Engineer

  • Hero Member
  • *****
  • Posts: 270
Re: Modbus address
« Reply #9 on: February 15, 2018, 08:31:32 AM »
it could always be the =/-1 offset thing.  Some drives are really finicky about that.  Adding and subtracting one to the address is always one of my first Modbus troubleshooting steps because too many vendors don't stick to the spec.
« Last Edit: February 15, 2018, 08:34:14 AM by ADC Product Engineer »

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6172
  • Yes Pinky, Do-more will control the world!
Re: Modbus address
« Reply #10 on: February 15, 2018, 08:34:06 AM »
it could always be the =/-1 offset thing.  Some drives are really finicky about that.

There are valid registers defined for both 1039 and 1041.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

DLTimmons

  • Hero Member
  • *****
  • Posts: 232
Re: Modbus address
« Reply #11 on: February 15, 2018, 09:27:01 AM »
because too many vendors don't stick to the spec.

I had to laugh about that! It has bit me before. I did try shifting the value by 1. I have a couple of other ideals to try.

I cant test any more till the unmanaged switches come in or IT sets up the 2 managed switches they just had to have. Seams they are conflicting with each once I connect to the shop LAN. about ever minute I lose connect to the do-mores. So I can not down load a program change to the one do-more that communicating with the drive.
This system has 4 do-more and a WinPLC. Had to keep the winPLC so the server could Communicate with the system. I have 4 other system just like this one but running just the WinPLC.
« Last Edit: February 15, 2018, 09:30:05 AM by DLTimmons »

DLTimmons

  • Hero Member
  • *****
  • Posts: 232
Re: Modbus address
« Reply #12 on: February 15, 2018, 07:45:49 PM »
Found it ::) seams the wires were crossed between the PLC and Drive. You figure that a some point I would learn to double check things like that.

ADC Product Engineer

  • Hero Member
  • *****
  • Posts: 270
Re: Modbus address
« Reply #13 on: February 16, 2018, 09:28:15 AM »
Found it ::) seams the wires were crossed between the PLC and Drive. You figure that a some point I would learn to double check things like that.

That is my second Modbus troubleshooting step.  :)