Floating-Point Natural Logarithm Operation; Random Number Generation - Mitsubishi MELSEC-q Programming Manual

Melsec q series; melsec l series
Hide thumbs Also See for MELSEC-q:
Table of Contents

Advertisement

5 MELSEC FUNCTIONS

5.18.11 Floating-point natural logarithm operation

The base e logarithm (natural logarithm) of the specified value is operated.
Function definition

5.18.12 Random number generation

Random numbers of 0 to 32767 are generated.
Function definition
5- 93
BOOL LOG_E_MD (BOOL EN, REAL S1, REAL D);
Argument Name
EN
S1
D
Return Value
BOOL
Execution condition
Example of use
(* When execution condition X0 turns ON, the base e logarithm (natural logarithm) *)
(* of the value specified in rData is operated, and the result is stored into Result. *)
LOG_E_MD (X0, rData, Result);
Corresponding MELSEC command
LOG (Natural logarithm operation on floating-point data (Single precision))
BOOL RND_M (BOOL EN, ANY16 D);
Argument Name
EN
D
Return Value
BOOL
Execution condition
Example of use
(* When execution condition X0 turns ON, random numbers of 0 to 32767 are
(* generated and stored into Result.
RND_M (X0, Result);
Corresponding MELSEC command
RND (Random number generation)
LOG_E_MD
IN/OUT
Execution condition (Function is executed only when the
IN
result is TRUE)
Data to be operated (only positive value can be
IN
specified) (real number data)
Operation result (log
OUT
RND_M
IN/OUT
Execution condition (Function is executed only when the
IN
result is TRUE)
OUT
Random number generation result (BIN 16-bit data)
For the usable data type, refer to "3.2.2
About ANY type".
Description
S1) (real number data)
e
Description
Description
Description
*)
*)
5- 93

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec-l

Table of Contents