Question about Siemens STEP 7 & WinCC

leonlai

Member
Join Date
Jun 2011
Location
WA
Posts
96
Hi folks,
I'm new to Siemens and I have a couple questions:

1) In Step 7 -> Data Block : I try to read/write a bit in a word
(like in RSlogix500: an Touch Panel has 3 button HOA(Hand,Off, Auto), when a button is click, it set bit 0 of a word from 0 to 1)BUT in STEP 7 & WinCC I cannot do that !?

In WinCC & STEP7, I am able to create 3 button with 3 bit (Boolean only)
But I want to create 3 button with 3 bit of a WORD and access them, but I cannot !!

Anybody know how to do it ?
 
Try DB7.DBX0.0
and DB7.DBX0.1
and DB7.DBX0.2
Data Block DB7
Define "BOOLS" DBX0.0 and so on.
Use as bits in your program, etc.
Don't forget to set a bit (Aut0 for example from the screen) but at the same time Reset the 2 other bits (Hand & Off).
This can be done with logic or via the HMI tag using the "On Press" set bit AUTO and Reset bit Hand and Reset bit Off
 
In WinCC & STEP7, I am able to create 3 button with 3 bit (Boolean only)
But I want to create 3 button with 3 bit of a WORD and access them, but I cannot !!
What version of WinCC is it ?
v5, v6, v7, Flexible 2004, Flexible 2005, Flexible 2007, Flexible 2008, v10.4, v11 or v12 ?
In WinCC Flexible and WinCC v10+ there is a function "SetBit" which you have probably used. "SetBit" requires a BOOL tag.
To set a bit within a WORD tag, try the function "SetBitInTag".
 
JesperMP is right, I search online and they said they same like bkottaras but I dun quite get it !
I think because I first started with TIA Portal Integrate & I use Ladder Logic Programming, not STD or C or VB !
I used TIA Portal v11 SP2 update 5
Is that possible anybody can show me step by step ?

The reason I want to do it because I want to set ALARM in Wincc Advance
I coding in STEP 7 with all data is BIT
but WincCC Advance ALARM is showing WORD only, so that I dun know how to convert BIT to WORD

Please help
 
So you want to simulate that an alarm gets activated ?

Either create a button with the function SetBitInTag on the event ButtonPressed.
Or set the corresponding bit in a Watch table in STEP7. This is the easiest.
 
I got what bkottara said, it's about STEP 7 (Thank you bkottanra)
NOW, how can I use HOA bit in WinCC for ALARM,
Let's says, bit DB7.DBX0.0 = 1 --> HAND ON
then HMI alarm says This function is HAND ON
but ALRMS only see WORD address while DB7.DBX0.0 is bit !!!
 
That WinCC uses WORDs or ARRAY of WORDs is just a way to pack many bits together.
When you configure an alarm in WinCC, you can see what Trigger bit corresponds with the alarm.

In order to trigger the alarm in WinCC, just set the corresponding bit in STEP7.

Notice that S7 swaps the bytes, so the 1st alarm in WinCC is not DB7.DBX0.0, but DB7.DBX1.0.
The 9th alarm becomes DB7.DBX0.0.
It IS a bit confusing (I curse whoever chose Big Endian for S7 PLCs).
Look up the Trigger bit address in the WinCC alarm editor. That shows you directly which bit to set in STEP7.
 
Ok, I'm in the HMI Alarms

8P4Sm6yxo3OS8AAAAASUVORK5CYII=


I'm confusing now: as the figure show:
Trigger Tag is WORD from PLC & Trigger bit is at bit 15
HMI acknowlegement is the same with Trigger Tag ???
HMI adress is the same with Trigger bit ???

And how can I set an (PLC) Alarm bit in bit 15 of a WORD (PLC) address so that HMI ALARM can see
 

Similar Topics

Is it Gain or Proportional band? The HMI shows it as Proportional Band and the tag name is Gain???
Replies
3
Views
2,164
Tomorrow morning I have to use a rented Siemens PC to troubleshoot a Siemens HMI, programmed with WinCC, communicating to a couple of ABB drives...
Replies
5
Views
10,109
What is significant about FB80 and why is important to load this block even though nothing is in it??
Replies
3
Views
3,648
OK. You guys helped me out a bunch with my first Siemens question. I found a bunch of issues with integrity checking the PLC programs I was...
Replies
7
Views
313
Does anyone know why my one string is displaying this way? It is causing issues with my HMI displaying it.
Replies
4
Views
265
Back
Top Bottom