It's really easy, 5 minutes guide to get data from any device

Thursday, Aug 06, 2020 - Posted by Marjan Pataca

Back in the day, it was a complicated job to support various devices and protocols. Integration was a process of protocol investigation, custom development, a lot of testing and the end result was often tailored for the specific system with low possibility to reuse existing device protocol driver.

Besides that, people had to go through extensive training and learn about different SDKs just to be able to get some data from devices and often it didn't bring a lot of luck.

Amphinicy had a different approach. We started with an idea: "code less, control more" - and ended with a simplified method to device monitoring and control.
We are using simple, well-defined XML files which help us to describe the two most important things. The first one is how device data will be processed, stored and presented to humans. The second one is a 'Babbel fish' of human-machine interaction, it defines how we will talk to the device and how the device will respond to us.

People are probably asking, why XML? XML format is well known, strict, easily validated and equally readable to humans and machines.

For example, if we are using some of the well-known measurement equipment which speaks SCPI protocol, like an RF power meter, we will create just two XML files for monitoring (or use a template from existing one).

In the first file, we'll define the parameters. For this practice we will use *IDN?, which is a standard command among all SCPI supported devices. It gives us back device identification:


I just had to define several attributes like "access" (which defines whether we can set and/or just get the parameter from the device), parameter's description, refreshRate in seconds (which defines how often we will poll from device) and type which defines what kind of value we are getting from the device.

The second file defines how we are talking to the device:


Here we just had to designate a "getTranslation" expression which defines how we will ask a device to give us an answer and the "resultTranslation" expression which describes how we will process the response from the device. This field contains a regular expression that process the value that the device sent to us.

And that's it - a device driver. :)

There is no need for compilers and debuggers, we need just to  upload it to Monica M&C and we are ready to test and use it to communicate with the device.

If we did everything ok, we will get "Keysight Technologies,N1914A,MY54320001,A2.01.15" from our device in Monica M&C.