Timeline Functions; Creating A Timeline - AMX NETLINX PROGRAMMING LANGUAGE Manual

Programming language
Table of Contents

Advertisement

BUTTON_EVENT[dvMyPanels,nMyButtons]
{
PUSH:
{
}
}
This event will be run for all combinations of
GET_LAST()
returns an index value, starting at 1, for the element that triggered the event. In the case of
nButtonIndex
pressed, ... This can be very useful in the case of transmitters and wired panels where the channel
number may not reflect a numerical sequence you would like, such as with Numeric Keypads.

Timeline Functions

The NetLinx timeline functions provide a mechanism for triggering events based upon a sequence of
times. The sequence of times is passed into the timeline functions as an array of
value representing a time period (in milliseconds) that is either relative to the start time of the timeline or
to the previously triggered event.
Timelines introduce the capability to dynamically set up a timed sequence, provide
the user with a mechanism to modify the sequence, and allow the user to create,
delete, and modify sequences.
The old way of programming timed sequences was to cascade or nest
coded the timed sequence; so, the only way to modify the timing was to modify the NetLinx program,
recompile, and download.
Timelines make adding, deleting and editing the sequence much simpler for the programmer. Timeline
functions and debugging allow the timings to be modified without the modify/ compile/ download cycle
because the array of times may be modified via NetLinx debugging. Once the timings have been
tweaked, the changes can be incorporated in the NetLinx program.

Creating a timeline

Timelines are represented by the illustration in (FIG. 2). When the
executed, the timeline starts at zero and begins counting. When the timer value equals a value in the
array, a
TIMES
available to get information about the specific time from the
a relative timeline is created, the NetLinx Master converts the provided relative times into absolute times
that are stored internally.
The
TIMELINE
STRUCTURE TIMELINE
{
INTEGER
INTEGER
LONG
INTEGER
LONG
Continued
NetLinx Programming Language Reference Guide
nPanelIndex = GET_LAST(dvMyPanels)
nButtonIndex = GET_LAST(nMyButtons)
Send_String 0,"'Button Index=',ITOA(nButtonIndex),' was pushed on Panel
Index=',ITOA(nPanelIndex)"
function is very useful when running event using array as parameters.
, it will contain a value of 1 when button 4 was pressed, a value of 2 when button 3 was
is triggered. Within the timeline event, a
TIMELINE_EVENT
structure contains the following members:
ID
SEQUENCE
TIME
RELATIVE
REPETITION
and
dvMyPanel
nMyButtons
WAIT
TIMELINE_CREATE
array that generated the event. When
TIMES
//user supplied ID
//index in Times array
//time since start of timeline
//0=absolute 1=relative
//# of loops for repeating timeline
Event Handlers
, 24 buttons in all. The
GET_LAST()
values, with each
LONG
s. Using nested
s hard-
WAIT
function is
structure is
TIMELINE
71

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Netlinx studio 2

Table of Contents