11 - 25 11 - 25
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
CISN
Function
Convert Integer to SiNgle
• Converts a 2-word (32-bit) integer to be used by the PLC CPU into a single precision real
number.
CISN ( <array variable> )
Syntax
array variable
• • • •
Specify a one-dimensional integer array variable
where the converting data is stored.
A!=CISN(B%(0))
• • • •
Converts an integer value in B%(0) and B%(1) into a
single precision and stores in A!.
Examples
L
H
L
H
B%(0)
B%(1)
A!
Lower word
Higher word
32 bits
Description
• The CISN function converts a 2-word (32-bit) integer to be used by the PLC CPU into a
single precision real number.
• <array variable> uses a one dimensional integer array variable.
An "Illegal function call" error occurs if anything other than one dimensional integer array is
specified.
Be sure to define the variable to be used for <array variable> by the DIM instruction.
An "Illegal function call" error occurs if it is not defined by the DIM instruction.
• Accuracy of the single precision real number, which was converted from a 2-word (32-bit)
integer, is the same as the accuracy before the CISN function was executed. (The number
of effective digits is six.)
• The following shows how to handle 2-word (32-bit) integer to be used by the PLC CPU in
BASIC:
Example
PLC
CPU
2-word integer
y y y y
Stores in the data register.
x x x x
Dn
Dn+1
BASIC
PCRD (control table) , %( )
%(n)
%(n+1)
Converts into a double
precision real number.
!
For <control table>,
see process code
1 of the PCRD instruction.
CISN
Содержание A1SD51S
Страница 183: ...11 13 11 13 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS RUN Before swap A 0 H924 A 1 H1159 After swap A 0 H1159 A 1 H924 OK...
Страница 331: ...11 161 11 161 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the CON ON OFF STOP and ZOPEN functions and Section 7 4...
Страница 557: ...11 387 11 387 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the CHR SPACE and SPC functions...
Страница 629: ...11 459 11 459 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the ZOPEN ZSEND and ZCNTL instructions and Section 7 3 4...
Страница 645: ...11 475 11 475 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the ZEVENT ZSIGNAL and DEF ZEVENT instructions...