Can Multiple SCPI Commands Be Sent as Blocks (Single Line)? For Example, Pre-Set Configurations

Yes, some of VeEX's portable test sets, that are SCPI capable, can handle commands in batches. However, their capabilities for handling large or complex command blocks may vary.

The most advanced portable test sets from VeEX are capable of handling multiple SCPI commands sent as a block (single line) and execute them in sequence. However, their capabilities may vary from product to product. Certain test sets may have a limit of how many commands in the batch they are able to buffer and process.

Although we understand the appeal of embedding blocks of SCPI commands into scripts, since they may be good for sending pre-set configurations (setting basic configurations, initial values, or parameters that may not change during the script), long command blocks may be more difficult to debug.

Each command in the batch must still follow the SCPI syntax structure, starting with a colon ":" and ending with a semicolon ";". Although separation between commands may not be required, it is recommended to add a space between commands, for better visual interpretation, troubleshooting and maintenance.

Below is an example of command blocks for configuring a 1GE BASE-T (Copper/Cu) port for Throughput test:

:MODE SINGLE,COPPER;:P1:PORT_APPLY_BEGIN;:PORTSEL CU;:FLOCTRL BOTH;:MDIX AUTO;:AUTONEG ON;:ADV ALL;:EMULATIONMODE AUTO_NEGOTIATION;:PORT_APPLY_END;

:P1:THRPT:STREAM 1;:P1:THRPT:RTD 1;:P1:THRPT:TRIG TIMED,15,SEC;:P1:THRPT:LAYER 2;:P1:THRPT:S1:ISBMULT 0;:P1:THRPT:S1:BWEX 0;:P1:THRPT:S1:FRTYPE RAW;:P1:THRPT:S1:VLAN 0;:P1:THRPT:S1:MAC:DST "00-1E-90-A0-57-3C";:P1:THRPT:S1:MAC:SRC "00-18-63-00-0C-40";:P1:THRPT:S1:MAC:TYPE "07-00";:P1:THRPT:S1:SRCMACFLOOD DISABLE;:P1:THRPT:S1:DESTMACFLOOD DISABLE;:P1:THRPT:S1:FLOW CONST;:P1:THRPT:S1:FRSIZE 1518;:P1:THRPT:S1:PATT PRBS31;:P1:THRPT:S1:PATT:INVERT 0;:P1:THRPT:OOSEN ENABLED;:P1:THRPT:FILTER:MACDST 0;:P1:THRPT:FILTER:MACSRC 0;:P1:THRPT:FILTER:VLANID 0;:P1:THRPT:FILTER:VLANP 0;:P1:THRPT:FILTER:VLANDEI 0;:P1:THRPT:FILTER:TYPE 0;:P1:THRPT:S1:CONST PCT,100.000;:P1:THRPT:TXMODE COUPLE;:P1:THRPT:S1:MPLSTP DISABLE;:P1:THRPT:S1:PBB DISABLE;:P1:THRPT:S1:EOE DISABLE;:P1:THRPT:S1:PBB MAC,SRC,"00-18-63-1A-2B-4E";:P1:THRPT:S1:PBB MAC,DST,"00-18-63-1A-2B-3C";:P1:THRPT:S1:PBB ETH-T,"88-E7";:P1:THRPT:S1:PBB SID,1193046;:P1:THRPT:S1:PBB VLAN,1082,6,"88-A8",0;:P1:THRPT:S1:MPLSTP MAC,SRC,"00-18-63-1A-2B-4E";:P1:THRPT:S1:MPLSTP MAC,DST,"00-18-63-1A-2B-3C";:P1:THRPT:S1:MPLSTP ETH-T,"88-47";:P1:THRPT:S1:MPLSTP VLAN,0;:P1:THRPT:S1:MPLSTP LSP,0,0,0,128;:P1:THRPT:S1:MPLSTP PW,DISABLE;:P1:THRPT:S1:MPLSTP CW,DISABLE;:P1:THRPT:S1:EOE MAC,SRC,"00-18-63-1A-2B-4E";:P1:THRPT:S1:EOE MAC,DST,"00-18-63-1A-2B-3C";:P1:THRPT:S1:EOE ETH-T,"E0-E0";:P1:THRPT:S1:EOE VLAN,0;:P1:THRPT:S1:EOE TTL,128;:P1:THRPT:S1:EOE EID,0;:P1:THRPT:THRPT:CTRMOD MANUAL;:P1:THRPT:STARTSTRMCFG COUPLED;:P1:THRPT:S1:PPPOE OFF,00,0,00-21,DISABLE,DISABLE,DISABLE;:P1:THRPT:SDTENABLE 0;:P1:THRPT:S1:SDTTRIGGER 10000;:P1:THRPT:S1:SDTVIOLATION 50000;:P1:THRPT:S1:TRAFLOSSTRIG 0;:P1:THRPT:S1:TRAFTHRES 0,10.000000,0,1.000000,1,100000,0,100000;

:P1:THRPT:START;

:P1:LINK:STATUS ?;

:P1:THRPT:RESULT ?;

Keep in mind that different commands have different execution times, so the script programmer should be mindful of getting the acknowledgement (and data) for each of the commands in the block, before sending another batch or individual commands.

Below is how a similar 1GE BASE-T Throughput configuration would look like when individual commands are sent. One advantage of this method is that each command receives its results and/or acknowledgement right after it is executed. Problems with syntax, context or sequences are easier to identify.

:P1:PORTSEL CU;

:P1:THRPT:TRIG TIMED,15,SEC;

:P1:AUTONEG ON;

:P1:FLOCTRL BOTH;

:P1:ADV ALL;

:P1:MDIX AUTO;

:P1:THRPT:STREAM 1;

:P1:THRPT:RTDENABLE 1;

:P1:THRPT:TXMODE COUPLE;

:P1:THRPT:S1:FLOW CONST;

:P1:THRPT:S1:FRSIZE 1518;

:P1:THRPT:S1:CONST PCT,100;

:P1:THRPT:S1:LAYER 2;

:P1:THRPT:S1:FRTYPE RAW;

:P1:THRPT:S1:VLAN 0;

:P1:THRPT:S1:MAC:SRC 00-18-63-00-00-FF;

:P1:THRPT:S1:MAC:DST 00-18-63-00-00-FE;

:P1:THRPT:S1:MAC:TYPE 07-00;

:P1:THRPT:S1:PATT PRBS31;

:P1:THRPT:S1:PATT:INVERT 0;

:P1:THRPT:S1:FILTER:MACDST 0;

:P1:THRPT:S1:FILTER:MACSRC 0;

:P1:THRPT:S1:FILTER:TYPE 0;

:P1:THRPT:START;

:P1:LINK:STATUS ?;

:P1:THRPT:RESULT ?;