Wincc flexible to access timer in structure at s7-1200

apetkov5

Member
Join Date
Aug 2007
Location
x
Posts
101
Dear all,

I nead to access parts of structures from s7-1200 plc in wincc flexible running on PC.

My problem is that plc programm is done by another company, and i do not have access to it, but i have DB scheme. See it below:

Aut_Change_G01A Struct 2.0
Timer IEC_TIMER 0.0
ST Time 0.0 T#0ms
PT Time 4.0 T#0ms
ET Time 8.0 T#0ms
RU Bool 12.0 FALSE
IN Bool 12.1 FALSE
Q Bool 12.2 FALSE
Time Time 16.0 T#12H
Aut_Change_G01B Struct 22.0
Timer IEC_TIMER 0.0
ST Time 0.0 T#0ms
PT Time 4.0 T#0ms
ET Time 8.0 T#0ms
RU Bool 12.0 FALSE
IN Bool 12.1 FALSE
Q Bool 12.2 FALSE
Time Time 16.0 T#12H

So, I nead to access to value Time, at 16.0 of structure 2.0 and to value Time, at 16.0 at structure 22.0

Any idea how to do this?

Best regards,
Ante
 
do you need read or write access? what parts you need access to?
i think you should be able to read with DBx.Aut_Change_G01A.Timer.ET for elapsed time, e.g.
 
i nead to read and write acess (change variable).

problem is in that i use wincc flexible rt to access s7-1200 without opc server, so i nead to use s7 300/400 driver to communicate with s7 1200 plc.

in this situation, siemens forum says that wincc flexi does not support structures (i.e. IEC TIMER) but can access to datas from structures.

my problem is in that many IEC TIMERs (structures) are inside same DB (i.e. DB5).

if there was one DB for one structure i will setup it as DBx.DBW16, and set tag as timer, but heare i have many structures and DBx.DBW16 point to many places (as may as there is IEC timers)....

any idea?
 
if you have many timers in one DB then someone used timers as multi instance, aka the timers are part of the static data of certain function block DB.

the usefullnes of that is when you have many timers in one FB you save some DB in places where you're limited by a number of max DBs, and the program is cleaner.

still, the access would be as to access all the rest variables. it would just be needed to know the offset.

i do not know as you would be able to write data to timers since timers store that values in timer definition function (TON,TOF,TP) which is part of code, but i do not see the problem in reading values like ET, Q, etc.

as i recall it is possible only to reset the timer by writing 0 to PT but not through writing through DB directly.

EDIT:
so to access, for instance ET, of certain timer, you would have to now it's offset in respective DB (DB5)
 
Last edited:
if you have many timers in one DB then someone used timers as multi instance, aka the timers are part of the static data of certain function block DB.

the usefullnes of that is when you have many timers in one FB you save some DB in places where you're limited by a number of max DBs, and the program is cleaner.

still, the access would be as to access all the rest variables. it would just be needed to know the offset.

i do not know as you would be able to write data to timers since timers store that values in timer definition function (TON,TOF,TP) which is part of code, but i do not see the problem in reading values like ET, Q, etc.

as i recall it is possible only to reset the timer by writing 0 to PT but not through writing through DB directly.

EDIT:
so to access, for instance ET, of certain timer, you would have to now it's offset in respective DB (DB5)

Only information that I have is

DB5:

Aut_Change_G01A Struct 2.0
Timer IEC_TIMER 0.0
ST Time 0.0 T#0ms
PT Time 4.0 T#0ms
ET Time 8.0 T#0ms
RU Bool 12.0 FALSE
IN Bool 12.1 FALSE
Q Bool 12.2 FALSE
Time Time 16.0 T#12H

Aut_Change_G01B Struct 22.0
Timer IEC_TIMER 0.0
ST Time 0.0 T#0ms
PT Time 4.0 T#0ms
ET Time 8.0 T#0ms
RU Bool 12.0 FALSE
IN Bool 12.1 FALSE
Q Bool 12.2 FALSE
Time Time 16.0 T#12H

and I nead to read and change value selected in red text.
Time 12H to be changed to 10 H etc..,

please say what offset do you mean?
 

Similar Topics

Hi, i am working on a project. and its HMI is remotely control so for that I am using the option of smart server in WinCC flexible but I am...
Replies
5
Views
2,802
Hi, We have upgraded our laptop which includes Windows 11. It appears that WinCC flexible 2008 advanced does not support Windows 11. What...
Replies
11
Views
265
Hello everyone I Have an Issue with the usage of recipes in Wincc Flexible 2008, I create the recipe to change the values in a fast way The...
Replies
0
Views
106
Hi colleagues.We do data logging system.We want to record three temperatures under a certain condition. We prepared the project as follows. We do...
Replies
1
Views
755
Hello to everyone. I change the value of a "PQW" with a button in Wincc flexible. The code of the button is defined as M102.0. Value reset...
Replies
10
Views
4,575
Back
Top Bottom