Here is a piece of my script, this tag is a digital input and type Boolean. It is not entering that Fill_Downtime function. I’ve tried it with different tags, even changed the original tag to a memory tag and manually changed it and was able to enter the function properly.
No errors are thrown it just does not seem to recognize a change even though I am watching the tag change in the values screen. What could be happening?
OnChange “AMP_1300CountFill03_Run”,"@Fill_Downtime()"
Function Fill_Downtime()
@LOG(‘Filler Downtime Function’)
Print ‘Filler Downtime’
If (AMP_1300CountFill03_Run@= 0) Then //Line stopped
down_start_time% = GETSYS PRG, “TIMESEC”
//filler_dnts@=TIME$
RETURN
ELSE
down_end_time% = GETSYS PRG, “TIMESEC”
downtime% = down_end_time% - down_start_time%
filler_downtime@ = filler_downtime@+downtime%
ENDIF
ENDFN