Shipping Examples, SD card shield | 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
Shipping Examples, SD card shield
August 6, 2015
5:47 pm
Avatar
tronron
Member
Members
Forum Posts: 21
Member Since:
August 5, 2015
sp_UserOfflineSmall Offline

Has anyone got the shipping examples to write and then read data from an SD card?

I found a number of issues. In the host VI you must add a delay after the serial buffer flush, and the subsequent data read, to get it to work at all. ( I added 3 secs, to wait for reboot after the compile). Then it is supposed to read "ACC4LV Rocks!!"  back, but I get "  ocks!!-Examp    *Examp/". (The asterisk represents an ASCII character I cannot reproduce)

The correct number of characters is returned, and the "Examp" is supposed to be the directory and/or filename, so something has been written but it is all messed up. The "Data Header" string does not show up anywhere.

When I put the SD card in a win 7 computer, it appears blank. Perhaps this is to be expected as its probably not a PC compatible file format?

Any help would be appreciated.

 

Tronron

August 7, 2015
1:48 pm
Avatar
filipealtoe
Admin
Forum Posts: 98
Member Since:
March 12, 2015
sp_UserOfflineSmall Offline

Hello;

We haven't experienced any issues with this shipping example. In fact, we have heard from several other users they were able to use it without any problems. The files that are written to the SD Card should be compatible with a windows PC. Have you tried using a comparable example from the Arduino IDE and check if you get the expected result? I believe that should be your next step in debugging your setup. If the Arduino IDE example doesn't work, you probably have a hardware issue.

Filipe

Cheers
Filipe

February 13, 2018
9:27 am
Avatar
HaSe
New Member
Members
Forum Posts: 2
Member Since:
February 2, 2018
sp_UserOfflineSmall Offline

I have also issues with SD card. Example file "SD Card - Log Data.vi" works when but when I modified so that I can call, it does not even compile. Even I moved everything to my main vi, the card contains empty file with no data.

Hannu

Compile error:

1.0.0.21, Arduino/Genuino Uno
Loading configuration...
Initializing packages...
Preparing boards...
Verifying...
C:\Users\XXX\AppData\Local\Temp\58e9973bb6e2e908c6c199f5a9d39075.tmp\temp\temp.ino: In function 'void write_String_to_SD_card(boolean, unsigned char, boolean, String, boolean, String)':

temp:39: error: expected ';' before 'Node1699Out_temp'

File Node1699Out_temp;

^

temp:43: error: 'Node1699Out_temp' was not declared in this scope

Node1699Out_temp = SD.open(File_51.c_str(), FILE_READ);

^

temp:47: error: 'Node1699Out_temp' was not declared in this scope

Node1699Out_temp = SD.open(File_51.c_str(), FILE_WRITE);

^

temp:49: error: 'Node1699Out_temp' was not declared in this scope

Node1699Out = (int)&Node1699Out_temp;

^

temp:50: error: expected primary-expression before ')' token

((File*)Node1699Out)->write((char*)Data_322.c_str(), Data_322.length());

^

temp:50: error: expected ')' before 'Node1699Out'

((File*)Node1699Out)->write((char*)Data_322.c_str(), Data_322.length());

Multiple libraries were found for "SD.h"
^

temp:51: error: expected primary-expression before ')' token

Used: C:\Users\XXX\Documents\Arduino\libraries\SD
((File*)Node1699Out)->close();

^

temp:51: error: expected ')' before 'Node1699Out'

Not used: C:\Program Files (x86)\Arduino\libraries\SD
((File*)Node1699Out)->close();

^

exit status 1

February 14, 2018
1:14 am
Avatar
Steffan
Admin
Forum Posts: 408
Member Since:
March 12, 2015
sp_UserOfflineSmall Offline

The issue is you are using "File" as a control name in your subVI which happens to be a variable type in the Arduino language, so that is causing compilation issues.  Try changing this control name to something else, like "FileName".

February 15, 2018
6:32 am
Avatar
HaSe
New Member
Members
Forum Posts: 2
Member Since:
February 2, 2018
sp_UserOfflineSmall Offline

Chancing the "File" to "Filename" solved the issue. Thanks!

Another issue is that "SD File Exists" vi gives error "Arduino Comptible Compler for LabVIEW.lvlib:SD File Exists" not supported. Is there fix for it?

BR

Hannu

February 15, 2018
9:01 pm
Avatar
Steffan
Admin
Forum Posts: 408
Member Since:
March 12, 2015
sp_UserOfflineSmall Offline
Forum Timezone: UTC 0
Most Users Ever Online: 100
Currently Online:
24
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