
Subsystem Commands. Subsystem commands (see Figure
Figure 6-1. Partial Command Tree
Traversing the Command Tree
Figure 6-1 shows a portion of the subsystem command tree (you can see the complete tree in Figure 7-2). Note the location of the ROOT node at the top of the tree. The SCPI interface is at this location when:
∙The power supply is powered on.
∙A device clear (DCL) is sent to the power supply.
∙The interface encounters a message terminator.
∙The interface encounters a root specifier.
Active Header Path
In order to properly traverse the command tree, you must understand the concept of the active header path. When the power supply is turned on (or under any of the other conditions listed above), the active path is at the root. That means the interface is ready to accept any command at the root level, such as TRIGger or STATus in Figure
If you enter STATUS, the active header path moves one colon to the right. The interface is now ready to accept : OPERATION, :PRESET, or QUESTIONABLE as the next header. Note that you must include the colon, because it is required between headers.
If you next enter :OPERATION, the active path again moves one colon to the right. The interface is now ready to accept :EVENT?, CONDITON?, ENABLE, NTRANSITION, or PTRANSITION as the next header.
If you now enter :ENABLE, you have reached the end of the command string. The active header path remains at :ENABLE. If you wished, you could have entered :ENABLE 18;PTRANSITION 18 and it would be accepted. The entire message would be STATUS:OPERATION:ENABLE 18;PTRANSITION 18. The message terminator after PTRANSITION 18 returns the path to the root.
The Effect of Optional Headers
If a command includes optional headers, the interface assumes they are there. For example, if you enter STATUS: OPERATION?, the interface recognizes it as STATUS: OPERATION: EVENT?. This returns the active path to the root (:STATUS). But if you enter STATUS: OPERATION: EVENT?, then the active path remains at :EVENT. This allows you to send STATUS: OPERATION: EVENT?; CONDITION? in one message. If you tried to send STATUS:OPERATION?;CONDITION? the command path would send STATUS:OPERATION:EVENT? and then return to :STATUS instead of to :CONDITION.
Remote Programming 47