You need to know some Binary maths and how Siemens represents numbers of different base types, the simplest way to understand is to keep everything in binary format with 0s and 1s. As cardosocea said you create a mask, a mask here is just like a mask in photo editing, it lets some bits through and hides the rest. To create a 25 bit mask you declare a 32 bit double word and give it a value like this in SCL:
You could have declared the mask using hexadecimal using
Code:
doubleWordVariable := W#16#*01FFFFFF
cardosocea had his mask in Octal, not sure how you write that in Siemens terminology.
The zeros in my mask aren't needed, they just help me to understand.
Windows calculator has a Programmer setting that allows easy conversion between number Bases. Go to the 3 lines top left and choose 'Programmer'.
With "first 25 bits", do you mean when reading the bits from the left (starting with the MSB) or do you mean when reading the bits from the right (starting with the LSB) ?
With "first 25 bits", do you mean when reading the bits from the left (starting with the MSB) or do you mean when reading the bits from the right (starting with the LSB) ?
Ok, just wanted to be sure.
Because of the arabs, numbers increase from right-to-left.
But when we read some text, it goes from left-to-right.
So "first 25 bits" can be interpreted both ways.