Q Clusters
Tuesday, April 22, 2025
Wednesday, April 16, 2025
Connecting PLC with python
One can connect PLC with following two protocol if the PLC supports the protocol of course.
1) Modbus (RTU or TCP)
2) CIP
For above two protocols, I tried several but following two packages are good for me in many ways:
1) Modbus - pymodbus version 3.9.1
2) CIP - pycomm3 version 1.2.14
My application simply connect the Effluent Water Quality Monitor (mainly pH Value) System to obtain sensor pH values every 5 seconds. And give this value to AB CompactLogix PLC, so that it can provide this value to HMI in Ignition Edge by Inductive Automation. The data collection python code is running on Raspberry Pi 4 node inside protective enclosure with fan. As one can guess, there is Modbus module connecting Water Quality Monitoring system thru RS485 connection (pymodbus) and passing this value to AB CompactLogix through CIP protocol (pycomm3) over Ethernet/TCP connection. Works great! And I was so impressed by the stability of Raspberry Pi 4B and Modbus module. Almost all failures are caused by, in fact, main router (of course its not enterprise level router) even though the failure occurs 2-3 time a year. I have been running this for three year and I just change the fan for enclosure one time.
I will give more details on the configuration later.
Tuesday, April 15, 2025
Github (Worked in the past)
Followings are very old posting of my Github
Github: pksuf07 (Kyu S. Park)
- pksuf07/msp430g2533-UART: MSP-EXP430G2 / msp430g2553 / UART
- pksuf07/Garmin_LiDARLite_V3: Garmin LiDARLite V3 on Arduino
- pksuf07/max32660_lm75a: MAX32660 LM75A Library (Experimental)
- pksuf07/mbed5-i2scan: Arduino-like simplified i2cdetect implementation on mbed os 5
- pksuf07/mbed5-cjmcu75a: CJMCU-75A Senor on Mbed OS 5
- pksuf07/E32-915T-20D: EBYTE E32-915T20D, SX1276 915MHz 100mW DIP Wireless Module
So, all codes are so old, Possibly it might not even compile as is. So, please use them with your discretions
LSTM Replaces PID Control
LSTM Replaces PID Control from APMonitor.com
-
One can connect PLC with following two protocol if the PLC supports the protocol of course. 1) Modbus (RTU or TCP) 2) CIP For above two prot...
-
Followings are very old posting of my Github Github: pksuf07 (Kyu S. Park) pksuf07/msp430g2533-UART: MSP-EXP430G2 / msp430g2553 / UART p...