Chapter 2 Syntax
2-14
select case syntax statement
Instruction to branch under multiple conditions
- Format
Format
Description
select
<conditional variable>
case
<conditional value 1>
<instruction set 1>
case
<conditional value 2>
<instruction set 2>
[case else]
[
<instruction set n>
]
end select
This instruction executes
<instruction set 1>
to
<instruction set n-1>
described in a case statement when
<conditional variable>
matches
<conditional value 1>
to
<conditional value n-1>
in the case statement,
respectively.
If the case else statement is described,
<instruction set n>
is executed
when
<conditional variable>
does not match any of
<conditional value
1>
to
<conditional value n-1>
.
- Explanation
This instruction executes
<instruction set 1>
to
<instruction set n-1>
described in a case statement when
<conditional
variable>
matches
<conditional value 1>
to
<conditional value n-1>
in the case statement, respectively. If the case else
statement is described,
<instruction set n>
is executed when
<conditional variable>
does not match any of
<conditional
value 1>
to
<conditional value n-1>
.
- Sample program
(when Xw = 2)
Label
Mnemonic
parameter1
parameter2
parameter3
parameter4
parameter5
Sequence of execution
㩷
U(00)= Xw
㩷
㩷
㩷
㩷
䋺㩷 㩷㩷 㩷
(1)
㩷
select U(00)
㩷
㩷
㩷
㩷
䋺㩷 㩷㩷 㩷
(2)
㩷
case 0
㩷
㩷
㩷
㩷
䋺
㩷
Yw= U(00)
㩷
㩷
㩷
㩷
䋺㩷
㩷
case 1
㩷
㩷
㩷
㩷
䋺㩷
㩷
Yw= U(00)
㩷
㩷
㩷
㩷
䋺㩷
㩷
case 2
㩷
㩷
㩷
㩷
䋺㩷 㩷㩷 㩷
(3)
㩷
Yw= U(00)
㩷
㩷
㩷
㩷
䋺㩷 㩷㩷 㩷
(4)
㩷
case 4
㩷
㩷
㩷
㩷
䋺㩷
㩷
Yw= U(00)
㩷
㩷
㩷
㩷
䋺㩷
㩷
case else
㩷
㩷
㩷
㩷
㩷
䋺㩷
㩷
Yw= 0
㩷
㩷
㩷
㩷
䋺
㩷
end select
㩷
㩷
㩷
㩷
㩷
䋺㩷 㩷㩷 㩷
(5)
㩷
Y(00)= 1
㩷
㩷
㩷
㩷
䋺㩷 㩷㩷 㩷
(6)
Summary of Contents for NT2021XA
Page 4: ... Safety Instructions ...
Page 8: ... Contents ...
Page 10: ...Chapter 1 Outline of EzSQ ...
Page 14: ...1 4 Chapter 1 Outline of EzSQ ...
Page 16: ...Chapter 2 Syntax ...
Page 68: ...2 52 Chapter 2 Syntax ...
Page 70: ...Chapter 3 Interface with the Inverter ...
Page 80: ...3 10 Chapter 3 Interface with the Inverter ...