Skip to main content

7-Segment Code Display

Instruction Parameters

Supported PLC Series

XPnA/1RXPnBXPnEXPnFCP3A/B/P/U
CP4A~D/U
CPnECPnFBPPLC-S

Supported Data Registers

MXYKLFTCSZRQD@DConstant
S-
D----

Supported Flags

FlagBitSupport
ErrorF11.0
ZeroF11.1-
CarryF11.2-

Number of Steps

Steps
3

Operands

OperandDescription
SThe first operand.
Entries are WORD data registers or constants.
This is the value to convert to 7-segment code.

The value range is H0000 ~ HFFFF.
DThe second operand.
Entries are only DWORD data registers.
This is where the 7-segment code is saved.

Notice

Error Flag (F11.0) Notice

The error flag, F11.0, will be ON for one scan when the address of the data register assigned by @D exceeds the range of the data register, D. The range of the data register, D, is dependent on the CPU type.

Instruction Behavior

The SEG and SEGP instructions behave as follows:

  • Converted data is stored in D and D+1.
  • It is possible to express arabic numerals (0~9) and alphabets (A~F).
  • The 160's place of the conversion result is stored in the lower byte of the data register D.

Examples