28 lines
328 B
Python
Executable File
28 lines
328 B
Python
Executable File
#!/usr/bin/env python
|
|
|
|
import argparse
|
|
|
|
parser = argparse.ArgumentParser()
|
|
parser.add_argument("pvname")
|
|
clargs = parser.parse_args()
|
|
|
|
|
|
from time import sleep
|
|
from epics import PV
|
|
|
|
|
|
pvname = clargs.pvname
|
|
pv = PV(pvname)
|
|
|
|
def update(value=None, **kwargs):
|
|
print(value)
|
|
|
|
pv.add_callback(update)
|
|
|
|
|
|
while True:
|
|
sleep(1)
|
|
|
|
|
|
|