Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched.
Close
I updated CODESYS to SP7 Patch 3.
I updated my raspberry Pi B with V3.5.7.10.
I try exemple "PiFace.projet" and the other "PiFaceIoDrv.project". The only change from the originals projects is update for Devices, libraries, ...
I use french CODESYS version
They does not work. Input and Output of the PiFace card are not refreshed.
With PiFace.Project : the SPI Bus does not work. I see a red triangle in front of SPI_Mster and PiFace.
With PiFaceIoDrv.project : I see a red triangle in front of SPI_Mster but a green circle in front of PiFace.
With all versions it worked well and there is no wiring change between the 2 versions.
I made a mistake but where ? Someone already made this manipulation ?
Thank you in advance for your ideas
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi there! I'm going to use this topic instead of opening a new one I'm completly new to Codesys and also Raspberry Pi with PiFace digital. I am stuck at the basics already. In the example project called PiFace.project we can find the "PiFace.byIn.0" and "PiFace.byIn.1" which clearly control the PiFaces input keys. But how do you know that? Are they listed in a library or something? How do i find other let's say if I connect a switch to other inputs? I hope you understand what I mean...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I try to explain what our idea is/was behind this on developing this with two solutions/posibilities to use it / add it to the device tree
In the example / library and device description directory of the Pi delivery you find two independent approaches:
1. Using the Piface by an ready to use IO Driver library see ->screenshot PifaceIodriver - with makes possible to map IO's in the IO Mapping tap
Using the Piface without IO mappping - the system execute the implicit generated fb (Name of the instance is in that example PiFace -> this is how you have named the Piface in the device tree) and you see the variable/Input/Output definitions in the library
Hope this helps to understand it a little bit more.
Personally I would prefer to use 1.) this is more like all these fieldbus offer to map variables
BR
Edwin
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
OK thanks, that clears it up a little bit. How about if I connect an external button to PiFace inputs, and another external LED light to the ouputs. How do I know how to "call" them or what their variables are? I will be working with Ladder Logic Diagram.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello
I updated CODESYS to SP7 Patch 3.
I updated my raspberry Pi B with V3.5.7.10.
I try exemple "PiFace.projet" and the other "PiFaceIoDrv.project". The only change from the originals projects is update for Devices, libraries, ...
I use french CODESYS version
They does not work. Input and Output of the PiFace card are not refreshed.
With PiFace.Project : the SPI Bus does not work. I see a red triangle in front of SPI_Mster and PiFace.
With PiFaceIoDrv.project : I see a red triangle in front of SPI_Mster but a green circle in front of PiFace.
With all versions it worked well and there is no wiring change between the 2 versions.
I made a mistake but where ? Someone already made this manipulation ?
Thank you in advance for your ideas
Hi,
is SPI enabled ?
check by:
sudo raspi-config
check if you are on the right SPI bus
(Guess we have two)
BR
Edwin
Hi Edwin
I try your idea. SPI is enabled, it seems there is only one SPI bus (I use a Raspberry B).
But it does not work
Best regard
HI
I solved my problem.
1Β°) I update the kernel by :
- sudo apt-get update
- sudo apt-get dist-upgrade
- sudo rpi-update
2Β°) Then I checked the use of SPI bus.
3Β°) And then I tested the card piface with the Piface Digital Emulator
- sudo apt-get install python3-pifacedigital-emulator
It works well.
4Β°) Then I updated CoDeSys and everything works.
Is the order of updates very important ? I don't know,but it works
Best regard
Hi there! I'm going to use this topic instead of opening a new one I'm completly new to Codesys and also Raspberry Pi with PiFace digital. I am stuck at the basics already. In the example project called PiFace.project we can find the "PiFace.byIn.0" and "PiFace.byIn.1" which clearly control the PiFaces input keys. But how do you know that? Are they listed in a library or something? How do i find other let's say if I connect a switch to other inputs? I hope you understand what I mean...
Actually here is a screenshot of the project. How do you know that those inputs and outputs are named like those variables?
Hi,
I try to explain what our idea is/was behind this on developing this with two solutions/posibilities to use it / add it to the device tree
In the example / library and device description directory of the Pi delivery you find two independent approaches:
1. Using the Piface by an ready to use IO Driver library see ->screenshot PifaceIodriver - with makes possible to map IO's in the IO Mapping tap
Hope this helps to understand it a little bit more.
Personally I would prefer to use 1.) this is more like all these fieldbus offer to map variables
BR
Edwin
OK thanks, that clears it up a little bit. How about if I connect an external button to PiFace inputs, and another external LED light to the ouputs. How do I know how to "call" them or what their variables are? I will be working with Ladder Logic Diagram.
Hi,
here is the ladder piface example.
BR
Edwin
PiFaceIoDrv_LadderExample.project [105.82 KiB]