User manual

END;
SetIOdataArray IO
Syntax
PROCEDURE SetIOdataArray(Chip_no: Longint);
Parameter
Chip_no: Value between 0 and 7 that corresponds to the address setting of the Input/Output
chip in which the outputs are to be set.
Result
IOdata: The bits of the 'IOdata' variable of the selected chip are set high (1) but the bits that
correspond to inputs remain unchanged.
Description
The status of the Input/Output ports are held in the 'IOdata' variable. Each bit of this variable
corresponds to the status of an IO-channel. If the outputs of the IO-chip are to be set then it is
not advisable to immediately to load 255 in the 'IOdata' variable, because the status of the input
channels would no longer correspond to the physical status. In order to avoid such conflict this
procedure must be used.
Note that the 'IOdata' variable is just a buffer memory. When it changes its value the outputs do
not immediately change status. This only happens when this value is sent to the IO-chip.
The 'IO' variables of the respective IO-chip are likewise adjusted.
Example
BEGIN
ConfigIOchipAsOutput(0);
ConfigIOchannelAsInput(1); {channel 1 configured as input}
ConfigIOchannelAsInput(2); {channel 2 configured as input}
ConfigIOchannelAsInput(3); {channel 3 configured as input}
ConfigIOchannelAsInput(4); {channel 4 configured as input}
SetIOdataArray(0); // Set channels 1 to 8 from IOdata array
// The status of the inputs stays unchanged
END;
IOoutput IO
Syntax
PROCEDURE IOoutput(Chip_no: Longint; Data: Longint);
Parameters
Chip_no: Value between 0 and 7 that corresponds to the address setting of the Input/Output
chip in which the data is to be changed.
Data: Value between 0 and 255 that is sent to the IO port (8 channels).
Result
IOdata: The 'IOdata' variable of the selected chip is updated with the new data such that the
status of the input channels remains unchanged.
The outputs of the selected IO-chip are updated.