Total Pageviews

Monday, 11 June 2018

Remote control of the R&S CMU200 and CRTU - some notes...

Hi,

I get frequently asked questions about how to remote control the R&S CMU200 and CRTU. Some want to program their own application, some just have issues getting my software to run.

So here are a few hints, tips and tricks!

SCPI - What is it?

Again, from Wikipedia:

"The Standard Commands for Programmable Instruments (SCPI; often pronounced "skippy") defines a standard for syntax and commands to use in controlling programmable test and measurement devices, such as automatic test equipment and electronic test equipment."


SCPI is a syntax that describes a set of commands and parameters to remote control a test equipment. Because SCPI is a standard, all devices using it can be controlled by a generic software - the VISA architecture. Each device has its own SCPI command set, but the structure and syntax is common.

Since the goal is to do complex measurements, VISA offers not just a tool to send SCPI commands  and receive the respective answers - it offers programming possibilities and a programming interface, so that one can develop independent software that interfaces to the devices.

GPIB - What is it?

Wikipedia explains:

"IEEE 488 is a short-range digital communications 8-bit parallel multi-master interface bus specification. IEEE 488 was created as HP-IB (Hewlett-Packard Interface Bus) and is commonly called GPIB (General Purpose Interface Bus). It has been the subject of several standards."

https://en.wikipedia.org/wiki/IEEE-488

GPIB is the interface through which you connect the test equipment with the computer.

VISA - What is it?

From Wikipedia:

"Virtual instrument software architecture, commonly known as VISA, is a widely used I/O API in the test and measurement (T&M) industry for communicating with instruments from a computer. VISA is an industry standard implemented by several T&M companies, such as, Anritsu, Bustec, Keysight Technologies, Kikusui, National Instruments, Rohde & Schwarz, and Tektronix."


VISA is the software implementation that allows to comunicate with the test equipment, which normally use SCPI commands.
Schematic of GPIB - SCPI - VISA

Keysight Connection Expert 2018

The Keysight Connection Expert 2018 is part of free Keysight Instrument Control Bundle or IO Libraries Bundle, made by Keysight (former Agilent, former HP).

It is one of many VISA implementations.


You can download the Keysight Instrument Control Bunde here:


Important: The recommended version to run my "VMA Simple SPectrum Analyser" software is to b downloaded here:


Select versin 2017-11-15 2018 Update 0.1 - Build 18.1.22713.0

This is the version I am using and it definitely works!

Please bear in mind that Keysight is not the only vendor offereing a VISA suite. There are other VISA suits! Your lb computer can have such a different VISA software installed and/or a different Keysight version. As a result, my software may not run correctly or at all!

Don't change your VISA installation and configuration, if you require it for production work, as I am not able to give any support on VISA - please use a different computer, if you want to try my software and the currently installed VISA suite does not work.

Running my software is safe, though, as it does not change any settings.

Connecting through RS-232

One way to use my software is to connect the CMU200 or CRTU through a null-modem cable to the PC. This is certainly the easiest and cheapest way.

Some notes, though:
  1. You need to select the serial communication protocol and choise are NONE, XON/XOFF or CTS/RTS. If you are using a full featured null modem cable, then you can select the CTS/RTS mode, which uses handshaking through dedicated lines. If you are using just a simple cable (2-3, 3-2 and 7-7), you can try XON/XOFF or NONE.
  2. The best way to connect the device to the PC is to use a regular COM-port on your motherboard. This will fully support the RS-232 communication. The problem is that modern computers normally don't have this port anymore!
    The work-around consists in using a USB to RS.232 adapter. These can be purchased cheaply, but beware: not all work correctly!
    Problems can be expected with adapters using the Prolific chip, as this is normally a fake chip and the official driver will not work! You need to use an old Prolific driver (pre 2010), but those won't implement XON/XOFF or CTS/RTS handshake properly, so you need to use NONE. Even so, some users experience problems with Time Out on the VISA protocol. This is not a problem of my software!
    I had good results with adapters based on the CH340 chip. These can be bought for the ridiculous price of 1€ (including free shipping):
    https://www.ebay.com/sch/i.html?_from=R40&_trksid=m570.l1313&_nkw=CH340G+USB+2.0+to+9-pin+RS232+COM+Port+Serial+Convert+Adapter&_sacat=0
  3. Serial Communication is about 10 times slower than using a GPIB adapter! This means that the spectrum refresh rate will be slow. It works, but it is no real fun.

Connecting through a GPIB interface

This is the way to go, but beware that the only tested and supported GPIB interface (by my software) is the Agilent 82357B GPIB USB interface.

The good news is that you can buy one cheaply at eBay:


Notice that you want to buy the "B" model and not the "A" model.


There seems to be something fishy about these offers at eBay, as the price of this interface is really low (should be around 10 times more expensive) and the sellers mention "refurbished" along with "new".

The fact is that these devices (at least mine) come in a sealed Agilent box with certificate, but they do seem to be refurbished. You need to look with great attention to notice some minor marks.

I think these are surplus devices that got repackaged, probably in fake boxes (look genuine, though).

Anyway, they do work and the price is great.

Configuring the connection

You need to setup the CMU200 or CRTU for the remote settings:



You need to configure the Primary Address (0) and the Secondary Address (1). This is required no matter if you are using GPIB, Com1 or both.


Here are some additional settings I use.

If you use serial communication, don't forget to setup the RS-232 settings:


The CMU200/CRTU has two serial ports, I only use Com1. Pay attention that you connect the cable to the correct connector...

Now you need to configure the Keysight Connection Expert settings:

For GPIB connection:


 For RS-232 Connection:


Detailed RS-232 settings, matching the settings on the CMU200/CRTU:


Want to program your own application?

Keysight provides some great help, including VB .Net examples.

Take a look here:



Hope this helps!

Regards,
Vitor

1 comment: