Panic-The Alba Alarm System

Well … I tried that method with an Alarm attribute and I got "RED" for few seconds; until the value is updated and then the color went back to light-green. Maybe is a bug in my current sources, but the bug disappears if I use TaurusBoolLed instead of the default led class.
Keep on dancing,

http://www.tango-controls.org/resources/howto/how-fandango/
We are using this method on Windows 7 since Taurus 3.30 I think, we had no problem so far.
Hi Sergi

I used Taurus LED. Its Working fine
Thanks for the solution.

Thanks and Regards
TCS-GMRT Team
Regards,
TCS_GMRT
New releases of PyAlarm 5.3 and PANIC 5.4 have been uploaded to sourceforge. They contain all the bugfixes that were previously available only in the .tgz attached to this post.

As highlights: many bugs have been solved in the Acknowledge/Disable/Delete/Preview actions of the GUI, in addition the new API.evaluate() method allows the GUI to test new formulas on the PyAlarm device before saving.

They are meant to work together, so you must update both and also Fandango.

For detailed log of changes see:

https://svn.code.sf.net/p/tango-ds/code/Clients/python/Panic/trunk/README.txt
https://svn.code.sf.net/p/tango-ds/code/DeviceClasses/SoftwareSystem/PyAlarm/trunk/README
https://svn.code.sf.net/p/tango-cs/code/share/fandango/trunk/fandango/CHANGES
Keep on dancing,

http://www.tango-controls.org/resources/howto/how-fandango/
Edited 8 years ago
Hi Sergi

Thanks for the info. I will check and update the same.

Thanks and Regards
TCS-GMRT TEAM
Regards,
TCS_GMRT
Hi, I am trying to use the panic API for a Tango server but keep running into issues.

I have a tango server with the address - 'C3/aouda/1' and I want to add an alarm for this. I then added a PyAlarm device called 'test/alarms/1' in the following manner


from fandango.tango import add_new_device,put_device_property
add_new_device('PyAlarm/1','PyAlarm','test/alarms/1')

After this I used panic to connect these and add an alarm:


import panic
alarms = panic.api()
alarms.add('TEST_ALARM',formula='(C3/aouda/1/air_flow > 40)',device='test/alarms/1',description='test',receivers='my@mail')

Now when I try to check the severity of the 'TEST_ALARM' I am always getting it as warning(even when the attribute values are not crossing 40). When I try to check if alarm is active or not I am getting the following results:


In [53]: import panic

In [54]: alarms = panic.api()

In [55]: test_alarm = alarms['TEST_ALARM']

In [56]: test_alarm.active
Out[56]: 0

In [57]: alarms.get_states()
Out[57]: {'TEST_ALARM': False}

For some reason it seems like the alarm is not functioning. Both the device servers are running (Both 'test/alarms/1' and 'C3/aouda/1'). Please help.
Hi Sergi

My device name is : l/m/n
Attributes are : Speed1, Speed2, Speed3 ………,Speed99

While defining rule, I am defining as

l/m/n/Speed1.quality==ATTR_ALARM or l/m/n/Speed2.quality == ATTR_ALARM or l/m/n/Speed3.quality=ATTR_ALARM


I have to define the above rule for 99 parameters.
I have to manually write these values to define rule.

1.)Is there any way to write the rule by reading attribute name and device name from custom database ? It means that in defining above rule, I don't have to manually write rule for all parameters. It will read the device and attribute name from database and write the rule accordingly.
2.)The rule must also be configurable, Suppose if Speed1 becomes Speed111, then rule will also be l/m/n/Speed111.quality==ATTR
_ALARM


Thanks and Regards
TCS-GMRT Team
Regards,
TCS_GMRT
Hi all,

I have a problem with an alarm formula that does not work as I would like it to. The formula is
elin/master/op != ON
which evaluates to True even when the linac is ON. Any ideas why this is so? Here is the output from the report:

TAG: LINAC
	Alarm ACTIVE since Wed Sep  9 06:53:52 2015
	AlarmDevice: test/alarms/1
	Description: linac not on
	Severity: WARNING
	Formula: elin/master/op != ON

Values are: 
	elin/master/op:	DeviceAttribute[
data_format = PyTango._PyTango.AttrDataFormat.SCALAR
      dim_x = 1
      dim_y = 0
 has_failed = False
   is_empty = False
       name = 'State'
    nb_read = 1
 nb_written = 0
    quality = PyTango._PyTango.AttrQuality.ATTR_VALID
r_dimension = AttributeDimension(dim_x = 1, dim_y = 0)
       time = TimeVal(tv_nsec = 0, tv_sec = 1441774432, tv_usec = 473489)
       type = PyTango._PyTango.CmdArgType.DevState
      value = PyTango._PyTango.DevState.ON
    w_dim_x = 0
    w_dim_y = 0
w_dimension = AttributeDimension(dim_x = 0, dim_y = 0)
    w_value = None]
Hello All

I have one query regarding defining of rule using max function:
I am not getting the syntax for it.

I have three devices: 1. a/a/a
2. b/b/b
3. c/c/c

I have Speed attribute in all the devices

I have to define rule in which I have to write as:

max(a/a/a/Speed or b/b/b/Speed or c/c/c/Speed)==10


Following error come while defining rule:
TypeError: 'tangoed_float' object is not iterable

Could you please tell the correct syntax for above requirement ?

Thanks and Regards
TCS-GMRT Team
Regards,
TCS_GMRT
Hi Balkrishna,

You must pass the arguments to max() as a list or tuple:

max([a/a/a/Speed,b/b/b/Speed,c/c/c/Speed]) == 1

Sergi
Keep on dancing,

http://www.tango-controls.org/resources/howto/how-fandango/
 
Register or login to create to post a reply.