Suggestions for the ElkRP rule 'language'

The ocelot converts the voltage value (max of 5V) to a number between 1-256, which makes triggering a little easier. I use light sensors as well, and being able to trigger rules based on the status of my sensors is another thing on my list as well.
 
elcano said:
Guy, you are thr ladder loggic expert. What have you seen in other PLCs?
Most PLCs I have seen are exactly like the Ocelot. Some scripting languages like the JDS controllers and the Elk (from the little I know about it so far) attempt to make things easier for you by giving you the chance to specify time intervals before repeating certain tests, etc. but internally, it just adds a phantom "IF Time..." ANDed with the rest of your logic to retrigger the test. Unless you have an interrupt line for absolutely everything that can trigger an action, the only way to look for events is to loop continuously and look for conditions to be met. To really get the most out of such a controller, you need to know the internal sequencing of operations in the logic engine. In the case of the Ocelot (I mention it often because it is the one I know the best) this is all known. For example, timers are all aligned with the real time clock, so all running timers increment by one whenever the clock rolls over to the next second. Also, the timers are always incremented between program passes, so the lower line numbered instructions always see a new value first. The operation of the "becomes" statements is also well defined, and any single events such as received X10, SECU16 input changes, etc are queued by type and become true one at a time, always between passes, etc. This is what we need to know about the Elk to really get the most out of it too.
 
another feature I would like to see:

Display part of the email message when selecting what email to send in ElkRP (both in the selection box, and the rule view).
 
electron said:
another feature I would like to see:

Display part of the email message when selecting what email to send in ElkRP (both in the selection box, and the rule view).
I would rather be able to pick which emaill address or addresses to send it to and then pick wich message to send.
 
I would like that as well, but I think it will require some major code changes, both in the M1 and XEP. The changes I requested are just cosmetic (trying to give them a break :lol:).
 
elcano said:
I think that the problem can be fixed by adding a new functionality to the analog zones definition screen. We need to be able to define test values for an analog input. Just like a typical burglar alarm have 3 test values bands (Open circuit, EOL and short circuit).

Per instace, when defining my the zone for my light sensor I would like to define these test bands:

MIN - 0.5 VOLTS -> A (Sunny)
0.5 - 5 VOLTS -> B (Cloudy)
5 - MAX -> C (Dark)

Then the rule would be much simpler:

WHENEVER Light Level (Zn 14) BECOMES A (Sunny)
THEN ANNOUCE Light Level (Zn 14)
THEN DISPLAY "Sunny^M" IN Area 1 (Area 1) FOR 60 SECONDS, [*] Clears

The flag is not needed, because the rule uses BECOMES, so it will be triggered only once.
It is very interesting on how the Netiom-xAP solves the same problem. They say:

You can set the hysteresis and “on state” levels for the analogue inputs and counters (driven by the change of state of the digital inputs) to ensure that xAP messages are not issued too frequently (see the screenshot below).
Netiom analog zone definition

It is very similar to my proposal (defining your ON/OFF values), but better yet, they define an update period so that borderline changes are not reported too frequently. Actually, I think that this second part of the solution is just enough.



Even that they also introduce a time element, the trigger is the analog value and the timer is used as a debounce. Assuming that my Update Hysteresis (as Netiom calls it) for Zone 14 is 60 seconds this rule would work perfectly:

WHENEVER Light Level (Zn 14) BECOMES LESS THAN ANALOG VALUE 0.5 VOLTS
THEN ANNOUCE Light Level (Zn 14)

Any other reasonable Update Hysteresis would work.

In summary:
1. Add Update Hysteresis to Analog Zones.
2. Create new set of BECOMES EQUAL, BECOMES GREATER and BECOMES LESS for triggering rules in analog zone.

We love our M1s, but I have seen a log of people complaining about Elk's implementation of analog zone rules. This does not seem too complex and would please all them. :lol:
 
It takes a Rule like the ones below to do a hysteris on an analog zone input. The OneShot Counter value is to keep the Rule from retriggering. Remember to set the zone definition to Analog.




9 WHENEVER EVERY 10 SECONDS
AND Zone 014 (Zn 14) IS LESS THAN ANALOG VALUE 0.5 Volts
AND OneShot (Counter 1) IS EQUAL TO 0
THEN ANNOUNCE Say Time (vm238)
THEN SET OneShot (Counter 1) TO 1

10 WHENEVER EVERY 10 SECONDS
AND Zone 014 (Zn 14) IS GREATER THAN ANALOG VALUE 3.5 Volts
THEN SET OneShot (Counter 1) TO 0
 
Back
Top