Jump to content

DT to SD as CSV


Recommended Posts

  • External Moderators

Sorry, couldn't resist :D

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?



Link to comment
Share on other sites

  • 6 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...