Output icons used
Table 3-9
Output icons used
Symbol
Data type
Description
mySendDone
BOOL
Send: Complete
mySendError
BOOL
Send: Error display
mySendErrorId
WORD
Send: Error number
myNewDataReceived
BOOL
Receive: New data have been received
myReceiveError
BOOL
Receive: Error display
myReceiveErrorId
WORD
Receive: Error number
myDiagAlarm
BOOL
Diagnostic alarm occurred
myProcessAlarm
BOOL
Process alarm occurred
myReceiveDataArray
ARRAY [0..1023] of BYTE
Receive data array
Note
You can monitor and modify the input and output variables used in the programming example
in the INTERFACE area of the unit (under VAR_GLOBAL); alternatively, you can assign real
inputs and outputs to the input and output variables in your unit.
For the "point-to-point communication" application example, set the "mySelectPointToPoint"
input to TRUE. This will call the function blocks contained in the application example.
Receiving data:
To receive data, you must set the "myEnableToReceive" input to TRUE (static signal). If
receive request 1 is enabled ("myReceiveOrder1" = TRUE), the data is stored in the
"receiveDataArray" data array starting with the "receiveDataArray[0]" array element (data
offset is 0). If request 2 is enabled ("myReceiveOrder2" = TRUE), the data is stored in the
"receiveDataArray" data array starting with the "receiveDataArray[20]" array element (data
offset is 20).
If "myNewDataReceived" = TRUE, this indicates that new data has been received. This signal
is present for one cycle only.
If an error occurred during the transfer ("myReceiveError" = TRUE), the error code is stored
in the "myReceiveErrorId" variable. The error signals are deleted when you set input
"myAbortReceive" = TRUE.
Sending data:
You can use the "mySendOrder1" and "mySendOrder2" inputs to select between two send
requests:
● Request 1 sends 10 bytes of data from the "mySendDataArray" data array starting from
the "mySendDataArray[0]" array element up to the "mySendDataArray[9]" array element
● Request 2 sends 20 bytes of data from the "mySendDataArray" data array starting from
the "mySendDataArray[20]" array element up to the "mySendDataArray[39]" array element
The data is sent to the communication partner if the "myExecSend" input detects a signal
change from FALSE to TRUE (positive edge).
If output signal "mySendDone" = TRUE, the send request has been completed. A new request
Function blocks of the ET 200S 1SI serial interface module
3.11 Application example for the ET 200S 1SI serial interface module
Supplement to the ET 200S 1SI serial interface module
Function Manual, 01/2015, xxx
41