Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
5 Basic Instruction
5.10 SET, RST
81
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
1
Outline
2
Instruction List
3
Configuration of
Instruction
4
How to Read
Explanation of
Instructions
5
Basic Instruction
6
Step Ladder
Instructions
7
Applied Instructions
(Program Flow)
8
Applied Instructions
(Move and
Compare)
9
Applied Instructions
(Arithmetic and
Logical Operation)
10
Applied Instructions
(Rotation and
Shift Operation)
5.10 SET, RST
Outline
1) Setting a bit device (SET instruction [holding operation])
When the command input turns ON, SET instruction sets to ON an output relay (Y), auxiliary relay (M),
state relay (S) and bit specification of word device.
Even if the command input turns OFF after that, the device which was set to ON by SET instruction
remains ON.
2) Resetting a bit device (RST instruction [resetting folding operation])
RST instruction resets an output relay (Y), auxiliary relay (M), state relay (S), timer (T), counter (C) or bit
specification of a word device.
Use the RST instruction to reset (reset to OFF) a device which was set to ON by SET instruction.
3) Clearing the current value of a word device (RST instruction [Clearing current value and resister])
RST instruction clears the current value data of a timer (T), counter (C), data register (D), extension
register or (R)index register (V) (Z). (The same result can be obtained by MOV instruction which transfers
the constant K0.)
RST instruction can be used also to reset the current value and return the contact of retentive type timers.
SET and RST instructions can be used for a same device as many times as necessary in an arbitrary
order.
1. Format and operation, execution form
*1. This symbol is applicable to the bit type data only.
2. Set data
3. Applicable devices
S: Refer to "Cautions".
FX3U(C) FX3G(C) FX3S FX2N(C) FX1N(C) FX1S FXU/FX2C FX0N FX0(S)
Instruction
name
Execution
form
Expression in each language
Structured ladder/FBD ST
SET Continuous
SET(EN,d);
Example:
SET(X000,Y000);
RST Continuous
RST(EN,d);
Example:
RST(X001,Y000);
Variable Description Data type
Input
variable
EN Execution condition Bit
Output
variable
ENO Execution state Bit
Applicable device or variable
SET Bit
RST ANY_SIMPLE
Instruction
Bit Devices Word Devices Others
System User Digit Specification
System
User
Special
Unit
Index
Constant
Real
Number
Character
String
Pointer
XYMTCS
D
.b
KnX KnY KnM KnS T C D R
U\G
VZModifier K H E
"
"
P
SET
zz z
S1 S3
RST
zzzzz
S1
zzz
S2
zz
S3
SET
EN ENO
d
Y000
X000
X000
*1
Or
Y000
S
RST
EN ENO
d
Y000
X001
X001
*1
Or
Y000
R