L9_SBIT: Set Bit
(Original Document)
Naming
Name in LL984 Editor
Function Block Name
name of legacy 984 instruction
name in other tools and editors like:
  • Type Library Browser
  • Data Editor
  • Animation Tables
  • Search Results
Function Description
The L9_SBIT set bit procedure lets you set to 1 (ON) a specified bit within a word located in %MW memory.
IN_REG is the word that contains the bit to be set to 1. The BITLOC value identifies the specific bit - 1 through 16 - to be set to 1.
When the ENABLE pin is turned ON, the state of the controlled bit is set to 1; when the ENABLE pin is turned OFF, the controlled bit remains set to 1. The OUT output echoes the state of the ENABLE pin.
Representation
Parameters
Input Pin
Name
Data Type
Address Range
Meaning
Top
ENABLE
ON sets the specified bit to 1. The bit remains set when this input turns OFF.
Node
Node Type
Name
Data Type
Address Range
Meaning
Top
IN/OUT
IN_REG
%MW
The variable located to a word that contains the bit to be set.
Bottom
IN
BITLOC
UINT
1...16
The specific bit to be set.
Valid range: 1 to 16.
Note: Employs LL984 bit addressing: 1-based starting at the left end of 16-bit sequences.
Output Pin
Name
Data Type
Address Range
Meaning
Top
OUT
BOOL
Echoes the state of the ENABLE input.