u/Siguardd

Non Procedural Communication and RS2 Instruction
▲ 1 r/PLC

Non Procedural Communication and RS2 Instruction

I am trying to communicate with a "Compass Module" which basically works on an RS-232 protocol. I am using an RS232-Rs485 bidirectional converter and connecting the PLC with RS-485 built in terminal.
Regarding the functionality of converter, I have verified it through Docklight by sending querry command to the compass from RS-232 end and receiving on RS-485 to USB adapter connected with my PC on COM port.
Now It seems like a very simple thing but its not that simple or it looks complex to me.
I have been trying multiple ladder logic codes with RS2 instruction but I am unable to get or receive data.
I have previously worked with MODBUS RTU protocol and controlled 2x wind sensors using ADPRW function and it worked great. This compass module has its own custom protocol and 9600 Baud Rate with 8N1 setting. I am sharing the screenshot of the code I am running.

https://preview.redd.it/b29eenbiim2h1.png?width=1480&format=png&auto=webp&s=e4e7acddfece578c62b06172c1ed8edebcf9cf7d

https://preview.redd.it/dd5icqrqim2h1.png?width=1402&format=png&auto=webp&s=5a3e1d35bd532ab343d8a00c5da6cb42a782ac2c

reddit.com
u/Siguardd — 1 day ago