The following script reads/writes the attributes of an ADC and a DAC. We assume that both devices are connected by a cable. Note that we set the DAC voltage limits before we change the output voltage.
#!/usr/bin/python
from PyTango import *
import sys
import time
try :
dac1 = DeviceProxy( "someHost:10000/hires/exp/dac1")
adc1 = DeviceProxy( "someHost:10000/hires/exp/adc1")
dac1.VoltageMin = 0
dac1.VoltageMax = 10
dac1.Voltage = 3.5
print( adc1.name(), ", attr:", attr.name, "=", adc1.value)
except :
print( "Failed with exception !")
print( sys.exc_info()[0])