Example SCPI Script
This script connects to an N6705C power analyzer using its alias. The defaultChannel for the connection is set to 2. By default, all the commands sent to the device are addressed to that channel.
The script then uses a repeat loop to set the voltage to different values and retrieves the actual measured voltages. At the end, it displays some information about the differences between the set and actual voltages.
The script uses a tell block to enclose the portion of the script that communicates with the device. This means that all the device-related commands, like reset and setValue, are sent to the device.
SenseTalk commands within the tell block continue to function normally. Technically, they are also sent to the powerAnalyzer object, but since that object doesn’t implement a put or insert command, the commands are passed along to the engine as usual.