alexamiiah79 - 2023-01-23

Hi everyone, I am new to the CODESYS PLC world.

Currently I am using Codesys on BBB as PLC. And I encountered an analog inputs reading problem.

  1. When I only enable one analog GPIO (AIN0), it can read values fine.
  2. But when I enable more than one analog GPIO (AIN0, AIN1, AIN2 in used), it only read the analog readings on AIN0. The other two GPIOs stayed 0.

And if I set the bus cycle options to follow MainTask, and set the cycle time to 200us, it can roughly read the inputs from AIN1 and AIN2 but the refresh rate is not as fast as AIN0. Also, after around 1.5 min of running, the Codesys will stop reading analog input. Will need to reboot the BBB to make have it function again.

Anyone having the same problem?