Hi all, I have been developing a program with LV2020 community on a RPI3B+, and using the local IO I2C interface to control 12 servos. The application works fine in interactive / development mode, but when I build the app and set it to run at startup, the I2C does not work. I added TCPIP communication to debug, and can see that the startup EXE is running, and that there is no error coming from any of the linx I2C vis (initialise etc..) Is there something I need to do to allow local IO I2C access for the startup exe?
Solved! Go to Solution.
Yes, I created two TCPIP commands that I can use to set all servo positions to either 0 deg or 90 deg. these commands both work fine in interactive mode, and I get the 'ack' back from each command fine in the startup exe version, as if the move was made ok, but no servo movement. I also have a bluetooth module connected to the local IO uart pins, which works correctly from the startup executable. Its just the I2C that seems to not work. Attached is a screenshot of initialise code
Hi, yes the correct frequency is read back ok (49.824617 Hz) within the startup exe, which is the same as when run in debug.
The frequency value is read back from an I2C register on the PCA9685.
Could it be a problem in the values going to the Set Servo PWM.vi?
Are any values calculated from a front panel control?
Yes, after some fiddly de-bugging it was indeed being caused by initialising a property node for an indicator at the start of the application, and the error out from it being wired through the I2C write functions. When the app was run in debug mode there was no error from the property node, but when run from the startup exe, the node generated an error (because as you say the indicator was not loaded) that was preventing the I2C write from working.
Many thanks for your help!