You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old June 12th, 2008, 05:37 AM   #31
Combo
Lifetime Supporting Member
Belgium

Combo is offline
 
Join Date: Jul 2002
Location: Belgium
Posts: 2,641
Hihi

I tried this, CloseAllLogs, and I added an alarmpage to show system alarms, warnings...

When I stop the logging, I get a message that logging is stopped. When started, same thing.

Works good and no lost data now...

Looks good now.

Thanks




Quote:
Originally Posted by JesperMP
Yes, that is why you have to use the StopLogging and StartLogging functions. There is also CloseAllLogs and OpenAllLogs.
Again, I am not sure that the consequences are so grave if you remove the card without stopping the datalogs, if the registry values have already been set.
Anyway, try to program CloseAllLogs and OpenAllLogs. It should reestablish all logging.

If this is not acceptable to you, try to see if you can use the network logging that Jeebs mentioned.
  Reply With Quote
Old June 12th, 2008, 06:00 AM   #32
Combo
Lifetime Supporting Member
Belgium

Combo is offline
 
Join Date: Jul 2002
Location: Belgium
Posts: 2,641
Hmm

I do still have a little problem...

When I take out the MMC after closing and stopping the logging, then I get no more errors, that's okay now..

but, after re-inserted and starting the logging, the appending in CSV file did work anymore ?

All these troubles, hmmzz, I hoped that logging on an MMC was no problem, but, hmmmm....

Is logging to a network location better ?
  Reply With Quote
Old June 12th, 2008, 06:23 AM   #33
JesperMP
Lifetime Supporting Member + Moderator
Denmark

JesperMP is offline
 
JesperMP's Avatar
 
Join Date: Feb 2003
Location: Copenhagen.
Posts: 13,328
Reading the online help, it may look like you have to use both StopLogging and CloseAllLogs as well as both OpenAllLogs and StartLogging.
__________________
Jesper
3 strikes and you're out
  Reply With Quote
Old June 12th, 2008, 06:40 AM   #34
Jeebs
Member
Belgium

Jeebs is offline
 
Join Date: Feb 2007
Location: Leuven
Posts: 1,029
Quote:
Originally Posted by JesperMP
Reading the online help, it may look like you have to use both StopLogging and CloseAllLogs as well as both OpenAllLogs and StartLogging.
That does kinda make sense.

StopLogging
CloseAllLogs
Remove MMC
Replace MMC
OpenAllLogs
StartLogging

Think it should be done in that order.

And yes, I find that logging to a network drive is sooooo much better. 'Unlimited' space, accessable from your desk ,......
  Reply With Quote
Old June 12th, 2008, 02:35 PM   #35
Combo
Lifetime Supporting Member
Belgium

Combo is offline
 
Join Date: Jul 2002
Location: Belgium
Posts: 2,641
:-)

A great advantage is that we don't need OPC, the CSV files are usable ...


I'll try this order...
Quote:
Originally Posted by Jeebs
That does kinda make sense.


StopLogging
CloseAllLogs
Remove MMC
Replace MMC
OpenAllLogs
StartLogging

Think it should be done in that order.

And yes, I find that logging to a network drive is sooooo much better. 'Unlimited' space, accessable from your desk ,......
  Reply With Quote
Old June 12th, 2008, 02:41 PM   #36
Combo
Lifetime Supporting Member
Belgium

Combo is offline
 
Join Date: Jul 2002
Location: Belgium
Posts: 2,641
okay

okay, weird, but okay

Quote:
Originally Posted by JesperMP
Reading the online help, it may look like you have to use both StopLogging and CloseAllLogs as well as both OpenAllLogs and StartLogging.
  Reply With Quote
Old June 14th, 2008, 06:01 PM   #37
Combo
Lifetime Supporting Member
Belgium

Combo is offline
 
Join Date: Jul 2002
Location: Belgium
Posts: 2,641
Okay, this is what I do now

Hi, in the coming weeks I will check if it's okay now. I did a small test and then stopped the logs, pulled out the card and I have this data:


The script is archiving the positions data. Every time a position screen is lef (on cleared), this script is called to update the saved data on the MMC:




My counts, every time a new product is finished, the count value changes, on change => log. The zero comes from the 'reset to zero' button:




When is the machine actually running:




Messages, 1 stands for an Alarm, 64 stand for an operator action:





I now have a lot of usefull data to check what happens on the machine. A good thing is that OPC is not needed to get data on a server. I think I will copy these active logs every minute to a server location. I hope the IT people can write something in access or something...

Last edited by Combo; June 14th, 2008 at 06:07 PM. Reason: adding info
  Reply With Quote
Old June 14th, 2008, 06:27 PM   #38
CharlesM
Member
United States

CharlesM is offline
 
Join Date: Aug 2005
Location: Arkansas
Posts: 1,129
Good job. I guess you see some of the power of scripts.
  Reply With Quote
Old June 16th, 2008, 02:42 AM   #39
Jeebs
Member
Belgium

Jeebs is offline
 
Join Date: Feb 2007
Location: Leuven
Posts: 1,029
Quote:
Originally Posted by Combo
I now have a lot of usefull data to check what happens on the machine. A good thing is that OPC is not needed to get data on a server. I think I will copy these active logs every minute to a server location. I hope the IT people can write something in access or something...
Create new logs. Identical to the ones you are using now, except they should be logging to a serverlocation. IT needs to make sure that location is shared etc....

Left tree-structure > Device settings > Scheduler > Create new Job.

Set Event to 1 min

In the function list search for 'CopyLog'

Create one of these functions for each log you want to transfer every minute.

-Configure if its a data or alarm log
-Destination should be the log that logs to servers (new ones)
-Source should be the logs you currently use
-Mode.......not sure here, but think it should be append, need to test this.....
-Delete source log => No

This will copy the configured logs to a server location every minute.
  Reply With Quote
Old June 16th, 2008, 03:53 AM   #40
Combo
Lifetime Supporting Member
Belgium

Combo is offline
 
Join Date: Jul 2002
Location: Belgium
Posts: 2,641
just what I need

just what I need

Thanks Jeebs !!

We will use this...

No need for OPC... :-)



Quote:
Originally Posted by Jeebs
Create new logs. Identical to the ones you are using now, except they should be logging to a serverlocation. IT needs to make sure that location is shared etc....

Left tree-structure > Device settings > Scheduler > Create new Job.

Set Event to 1 min

In the function list search for 'CopyLog'

Create one of these functions for each log you want to transfer every minute.

-Configure if its a data or alarm log
-Destination should be the log that logs to servers (new ones)
-Source should be the logs you currently use
-Mode.......not sure here, but think it should be append, need to test this.....
-Delete source log => No

This will copy the configured logs to a server location every minute.
  Reply With Quote
Old June 17th, 2008, 01:30 AM   #41
Combo
Lifetime Supporting Member
Belgium

Combo is offline
 
Join Date: Jul 2002
Location: Belgium
Posts: 2,641
hmm

Weird thing happened this morning,

I pulled out the card (after stopping the logs),

checked the CSV's,

replaced the MMC,

WRONG FILESIZE, PRESS YES TO CORRECT THIS ERROR AUTOMATICALLY,

I did that, all current data erased and started with a new log...

What can be the cause of this ?


And I have another question, when shutting down the machine, the panel goes of too, is this no problem for the MMC ?
  Reply With Quote
Old June 17th, 2008, 07:02 AM   #42
cjd1965
Member
United Kingdom

cjd1965 is offline
 
Join Date: Apr 2007
Location: UK
Posts: 1,546
Did you edit the file with Excel for example, and save the edited version back to the memory card?
Try to copy the CSV file to a hard drive folder and edit the hard drive filenot the MMC file
  Reply With Quote
Old February 13th, 2009, 09:37 AM   #43
Combo
Lifetime Supporting Member
Belgium

Combo is offline
 
Join Date: Jul 2002
Location: Belgium
Posts: 2,641
Ip

SmartTags("File") = \\192.168.0.5\C:\HISTORIAN\ & CStr(SmartTags("HISTTAG")) & ".csv"

I'll test this line Monday. Hope it 'ill work.

Greetz



Quote:
Originally Posted by Jeebs View Post
As long as you use: \\servername(or IP)\shared folder(or drive)\
As long as the server exists and the folder/drive is shared, then it should be no problem.
The logs will be .csv format and will be 'in use' as long as the runtime is running. 'In use' means should you open it, with excel for example, while the runtime is still active, it will stop logging.
We use OP270.......even those, without built in ethernet, can log to servers.
I suppose it should be possible to make the script save the .txt file on a server also.
  Reply With Quote
Old October 22nd, 2017, 01:11 PM   #44
Boris007
Member
Serbia

Boris007 is offline
 
Join Date: Aug 2008
Location: Novi Sad
Posts: 5
Quote:
Originally Posted by JesperMP View Post
Charles, your script is OK on a PC, but Jeebs wants to log the data on a CE panel, so the script code is quite different.

Here is a sample project where data is store to a flash card on a Windows CE panel:
http://support.automation.siemens.co...ew/en/26107212
Please provide me instructions on how to define "DB1" in tags so that everything will work (in CopyDB1FromPLCToFile.txt)?

For i = 0 To 24
'HARDCODE DB NUMBER HERE !!
ts.WriteLine (CStr (SmartTags ("DB1") (i)) & "; DBW" & CStr (i * 2))
Next

The same question for variable: strStatusMessage

  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Citect Vs WinCC - Long Doug_Adam LIVE PLC Questions And Answers 22 October 3rd, 2014 12:56 PM
Anyone tried WinCC Flexible and OPC ? JesperMP LIVE PLC Questions And Answers 4 July 20th, 2007 10:40 AM
WinCC Flexible Quirks tvey LIVE PLC Questions And Answers 5 May 3rd, 2007 05:57 AM
WinCC Flexible and Data logging Prince LIVE PLC Questions And Answers 5 January 2nd, 2007 05:18 AM
Simatic Wincc Flexible 2004 -->2005 STL??? LIVE PLC Questions And Answers 8 August 29th, 2006 05:42 AM


All times are GMT -5. The time now is 05:21 PM.


.