If channels are specified, the count values are returned in the order in which the channels are
specified. If slots are specified, the response lists the channels starting from lowest to highest.
Because each slot is processed completely before going to the next, all slot 1 channels and analog
backplane relays are listed before slot 2 channels.
Relay closures are counted only when a relay cycles from open to closed state.
It is good practice to get the relay count at the end of a program. This saves the latest count to
memory.
An error is generated if:
• A specified channel is invalid
• The channel does not have a count closure associated with it
Example 1
Get the close counts for all channels and
analog backplane relays on slot 2 assuming
a 3721 card is installed in the slot.
Sample output that shows the counts for
channels 1 to 41, analog backplane relays
911 to 917, analog backplane relays 921 to
928:
672,495,547,479,518,459,522,599,4
52,451,464,427,426,428,426,425
,428,424,424,425,5,3,3,3,4,3,3
,5,3,33,33,33,33,33,33,32,32,3
2,32,32,119,3,56,0,0,0,0,0,0,1
4,68,0,0,0,0,16,0
channel.pattern.setimage("2003, 2005, 2023, 2915", "Path")
PathList = channel.pattern.getimage("Path")
print(PathList)
print(channel.getcount(PathList))
print(channel.getcount("Path"))