Hyperbolic cosine
This FP instruction calculates the hyperbolic cosine of the angle data specified by input variable s. The result is stored in d.
Input
Hyperbolic angle
Output
Hyperbolic cosine of input value
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
bStart: BOOL:=FALSE;
rInput_value: REAL:=0.0;
rOutput_value: REAL:=0.0;
END_VAR
When the variable start is set to TRUE, the function is carried out.
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,FP_COSH!,,7,1,13,5,,?DEN?D@'s'?AENO?Cd);
B(B_VARIN,,rInput_value,5,3,7,5,);
B(B_VAROUT,,rOutput_value,13,3,15,5,);
B(B_CONTACT,,bStart,3,2,5,4,);
L(1,3,3,3);
L(5,3,7,3);
L(1,0,1,5);
END_NETWORK_BODY
END_NET_WORK
END_BODY
if (bStart)
rOutput_value:=FP_COSH(rInput_value);
END_IF;