![background image](http://html.mh-extra.com/html/amx/dvx-21xxhd/dvx-21xxhd_webconsole-and-programming-manual_2937827075.webp)
NetLinx Programming
75
NetLinx Integrated Controllers (Firmware v4)- 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.
LED Disable/Enable SEND_COMMANDs
NOTE:
The following sections only apply to the integrated controller component of the NIs.
The following commands enable or disable the LEDs on the Integrated Controller. In the examples: <DEV> = Port 1 of the device.
Sending to port 1 of the NI-700 affects all ports.
RS232/422/485 Ports Channels
RS232/422/485 ports are Ports 1-2 (NI-700) and Port 1 (NI-900).
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.
LED SEND_COMMANDs
Command Description
LED-DIS
Disable all LEDs (on 32 LED hardware) for a port. Regardless of whether or not the port is active, the LED will not be lit.
Issue this command to port 1 to disable all the LEDs on the Controller. When activity occurs on a port(s) or Controller, the
LEDs will not illuminate.
Syntax:
SEND_COMMAND <DEV>,"'LED-DIS'"
Example:
SEND_COMMAND Port_1,"'LED-DIS'"
Disables all the LEDs on Port 1 of the Controller.
LED-EN
Enable the LED (on 32 LED hardware) for a port. When the port is active, the LED is lit. When the port is not active, the LED is
not lit. Issue the command to port 1 to enable the LEDs on the Controller (default setting). When activity occurs on a port(s)
or Controller, the LEDs illuminate.
Syntax:
SEND_COMMAND <DEV>,'LED-EN'
Example:
SEND_COMMAND System_1,'LED-EN'
Enables the System_1 Controller's LEDs.
RS232/422/485 Ports Channels
255
- CTS push channel
Reflects the state of the CTS input if a 'CTSPSH' command was sent to the port.