2-345
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
Data Movement Instructions
2
CopyNumTo** (Signed Integer to Real Number)
CopyNumTo** (Signed Integer to
Real Number)
The CopyNumTo** instruction copies the content of a signed integer directly to a real number.
The CopyNumTo** instruction copies the content of copy source In directly to copy destination Out.
There are two instructions depending on the data types of In and Out.
Instruction Name FB/FUN Graphic expression ST expression
CopyNumTo** Bit Pattern Copy
(Signed Integer to
Real Number)
Group
FUN Out:=CopyNumToReal(In);
or
Out:=CopyNumToLreal(In);
Variables
Name Meaning I/O Description Valid range Unit Default
In Copy
source
Input Copy source Depends on data type.
--- 0
Out Copy
destination
Output Copy destination Depends on data type.
--- ---
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 OK
Out Must be REAL if the data type of In is DINT and LREAL if the data type of In is LINT.
Function
In Out Instruction
DINT REAL CopyNumToReal
LINT LREAL CopyNumToLreal
(@)CopyNumToReal
EN ENO
In Out
(@)CopyNumToLreal
EN ENO
In Out