Hi, I was working on libraries for Pi-Plates in codesys back in 2019 too :) I was struggling with the same issue as you regarding GPIO25. Looks like you cannot access the GPIO25 outside a task eg. changing state within the library for each read/write cycles in a for loop. But I found a workaround: Connecting a optocoupler controlled by CS1 (chip select) to toggle GPIO25 towards Pi-Plate wire. and adjusting SPI communication speed/frequency and delay, I got it working. I decided to update and publish...
ADDED MAIN SCREEN TO TEST RELAYS
Start of SPI Driver for Pi-Relay PlateModified description file
Renamed pi-plate xml to pi-plate.devdesc.xml per suggestion from aliazzz, ticket number 2
piplate.xml
Ok, can do, thanks for the advise!
piplate.xml
Create Sudo Code Convert Python to SPI
Create Sudo Code Convert Python to SPI
I need to link a GPIO to a function block. I think I just need to point the address to the GPIO when the function block is initialized. Then control the output when needed. Output 25 turns on just before the SPI transmits to the relay board then turns off afterward. I don't know what is used for, but I am going to follow what the creator of the relay board did. Any suggestions?
Pi-Plate Python Code To SPI
Convert to Python to Codesys
Pi-Plate Python Code To SPI
Relay Plate Python Code
Pi-Plate Python Code To SPI
Pi-Plate Python Code To SPI
Pi-Plate Python Code To SPI
Pi-Plate Information
Pi-Plate Python Code To SPI
Convertion to Python to Codesys
Convertion to Python to Codesys
Convertion to Python to Codesys
Convertion to Python to Codesys
Convertion to Python to Codesys
Pi-Plate Python Code To SPI
Start of SPI Driver for Pi-Relay Plate
Nice posting Seems to me not too difficult to rewrite it into Structured Text. Little advice; 1) Just write an FB (class!) which extends the SPI baseclass and try to translate this python source into it. This will be your CODESYS basic Function Block driver. 2) Study other SPI drivers for extra help. Lots of resources on it here. 3) Use CfUnit for debugging and write unit tests for your FB driver in your library ;-) It will help you develop the driver quicker and more painless and it will also serve...
Nice posting Seems to me not too difficult to rewrite it into Structured Text. Little advice; 1) Just write an FB (class!) which extends the SPI baseclass and try to translate this python source into it. This will be your CODESYS basic Function Block driver. 2) Study other SPI drivers for extra help. Lots of resources on it here. 3) Use CfUnit for debugging and write unit tests for your FB driver in your library ;-) It will help you develop the more driver quicker and will also serve as useful information...
Nice posting Seems to me not too difficult to rewrite it into Structured Text. Little advice; 1) Just write an FB (class!) which extends the SPI baseclass and try to translate this python source into it. This will be your Function Block driver. 2) Study other SPI drivers for extra help. 3) Use CfUnit for debugging and write unit tests for your FB driver in your library ;-) It will help you develop the more driver quicker and will also serve as useful information for other developers. If you first...
Nice posting Seems to me not too difficult to rewrite it into Structured Text. Little advice; 1) Just write an FB (class!) which extends the SPI baseclass and try to translate this python class into it. This will be your Function Block based driver. 2) Study other SPI drivers for extra help. 3) Use CfUnit for debugging and write unit tests for your FB driver in your library ;-) It will help you develop the more driver quicker and will also serve as useful information for other developers. If you...
Home
Pi-Plate Python Code To SPI
Pi-Plate Python Code To SPI
Home
Pi-Plate Code to Convert To SPI
Pi-Plate Code to Convert To SPI
Sudo Code For Relay On
Home
Home
Home