Porting Ethernet Library - pass Strings | 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
Porting Ethernet Library - pass Strings
August 24, 2015
7:11 am
Avatar
tpostman
Nuremberg, Bavaria - Germany
New Member
Members
Forum Posts: 1
Member Since:
August 21, 2015
sp_UserOfflineSmall Offline

Hello,

i am trying to port the Arduino Ethernet library. My step by step approach for this is to take the "UDPSendReceiveString" as an example.

At the moment i fail at the point passing a string pointer or char array to the read function. In the porting library part of the manual the "LVArray.h" is mentioned but i did not find an example. Maybe somebody can have a look at my code and give me some hints for further programming.

Thanks in advance.

Tobias

August 24, 2015
2:22 pm
Avatar
Steffan
Admin
Forum Posts: 408
Member Since:
March 12, 2015
sp_UserOfflineSmall Offline

Please refer to the Porting an Arduino Library to LabVIEW section of the user manual.  Specifically the paragraph below.  It specifies the syntax to use to obtain a C pointer to an array by using the ptr() member.  For a string, this goes a little deeper in the implementation of the Arduino String class.  Refer here for details.  You can use a similar member c_str().

A special case to be aware of is the use of array datatypes as inputs or outputs.  This gets more advanced since the LabVIEW array implementation is handled in a C++ class, located in “[LABVIEWDIR]\vi.lib\Aledyne-TSXperts\Arduino Compatible Compiler for LabVIEW\Arduino Libraries\LVArray\LVArray.h".  Common needs may be to index a certain element of an array, get the size of the array, or obtain a pointer to the array within the C code in the Translator.vi.  For example if an input array is called Array123, one can index the 10th element of that array using the syntax Array123[10].  One can obtain the size of the array with the syntax Array123.size() and can obtain a C pointer to the array using Array123.ptr().  These may be required in order to pass array data to C functions that expect it.  You can refer to LVArray.h for a complete list of available array C++ methods.

January 27, 2016
8:31 pm
Avatar
pboughner
New Member
Members
Forum Posts: 2
Member Since:
December 4, 2015
sp_UserOfflineSmall Offline

Did you get this resolved?

I plan on tackling this after the current FRC build season to introduce new programmers to our team. I would like to use a W5100 Ethernet Shield /w SD Card to plug into a TL-WR702N for wireless connectivity. This will hopefully replicate the current control system with LabView enough to make the jump to the RoboRIO less challenging.

 

Paul

June 29, 2016
8:29 pm
Avatar
jared.ocampo
Member
Members
Forum Posts: 4
Member Since:
May 4, 2016
sp_UserOfflineSmall Offline

Was anybody able to port succesfully the Ethernet library to use the Ethernet shield??

Jared

July 4, 2016
11:13 pm
Avatar
jared.ocampo
Member
Members
Forum Posts: 4
Member Since:
May 4, 2016
sp_UserOfflineSmall Offline

tpostman said
Hello,

i am trying to port the Arduino Ethernet library. My step by step approach for this is to take the "UDPSendReceiveString" as an example.

At the moment i fail at the point passing a string pointer or char array to the read function. In the porting library part of the manual the "LVArray.h" is mentioned but i did not find an example. Maybe somebody can have a look at my code and give me some hints for further programming.

Thanks in advance.

Tobias

Hi Tobias,

were you successful in the porting of the arduino ethernet library??

Jared

January 17, 2018
1:31 pm
Avatar
alenthomas
New Member
Members
Forum Posts: 2
Member Since:
January 17, 2018
sp_UserOfflineSmall Offline

Was anybody able to successfully port the Ethernet library to LabVIEW to use the Ethernet shield??

April 21, 2018
1:50 pm
Avatar
James
Member
Members
Forum Posts: 3
Member Since:
April 21, 2018
sp_UserOfflineSmall Offline

alenthomas said
Was anybody able to successfully port the Ethernet library to LabVIEW to use the Ethernet shield??

hello

Did you solve the problem?Would you share it if you solved it?

January 13, 2020
4:24 am
Avatar
Steffan
Admin
Forum Posts: 408
Member Since:
March 12, 2015
sp_UserOfflineSmall Offline

James said

alenthomas said

Was anybody able to successfully port the Ethernet library to LabVIEW to use the Ethernet shield??

hello

Did you solve the problem?Would you share it if you solved it?

  

An Ethernet Addon has been created and posted here:

https://www.geverywhere.com/et.....net-addon/

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