INOS
|
Overview of all classes handling the process images
Overview of all classes handling the process image channels
Processimages are responsible for all the peripheral digital and analog inputs and outputs. INOS ensures that they are updated with the requested cycletime. Typical cycletimes are 1kHz, 4kHz, 8kHz and 16kHz depending on the hardware one is using. The application always interacts with the corresponding process image if it e.g. needs to test a digital input or set an analog output. The following process image types are available
A process image type always lies in a continous area of memory. The size of this area needs to be defined in the corresponding system variable.
Example to define max. 4096 digital inputs:
in a system.dt2
or in a ch.indel.data.system.xml
The memory size used for the mentioned 4096 inputs is 512 bytes. A PC application could theoretically read all 4096 inputs by reading 128*uint32 with one GetBlock32.
A process image is represented by the class CINOSProcessImage, its channels by CINOSProcessImageChannel and its descendents. All process image channels have a unique name. The pointer to the required channel can be get with the Find method of the corresonding process image instance. Due to the fact that the method Find takes some time in a huge system, one should use it only during initialisation phase and not in a realtime part. The Find method takes two parameters, the channel name and an additional simulation level. With this level one can tell the system what to do if the requested channel is not found. There are three options :
If DF_INOS_IMAGE_CHN_SIM_DEF is used (the default case), the simulation level is defined by the system variable INOS.SimulateProcessImage.
Example to set default level to yes (1):
in a system.dt2
or in a ch.indel.data.system.xml
This process image represents all digital inputs of the whole system, independent of the fieldbus they are coming from. It therefore contains all inputs from a GinLink, COPBus, IMPBus as well as from a possible foreign fieldbus.
The base class for the image itself is CINOSBits, the one for an input CINOSBit.
Example how to access a digital input:
Hint: The name used in Find is the part behind Image.Digital.Input if you check the inco tree with the Indel INCOExplorer
This process image represents all digital outputs of the whole system, independent of the fieldbus they are coming from. It therefore contains all outputs from a GinLink, COPBus, IMPBus as well as from a possible foreign fieldbus.
The base class for the image itself is CINOSBits, the one for an output CINOSBit.
Example how to toggle a digital output:
The parameter DF_INOS_IMAGE_CHN_SIM_YES, tells the system to simulate the requested output, if it is currently not available. Thats why we do not check if the pointer is valid.
Hint: The name used in Find is the part behind Image.Digital.Output if you check the inco tree with the Indel INCOExplorer
Due to historical reasons, the process image for all other not bit type inputs is called analog inputs and is handled by the class CINOSAdcChannels. One input itself by the class CINOSAdcChannel. Examples of such channels are e.g. real analog inputs like a PT100 temperature or pseudo analog inputs like a module state of a customer specific card.
Example how to read a PT100 temperature:
Hint: The name used in Find is the part behind Image.Analog.Input if you check the inco tree with the Indel INCOExplorer
Due to historical reasons, the process image for all other not bit type outputs is called analog outputs and is handled by the class CINOSDacChannels. One input itself by the class CINOSDacChannel. Examples of such channels are e.g. real analog outputs like a current source on a COP module or pseudo analog outputs like a module flag of a customer specific card.
Example how to write a analog output:
Hint: The name used in Find is the part behind Image.Analog.Output if you check the inco tree with the Indel INCOExplorer
All counting values like e.g. encoders are handled by position channels process image.
The base class for the image itself is CINOSPosChannels, the one for a channel CINOSPosChannel.
Example how to read and encoder value:
Hint: The name used in Find is the part behind Image.Analog.Output if you check the inco tree with the Indel INCOExplorer