Jalal_Flo_Smart Posted May 9 Report Share Posted May 9 Hi everyone, I am trying to connect the V350 PLC to an ESP32 Wrover-E T-SIM7600G-H using RS232 Serial communication, now the RS232 from the plc is connected to a MAX3232 which shifts the logic level from RS232 to TTL. Now I've already tested the communication of the ESP32 & MAX3232 through loopback method. Now, I am trying to send a series of string from the plc, to the ESP32. Here is the initialization of the com FB, I copied the Example for V130_send_string_in_series Here is the code for sending the data, And here is the DIP configuration. I would really appreciate your help to figure this out, I have been running in circles for the past 3 weeks. Quote Link to comment Share on other sites More sharing options...
MVP 2023 kratmel Posted May 9 MVP 2023 Report Share Posted May 9 Hi. You must know that working with Visilogic over port1 disables port1 from working over other protocols. You can check current port settings via Info mode. Even when using the USB port port1 is disabled ( through the USB - COM adapter in the PLC). Best option - use second com port add on card for connection or use Ethernet card for Visilogic communication. You can also connect PLC with PC Terminal software for check communication. P.S. Sometimes RX and TX wire swap is problem - TX1 go to TX2 and RX1 go to RX2 - result - no connection. 1 Quote Link to comment Share on other sites More sharing options...
MVP 2023 Ausman Posted May 9 MVP 2023 Report Share Posted May 9 Further to what Kratmel has said, if you are stuck with no other ports for the moment, start from very basics and also do a test screen that will show and let you do all you want, with the plc not connected to the PC. Also, how are you powering the Max? A quick look at your ladder and there is not enough shown to confirm this, but it looks like it is capable of doing a repeat send of something different each scan. 232 and internal buffers will not like the speed of this. 1 Quote Link to comment Share on other sites More sharing options...
Jalal_Flo_Smart Posted May 10 Author Report Share Posted May 10 Hi all, thank you for your prompt response! Yes Kratmel I’ve read the documentation extensively it said that Com 1 has both rs232 and usb. The second port is an IO expansion port. I can try the Rs485 on Com1. I’ve triple checked the wiring, and Ausman, that is correct, it is running in a loop, pretty quickly as well. I’ll try to include the 1 second pulse to slow it down and test. Also I’ve connected the Rj11 to DB9 cable to a DB9 to USB and connected that to the pc and I was able to read the data easily. I am powering the max3232 with 3.3 V. I didn’t quite understand this statement Ausman:” Do a test screen that will show and let you do all you want” I am thinking; - Buy a usb gender changer. - Connect usb mini on plc to USB to DB9. - Connect that to Max3232. - Connect that to ESP32 and test. Quote Link to comment Share on other sites More sharing options...
MVP 2014 Simon Posted May 10 MVP 2014 Report Share Posted May 10 Hi Jalal, Jus to back things up a little, the second port is not fitted by default to the PLC. From the photo you sent I can see that the port 2 slot is empty: The expansion port is completely separate to the add-on COM port. When you are trying to run serial comms and also debug the program using Visilogic, a second port is almost essential. Part number is V100-17-RS4 or V100-17-RS4X. I'll take a guess at who you are working for, but please direct message me to confirm and we will try to help you out. You won't get anywhere trying to connect a USB to serial adaptor into the USB programming port of the PLC. I hope this helps, Kind Regards, Simon 1 Quote Link to comment Share on other sites More sharing options...
MVP 2014 Simon Posted May 10 MVP 2014 Report Share Posted May 10 12 hours ago, kratmel said: Hi. You must know that working with Visilogic over port1 disables port1 from working over other protocols. You can check current port settings via Info mode. Even when using the USB port port1 is disabled ( through the USB - COM adapter in the PLC). Best option - use second com port add on card for connection or use Ethernet card for Visilogic communication. You can also connect PLC with PC Terminal software for check communication. P.S. Sometimes RX and TX wire swap is problem - TX1 go to TX2 and RX1 go to RX2 - result - no connection. Hi Jalal, Thanks for getting in touch. I now understand what you are trying to do. The above comment from @kratmel is the essence of the issue. It sounds like you are using the programming cable that has the MJ10-22-CS25 adaptor on it. The alternative adaptor MJ10-22-CS76 achieves the RX to TX wire swap and also has the opposite DB9 connector. I can organise a MJ10-22-CS76 for you to try. Kind Regards, 2 Quote Link to comment Share on other sites More sharing options...
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.