User manual

Result
IOdata: The bits of the 'IOdata' variable of the selected chip are set low (0) 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 cleared then it
is not recommended to immediately set the 'IOdata' variable to 0, 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 this changes its value the outputs
do not immediately change status. This occurs only when this value is sent to the IO-chip.
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}
ClearIOdataArray(0); // Clear channels 1 to 8 from IOdata array
// The status of the inputs stays unchanged
END;
SetIOchArray IO
Syntax
PROCEDURE SetIOchArray(Channel_no: Longint);
Parameter
Channel_no: Value between 1 and 64 which corresponds to the Input/Output channel that is to
be set.
Result
IOdata: If the selected channel is an output then the correct bit in the 'IOdata' variable of the
corresponding chip is set high (1).
Description
The status of the Input/Output ports is held in the 'IOdata' variable. Each bit of this variable
corresponds to the status of an IO-channel. If a particular output of the IO-chip is to be set then
it is not advisable to immediately set the corresponding bit in the 'IOdata' variable to high. If the
selected channel has been configured as an input then the status would no longer correspond to
the physical status. In order to prevent 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 occurs when this value is sent to the IO-chip.
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}
SetIOchArray(1); // Set channels 1 from IOdata array
SetIOchArray(5); // Set channels 5 from IOdata array
// The status of the input channel 1 stays unchanged