Siemens Addressing Fun

james-0000

Member
Join Date
Jun 2008
Location
MN
Posts
7
I am working with Step 7 and WinCC Flexible 2007. I am trying to setup alarms.

What i have done:
1. Created a DB(Say DB 4) with all the alarms.
2. In WinCC I have added the tag (DB 4 DBW 0) with a data type set as INT and an array as 15.
3. In the discrete alarms I have taken that tag and set up my alarms.

All is good and I can get my alarms to show up, but I am having problems finding the right trigger bit to use. So i am spending a lot of time trying to calculate what the trigger bit should be set to in WinnCC.

My DB 4 has its first alarm at Address 1.1 and then it just keeps incrementing by 1 for each alarm.

So first group is (1.1-1.7) next group is (2.0-2.7) and so on.

Address
1.1 = Trigger Bit 1
1.2 = Trigger Bit 2
1.3 = Trigger Bit 3
1.7 = Trigger Bit 7

2.0 = Trigger Bit 24 (What just happend?)

I know the bytes are swapped in Siemens, but I am having a hard time understanding how this addressing works?


Thanks.
 
I don't like the way they do it. I don't understand why you have to swap bits when both ends is Siemens. [/rant]

So here is what I do. In the DB I split it up into bits so I can give each bit a name. You can also put in a comment into the DB. I use this to put in the address that Flex needs for the alarm. Then as I add alarms I don't have to go back and figure it out again. So for DB4.DBW0 I give it a tag name in Flexible as Alarm_1 then when I need more I make a DB4.DBW2 and call it Alarm_2. So here is how the bits are setup.
Code:
Step 7 = WinCC Flex
------------------------------
DB4.DBX0.0 = Alarm_1 bit 8
DB4.DBX0.1 = Alarm_1 bit 9
DB4.DBX0.2 = Alarm_1 bit 10
DB4.DBX0.3 = Alarm_1 bit 11
DB4.DBX0.4 = Alarm_1 bit 12
DB4.DBX0.5 = Alarm_1 bit 13
DB4.DBX0.6 = Alarm_1 bit 14
DB4.DBX0.7 = Alarm_1 bit 15
DB4.DBX0.8 = Alarm_1 bit 0
DB4.DBX0.9 = Alarm_1 bit 1
DB4.DBX0.10 = Alarm_1 bit 2
DB4.DBX0.11 = Alarm_1 bit 3
DB4.DBX0.12 = Alarm_1 bit 4
DB4.DBX0.13 = Alarm_1 bit 5
DB4.DBX0.14 = Alarm_1 bit 6
DB4.DBX0.15 = Alarm_1 bit 7
 
DB4.DBX2.0 = Alarm_2 bit 8
DB4.DBX2.1 = Alarm_2 bit 9
DB4.DBX2.2 = Alarm_2 bit 10
DB4.DBX2.3 = Alarm_2 bit 11
DB4.DBX2.4 = Alarm_2 bit 12
DB4.DBX2.5 = Alarm_2 bit 13
DB4.DBX2.6 = Alarm_2 bit 14
DB4.DBX2.7 = Alarm_2 bit 15
DB4.DBX2.8 = Alarm_2 bit 0
DB4.DBX2.9 = Alarm_2 bit 1
DB4.DBX2.10 = Alarm_2 bit 2
DB4.DBX2.11 = Alarm_2 bit 3
DB4.DBX2.12 = Alarm_2 bit 4
DB4.DBX2.13 = Alarm_2 bit 5
DB4.DBX2.14 = Alarm_2 bit 6
DB4.DBX2.15 = Alarm_2 bit 7
 
CharlesM said:
I don't like the way they do it. I don't understand why you have to swap bits when both ends is Siemens. [/rant]

So here is what I do. In the DB I split it up into bits so I can give each bit a name. You can also put in a comment into the DB. I use this to put in the address that Flex needs for the alarm. Then as I add alarms I don't have to go back and figure it out again. So for DB4.DBW0 I give it a tag name in Flexible as Alarm_1 then when I need more I make a DB4.DBW2 and call it Alarm_2. So here is how the bits are setup.
Code:
Step 7 = WinCC Flex
------------------------------
DB4.DBX0.0 = Alarm_1 bit 8
DB4.DBX0.1 = Alarm_1 bit 9
DB4.DBX0.2 = Alarm_1 bit 10
DB4.DBX0.3 = Alarm_1 bit 11
DB4.DBX0.4 = Alarm_1 bit 12
DB4.DBX0.5 = Alarm_1 bit 13
DB4.DBX0.6 = Alarm_1 bit 14
DB4.DBX0.7 = Alarm_1 bit 15
DB4.DBX0.8 = Alarm_1 bit 0
DB4.DBX0.9 = Alarm_1 bit 1
DB4.DBX0.10 = Alarm_1 bit 2
DB4.DBX0.11 = Alarm_1 bit 3
DB4.DBX0.12 = Alarm_1 bit 4
DB4.DBX0.13 = Alarm_1 bit 5
DB4.DBX0.14 = Alarm_1 bit 6
DB4.DBX0.15 = Alarm_1 bit 7
 
DB4.DBX2.0 = Alarm_2 bit 8
DB4.DBX2.1 = Alarm_2 bit 9
DB4.DBX2.2 = Alarm_2 bit 10
DB4.DBX2.3 = Alarm_2 bit 11
DB4.DBX2.4 = Alarm_2 bit 12
DB4.DBX2.5 = Alarm_2 bit 13
DB4.DBX2.6 = Alarm_2 bit 14
DB4.DBX2.7 = Alarm_2 bit 15
DB4.DBX2.8 = Alarm_2 bit 0
DB4.DBX2.9 = Alarm_2 bit 1
DB4.DBX2.10 = Alarm_2 bit 2
DB4.DBX2.11 = Alarm_2 bit 3
DB4.DBX2.12 = Alarm_2 bit 4
DB4.DBX2.13 = Alarm_2 bit 5
DB4.DBX2.14 = Alarm_2 bit 6
DB4.DBX2.15 = Alarm_2 bit 7
I'm with Charles on this one.
Works like a charm!
Once you know you kind of get used to it, byte swapping isn't an issue with me anymore.
 
Hi there
Just to avoid confusion attached is the excel sheet.

column A is DB number (yellow block)
column B gives corresponding DB bits
column C correspoding alarm trigger bits to be used in HMI


Manmeet
 

Similar Topics

Hi, How to define Siemens(S7-300 via MPI) plc tags in weintek HMI Mt8102? I know Communication is established but i am not defining addresses...
Replies
1
Views
1,693
Hi, How to define Siemens(S7-300 via MPI) plc tags in weintek HMI Mt8102? Communication is established but i am not defining addresses correctly...
Replies
0
Views
1,036
Hi All, In Siemens S7 Classic, if I want to find the location of a physical input corresponding to a peripheral address, (say PIW488), how would...
Replies
6
Views
2,210
Hello guys, This works: L P#DBX 30.0 LAR2 But I need "DBX 30.0" to be input parameter to the function. I made pTag variable with data type...
Replies
19
Views
6,323
Hello! I have a database DB1, in S7-1500 PLC with several strings, each with constant size of 64 chars, where I have to send a specify text by...
Replies
2
Views
1,500
Back
Top Bottom