5. CONFIGURATION
ATTENTION
REFRESH_OUTPUT 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 (%Q).
ATTENTION
The REFRESH_OUTPUT function updates only the direct variables %Q 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.
Figure 149: Block for Output Updating
Input parameters Type Description
byRackNumber BYTE Rack number.
bySlotNumber BYTE
Position number where the module is con-
nected.
Table 190: REFRESH_OUTPUT Input Parameters
Possible TYPE_RESULT:
OK_SUCCESS: Execution success.
ERROR_FAILED: This error is returned if the function is called for a module that has only inputs, or also if the option
Always update variables (located in the module’s configuration screen, tab I/O Mapping ) is not checked.
ERROR_NOTSUPPORTED: The called routine is not supported by the product.
ERROR_PARAMETER: Invalid / unsupported parameter.
ERROR_MODULE_ABSENT: The module is absent in the bus.
ERROR_MODULE_NOTCONFIGURED: The module is not configured in the application.
ERROR_MODULE_NOTRUNNING: The module is not running (is not in operational state).
ERROR_MODULE_COMMFAIL: Failure in the communication with the module.
ERROR_MODULE_NOTFOUND: The module was not found in the application or is not supported.
Utilization example in ST language:
PROGRAM UserPrg
VAR
Info: TYPE_RESULT;
byRackNumber: BYTE;
bySlotNumber: BYTE;
END_VAR
//INPUTS:
byRackNumber := 0;
bySlotNumber := 10;
//FUNCTION:
//Function call.
Info := REFRESH_OUTPUT (byRackNumber, bySlotNumber);
//Variable "Info" receives possible function errors.
253