User manual

ConfigIOchannelAsOutput IO
Syntax
PROCEDURE ConfigIOchannelAsOutput(Channel_no: Longint);
Parameter
Channel_no: Value between 1 and 64 which corresponds to the Input/Output channel that is to
be configured as an output .
Result
IOconfig:Via the channel number, the IO-chip number and bit number are determined in order
to set the 'IOconfig' variable low (0).
Description
The selected Input/Output channel is configured as an output while the configuration of the other
channels remain unchanged. This occurs by making the correct bit low (0) in the configuration
variable of the respective IO chip. The status of this IO-channel is determined by the value
written to it.
Example
BEGIN
ConfigIOchannelAsOutput(2);
// IO channel 2 is now configured as output
END;
UpdateIOdataArray IO
Syntax
PROCEDURE UpdateIOdataArray(Chip_no: Longint; Data: Longint);
Parameters
Chip_no: Value between 0 and 7 which corresponds to the address setting of the Input/Output
chip in which the data is to be changed.
Data: Value between 0 and 255 which is to be 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.
Description
The status of the Input/Output ports are held in the 'IO data' variable. Each bit of this variable
corresponds to the status of an IO-channel. If the status of the 8 channels of an IO-chip is to be
changed then it is not advisable to immediately set the data in the 'IOdata' variable, because the
status of the input channels 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 its value is changed the outputs do
not immediately change status. Status only changes when its value is sent to the IO-chip.
Example
BEGIN