HansCZ Posted January 26 Report Share Posted January 26 Hello, need some idea please. I have to connect two PLCs via modbus. The first (master) PLC is Unistream US7-B5-R38 with UAC-CX--01RS4 configured as modbus panel, slave is V350-35-T2. On vision I have changed the jumpers to 485 and Termination is ON. The cable is connected to the serial port on visions (Pins 1 and 6) on the telephone connector (i think it is RJ11) and its length is about 70 meters, in fact the electrician untagled one pair from an ethernet cable. The network is as follows: Unistream US7-b5-R38 ---- ADM-4188 (data aq. module 8DI/8DO, modbus ID 1) ---- ADM-4188 (data aq. module 8DI/8DO, modbus ID2) -----ADM-4586(DAM, 8AI, 4DI, DO, Modbus ID 3) ------V350-35-T2(Modbus ID4) Communication parameters: 57600, 8, None, 1 (but tried also 9600 and some others) The modbus between data acquisition modules and Unistream PLC (or PC) works, however if you check communication via Uniapps, there is a lot of lost attemps, but generally it works. The communication to V350 is not working at all, either from PLC or PC. PLC shows status 3 ( illegal data value), but testing program (QModMaster) says sometimes CRC checksum failed, sometimes Timeout, seldom No response. The code below is mostly retrieved from the examples, so I believe it is OK I can not post any live screenshots because the installation site is 150 km far and, as there is still problem with unitronics supplies, I do not have another 2 PLC to test it on a table. I appreciate any idea. Thx Link to comment Share on other sites More sharing options...
MVP 2023 Ausman Posted January 26 MVP 2023 Report Share Posted January 26 1). Using the twisted pair from an ethernet line.......Is it separated completely and just sitting there as a twisted pair in open space? Or is using a twisted pair alongside the other 3 pairs? I have found through experience that you MUST use dedicated 485 shielded twisted, as either single pair for data only, or 2 pair for data and power. 2). Allowing the cable limitation. I can't quickly see how often you are polling. I think this is likely your main issue. How many retries are you doing? If anything faults on the line, it will do a retry and if this all overlaps into the next ask, the system will fail. It looks like you are polling every second, but your timeout is 2. 3). Speed. I would only be going with 9600 on such a length. Don't forget 485 can't move a lot of data quickly. Ensure you don't have ID clashes, change everything to the same speed and settings, and see how it goes. Perhaps in trying different speeds you didn't change everything correctly. If you do get stable conditions on 9600, you can then try to go up incremently to find an optimum. Baby steps first...teach it to eat, burp and fart. 4). Ensure that all the separated systems are deriving their control power from the same phase, and share common earthing. Ensure the (new) cable shield (once fitted) is correctly earthed. A few things to check/try. cheers, Aus Link to comment Share on other sites More sharing options...
Gabriel Franco Posted January 26 Report Share Posted January 26 - As Aus stated, use RS485 cable. For now, try to connect idle pairs to ground. - Make sure terminal resistances are connected at both physical ends of the network. - Keep stub lines as short as possible. - Why are you using Scan32 rather than ScanEx? Link to comment Share on other sites More sharing options...
MVP 2023 kratmel Posted January 26 MVP 2023 Report Share Posted January 26 2 hours ago, HansCZ said: The communication to V350 is not working at all, either from PLC or PC. PLC shows status 3 ( illegal data value), but testing program (QModMaster) says sometimes CRC checksum failed, sometimes Timeout, seldom No response. Please describe how you check the connection. V350 has only one RS232 port, which is also RS485 and is used to communicate with Visilogic. If Visilogic is connected, the modbus is physically disabled (PCOM protocol used). You need, at least temporarily, an additional RS232 card or ethernet card. Accordingly, as I wrote above, by adding an ethernet card, you can connect to unistream via an ethernet cable. Link to comment Share on other sites More sharing options...
HansCZ Posted January 26 Author Report Share Posted January 26 Thanks all of you for your hints. I will try it when on site. I have set 3 retries and polling about 1 second, timeout 3 second I am using Scan32 because of passing ML yes, I was thinking to connect the PLC using ethernet cable and add on ethrnet port on Vision, but believe me in cz since there are too long of delivery periods of Unitronics Stuff, for instance ordered at May, delivered on October. This project is drinking water treatment plant and I am afraid the customer won't wait 5 months for Unitronics 🙂 thx Link to comment Share on other sites More sharing options...
MVP 2023 Ausman Posted January 27 MVP 2023 Report Share Posted January 27 +1 to all the other suggestions. 21 hours ago, HansCZ said: I have set 3 retries and polling about 1 second, timeout 3 second So it is asked every second, but will go to 9 seconds if there is an error, thus mucking up the entire procedure. You MUST allow for all possible timing TOTALS in arranging your calls. Your calling methods and intervals can include using SBs to check whether calls were done ok. Even then I'd allow a few scans to eliminate potential buffer issues. I do 1 retry at most, but many here don't even do a retry...if the thing is failing it will do it again and be noticeable, and needs to be fixed. It all comes back to how critical comms speed is to machine operation. For my stuff I do fixed speed calling to at most perhaps 20 devices in a repeating loop, with the interval between each call slightly longer than the total possible time that will occur if there is an error on the previous call. cheers, Aus Link to comment Share on other sites More sharing options...
HansCZ Posted February 1 Author Report Share Posted February 1 Dear All, thanks again for your ideas and teaching me the requirements for 485 communication cables. I have taken an ethernet expasion card for V350 from an older installation, where remote access is not more necessary, applied connectors to the UTP cable and using MODBUS TCPIP now. Everything works fine and there is one advantage - now I have the access to the V350 PLC remotely using wireguard. Jan 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