Hello,
I’m having a difficult time tracking down what causes an intermittent error.
These statements are part of a procedure that is called when the program starts, and each hour thereafter. It checks which server and channel each sensor is connected to and updates the System Components file accordingly.
It runs normally most of the time, but invariably throws an error, at least once per day.
OfflineSensors:
window “System Components”
if error
openfile "System Components" opensheetendif
field Channel formulafill tagparameter(systemComponentsChannelList,ROMId+“=”,1)
if error
abortalldialogs window "Heating System Controller:System Status" call .Initializeendif
global offlineSensors
offlineSensors=“”
arraybuild offlineSensors,¶,“System Components”,?(Type=“temp” and Active=“Y” and Channel=“”,Item,“”) //ShellPolled=“•” and
window “Heating System Controller:System Status”
if error
openfile "Heating System Controller" openform "System Status"endif
if arraystrip(offlineSensors,¶)≠""
sendoneemail adminEmail,adminEmail,"OWServer Alert: Offline Sensors","The following sensors are offline. Check connections."+¶+¶+arraystrip(offlineSensors,¶)endif
showvariables offlineSensors
rtn
In the error logged below, it appears that, despite the statements going to the System Components file before doing the formulafill, Panorama is trying to find the Channel field in the Heating System Controller file. I’ve tried anticipating the error with if error statements with no luck. I added the abortalldialogs because a dialog popped up saying {Window “ “ does not exist.} Everything stops after the abortalldialogs, though I tried to have it continue and run .Initialize again.
Panorama Error: .pumpControl / .pumpControl: Field “Channel” does not exist in database “Heating System Controller”
Error Statement: Field
Error parameter: «_PanoramaCookie»Error stack: .UpdateServerSensorFile Heating System Controller
What am I missing?
Thanks,
Jeff