Colodeti Posted August 5 Report Share Posted August 5 Dear, I'm trying to configure and use modbus rtu communication on my V1210, but I'm experiencing failures. When accessing the PLC's service mode, I noticed that the COM2 port keeps alternating between Modbus and PCOM randomly. I programmed the communication on the ladder as per the help instructions, the COM dipos were changed to RS 485, that is, in the physical and programming part everything seemed to be ok. I added this program I made just to test communication with ModbusPool WhatsApp Video 2024-08-04 at 10.19.46.mp4 TesteDAKOL.vlp Link to comment Share on other sites More sharing options...
MVP 2023 kratmel Posted August 5 MVP 2023 Report Share Posted August 5 Please use MODBUS Example project code (from Visilogic Help menu) for setup master or slave. The read instruction is called in every run of the program - it doesn't work like that. Modbus is a slow network and when you force every program scan to try to transmit a request - the PLC can't do it. Study the example code and use it for your case. Also check that the dip switches on the back of the PLC for port2 are configured correctly and that the correct cable is used. Link to comment Share on other sites More sharing options...
Colodeti Posted August 5 Author Report Share Posted August 5 I changed it to slave and I still can't communicate, note that when I enter the clp's "Info Mode" the COM 2 port keeps switching from PCOM to Modbus when I try to communicate with the ModScan32 Link to comment Share on other sites More sharing options...
MVP 2023 kratmel Posted August 5 MVP 2023 Report Share Posted August 5 Modbus is a network where the master and slave interact only if all the requirements for establishing a connection are met. These are the following requirements: - the wires that physically connect the master and slave are connected correctly (they are often connected incorrectly). - the PLC port is configured correctly using dip switches. 1 and 6pin of PLC port2 used for RS485 and it function selected by DIP SW on PLC back. - Speed and port settings are the same for maser and slave. - The master sends the correct function codes supported by the slave. The table of available function codes for the V1210 PLC as slave is in the help in the Modbus section. - numbering of cells (that is, addresses) may physically differ by one (+1). That is, the cell in the PLC with the address 0 can be cell 1 in the program you use, that is, there is some shift (related to the different interpretation of the concept of "first" cell - is it counted from 0 or from 1). But it depends on the device you connect and the program you use. Link to comment Share on other sites More sharing options...
MVP 2023 Ausman Posted August 5 MVP 2023 Report Share Posted August 5 There are numerous references all over the forum to modbus issues. The very first thing that should be done with any new device is to find out how it communicates correctly by using your PC running any of the numerous free programs available. Once you know all the aspects you then move this to the PLC. It makes it vastly easier. In your case you then need to learn the various aspects of how the PLC does what you have previously learnt via the PC. Always bear in mind Kratmel's most important bit of advice above..... 4 hours ago, kratmel said: Modbus is a slow network and when you force every program scan to try to transmit a request - the PLC can't do it. You need to arrange your ladder accordingly. Having your retries at 3 is compounding the problem of expecting racing car speeds when you're working with a tortoise. Use your PC testing to see what is the highest speed you can actually achieve....start at 9600 or less and slowly increase until you get error. And then understand that this speed may not be possible on the actual installation. For what it's worth, I don't have anything as ID 1. Link to comment Share on other sites More sharing options...
Colodeti Posted August 6 Author Report Share Posted August 6 Dear, Very grateful for everyone's support I'm just configuring and testing the Modbus network communication, I haven't programmed the writing and reading conditions yet. What is happening is a difficulty in carrying out communication in RTU, in the images I am sending I did the same procedure but using Modbus IP, notice that it worked in IP, the failure in RTU is very strange, I configured the dips in rear of the PLC, I configured the COM INT everything apparently correctly, what is strange is seeing in the Info Mode of the PLC the COM 2 port switching from Modbus to PCOM alone Link to comment Share on other sites More sharing options...
Colodeti Posted August 6 Author Report Share Posted August 6 Dear I was able to establish ModBus RTU communication, the pinout of the RJ11 cable was inverted in relation to my USB/RS485 converter, the names A and B were connected the same in the PLC and in the converter, I changed wires A and B in the converter and it communicated. Thank you very much for everyone's support Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now