4. Configuration
193
ATTENTION:
REFRESH_INTPUT function does not support the update of any inputs that have been mapped to
symbolic variables. For its proper operation, map the input to a variable within the memory of direct
representation input variables (%I).
Figure 4-60. Function for Input Updating
Input Parameters
Type
Description
byRackNumber
BYTE
Rack number.
bySlotNumber
BYTE
Slot number where the module is connected.
Table 4-135. Input Parameters
Possible TYPE_RESULT:
OK_SUCCESS: Successful execution.
ERROR_MODULE_ABSENT: Absent module.
ERROR_MODULE_NOTCONFIGURED: Not configured module.
ERROR_MODULE_COMMFAIL: Communication failure with the module.
ERROR_FAILED: The function generates an error in case it is called to a module which outputs
only. If the option “Always update variables” is not selected, it also returns an error (I/O
Mapping, module configuration screen).
Example in ST:
PROGRAM MainPrg
VAR
Info: TYPE_RESULT;
byRackNumber: BYTE;
bySlotNumber: BYTE;
END_VAR
//ENTRADAS:
byRackNumber := 0;
bySlotNumber := 10;
//FUNCTION:
Info:= REFRESH_INPUT (byRackNumber, bySlotNumber); //Function call.
//Variable ‘Info’ receives possible function errors.
REFRESH_OUTPUT
This function is used to update the outputs of the specified module, without waiting for the cycle to
be completed. Note that the filters configured in MasterTool Xtorm, and the update time of the
module outputs refers to the real time of the inputs update in the user-developed application.
ATTENTION:
REFRESH_OUTPUT function must be used only on MainTask. If I/O update on other tasks is
needed, use the option “Enable I/O update per task” available on CPU configuration screen.