Move code into logOPC.py, use opctest.py for execution.