Elk M1 Counter values

Wickey

New Member
Hi,
 
I have a small application which connects to ELK through telnet and read the messages coming from elk m1. Earlier I used to get message (ex : 0DCV0100123003C" ) where never counter value got update without polling. Sometime back I realized that counter value update message is not coming without polling. (My counter value setting rules are created in ELKRP) Can you  please let me know Elk has stopped automatically broadcasting this value or any other issue?
 
Short of sending a changed counter value to a keypad by rule, I do not think there has ever been an automatic update of counters.  I believe you have always had to poll them.
 
Are you sure your program did not do some polling?  
 
Elk has an updated ASCII Protocol RS-232 Interface Specification here .
 
Yes I'm 100% sure. First time I polled and set the values. After that I did not poll. Whenever counter value increased I got CV message. According to that I updated the values. Recently I noticed  I am not receiving the values till I poll for it.
 
It's tough to know what else could be going on without knowing more about the nature of what you are polling and the range of possible values.
 
Your description of the type of message ("0DCV0100123003C" ) you used to receive is clearly the kind of response the Elk is supposed to return when queried under the ASCII protocol, which is why I wondered if your telnet program was making the query.
 
Were the counter value messages you were receiving based on Elk RP rules?  
 
I ask because the only other thing I can think of (and I've never tried this) would be based on RP rules and would depend on the nature and range of your possible counter values.  If you have a discrete set of returnable counter values, you could have (or could create) a separate text value for each counter value, and have a WHENEVER rule so that whenever the counter changes to that value it sends the corresponding text out the designated serial output port (which I presume your telnet program could then read).  
 
Assuming there is no way to get the spontaneous counter value updates, the way I would do it is turn a phantom output on for 1 sec immediately after any rule that changes the counter value(s) in question. Your external software would see the output XX On/Off messages and respond with a request for the counter value(s) desired. If you need to get immediate results as soon as a counter changes, trigger your external software with the output ON message, however you risk missing a change if the counter values are updated multiple times in succession. On the other hand, if you trigger your polling with the output OFF message then you will get the last counter value after all the updates are complete (each update triggers the 1 sec ON timer, when all updates cease the output will turn OFF 1 sec later).
 
Back
Top