Compilation Error when developing a Library API | Arduino Compatible Compiler for LabVIEW Discussions | Forum

Avatar
Please consider registering
guest
sp_LogInOut Log In sp_Registration Register
Register | Lost password?
Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Feed Topic RSS sp_TopicIcon
Compilation Error when developing a Library API
October 31, 2019
8:15 pm
Avatar
SimonCee
Member
Members
Forum Posts: 10
Member Since:
January 17, 2017
sp_UserOfflineSmall Offline

Hi,

I'm trying to develop my first Arduino library API and I when I compile my test API I get an error "Translator.vi could not be found.  Please ensure this VI is part of the addon lvlib.  It definitely is and its password protected (as are all of the other API VIs) so I'm at a loss as to what the issue is.  Has anyone any insights that might help me?

I've attached the LabVIEW libary and Arduino source plus a .jpeg of the error message in a zipped up attachment.

Many thanks.

SimonC

October 31, 2019
8:47 pm
Avatar
Steffan
Admin
Forum Posts: 408
Member Since:
March 12, 2015
sp_UserOfflineSmall Offline

The Translator should NOT be password protected.  Take a look at the Template example.

October 31, 2019
9:00 pm
Avatar
Steffan
Admin
Forum Posts: 408
Member Since:
March 12, 2015
sp_UserOfflineSmall Offline

The other issue is you have disconnected the Error In terminal in your Translator.   That must be connected and you should not edit the Translator template aside from the Block Diagram.

October 31, 2019
9:21 pm
Avatar
SimonCee
Member
Members
Forum Posts: 10
Member Since:
January 17, 2017
sp_UserOfflineSmall Offline

Thank you for coming back to me Steffan,

I've checked the library and matched the password protection on each element to that of the template, shut down and retarted LabVIEW and the problem persists.  Do you have any other ideas?

Simon

October 31, 2019
9:26 pm
Avatar
SimonCee
Member
Members
Forum Posts: 10
Member Since:
January 17, 2017
sp_UserOfflineSmall Offline

Steffan said
The other issue is you have disconnected the Error In terminal in your Translator.   That must be connected and you should not edit the Translator template aside from the Block Diagram.

 

That cracked it Steffan.  I reconnected the error terminals on the connector pane and it now works (sort of).  Lots of C errors now but these I can live with.  Time to debug my declarations.

Many thanks.

November 5, 2019
8:50 pm
Avatar
SimonCee
Member
Members
Forum Posts: 10
Member Since:
January 17, 2017
sp_UserOfflineSmall Offline

I've come back to the API tonight and worked through the compilation errors I encountered but I'm stumped again.  When I try and verify my new test.vi using a modified translator I get the compiler error message I've attached.

I've added the defines in my library .cpp file to my Translator VI but there's no references to how these are declared in the documentation that I can find and there are no examples of the syntax in the addons folder.

Can anyone help please?

November 5, 2019
9:02 pm
Avatar
Steffan
Admin
Forum Posts: 408
Member Since:
March 12, 2015
sp_UserOfflineSmall Offline

Your image does not show the exact error.  You need to click the details and post that back.  I will try to compile it in the meantime.

November 5, 2019
9:07 pm
Avatar
Steffan
Admin
Forum Posts: 408
Member Since:
March 12, 2015
sp_UserOfflineSmall Offline

In your original library, you did not name your libraries folder correctly.  Refer to the help manual section "Porting an Arduino Library to the Arduino Compatible Compiler for LabVIEW".

Specifically:

libraries: This is where the Arduino library can be copied or any custom ".c" and ".h" files with the specific C implementation.  The Arduino Compatible Compiler for LabVIEW will automatically install any libraries stored here such that Step 1 of this guide is not necessarily required.  Although it is still good practice to execute Step 1 so that you can ensure the library is working with hardware within the Arduino IDE first.  For the case of the template, there is one ".h" file with the implementation of the functions to be ported by the Add and Subtract API VIs.

If I rename your "C Code" directory to "libraries", then put the C code directly at that level (no sub directories), it compiles.

Or you can manually install the Arduino library as is described in Step 1 of this section in the user manual.

November 5, 2019
9:50 pm
Avatar
SimonCee
Member
Members
Forum Posts: 10
Member Since:
January 17, 2017
sp_UserOfflineSmall Offline

Apologies if I confused things but I put a copy of the Arduino library in the LabVIEW API library folder so that I could bundle all the files up for you to see.  I had already installed the Arduino library as per the manual and tested it on my Uno.

I've been trying to rework the translator vi but with no success.  The compiler errors each time in the same manner.  I've created a text file with the debug info in it and ttached it here with the latest version of the translator.  Your help to understand where I'm going wrong would be much appreciated.

Many thanks.

November 5, 2019
10:06 pm
Avatar
Steffan
Admin
Forum Posts: 408
Member Since:
March 12, 2015
sp_UserOfflineSmall Offline

Can you zip your entire library and the VI that you are compiling?  I only have your initial library post and the update translator you just posted and it compiles fine here.  Based on your posted text file, the issue may be you have turned on DEBUG messages in the Arduino IDE and that output is making the Arduino Compatible Compiler for LabVIEW think there is an error.  Try turning off DEBUG messages.

Forum Timezone: UTC 0
Most Users Ever Online: 100
Currently Online:
8
Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
miche91: 33
scottj: 28
scadao: 23
Member Stats:
Guest Posters: 5
Members: 202
Moderators: 0
Admins: 3
Forum Stats:
Groups: 1
Forums: 2
Topics: 266
Posts: 1222
Newest Members:
pujacontrol
Administrators: geadmin: 22, filipealtoe: 96, Steffan: 356