The following lines introduce a generic Tango device:
<hw> <device> <name>dac2</name> <type>type_tango</type> <module>module_tango</module> <device>hires/exp/dac2</device> <control>tango</control> <hostname>haso107tk:10000</hostname> </device> </hw>
These lines are part of /online_dir/online.xml, the Tango configuration file for Online. It is loaded by the statement:
Spectra::load_configuration();
This statement is usually the last command of /online_dir/TkIrc.pl.
The generic Tango device type has been invented for debugging and testing. After it has been defined, the Tango attribute and command functions can be used to operate it. Here is an example:
tng_attrDoubleWrt( "dac2", "VoltageMax") = 8 tng_attrDoubleWrt( "dac2", "Voltage") = 1 * = tng_attrDoubleRd( "dac2", "Voltage")
Note: This example is just for demonstration. A DAC can be operated by other function, e.g.: set_dac_voltage().