Subscribe by Email

Your email:

RSS Feed

Add to Technorati Favorites

ZTEC Instruments - Test and Measurement Blog

Current Articles | RSS Feed RSS Feed

Automating a Test Without Programming

Posted by Candy Martinez on Tue, Dec 01, 2009
 | Submit to Digg digg it | Add to delicious delicious | Submit to StumbleUpon StumbleUpon | Share on Facebook Facebook | Share on Twitter Twitter | Share on LinkedIn LinkedIn 

One of the strengths of using modular instruments is the ability to write programs to perform an automated set of tasks. Generally this is done though a programming environment and a standard programming language like ANSI-C or COM. Though this may be the norm; there are also other ways to communicate and even quickly program using the standard SCPI string interface.

Using ZTEC's ZFind command interface, it is easy to type in simple commands and queries:

 

ID Query
Figure 1: ID Query

 

Some more efficiency can be gained using “Tree-Walking” this lets you send multiple commands/queries on the same line:

 

Tree Walking
Figure 2: Tree Walking

 

Since the interface saves the command history, it is simple to change between a few commands using the up/down arrows on your keyboard. However, this starts to be less efficient with more than a few commands.

The command history can also be saved in its entirety. With the Save History option, you can save all of the commands that have been sent to a simple .txt file.

 

Command History
Figure 3: Command History

 

More advanced functionality is available through the command scripting. This allows the upload of a set of commands in a text file. This can either replay a previously saved command history, or can run though a manually generated list of commands.

 

Command Scripting
Figure 4: Command Scripting

 

 

Command Scripting Results
Figure 5: Command Scripting Results

 

Now the instrument can have complex programs run against it, using only a text file instead of compiling a program. The commands are standard SCPI, are provided in the instrument manual, are not case sensitive, and either the full or abbreviated command can be used. 

Tags: ,

COMMENTS

Test is a must to check if there is no errors in a particular output or devices, that's why a test instrument is important in making this task convenient.

posted @ Monday, December 14, 2009 3:23 AM by Test Instrument Rental


In your manuals, I noticed that there is not SCPI command support for uploading binary block data -- such as a waveform. The documentation mentions using "C" APIs from ZBIND.dll in combination with SCPI. Is this true? Or is there messaged based solution for loading a custom waveform that I am not seeing?

posted @ Friday, December 18, 2009 3:14 PM by Darvin Raph


Yes, it is true that there is not a SCPI command upload for block data. Block data is instead uploaded through block transfers which differ depending on the instrument's platform. For instance, PCI transfers are done through direct memory access (DMA). These transfers provide much higher bandwidth than command based transfers. 
 
To hide these differences and avoid the need to know specific transfer details, we provide the ZTEC Backplane Binding Layer (zbind). Through this C driver, all block transfers can be done using zbind_blkin() and zbind_blkout(). These are used in conjunction with SCPI commands that let the instrument know where to transfer uploaded data, or to return the data address for downloads to the host machine.  
 
To use the zbind block transfer functions, the user needs to be aware of limitations such as buffer size, buffer address, and waveform data types. While these values are available though other zbind functions, it is generally easiest to use the provided instrument drivers, which have built-in functions (ex: ztscopeM_load_waveform) to support waveform transfer. The instrument drivers are also available for other interfaces, such as COM, IVI and LabVIEW.  
 
To transfer waveforms without any programming, use the graphical user interface (GUI) specific to the instrument. The GUIs allow waveform transfer to and from comma separated value (csv) text files.

posted @ Friday, December 18, 2009 4:46 PM by Candy Martinez


Post Comment
Name
 *
Email
 *
Website (optional)
Comment
 *

Allowed tags: <a> link, <b> bold, <i> italics

Receive email when someone replies.