porting libs / passing an array | Arduino Compatible Compiler for LabVIEW Discussions | Forum


Please consider registering

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —

— Match —

— Forum Options —

Minimum search word length is 4 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
porting libs / passing an array
June 10, 2016
1:49 pm
Forum Posts: 16
Member Since:
March 19, 2015
sp_UserOfflineSmall Offline



although the principle of porting an byte-array to a VI is described in the manual, could you post a simple sample code as an example (c-file & VI & settings in the translator VI)?


 Thanx a lot,



June 11, 2016
3:23 pm
Forum Posts: 21
Member Since:
August 4, 2015
sp_UserOfflineSmall Offline

Hi viwoi,

you can take look on my library for ESP8266, there is VI 'SoftAP Config' (folder Wifi Functions -> Underhood functions -> SoftAP Config) and you have to find it in translator. Or you can take look for MatrixMath library, it is using double array to compute matrices.

Basically, when you set type of input/output terminal as array, you are working same way with it like with other types terminal, so in translator if you want to access third element of it you have to write:

  %s[2] = some value; //in C/C++ array starts at index 0 so third value has index 2

Now let's say that you want to create array with some values and return it as output:

  %s = LVOneDimArray( number of elements, initial value);

So here is link for these VI packages:



I am doing there some extra things in my libraries (retype input array, ...) so I hope that you will not loose there.





June 16, 2016
4:38 pm
Forum Posts: 16
Member Since:
March 19, 2015
sp_UserOfflineSmall Offline

Hello Lubomir,


thank you for the description and code.

Actually, I intended to port the library for the CAN-bus-shield from seeedstudio (written in C++).

Since C++ porting didn't work (trying to create an object failed), I tried to write my own native functions, which are using an array as parameter (in & output) and implement them


I will have a look on your comment " %s = LVOneDimArray( number of elements, initial value);" in the future. Hope to be successfull.


Thanks again

Forum Timezone: UTC 0

Most Users Ever Online: 33

Currently Online:
3 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

John: 18


Dan6077: 11

Member Stats:

Guest Posters: 0

Members: 80

Moderators: 0

Admins: 3

Forum Stats:

Groups: 1

Forums: 2

Topics: 58

Posts: 289

Newest Members: Travlissah, viktorIcera, HowardClouG, Dianecet, Produktnaodchudzaniex

Administrators: geadmin: 5, filipealtoe: 35, Steffan: 89