EasyManua.ls Logo

Siemens SIMATIC ET 200S - Page 24

Siemens SIMATIC ET 200S
40 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
myFC_control : _ET200S_FC_control; // create instance of FB _ET200S_FC_control
myFC_control_In : Struct_FC_control_In; // input parameter of FB _ET200S_FC_control
myFC_control_Out : Struct_FC_control_Out; // output parameter of the FB _ET200S_FC_control
myRetValSetSafe : enumSetAndGetSafeValue; // return value from system function _setsafevalue
... // see example
END_VAR
(1
)
PROGRAM ExampleET200S_FC; // Program in BackgroundTask
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) // powerOn ready
THEN
// CALL FB INSTANCE
myFC_control ( (2
)
periIn := myTmpPeriIn, // I/O peripheral input
execute := myFC_control_In.execute, // execute / start the data transfer
mode := myFC_control_In.mode, // select the mode
paraNumber := myFC_control_In.paraNumber, // parameter number to read or write
subIndex := myFC_control_In.subIndex, // index of the parameter
paraValueWr := myFC_control_In.paraValueWr, // value of the parameter to write
setpoint := myFC_control_In.setpoint, // set the setpoint
ctrlDword := myFC_control_In.ctrlDword // set the control word
);
(3
)
// get output parameter of the FB _ET200S_FC_control (4
)
Parameterization
4.2 Calling the function block
Supplement for the ET 200S frequency converter
24 Function Manual, 01/2015

Other manuals for Siemens SIMATIC ET 200S

Related product manuals