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. | |
Bookmarks