added utility to post to station message panel

This commit is contained in:
gac-alvra (Resp.Milne Christopher)
2018-03-06 23:47:40 +01:00
parent 42f2e08c7b
commit 1fb67ddd3d
+17
View File
@@ -0,0 +1,17 @@
#!/opt/gfa/python-3.5/latest/bin/python
from epics import PV
import datetime
import sys
def stationMessage(station,message=''):
msg=message
date_formatted=datetime.datetime.strftime(datetime.datetime.now(), "%a %d-%b-%Y %H:%M:%S")
mscroll=PV('SF-OP:'+str(station)+'-MSG:OP-MSCROLL.PROC')
mscroll.value=1
msg1=PV('SF-OP:'+str(station)+'-MSG:OP-MSG1')
msg1.value = msg.encode()
date1=PV('SF-OP:'+str(station)+'-MSG:OP-DATE1')
date1.value = date_formatted.encode()
msg_PV.disconnect()
msg1.disconnect()
date1.disconnect()