TOmmyS Posted June 7, 2020 Report Posted June 7, 2020 Hello everyone, This is my first time here since PLC israther hobby than my job, hope to stay for longer. What I want to do is connect my old PLC - delta DCP-SA2 with cloud over MQTT. PLC does not have ethernet so I decided to connect PLC with RS485 to RaspberryPi and from there use MQTT to transfer data to cloud. Everything on cloud site as well as mqtt protocol is ready, I have issue with PLC nad raspberry communication only. I bought RS485 to COM port (CH-340) like this one. I configured it on raspberry (it shows as COM1). I set communication in plc software (see attachment) but there is nothing shown on my port commuinication ( I use putty software as com port sniffer). Do you have any idea what should I do in order to succesfuly send data from PLC to Raspberry ? Quote
limcm Posted June 8, 2020 Report Posted June 8, 2020 https://www.modbustools.com/ FOR THE MODBUS SLAVE TESTING. COM2 OF PLC CONNECT TO YOUR RS485 DONGGLE(SHOWN IN YOUR COMPUTER HARDWARE DEVICE ,WHICH I USUALLY SET TO 19200 BITS/SEC) THE ATTACHED DELTA FILE JUST CHANGE THE PLC TYPE TO SA2, TRY IT OUT WHETHER THERE IS ANY COMMUNICATION TRAFFIC. IF NOT THEN THE TWO WIRINGS JOINING YOUR RD485 DONNGLE AND PLC COMPORT2 JUST SWAP THEM. modbus_REV3_ES2_nofloat.isp 1 Quote
TOmmyS Posted June 8, 2020 Author Report Posted June 8, 2020 Many thanks for your reply, software seems cool an thats exacly what i was looking for. I did as you described, set up everything, no communication - swap wires - no traffic again. Could you take a look on my setup? Can you see any mistake? 1) PC com setup 2) and 3) PLC setup 4) ModbusSlave setup Quote
limcm Posted June 9, 2020 Report Posted June 9, 2020 FOR ModbusSlave setup in either "RTS Toggle" or "DSR" no problem with the communication .Tested with my delta es2 with file modbus_REV3_ES2_nofloat.isp. So far all the setting on your side is correct. MY SETTING IS "RTS Toggle". Seem to be hardware side problem. If u have two rs485 dongles ,u can test using the one as master the other as slave with the modbus software just to confirm the dongles is working. As for the twisted pairs of wiring use for the connection is cut from lan cable. The attached files are the modbus modules for modbus slave program. (all these settings are from five modbus hardware modules) Es2 from https://item.taobao.com/item.htm?spm=a1z09.2.0.0.2dc82e8dFbfve5&id=546424488944&_u=91f3q6oc5ba1 ( fully compatible with Delta ES2) Should u need the program using visual studio 2017 in c# acting as HMI for all the modules testing in modbus then please pm me. Me is a hobbyist ...haha (delta dvp-sx2 and dvp-es2 not original)http://www.winchiphead.com/download/ download driver files for ch340 which is Chinese manufacturer.Website in Chinese. 307a_in.mbs 307a_out.mbs 308l_in.mbs 308l_out.mbs 9039_analog_in.mbs 9039_in.mbs 9039_out.mbs tcp580L_in.mbs tcp580L_out.mbs WP3066.mbs 1 Quote
TOmmyS Posted June 13, 2020 Author Report Posted June 13, 2020 Thank you for your help, Sadly nothing works for me. Ill try to connect durectly to raspberry pins (not the donngle). I dont have second donngle to check if this works. Did you use any resistor between signal wires? I'l try to use different signal wires too. Quote
TOmmyS Posted June 13, 2020 Author Report Posted June 13, 2020 Ok i found out that your plc programm use COM2 (led indicator on the PLC). COM2 is active and COM 3 is off. I use COM3 for communication. Could you help me find how to change to COM3 communication ? Quote
TOmmyS Posted June 13, 2020 Author Report Posted June 13, 2020 After long fight it works fine. I owe you a good beer. Many thanks for your help. Quote
limcm Posted June 14, 2020 Report Posted June 14, 2020 Feel happy for u ,finally it work. The com3 of plc is connected to my computer comport which is used as modbus master and com2 of plc is connected to modbus slave modules.(no resistors) At least your long fight is worth the effort. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.