Mitsubishi Electronics FXCPU Welding System User Manual


 
5.8 Standard Character String Functions
193
FXCPU Structured Programming Manual
(Application Functions)
1
Outline
2
Function List
3
Function
Construction
4
How to Read
Explanation of
Functions
5
Applied
Functions
6
Standard
Function Blocks
A
Correspondence
between Devices
and Addresses
Explanation of function and operation
1) This function replaces specified number of characters from an arbitrary position of a character string
stored in devices specified in with a character string stored in devices specified in , and outputs
the character string obtained by replacement to devices specified in .
The value specified in specifies the number of characters to be replaced.
The value specified in specifies the position from which specified number of characters are replaced.
Example: When "5" is specified in and
2) A character string (data) stored in devices specified in indicates the data until "00H" is detected first
in units of byte in the range starting from the specified device.
3) When "n1+n2" exceeds the number of characters of a character string stored in devices specified in ,
excessive characters are not output to devices specified in .
4) When "-1" is specified in , the number of characters of a character string stored in devices specified
in is regarded as the value specified in .
Cautions
1) Use the function having "_E" in its name to connect a bus.
2) When handling character string data in structured programs, you cannot specify 16-bit devices directly,
different from simple projects. Use labels when handling character string data.
Use global labels when specifying labels.
s1
s2
d
n1
n2
n1 n2
42H(B)
Output value
"ABCD1234523"
41H(A)
43H(C)
33H(3)
44H(D)
00H
32H(2)
34H(4)
32H(2)
31H(1)
35H(5)
33H(3)
High-order byte Low-order byte
High-order byte Low-order byte
32H(2)
31H(1)
33H(3)
34H(4)
36H(6)
0000H
35H(5)
1st word
2nd word
3rd word
4th word
5th word
6th word
1st word
2nd word
3rd word
4th word
Input value to
"123456"
42H(B)
Input value to
"ABCDEFGH123"
41H(A)
43H(C)
47H(G)
44H(D)
00H
32H(2)
48H(H)
46H(F)
45H(E)
31H(1)
33H(3)
High-order byte Low-order byte
1st word
2nd word
3rd word
4th word
5th word
6th word
Replacement start
position
= 5th character
n2
s1
s2
Number of characters
to be replaced = 5
n1
s
s1
d
n1
s2
n1