Configuration > Rules Configuration

Configuring Rules for Elk Zone Change

(1/1)

MavRic:
I have a rain meter that closes and then opens again the contact on an Elk zone whever 0.01" of rain has fallen.

I want to record this and set up a rule for 'Zone Logical Status Changed' for the Elk driver.

On the rules tab is says the Event arguments are 'Index', newValue' and 'previousvalue'.

However on the 'whenever' page only the 'index' argument shows up.

Since when the contact is closed it goes open to close to open i only want to record 1 of the transitions and not the transition back to open but since the new and previous values are not available as arguments i cannot do this and am recording 2events events rather than 1.

Any suggestions? Is this is bug in the Elk driver?

John Hughes:
Since that event doesn't expose the value as an option you can use the Action List editor to add a condition when uses the event args, or you can add a script which would look something like:


--- Code: ---if (eventargs.newvalue = 255)
{
    //... do something here
}

--- End code ---

MavRic:
Thanks for the suggested workaround.

Since the description says it has these arguments...is this just a small bug in the driver that can get fixed?

John Hughes:
This is not a bug, event arguments are different than whenever filters criteria.

Event arguments are data provided to the rule's script via a variable named EventArgs.

MavRic:
Thanks for the clarification.  I seriously need to read up a bit on the scripting language so i can start doing some of the fancier stuff.

Navigation

[0] Message Index

Go to full version