Bicky22 Posted August 11, 2014 Share Posted August 11, 2014 Hi everyone, Is there an easy way to export full arrays? I have always used the Export in the workspace to export variables, but I am having difficulty exporting full arrays. I have also used logging to send out batches of data, but in this case I would like the program to see the data before it is exported so it can analyze the data. This way the program can decide if it is good or bad, if good, export the data and delete the old data file. Thank you for your help in advanced Link to comment Share on other sites More sharing options...
AzeoTech Posted August 12, 2014 Share Posted August 12, 2014 Export sets will export arrays. Just don't put [0] in the expression so the whole array is included. Alternatively, you can write any data in pretty much any format you want using the file. functions, but that is slightly more involved (requires script). Link to comment Share on other sites More sharing options...
Bicky22 Posted August 12, 2014 Author Share Posted August 12, 2014 Thank you for your help. When I don't include brackets in the expression, I only see the last value of the array in the export file. For example (i made this script so every number in the array was different. 0-99) private.i=0var.array=0 For( i=1, i <100, i++) array=i delay(.05)endfor beginexport(testexport) . the export set exported the expression array (with no brackets). The only number I see in the file is 99. I would like to see 0-99 Link to comment Share on other sites More sharing options...
AzeoTech Posted August 12, 2014 Share Posted August 12, 2014 Make sure you are set to Snapshot mode with an interval of 0. Link to comment Share on other sites More sharing options...
Bicky22 Posted August 12, 2014 Author Share Posted August 12, 2014 I was on fixed interval, however snapshot mode at 0 interval, is still only exporting one value. 0 with no brackets. Would it be easier to diagnose if I set you the .ctl file? Link to comment Share on other sites More sharing options...
AzeoTech Posted August 12, 2014 Share Posted August 12, 2014 Yes, that would definitely help Link to comment Share on other sites More sharing options...
Bicky22 Posted August 12, 2014 Author Share Posted August 12, 2014 Awesome, thank you... Where do I send it to? Link to comment Share on other sites More sharing options...
AzeoTech Posted August 12, 2014 Share Posted August 12, 2014 Post it here, unless its private, then email to support @ Link to comment Share on other sites More sharing options...
Bicky22 Posted August 12, 2014 Author Share Posted August 12, 2014 Here you are. Testarray.ctl Link to comment Share on other sites More sharing options...
Bicky22 Posted August 14, 2014 Author Share Posted August 14, 2014 Any thoughts on the exporting? Thanks Link to comment Share on other sites More sharing options...
AzeoTech Posted August 15, 2014 Share Posted August 15, 2014 I'm not sure the Export set is going to work the way I thought. Instead use the File. functions, specifically File.Open(), file.writeDelim() and File.close() Link to comment Share on other sites More sharing options...
Bicky22 Posted August 15, 2014 Author Share Posted August 15, 2014 I can do that. Thank you for the help. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.