12/14 MN05003004Z-EN Direct peripheral access33WriteWordDirectA word of an output module can be written directly with thisfunction. At the time of access, the respective output image is alsorefreshed in addition to the physical output.A further refresh of the output word occurs at the end of the cycle.Table 8: Parameters of the “WriteWordDirect” functionError code with “direct peripheral access”All functions verify as far as possible for the validity of the callparameters. Verification is undertaken to determine if the accessoccurs in dependance on the parameterized signal module and thephysical existence of the signal module. If a fault is determined,access is not undertaken and an error code is output a table 9The data fields for the value transfer remain unchanged.Table 9: Error code with direct peripheral access IO_ACCESS_NO_ERROR data typeFigure 44: WriteWordDirect functionuiSlot: Slot number of the signal module. For possible parameters see table 4 on page 29uiOffset: Output word within a signal module. For possible parameters see table 4 on page 29wValue: Input parameter from “Word” typeWriteWordDirect Display of the fault code, see table 9 on page 33IO_ACCESS_NO_ERROR: 0: No errorIO_ACCESS_INVALID_SLOTNUMBER1: Slot = 0 or greater than 7IO_ACCESS_INVALID_OFFSET 2: BitWord offset is too largeIO_ACCESS_DENIED 3: Invalid access, e.g. write access to input module, read access to output module or access to non-availableaddress range (offset too large)IO_ACCESS_NO_MODULE 4: No module available at the parameterized slotIO_ACCESS_INVALID_VALUE 4: Result is not “0” or “1” with “WriteBitDirect”IO_ACCESS_ INVALID _BUFFER 5: No or incorrect pointer to the output variables