2 - Introduction to ProgrammingMultiple Commands in a MessageMultiple SCPI commands can be combined and sent as a single message with one message terminator.There are two important considerations when sending several commands within a single message:♦ Use a semicolon to separate commands within a message.♦ There is an implied header path that affects how commands are interpreted by the electronicload.The header path can be thought of as a string that gets inserted before each command within amessage. For the first command in a message, the header path is a null string. For each subsequentcommand the header path is defined as the characters that make up the headers of the previouscommand in the message up to and including the last colon separator. An example of a message withtwo commands is:CURR:LEV 3;PROT:STAT OFFwhich shows the use of the semicolon separating the two commands, and also illustrates the header pathconcept. Note that with the second command, the leading header "CURR" was omitted because after the"CURR:LEV 3" command, the header path became defined as "CURR" and thus the instrumentinterpreted the second command as:CURR:PROT:STAT OFFIn fact, it would have been syntactically incorrect to include the "CURR" explicitly in the secondcommand, since the result after combining it with the header path would be:CURR:CURR:PROT:STAT OFFwhich is incorrect.Moving Among SubsystemsIn order to combine commands from different subsystems, you need to be able to reset the header pathto a null string within a message. You do this by beginning the command with a colon (:), which discardsany previous header path. For example, you could clear the output protection and check the status of theOperation Condition register in one message by using a root specifier as follows:OUTPut:PROTection:CLEAr;:STATus:OPERation:CONDition?The following message shows how to combine commands from different subsystems as well as within thesame subsystem:VOLTage:LEVel 20;PROTection 28; :CURRent:LEVel 3;PROTection:STATe ONNote the use of the optional header LEVel to maintain the correct path within the voltage and currentsubsystems, and the use of the root specifier to move between subsystems.Including Common CommandsYou can combine common commands with subsystem commands in the same message. Treat thecommon command as a message unit by separating it with a semicolon (the message unit separator).Common commands do not affect the header path; you may insert them anywhere in the message.VOLTage:TRIGgered 17.5;:INITialize;*TRGOUTPut OFF;*RCL 2;OUTPut ON18