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 #552 background imageLoading...
Page #552 background image
2 Instruction Descriptions
2-504
NJ-series Instructions Reference Manual (W502)
StringSum
The StringSum instruction calculates the checksum for a text string.
The StringSum instruction calculates the checksum of text string to process In. Checksum Out will be
the number of bytes specified with byte size Size. 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’ and Size is USINT#2.
If Size was USINT#1 in the above example, Out would be ‘A’.
Instruction Name FB/FUN Graphic expression ST expression
StringSum Checksum Calcula-
tion
FUN Out:=StringSum(In, Size);
Variables
Name Meaning I/O Description Valid range Unit Default
In Text string
to process
Input
Text string to process Depends on data type. --- ''
Size Byte size Byte size of checksum 1 or 2 Bytes 1
Out Checksum Output Checksum Number of bytes speci-
fied by Size
Bytes
---
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
Size OK
Out OK
Function
(@)StringSum
EN ENO
In Out
Size
abc:=StringSum(’1234’, USINT#2);
LD ST
‘1234’
abc
USINT#2
StringSum
EN ENO
In
Size
‘1234’
In
31 3433
‘CA’
Byte size Size = USINT#2
Total calculated.
Character codes
32
Out = abc

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
ModelNJ501-1500
CPU TypeIntel Atom
SD Memory Card SlotYes
Power Supply Voltage24 V DC
Power Consumption30 W
Operating Temperature0 to 55 °C
USB PortYes
Power SupplyBuilt-in

Related product manuals