03-21-2024 07:41 AM
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)
03-21-2024 08:37 AM - edited 03-21-2024 08:41 AM
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.
03-21-2024 09:08 AM
Why not use the driver APIs? probably you need to call the C-dll in your C++ program.
03-21-2024 09:47 AM
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:(
03-21-2024 09:57 AM
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.
03-21-2024 10:13 AM
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.
03-21-2024 10:19 AM - edited 03-21-2024 10:34 AM
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.
03-21-2024 10:48 AM
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 😄
03-21-2024 10:50 AM
...5.0023E+00. No 50V in 10V range :DDD
03-21-2024 11:14 AM
@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). 🙄