I use SW TIA Portal V11 SP2 and OP TP1200 Comfort. I work on application where I need to show approximately 20 trends on one screen with measured values. X axis is not time, but number of measuring. I need to actualize trend with new data and shift by 1 position to left when new data are measured by PLC. Event, which signals new data, is triggered by PLC (increment some tag).
I used trend f(x)view. X axis is counter which is incremented every time when new measure occurs. Unfortunately, there is a problem. If measuring stop, the data from trend begin disappearing. Trend „forgot“ old data. If I set in trend properties „time span“, for example time span = 5 min, everything is OK. But If I set data range as 20 measuring points, the data begin to disappearing after some time.
I tried to solve this problem by data logging as historical data. I show in trend this historical data from data log. There is another problem I have not solved yet. My data log procedure:
PLC set auxiliary tag to 1 when PLC have new data for OP. In TIA Portal project for OP is Event – on change connected to auxiliary tag in PLC. This event starts many systems functions LogTag. Unfortunately, function LogTag is not possible to use in VBScript. I need to store all data in one moment. It works fine in simulation on PC. But when I try it on TP1200 it make mistakes in data store to memory. The effect is that when I change screen on panel the trends will completely destroys, they show nonsense data. I tried to store data in RDB, CSV and TXT formats. I have been searching for a cause of this problem and have found the problem is different time stamp in data log file. Maybe, It is caused by worse computing power of OP (everything is OK on PC simulation)
For illustration part of CSV log file
Good data log:
"Count_Meas ";"4.6.2012 10:05:14";1;1;41064420301,1111
"Sirka8_Meas";"4.6.2012 10:05:14";0;1;41064420301,1111
"Delka8_Meas";"4.6.2012 10:05:14";0;1;41064420301,1111
"Count_Meas ";"4.6.2012 10:05:15";2;1;41064420310,3935
"Sirka8_Meas";"4.6.2012 10:05:15";0;1;41064420310,3935
"Delka8_Meas";"4.6.2012 10:05:15";0;1;41064420310,3935
Error occurred in data log:
"Count_Meas ";"4.6.2012 10:05:15";2;1; 41036517353.2755
"Sirka8_Meas";"4.6.2012 10:05:15";0;1; 41036517353. //different time
"Delka8_Meas";"4.6.2012 10:05:15";0;1; 41036517353.7894 //different time
I think this is caused by some interrupt or parallel process during data logging to file. I don’t know how solve this problem.
Ace Rimmer