hbleier - 2020-06-05

I saw on youtube this guy said you can read values on the RPi4 SPI with python3 scripts then bring those values into codesys3.5 to use in a POU. I have been searching online for an example of this, but can not find it. He only showed executing a python script not reading from it.

Attached is an example python script that I made to reads inputs 0 & 1 which are 4-20mA transmitters and 4 & 5 which are 10K NTC, beta 3892 thermistors on the MCP33131. It pulls the values and prints them to the console every 500ms, it uses the libwidgetlords 2.1.0 that is installed on the RPi4.

Then I need to write to the MCP4922 D2A to control a steam valve with 2-10vdc.

If anyone has some examples of howto do this or has done something similar any help would be greatly appreciate. If I am asking in the wrong area of the forum I am sorry, please let me know.



Last edit: hbleier 2020-06-05