Accessing PLC Variables from WinCC V6.0

RMA

Member
Join Date
Sep 2004
Location
North of Hamburg, Germany
Posts
2,052
I've got to add a few screens to an existing WinCc project. It's five or six years since I last worked with WinCC and I'm having trouble accessing the variables (three analog, four BOOL) in the PLC.

My first attempt was to try accessing the PLC variable list in WinCC, there I could see my variables but when I tried to choose them as the variable parameter for the Input/Output field I got an error message saying that the data types were incompatible (although they don't apear to be).

I then tried setting the "B"-Flag in the Symbol Table for Step7 and Step7 created a Symbol by connecting the CPU name with a "/" to the Symbol in the Symbol Table. This looked exactly as some of the entries in the WinCC variable list ("Internal variables"?, the WinCC server's half a mile away, with no internet connection!), however, after saving the Symbol Table, the newly created Symbols do not appear in the WinCC variable list. Curiously enough, some of the variables which do appear in the WinCC variable list do not have the "B"-Flag set (actually, as far as I can see, none of them do).

One thing I've noticed is that all the variables seem to be in DBs, is this a "must" for WinCC, or can I access Markers, and I/Q-Bits directly?

As usual, the help-files are full of useful information on how to do all sorts of weird and wonderful things, but something as basic as actually accessing the variables is nowhere to be found!

Thanks in advance for any help.

Cheers

Roy
 
Maybe a stupid question. But whats the B-flag?

Quick and dirty way:

Open WinCC Explorer > Tag Management > Simatic S7 Protocol Suite > Select your current driver (Profibus, IE, named connections, whatever) > You will see one or more Drivers > Right-click on driver to PLC u'd like to create new grp or new tag, if new grp, right click new grp to create tag in that grp > Tag properties window will appear, insert name, data type and press select to configure the adress you'd like. Can be Bit memory, DB, I or Q's.
Click OK twice and you have a new tag.

Another way to do it would be to add certain attributes in Step7 Manager, but it'll take too long to explain...:D and it'll require a defined setup method....

Used the quick and dirty way a few times and it's the fastest to get new tag...:D
 
Maybe a stupid question. But whats the B-flag?



Oops, sorry, switching to English, I see that it's called the "O"-Flag there (didn't realise they changed the definitions at that level). It's the Special Object Property "Operator Control and Monitoring" (Bedienung und Beobachten in German, hence the "B"-Flag). These Flags are shown in the Status column of the Symbol Editor and you can see the details by clicking on View -> Columns R, O, M, C, CC.

The O/B-Flag tells WinCC that this variable is to be used and you can set a load of parameters depending on the data type, for example for a Real, (as in my case), you can also define upper and lower limits, initial value, substitute value, whether to use a substitute value and under what circumstances.

I remeber using this parameter the last time I worked with WinCC, but apparently I've forgotten something fundamental, since the variable is not automatically recognised in WinCC, despite being parameterised.

I'll give your quick and dirty method a try, when I get a chance, but it probably won't be today, as we've got the kick-off meeting with the contractor for the new project in half-an-hour.

Thanks for the help.

Cheers

Roy
 
RMA said:
I remeber using this parameter the last time I worked with WinCC, but apparently I've forgotten something fundamental, since the variable is not automatically recognised in WinCC, despite being parameterised.

I believe the fundamental part you forgot is the "Compile".
This only works if the WinCC and the S7-PLC are part of the same (multi)project.

Right click the WinCC in Simatic Manager > Select Compile > Follow wizard.

The tags should show up in WinCC when you open the explorer again.
 
Finally found time to get back to this one (good job it wasn't a pressing problem!).

I tried compiling in Step7, but still wasn't able to see my variables in WinCC, so I tried the "quick and dirty" method and that seems to work fine.

I say "seems to work" because the variables are now available and I can map my display field to them, but I'm now having trouble persuading the new window to pop up. I copied an existing Button in the main screen and it is set up so that in the Source part of the Properties window it's set to "Constant" with a value of 1. The Target fields are set to Source = Picture Name, Object = "Detail_Pump_2" and Property = Display. The problem is, there is no Screen called "Detail_Pump_2" and I can't find anywhere where the actual Screen name is mapped to "Detail_Pump_2" - actually, I can't find "Detail_Pump_2" anywhere, but the Button works fine! The other objects listed in the selection box for the objects are things like Buttons 1 .. n, Lines 1..n, Static Text 1..n, Circles, Polygons etc., with only a few items having typical Screen-like names.

I tried changing the Source to the actual screen name by using the button alongside the Source field, but then I wasn't sure what to choose in the Target fields, but it didn't matter what I chose, the Button simply didn't respond.

Any ideas?
 
Last edited:

Similar Topics

🤷 Hello everyone, This is a bit off topic, more about Raspberry Pi then PLC anyway... I was thinking if I could connect to my PLC (any...
Replies
12
Views
4,926
I am more of a newcomer to the PLC world with the experience related to Allen Bradley and Siemens software. The D500 is a new animal for me with...
Replies
0
Views
1,039
Hey guys, I'm trying to figure out how to access (and change, for time sync purposes) the system time inside a GE RX3i PLC. I'm still pretty new...
Replies
6
Views
2,782
Hi techsperts! I was wondering if anyone could help me... I have a project where I've configured a (Micro850) PLC as well as a (Powerflex) VSD...
Replies
4
Views
2,024
I am trying to access the I/O of a AB CompactLogix PLC within FactoryTalk View using the format such as "Local:1:I.Data.0" instead of using an...
Replies
1
Views
2,400
Back
Top Bottom