Converting Time Type To Word (Signed), Double Word (Signed) Type - Mitsubishi Electric MELSEC-Q/L Programming Manual

Hide thumbs Also See for MELSEC-Q/L:
Table of Contents

Advertisement

Converting time type to word (signed), double word (signed) type

TIME_TO_INT(_E), TIME_TO_DINT(_E)
High
Basic
Process
Redundant Universal
performance
Structured ladder/FBD
TIME_TO_INT_E
EN
ENO
s
d
The following function(s) can go in the dotted squares.
TIME_TO_INT, TIME_TO_INT_E, TIME_TO_DINT, TIME_TO_DINT_E
■Argument
Input/output
Name
argument
Input argument
EN
s(_TIME)
Output argument
ENO
d
Processing details
■Operation processing
• TIME_TO_INT, TIME_TO_INT_E
Converts time type data input to (s) into word (signed) type data, and outputs the operation result from (d).
s
T#1s234ms
Time type
When converting to word (signed) type data, high-order 16-bit (1 word) data of time type is discarded.
• TIME_TO_DINT, TIME_TO_DINT_E
Converts time type data input to (s) into double word (signed) type data, and outputs the operation result from (d).
s
20m34s567ms
Time type
■Operation result
• Function without EN/ENO
An operation is executed and the operation value is output from (d).
• Function with EN/ENO
The following table shows the executing conditions and operation results.
EN
TRUE (Operation execution)
FALSE (Operation stop)
*1 When FALSE is output from ENO, the data output from (d) is undefined. In this case, create a program so that the data output from (d) is
not used.
LCPU
ST
ENO:=
(EN, s, d);
TIME_TO_INT_E
Description
Executing condition (TRUE: Execution, FALSE:
Stop)
Input
Execution result (TRUE: Normal execution, FALSE:
Error or stop)
Output
d
1234
Word (signed) type
d
1234567
Double word (signed) type
ENO
TRUE
*1
FALSE
Data type
Bit
Time
Bit
Word (signed), double word (signed)
(d)
Operation output value
Undefined value
5 APPLICATION FUNCTIONS
5.1 Type Conversion Functions
5
103

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents