Getbytelen - Omron NJ501-1500 Reference Manual

Machine automation controller nj-series
Hide thumbs Also See for NJ501-1500:
Table of Contents

Advertisement

GetByteLen

The GetByteLen instruction counts the number of bytes in a text string.
Instruction
GetByteLen
Get Byte Length
Variables
Name
Meaning
In
Count
string
Out
Number of
bytes
Bit strings
In
Out
Function
The GetByteLen instruction counts the number of bytes in count string In. A NULL character at the end
of the text string is not counted.
The following example is for when In is 'ABCDEF'. The value of variable abc will be 6.
LD
'ABCDEF'
Number of bytes
In
'ABCDEF'
NJ-series Instructions Reference Manual (W502)
Name
FB/FUN
FUN
I/O
Description
Input
Text string to count number
of bytes
Output
Number of bytes
OK
GetByteLen
EN
ENO
In
abc
Out=abc
Graphic expression
(@)GetByteLen
EN
ENO
In
Valid range
Depends on data type.
0 to 1985
Integers
ST
abc:=GetByteLen('ABCDEF');
6
2 Instruction Descriptions
ST expression
Out:=GetByteLen(In);
Out
Unit
Default
''
---
Bytes
---
Times, durations,
dates, and text strings
2
OK
2-535

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Nj501-1300Nj501-1400

Table of Contents