I created a VI which controls an Arduino MEGA 2560 using LINX. The program goes through a series of steps using a state machine architecture (see attached VI).
My problem is that the program executes one cycle without any problems, but I get an error (5501: timeout occurred at the actuator forward/backward stage) when the cycle restarts. I figured out that replacing the “Analog Read N Chan” command with a constant eliminates this problem, but I can’t figure out why having it in the code is causing the above-mentioned issue. Any advice would be greatly appreciated.