Select Case Syntax Statement - Hitachi NT2021XA Instruction Manual

Easy-sequence programming software
Table of Contents

Advertisement

Chapter 2 Syntax

select case syntax statement

- Format
Format
select
<conditional variable>
case
<conditional value 1>
<instruction set 1>
case
<conditional value 2>
<instruction set 2>
[case else]
[<instruction set
n>]
end select
- Explanation
This instruction executes
variable>
matches
<conditional value 1>
statement is described,
value 1>
to
<conditional value
- Sample program (when Xw = 2)
Label
Mnemonic
U(00)=
select
case
Yw=
case
Yw=
case
Yw=
case
Yw=
case else
Yw=
end select
Y(00)=
Instruction to branch under multiple conditions
This instruction executes
described in a case statement when
<conditional value 1>
respectively.
If the case else statement is described,
when
1>
to
<conditional value
<instruction set 1>
to
<instruction set n-1>
to
<conditional value n-1>
<instruction set n>
is executed when
n-1>.
parameter1
parameter2
Xw
U(00)
0
U(00)
1
U(00)
2
U(00)
4
U(00)
0
1
Description
<instruction set 1>
to
<conditional value n-1>
<conditional variable>
does not match any of
n-1>.
described in a case statement when
in the case statement, respectively. If the case else
<conditional variable>
parameter3
parameter4
parameter5
2-14
to
<instruction set n-1>
<conditional variable>
matches
in the case statement,
<instruction set n>
is executed
<conditional value
<conditional
does not match any of
Sequence of execution
(1)
(2)
(3)
(4)
(5)
(6)
<conditional

Advertisement

Table of Contents
loading

Table of Contents