How-To : Set a Word of Bits High

Tim Ganz

Member
Join Date
Dec 2010
Location
Dallas, Texas
Posts
685
How can i set a whole word of bits high or 1 such as b3:254 in slc and plc 5 systems.

I tried to use a unconditional OTE on a rung with the b3:254 address but it gives me a error and says it must be specified to the bit level?

How else could we accomplish this task?
 
How can i set a whole word of bits high or 1 such as b3:254 in slc and plc 5 systems.

I tried to use a unconditional OTE on a rung with the b3:254 address but it gives me a error and says it must be specified to the bit level?

How else could we accomplish this task?

For future reference B3:254 to bit level would be B3:254/1 or /2 or /3 for the relevant bits
 
Why does -1 work i tried 1 but that only turned on the first bit?
To answer your question you need to consider what a word is? For example a 16-bit word is made up of 16 individual bits such as B3:254/00 to B3:254/15. Now if you look at the word in decimal format and you put a "1" in the word, what is the binary equivalent if you look at all the bits in binary format? It is "0000000000000001" because "1" in decimal equals "1" in binary. So now ask yourself what "-1" in decimal is in binary (at least how viewed by an SLC or PLC5)? Hint, the most significant bit (i.e. the 16th bit or B3:254/15) is a sign bit.
 

Similar Topics

In a Rx3i what would be the most efficient way to count the number of bits set in a word variable? The naive approach is to simply shift the bits...
Replies
2
Views
1,167
Hi, I have bought a 1769-L36ERMS from ebay 4 months ago. I bought it just for practice safety features of AB which are not available in my...
Replies
7
Views
3,016
For example, I need to set 1011-0011-1100-0011 into a memory location. I am trying to look for MOV function in Productivity Suite. However, I...
Replies
2
Views
1,280
The other day I installed Rockwell IntelliCENTER software on my laptop, and as part of that it required that I enter a password. It seems that...
Replies
2
Views
1,415
hello Friend There is one old system with S7 300 CPU which is password protected and I dont know the password. Now I want to remove the password...
Replies
6
Views
5,906
Back
Top Bottom