7-Segment Decode; 4-Bit Disconnection Of 16-Bit Data - Mitsubishi Electric MELSEC Q Series Programming Manual

Structured text
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

5 MELSEC FUNCTIONS

5.14.7 7-segment decode

The lower 4 bits (0 to F) of the specified data are decoded into 7-segment display data.
Function definition

5.14.8 4-bit disconnection of 16-bit data

The data in the lower n digits of the specified BIN 16-bit data are disconnected and stored into the lower 4 bits
of n points, starting at the specified device.
Function definition
5 - 62
SEG_M
BOOL SEG_M (BOOL EN, ANY16 S1, ANY16 D);
Argument Name
EN
S1
D
Return Value
BOOL
Execution condition
Example of use
(* When execution condition X0 turns ON, the lower 4 bits of D100 are decoded *)
(* into 7-segment display data, and the result is stored into Result.
SEG_M (X0, D100, Result);
Corresponding MELSEC command
SEG (7-segment decode)
BOOL DIS_M (BOOL EN, ANY16 S1, ANY16 n, ANY16 D);
Argument Name
EN
S1
n
D
Return Value
BOOL
Execution condition
Example of use
(* When execution condition X0 turns ON, the data in the lower D200 digits
(* (1 digit = 4 bits) of D100 are stored into the lower 4 bits of D200 points,
(* starting at Result.
DIS_M (X0, D100, D200, Result);
Corresponding MELSEC command
DIS (4-bit disconnection of 16-bit data)
IN/OUT
Execution condition (Function is executed only when the
IN
result is TRUE)
IN
Data to be decoded
OUT
Decode result (BIN 16-bit data)
DIS_M
IN/OUT
Execution condition (Function is executed only when the
IN
result is TRUE)
IN
Data to be disconnected (BIN 16-bit data)
Number of disconnected data (1 to 4) *0: No processing
IN
(BIN 16-bit data)
OUT
Disconnection result (BIN 16-bit data)
For the usable data type, refer to "3.2.2 About
ANY type".
Description
Description
Description
Description
*)
*)
*)
*)
5 - 62

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents