S7 Word compare

Robobob

Lifetime Supporting Member
Join Date
Apr 2004
Location
Toledo
Posts
306
I am having a bit of trouble getting my head around this. I am using Step 7. I want to set a memory bit [Alarm_Active] when a random bit in a word [MW700]goes high. Below I have two rungs. The first is the simple way. The way I want to do this is to do a compare of a word [MW700] and if it is anything other than 0 set a Bit. I have done this in AB ladder with a Bitwise OR. The second network is how I think it will work in Step7. After reading the help files I am a bit uncertain that I am correct. I think I need to use the status bit for the instruction, but I am unsure on the actual construction of the rung. Or is there a better way to do the same thing A push in the right direction would be appreciated.
Thanks Bob

Alarm1.jpg
 
ENO will always be true, so your bit will always be on.

I would just simply compare to zero (not equal).

plc.GIF
 
Last edited:
Also, remember that with Siemens you have to know how the bytes are arranged to address the individual bits. For example MW700 is made up of MB700 and MB701, with bit zero of MW700 actually being M701.0.
 
Thanks guys. I knew there was an easy way. I worked with Siemens 13 years ago and have not touched it again until now. The bit arrangement tripped me up already. I set up a bit shift and I had to figure the arrangement out. It took a few minutes but I got it.
 

Similar Topics

Hello I am currently learning on my own how to program a Siemens S7-300, and I have hit a bit of a snag with a FB I am making that will compare...
Replies
5
Views
5,428
Hei, I am trying to look at a 16 bit word and see if any bit has changed from 0 to 1 and then trigger a bit to show that a new alarm has...
Replies
6
Views
7,910
dear friends i m students and trying some design work in my home i have RSLogics500 software.and slc 5/02 processor. if some can help me...
Replies
2
Views
3,760
Hi All, How do I set a password to PLC using Proficy machine software 9.5-9.8 or some other way? I as using Emerson CPE305 CPU. Thanks.
Replies
2
Views
306
I have an AB micro820 analog inputs takes word datatype to scale my input to 0-100% , i need to know the word datatype range does anyone knows...
Replies
3
Views
150
Back
Top Bottom