4. Configuration
208
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 task.
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 4-1
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).
Figure 4-102. Block for Input Updating
Position number where the module is
connected
Table 4-147. REFRESH_INPUT Input Parameters
Possible ERRORCODE:
ï‚· NoError: Execution success.
ï‚· IOModuleAbsent: The module was configured but is absent.
ï‚· IOModuleNotConfigured: The module was not configured.
ï‚· ParameterMismatch: This error is returned in case the Always Update Variable option is not set
or in case the REFRESH_INPUT function is called for a module that has only outputs.
ï‚· InputReadFail: Module internal critical failure (the function transmitted frame was not returned
within the defined time-out).
ï‚· FrameTransmitError: Module internal critical failure (error during the frame transmission in the
function).
ï‚· BusBusy: Module internal critical failure (the bus is not enabled for frame transmission in the
function).
Utilization example in ST language:
PROGRAM MainPrg
VAR
Info: ERRORCODE;
byRackNumber: BYTE;
bySlotNumber: BYTE;
END_VAR
/INPUTS:
byRackNumber := 0;
bySlotNumber := 10;
//FUNCTION:
Info := REFRESH_INPUT (byRackNumber, bySlotNumber); //Function call.
//Variable ‘Info’ receives possible function errors.