EpicsCA Python documentation
| >>> from EpicsCA import pv | # import the pv class | |
| >>> pv = pv('XXX:m1.VAL') | # connect to a pv with its name. | |
| >>> print pv.value | # get the current value of the pv. | |
| >>> pv.value = 3.0 | # set the pv's value. | |
| >>> print pv.get() | # gets the current value. | |
| >>> pv.put(3.0) | # set the pv's value. |
This module also contains simple caget(), caput(), and cainfo() functions for procedural use of Epics:
| >>> from EpicsCA import caget, caput, cainfo | ||
| >>> print caget('XX.VAL') | ||
| >>> print caget('XX.VAL',use_char=True) | # get 'friendly string representation' | |
| >>> caput('XX.VAL', 3.1) | ||
| >>> print cainfo('XX.VAL') | # print PV information |
cainfo('XXX.VAL') will print out a message like this:
>>> EpicsCA.cainfo('XXX.VAL')
== XX.VAL
value = 2.1
char_value = 2.100
count = 1
type = double
precision = 3
host = iocxxx.aps.anl.gov:5064
access = read/write
status = 1
severity = 0
no user callbacks defined.
==