s71200 PLC-triggered logging on TP700 HMI - TIA Portal

swedeleaner

Member
Join Date
Dec 2013
Location
Göteborg
Posts
143
Hey guys!
Newbie here, have some experience in both S7 Classic and TIA V13, but would really like your opinions/help on a solution.

Hardware/Software Used:
S7-1215C
TP700 Comfort
TIA Portal V13 SP1 Upgrade 4

After hours of googling I found some hints, but nothing seemed like a complete solution.

I need two separate logs in CSV-format. I want to log each time a measurement is finished, so no timed events or button controlled triggers.
These logs are created and stored in the HMI, and will be reachable from the web-server,

I have two PLC-tags that would be suitable for triggers.
Is this possible using the Historical data -> Data log? I just cant find how to use bit triggered logging?
Several hints pointed at the system command "LogTag", but i just cant understand it should be used?

The only "Events" available for the data logs is "Overflow", and i guess this is an event used for when the log is full?

Or is the built in Data log function not suitable for this type of logging, do I need to use a script instead?
It seems like a quite simple function, but i´m having a really hard time configuring it.

Help is very appreciated! :geek:
 
Hei!

Just to clarify, what do you want to log when the measurement has finished? Something that has already happened? Or a (range of) single value(s)?
 
Maybe set up the logging as "on change" . Change the value in the PLC and the value is logged.
 
Logging a value on change is the way to do this. It may need some dedicated tags to be sent to the HMI if you need to display the reading as well.

You could also data log to the PLC memory card, which is a little easier to configure for logging on events. Its not easy to set up though.
 
Boneless:

I want to log something that is already stored in a number of variables. These vars are later set to 0 and next measuring cycle is started.
So I guess that "a range of single values" is accurate.

When you say "logging on change", you mean that all measurement tags is configured this way? This will result in logging event when all tags is set to 0 as well?

So just to be clear, there are no existing function to use a PLC-tag to trigger logging?
 
I think you should be able to do this with the On demand setting, as you stated:

"On demand":
The tag values are logged by calling the "LogTag" system function.


Never tried this myself tho.
 
Boneless:

I want to log something that is already stored in a number of variables. These vars are later set to 0 and next measuring cycle is started.
So I guess that "a range of single values" is accurate.

When you say "logging on change", you mean that all measurement tags is configured this way? This will result in logging event when all tags is set to 0 as well?

So just to be clear, there are no existing function to use a PLC-tag to trigger logging?

Why are you trying to solve this in HMI and not in the PLC program??? It seems a complex task for a midrange hmi, and a simple one if you only move the valid measurements in PLC to a tag that is logged. :confused:
 
Hello M_turk!

The existing solution is that the PLC logs it. The Values is then uploaded to an FTP.
But this solution isn´t working very well, and when we spoke to Siemens, they said that it would work much better if we let the HMI handle it since CSV-file creation and web server is built-in functions,

I just got assigned to it, i didn´t write the original code.
I guess it´s back to the drawing board...
 
I would use on change, and do not reset the values to 0. There is no reason that you should have to.
 
Hello M_turk!

The existing solution is that the PLC logs it. The Values is then uploaded to an FTP.
But this solution isn´t working very well, and when we spoke to Siemens, they said that it would work much better if we let the HMI handle it since CSV-file creation and web server is built-in functions,

I didn't mean that plc should handle the logging.. But it should prepare the tags..


I think you put your topic a bit off. You asked how to implement a solution, when I don't think it is clear what is the problem. (al least to me it is not). What are you trying to do?

"Something stored in a number of variables.."

Is that something a number of different measurements? pressure1, pressure2, pressure3...
Or is it many measurements of pressure1?

Why are you setting anything to 0? What is the purpose of that?

What is the average logging rate we are talking about? 10ms or 10s or 10min?


I may be wrong, but I have a feeling there is a much simpler solution to your problem than scripting in a panel, accessing txt files etc..
 
Thanks for your replys M_turk, i will try to be more precise.

There are a total of 5 measurements and 5 calculations between some of the measurements. These are stored in 10 variables in a data block, REAL format.
These variables is mirrored to tags i´ve created in WinCC.

There are two different modes of measurement, and these two modes needs separate logs. I have made two different logs for the two modes. Everything is fine until this point.

When it comes to actually trigger the logging, i can´t find a way to use a plc trigger to read the tags and log them. Only different time based triggers. I would like to use a PLC-trigger like "Mode1 measurement finished" or "Mode2 measurement finished" to trigger the log. But this seems impossible right now, or do you know any way to accomplish this?

Hopa my case is clearer?
 
You have your 10 variables. When all is finished move these to 10 new variables that is the tags to be logged. These are to be logged "on change". So every time you want to log you move your values to the logging tags and the values are logged. If you have mode 1 and 2 then create 10 variables for mode 1 and one for mode 2. Then move the actual values you want to log to the mode you want to log it to.

Focus your control of the logging to how you move your readings to mode 1 or 2.
 
Thanks for your replys M_turk, i will try to be more precise.

There are a total of 5 measurements and 5 calculations between some of the measurements. These are stored in 10 variables in a data block, REAL format.
These variables is mirrored to tags i´ve created in WinCC.

There are two different modes of measurement, and these two modes needs separate logs. I have made two different logs for the two modes. Everything is fine until this point.

When it comes to actually trigger the logging, i can´t find a way to use a plc trigger to read the tags and log them. Only different time based triggers. I would like to use a PLC-trigger like "Mode1 measurement finished" or "Mode2 measurement finished" to trigger the log. But this seems impossible right now, or do you know any way to accomplish this?

Hopa my case is clearer?

A bit.. still not sure why different mods, or why setting to 0, or what is the rate of measure..

But I would do it this way:
-mode1 measurement finished -> move measure to separate tag.
-mode2 measurement finished -> move to another tag.

Then, if you log these tags, even if not on demand or on change (but on change would be perfect for this), you will get what you want...

So let the panel log, but prepare in plc...

rQx said the same thing in other words so...
 

Similar Topics

Hi Folks. Has anyone used an SEW EI7C encoder with an S71200 PLC? If yes, how is it done? I use this same encoder in EI76 mode with a...
Replies
0
Views
254
I am wondering if anyone can direct me to how to set up communication between a pcb board with ProFinet chip interface and S71200 PLC. I am not...
Replies
20
Views
6,088
Hi all, Just starting to use the S7 Basic and wondered if there is a way I can export the PLC tags into csv? Thanks in advance
Replies
1
Views
2,596
Hi everyone I am completely new to using shift registers and am a bit stuck, my shift register works as should, it is for an overhead conveyor...
Replies
55
Views
15,530
Dear Experts, Warm Greetings ! By using TCON,TSEND,TRCV,TDISCON block,I am trying to make communication with my...
Replies
1
Views
1,486
Back
Top Bottom