Mitsubishi Electronics FX3UC Garage Door Opener User Manual


 
626
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
26 Character String Control – FNC200 to FNC209
26.5 FNC204 – RIGHT / Extracting Character String Data from the Right
26.5 FNC204 – RIGHT / Extracting Character String Data from the Right
Outline
This instruction extracts a specified number of characters from the right end of a specified character string.
For handling of character strings, refer to Section 5.3.
1. Instruction format
2. Set data
3. Applicable devices
Explanation of function and operation
1. 16-bit operation (RIGHT and RIGHTP)
“n” characters are extracted from the right end (that is, from the end) of the character string data stored in and
later, and stored to and later.
If the number of characters specified by “n” is “0”, the NULL code (0000H) is stored to .
When characters are extracted from a character string, “00H" is automatically added at the end of the extracted
characters.
- When the number of extracted characters is odd, “00H” is stored in the high-order byte of a device storing the
last character.
- When the number of extracted characters is even, “0000H” is stored in the device after the last character.
Operand Type Description Data Type
Head device number storing a character string
Character string
Head device number storing extracted character string
n Number of characters to be extracted 16-bit binary
Oper-
and
Type
Bit Devices Word Devices Others
System User Digit Specification System User
Special
Unit
Index
Con-
stant
Real
Number
Charac-
ter String
Pointer
XYMTCSD
.b KnX KnY KnM KnS T C D R
U\G
V Z Modify K H E "
"P


n  
P
FNC 204
RIGHT
Mnemonic Operation Condition
16-bit Instruction
7 steps
RIGHT
RIGHTP
Mnemonic Operation Condition
Continuous
Operation
Pulse (Single)
Operation
32-bit Instruction
S
D
S
D
S
D
D
FNC204
RIGHT
b15----------------------b8b7-----------------------b0
+1
ASCII code for 2nd
character
ASCII code for 4th
character
D
S
S
n
ASCII code for 1st
character
ASCII code for 3rd
character
ASCII code for “(last
character -n+2)”th character
ASCII code for “(last
character -n+1)”th character
+1
D
ASCII code for “(last
character -n+4)”th character
ASCII code for “(last
character -n+3)”th character
ASCII code for “(last
character -1)”th character
ASCII code for “(last
character -2)”th character
00H
ASCII code for last
character
b15----------------------b8b7-----------------------b0
ASCII code for “(last
character -n+2)”th character
ASCII code for “(last
character -n+4)”th character
ASCII code for “(last
character -n+1)”th character
ASCII code for “(last
character -n+3)”th character
ASCII code for “(last
character -1)”th character
ASCII code for “(last
character -2)”th character
00H
ASCII code for last
character
Command
input
D
S