Personal tools
You are here: Home Software CAMP slow controls rt95 rt95_paper_www node4.html

node4.html

by admin last modified Mar 02, 2016 05:32 PM



next up previous
Next: Multithreaded Server Up: The CAMP Slow Control Previous: RPC Communications

Tcl Instrument Drivers

The complexity and idiosyncracies of the instruments in use, particularly temperature controllers and magnet power supplies, prompted the expansion of the intelligence of the instrument drivers. The ability to set or check the value of multiple variables per request was necessary. Also, the use of instrument drivers statically linked with the server was inconvenient for adding or modifying drivers. As the system was installed on four standalone data acquisition VAXen, as well as one for development, this was becoming a maintenance problem. For these reasons, an alternative method for programming instrument drivers was investigated.

DCL instrument drivers were implemented using the available command-line interface. This allowed for adding and modifying drivers without compilation, but was found too slow to be practical. If an interpreted language was to be used, the interpreter would have to be embedded into the server.

Many interpreters from the Unix world were investigated. The only interpreted language which was embeddable, expandable and ported to VMS, was found to be the Tcl language. Tcl provides a concise, C-like language with full string parsing, array and file I/O capability. [7,8] The expandability allowed CAMP-specific comands to be added to the interpreter. In fact, this was so convenient that all files and commands delivered by the command-line interface were modified to be interpreted by the Tcl interpreter, rather than parsed by the homemade parser.

The change to intelligent drivers introduced a few inefficiencies into CAMP. The drivers could now set or check one value before proceeding with another within the same request. This meant that all I/O would have to be processed synchronously. Also, an interpreted language is slower than compiled code. The Tcl instrument drivers are loaded into memory at time of instrument addition, eliminating the overhead of file I/O. As the Tcl drivers are small, typically 2 kB to 16 kB, the amount of memory required for this has not yet been a problem. Quantitative analysis has not been performed, but qualitative study suggests that the overhead of using an interpreter is not significant in comparison with the slow response of the instruments in use.

This version of CAMP (v1.2) went into use in Fall 1994.



next up previous
Next: Multithreaded Server Up: The CAMP Slow Control Previous: RPC Communications



Data Acq. Group
Sun Oct 15 01:58:10 PDT 1995
Document Actions