ScriptVISA

Image

Updated Version:

Updated in version 1.8.0:

  • Commands to work with individual bits
  • Can use decimal, binary (precede with &b, example &b11001010 or hexadecimal (precede with &h, example &hFF) as number base

ScriptVISA

A Windows app that help you control and retrieve data from measurement instruments, and to write script. Supported interfaces are those that VISA implements (GPIB, RS232,USB,LAN etc,)

Pre-requistions

Keysight IO Libraries

Optional

Keysight Command Expert

Installation

Unzip and run Setup to start installation

Image
Image

Usage

The windows to the left is opened when you start ScriptVISA.

How to change the relative size between Scrip and Log

To change the relative size between the Scrip and Log area you just click on the area between Scrip and Log (yellow marking on the picture on the left) and drag up or down.

The yellow mark is not there in the real software, I just put it in the picture.

Image

Visa Address: Either type in the VISA-address or press the arrow to get a list of all instrument discovered by Connection Expert.
Connect: Connect to the instrument.
Exclusive Lock: Make sure ScripVISA is the only software connected to the instrument.
Device Clear: send the Device Clear Command to the connected instrument

Connection Expert: Launch Connection Expert (Part of Keysight IO Libraries Suit)
Command Expert: Launch Command Expert

Script: The script that will be run. You can also type in the script in this field, or open an existing scrip will be shown here.

Only Script Commands; If checked only recognized script commands will be executed. If not checked any unknown commands will be send to the connected instrument.
Run: Start the script.
Pause: Pause the script, can then step through the script
Continue: Continue running the script
Step: Run the next row in the script
Stop: Stop the script (not possible to step or continue)
EOL: Define the End-Of-Line charater(s), Cr,Lf,CrLf,LfCr
Speed: Script Speed in ms (min 1 ms)
Timeout: Set the timeout in ms for commands sent to the connected instrument

Log Output: The output from the script is displayed here

Execution: Will display when the script starts and ends
Trace Row: Each row that will be executed are displayed
VISA Write: Each command send to the connected instrument is displayed
VISA Read: Each respons back from the connected instrument is displayed
Time Stamp: Each logged item is preceded with a time stamp (hh:mm:ss.ms)
Clear Log: Each time you run the logg is cleared
Black/Green: the log is displayed with green text on black background

Less Check: Not as thorough error check, on some instruments the thorough error check makes the instrument time-out (probably needs to be checked seldom)

List of Commands


NOP - No operation
// - No operation
DISP <@var | "string"> - Display message @var or the string
DISPBINARY8 @var - Display the binary block as 8 bits value
DISPB8 @var - Display the binary block as 8 bits value
DISPBINARY15 @var - Display the binary block as 16 bits value
DISPB16 @var - Display the binary block as 8 bits value
SET var value - Set the variable to value
ASK var string - Display the string and store user answer into variable
GPIB card address - Open a session via GPIB on specified card and address
TCPIP ip-address - Open a session via TCP for ip-address
LAN ip-address - Open a session via LAN for ip-address
USB vendor::instrument - Open a session to the vendor instrument
VISA visa-address - Open a session to the visa-address
EXCLUSIVE < 1 | 0 > - When we open a session should it be exclusive (1) or not (0) (if no argument then default to exclusive)
EOL defines the End-Of-Line: Cr Lf CrLf LfCr
OUT string - send the string to instrument in current session
IN var - Read back response from current session
BUFFSIZE size - Set the buffer-size for data read-back from current session default 9000 bytes
LOOP var loops - Imitates the loop, using specified variable and number of loops
NEXT - Start the next iteration in the loop
WAIT ms - Wait and stop execution for ms
ADD var value - Add value to variable
+ var value - Add value to variable
SUB var value - Subtract value to variable
- var value - Subtract value to variable
MUL var value - Multiply value to variable
* var value - Multiply value to variable
DIV var value - Divide value to variable
/ var value - Divide value to variable
MOD var value - Modulus value to variable
\ var value - Modulus value to variable
% var value - Percentage value off variable
INT var - Remove all decimals in variable
RND var - Generate a random number between 0 and 1 and put into variable
RANDOMIZE - The random number generator start seed, if seed is omitted the system timer is used and give a pseudo random numbers.
& string var - Join the string to variable var
JUMP +/-rows - Jump +/-rows
GOTO +/-rows - Jump +/-rows
STOP - Stop execution
SPEED speed - change the execution speed, min 1 ms. No argument = 100 ms
TRACEEXEC - Turn on/off logging of executed commands
TRACEVISAREAD - Turn on/off logging of visa read
TRACEVISAWRITE - Turn on/off logging of visa write

TRACEROW - Turn on/off logging of all rows
TRACEALL - Turn on/off logging of all logging settings
BEEP - A short beep
= - compare two variable or variable and value if equal
EQU - compare two variable or variable and value if equal
< - compare two variable or variable and value if less than
LT - compare two variable or variable and value if less than
GETCOMP var - store the result of last comparsion into variable
> - compare two variable or variable and value if more than
MT - compare two variable or variable and value if more than
<> - compare two variable or variable and value if not equal
!= - compare two variable or variable and value if not equal
NOTEQU - compare two variable or variable and value if not equal
IF rows - if last comparison was true jump rows
IFNOT rows - if last comparison was not true jump rows
IF! rows - if last comparison was not true jump rows
STATINIT - Initiates the statistical calculations, clear any old statistics
STAT+ - add value|variable to the statistic database
STATADD - add value|variable to the statistic database
AVERAGE var - store the average into variable
AVG var - store the average into variable
STAT# var - store the number of values in the statistical database into variable
STATMIN var - store the minimum statistical value into variable
STATMAX var - store the maximum statistical value into variable
STATSORT - sort the statistical values from MAX to MIN or MIN to MAX
MEDIAN var - store the median statistical value into variable
STDDEV var - calculate the standard deviation of the statistical values and store in variable
GETSTAT var index - get the statistical value in index and store into variable
STATBUFFER size - change the number of statistical values can be stored, default 2000
ICONV var - convert the string in variable to a decimal number, honouring cultural differences
INCUL var - Read back string from open session and convert to a decimal number, honouring cultural differences
OPENFILENAME var - Lets you select a file to open and store selected filename into variable
SAVEFILENAME var - Lets you select a file to save and store selected filename into variable
SUBVAL# var string - Calculates how many comma seperated field the string have
SAVELOG filename - save the log
DEVCLR - Execute a device clear on the open session
TMO? - sets the last comparison to true if a timeout have occured
VISAERROR var - Stores the last visa error into variable
TIMEOUT timeout - changes the timeout, if no argument timeout is set to the value in the Timeout input-box, if empty default to 2000 ms
LOG string - add string to the log
CLRLOG - Clear the log
#BYTES var binbuff - Return the number of bytes in the binary block
#WORDS var binbuff - Return the number of words in the binary block
OVERFLOW binbuff - sets the last comparison to true if the buffer is to small for the read-back buffer
SAVEBUFFER buff filename type size - save buffer as filename type (CSV, TSV) and size (8 or 16)
*B - Sets the breakpoint

New Commands in v1.7.6
BIT?
var bitnumber – Check to see if a bit is set to one
SETB var bitnumber- Sets a bit to one
ANDB var - Bitwise logical and
ORB var - Bitwise logical or
XORB var - Bitwise logical xor
NOTB8 - Inverts all lower 8 bits
NOTB16 - Inverts all 16 bits
LOGB8 - outputs the value in var as 8 bit binary to the logoutput
LOGB16 outputs the value in var as 16 bit binary to the logoutput

Screenshot's


Image
Image

© 2018-2020 Michael Augustsson Contact Me

improve your online experience. Take a look at the Cookie Privacy to learn more and also my Privacy Policy. By pressing Dismiss I assume you are happy to allow the use of these cookies.

RapidWeaver Icon

Made in RapidWeaver