5. CONFIGURATION
Transmit.REQUEST := TRUE;
Transmit.PORT := Port;
Transmit.TX_BUFFER_POINTER := ADR(Buffer_Pointer);
Transmit.TX_BUFFER_LENGTH := 10;
Transmit.TX_TIMEOUT := 10000;
Transmit.DELAY_BEFORE_TX := 1000;
Transmit.CLEAR_RX_BEFORE_TX := TRUE;
//FUNCTION:
Transmit();
//OUTPUTS:
Transmit.DONE;
Transmit.EXEC;
Transmit.ERROR;
Status := Transmit.STATUS; //If it is necessary to treat the error.
Transmit.TX_TRANSMITTED;
5.12.2. Inputs and Outputs Update
By default, the local bus and CPU integrated I/O are updated on every execution cycle of MainTask. The Refresh functions
allows to update these I/O points asynchronously at any point of user application code.
When the function blocks to update the inputs and outputs are not used, the update is performed every cycle of the Main-
Task.
ATTENTION
At the startup of a CPU of this series, the inputs and outputs are only updated for reading
and prepared for writing when the MainTask is performed.
All other system tasks that run before MainTask will be with the inputs and outputs invalid.
5.12.2.1. REFRESH_INPUT
This function block is used to update the specified module inputs without the necessity to wait for the cycle to be completed.
It is important to notice that the filters configured in the MasterTool IEC XE and the update time of the module inputs will
have to be considered in effective time of the inputs update in the application developed by the user.
ATTENTION
The REFRESH_INPUT function must only be used in MainTask.
To update inputs in other tasks, the option Enable I/O update per task must be selected, for
further information about this option, consult Table 42.
ATTENTION
REFRESH_INPUT function does not support inputs that have been mapped to symbolic
variables. For proper operation it is necessary that the input is mapped to a variable within
the memory direct representation of input variables (%I).
ATTENTION
The REFRESH_INPUT function updates only the direct variables %I that are declared in the
"Bus: I/O Mapping" tab of the module addressed in the respective rack/slot of the function.
In the case of communication modules/interfaces (MODBUS, Profibus, etc.), the update does
not include the direct variables of the device mappings.
251