(0)| 1/9/2026 8:03 AM | |
|
Joined: 3/11/2024 Last visit: 1/9/2026 Posts: 7 Rating:
|
Hi, i am using an MTP1000 with TIA20 (fw v20.0.0.4) and i am facing the same problem: After writing the file to USB-X62, i set a timeout of 20s before ejecting the storage, but the TraceViewer logs tells me that an error occurred with the EjectStorageMedium() system function. I read the previous answers and there is no reference to the need for the storage to be set for logging (https://docs.tia.siemens.cloud/r/en-us/v20/wincc-unified-javascript-object-model-rt-unified/hmiruntime-rt-unified/device-rt-unified/sysfct-rt-unified/sysfct.ejectstoragemedium-rt-unified), but it still does not work. I tried to increase the timeout duration in the .then() of the WriteFile promise, but nothing changes (i am talking about a 5Kb file). Do you have any work around to suggest? ------------------------------------------------------------------------------------------ |
Last edited by: Moderator_Lan at: 01/09/2026 08:55:06New subject after splitting |
|
| 1/9/2026 9:00 AM | |
|
Joined: 1/21/2013 Last visit: 1/9/2026 Posts: 4386 Rating:
|
Hi Mengojoni, The manual — also in version V21.00.00.00 — contains the following note on this subject:
This is because the system function ensures that logging stops write access. This function does not work if the storage medium is not used for logging. Even when used for logging, however, this function does not guarantee that the file system will correctly write data created by JavaScript. The easiest solution is to use the sync command, as explained by the German Technical Consulting team in the German section of the forum. The sync command is necessary because the Linux system buffers all write access to the storage medium to improve performance. Every five seconds, the system looks for pages that have been in the buffer for more than 30 seconds and writes them. Therefore, you would have to wait about 40 seconds. Kind regards |
Follow us on