External Moderators tmoulder Posted December 1, 2010 External Moderators Report Share Posted December 1, 2010 Sorry, couldn't resist I've been wracking my brain about this, and was wondering if anyone has tried it - or perhaps if it's even necessary. I'm working on a project where data is to be stored by the Vision to an SD card as an excel file (.csv if fine). Periodically, the user would remove the SD card to collect data. Simple, right? But when the card is removed, the system may continue to run, and I don't want to lose any data. My first thought was to use a data table as a buffer. Data collected goes into the buffer, and when the buffer is full, write to SD card, wipe the table and restart from the beginning. Simple, right? Thing is, it seems from the docs that I can write a DT to an SD, but not in the form of a CSV. It's two separate functions. And I don't want the user to have to convert the DT to a CSV via SD Suite, because that's one more piece of software and one more step to getting their data. It occurs to me I could read each row of data out of SD into operands, then write that line to CSV, then repeat. I get the sense this could take a long time to accomplish with a substantial buffer DT full of ML values, and my gut tells me this could be fraught with pitfalls. Is there a utility somewhere I am overlooking that writes DT to SD as CSV, or has anyone else faced a similar challenge in the past, and have some handy advice? Thanks! TM Link to comment Share on other sites More sharing options...
Stein Yair Posted December 1, 2010 Report Share Posted December 1, 2010 There is no direct way to accomplish the operation you described. The workaround of storing the value in an operand and then sending it to the Excel file in the SD card is the correct and regular way to do that. Writing each row takes one scan which is about 2ms. Even with hundreds of rows it won't take that long. Link to comment Share on other sites More sharing options...
External Moderators tmoulder Posted December 1, 2010 Author External Moderators Report Share Posted December 1, 2010 Thanks! Link to comment Share on other sites More sharing options...
Davenj Posted January 4, 2017 Report Share Posted January 4, 2017 I also have a need for the customers (V130) to convert a DT to .csv on the SD card when required. The interval for doing this is not known, customer driven. The data table has 8 columns and 1000 rows. Are there any future plans to incorporate this feature for DT's? Link to comment Share on other sites More sharing options...
MVP 2023 Joe Tauser Posted January 7, 2017 MVP 2023 Report Share Posted January 7, 2017 Probably not. The Vision series is mostly mature from a functionality standpoint - they've literally filled it's little CPU brain with functionality. Converting file types is a job for a real computer, which is why this sort of application is pushed toward the new UniStream. Joe T. 1 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