EasyManua.ls Logo

Omron NJ501-1500

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
Loading...
2 Instruction Descriptions
2-424
NJ-series Instructions Reference Manual (W502)
z NumToHexString
The NumToHexString instruction converts integer In to a hexadecimal text string of UTF-8 alphanu-
meric characters. If In is negative, it is expressed in its two’s complement (bits inverted and then 1
added).
For either instruction, the number of characters in text string Out is adjusted to number of characters L.
If there are not enough characters, the upper digits are filled with fill character Fill. If the number of char-
acters in the conversion result exceeds L, L characters from the lower digits of the conversion result are
assigned to Out. The NULL character is not included in the number of characters.
The data type of Fill is enumerated type _eFILL_CHR. The meaning of the enumerators are as follows:
The following examples are for the NumToDecString instruction.
The following examples are for the NumToHexString instruction.
Enumerator Meaning
_BLANK '' (blank character)
_ZERO ‘0’
jkl:=NumToDecString(abc, def, ghi);
LD ST
jkl
abc
def
ghi
NumToDecString
EN ENO
In
L
Fill
In = abc = INT#128, L = def = UINT#8, Fill = ghi = _BLANK
Out = jkl
1 2 8
In = abc = INT#
128, L = def = UINT#8, Fill = ghi = _BLANK
Out = jkl
1 2 8
In = abc = INT#
128, L = def = UINT#8, Fill = ghi = _ZERO
Out = jkl
0 0 0 0 1 2 8
jkl:=NumToHexString(abc, def, ghi);
LD ST
jkl
abc
def
ghi
NumToHexString
EN ENO
In
L
Fill
In = abc = INT#128, L = def = UINT#8, Fill = ghi = _BLANK
Out = jkl
8 0
In = abc = INT#128, L = def = UINT#8, Fill = ghi = _ZERO
Out = jkl
0 0 0 0 0 0 8 0
In = abc = INT#128, L = def = UINT#8, Fill = ghi = _BLANK
Out = jkl
F F F F F F 8 0

Table of Contents

Related product manuals