Panasonic FP Series Programming Manual page 668

Hide thumbs Also See for FP Series:
Table of Contents

Advertisement

F237_GBIN
The function converts a gray-code value at input s to binary data. The result of the conversion is
Description
returned at output d.
This instruction also exists as a P instruction (for FP2/2SH, FP3/5, FP10/10SH PLC types), which
is only executed at the rising edge of the EN trigger. Select [Insert P instruction] from the
"Instructions" pane if you require a P instruction. To facilitate reuse, the instruction then appears
under "Recently used" in the pop-up menu. Press <Ctrl>+<Shift>+<v> within the programming
area to open the list of recently used elements.
Availability of F237_GBIN (see page 1323)
PLC types
Data types
Variable
Data type
s
ANY16
d
Operands
For
s
d
In this example, the same POU header is used for all programming languages. For an example
Example
using IL (instruction list), please refer to the online help.
POU header
All input and output variables used for programming this function have been declared in the POU
header.
In this example, the input variable input_value is declared. However, you can write a constant
directly at the input contact of the function instead.
Body
When the variable start is set to TRUE, the function is carried out.
LD
ST
When programming with structured text, enter the following:
IF
start
THEN
F237_GBIN(input_value, output_value);
END_IF;
16-bit Gray code -> 16-bit binary data
Function
source area to gray code
destination for storing converted data
Relay
WX
WY
WR
WL
-
WY
WR
WL
T/C
Register
SV
EV
DT
LD
FL
SV
EV
DT
LD
FL
Conversion instructions
Constant
dec. or hex.
-
667

Advertisement

Table of Contents
loading

Table of Contents