12.07.2015 Views

RAPID reference manual - Technology

RAPID reference manual - Technology

RAPID reference manual - Technology

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

InstructionBitClearAdvanced <strong>RAPID</strong>BitClear - Clear a specified bit in a byte dataBitClear is used to clear (set to 0) a specified bit in a defined byte data.ExamplesCONST num parity_bit := 8;VAR byte data1 := 130;BitClear data1, parity_bit;Bit number 8 (parity_bit) in the variable data1 will be set to 0, e.g. the contentof the variable data1 will be changed from 130 to 2 (decimal representation).BitPos 8BitPos 1BitPos 8BitPos 11 0 0 0 0 0 1 00 0 0 0 0 0 1 0Bit position 8 has value 1.Bit position 8 is set to 0.VAR byte data1 := 130;BitClear data1, parity_bit;Content of data1 before BitClear ... : 130 Content of data1 after BitClear ... : 2Figure 2 Bit manipulation of data type byte when using BitClearArgumentsBitClearBitData BitPosBitDataData type: byteThe bit data, in decimal representation, to be changed.BitPos (Bit Position) Data type: numThe bit position (1-8) in the BitData to be set to 0.<strong>RAPID</strong> <strong>reference</strong> <strong>manual</strong> - part 1a, Instructions A-R 13

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!