NetLinx Programming
74
NetLinx Integrated Controllers (Firmware v4)- WebConsole & Programming Guide
NetLinx Programming
Overview
This section describes the Send_Commands, Send_Strings, and Channel commands you can use to program the Master. The
examples in this section require a declaration in the DEFINE_DEVICE section of your program to work correctly. Refer to the
NetLinx
Programming Language
instruction manual for specifics about declarations and DEFINE_DEVICE information.
NOTE:
NetLinx programming information for each Master is provided in the Master’s Operation/Reference Guide (available at
www.amx.com).
Port Assignments by NetLinx Master
Master SEND_COMMANDs
These commands are specific to the Master and not the Controller. These commands are sent to the DPS 0:1:0 (the Master you are
connected to). A device (<DEV>) must first be defined in the NetLinx programming language with values for the Device: Port:
System (<D:P:S>).
Port Assignments By Master
Master
RS-232/422/485
IR/Serial
IR/RX
Relays
I/O
NI-700
Ports 1 - 2
Port 3
Port 5
Port 4
NI-900
Port 1
Ports 2-4
Port 6
Port 5
NI-2100
Ports 1 - 3
Ports 5-8
Port 4
Port 9
NI-3100
Ports 1 - 7
Ports 9-16
Port 8
Port 17
NI-4100
Ports 1 - 7
Ports 9-16
Port 8
Port 17
NI-3101-SIG
Ports 1 - 6
Ports 9-16
Port 8
Port 17
DVX-21xxHD
Ports 1 - 3
Ports 5-8
Port 4
Port 9
DVX-315xHD
Ports 1 - 6
Ports 9-16
Port 8
Port 17
Master SEND_COMMANDs
Command
Description
CLOCK
Set the date and time on the Master. The date and time settings are propagated over the local bus.
Syntax:
SEND_COMMAND <DEV>,"'CLOCK <mm-dd-yyyy> <hh:mm:ss>'"
Variables:
• mm-dd-yyyy = Month, day, and year. Month and day have 2 significant digits. Year has 4 significant digits.
• hh-mm-ss = Hour, minute, and seconds. Each using only 2 significant digits.
Example:
SEND_COMMAND 0,"'CLOCK 04-12-2005 09:45:31'"
Sets the Master's date to April 12, 2005 with a time of 9:45 am.
G4WC
Add G4 Web Control devices to Web control list displayed by the Web server in a browser. The internal G4WC
Send command (to Master 0:1:0) has been revised to add G4 Web Control devices to Web control list displayed
in the browser.
Syntax:
SEND_COMMAND <D:P:S>,"'G4WC "Name/Description",IP Address/URL,IP Port,Enabled'"
Variables:
• Name/Description = A string, enclosed in double quotes, that is the description of the G4 Web Control
instance. It is displayed in the browser.
• IP Address/URL = A string containing the IP Address of the G4 Web Control server, or a URL to the G4 Web
Control server.
• IP Port = A string containing the IP Port of the G4 Web Control Server.
• Enabled = 1 or 0. If it is a 1 then the link is displayed. If it is a 0 then the link is disabled.
The combination of Name/Description, IP Address/URL, and IP Port are used to determine each unique
listing.
Example:
SEND_COMMAND 0:1:0,"'G4WC "Bedroom",192.168.1.2,5900,1'"
Adds the BEDROOM control device using the IP Address of 192.168.1.2.
~IGNOREEXTERNAL
CLOCKCOMMANDS
Set the Master so that it cannot have it’s time set by another device which generates a ‘CLOCK’ command.
Syntax:
SEND_COMMAND <D:P:S>,"'~IGNOREEXTERNALCLOCKCOMMANDS'"
Example:
SEND_COMMAND 0:1:0,"'~IGNOREEXTERNALCLOCKCOMMANDS'"