Mitsubishi Electronics FXCPU Welding System User Manual


 
5.8 Standard Character String Functions
188
FXCPU Structured Programming Manual
(Application Functions)
Explanation of function and operation
1) This function inserts a character string stored in devices specified in into an arbitrary position
(counted from the head) of a character string stored in devices specified in , and outputs the
character string obtained by insertion to devices specified in .
The value specified in specifies the position from which the character string stored in devices
specified in is inserted.
After inserting a character string stored in devices specified in into a character string stored in
devices specified in , this function ignores "00H" which indicates the end of a character string stored
in devices specified in .
Example: When "4" is specified in
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.
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.
Error
An operation error occurs in the following cases. The error flag M8067 turns ON, and D8067 stores the error
code.
1) When the number of devices after the device number specified in is smaller than the number of
devices required for storing the output data obtained by insertion
(Error code: K6706)
2) When devices which store character strings specified in and overlap device numbers specified
in which will store the character string obtained by connection
(Error code: K6706)
3) When "00H" does not exist in the corresponding device range after devices specified in and
(Error code: K6706)
4) When the number of characters of a character string stored in devices specified in is 32768 or more
(Error code: K6706)
5) When the value specified in is negative
(Error code: K6706)
s2
s1
d
n
s2
s2
s1
s2
n
42H(B)
Output value
"ABC123456DE"
41H(A)
43H(C)
34H(4)
31H(1)
00H
44H(D)
35H(5)
33H(3)
32H(2)
36H(6)
45H(E)
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"
High-order byte Low-order byte
42H(B)
41H(A)
43H(C)
44H(D)
00H
45H(E)
1st word
2nd word
3rd word
Input value to
"ABCDE"
Insertion start
position
= 4th character
s1
s2
n
s
d
s1
s2
d
s1
s2
s2
n