IF
node is ok
AND
node is potential end node,
AND
blank
('
')
follows
AND
command takes parameter,
THEN
parse parameter.
IF
node is ok AND node is potential end node AND question
mark
('?')
follows AND command has query form, THEN do query.
IF
node is ok AND node is not end node AND colon
(':')
follows
THEN gather next node..
.
. .
.
.
ELSE generate syntax error.
A
complication is introduced by the current base node. However the
rules that determine which node is the current base node, are very
simple:
After reset, any syntax error, receipt of a program message
terminator
(<CR/LF>) and if a command starts with a colon(':')
the root node is the current base node.
H
After successful parsing (and execution) of a command, the node
in front of the end node of the command string, becomes the
current base node for the next program message unit. If the
command consisted of only one node then the current base node is
untouched.
Example
In case this might sound a little complex, an example should help.
Assume the following language definition
:
:ABORt <event
>
[:
S OURce]
:VOLTage
I
POWer
1
CURRent
[:LEVel]
[:IMMediate]
[:AMPLitude] <numeric value>
:OFFSet <numeric value>
:UNIT V
1
DBM
1
VRMS
Again, keep in mind that the <root> node does not exist in reality.
Assume further that after power on, <root> is the current base node.
Now the following programming string is sent to the instrument
:
Inside the parser
:
H
':VOLT:UNIT' is found under current base node <root> (the
optional node 'SOURce7 has been skipped), the parameter ('DBM7)
is parsed and the command is executed without error.
b
':VOLT7 is
the new current base node.
H
'LEV' is found under the current base node ':VOLT7, the optional
nodes 'IMM7 and 'AMPL' are skipped, the parameter
'1'
is parsed
Command Reference
5-5
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com