How can I determine the day of week as an integer and provide in an OPC tag?
from java.util import *
cal = Calendar.getInstance()
print(cal.get(Calendar.DAY_OF_WEEK))
That will print the current day as an integer. You could then do a timer gateway script to write that to an OPC tag perhaps.
1 Like