10/16/2023 10:02 AM | |
Joined: 10/16/2023 Last visit: 7/15/2024 Posts: 1 Rating:
|
Hi, I wrote the script in HMI TP1200 comfort panel for save data in pendrive. When I simulate in the PC, it can store the data in pendrive. But when i download to HMI and put the pendrive, It come out the error #$429 ActiveX Component cant create object. the problem is i cannot save into pendrive. Here is my script ' Write Data to File Dim fso, f, ts Filename_A1 = "\Storage Card USB\AOV.A1.csv\" 'Catch errors On Error Resume Next DateTime_A1 = Now() 'Create object Set fso = CreateObject("Scripting.FileSystemObject") If Err.Number <> 0 Then ShowSystemAlarm "Error #" & CStr(Err.Number) & " " & Err.Description Err.Clear Exit Sub End If ' If no file exists, create a new one If Not fso.FileExists(Filename_A1) Then fso.CreateTextFile Filename End If Set f = fso.GetFile(Filename_A1) If Err.Number <> 0 Then ShowSystemAlarm "Error #" & CStr(Err.Number) & " " & Err.Description Err.Clear Exit Sub End If Set ts = f.OpenAsTextStream(8, -2) ' mode "8" to append to file If Err.Number <> 0 Then ShowSystemAlarm "Error #" & CStr(Err.Number) & " " & Err.Description Err.Clear Exit Sub End If ' Write new set of values into file ts.WriteLine(User_Name & ";" & DateTime_A1) 'Tidy up ts.Close Set f = Nothing ShowSystemAlarm "Storage of the data was successful!" ------------------------------------------------------------------------------------------ |
Last edited by: Jen_Moderator at: 10/17/2023 07:23:08New subject after splitting |
|
10/17/2023 7:40 AM | |
Joined: 5/6/2022 Last visit: 8/13/2024 Posts: 439 Rating:
|
Hi AutoGen_1943166, Maybe the following FAQ can help you solve the problem? I wait your answer. Best regards!
|
If this Information really helps, you could use the Rate function |
|
Follow us on