Page 1 of 1

DIO won´t work in codesys

Posted: 08 Mar 2021, 11:39
by LMDaniel999
Hello,

we tried to include a DIO module on a core3 into codesys 3.5.16. For this we used the beta test library for codesys 3.5.16 and followed the blink example in the help file.

The first problem is, that die Inputs don´t show the actual value. Every input is false, even if we apply a 24V signal on the connector.
Codesys shows no error and the state of the DIO-module is "running".
We tried the module on the left and on the right, with same behaviour.
If we disconnect the module, there is a error in codesys.
How can we find out, where the problem is?

Another problem is the naming of the modules.
The names "Left" and "Right" are used for the connected modules.
We also use the string functions "Left" and "Right" in our program.
We have to change the name of the "left" device while including, because if we include it with the name "left", we get errors by using the string functions.
The same with the "right" function.
Is this a problem, if we rename it?

We have also tried a new program for the DIO module without using the string functions, following the blink example, without success.

Thank you for your help!

Re: DIO won´t work in codesys

Posted: 09 Mar 2021, 10:10
by Amar
Hi,
You can rename the Left/Right module name in Codesys tree and its fine.
If any DIO LED's are RED after downloading and running Codesys program, you need to check the wiring and power supply again.
In Codesys, you need to name the input variable and call it in Program.Only then its actual value will appear in online monitoring mode.

Check with piTest command if DIO module is being found:
piTest -d

I assume you have stretch image on Core and have latest updates done by following step.
sudo apt-get update && sudo apt-get upgrade && sudo reboot

If the problem exists please send the Codesys and kernel log.
Codesys log from:
/tmp/codesyscontrol.log
OR
Export logs from
Device->Log
Filter IoDrvRevPIBridge ,piControl

Kernel Log: with command
dmesg

Regards,
Amar

Re: DIO won´t work in codesys

Posted: 04 Nov 2021, 12:10
by Tuscan
Hallo.
I got the same problem!!!
What do you think i should do to fix it?

Grateful,
Tuscan