2/23/2024 10:33 AM | |
Posts: 1 Rating:
|
Hey. I was wondering if you could help me as well. I've set up a user that has every right possible in runtime. When i try to write or append a file to my USB nothing happens. let usbPath = "/media/simatic/X61/"; let fileName = "Written.dat"; let fileName2 = "Appended.dat"; let filePath = (usbPath + fileName); let format = NTFS; HMIRuntime.FileSystem.WriteFile(usbPath + fileName, "my utf8 string", format).then( function() { HMIRuntime.Trace("Write file finished successfully"); }).catch(function(errorCode) { HMIRuntime.Trace("Write failed errorcode=" + errorCode); }); HMIRuntime.FileSystem.AppendFile(usbPath + fileName2, "my added utf8 string", format).then( function() { HMIRuntime.Trace("Write file finished successfully"); }); Do I have to set up the permission on the panel it self, or what Am I missing? ------------------------------------------------------------------------------------------ |
Last edited by: VGATM at: 02/23/2024 10:38:36Last edited by: The Helping Hand at: 02/23/2024 11:41:45New subject after splitting |
|
2/23/2024 11:23 AM | |
Joined: 1/21/2013 Last visit: 3/24/2025 Posts: 3670 Rating:
|
Hi VGATM, The syntax for the WriteFile method is WriteFile(path,data,encoding). "NTFS is not an encoding value, try UTF-8 instead. If this does not solve your problem, please provide the trace output. Kind regards |
Follow us on