Call example
UNIT E_SI_8BY;
INTERFACE
VAR_GLOBAL
myExecSend : BOOL; // trigger send task
myAbortSend : BOOL; // cancel send order
mySendDone : BOOL; // send: completed
myInstET200S_SISend : _ET200S_SI08_send; // create FB instance
mySendDataArray : ARRAY [0..1023] OF BYTE; // send data array 1024 bytes
END_VAR
PROGRAM ExampleET200S_SI; // program for BackgroundTask
END_INTERFACE
(1)
IMPLEMENTATION
PROGRAM ExampleET200S_SI
// program for backgroundTask
VAR
myOutputArrayET200S_1 : ARRAY [0..7] OF BYTE; // array for ET200S output data
END_VAR
(2)
// CALL FB INSTANCE TO SEND
myInstET200S_SISend (
execute := myExecSend, // trigger order
(3)
reset := myAbortSend, // order cancellation
dataOffset := myDataOffsetSend, // data offset
dataLength := myDataLengthSend, // amount of data to be sent
periIn := myPeripheralInputET200s_1, // I/O variable of I/O inputs
periOut := myOutputArrayET200S_1, // output data array
data := mySendDataArray // send data array
);
mySendDone := myInstET200S_SISend.done;
(4)
Function blocks of the ET 200S 1SI serial interface module
3.9 Calling function blocks
Supplement to the ET 200S 1SI serial interface module
Function Manual, 01/2015, xxx
37
Содержание ET 200S 1SI
Страница 6: ...Preface Supplement to the ET 200S 1SI serial interface module 6 Function Manual 01 2015 xxx ...
Страница 8: ...Table of contents Supplement to the ET 200S 1SI serial interface module 8 Function Manual 01 2015 xxx ...
Страница 46: ...Alarm processing Supplement to the ET 200S 1SI serial interface module 46 Function Manual 01 2015 xxx ...
Страница 52: ...Index Supplement to the ET 200S 1SI serial interface module 52 Function Manual 01 2015 xxx ...