bit number

Anton

Member
Join Date
Mar 2003
Location
Israel
Posts
5
May be somebody knows?
In a 16 bit word , only one bit is set ON.
The question to identify the place of this bit in the word.
What is its number in the word?
It means that i have to recieve this number.
Thank you.
Anton

Sorry, i fogot to wright :OMRON PLC (CPU43)
Anton.
 
I am sure this is not the best way, the ladder below shows comparing word 200 with 5, if = 5 then move 5 to DM0

There would be better ways to do this, maybe somebody out there will give you better suggestions

lad.jpg
 
Thank you very much, chavak!

chavak said:
I am sure this is not the best way, the ladder below shows comparing word 200 with 5, if = 5 then move 5 to DM0

There would be better ways to do this, maybe somebody out there will give you better suggestions
 
Originally posted by chavak
if = 5 then move 5 to DM0
Must be if = 16 ?

There are many ways use comparing in Omron world. Use Instraction Help and be care with variable types, they must give in Symbol-table for the view BCD/HEX etc.. and content numers #HEX,&DEC without it they are I/O-addresses. Below there are asked bit0 &1 and bit1 &2..
This works only when only one bit is true at the time (for original purpose in previous post) !!!!

omron.jpg
 
Last edited:

Similar Topics

In RSLogix500, is there a way to make B3:1/1 to show as B3:0/16? In the below drawing with keyboard letters, --II-- is a rung with a normally...
Replies
6
Views
2,082
I am having problems expressing an ANALOG OUTPUT 16bit INT word (0-10V Proportional Valve Voltage) as a REAL decimal number. From my...
Replies
6
Views
9,163
I am trying to duplicate some Modicon code in a Contrologix PLC. This a sequence step number that is incremented on each step (78 steps). The...
Replies
5
Views
2,334
Since Siemens is big endian, is there a quick and easy way to determine the trigger bit for discrete alarms? I'm looking to implement something...
Replies
2
Views
5,082
Never had this error. It gives me errors on the integervalues (db data)
Replies
0
Views
1,659
Back
Top Bottom