Hobbyist Toolkit

cancel
Showing results for 
Search instead for 
Did you mean: 

Linx RPI 3B+ Startup Executable No I2C

Solved!
Go to solution

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?

Certified LabVIEW Architect
0 Kudos
Message 1 of 7
(242 Views)

What have you verified through the TCP/IP communication?  How are you sending your inputs to the RPI to control the servos?  Do know that the program is receiving your commands to move the servos and it is not sending the outputs?

David Wilt
The New Standard LLC
0 Kudos
Message 2 of 7
(234 Views)

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   

Certified LabVIEW Architect
0 Kudos
Message 3 of 7
(219 Views)

Hi, 

Do you get the correct frequency back from the second 'Read Freq' vi ?

 

0 Kudos
Message 4 of 7
(214 Views)

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. 

Certified LabVIEW Architect
0 Kudos
Message 5 of 7
(183 Views)
Solution
Accepted by topic author JPitts

Hi,

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?

 

0 Kudos
Message 6 of 7
(176 Views)

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! 

Certified LabVIEW Architect
0 Kudos
Message 7 of 7
(164 Views)