Basic commands & functions – Xylem System 5000 BASIC Manual User Manual
Page 44

42
Sets the requested database value to the given number or string. Available parameters are SITEID
and SCANRATE with a mentioned Task and number value (measured in seconds).
SETDB SITEID, “Site101”
task$ = “myTask”
SETDB SCANRATE task$, 60 REM Sets the Scan Rate for myTask to 1 min.
SETDB
BASIC COMMANDS & FUNCTIONS
Sets network settings to the given number or string. Available parameters are IP, NETMASK,
GATEWAY, and DNS. IP and DNS also require either an AUTO or MANUAL parameter. IP AUTO will
automatically set the Netmask and Gateway as well as DNS settings. Note that to use a Manual DNS
entry, the IP settings must also be set to Manual. If multiple DNS MANUAL entries are specified, the
most recent two will be saved with the latter set as the Preferred DNS.
SETNETWORK IP AUTO
SETNETWORK IP MANUAL, “192.168.0.82”
SETNETWORK NETMASK, “255.255.255.0”
SETNETWORK GATEWAY, “192.168.0.246”
SETNETWORK DNS AUTO
SETNETWORK DNS MANUAL, “192.168.0.6”
REM set as Alternate DNS
SETNETWORK DNS MANUAL, “192.168.0.5”
REM set as Preferred DNS
SETNETWORK
Sets the serial port settings for unopened communication ports. Serial ports are opened with the
following defaults: baud rate = 9600, data bits = 8, parity = none, stop bits = 1, flow control = none,
transmit char delay = 0, transmit line delay = 0. If other port settings are desired, they must be
specified prior to opening the port. Parity can be set to None, Even, or Odd. Flow Control can be
set to None, Software, Hardware, or Both. Port settings only need to be set once and will affect all
future port openings.
SETPORT 300, 8, none, 1, none, 50, 0
REM port settings
OPEN “COM 1” AS #5
REM open the COM at 300 baud w/50ms tx char delay
CLOSE #5
SETPORT
Sets the power to the given piece of hardware. Available parameters are ACTIVELED (Active LED),
ETHERNET (10/100 BaseT), SW12V (Switched +12V), and the 5VREF (+5V Reference) that can be
turned On or Off by specifying any number greater than zero to turn it On or any number less than
or equal to zero to turn it Off. An optional SLOTX may be specified for option cards (if not, the
daughterboard is presumed), followed by the requested value.
SETPOWER ACTIVELED, 1 REM Sets the Active LED to On
SETPOWER ETHERNET, 0 REM Sets the Ethernet port to Off
SETPOWER SW12V, 1 REM Sets the Switched +12V to On
SETPOWER 5VREF SLOT1, 1 REM Sets the +5V Ref (Slot 1) to On
SETPOWER