Siemens SIMATIC ET 200S Function Manual page 24

Simotion supplement for the frequency converter
Hide thumbs Also See for SIMATIC ET 200S:
Table of Contents

Advertisement

Parameterization
4.2 Calling the function block
myFC_control
: _ET200S_FC_control;
myFC_control_In
: Struct_FC_control_In;
myFC_control_Out : Struct_FC_control_Out;
myRetValSetSafe
: enumSetAndGetSafeValue; // return value from system function _setsafevalue
...
END_VAR
PROGRAM ExampleET200S_FC;
END_INTERFACE
IMPLEMENTATION
PROGRAM ExampleET200S_FC
// Program in BackgroundTask
// call _getSafeValue -> Test I/O-variables after powerOn Reset
myRetValGetSafe := _getSafeValue (
variable
:= myPeriIn,
accessMode := DEFAULT_VALUE,
getValue
:= myTmpPeriIn
);
IF (myRetValGetSafe = OK)
THEN
// CALL FB INSTANCE
myFC_control (
periIn
:= myTmpPeriIn,
execute
:= myFC_control_In.execute,
mode
:= myFC_control_In.mode,
paraNumber
:= myFC_control_In.paraNumber,
subIndex
:= myFC_control_In.subIndex,
paraValueWr := myFC_control_In.paraValueWr, // value of the parameter to write
setpoint
:= myFC_control_In.setpoint,
ctrlDword
:= myFC_control_In.ctrlDword
);
// get output parameter of the FB _ET200S_FC_control
24
// create instance of FB _ET200S_FC_control
// input parameter of FB _ET200S_FC_control
// output parameter of the FB _ET200S_FC_control
// see example
// Program in BackgroundTask
// powerOn ready
// I/O peripheral input
// execute / start the data transfer
// select the mode
// parameter number to read or write
// index of the parameter
// set the setpoint
// set the control word
Supplement for the ET 200S frequency converter
Function Manual, 01/2015
(1
)
(2
)
(3
)
(4
)

Advertisement

Table of Contents
loading

Table of Contents