Create_Level; Create_Multi_Buffer - AMX NETLINX PROGRAMMING LANGUAGE Manual

Programming language
Table of Contents

Advertisement

Reserved Identifiers
Keywords & Run-Time Library Functions (Cont.)

CREATE_LEVEL

CREATE_MULTI_BUFFER

110
This keyword creates an association between a specified level of a device and
a variable that will contain the value of the level. This can only appear in the
DEFINE_START section of the program.
CREATE_LEVEL DEV, Level, Value
Parameters:
• DEV: The device from which to read the level.
• Level: The level of the device to read.
• Value: Variable in which to store the level value.
• DevLev: A DEVLEV structure.
• Value: Variable in which to store the level value CREATE_LEVEL DevLev,
Value.
During execution of the program, NetLinx continuously updates the variable to
match the level it represents.
This keyword is the same as CREATE_BUFFER except that it accepts strings
from a range of devices. Two forms of this command are supported:
The first form of the command is provided for backward-compatibility; it accepts
two device numbers as the range of devices.
CREATE_MULTI_BUFFER FirstDevice, LastDevice, Buffer
Parameters:
• FirstDevice: First number in the range of devices.
• LastDevice: Last number in the range of devices.
• Buffer: Text buffer to receive the strings.
Each command string placed in the multi-buffer has a three-byte header associ-
ated with it:
• The first header byte, $FF, marks the start of a new command string.
• The second header byte is either the number of the device or the index of the
DEV[ ] member that received the command string.
• The third header byte is the length of the string.
$FF, device number or DEV[ ] index, length, <string>
The second form of the command takes a device array rather than the device
number pair.
CREATE_MULTI_BUFFER DeviceSet, Buffer
Parameters:
• DeviceSet: Set of devices for which the buffer will accept strings.
• Buffer: Text buffer to receive the strings.
Each command string placed in the multi-buffer has a three-byte header associ-
ated with it.
• The first header byte, $FF, marks the start of a new command string
• The second header byte is the index into the DeviceSet of the device that
received the string.
The third header byte is the length of the string.
$FF, device number or DEV[ ] index, length, <string>
This command is not recommended for use in NetLinx due to its limitations.
The main limitations to note are:
• For the first form of the command, using FirstDevice and LastDevice,
only devices using the same port and system will be allowed. The device in
between the First Device and Last Device will be the sequential device
numbers using the same port and system (i.e. 1:1:0, 2:1:0, 3:1:0, etc...)
• For the second form of the command, using DeviceSet, only 255 devices
will be allowed in the array. This is required since only one byte is used to
represent the DeviceSet index in the return string so it has an upper limit of
255.
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