Configuring Application-Defined Devices - AMX NI-2000 Programming Manual

Ni series netlinx integrated controllers webconsole & programming guide
Hide thumbs Also See for NI-2000:
Table of Contents

Advertisement

Configuring Application-Defined Devices

Elements such as
NetLinx.axi file.
The NetLinx.axi file contains both the new API definitions, as well as the pre-defined constants that are
used as some of the API arguments (ex:
Physical device names are typically prefixed with "dv" and Virtual device names are
typically prefixed with "vdv".
Example Code:
PROGRAM_NAME='DDD'
DEFINE_DEVICE
COM1 = 5001:1:0
COM2 = 5001:2:0
dvRECEIVER1 = 41000:1:0
dvDiscDevice = 41001:1:0
DEFINE_CONSTANT
DEFINE_TYPE
DEFINE_VARIABLE
DEFINE_START
STATIC_PORT_BINDING(dvDiscDevice, COM1, DUET_DEV_TYPE_DISC_DEVICE,
'My DVD', DUET_DEV_POLLED)
DYNAMIC_POLLED_PORT(COM2)
DYNAMIC_APPLICATION_DEVICE(dvRECEIVER1, DUET_DEV_TYPE_RECEIVER,
'My Receiver')
(***********************************************************)
(*
(***********************************************************)
DEFINE_EVENT
DATA_EVENT [dvRECEIVER1]
{
// Duet Virtual device data events go here
}
Sample code can be found within the DEFINE_START section, as shown in FIG. 49:
NI Series WebConsole & Programming Guide
DUET_DEV_TYPE_DISC_DEVICE
DUET_DEV_TYPE_DISC_DEVICE
THE EVENTS GO BELOW
WebConsole - System Options
and
are defined within the
DUET_DEV_POLLED
).
*)
71

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents