[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference varese::basestar_open

Title:BASEstar Open Multiplatform Application Framework
Notice:Kit pointers: see topic 3
Moderator:VARESE::CORBETTA
Created:Tue Oct 02 1990
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:607
Total number of notes:1971

577.0. "data_point temp value" by UTROP1::KAMPHUIS_D () Wed Mar 12 1997 22:02

    My customer would appreciate a functionality like:
    
    "x seconds after the 'put_value' , the data_point automatically
    gets his default value"
    (WITHOUT APPLICATION INTERFERENCE)
    
    ... something like lifetime , but now the status is not
    invalid but the value is back to default .... ??
    
    Or maybe something like this can be realized in a different
    way, using TIMER objects and/or expressions ?
    
    suggestions are welcome.
     
    Dick Kamphuis @uto
    
T.RTitleUserPersonal
Name
DateLines
577.1small program neededIMPERO::SERRAVolumeappalla!Thu Mar 13 1997 08:5515
    
    >> Or maybe something like this can be realized in a different
    >> way, using TIMER objects and/or expressions ?
    
    	Ehm ... no, I'm afraid.
    
    	The least I can think of is a small application which receives 
    	events triggered by the EXPIRED status bit and then issues
    	a put_value on the expired data_point, using its default_value.
    
    	I know nobody wants to write applications nowadays, but ...
    
    
    - Beppe -
    
577.2Tip about possible uses of TIMERSVARESE::ZOCCOLADeprimitElatosLevatAlexandriaStratosThu Mar 13 1997 10:4450
Dick,

starting with V3.1, a new object is available: the TIMER object.

This is a "live" object, that's to say it is possible to configure it to expire
once (with an absolute expiration date) or periodically (configuring the 
period).

How can a user interact with the TIMER ? Via the well-known TRIGGER mechanism.

You are able to create a TRIGGER that, besides the usual evaluations ON_WRITE,
ON_VALUE_CHANGE, ON_STATUS_CHANGE, allows also ON_TIMEOUT.

In version 3.1 of B*, this is the only way the TIMER is exported to the user.

Going back to the base note, besides the way Beppe explained in his reply, you
can also write a small application that arms a TIMER, associate it to a TRIGGER
and when the application receives the event, writes the default value to the
Data Point.

Another use of the TIMER I can suggest is related to the other question you
asked me by phone ("Can I have a "live" Data Point, that's to say a Data Point
that autonomously changes its value as time elapses, for example following
a sinusoidal behavior ?").

Suppose you create a Data Point "a" and attach to it an expression that uses
another Data Point "b" as operand:

	create data_point a -expression "sin(b)"

What remains to do is having Data Point "b" change its value as time elapses,
behaving as a "counter".

Using a periodic TIMER and a  TRIGGER "ON_TIMEOUT",you can write a very small B* 
application that receives the event that carries with it the "b" Data Point, 
increments "b" and puts it back with a put_value.

This put_value on Data Point "b" causes the evaluation of the expression
associated to Data Point "a".

As a consequence, Data Point "a" has its value changing as a sinusoid as
time elapses.





			< Aldo >

577.3thanksUTROP1::KAMPHUIS_DFri Mar 14 1997 17:288
    Beppe, Aldo,
    
    Thanks.
    
    CONCLUSION: YOU WILL ALWAYS NEED AN APPLICATION, ALSO WHEN USING THE
    TIMER OBJECT
    
    Dick 
577.4For next release ?VARESE::ZOCCOLADeprimitElatosLevatAlexandriaStratosMon Mar 17 1997 10:1579
Dick,

>>    CONCLUSION: YOU WILL ALWAYS NEED AN APPLICATION, ALSO WHEN USING THE
>>    TIMER OBJECT

Yes, using version 3.1 it's the only way.

But I support your requested feature (that I call "Live Data Points") to be
implemented in the next product version.

At the bottom of this note you can find an attachment coming from our internal 
discussion forum regarding the features to be implemented in the next releases, 
containing the proposal I have made.

Of course, to raise the probability that this feature will be implemented,
we need a strong *CUSTOMER* sponsorship: for this reason, I would ask you
to contact our Product Manager, Claudio Muggia (VARESE::MUGGIA).



		< Aldo >


________________________________________________________________________________



          <<< VARESE::$1$DKB100:[NOTES$LIBRARY]BSTROPEN_PROJ.NOTE;1 >>>
                        -< BASEstar Open Project forum >-
================================================================================
Note 20.1                 "Live" Data Points (Counter)                    1 of 1
VARESE::ZOCCOLA "DeprimitElatosLevatAlexandriaStratos"  42 lines  13-MAR-1997
15:45
                             -< "COUNTER" object >-
--------------------------------------------------------------------------------

What I suggest is a generalization of the request coming from Dick.

To have something like:

	result = f (time)

I would separate the problem in two:

a) How to have the ordinate change when the abscissa changes
b) How to have the abscissa change over time


The problem a) is already solved by the Expressions, so we can focus on problem
b).

The problem b) is to have a Data Point (Integer, Unsigned or a Floating Point)
change autonomously over time; if we could create a sort of "association"
between a Data Point object and a Timer object, giving "attributes" to the
association, we could implement a "Counter", something that when properly
configured can change its value over time.

Some of the attributes of the association could be:

1) "DIRECTION" (with values UP or DOWN)
	To implement an Up or Down counter

2) "STEP" (integer or float depending from the datatype of the Data Point)
	To specify the variation when a Timer tick arrives

3) "CUTOFF" ( a value in the allowed range of the datatype of the Data Point )
	To specify when (at what value) the Data Point  must reset to its 
	Default value


This way you can attach whatever function you like (via Expressions) to the
Counter and have, for example, another Data Point change its value as a
sinusoid [ result = sin (counter) ]



		< Aldo >