EasyManuals Logo

Omron CJ - INSTRUCTIONS User Manual

Omron CJ - INSTRUCTIONS
1308 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #1144 background imageLoading...
Page #1144 background image
3. Instructions
1106
CS/CJ/NSJ Series Instructions Reference Manual (W474)
z Operand Specifications
Flags
Function
Within the text string designated by S1, INS$(657) inserts the text string designated by S2, after the
beginning word designated by S3, and outputs the result to D as text string data (with NUL added at the
end).
• The maximum number of characters that can be inserted is 4,095 (0FFF hex). If there are more than
that, only 4,095 characters will be output to D (with NUL added as the 4,096th character).
• The 0th to the 4095th character can be specified for the starting position (S3) of the insertion. If the
0th character is specified, the operation is the same as joining S2 and S1.
• If either S1 or S2 is NUL, then the text string designated by the other one of them will be output to D
just as it is. If S1 and S2 are both NUL, then two NUL characters (0000 hex) will be output to D.
• INS$(657) can be processed in the background. Refer to the SYSMAC CS/CJ/NSJ Series PLC
Programming Manual (W394) or the CJ2 CPU Unit Software Operation Manual (W473) for details.
Precaution
• Do not overlap the destination words designated by D with the text string data designated by S2. If
these overlap, the operation will not be executed properly.
Example Programming
In this example, INS$(657) is used to insert two characters.
Area
Word addresses
Indirect DM/EM
addresses
Con-
stants
Registers Flags
Pulse
bits
TR
bits
CIO WR HR AR T C DM EM
@DM
@EM
*DM
*EM
DR IR
Indirect
using IR
TK CF
S1, S2
OK OK OK OK OK OK OK OK OK OK
--- ---
--- OK --- --- --- ---S3 OK OK
D --- ---
Name Label Operation
Error Flag ER • ON if more than 4,095 characters are designated by S1 or S2.
• ON if S3 exceeds 4,095 (0FFF hex).
• ON if the Communications Port Enabled Flag for the communications port number specified as the
Com Port number for Background Execution is OFF when background processing is specified.
• OFF in all other cases.
Equal Flag = • ON if 0000 (hex) is output to D.
• OFF in all other cases.
→
→
Inserted characters
→
S2: D200
S3: D400
S1: D100
D101
D102
D103
D104
D: D300
D301
D302
D303
D304
D305
Text string ABCDEFJKGHI
Text string JK
Text string ABCDEFGHI
D100
D200
D400
D300

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron CJ - INSTRUCTIONS and is the answer not in the manual?

Omron CJ - INSTRUCTIONS Specifications

General IconGeneral
BrandOmron
ModelCJ - INSTRUCTIONS
CategoryController
LanguageEnglish

Related product manuals