Content deleted Content added
move ref |
→Command syntax: add section about "case" |
||
Line 40:
:AC?
...
===Case===
Though the command syntax shows commands in mixed case, SCPI isn't case sensitive.
:For example, <code>VOLTAGE</code>, <code>voltage</code>, <code>Voltage</code>, <code>VoLtAgE</code> are all valid representations for the command <code>VOLTage</code>.
===Abbreviating commands===
The command syntax shows some characters in a mixture of upper and lower case. Abbreviating the command to only sending the upper case has the same meaning as sending the upper and lower case command.<ref name="SCPI-1999-spec"/>
:For example, the command “<code>SYSTem:COMMunicate:SERial:BAUD 2400</code>” would set an RS-232 serial communications interface to 2400 [[Bit rate|bit/s]]. This could also alternatively be abbreviated “<code>SYST:COMM:SER:BAUD 2400</code>”. The query command “<code>SYSTem:COMMunicate:SERial:BAUD?</code>” or “<code>SYST:COMM:SER:BAUD?</code>” would instruct the instrument to report its current baud rate.
The only valid commands are the short and long forms of the commands.
:For example, <code>COMM</code> or <code>COMMUNICATE</code> are valid, but <code>COMMUN</code> and <code>COMMUNIC</code> are invalid.
=== Concatenating commands ===
Multiple commands can be issued to an instrument in a single string. They are made of simple commands separated by a semicolon character (<code>;</code>).
:For example, the command to "Measure a DC voltage then measure an AC current" would be issued as <code>MEASure:VOLTage:DC?;:MEASure:CURRent:AC?</code>. Simple commands which start with a colon (<code>:</code>) are interpreted with respect to the root of the command tree. Otherwise, they refer implicitly to the last node of the previous command (unless they already begin with an asterisk). For example,
|