7:11 am
August 21, 2015
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
2:22 pm
March 12, 2015
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.
8:31 pm
December 4, 2015
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
11:13 pm
May 4, 2016
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
1:31 pm
January 17, 2018
4:24 am
March 12, 2015
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:
6
1 Guest(s)