Specifications
NetLinx Programming
73
NX-Series Controllers - WebConsole & Programming Guide
Master IP Local Port 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). A device must first be defined in the NetLinx programming language with values for the Device: Port: System.
In these programming examples, <DEV> = Device. The term <D:P:S> = Device:Port:System.
Master SEND_COMMANDs (Cont.)
Command Description
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'"
Master IP Local Port SEND_COMMANDs
Command Description
UDPSENDTO Set the IP and port number of the UDP local ports destination for sending future packets. This is only
available for Type 2 and Type 3 Local Ports. Type 2 and Type 3 are referring to the protocol type that is
part of the IP_CLIENT_OPEN call (4th parameter).
Type 1 is TCP.
Type 2 is UDP (standard)
Type 3 is UDP (2 way)
The NetLinx.axi defines constants for the protocol types:
CHAR IP_TCP = 1
CHAR IP_UDP = 2
CHAR IP_UDP_2WAY = 3
Syntax:
SEND_COMMAND <D:P:S>,"'UDPSENDTO-<IP or URL>:<UDP Port Number>'"
Variables:
• IP or URL = A string containing the IP Address or URL of the desired destination.
• UDP Port Number = A String containing the UDP port number of the desired destination.
Example 1:
SEND_COMMAND 0:3:0,"'UDPSENDTO-192.168.0.1:10000'"
Any subsequent SEND_STRING to 0:3:0 are sent to the IP Address 192.168.0.1 port 10000.
Example 2:
SEND_COMMAND 0:3:0,"'UDPSENDTO-myUrl.com:15000'"
Any subsequent SEND_STRING to 0:3:0 are sent to the URL myURL.com port 15000.