5- 94 5- 94
5 MELSEC FUNCTIONS
5.18.13 Sequence change SRND_M
The random number sequence is changed according to the specified 16-bit BIN data.
Function definition
BOOL SRND_M (BOOL EN, ANY16 S1);
Argument Name
IN/OUT
Description
EN IN
Execution condition (Function is executed only when the
result is TRUE)
S1 IN
Random number sequence change result (BIN 16-bit
data)
Return Value
Description
BOOL Execution
condition
Example of use
(* When execution condition X0 turns ON, the random number sequence is changed *)
(* according to the 16-bit BIN data stored in the device specified in iData.
*)
SRND_M (X0, iData);
Corresponding MELSEC command
SRND (Series updates)
5.18.14 BCD 4-digit square root BSQR_MD
The square root of the specified BCD 4-digit data is operated.
Function definition
BOOL BSQR_MD (BOOL EN, ANY16 S1, ANY32 D);
Argument Name
IN/OUT
Description
EN IN
Execution condition (Function is executed only when the
result is TRUE)
S1
IN
BCD 4-digit data to be operated (BIN 16-bit data)
D
OUT
Operation result (BIN 32-bit data)
Remarks: The digits of a bit device cannot be specified in "D".
Return Value
Description
BOOL Execution
condition
Example of use
(* When execution condition X0 turns ON, the square root of the value specified *)
(* in iData is operated, and the result is stored into Result.
*)
BSQR_MD (X0, iData, dData);
Corresponding MELSEC command
BSQR (BCD 4-digit square root)
For the usable data type, refer to "3.2.2
About ANY type".
Содержание MELSEC L series
Страница 1: ...Programming Manual Structured Text ...
Страница 2: ......
Страница 73: ...4 33 4 33 4 ST PROGRAM EXPRESSIONS MEMO ...
Страница 297: ......