MVP 2023 Flex727 Posted March 8, 2022 MVP 2023 Report Share Posted March 8, 2022 I have come up with a routine to write an entire Data Table to an SD card .csv file with one button press (or other action) in VisiLogic. It requires 6 ladder rungs. Has anyone come up with something better? By the way, it takes around 15-20 seconds for a 100-row Data Table. Link to comment Share on other sites More sharing options...
MVP 2023 kratmel Posted March 8, 2022 MVP 2023 Report Share Posted March 8, 2022 One quastion: is it only SD Delimited Line write metod needed? (.csv file on SD) Maybe Write Data table to SD file is better solution? Link to comment Share on other sites More sharing options...
MVP 2023 Ausman Posted March 8, 2022 MVP 2023 Report Share Posted March 8, 2022 Why not just export as a udt and convert it on the PC using Data Tables Editor. The ladder work is much simpler, and you've got the raw data stored safely off the system in another format before you convert it etc. See the end picture which in your case would be even simpler.... https://forum.unitronics.com/topic/3460-write-table-to-sd-with-date-stamp/ cheers, Aus Link to comment Share on other sites More sharing options...
MVP 2023 Joe Tauser Posted March 9, 2022 MVP 2023 Report Share Posted March 9, 2022 I write one line at a time as it happens. This is a case where having a conditional subroutine is actually a good idea. I have a subroutine to bump all the previous entries down one row (newest at the top) and then tack the newest one to the bottom of the .csv file: Is there a reason you're writing all 100 rows? Does the user remove or access the SD card regularly? Joe T. Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted March 9, 2022 Author MVP 2023 Report Share Posted March 9, 2022 18 hours ago, kratmel said: One quastion: is it only SD Delimited Line write metod needed? (.csv file on SD) Maybe Write Data table to SD file is better solution? In this case it was a specific customer request. They wanted a .csv file on the SD card and they wanted to be able to insert a card and have the entire file written at once. This was my solution. 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