FAQs from Rohde & Schwarz

EMC32 Generic Amplifier, different ways to send SCPI commands in sequence

Question:

I am using EMC32 for Electromagnetic Susceptibility . I have an Amplifier which I control with "Generic Amplifier" driver.

Rohde-Schwarz-FAQ-EMC32-Generic-Amplifier-different-ways-to-send-SCPI-commands-in-sequence_screen1.jpg

I have defined a Configuration File for Generic Amplifier and this works fine, but I would prefer to send a second command when switching to "Operate". In the Format Specification for Generic Amplifier Files, there seems to be only the possibility to send one command at a time when switching to "Operate". I didn't find away to send several commands in sequence. Is there such a possibility?

Answer:

Basically, there are two ways to solve this.

At first SCPI language allows to use semicolon to link commands. In the following example from Device Configuration File the command AMP:OPER and *CLS are separated by a semicolon:

Rohde-Schwarz-FAQ-EMC32-Generic-Amplifier-different-ways-to-send-SCPI-commands-in-sequence_screen2.jpg

If you follow the sent commands using NI IO Trace logfile, you will see that the second command is sent after first command AMP:OPER as expected, also separated by semicolons.

Rohde-Schwarz-FAQ-EMC32-Generic-Amplifier-different-ways-to-send-SCPI-commands-in-sequence_screen3.jpg

Please note, some Amplifiers may not accept semicolons as a separator. Such Amplifier necessarily expect a termination after each command.The next command is allowed to follow only after that. There is also a solution for this, not listed in Format Specification for Generic Amplifier Files.

Please add another line Command1= for the 2nd SCPI command to Device Configuration file. The content is then sent after the content of Command=.

In the example below *CLS should be used as a second command after the AMP:OPER command.

Rohde-Schwarz-FAQ-EMC32-Generic-Amplifier-different-ways-to-send-SCPI-commands-in-sequence_screen4.jpg

If you follow the sent commands in the NI IO Trace logfile, then AMP:OPER is first sent, terminated with with hexadecimal 0A at the end.

Second command specified using Command1= is sent after that.

Rohde-Schwarz-FAQ-EMC32-Generic-Amplifier-different-ways-to-send-SCPI-commands-in-sequence_screen5.jpg

The termination character itself can be defined in this section of the Configuration File

Rohde-Schwarz-FAQ-EMC32-Generic-Amplifier-different-ways-to-send-SCPI-commands-in-sequence_screen6.jpg