MUL_TIME_INT

Multiply TIME by INTEGER

MUL_TIME_INT multiplies the values of the two input variables with each other and writes the result into the output variable.

Parameters

Input

Time (TIME)

1st input: multiplicand

Int (INT)

2nd input: multiplicator

Output

Time (TIME)

result

Example

POU header

All input and output variables used for programming this function have been declared in the POU header. The same POU header is used for all programming languages.

	VAR
		time_value_1: TIME:=T#0s;
		multiplier: INT:=0;
		time_value_2: TIME:=T#0s;
	END_VAR

In this example the input variables time_value_1 and multiplier have been declared. Instead, you may enter constants directly at the input contacts of a function.

POU body

time_value_1 is multiplied with multiplier. The result is written into time_value_2.

LD body

BODY
    WORKSPACE
        NETWORK_LIST_TYPE := NWTYPELD ;
        ACTIVE_NETWORK := 0 ;
    END_WORKSPACE
    NET_WORK
        NETWORK_TYPE := NWTYPELD ;
        NETWORK_LABEL :=  ;
        NETWORK_TITLE :=  ;
        NETWORK_HEIGHT := 5 ;
        NETWORK_BODY
B(B_F,MUL_TIME_INT!,Instance,10,1,18,5,,?D@'Time'?D@'Int'?C);
B(B_VARIN,,time_value_1,8,2,10,4,);
B(B_VARIN,,multiplier,8,3,10,5,);
B(B_VAROUT,,time_value_2,18,2,20,4,);
L(1,0,1,5);
        END_NETWORK_BODY
    END_NET_WORK
END_BODY

ST body

time_value_2:=MUL_TIME_INT(time_value_1, multiplier);

IL body

LD

time_value_1

MUL_TIME_INT

multiplier

ST

time_value_2

Modified on: 2019-01-26Feedback on this pagePanasonic hotline