Skip to content
Snippets Groups Projects
Commit e4652e31 authored by kpetersn's avatar kpetersn
Browse files

Added VAL handling

parent ec4fae5d
No related branches found
No related tags found
No related merge requests found
......@@ -108,7 +108,19 @@ def main(log_file):
# Assume every record name is a motor, add to list if name is new
if name not in motor_dict.keys():
motor_dict[name] = {"MSTA" : -1, "MIP" : -1}
motor_dict[name] = {"MSTA" : -1, "MIP" : -1, "VAL" : None}
# Check for VAL change
if field == "VAL":
# Catch error here?
current_val = float(value)
last_val = motor_dict[name]["VAL"]
if last_val == None:
print "[%s %s] %s's %s field starts at %0.4f" % (date, time, name, field, current_val)
else:
print "[%s %s] %s's %s field changed from %0.4f to %0.4f" % (date, time, name, field, last_val, current_val)
motor_dict[name]["VAL"] = current_val
print
# Check for MSTA change
if field == "MSTA":
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment