Some more days passed and some more finishing touches added to my MacSCPI app. It is entirely dependent on hooking the device via the USBTMC driver, but it works fine and is stable:

Some SCPI commands sent from an OS X terminal to my KeysightAgilent DSOX 2002A scope (see the *IDN? query result — serial wiped for security reasons); all values are returned in NR3 format, but seem to be reliable (crossed-checked with reading from the display).
I had some problems with buffer padding and the output it is still not 100% gibberish–free , but I assume I have to play with buffer size and with zero–filled calloc
routines. We’ll see. I implemented a fgets–based terminal character read. So far so good, the apps sends proper DEV_DEP_MSG_OUT
and reads DEV_DEP_MSG_IN
usbtmc messages. Some more screens with control reference waveforms and marker tests:

Some tests with markers and control reference waveforms, performed on my KeysightAgilent DSOX 2002A oscilloscope. Note the result of :MARKer:XDELta? SCPI query (last line) and compare with ΔX value (44.200 ns) displayed on the scope screen (next image).

Some tests with markers and control reference waveforms, performed on my KeysightAgilent DSOX 2002A oscilloscope. Note the ΔX value (44.200 ns) and compare with the result of :MARKer:XDELta? SCPI query in the previous image (last line).
There are many ways to continue. For now, I will go with limited objectives: developing just the console app and adding support for parameters and inline help. Then some code refinements will follow: the next big move is to start creating the actual SCPI libraries — probably a stdandalone framework for Mac — thus increasing the level of abstraction to a stage that will be much programming–friendly and allow reusability and more flexibility in bigger, more complex applications. More to come.
Leave a Reply