Sign in to follow this  
Followers 0
TOmmyS

Delta DVP-SA2 with Rapsberry(CH340) - RS485 communication

8 posts in this topic

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.

Delta DVP-SA2 Series

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.

images?q=tbn%3AANd9GcTzcx7FWwtSown_zm2Is

 

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 ? 

 

 

Przechwytywanie.PNG

Share this post


Link to post
Share on other sites

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.

COMMUNICATION TRAFFIC.PNG

your setting.PNG

modbus_REV3_ES2_nofloat.isp

1 person likes this

Share this post


Link to post
Share on other sites

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

Przechwytywanie.PNG

2Przechwytywanie.PNG

Przechwytywanie3.PNG

Przechwytywanie4.PNG

Share this post


Link to post
Share on other sites

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 person likes this

Share this post


Link to post
Share on other sites

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.  

Share this post


Link to post
Share on other sites

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 ? 

Share this post


Link to post
Share on other sites

After long fight it works fine. I owe you a good beer. Many thanks for your help. 

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0