can a sequence change a export set append/overwrite flag


ekanderson

Recommended Posts

Have 3 export sets that output 24 hour Max, Mean, Min values (i.e., daily values) that append to a monthly or yearly file. These all write to to same file name. One line for Max, one for Mean, and one for Min.

Rather than duplicate the export sets,

I want to set the export sets' file name(s) to "Last_24_hr_dump.csv" or some such.

Set export sets' mode from append to Overwrite.

Export the 3 sets in overwrite mode.

FTP that file

Reset export sets' file names to what I normally use

Reset mode from Overwrite to Append on all the export sets.

and go about normal processing.

Link to comment
Share on other sites

You might be able to pull it off this way, but since export sets run asynchronously to the sequence, you'd have to put a delay after running it to wait for completion. You are better off using the file. functions to write to your files manually. This will give you total control over how and when the data is written and keep everything synchronous. This will also ensure that the file gets closed, as export and logging sets tend to hold the file open with the assumption that you'll start logging again.

Link to comment
Share on other sites

You indicate that I might be able to do this, but not indication HOW?????

Time isn't a problem, since there is low density data collection (10 channels at 6 minute intervals). Export should complete in about 5 seconds, and the next file access is about 6 minutes away.

The FTP can happen several minutes later.

So far as I can tell (at least for my application), export files close. My current sequences, never explicitly call exportend for any of my export sets. But I don't access the files for about a minute after calling beginexport. FTP'ing typically takes place about 20 seconds after the beginexport calls.

The logging sets, do indeed keep the file open, until explicitly stopped or renamed.

Have I been lucking out????

ek

Link to comment
Share on other sites

I haven't found HOW to

set the export file mode from "append" to "overwrite" IN a sequence.

Help file and forum searched. Information may be in there, but none of the search parameters I've used bring up anything that seems applicable to my situation. I know it can be done manually, but have yet to find how to do it programatically.

JUST WENT TO DF user guide.PDF and did a PDF search on "overwrite". It's in there!!!!. Thought the DF help feature was the User guide.

It's in DF help, but a search for "overwrite" w/o the quotes, doesn't find it!!!!! Made the mistake of believing that it wasn't there.

#%^&

DF Help will find "overwriteexisting" and "overwrite existing" tho. I did NOT use the 1st term. The 2nd term brings up Direct File Access stuff. Acrobat Reader seems to find all "overwrite"s.

Another quible about DF help. Search window slot for term to search. Would be nice to start the search with CR (Enter Key) rather than having to mouse over to the slanted arrow.

Sorry for the waste.

ek

Link to comment
Share on other sites

Truthfully, most of this stuff should be pretty apparent just by typing export.myexport. and then looking at the list of variables/functions that appear. This is true for programmatic access to just about everything in DAQFactory. Its why we don't go into much detail about it in the manuals.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.