Conversion instructions
659
Part III FP Instructions
F91_SEGT
16-bit data 7-segment decode
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.
PLC types
Availability of F91_SEGT (see page 1326)
Variable Data type Function
s ANY16 16-bit area or equivalent constant to be converted to
7-segment indication (source)
d ANY32 32-bit area for storing 4-digit data for 7-segment indication
(destination)
For Relay T/C Register Constant
s WX WY WR WL SV EV DT LD FL dec. or hex.
d - DWY DWR DWL DSV DEV DDT DLD DFL -
Description
Converts the 16-bit equivalent constant or 16-bit data specified by s to 4-digit data for 7-segment
indication if the trigger EN is in the ON-state. The converted data is stored in the area starting with
the 16-bit area specified by d. The data for 7-segment indication occupies 8 bits (1 byte) to express
1 digit.
Data types
Operands
Example
In this example, the same POU header is used for all programming languages. For an 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.
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
F91_SEGT(input_value, output_value);
END_IF;