EasyManuals Logo
Home>Omron>Controller>CJ - INSTRUCTIONS

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 #1130 background imageLoading...
Page #1130 background image
3. Instructions
1092
CS/CJ/NSJ Series Instructions Reference Manual (W474)
z Operand Specifications
Flags
Note If the beginning position designated by S3 is beyond the text string designated by S1, an error will be generated and the
Error Flag will turn ON.
Function
Within the text string identified by the first
word designated by S1 until the NUL code (00
hex), MID$(654) reads the number of
characters designated by S2, from the
beginning word designated by S3, and
outputs the result to D as text string data (with
NUL added at the end).
If the number of characters to be read extends
beyond the end of the text string designated
by S1, the string will be output up to the end.
If 0 (0000 hex) is designated as the number of
characters to be read, the two NUL characters
(0000 hex) will be output to D.
MID$(654) 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.
Example Programming
In this example, MID$(654) is used to read three 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
OK OK OK OK OK OK OK OK OK OK
--- ---
--- OK --- --- --- ---S2, S3 OK OK
D --- ---
Name Label Operation
Error Flag ER • ON if more than 4,095 characters are designated by S1.
• ON if more than 4,095 characters (0FFF hex) are designated by S2.
• ON if the S3 data is not within the range of 1 to 4,095 (0001 to 0FFF hex).
• ON if S3 is greater than S1.
• 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.
D: D300
S2: D200
S3: D400
D100
D200
D400
D300
S1: D100
D101
S3: D
D103
D104
D105
Text string ABCDEFGHIJ
Three characters read.
From 5th character
(leftmost byte in D00102).
Text string EFG

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