View Full Version : Siemens Step 7 bits and words ???

May 7th, 2009, 03:40 AM

I'm fairly new to Step 7 and mainly have a Rockwell background. I have a project which has an S7-300 talking to ABB drives over profibus. the first peripheral input word form the drive is its status word. This word is made up of individual bits for its status i.e Bit 0 = 'drive healthy', bit 1 = 'drive tripped' etc. PIW256 is the status word. I've created a DB for each drive and within this created a UDT which has all the drive status bits as BOOL's. This is so I can use symbolic addressing for the status bits. when I look at the DB in data view it shows that the status word is DBW8 and that 'drive healthy' = 8.1 and 'drive tripped' = 8.2 etc.
So DB20.DB8.0 is drive healthy ??
I MOVE PIW256 to DB20.DBW8. When I monitor these at word level, when the drive sets its healthy bit, then bit 0 of PIW256 is energised as is bit 0 of DB20.DBW8. Theres no byte swapping here. So far so good. The problem is that if I monitor DB20.DBX8.0 ('drivehealthy' symbolically), this doesn't reflect bit 0 of the words. its DB20.DBX9.0 which does. This isn't even shown in the DB. I'm confused ??? I was under the impression that its only when changinf rom Bytes to words that you have to be careful of the byte swapping ???

Thanks in advance

May 7th, 2009, 05:05 AM
Hi there
In Siemens bit 0 is DB8.dbx9.0
bit 7 is DB8.DBX9.7

bit 8 is DB8.DBX8.0
bit 15 is DB8.DBX8.7

So there is swapping in the ABB vfd itself ;-)
If ABB manual is saying that bit 0 of status word is HEALTHY BIT then if you are mapping it in DB8.DBW8 then it will appear in DB8.DBX9.0 , because both the companies follows different memory architecture.

Google: Big endian and little endian type memory.

Also see here (http://www.plctalk.net/qanda/showpost.php?p=283257&postcount=4)