Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

non-scpi compliant command strings

We control different instruments sending SCPI strings with viWrite, viRead NI-VISA commands from custom-made C++ program. Sadly NI PXIe SMU and DAQ cards are not SCPI compatible.  I suppose there are some command strings might be sent through VISA instead of using NI-DCPower API. It's not a problem if these strings are not SCPI compliant.
Is there any document on low level communication protocol of these SMU, DAQ, DMM cards? (actually PXIe-4080 DMM, PXIe-4136 SMU and PXI-2529 relay matrix is the target)

0 Kudos
Message 1 of 12
(1,388 Views)

They might be register level programmed. Since they are supposed to be used by the IVI style DMM instrument driver, the actual communication underneath is pretty irrelevant and register level programming can make the hardware considerably simpler to implement. However, register level documentation is usually quite hard to get, support for that is very difficult as the average user has not really any idea where to even start with this, so making the documentation proprietary and only hand out for very special requests and under very strict NDAs is not uncommon.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 2 of 12
(1,360 Views)

Why not use the driver APIs? probably you need to call the C-dll in your C++ program.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 3 of 12
(1,344 Views)

Thanks, Rolf, it is very bad news.
There is a ~15k€ gear on my desk (PXIe1073 rack + 4080 DMM + 4136 SMU + 2529 relay module + 8361 controller card) and virtually can't do anything with it. No easy SCPI commands, MAX can't handle it, no easy GUI for control/reading data.
I can turn to the quite complex NI-DCPower and NI-DAQmx API's, which is an overkill relative to the "MEAS:VOLT:DC 10" kinda SCPI control from MAX's console. Or re-do the whole system in LabView.
This business practice is probably very fruitful for the manufacturers: buy the whole solution from me...otherwise you can't use of my devices:(

0 Kudos
Message 4 of 12
(1,332 Views)

Yes, Santhosh,
this is the only thing I could do, but we have a system operating with SCPI strings read from "instrument descriptor files". As we have heterogeneous instrument pool, SCPI control seemed to be a mutual good solution. Totally different handling through API's is a real pain in the @#s, adding several weeks of work. It seems NI rack will rather be an expensive dust collector.

0 Kudos
Message 5 of 12
(1,329 Views)

SCPI is an inefficient protocol compared to binaries used by NI's drivers API. I can understand your pain when you have been used to just traditional rack and stack instruments with SCPI.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 6 of 12
(1,320 Views)

Personally I would consider the choice to base all your instrument control on an uniform SCPI configuration manager as a bit short sighted. There are virtually millions of devices out there and unless you happen to use a standard external T&M instrument, it is very unlikely that it will operate with SCPI commands or even string based non-SCPI commands. A SCPI capable device requires a local processor that can parse the SCPI commands and translate them into the internal register based control logic. Since a PXIe module is in fact a register based device by default and can add a message based interface as option, the direct route is in fact the most simple. The IVI standard is supposed to offer an easy and versatile interface to such devices, except when you try to drive that device with a precooked string based configuration manager.

What if you try to integrate an external device with a manufacturer provided DLL (standard, ActiveX or .Net interface)? What if it is using a different bus than RS-232, GPIB or USB-TMC? CAN maybe, or EtherCAT, Profibus, Ethernet/IP, OPC UA, etc? 

 

I think you will sooner or later anyhow have to consider some different or additional approach. What about a sort of intermediate layer?

Have a string command ToIVI-DMM translator, one for ToIVI-DC etc. Add some extra keyword to your configuration for that device that specifies which translator to use. You say you program in C++, with a little effort to come up with a good design, you could do that easily with little extra effort to your current setup and simply have it load the right C++ class for the according device type.

 

Basically IVI is a fully class based interface too, so maybe it would be even easier and build on that and implement a special SCPI IVI class to interpret your current device configurations.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 7 of 12
(1,317 Views)

This "SCPI only" approach worked until now. I agree that SCPI is an ancient (from the 1990's) and quite dumb protocol (e.g lack packet length info...you never know when the reply to a *IDN? query ends), still should survive due to compatibility reasons.

The argument "A SCPI capable device requires a local processor.. " might be a limiting factor 20 years ago, but it is surely not a concern now, when there may be  enough computing power in the children's Happy Meal toy to achieve this SCPI parsing.
I guess NI could easily create an interface between the SCPI commands and the register-based inner operation.

What's made me really upset a couple hours ago, that I downloaded the API reference of NI-DCPower, which is a whopping 787 pages PDF. If I'm lucky it takes only a couple days to implement the new API, but it can easily be prolonged for some weeks.

In a prefect world I'd ask "MEAS:VOLT:DC? 10", got back "5.0023E+01" and that's all 😄

0 Kudos
Message 8 of 12
(1,309 Views)

...5.0023E+00.  No 50V in 10V range :DDD

0 Kudos
Message 9 of 12
(1,308 Views)

@novaktamas wrote:


What's made me really upset a couple hours ago, that I downloaded the API reference of NI-DCPower, which is a whopping 787 pages PDF. If I'm lucky it takes only a couple days to implement the new API, but it can easily be prolonged for some weeks.


You should feel happy. 😁 Some manufacturers make the task of getting any form of manual beyond the Users Manual an exercise in persistence and begging, until you get some kind soul that is willing to make that extra step to search for the document internally and send it to you. Or they make you go through 40 pages of legalize and then sign the document in which you pledge your first born for the case that you accidentally let the document slinger around and get into the wrong hands (which is generally anyone that they haven't been able to force to go through the same procedure). 🙄

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 10 of 12
(1,292 Views)