Quote Originally Posted by scalerobotics View Post
Well, this is from their help file. You probably already saw it though. Hserout should work, as long as it is set up correctly.

(8 bits, no parity, 1 stop bit)
PLX-DAQ Directives
PLX-DAQ analyzes incoming data strings from the controller for action. Strings begin with a directive informing PLX-DAQ of what action to take.
  • All directives are in CAPITAL letters, and some are followed by comma-separated data. Each string MUST end in a carriage return (CR).
  • Strings not beginning with directives will be ignored.
  • Note that the BASIC Stamp's DEBUG instruction is used in the following discussion.
Control and Data Directives BASIC Stamp Example Usage
DATA, value1, value2,...
Stores the data into the next row from column A on.
Up to 26 comma values may be sent. The 1st value will be placed in column A, the 26th in column Z.
DEBUG "DATA,", DEC Val1, ",", DEC Val2, CR
Special: The strings TIME, TIMER and DATE in value positions 1 and 2 will cause PLX-DAQ to replace those strings with the current time (TIME) or the time in seconds since opening or the last timer reset (TIMER), and date when using the DATA directive.
DEBUG "DATA, TIME, TIMER,", DEC Val1,",",DEC Val2,CR

LABEL, label 1, label 2, label 3,...
Labels the columns from A up to Z. Row 1 is used for labels, up to 26 labels may be sent.
DEBUG "Time, Timer, Value 1, Value 2", CR
CLEARDATA
Clears columns A-J of data from Row 2 on (labels remain in Row 1), or the number of columns to which data was being posted.
DEBUG "CLEARDATA",CR
RESETTIMER
Resets the when using the TIMER directive to place the time in seconds into the cell.
DEBUG "RESETTIMER",CR
MSG, message string
Places a message in the PLX-DAQ Controller Message box. Do not use commas in the message string.
DEBUG "MSG, Starting data run.",CR

Interactive Directives BASIC Stamp Example Usage
ROW,GET
Retrieves the last row number data was placed into using the DATA directive.
DEBUG "ROW,GET",CR ' Request row
DEBUGIN DEC row ' Accept row value into variable

or
SEROUT 16,84,["ROW,GET",CR] ' Request Row
SERIN 16,84,500,Timeout,[DEC row] ' Accept row value with timeout
Timeout:
ROW,SET,Value
Sets the row number to use for next DATA
DEBUG "ROW,SET,2",CR ' Send next data to row 2
CELL,GET,cellnum
Retrieves the value in a specified cell.
DEBUG "CELL,GET,A4",CR ' Request cell value
DEBUGIN DEC cellval ' Accept cell value into variable

or
SEROUT 16,84,["CELL,GET,A4",CR] ' Request cell
SERIN 16,84,500,Timeout,[DEC cellval] ' Accept cell value with timeout
Timeout:
Note: variables and constants may be used for cells in the A-F range by using hexadecimal.
Cell CON $A4
DEBUG "CELL,GET,", HEX CELL,CR

CELL,SET,cellnum,cellvalue
Sets the specified cell value or text
DEBUG "CELL,SET,B4,Hello!",CR
DEBUG "CELL,SET,B5,", DEC x, CR

Note: variables and constants may be used for cells in the A-F range by using hexadecimal. See CELL,GET.
DOWNLOAD,GET
STORED,GET
USER1,GET
USER2,GET

Reads the status of one of the four checkboxes
on the PLX-DAQ interface.
0 for unchecked
1 for checked.
DEBUG "USER1,GET",CR ' Request checkbox value
DEBUGIN DEC check1 ' Accept value into variable
IF check1 = 1 Then ...

or
SEROUT 16,84,["USER1,GET",CR] ' Request cell
SERIN 16,84,500,Timeout,[DEC check1] ' Accept cell value with timeout
Timeout:
DOWNLOAD,SET, 0 or 1
STORED,SET, 0 or 1
USER1,SET, 0 or 1
USER2,SET, 0 or 1

Sets the status of one of the four checkboxes
on the PLX-DAQ interface.
0 for unchecked
1 for checked.
DEBUG "USER1,SET,1",CR ' Sets checkbox USER1 to 1
DOWNLOAD,LABEL,text
STORED,LABEL,text
USER1,LABEL,text
USER2,LABEL,text

Sets the text of the checkboxes
DEBUG "USER2,LABEL,Check me!",CR ' Sets USER2 checkbox label.


BASIC Stamp Code
BASIC Stamp code is used to illustrate using the Simple Data with Plotting sheet of PLX-DAQ.

  • This program sends the value of variable X and the BASIC Stamp SIN value of X.
    SEROUT
    sPin,Baud,["DATA,TIME,TIMER,", DEC X, ",", SDEC SIN X, CR]
  • The current row is read, and when exceed, will reset the row back to 2.
    SEROUT sPin,Baud,["ROW,GET",CR] ' Request Row
    SERIN sPin, Baud,200,TimeOut,[DEC Row] ' Accept returning data with timeout
    IF Row >= 300 THEN SEROUT sPin,Baud,["ROW,SET,2",CR] ' If Row is or exceeds 300, set row back to 2
  • Note that SEROUT 16,84 (sPin and Baud values) is used to send data. This is equivalent to DEBUG but prevent the DEBUG window opening.
  • SERIN 16,84 is used, which is equivalent to DEBUGIN, but provides for timeouts to be used so that the program does not lock up if there is a problem.
  • When using the DATA directive to send multiple values, a combination of strings and values is needed to force commas between values.
I seen that and tried a 13 for the carriage return.......

HSEROUT ("HELLO",13] is this right?