Files
eco/utilities/newMsgPV.py
T
gac-alvra (Resp.Milne Christopher) 311c5453b8 fixed stationMessage
2018-03-07 00:45:28 +01:00

21 lines
665 B
Python

#!/opt/gfa/python-3.5/latest/bin/python
from epics import PV
import datetime
import sys
class stationMessage:
def __init__(self,station):
self._BL = station
def post(self,message):
stationStr = self._BL
msg=message
date_formatted=datetime.datetime.strftime(datetime.datetime.now(), "%a %d-%b-%Y %H:%M:%S")
mscroll=PV('SF-OP:'+str(stationStr)+'-MSG:OP-MSCROLL.PROC')
mscroll.value=1
msg1=PV('SF-OP:'+str(stationStr)+'-MSG:OP-MSG1')
msg1.value = msg.encode()
date1=PV('SF-OP:'+str(stationStr)+'-MSG:OP-DATE1')
date1.value = date_formatted.encode()
msg1.disconnect()
date1.disconnect()