External Moderators tmoulder Posted December 15, 2010 External Moderators Report Share Posted December 15, 2010 Attached is a program that writes a vector of 10 ML to the SD card as excel CSV data via a Data Table that acts as a buffer. This allows you to remove and re-insert the card without losing information. I developed it for my own education, and wanted to share. In the Read Me text are instructions for importing it into your own program, including used memory ranges, and some important info I discovered along the way, so be sure to read it. A couple of notes from the readme - I was unable to get the File Information FB to work, it always returned a status 16, so I did not use it. And there seems to be a bug in exporting / importing an Explore SD Contents screen object, the folder to open does not come across, and must be assigned manually (Excel 1, by the way). Enjoy! TM SD Card with Buffer.zip Link to comment Share on other sites More sharing options...
Cara Bereck Levy Posted December 16, 2010 Report Share Posted December 16, 2010 Hey Tim I saw the comments regardng bugs, and submitted them to the right people--thanks (and nice app!) Link to comment Share on other sites More sharing options...
Stein Yair Posted December 16, 2010 Report Share Posted December 16, 2010 Hi, Can you give us more information about the bugs you encountered? How can we simulate them? Link to comment Share on other sites More sharing options...
External Moderators tmoulder Posted December 16, 2010 Author External Moderators Report Share Posted December 16, 2010 Hi guys, As far as the File Info FB, I couldn't get anything from it besides a status of 16 and a success bit going high, everything else was "0". I shut down all SD Write operations and toggled the FB manually, and that was still the result. I was a little confused by the busy bit on this command, it uses (and requires at compile) SB 359, the Folder Report in Progress bit to control itself. However, there is also SB 343, File Report in Progress, which appears to be unused. After exporting the various parts of the program for further import, I then imported them into a blank program to make sure everything came in and started properly. The only problem I saw then was in the View SD Contents object, the Folder to View (set to Excel 1 in the source program) was blank. I made a note of that and published. Later yesterday evening, I tried importing the code into one of my own programs. This time, the View object's folder was randomly set to 100 (DT1). Lastly, a bug report of my own - in the Data Tables Copy Rows function in Net 23 of the source, the Target Row Number operand is set to "MI 0". This should be a constant "0". It didn't produce a problem in the test program, since MI 0 wasn't used for anything. Updated module attached. Thanks, TM SD Card with Buffer Rev 1.zip Link to comment Share on other sites More sharing options...
External Moderators tmoulder Posted December 16, 2010 Author External Moderators Report Share Posted December 16, 2010 One more observation: In the source program, I linked ML 400 to an INC FB with a 1 sec pulse to change data for testing purposes. I've since tried it linked directly to a rail, and the buffer quickly overflowed, despite constant SD writes. The 100mS pulse worked fine, and gradually brought the buffer down as well. It may be my card is not fast enough, but it looks like 100mS would be the best write speed, since you do want the buffer to eventually empty out. Thanks, TM Link to comment Share on other sites More sharing options...
Stein Yair Posted December 23, 2010 Report Share Posted December 23, 2010 Hi, I downloaded the application you posted, added the File Information function, and it seems to work correctly. See the application attached. Make sure you are using the latest OS and VisLogic versions. Buffered SD Source.vlp Link to comment Share on other sites More sharing options...
Cara Bereck Levy Posted May 17, 2011 Report Share Posted May 17, 2011 Hi Tim, Believe it or not, I just got a notice from an OS R&D guru...with a very long to-do list...At any rate, like Yair, he found no problem with you:)r app... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now