.csv file imported to DaqFac


Recommended Posts

How do I setup from the the beginning to import information from a csv file? The file will be saved with a time stamp every min. I need to set up daqFac to get the different file every min. Of course the file will be labeled differently with the timestamp. 

Link to comment
Share on other sites

The part I am struggling with is that a folder is created and then a .csv file is created in that folder. So every min a folder and file are created. So what I need is to have it go to the folder and file every min and input that information. 

Link to comment
Share on other sites

Yes the folder will have a name such as "C:\File-201706020723" and changes with the time. then the file would be like "201706020723 meter #123456". I am really new to this and need help I guess from start to finish. I tried following the ex in ch 9 but could not get the data to import. I know I am messing it up either in the channel configuration or the scripting. Thanks for your time and help. 

Link to comment
Share on other sites

OK, but I still don't see how you know what the folder name is if the file and folder are being created outside DAQFactory.  But let's say you have a variable named timeStamp that has the time, and meterNumber that has the desired meter number.  You can generate the full path using formatDateTime() and string concatenation:

private string path = "c:\File-" + formatDateTIme("%Y%m%d%H%M", timeStamp) + "\" + formatDateTIme("%Y%m%d%H%M", timeStamp) + " meter #" + meterNumber

If you are still having troubles, please provide detail on what you have done so far.

Link to comment
Share on other sites

Archived

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