Author Topic: Omni Arm States  (Read 1402 times)

kova4

  • Jr. Member
  • **
  • Posts: 16
    • View Profile
Omni Arm States
« on: May 12, 2013, 05:04:45 am »
Can't seem to get Omni Pro II Arm States - when I look in the Automation Devices in the Management Studio that line is blank - its the only one - I can get the state variable, like 0-Unknown, 1-DisArmed etc.. but how can I associate that with a variable ? I could make a named graphic but that's a lot of work? Any fixes for this or ideas to associate the Integer with a text name for display purposes - thanks

iostream212

  • Sr. Member
  • ****
  • Posts: 459
    • View Profile
Re: Omni Arm States
« Reply #1 on: May 12, 2013, 09:49:22 am »
To add that info to a label, for example, add the following code to the "control loaded" and "device property value changed" events:

Code: [Select]
if (elkm1.AreaArmStatuses[1]==0)
{
this.Text = "Disarmed";
}

if (elkm1.AreaArmStatuses[1]==1)
{
this.Text = "Armed Away";
}


Just change the device name to match your setup and also add the extra arm states by repeating the same 'if-then' pattern above. You could also make it more dynamic (cause the above example is hard coded to zone 1) by using a local variable for the touch screen. Then you could do something like:
Code: [Select]
if (elkm1.AreaArmStatuses[intCurrentArea]==0)
...
I always wanted to be somebody. In retrospect, I think I should have been more specific.

kova4

  • Jr. Member
  • **
  • Posts: 16
    • View Profile
Re: Omni Arm States
« Reply #2 on: May 16, 2013, 04:34:43 am »
Thanks - I added it to the button that armed the system and simply changed the text label - big help -