Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0


Maintaining independence between the control algorithm (the schema document) and the hardware configuration (the interface document) promotes program re-use. The same control algorithm can be used again and again in different hardware configurations. If a change needs to be made to the algorithm, only one file--the schema document--needs to be modified. Figure 4.15(a) shows a simple example of a hardware configuration file with one Chameleon PCM-1 module and one Chameleon DAM-1. The two modules are linked to the same schema document meaning that each module will simultaneously execute the same algorithm. In this example, the algorithm simply compares an analog input signal to a threshold and activates a relay when the threshold is exceeded. Figure 4.15(b) shows one view of the schema document linked to the PCM-1 module (the schema background color is light green). Figure 4.15(c) shows another view of the same schema document linked to the DAM-1 module (the schema background color is yellow). If we make a change to the schema document--say increase the threshold value--that change will be immediately reflected in the algorithm's execution by both modules.

 

(b)

 

(a)

(c)


Anchor
_Ref98231373
_Ref98231373
Anchor
_Toc121289032
_Toc121289032
Anchor
_Toc223175956
_Toc223175956
Anchor
_Toc224024152
_Toc224024152
Anchor
_Toc279736799
_Toc279736799
Figure 4.15. Illustration of hardware-independent programming:

(a) Hardware interface document with Chameleon PCM-1 module and Chameleon DAM-1 module;

 (b) schema document linked to PCM-1 module;

(c) same schema document linked to DAM-1 module.


In the Figure 4.15(b) configuration, the Analog Input operator is linked to the PCM-1 module's AIn1 resource, and the Relay operator is linked to the DAM-1 module's Rly1 resource. In the Figure 4.15(c) configuration, the Analog Input operator is linked to the PCM-1 module's Ain2 resource, and the Relay operator is linked to the DAM-1 module's Rly2 resource. This is reflected by the background color of each operator and their respective label.


In the Figure 4.15 configuration, the controller node is monitoring two analog signals and activating two relay outputs, with each module equally sharing the computational burden. The same objective could be achieved with the configuration shown in Figure 4.16. In that implementation, the same I/O points are used but only the PCM-1 module will execute a schema (the DAM-1 module has no schema linked to it). The single schema monitors both inputs, compares to thresholds, and activates the relay outputs. With this arrangement, the entire computational burden of the control algorithm is borne by the PCM-1 module. (Clearly, in this example the computational burden is negligible in either case. The statement is a relative characterization between the two implementations.

(a)

(b)


Anchor
_Ref116365543
_Ref116365543
Anchor
_Toc121289033
_Toc121289033
Anchor
_Toc223175957
_Toc223175957
Anchor
_Toc224024153
_Toc224024153
Anchor
_Toc279736800
_Toc279736800
Figure 4.16. Equivalent implementation of Figure 4.15 implementation

with all computation performed in the PCM-1 module.

The DAM-1 module does not have a schema linked to it.