Total_Off; True; Type_Cast; Uncombine_Channels - AMX NETLINX PROGRAMMING LANGUAGE Manual

Programming language
Table of Contents

Advertisement

Keywords & Run-Time Library Functions (Cont.)
TO

TOTAL_OFF

TRUE

TYPE_CAST

UNCOMBINE_CHANNELS

UNCOMBINE_DEVICES

NetLinx Programming Language Reference Guide
This keyword activates a channel or variable for as long as the corresponding
channel of its PUSH statement is activated. When the channel referenced by
the PUSH statement changes from off to on, the TO command starts activating
the associated channel or variable. When the channel is released, the TO com-
mand stops activating of the channel or variable. Therefore, a TO statement
must be found underneath a PUSH statement only. The syntax is shown below:
TO [DEVICE,CHANNEL]TO [(DEVCHAN[ ])]TO [Variable]
Several conditions apply to the use of the TO command:
• It must be used only below a PUSH statement.
• It cannot be used as part of a set of WAIT statements.
• It cannot be placed in the DEFINE_START section.
The channel or variable will act under the rules set by DEFINE_LATCHING,
DEFINE_MUTUALLY_EXCLUSIVE, and DEFINE_TOGGLING.
This keyword turns a channel or variable off. Unlike OFF, TOTAL_OFF turns off
the status of a channel or variable that is in a mutually exclusive set.
This keyword is a CHAR constant contains the value 1.
While NetLinx does not support a BOOLEAN data type, an non-zero value is
consider true for conditional expressions.
This routine eliminates compiler type cast warnings by casting the passed
intrinsic variable type to the type assigned by the return value.
IntrinsicVariableNewType TYPE_CAST
(IntrinsicVariableType)
It is possible to eliminate the compiler warnings related to type casting. The
TYPE_CAST library function converts any non-array intrinsic type to any other
non-array intrinsic type. The type conversion still happens and follows the stan-
dard Type Conversion Rules, but any warnings related to the type cast are
eliminated. Type casting causes potential loss of data when a variable or con-
stant is assigned to a variable of smaller type.
This keyword reverses the effect of COMBINE_CHANNELS. All combines related
to the specified virtual device-channel are disabled.
SLONG UNCOMBINE_CHANNELS VDC
Parameters:
• VDC: The virtual device-channel passed to COMBINE_CHANNELS.
This keyword reverses the effect of COMBINE_DEVICES. All combines related
to the specified virtual device are disabled.
SLONG UNCOMBINE_DEVICES VD
Parameters:
• VD: The virtual device passed to COMBINE_DEVICES.
Result:
• 0: Operation was successful.
• -1: Invalid virtual device.
Result = COMBINE_DEVICES VD, DEVSetResult =
UNCOMBINE_DEVICES VD
Reserved Identifiers
157

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Netlinx studio 2

Table of Contents