Hi,
I'm using a RevPi Connect SE (and sometimes RevPi Connect 4) with Codesys to control an industrial machine. I have about 20 similar systems installed that all use the same (Codesys) program.
One feature that I need and cannot get to work is the build-in input and output on connector X2.
See picture of the wiring in attachement.
I did some testing and the status of bytes RevPiStatus and RevPiLED do not change. Bit 6 of RevPiStatus is always ON even if I unplug the wires from the X2 connector, and the relay contact is always closed (and the REL LED is always green) no matter if I turn bit 6 of RevPiLED On or Off (I checked with an LED and with a multimeter).
It looks to me like these two bytes are simply not updated in Codesys? I rebooted the device multiple times to no avail.
See picture in attachement for what I see in Codesys.
Can anybody help?
RevPi Connect SE and 4 not updating built-in input and output on X2 connector in Codesys
- RevPiModIO
- KUNBUS
- Posts: 348
- Joined: 20 Jan 2017, 08:44
- Contact:
Re: RevPi Connect SE and 4 not updating built-in input and output on X2 connector in Codesys
Hi,
Could you try mapping not the individual bits, but the entire “RevPiLED” byte instead, and then control the output via the bits?
For example, if the byte is called “mRevPiLED”, you can switch the bit using “mRevPiLED.6”.
Regards,
Sven
Could you try mapping not the individual bits, but the entire “RevPiLED” byte instead, and then control the output via the bits?
For example, if the byte is called “mRevPiLED”, you can switch the bit using “mRevPiLED.6”.
Regards,
Sven
python3-RevPiModIO - https://revpimodio.org/ || Der RevPi ist das Beste, was passieren konnte!
Re: RevPi Connect SE and 4 not updating built-in input and output on X2 connector in Codesys
Thanks for the quick reply.
I used your suggestion and mapped channels RevPiStatus to a byte called "M0_DI" and RevPiLED to a byte called "M0_DQ".
Bit 6 of M0_DI does actually turn on when the input on X2 is energized, which fixes that issue. Thanks!
Unfortunately, bit 6 of M0_DQ does nothing for the status of the REV LED or nor does it open the contact on X2. On all the machines I tested, the contact is always closed and the REV LED is always ON no matter the state of bit 6 of RevPiLED. I even tested all the other bits of of RevPiLED just to be sure, and none of them changed the state of the REV LED. See picture attached.
I used your suggestion and mapped channels RevPiStatus to a byte called "M0_DI" and RevPiLED to a byte called "M0_DQ".
Bit 6 of M0_DI does actually turn on when the input on X2 is energized, which fixes that issue. Thanks!
Unfortunately, bit 6 of M0_DQ does nothing for the status of the REV LED or nor does it open the contact on X2. On all the machines I tested, the contact is always closed and the REV LED is always ON no matter the state of bit 6 of RevPiLED. I even tested all the other bits of of RevPiLED just to be sure, and none of them changed the state of the REV LED. See picture attached.
Re: RevPi Connect SE and 4 not updating built-in input and output on X2 connector in Codesys
Hi,
I suppose you are using the latest version.
RevPi Bookworm 64-bit (Default)
Revolution Pi Library for CODESYS v2.2.0.0
CODESYS Control for Linux ARM64 SL v4.16.0.0
It is important that the RevPi device (Connect SE) be at the root of the device tree. Any other devices, e.g., Ethernet devices, should be placed thereafter.
(I have an issue with my RevPi with CODESYS. We get the error message that a driver for the PiBridge is missing)
https://kunbus-gmbh.atlassian.net/wiki/ ... is-missing.
Please test this simple program on your side:
The RevPiLED variable is directly updated in the program. Check the RevPiLED value with the piTest command once the CODESYS application is downloaded. (https://revolutionpi.com/en/docs/pitest)
This shall confirm if RevPiLED states are actually updated.
Regards,
Amar
I suppose you are using the latest version.
RevPi Bookworm 64-bit (Default)
Revolution Pi Library for CODESYS v2.2.0.0
CODESYS Control for Linux ARM64 SL v4.16.0.0
It is important that the RevPi device (Connect SE) be at the root of the device tree. Any other devices, e.g., Ethernet devices, should be placed thereafter.
(I have an issue with my RevPi with CODESYS. We get the error message that a driver for the PiBridge is missing)
https://kunbus-gmbh.atlassian.net/wiki/ ... is-missing.
Please test this simple program on your side:
The RevPiLED variable is directly updated in the program. Check the RevPiLED value with the piTest command once the CODESYS application is downloaded. (https://revolutionpi.com/en/docs/pitest)
This shall confirm if RevPiLED states are actually updated.
Regards,
Amar
KUNBUS