AMX NETLINX PROGRAMMING LANGUAGE Manual page 88

Programming language
Table of Contents

Advertisement

Event Handlers
TIMELINE_CREATE
Time 0
Timeline.Sequence =
FIG. 2
Timeline representation
}
Each
TIMELINE
Return Valuess:
Example:
DEFINE_VARIABLE
LONG TimeArray[100]
DEFINE_CONSTANT
TL1 = 1
TL2 = 2
DEFINE_EVENT
Continued
72
TIMELINE_EVENT[TL1]
Triggered
1000
2000
Time (1mS resolution)
1
2
data member is defined as follows:
The
that the user assigned to the timeline in the TIMELINE_CREATE func-
ID
ID
tion.
The index of the time in the Times array that was passed to the
SEQUENCE
TIMELINE_CREATE function. The SEQUENCE data member is used to deter-
mine what action to take for the event and is normally decoded with a SWITCH/
CASE structure (as shown in the example).
The amount of time that has elapsed since the timeline started. For repeating
TIME
timelines, the TIME and REPETITION data members can be used to calculate
the total amount of time it has been running.
If the timeline is operating in relative mode, this data member is equal to
RELATIVE
TIMELINE_RELATIVE. If the timeline is absolute, it is equal to
TIMELINE_ABSOLUTE.
REPETITION If the timeline was created with TIMELINE_REPEAT, this data member holds
the number of times the timeline has been executed. REPETITION contains
zero for the first pass through the timeline. Thus, the calculation to determine
the total amount of time the timeline has been running is simply:
TIMELINE.TIME * TIMELINE.REPETITION.
0 Successful
1 Timeline ID already in use
2 Specified array is not an array of LONGs
3 Specified length is greater than the length of the passed array
4 Out of memory
3000
4000
5000
3
4
5
NetLinx Programming Language Reference Guide

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Netlinx studio 2

Table of Contents