Welcome to the new Schneider Electric Community

It's your place to connect with experts and peers, get continuous support, and share knowledge.

Close
Important Announcement: WELCOME to the Schneider Electric Community! We have moved to a new address: community.se.com — bookmark it today and contact SchneiderCommunity.Support@se.com if you have any questions!
Invite a Co-worker
Send a co-worker an invite to the Exchange portal.Just enter their email address and we’ll connect them to register. After joining, they will belong to the same company.
Send Invite Cancel
82758members
350547posts

Read ATV930 parameters via Modbus TCP, BMX P34 20x0 CPU

Industry Automation and Control Forum

This forum is addressing industrial automation design & engineering, operations, asset performance, cyber security and digital transformation for Plants & Machines.

Solved
taa502
Crewman
Crewman

Read ATV930 parameters via Modbus TCP, BMX P34 20x0 CPU

Unable to read parameters from Altivar drive with CPU 340-20 (Embedded Ethernet, no NOE module). Read function is implemented according to Simple example of READ_VAR Modbus TCP/IP communication for Premium: https://www.se.com/ww/en/faqs/FA271865/


Attempting to read a single non-zero parameter (CIA402 State register, 0x0C81) the function returns data[1] = 0. The interface is configured as follows: 

ipaddress := ADDM ('0.0.3{192.168.0.20}tcp.mbs')
READ_VAR(ipaddress, '%MW', 3200, 1, manage, data)
manage[3] := 10

manage[4] := 2

At timeout READ_VAR is returning Incorrect response error 512 (200 Hex): https://www.se.com/us/en/faqs/FA378619/ 

PLC and drive are in the same subnet. The drive's doing fine, 3rd party Modbus TCP clients read inputs without issues.

Attachments

Accepted Solutions
BevanWeiss
Spock
Spock

Re: Read ATV930 parameters via Modbus TCP, BMX P34 20x0 CPU

What UnitID is the VSD expecting?

 

You've ticked this box in the Modbus Slave simulator, which means that it may not represent the VSD unless you have confirmed that the VSD will accept any Unit ID sent to it (which often they do not).

2022-02-11 08_47_37-Reply to Message - Communities.png

 

You're also going to need to detail what settings apply against what ModbusTCP fields for your iba configuration.

 

You should have all the fields for the Modbus TCP comms identical between what you are trying to do in your PLC vs what you have configured in your Modbus Client simulator.
And you should have all the fields configured the same in your Modbus Server compared to what you know about the VSD (i.e. if your Modbus Client is working when talking to the VSD if configured with Unit ID 1, then your test Modbus Server should be configured to only respond as Unit ID 1, unless you have also proven that the Modbus Client can connect to the VSD when requesting data from Unit 2.. and Unit 3.. and Unit 4->255)

 

Match up all the fields as per:
https://en.wikipedia.org/wiki/Modbus 

Bring in Wireshark if you don't know what the field value is.  That will tell you what is sent / received over the wire (you might need a managed switch with port mirroring, or some other 'bend in wire' monitoring).


Lead Control Systems Engineer for Alliance Automation (VIC).
All opinions are my own and do not represent the opinions or policies of my employer, or of my cat..

See Answer In Context

Tags (1)
7 Replies 7
BevanWeiss
Spock
Spock
0 Likes
6
513

Re: Read ATV930 parameters via Modbus TCP, BMX P34 20x0 CPU

You've done the 3rd part Modbus Client connecting to the Drive.

Why not try a Modbus Server acting as the Drive, to see that your PLC code is indeed 'correct'.

If you have each component working individually, then getting them working together should be much easier 🙂

 

You should be able to test the same configuration as you have for your working Modbus Client against the test Modbus Server also.  It can often be worth getting a snapshot of values from the Modbus Client and then copying them into the Modbus Server also... that way you have meaningful values when you get the PLC talking to the test Modbus Server also (which might speed up detection of incorrect register type handling etc).


Lead Control Systems Engineer for Alliance Automation (VIC).
All opinions are my own and do not represent the opinions or policies of my employer, or of my cat..
Tags (1)
taa502
Crewman
Crewman
0 Likes
5
500

Re: Read ATV930 parameters via Modbus TCP, BMX P34 20x0 CPU

The PLC's successfully connected to Modbus Slave simulator from modbustools.com 

What might be the problem? 
Is there a project example of Modicon PLC + Altivar VFD?

Tags (1)
BevanWeiss
Spock
Spock
0 Likes
4
480

Re: Read ATV930 parameters via Modbus TCP, BMX P34 20x0 CPU

If you have successful Modbus Client communication (from Modscan etc) to the VSD, and you have successful Modbus Client communication from the the PLC to a simulation VSD (from Modsim etc) then the PLC should indeed work to talk to the VSD.

 

Show your testing results here:

  • screen shots of the working Modscan to the VSD showing IP configs, registers and such
  • screen shots of the working Modsim showing config and PLC working to talk to it (inc PLC config)
  • screen shots of the working Modscan to the Modsim showing IP configs, registers and such

 


Lead Control Systems Engineer for Alliance Automation (VIC).
All opinions are my own and do not represent the opinions or policies of my employer, or of my cat..
Tags (1)
taa502
Crewman
Crewman
0 Likes
3
474

Re: Read ATV930 parameters via Modbus TCP, BMX P34 20x0 CPU

Here are the screenshots. 


1) Modbus server (simulator) config 

config_server.JPG

 

2) Communication PLC -- Modbus server

plc_to_server.JPG

 

3) Modbus client config

config_client.JPG

 

4) Communication Modbus client -- VFD

client_to_vfd.JPG

Tags (1)
BevanWeiss
Spock
Spock

Re: Read ATV930 parameters via Modbus TCP, BMX P34 20x0 CPU

What UnitID is the VSD expecting?

 

You've ticked this box in the Modbus Slave simulator, which means that it may not represent the VSD unless you have confirmed that the VSD will accept any Unit ID sent to it (which often they do not).

2022-02-11 08_47_37-Reply to Message - Communities.png

 

You're also going to need to detail what settings apply against what ModbusTCP fields for your iba configuration.

 

You should have all the fields for the Modbus TCP comms identical between what you are trying to do in your PLC vs what you have configured in your Modbus Client simulator.
And you should have all the fields configured the same in your Modbus Server compared to what you know about the VSD (i.e. if your Modbus Client is working when talking to the VSD if configured with Unit ID 1, then your test Modbus Server should be configured to only respond as Unit ID 1, unless you have also proven that the Modbus Client can connect to the VSD when requesting data from Unit 2.. and Unit 3.. and Unit 4->255)

 

Match up all the fields as per:
https://en.wikipedia.org/wiki/Modbus 

Bring in Wireshark if you don't know what the field value is.  That will tell you what is sent / received over the wire (you might need a managed switch with port mirroring, or some other 'bend in wire' monitoring).


Lead Control Systems Engineer for Alliance Automation (VIC).
All opinions are my own and do not represent the opinions or policies of my employer, or of my cat..
Tags (1)
Bastian_Schmitz
Commander Commander
Commander

Re: Read ATV930 parameters via Modbus TCP, BMX P34 20x0 CPU

Take care for the Unit Id in the case you want talk to the ATV via Modbus TCP.

If you use the standart Uint Id 255 you are only able to read the IO Scanner values.

If you want to read other parameters you need to config an Modbus RTU address in the ATV. 

In that case you can use this address as Unit ID to connect to any other parameter.

Tags (1)
taa502
Crewman
Crewman
0 Likes
0
451

Re: Read ATV930 parameters via Modbus TCP, BMX P34 20x0 CPU

Thank you, @BevanWeiss @Bastian_Schmitz ! All I had to do was set Device modbus address (ADD, logical address 6001, default value is OFF) in Fieldbus settings -> Port - Modbus Serial. ADDM address has to contain UnitID (ADD) after curly brackets, e.g. 'Ethernet_1{192.168.0.20}1'.


vfd_config.JPG

Tags (1)