Datasheet

connection between the sensor in the plant and the channel on the I/O card, also the signalobjects
are connected to the channel object. Plcprograms, HMI and applications refer to the signalobject
that represents the component in the plant, not the channelobject, representing a channel on an I/O
unit.
Area objects
Values that are fetched from input units and values that are put out to output units are stored in
special area objects. The area objects are created dynamically in runtime and reside in the system
volume under the hierarchy pwrNode-active-io. There are one area object for each signal type.
Normally you refer to the value of a signal through the ActualValue attribute of the signal. This
attribute actually contains a pointer that points to the area object, and the attribute ValueIndex states
in which index in the area object the signal value can be found. The reason to this construction with
area objects is that during the execution of a logical net, you don't want any changes of signal
values. Each plc-tread therefor takes a copy of the area objects before the start of the execution, and
reads signal values from the copy, calculated output signal values though, are written in the area
object.
I/O objects
The configuration of the I/O is done in the node hierarchy below the $Node object. To each type of
component in the I/O hierarchy you create a class that contains attributes and methods. The methods
are of type Open, Close, Read, Write and Swap, and is called by the I/O framework. The methods
connects to the bus and read data that are transferred to the area objects, or fetches data from the
area objects that are put out on the bus.
Processes
There are two system processes in Proview that calls the I/O framework,the plc process and
rt_io_comm. In the plc process each thread makes an initialization of the I/O framework, which
makes it possible to read and write I/O units synchronized with the execution of the plc code for the
threads.
Framework
The main task for the I/O framework is to identify I/O objects and call the methods that are
registred for the objects.
A first initialization is made at start of the runtime environment, when the area objects are created,
and each signal is allocated a place in the area object. The connections between signals and
channels are also checked. When signals and channels are connected in the development
environment, the identity for the channel is stored in the signals SigChanCon attribute. Now the
identity of the signal object is put into the channels SigChanCon attribute, thus making it easy to
find the signal from the channel.
The next initialization is made by every process that wants to connect to the I/O handling. The plc
process and rt_io_comm does this initialization, but also applications that need to read or write
directly to I/O units can connect. At the initialization a data structure i allocated with all agents,
racks, cards and channels that is to be handled by the current process, and the init methods for them
are called. The process then makes a cyclic call of a read and write function, that calls the read and
write methods for the I/O objects in the data structure.