Commands and functions
P.
173 of 349
Inverting
Shift
For inverting binary values (data type b01), the following syntax is available
Definition
●
!A
Arguments
●
Argument
A
is of the data type b01
Effect
●
The variable
A
is inverted.
The result of the operation is 1b01, if the variable A is 0b01
The result of the operation is 0b01, if the variable A is 1b01
Data type result (Return)
●
Data type b01
Example: Inverted button
LightActuatorOn (b01) is to behave inversely to KEY1 (b01).
The reaction is then:
LightActuatorOn = !Button1
If
KEY1
is 1b01, then
LightActuator
is 0b01. If
KEY1
is 0b01, then
LightActuator
is 1b01.
The following function is available for shifting numeric data types:
Definition
●
shift
(Operand, Number)
Arguments
●
Argument
Operand
of any numerical data type
●
Argument
Number
of data type s08
Effect
●
Arithmetic shift of the operand by
number
. With positive number shift to the left, with a
negative number to the right. The number of bits of the number of the input is shortened.
Data type result (return)
●
as
Operand
HandbuchEibPC_USA-30.odt, 2017-05-11
Enertex
®
Bayern GmbH - Erlachstraße 13 - 91301 Forchheim - [email protected]