Art,
You probably need to add the following sort of statements to your startup up CF to enable the high speed counters #1 and #2:
' InitHSC - Initialize High Speed Counters that are used by the turbine flow sensors
'
' The first argument is the high speed counter number 1..3
'
' The second argument is the custom function to be called when the counter reaches the
' value specified by the third argument. This custom function is responsible for
' keeping the running total of gallons and for resetting the high speed counter back to 0
' to start counting the next gallon.
'
' The third argument is the number of pulses per gallon
' &H7ffffff is a really large positive integer that effectively disables the interrupt from ever
' being called. The interrupt mechanism is buggy in F91.2 (Fx series PLCs).
' I am periodically polling the high speed counters and directly managing their count values
' without using the interrupt CFs mechanism as a work-around for the F91.2 issues.
'
HSCDEF 1, TotalizeProdFlw, &h7fffffff
HSCDEF 2, TotalizeBrineFlw, &h7fffffff
' Reload counter values from EEPROM
'
HSCPV[1] = Load_EEP32(HSC1EEPAddr)
HSCPV[2] = Load_EEP32(HSC2EEPAddr)
You will need to add a CF to save the count values of your high speed counters to non-volatile memory. You have to decide when to save the count values. You can set up a CF that saves the values periodically or based on the power fail interrupt. The CF to save the values would look something like this:
Save_EEP32 HSCPV[1], HSC1EEPAddr
Save_EEP32 HSCPV[2], HSC1EEPAddr
Gary D*ckinson