Navas Posted April 22, 2015 Report Posted April 22, 2015 hi, I want to recover the file (csv or utr) my SD.Readfile void (string sourceFolderName, sourceFileName string, string TargetFolder, bool resumeRead, Unitronics .....)My problem is with the string TargetFolder. Help me please it's urgrnt void bg_com_DoWork(object sender, DoWorkEventArgs e) { Ethernet eth = new Ethernet(txt_adresse_ip.Text, 20256, EthProtocol.TCP); PLC plc = PLCFactory.GetPLC(eth, 0); SD.Folder excel1 = plc.SD.Dir(SD.SdFolder.EXCEL_EXCEL1, ".csv", false, null); int i; for (i = 0; i < excel1.Files.Count; i++) { plc.SD.ReadFile(SD.SdFolder.EXCEL_EXCEL1, excel1.Files.Name, new ProgressStatusChangedDelegate(status_changed)); tsttxt = excel1.Files.Name; } plc.SD.ReadFile(SD.SdFolder.EXCEL_EXCEL1, excel1.Files.Name, destinationFile, true, new ProgressStatusChangedDelegate(status_changed)); } void status_changed(RequestProgress requestProgress) { if (requestProgress.NotificationType == RequestProgress.en_NotificationType.ProgressChanged) { maj_progress_bar(((int)requestProgress.Percentage).ToString()); } } delegate void Callback(string s);
Saragani Posted April 27, 2015 Report Posted April 27, 2015 "My problem is with the string and Boolean TargetFolder resumeRead." - You don't specify what is the problem... destinationFile is where to save the file in your hard drive. If it says TargetFolder then it means that it is a path where the file with be saved in. resumeRead is used in order to resume a file, if the transfer was canceled or interrupted in the middle.
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