News:

  • August 15, 2026, 10:31:31 AM

Login with username, password and session length

Author Topic: ATV320 Modbus TCP  (Read 18809 times)

MarkTTU

  • Hero Member
  • *****
  • Posts: 293
    • SamJackson.com
ATV320 Modbus TCP
« on: April 24, 2023, 07:09:15 PM »
Anyone had any luck talking to a Schneider VFD via Modbus TCP? Specifically I'm trying to talk to a ATV320. I know the Ethernet card in the VFD works because I can connect to it via Schneider's SoMove PC software, but I just get exception code 2 any time I try to read from it using the BRX.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3843
    • Host Engineering
Re: ATV320 Modbus TCP
« Reply #1 on: April 25, 2023, 09:27:54 AM »
The Modbus Address is invalid, so...

there's the old "OBOB" off-by-one-bug for Modbus - where the address on the wire is the Application Layer Address's OFFSET-1, so 40001 offset on the wire is hex 0x0000 (decimal 0).  So you have 2602, so is the actual Modbus Application Layer address 42602 (so the request is sending 0x0A29 or 2601 decimal), or do you need to add 1 (or subract 1) to D101?

MarkTTU

  • Hero Member
  • *****
  • Posts: 293
    • SamJackson.com
Re: ATV320 Modbus TCP
« Reply #2 on: April 25, 2023, 11:27:26 AM »
Tried adding 1 and subtracting 1 and neither worked. Also there should be data in 9601 and 9603 as well according to the ATV320 register table I have.

Maybe related, but the ATV doesn't support reading input registers (Modbus command 4) so I'm reading holding registers (Modbus command 3).

MarkTTU

  • Hero Member
  • *****
  • Posts: 293
    • SamJackson.com
Re: ATV320 Modbus TCP
« Reply #3 on: April 25, 2023, 11:32:50 AM »
Going to also post the ATC320 Modbus Excel sheet I have just in case it's helpful to anyone now or in the future. I had a heck of a time finding it. ATV320 Also, the Modbus manual is at the link below.

https://www.dropbox.com/s/9g27ejsvcg2mvb9/ATV320_Modbus_TCP_EtherNet_IP_Manual_NVE41313_02.pdf?dl=0

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3843
    • Host Engineering
Re: ATV320 Modbus TCP
« Reply #4 on: April 25, 2023, 11:41:21 AM »
What page shows the register you are wanting to read?  I found a table in the manual you posted that has Modbus Addresses starting with a "6", but not a "4".  It should have something like "42602" for a Modbus Address corresponding to the specific parameter you are trying to read.

RBPLC

  • Hero Member
  • *****
  • Posts: 586
Re: ATV320 Modbus TCP
« Reply #5 on: April 25, 2023, 12:04:29 PM »
Don't those drives have a setting that corresponds to the UnitID in the BRX? I seem to remember that this might have been an issue.

MarkTTU

  • Hero Member
  • *****
  • Posts: 293
    • SamJackson.com
Re: ATV320 Modbus TCP
« Reply #6 on: April 25, 2023, 12:11:55 PM »
I was trying to start with the basics... motor voltage (9601), frequency (9602), current (9603), and speed (9604) all from the Excel file.

I have the ID set to 251 which I just realized may be addressing the Ethernet card and not the drive itself. Going to try changing that to 0 and see what happens (though I think that's where I started that didn't work).

MarkTTU

  • Hero Member
  • *****
  • Posts: 293
    • SamJackson.com
Re: ATV320 Modbus TCP
« Reply #7 on: April 25, 2023, 12:17:32 PM »
Using ID 0 results in an error, but no exception code any more  :-\

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3843
    • Host Engineering
Re: ATV320 Modbus TCP
« Reply #8 on: April 25, 2023, 12:21:24 PM »
ID 255 is usually the "slave device" when doing Modbus/TCP.  But they might have been smart and made ID 255 (or 0) be the card, and 251 be the actual drive (smart idea).

MarkTTU

  • Hero Member
  • *****
  • Posts: 293
    • SamJackson.com
Re: ATV320 Modbus TCP
« Reply #9 on: April 25, 2023, 12:30:06 PM »
Looks like 0 is the drive, 251 is the ethernet card, and 255 is an IO server. Interestingly using 0 as the ID gives me no exception responses, but I still get the error bit and I receive no data.

MarkTTU

  • Hero Member
  • *****
  • Posts: 293
    • SamJackson.com
Re: ATV320 Modbus TCP
« Reply #10 on: April 25, 2023, 12:37:39 PM »
Just realized I'm getting this error in the PLC system info

"Attempted operation not supported by device in MRX @000002D2 (MRX at VFD_Comms@13)"

Is that a result of the VFD not working right or me having something in the BRX not setup right?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6170
  • Yes Pinky, Do-more will control the world!
Re: ATV320 Modbus TCP
« Reply #11 on: April 25, 2023, 04:11:11 PM »
Just realized I'm getting this error in the PLC system info

"Attempted operation not supported by device in MRX @000002D2 (MRX at VFD_Comms@13)"

Is that a result of the VFD not working right or me having something in the BRX not setup right?

Not entirely sure how you are seeing that. That is the result of the underlying driver being unable to support the MRX instruction. About the only only way you should be able to see that (and it not be a DmD or PLC bug) is if you are using a POM, and either the POM is incorrectly configured or you have the wrong POM installed.
"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

MarkTTU

  • Hero Member
  • *****
  • Posts: 293
    • SamJackson.com
Re: ATV320 Modbus TCP
« Reply #12 on: April 25, 2023, 05:04:05 PM »
Not sure why that error was coming up, no POM involved, just the built in Ethernet port.

I finally did get to the bottom of the issue and it was setup on the ATV320.

Just in case anyone else is ever hitting their head against this same wall, the issue I was encountering is that in the VFD parameters you have to set the "Device Modbus Address" which isn't anywhere near the IP setup stuff and instead located with the serial Modbus parameters  ::)