opendps icon indicating copy to clipboard operation
opendps copied to clipboard

SCPI support needed?

Open cleverfox opened this issue 6 years ago • 11 comments

Hello guys. I would like to ask your opinion about SCPI support for opendps.

SCPI (Standard Commands for Programmable Instruments) is industrial standard for controlling of measuring equipment and also programmable power supply over Serial/USB/GPIB/Ethernet. As for opendps I can implement serial version of SCPI and it will be compatible with true serial (RS-232), USB (over USB-UART adapter) and even ethernet (wifi over esp8266 or RTL8710AF).

This give us ability to use standard software (anybody using it already?). As for me, I using whis protocol with my oscilloscope, but my software have no support for anything apart this oscilloscope.

You can see example command set for power supply here http://www.manson.com.hk/getimage3/index/action/images/name/SDP_SCPI_command_list_1_2.pdf and https://github.com/eez-open/psu-firmware/blob/master/doc/SCPI%20reference%20guide/EEZ%20PSU%20SCPI%20reference%20guide.pdf

cleverfox avatar Jul 20 '17 22:07 cleverfox

I think SCPI would be very useful. The eez-open project is really cool and puts this side project of mine to shame ;)

kanflo avatar Jul 21 '17 22:07 kanflo

Hi cleverfox, Are you working on this new feature? I think it would a great addition to opendps.

Robin10155 avatar Jun 17 '18 05:06 Robin10155

No, I have no time now. I will have a time at the end of this year. If you like you can take this task :)

cleverfox avatar Jun 30 '18 13:06 cleverfox

For anyone wanting to add SCPI support, I can recommend this library by @j123b567.

kanflo avatar Jun 30 '18 18:06 kanflo

I am going to add SCPI support next. I will let you know when it is ready

Spudmn avatar Jul 04 '18 02:07 Spudmn

SCPI support is starting to be added to my branch https://github.com/Spudmn/opendps/tree/SCPI_Support It is only working with the emulator so far.

Spudmn avatar Jul 08 '18 20:07 Spudmn

@Spudmn I know that this is just early version so take this only as a hint.

Beauty of SCPI is that it is standard and you can relay on some conventions. For example, if I work with power supply, I expect, that it implements "Power Supplies" instrument class. I also expect that SCPI instrument implements all mandatory commands from IEEE 488.2 and SCPI-99 even if they are just stubs.

If you don't like this, you probably don't need SCPI and this SCPI library is overkill for you. By the way, OpenDPS already has simple custom nonstandard remote commands so why to create another complicated nonstandard remote commands set?

If you like SCPI (I hope so), please implement "Power Supplies" instrument class from the specification (SCPI-99 - Volume 4: Chapter 7 - page 792) and keep all mandatory commands even if you currently don't understand, why they exists. Using default implementations of mandatory commands is enought for the start.

j123b567 avatar Jul 08 '18 21:07 j123b567

@j123b567 Thanks for the hint. Yes I like SCPI and I intended to implement the mandatory commands. Thanks for the PDF. I am sure that will be very useful.

Spudmn avatar Jul 09 '18 02:07 Spudmn

Cool, looking forward to see the complete command set. Please try to follow the coding style so far. That is would be

static scpi_result_t dps_output_enable(scpi_t * context)
{
...
  if (opendps_enable_output(param1)) {


rather than

static scpi_result_t DPS_Output_Enable(scpi_t * context) {
...
  if (opendps_enable_output(param1))
  {

kanflo avatar Jul 10 '18 19:07 kanflo

Sounds interesting... what computer software uses SCPI? I'd be interested to know if it's worth the effort

Xenoamor avatar Dec 15 '18 17:12 Xenoamor

When working with test equipment SCPI is quite common. All instruments from the big guys such as National Instruments speak it.

kanflo avatar Dec 15 '18 20:12 kanflo