>>> c = _base.InputChannel(config=input_config, channel=input_channel)
>>> c.setup_config()
- >>> p = AFMPiezo(axes=[a], channels=[c], name='Molly')
+ >>> p = AFMPiezo(axes=[a], inputs=[c], name='Molly')
>>> deflection = p.read_deflection()
>>> deflection # doctest: +SKIP
If used, the montoring channel must (as of now) be on the same
device as the controlling channel.
- >>> from pprint import pprint
>>> from pycomedi.device import Device
>>> from pycomedi.subdevice import StreamingSubdevice
>>> from pycomedi.channel import AnalogChannel
... axis_channel=axis_channel, monitor_channel=monitor_channel)
>>> p.setup_config()
- >>> pprint(config['channel'])
+ >>> print(config['channel'].dump())
{'channel': 0,
'conversion-coefficients': array([ -1.00000000e+01, 3.05180438e-04]),
'conversion-origin': 0.0,
'maxdata': 65535L,
'range': 0,
'subdevice': 1}
- >>> pprint(config['monitor'])
+ >>> print(config['monitor'].dump())
{'channel': 0,
'conversion-coefficients': array([ -1.00000000e+01, 3.05180438e-04]),
'conversion-origin': 0.0,
class InputChannel(object):
"""An input channel monitoring some interesting parameter.
- >>> from pprint import pprint
>>> from pycomedi.device import Device
>>> from pycomedi.subdevice import StreamingSubdevice
>>> from pycomedi.channel import AnalogChannel
>>> c = InputChannel(config=channel_config, channel=channel)
>>> c.setup_config()
- >>> pprint(channel_config)
+ >>> print(channel_config.dump())
{'channel': 0,
'conversion-coefficients': array([ -1.00000000e+01, 3.05180438e-04]),
'conversion-origin': 0.0,
efficient search.
"""
for n,channel in self.channels(direction=direction):
+ _LOG.critical('channel name: {}'.format(repr(n)))
if n == name:
return channel
raise ValueError(name)