Ah I see. It is a very long script, over 1600* lines, however its extremely redundant. I have to post it in three* parts as I was well above the character limit when trying to post in one comment. However the code will be posted exactly as it is written.
Thank you in advance for all the help!
Lines 1-642
#define the beginning of shift 1 and where 0(midnight) is
a = 6
b = a+1
c = b+1
d = c+1
e = d+1
f = e+1
g = f+1
h = g+1
i = h+1
j = i+1
k = j+1
l = k+1
m = l+1
n = m+1
o = n+1
p = o+1
q = p+1
r = q+1
s = 0
t = s+1
u = t+1
v = u+1
w = v+1
x = w+1
# min1 = 30
# part = system.tag.read("[.]ShiftInfo").value.getValueAt(0,1)
timeTag = currentValue.value
# minuteTag = system.date.getMinute
if system.tag.read("[.]PMStatus").value == 0:
if system.date.getHour24(timeTag) == b:
table = system.tag.read("[.]EveryHourShift1").value
# if table.getValueAt(0,1) =="" and part =="16.9oz, 20.8g, Propel ":
# newData1 = system.dataset.setValue(table, 0,1, "Red")
# system.tag.write("[.]EveryHourShift1",newData1)
if table.getValueAt(0,1) =="":
newData1 = system.dataset.setValue(table, 0,1, "Red")
system.tag.write("[.]EveryHourShift1",newData1)
if table.getValueAt(1,1)== "":
newData2 = system.dataset.setValue(table, 1,1, "Red")
system.tag.write("[.]EveryHourShift1",newData2)
if table.getValueAt(2,1) =="":
newData3 = system.dataset.setValue(table, 2,1, "Red")
system.tag.write("[.]EveryHourShift1",newData3)
if table.getValueAt(3,1) =="":
newData4 = system.dataset.setValue(table, 3,1, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(4,1) =="":
newData4 = system.dataset.setValue(table, 4,1, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(5,1) =="":
newData4 = system.dataset.setValue(table, 5,1, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(6,1) =="":
newData4 = system.dataset.setValue(table, 6,1, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(7,1) =="":
newData4 = system.dataset.setValue(table, 7,1, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(8,1) =="":
newData4 = system.dataset.setValue(table, 8,1, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
# table3 = system.tag.read("[.]EveryTwiceAnHourShift1").value
# if minuteTag < 30:
# if table3.getValueAt(0,1) =="":
# newData1 = system.dataset.setValue(table, 0,1, "Red")
# system.tag.write("[.]EveryTwiceAnHourShift1",newData1)
# else:
# if table3.getValueAt(0,1) =="":
# newData1 = system.dataset.setValue(table, 0,1, "Red")
# system.tag.write("[.]EveryTwiceAnHourShift1",newData1)
elif system.date.getHour24(timeTag) == c:
table = system.tag.read("[.]EveryHourShift1").value
# if table.getValueAt(0,2) ==""and part =="16.9oz, 20.8g, Propel ":
# newData1 = system.dataset.setValue(table, 0,2, "Red")
# system.tag.write("[.]EveryHourShift1",newData1)
# elif table.getValueAt(0,2) =="":
# newData1 = system.dataset.setValue(table, 0,2, "Blue")
# system.tag.write("[.]EveryHourShift1",newData1)
if table.getValueAt(0,2)== "":
newData1 = system.dataset.setValue(table, 0,2, "Red")
system.tag.write("[.]EveryHourShift1",newData1)
if table.getValueAt(1,2)== "":
newData2 = system.dataset.setValue(table, 1,2, "Red")
system.tag.write("[.]EveryHourShift1",newData2)
if table.getValueAt(2,2) =="":
newData3 = system.dataset.setValue(table, 2,2, "Red")
system.tag.write("[.]EveryHourShift1",newData3)
if table.getValueAt(3,2) =="":
newData4 = system.dataset.setValue(table, 3,2, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(4,2) =="":
newData4 = system.dataset.setValue(table, 4,2, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(5,2) =="":
newData4 = system.dataset.setValue(table, 5,2, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(6,2) =="":
newData4 = system.dataset.setValue(table, 6,2, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(7,2) =="":
newData4 = system.dataset.setValue(table, 7,2, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(8,2) =="":
newData4 = system.dataset.setValue(table, 8,2, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
table2 = system.tag.read("[.]Every2HourShift1").value
if table2.getValueAt(0,1) =="":
twoData1 = system.dataset.setValue(table2, 0,1, "Red")
system.tag.write("[.]Every2HourShift1",twoData1)
if table2.getValueAt(1,1) =="":
twoData1 = system.dataset.setValue(table2, 1,1, "Red")
system.tag.write("[.]Every2HourShift1",twoData1)
elif system.date.getHour24(timeTag) == d:
table = system.tag.read("[.]EveryHourShift1").value
# if table.getValueAt(0,3) ==""and part =="16.9oz, 20.8g, Propel ":
# newData1 = system.dataset.setValue(table, 0,3, "Red")
# system.tag.write("[.]EveryHourShift1",newData1)
if table.getValueAt(0,3) =="":
newData1 = system.dataset.setValue(table, 0,3, "Red")
system.tag.write("[.]EveryHourShift1",newData1)
if table.getValueAt(1,3)== "":
newData2 = system.dataset.setValue(table, 1,3, "Red")
system.tag.write("[.]EveryHourShift1",newData2)
if table.getValueAt(2,3) =="":
newData3 = system.dataset.setValue(table, 2,3, "Red")
system.tag.write("[.]EveryHourShift1",newData3)
if table.getValueAt(3,3) =="":
newData4 = system.dataset.setValue(table, 3,3, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(4,3) =="":
newData4 = system.dataset.setValue(table, 4,3, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(5,3) =="":
newData4 = system.dataset.setValue(table, 5,3, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(6,3) =="":
newData4 = system.dataset.setValue(table, 6,3, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(7,3) =="":
newData4 = system.dataset.setValue(table, 7,3, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(8,3) =="":
newData4 = system.dataset.setValue(table, 8,3, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
elif system.date.getHour24(timeTag) == e:
table = system.tag.read("[.]EveryHourShift1").value
# if table.getValueAt(0,4) ==""and part =="16.9oz, 20.8g, Propel ":
# newData1 = system.dataset.setValue(table, 0,4, "Red")
# system.tag.write("[.]EveryHourShift1",newData1)
if table.getValueAt(0,4) =="":
newData1 = system.dataset.setValue(table, 0,4, "Red")
system.tag.write("[.]EveryHourShift1",newData1)
if table.getValueAt(1,4)== "":
newData2 = system.dataset.setValue(table, 1,4, "Red")
system.tag.write("[.]EveryHourShift1",newData2)
if table.getValueAt(2,4) =="":
newData3 = system.dataset.setValue(table, 2,4, "Red")
system.tag.write("[.]EveryHourShift1",newData3)
if table.getValueAt(3,4) =="":
newData4 = system.dataset.setValue(table, 3,4, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(4,4) =="":
newData4 = system.dataset.setValue(table, 4,4, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(5,4) =="":
newData4 = system.dataset.setValue(table, 5,4, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(6,4) =="":
newData4 = system.dataset.setValue(table, 6,4, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(7,4) =="":
newData4 = system.dataset.setValue(table, 7,4, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(8,4) =="":
newData4 = system.dataset.setValue(table, 8,4, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
table2 = system.tag.read("[.]Every2HourShift1").value
if table2.getValueAt(0,2) =="":
twoData1 = system.dataset.setValue(table2, 0,2, "Red")
system.tag.write("[.]Every2HourShift1",twoData1)
if table2.getValueAt(1,2) =="":
twoData1 = system.dataset.setValue(table2, 1,2, "Red")
system.tag.write("[.]Every2HourShift1",twoData1)
elif system.date.getHour24(timeTag) == f:
table = system.tag.read("[.]EveryHourShift1").value
# if table.getValueAt(0,5) =="" and part =="16.9oz, 20.8g, Propel ":
# newData1 = system.dataset.setValue(table, 0,5, "Red")
# system.tag.write("[.]EveryHourShift1",newData1)
if table.getValueAt(0,5) =="":
newData1 = system.dataset.setValue(table, 0,5, "Red")
system.tag.write("[.]EveryHourShift1",newData1)
if table.getValueAt(1,5)== "":
newData2 = system.dataset.setValue(table, 1,5, "Red")
system.tag.write("[.]EveryHourShift1",newData2)
if table.getValueAt(2,5) =="":
newData3 = system.dataset.setValue(table, 2,5, "Red")
system.tag.write("[.]EveryHourShift1",newData3)
if table.getValueAt(3,5) =="":
newData4 = system.dataset.setValue(table, 3,5, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(4,5) =="":
newData4 = system.dataset.setValue(table, 4,5, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(5,5) =="":
newData4 = system.dataset.setValue(table, 5,5, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(6,5) =="":
newData4 = system.dataset.setValue(table, 6,5, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(7,5) =="":
newData4 = system.dataset.setValue(table, 7,5, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(8,5) =="":
newData4 = system.dataset.setValue(table, 8,5, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
elif system.date.getHour24(timeTag) == g:
table = system.tag.read("[.]EveryHourShift1").value
# if table.getValueAt(0,6) ==""and part =="16.9oz, 20.8g, Propel ":
# newData1 = system.dataset.setValue(table, 0,6, "Red")
# system.tag.write("[.]EveryHourShift1",newData1)
if table.getValueAt(0,6) =="":
newData1 = system.dataset.setValue(table, 0,6, "Red")
system.tag.write("[.]EveryHourShift1",newData1)
if table.getValueAt(1,6)== "":
newData2 = system.dataset.setValue(table, 1,6, "Red")
system.tag.write("[.]EveryHourShift1",newData2)
if table.getValueAt(2,6) =="":
newData3 = system.dataset.setValue(table, 2,6, "Red")
system.tag.write("[.]EveryHourShift1",newData3)
if table.getValueAt(3,6) =="":
newData4 = system.dataset.setValue(table, 3,6, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(4,6) =="":
newData4 = system.dataset.setValue(table, 4,6, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(5,6) =="":
newData4 = system.dataset.setValue(table, 5,6, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(6,6) =="":
newData4 = system.dataset.setValue(table, 6,6, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(7,6) =="":
newData4 = system.dataset.setValue(table, 7,6, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(8,6) =="":
newData4 = system.dataset.setValue(table, 8,6, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
table2 = system.tag.read("[.]Every2HourShift1").value
if table2.getValueAt(0,3) =="":
twoData1 = system.dataset.setValue(table2, 0,3, "Red")
system.tag.write("[.]Every2HourShift1",twoData1)
if table2.getValueAt(1,3) =="":
twoData1 = system.dataset.setValue(table2, 1,3, "Red")
system.tag.write("[.]Every2HourShift1",twoData1)
elif system.date.getHour24(timeTag) == h:
table = system.tag.read("[.]EveryHourShift1").value
# if table.getValueAt(0,7) ==""and part =="16.9oz, 20.8g, Propel ":
# newData1 = system.dataset.setValue(table, 0,7, "Red")
# system.tag.write("[.]EveryHourShift1",newData1)
if table.getValueAt(0,7) =="":
newData1 = system.dataset.setValue(table, 0,7, "Red")
system.tag.write("[.]EveryHourShift1",newData1)
if table.getValueAt(1,7)== "":
newData2 = system.dataset.setValue(table, 1,7, "Red")
system.tag.write("[.]EveryHourShift1",newData2)
if table.getValueAt(2,7) =="":
newData3 = system.dataset.setValue(table, 2,7, "Red")
system.tag.write("[.]EveryHourShift1",newData3)
if table.getValueAt(3,7) =="":
newData4 = system.dataset.setValue(table, 3,7, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(4,7) =="":
newData4 = system.dataset.setValue(table, 4,7, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(5,7) =="":
newData4 = system.dataset.setValue(table, 5,7, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(6,7) =="":
newData4 = system.dataset.setValue(table, 6,7, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(7,7) =="":
newData4 = system.dataset.setValue(table, 7,7, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(8,7) =="":
newData4 = system.dataset.setValue(table, 8,7, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
elif system.date.getHour24(timeTag) == i:
table = system.tag.read("[.]EveryHourShift1").value
# if table.getValueAt(0,8) ==""and part =="16.9oz, 20.8g, Propel ":
# newData1 = system.dataset.setValue(table, 0,8, "Red")
# system.tag.write("[.]EveryHourShift1",newData1)
if table.getValueAt(0,8) =="":
newData1 = system.dataset.setValue(table, 0,8, "Red")
system.tag.write("[.]EveryHourShift1",newData1)
if table.getValueAt(1,8)== "":
newData2 = system.dataset.setValue(table, 1,8, "Red")
system.tag.write("[.]EveryHourShift1",newData2)
if table.getValueAt(2,8) =="":
newData3 = system.dataset.setValue(table, 2,8, "Red")
system.tag.write("[.]EveryHourShift1",newData3)
if table.getValueAt(3,8) =="":
newData4 = system.dataset.setValue(table, 3,8, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(4,8) =="":
newData4 = system.dataset.setValue(table, 4,8, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(5,8) =="":
newData4 = system.dataset.setValue(table, 5,8, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(6,8) =="":
newData4 = system.dataset.setValue(table, 6,8, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(7,8) =="":
newData4 = system.dataset.setValue(table, 7,8, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(8,8) =="":
newData4 = system.dataset.setValue(table, 8,8, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
table2 = system.tag.read("[.]Every2HourShift1").value
if table2.getValueAt(0,4) =="":
twoData1 = system.dataset.setValue(table2, 0,4, "Red")
system.tag.write("[.]Every2HourShift1",twoData1)
if table2.getValueAt(1,4) =="":
twoData1 = system.dataset.setValue(table2, 1,4, "Red")
system.tag.write("[.]Every2HourShift1",twoData1)
elif system.date.getHour24(timeTag) == j:
table = system.tag.read("[.]EveryHourShift1").value
# if table.getValueAt(0,9) ==""and part =="16.9oz, 20.8g, Propel ":
# newData1 = system.dataset.setValue(table, 0,9, "Red")
# system.tag.write("[.]EveryHourShift1",newData1)
if table.getValueAt(0,9) =="":
newData1 = system.dataset.setValue(table, 0,9, "Red")
system.tag.write("[.]EveryHourShift1",newData1)
if table.getValueAt(1,9)== "":
newData2 = system.dataset.setValue(table, 1,9, "Red")
system.tag.write("[.]EveryHourShift1",newData2)
if table.getValueAt(2,9) =="":
newData3 = system.dataset.setValue(table, 2,9, "Red")
system.tag.write("[.]EveryHourShift1",newData3)
if table.getValueAt(3,9) =="":
newData4 = system.dataset.setValue(table, 3,9, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(4,9) =="":
newData4 = system.dataset.setValue(table, 4,9, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(5,9) =="":
newData4 = system.dataset.setValue(table, 5,9, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(6,9) =="":
newData4 = system.dataset.setValue(table, 6,9, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(7,9) =="":
newData4 = system.dataset.setValue(table, 7,9, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(8,9) =="":
newData4 = system.dataset.setValue(table, 8,9, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
elif system.date.getHour24(timeTag) == k:
table = system.tag.read("[.]EveryHourShift1").value
# if table.getValueAt(0,10) ==""and part =="16.9oz, 20.8g, Propel ":
# newData1 = system.dataset.setValue(table, 0,10, "Red")
# system.tag.write("[.]EveryHourShift1",newData1)
if table.getValueAt(0,10) =="":
newData1 = system.dataset.setValue(table, 0,10, "Red")
system.tag.write("[.]EveryHourShift1",newData1)
if table.getValueAt(1,10)== "":
newData2 = system.dataset.setValue(table, 1,10, "Red")
system.tag.write("[.]EveryHourShift1",newData2)
if table.getValueAt(2,10) =="":
newData3 = system.dataset.setValue(table, 2,10, "Red")
system.tag.write("[.]EveryHourShift1",newData3)
if table.getValueAt(3,10) =="":
newData4 = system.dataset.setValue(table, 3,10, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(4,10) =="":
newData4 = system.dataset.setValue(table, 4,10, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(5,10) =="":
newData4 = system.dataset.setValue(table, 5,10, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(6,10) =="":
newData4 = system.dataset.setValue(table, 6,10, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(7,10) =="":
newData4 = system.dataset.setValue(table, 7,10, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(8,10) =="":
newData4 = system.dataset.setValue(table, 8,10, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
table2 = system.tag.read("[.]Every2HourShift1").value
if table2.getValueAt(0,5) =="":
twoData1 = system.dataset.setValue(table2, 0,5, "Red")
system.tag.write("[.]Every2HourShift1",twoData1)
if table2.getValueAt(1,5) =="":
twoData1 = system.dataset.setValue(table2, 1,5, "Red")
system.tag.write("[.]Every2HourShift1",twoData1)
elif system.date.getHour24(timeTag) == l:
table = system.tag.read("[.]EveryHourShift1").value
# if table.getValueAt(0,11) ==""and part =="16.9oz, 20.8g, Propel ":
# newData1 = system.dataset.setValue(table, 0,11, "Red")
# system.tag.write("[.]EveryHourShift1",newData1)
if table.getValueAt(0,11) =="":
newData1 = system.dataset.setValue(table, 0,11, "Red")
system.tag.write("[.]EveryHourShift1",newData1)
if table.getValueAt(1,11)== "":
newData2 = system.dataset.setValue(table, 1,11, "Red")
system.tag.write("[.]EveryHourShift1",newData2)
if table.getValueAt(2,11) =="":
newData3 = system.dataset.setValue(table, 2,11, "Red")
system.tag.write("[.]EveryHourShift1",newData3)
if table.getValueAt(3,11) =="":
newData4 = system.dataset.setValue(table, 3,11, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(4,11) =="":
newData4 = system.dataset.setValue(table, 4,11, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(5,11) =="":
newData4 = system.dataset.setValue(table, 5,11, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(6,11) =="":
newData4 = system.dataset.setValue(table, 6,11, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(7,11) =="":
newData4 = system.dataset.setValue(table, 7,11, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(8,11) =="":
newData4 = system.dataset.setValue(table, 8,11, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
elif system.date.getHour24(timeTag) == m:
table = system.tag.read("[.]EveryHourShift1").value
# if table.getValueAt(0,12) ==""and part =="16.9oz, 20.8g, Propel ":
# newData1 = system.dataset.setValue(table, 0,12, "Red")
# system.tag.write("[.]EveryHourShift1",newData1)
if table.getValueAt(0,12) =="":
newData1 = system.dataset.setValue(table, 0,12, "Red")
system.tag.write("[.]EveryHourShift1",newData1)
if table.getValueAt(1,12)== "":
newData2 = system.dataset.setValue(table, 1,12, "Red")
system.tag.write("[.]EveryHourShift1",newData2)
if table.getValueAt(2,12) =="":
newData3 = system.dataset.setValue(table, 2,12, "Red")
system.tag.write("[.]EveryHourShift1",newData3)
if table.getValueAt(3,12) =="":
newData4 = system.dataset.setValue(table, 3,12, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(4,12) =="":
newData4 = system.dataset.setValue(table, 4,12, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(5,12) =="":
newData4 = system.dataset.setValue(table, 5,12, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(6,12) =="":
newData4 = system.dataset.setValue(table, 6,12, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(7,12) =="":
newData4 = system.dataset.setValue(table, 7,12, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
if table.getValueAt(8,12) =="":
newData4 = system.dataset.setValue(table, 8,12, "Red")
system.tag.write("[.]EveryHourShift1",newData4)
elif system.date.getHour24(timeTag) ==n:
table = system.tag.read("[.]EveryHourShift2").value
# if table.getValueAt(0,1) ==""and part =="16.9oz, 20.8g, Propel ":
# newData1 = system.dataset.setValue(table, 0,1, "Red")
# system.tag.write("[.]EveryHourShift2",newData1)
if table.getValueAt(0,1)== "":
newData1 = system.dataset.setValue(table, 0,1, "Red")
system.tag.write("[.]EveryHourShift2",newData1)
if table.getValueAt(1,1)== "":
newData2 = system.dataset.setValue(table, 1,1, "Red")
system.tag.write("[.]EveryHourShift2",newData2)
if table.getValueAt(2,1) =="":
newData3 = system.dataset.setValue(table, 2,1, "Red")
system.tag.write("[.]EveryHourShift2",newData3)
if table.getValueAt(3,1) =="":
newData4 = system.dataset.setValue(table, 3,1, "Red")
system.tag.write("[.]EveryHourShift2",newData4)
if table.getValueAt(4,1) =="":
newData4 = system.dataset.setValue(table, 4,1, "Red")
system.tag.write("[.]EveryHourShift2",newData4)
if table.getValueAt(5,1) =="":
newData4 = system.dataset.setValue(table, 5,1, "Red")
system.tag.write("[.]EveryHourShift2",newData4)
if table.getValueAt(6,1) =="":
newData4 = system.dataset.setValue(table, 6,1, "Red")
system.tag.write("[.]EveryHourShift2",newData4)
if table.getValueAt(7,1) =="":
newData4 = system.dataset.setValue(table, 7,1, "Red")
system.tag.write("[.]EveryHourShift2",newData4)
if table.getValueAt(8,1) =="":
newData4 = system.dataset.setValue(table, 8,1, "Red")
system.tag.write("[.]EveryHourShift2",newData4)
elif system.date.getHour24(timeTag) == o:
table = system.tag.read("[.]EveryHourShift2").value
# if table.getValueAt(0,2) ==""and part =="16.9oz, 20.8g, Propel ":
# newData1 = system.dataset.setValue(table, 0,2, "Red")
# system.tag.write("[.]EveryHourShift2",newData1)
if table.getValueAt(0,2)== "":
newData1 = system.dataset.setValue(table, 0,2, "Red")
system.tag.write("[.]EveryHourShift2",newData1)
if table.getValueAt(1,2)== "":
newData2 = system.dataset.setValue(table, 1,2, "Red")
system.tag.write("[.]EveryHourShift2",newData2)
if table.getValueAt(2,2) =="":
newData3 = system.dataset.setValue(table, 2,2, "Red")
system.tag.write("[.]EveryHourShift2",newData3)
if table.getValueAt(3,2) =="":
newData4 = system.dataset.setValue(table, 3,2, "Red")
system.tag.write("[.]EveryHourShift2",newData4)
if table.getValueAt(4,2) =="":
newData4 = system.dataset.setValue(table, 4,2, "Red")
system.tag.write("[.]EveryHourShift2",newData4)
if table.getValueAt(5,2) =="":
newData4 = system.dataset.setValue(table, 5,2, "Red")
system.tag.write("[.]EveryHourShift2",newData4)
if table.getValueAt(6,2) =="":
newData4 = system.dataset.setValue(table, 6,2, "Red")
system.tag.write("[.]EveryHourShift2",newData4)
if table.getValueAt(7,2) =="":
newData4 = system.dataset.setValue(table, 7,2, "Red")
system.tag.write("[.]EveryHourShift2",newData4)
if table.getValueAt(8,2) =="":
newData4 = system.dataset.setValue(table, 8,2, "Red")
system.tag.write("[.]EveryHourShift2",newData4)
table2 = system.tag.read("[.]Every2HourShift2").value
if table2.getValueAt(0,1) =="":
twoData1 = system.dataset.setValue(table2, 0,1, "Red")
system.tag.write("[.]Every2HourShift2",twoData1)
if table2.getValueAt(1,1) =="":
twoData1 = system.dataset.setValue(table2, 1,1, "Red")
system.tag.write("[.]Every2HourShift2",twoData1)
elif system.date.getHour24(timeTag) == p:
table = system.tag.read("[.]EveryHourShift2").value
# if table.getValueAt(0,3) ==""and part =="16.9oz, 20.8g, Propel ":
# newData1 = system.dataset.setValue(table, 0,3, "Red")
# system.tag.write("[.]EveryHourShift2",newData1)
if table.getValueAt(0,3)== "":
newData1 = system.dataset.setValue(table, 0,3, "Red")
system.tag.write("[.]EveryHourShift2",newData1)
if table.getValueAt(1,3)== "":
newData2 = system.dataset.setValue(table, 1,3, "Red")
system.tag.write("[.]EveryHourShift2",newData2)
if table.getValueAt(2,3) =="":
newData3 = system.dataset.setValue(table, 2,3, "Red")
system.tag.write("[.]EveryHourShift2",newData3)
if table.getValueAt(3,3) =="":
newData4 = system.dataset.setValue(table, 3,3, "Red")
system.tag.write("[.]EveryHourShift2",newData4)
if table.getValueAt(4,3) =="":
newData4 = system.dataset.setValue(table, 4,3, "Red")
system.tag.write("[.]EveryHourShift2",newData4)
if table.getValueAt(5,3) =="":
newData4 = system.dataset.setValue(table, 5,3, "Red")
system.tag.write("[.]EveryHourShift2",newData4)
if table.getValueAt(6,3) =="":
newData4 = system.dataset.setValue(table, 6,3, "Red")
system.tag.write("[.]EveryHourShift2",newData4)
if table.getValueAt(7,3) =="":
newData4 = system.dataset.setValue(table, 7,3, "Red")
system.tag.write("[.]EveryHourShift2",newData4)
if table.getValueAt(8,3) =="":
newData4 = system.dataset.setValue(table, 8,3, "Red")
system.tag.write("[.]EveryHourShift2",newData4)
elif system.date.getHour24(timeTag) == q:
table = system.tag.read("[.]EveryHourShift2").value
# if table.getValueAt(0,4) ==""and part =="16.9oz, 20.8g, Propel ":
# newData1 = system.dataset.setValue(table, 0,4, "Red")
# system.tag.write("[.]EveryHourShift2",newData1)
if table.getValueAt(0,4)== "":
newData1 = system.dataset.setValue(table, 0,4, "Red")
system.tag.write("[.]EveryHourShift2",newData1)
if table.getValueAt(1,4)== "":
newData2 = system.dataset.setValue(table, 1,4, "Red")
system.tag.write("[.]EveryHourShift2",newData2)
if table.getValueAt(2,4) =="":
newData3 = system.dataset.setValue(table, 2,4, "Red")
system.tag.write("[.]EveryHourShift2",newData3)
if table.getValueAt(3,4) =="":
newData4 = system.dataset.setValue(table, 3,4, "Red")
system.tag.write("[.]EveryHourShift2",newData4)
if table.getValueAt(4,4) =="":
newData4 = system.dataset.setValue(table, 4,4, "Red")
system.tag.write("[.]EveryHourShift2",newData4)
if table.getValueAt(5,4) =="":
newData4 = system.dataset.setValue(table, 5,4, "Red")
system.tag.write("[.]EveryHourShift2",newData4)
if table.getValueAt(6,4) =="":
newData4 = system.dataset.setValue(table, 6,4, "Red")
system.tag.write("[.]EveryHourShift2",newData4)
if table.getValueAt(7,4) =="":
newData4 = system.dataset.setValue(table, 7,4, "Red")
system.tag.write("[.]EveryHourShift2",newData4)
if table.getValueAt(8,4) =="":
newData4 = system.dataset.setValue(table, 8,4, "Red")
system.tag.write("[.]EveryHourShift2",newData4)
table2 = system.tag.read("[.]Every2HourShift2").value
if table2.getValueAt(0,2) =="":
twoData1 = system.dataset.setValue(table2, 0,2, "Red")
system.tag.write("[.]Every2HourShift2",twoData1)
if table2.getValueAt(1,2) =="":
twoData1 = system.dataset.setValue(table2, 1,2, "Red")
system.tag.write("[.]Every2HourShift2",twoData1)
elif system.date.getHour24(timeTag) == r:
table = system.tag.read("[.]EveryHourShift2").value
# if table.getValueAt(0,5) ==""and part =="16.9oz, 20.8g, Propel ":
# newData1 = system.dataset.setValue(table, 0,5, "Red")
# system.tag.write("[.]EveryHourShift2",newData1)
if table.getValueAt(0,5)== "":
newData1 = system.dataset.setValue(table, 0,5, "Red")
system.tag.write("[.]EveryHourShift2",newData1)
if table.getValueAt(1,5)== "":
newData2 = system.dataset.setValue(table, 1,5, "Red")
system.tag.write("[.]EveryHourShift2",newData2)
if table.getValueAt(2,5) =="":
newData3 = system.dataset.setValue(table, 2,5, "Red")
system.tag.write("[.]EveryHourShift2",newData3)
if table.getValueAt(3,5) =="":
newData4 = system.dataset.setValue(table, 3,5, "Red")
system.tag.write("[.]EveryHourShift2",newData4)
if table.getValueAt(4,5) =="":
newData4 = system.dataset.setValue(table, 4,5, "Red")
system.tag.write("[.]EveryHourShift2",newData4)
if table.getValueAt(5,5) =="":
newData4 = system.dataset.setValue(table, 5,5, "Red")
system.tag.write("[.]EveryHourShift2",newData4)
if table.getValueAt(6,5) =="":
newData4 = system.dataset.setValue(table, 6,5, "Red")
system.tag.write("[.]EveryHourShift2",newData4)
if table.getValueAt(7,5) =="":
newData4 = system.dataset.setValue(table, 7,5, "Red")
system.tag.write("[.]EveryHourShift2",newData4)
if table.getValueAt(8,5) =="":
newData4 = system.dataset.setValue(table, 8,5, "Red")
system.tag.write("[.]EveryHourShift2",newData4)