Industry Automation and Control Forum
This forum is addressing industrial automation design & engineering, operations, asset performance, cyber security and digital transformation for Plants & Machines.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-02-08 02:11 AM
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.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-02-10 01:53 PM
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).
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).
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-02-08 01:27 PM
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).
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-02-09 04:18 AM
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?
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-02-09 01:55 PM
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:
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-02-09 11:44 PM
Here are the screenshots.
1) Modbus server (simulator) config
2) Communication PLC -- Modbus server
3) Modbus client config
4) Communication Modbus client -- VFD
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-02-10 01:53 PM
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).
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).
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-02-10 10:30 PM
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.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-02-11 04:16 AM
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'.
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.