EasyManuals Logo

Omron NJ501-1500 User Manual

Omron NJ501-1500
990 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 #554 background imageLoading...
Page #554 background image
2 Instruction Descriptions
2-506
NJ-series Instructions Reference Manual (W502)
StringLRC
The StringLRC instruction calculates the LRC value (horizontal parity).
The StringLRC instruction calculates the LRC value (horizontal parity) of text string to process In. The
LRC value is the exclusive logical OR of the character codes for the text string in In. The LRC value
(Out) is given as a hexadecimal text string with a NULL character stored at the end.
The following example is for when In is ‘1234’.
Instruction Name FB/FUN Graphic expression ST expression
StringLRC Calculate Text
String LRC
FUN Out:=StringLRC(In);
Variables
Name Meaning I/O Description Valid range Unit Default
In Text string
to process
Input Text string to process Depends on data type.
--- ''
Out LRC value Output LRC value 3 bytes max. (two sin-
gle-byte alphanumeric
characters plus the final
NULL character)
--- ---
Boolean
Bit strings Integers
Real
numbers
Times, durations,
dates, and text strings
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In OK
Out OK
Function
(@)StringLRC
EN ENO
In Out
abc:=StringLRC(‘1234’)
;
LD ST
‘1234’
EN ENO
In
StringLRC
abc
Exclusive logical OR
Character codes
Out = abc
‘1234’
In
343332
‘04’
31

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

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

Omron NJ501-1500 Specifications

General IconGeneral
BrandOmron
ModelNJ501-1500
CategoryController
LanguageEnglish

Related product manuals