I use a Raspberry with a PiFace I/O module. I downloaded a Codesys example on the web and is working fine, I can see the inputs and outputs changing TRUE/FALSE, fine. So I try to create a project from scratch (File > New > Standard project) under SPI I added a new device for the PiFace interface and write a simple program (see attached file).
The problem is when I run the program all the inputs and outputs are going to TRUE and this is not correct... Is not a hardware problem because with the first project all is working fine.
Where is my mistake? Do I forget something...?
Hello,
I use a Raspberry with a PiFace I/O module. I downloaded a Codesys example on the web and is working fine, I can see the inputs and outputs changing TRUE/FALSE, fine. So I try to create a project from scratch (File > New > Standard project) under SPI I added a new device for the PiFace interface and write a simple program (see attached file).
The problem is when I run the program all the inputs and outputs are going to TRUE and this is not correct... Is not a hardware problem because with the first project all is working fine.
Where is my mistake? Do I forget something...?
In advance many thanks for your help.
Check the SPI maxspeed...need to bei reduced
Ok, and where is that?
This is frequently asked here:
https://forge.codesys.com/forge/talk/search/?q=Spi+maxspeed
Many thx for the link, I changed this "SPI speed setting" from 0 to 100000 and is now working.
Last edit: yann2021 2021-04-09