Xylem STORM 3 Basic Programming manual User Manual
Page 35

33
Commands and Functions
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. Transmit delays are specified in milliseconds. 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 a digital port high (5V) or low (0V).A 0 set the port low, a value greater than zero will set
it high.See GetValue to retrieve digital port’s status.
SETVALUE DIGITAL1, 1
REM sets digital port 1 high
SETVALUE DIGITAL2, 0
REM sets digital port 2 low
DIGITALX
Used in conjunction with an identifier to change settings on the Storm. Available identifiers are
listed below.
SETVALUE
Turns the +12Vswd referenceon or off.A 0 will turn it off, a value greater than zero will turn it on. See
GetValue to retrieve +12Vswd voltage.
SETVALUE 12VSWD, 1
REM sets v12$ to the voltage of +12Vswd
12VSWD
Turns the +5V referenceon or off. A 0 will turn it off, a value greater than zero will turn it on.
See GetValue to retrieve +5Vref voltage.
SETVALUE 5VREF, 1 REM turns on the +5Vref
SETVALUE 5VREF, 0 REM turns off the +5Vref
5VREF
Sets a digital port counter value.
SETVALUE COUNTER1, 20 REM sets digital port 1 counter to 20
SETVALUE COUNTER2, 0
REM sets digital port 2 counter to 0
COUNTERX