Problem with Long-term archiving using "standard project" SIEMENS

VictorBit

Member
Join Date
Sep 2012
Location
Sweden
Posts
103
Hello!,

Im having some problems with the function, "How do you do long-term archiving with WinCC flexible?".

Im using Siemens standard project which can be found ;

https://support.automation.siemens....objaction=csview&extranet=standard&viewreg=WW

___________________________
My hardware and software ;
Siemens MP277 Touch 10".
WinCC flex sp3.
Windows XP sp3.
___________________________


Okey the problem I'm having with this project is that when the script which executes once an hour I get and error which says, ERROR the system cannot find the fiel specified in the script <Copy_Archive, line 41>

I got the PC connection correct setup to my panel, my pc name is "cad2" and in the scheduled script "storagePath" I got \\cad2\Storage_data\ which is correct I know this is correct beacuse if I choose to store my Data logs to this location (\\cad2\Storage_data) the CSV file popups in my shard folder and is updated once every X defined minute.

-If i look at the panel under, "my computer", I see there is a created folder that the script has done ( I did remove it and it pop up again after the script has been executed). The folders name is "Cad2 and in the folder I got the subfolders, Storage_data\Year_2013\month\7\day_8.

-I save my data logs to the usb on my panel , \Storage Card USB\.

-If I choose \Storage Card USB\ instead of \\cad2\storage_data\ on my scheduled script everything works fine..
But this is not what I want to achieve. I want to scheduled script to copy the data_log file into my shared folder using the "folder struct, year/month/day/hour.

#############################################################################
Im using the standard project which can be found on

https://support.automation.siemens....objaction=csview&extranet=standard&viewreg=WW

ALL that I have changed is on the "Scheduler, "Job_1" copy_archive storagePath to \\cad2\storage_data\ which is my shared folder on my PC.


#############################################################################


I'm sort of stuck here, I don't know what it is.. Maybe you can't achieve this function with this script?..

If you need more information or pictures,ask.
Any help is appreciated!

Best regards Victor
 
Sounds like a problem with your script at line 41.

If it works when you save it to another location then it must be the location that's giving the error.

Could it be that the path is causing the issue? I know in other scripting languages you use a \ to tell a compiler to not regard a " or a ' as literal etc...

I'm guessing there's something like this going on with your script. Could you post the script (Copy Archive) ?

;-)

PS. It could also be something silly like the path is too long perhaps??
 
Dim fs, FCopyName, NameArchiv, Name_StoragePath
Dim Variable_Day, Variable_Month, Variable_Year, Variable_Hour

'Name des Original Archivs
'Name of the original archive
NameArchiv = "Archive_01"


'Nach einem Stundenwechsel die vorherige Stunde berechnen zur dynamischen Namensvergabe des Archivnamens
'After hour change, calculate the hour before to set the Archive name with a "dynamic" name
SmartTags("Day_Old") = DateAdd("h", -1, Now)

Variable_Hour = Hour(SmartTags("Day_Old"))
Variable_Day = Day(SmartTags("Day_Old"))
Variable_Month = Month(SmartTags("Day_Old"))
Variable_Year = Year(SmartTags("Day_Old"))


'Name des Speicherorts
'Name of the storage path
Name_StoragePath = StoragePath & "Year_" & Variable_Year & "\" & "Month_" & Variable_Month & "\" & "Day_" & Variable_Day & "\"


'Aufruf des Skipts "Create_Storage_Path" => Erstellung der Ordnerstruktur
'Calling the script "Create_Storage_Path" => create the new folder
Create_Storage_Path Name_StoragePath


'Name der Datei, der kopiert werden soll => Der Name setzt sich aus der "letzten" Stunde zusammen.
'Name of the file which should be copied => The name are composed from the "last" hour
FCopyName = "Press_01_" & Variable_Hour & "0.csv"



'Dateizugriff
'File access
Set fs = CreateObject("FileCtl.FileSystem")

'Vorhandenes Archiv kopieren
'Copying an availanle archive
fs.fileCopy (StoragePath & "Archive_01" & "0.csv"), (Name_StoragePath & FCopyName)


'Verwendeten Speicher wieder freigeben
'Used storage will be freed
Set fs = Nothing
, The hole proejct can be found on the link I have posted.
 
Also looking at this part of the script:
Code:
fs.fileCopy (StoragePath & "Archive_01" & "0.csv"), (Name_StoragePath & FCopyName)

Have you looked in the 'help' to see what fileCopy is looking for?

That looks to me (just guessing here) like it's trying to copy the file to your StoragePath\Archive_010.csv ??

Have you tried just having:
Code:
fs.fileCopy (StoragePath), (Name_StoragePath & FCopyName)
 
Have done that, it complains that It cannot find the "archive file".

I wonder, can I run a WinCCflexible PC_runetime application on the PC where I want the data is to be stored and only use the PC_Runetime for showing trends and keep my main HMI, which is a mp277 panel?
 
Also looking at this part of the script:
Code:
fs.fileCopy (StoragePath & "Archive_01" & "0.csv"), (Name_StoragePath & FCopyName)
Have you looked in the 'help' to see what fileCopy is looking for?

That looks to me (just guessing here) like it's trying to copy the file to your StoragePath\Archive_010.csv ??

Have you tried just having:
Code:
fs.fileCopy (StoragePath), (Name_StoragePath & FCopyName)

Ill test
 
That fileCopy command is passed two arguments Source and Destination I think.

So you are saying that your Source is \\cad2\Storage_data\Archive_010.csv as far as I can make out... and then you are copying that file to the destination which is \\cad2\Storage_data\Year\Month etc... etc...

You need to change your Source to be the correct file I think.

Try that. ;-)
 

Similar Topics

Hello, I am a plc engineer and I have a job to do in the NIGERIA 25000 TON GRAIN SILOS STORAGE CONTROL PANEL. A problem where the panel is not...
Replies
1
Views
123
The project on the operator workstation keeps disconnecting, even though I have an installation server and operating station set up through...
Replies
0
Views
59
I have a problem, I'm running an AE Licence Manager on a Windows 2016 Server, and my Window Maker is on another separate Windows 2016 Server. My...
Replies
0
Views
87
I have one old Ansaldo VFD from 37kW and it have only sign OFF on the display after put it on the 3x400VAC. Is there any idea, how to solve this...
Replies
1
Views
82
Hello, I need to write the following program in Ladder language, but I could not integrate the Fibonacci sequence into the ladder. Can you help...
Replies
23
Views
637
Back
Top Bottom