RTC
®
5 PC Interface Board
Rev. 1.9 e
10 Commands And Functions
527
innovators for industry
Undelayed
Short
List Command
switch_ioport
Function
executes a relative list jump
Pos
) whose jump distance
Pos
(>1) is
determined at runtime by the current value (
IOvalue
) at the EXTENSION 1 connector’s
16-bit digital input port. You can specify which of the 16-bit digital input port’s bits should
be evaluated for this purpose.
Call
switch_ioport( MaskBits, ShiftBits )
Parameters
MaskBits
Number of contiguous bits (as an unsigned 32-bit value) of the 16-bit
digital input port to be evaluated for determining the jump distance;
allowed range: [1 … 16]
ShiftBits
Position of the least significant to-be-evaluated bit of the 16-bit digital
input port (as an unsigned 32-bit value); allowed range: [0 … 15]
Comments
• With invalid values of
MaskBits
or
ShiftBits
and with (
MaskBits
+
ShiftBits
) > 16,
the command is replaced by a
RTC5_PARAM_ERROR
).
• The following applies:
Mask
= ((1 <<
MaskBits
) – 1) <<
ShiftBits
and
SwitchNo
= (
Mask
&
IOvalue
) >>
ShiftBits
. Here, a
(
Pos
) with
Pos
= (
SwitchNo
+ 1) list positions will then be executed.
• The jump distance is at least 1. This prevents infinite loops when no signal is present.
Jumps to the same address (
Pos
= 0) aren’t possible with
switch_ioport
, but can be
( –1 ) as the directly subsequent command.
• The maximum jump distance is 2
16
list positions.
• Also see
.
• Also see section
"16-Bit Digital Input and Output", page 49
and
.
RTC
®
4
RTC
®
5 new command
Version info
Last change with version DLL 517, OUT 516
References