.

Average: 0
Rating Count: 0

Development status: New development
Information status: New
Repository: http://svn.code.sf.net/p/tango-ds/code/DeviceClasses/Simulators/PySignalSimulator
Contact:



Class Description


PySignalSimulator Class Description:

This device requires <a href="http://www.tango-controls.org/Documents/tools/fandango/fandango">Fandango module<a> to be available in the PYTHONPATH.

This Python Device Server will allow to declare dynamic attributes which values will depend on a given time-dependent formula:

<h5 id="Example:">Example: <pre class="wiki"> Square=0.5+square(t) #(t = seconds since the device started) NoisySinus=2+1.5*sin(3*t)-0.5*random() SomeNumbers=DevVarLongArray([1000.*i for i in range(1,10)])

Attributes are DevDouble by default, but any Tango type or python expression can be used for declaration. Format is specified at <a class="ext-link" href="http://www.tango-controls.org/Members/srubio/dynamicattributes"><span class="icon">tango-controls.org</span></a>

Signals that can be easily generated with amplitude between 0.0 and 1.0 are:

rampt(t), sin(t), cos(t), exp(t), triangle(t), square(t,duty), random()

The MaxValue/MinValue property for each Attribute will determine the State of the Device only if the property DynamicStates is not defined.

If defined, DynamicStates will use this format:

<pre class="wiki"> FAULT=2*square(0.9,60) ALARM=NoisySinus ON=1

This device inherits from fandango.dynamic.DynamicDS Class

Families: Simulators

Key words:

Platform: All Platforms

Language: Python

License:

Contact:

Class interface


Attributes:

Commands:

Pipes:

Properties:

Name Description
DynamicAttributesStringArrayType Attributes and formulas to create for this device. <br/> This Tango Attributes will be generated dynamically using this syntax: <br/> T3=int(SomeCommand(7007)/10.) <br/> See the class description to know how to make any method available in attributes declaration.
PushEventsDevDouble Set condition for pushing events, N or N>t=periodic; N>diff/rel for change event
DynamicStatesStringArrayType This property will allow to declare new States dinamically based on <br/> dynamic attributes changes. The function Attr will allow to use the <br/> value of attributes in formulas.<br/> <br/> ALARM=Attr(T1)>70<br/> OK=1
SimulationDelayDevDouble Delay, in seconds, to be applied to each read_attribute call
UseScipyDevBoolean Disable numpy or scipy, NOT IMPLEMENTED YET


Please log in to comment.

README

b"\nThis is the simulation suite for PyTango, it allows to create dynamic device servers and replicate existings systems into playable mockups.\n\nIt requires fandango: https://svn.code.sf.net/p/tango-cs/code/share/fandango/trunk/fandango\n\nUsage:\n gen_simulation.py ['list', 'export', 'generate', 'load', 'play', 'push'] file_input/instance [main_method/polling_period]\n\n('list', '[main.py main_method]', 'export device/attribute lists from application into a file')\n('export', '[attributes.txt]', 'export values from an attribute list into a .pck file')\n('generate', '[...]', 'create the property files for simulators')\n('load', '[...]', 'create simulators from files')\n('play', '[...]', 'run the simulators')\n('push', '[...]', 'configure simulators event pushing')\n\n\nCHANGELOG\n\n3.1: Improved simulation script, added 64 bits, better PyTangoArchiving and Scipy support.\n\n3.0: Added gen_simulation script to extract and replay attribute values for complex simulation\n\n2.5: Init() capable, added Scipy and PyTangoArchiving\nLibrary/Modules loading refactored in the code.\n\n\n"

16 Jan 2018, DS Admin
Created:
The device class has been added to catalogue.
Added by:dadmin on:16 Jan 2018, 1:23 p.m.