VB Script in WinCC Flexible for Data Logging

erdemsvri

Member
Join Date
Jul 2009
Location
Germany
Posts
172
Hello

I want to record data to a storage card with WinCC Flexible 2007. I have found the script in plctalk but I am so new in scripting that I got confused I have some question I will be very happy if you can answer.

I am wanted to record data when machine is working in CSV format and on the HMI panel there is a IO state where the operator writes the frequency of the data logging like 15 minutes or something like that.

The MP277 should record date, time and preset value every 15 minutes for 5 seconds with the maximum frequency (5 seconds is constant). I mean the more data logged the better they say like 5000000 data each 5 seconds (I know 5 million is impossible but I write that to emphasize what I say) HMI shouldnt record when the machine is not working...There is a button on MP277 which deletes all the records and if data is not deleted before the card is full a warning message should appear and data should be logged on to the oldest log...

- I think of making a internal tag for machine start and stop which starts and stops logging (probem with emergency stop here!) this internal tag should record data and start a timer of 15 mins and after 15 mins the same process but I dont know if the HMI can do other job when the script is runing I mean could the script run background and HMI acts normally like there is noting going on?

- Can I use my external tags to call the script? What are the ways of calling a script? I mean can ı do something like that on HMI if a > 10 call script or if a == 1 call script (a is a external or internal tag)

Like I will put the timer to PLC and make a tag of it and use this tag to call the script which will record data to the card.
Is this possible?

I m stuck here I dont have the basic knowladge of scripting.
If I can figure how to call the script and stuff I will use the code in plctalk...Could somebody tell me how and why are they used basicly?

Thanks very much.
 
I have found the solution but not with a script.

But I also have found out we can call scripts on the change of a external tag.

Logging is hard to do by scripting but Siemens WinCC Flexible offer us the chance to log with its own logging function.

Take care
 

Similar Topics

I have 4 arrays. 1. -> arrdb1 (array of 52 bytes) 2. -> arrdb2 (array of 20 bytes) 3. -> arr1db300 (array of 20 bytes) 4. -> arr2db300 (array of...
Replies
3
Views
3,509
Please help me for some reason I cannot get the loop to continue, it is based on a screen name and if the screen is on the start page the script...
Replies
0
Views
1,939
I want to call an executable (or .bat-file )from inside a script using WinCC Flexible 2007. :scratch: Searching the net always seems to return...
Replies
6
Views
5,573
Hi. is it possible to create a script in WinCC Flexible, that uses Xcopy to copy several (large) folders and create a systemmessage if the copy...
Replies
3
Views
1,928
Hi, I have to convert my csv file to an excel sheet in Wincc Flexible 2008 for which I have written the following code snippet: 'Alarm_Log.csv'...
Replies
0
Views
5,256
Back
Top Bottom