Products > Test Equipment

Open source lxi-tools and liblxi v1.0 released for GNU/Linux

<< < (46/67) > >>

awallin:
Hi Lundmar, everyone,

I'd like to make an instrument that is controlled by LXI, I'm using an Arduino Due with Ethernet-shield on the Due.

Could you give some pointers on where to begin?
By googling I found some parsers for SCPI-commands (formatted ascii-text) - but I'm not sure what goes on top of the Arduino Ethernet driver to receive LXI commands?
Previously we used Modbus/TCP on the Arduino Due (and found a ready made library for that), but I'd like to move to LXI as modbus seems quite 1980s... ^-^

thanks!
AW

N0NB:
I can report that SlackBuild scripts for liblxi 1.11 and lxi-tools (with build option for the GUI) for Slackware/Slackware64 14.2 and friends are now live at SlackBuilds.org.

lundmar:

--- Quote from: awallin on February 17, 2018, 08:53:01 am ---Hi Lundmar, everyone,

I'd like to make an instrument that is controlled by LXI, I'm using an Arduino Due with Ethernet-shield on the Due.

Could you give some pointers on where to begin?
By googling I found some parsers for SCPI-commands (formatted ascii-text) - but I'm not sure what goes on top of the Arduino Ethernet driver to receive LXI commands?
Previously we used Modbus/TCP on the Arduino Due (and found a ready made library for that), but I'd like to move to LXI as modbus seems quite 1980s... ^-^

thanks!
AW

--- End quote ---

A LXI compatible instrument supports one of the following protocols for communicating SCPI: RAW/TCP, VXI11/TCP, HiSlip/TCP.

You have to decide which communication protocol to go with for your server implementation and then add to that your SCPI parser.

RAW/TCP offers fast communication but is less robust. It is easy to implement as it is just a standard socket TCP server. There are countless examples available online on how to create socket TCP servers.

VXI11/TCP is robust but slow as it introduces a lot of protocol communication overhead. It is more complicated to implement as it is a protocol based on the aging RPC framework. Both VXI11 client and server stubs are defined by this file: https://github.com/lxi-tools/liblxi/blob/master/src/vxi11core.rpcl and then generated into C code using the rpcgen tool: https://linux.die.net/man/1/rpcgen . General guides on how to implement a RPC(gen) server are available, for example: https://docs.oracle.com/cd/E19683-01/816-1435/rpcgenpguide-21470/index.html . However, the specific VXI11 server stub implementation is largely undocumented AFAIK which makes it harder to implement.

HiSlip/TCP is the future communications protocol for LXI compatible instruments. It is robust and basically just as fast as a RAW/TCP connection because it has very little communication overhead. I'm not aware of any open source client/server HiSlip implementations so I have started writing my own: https://github.com/lxi-tools/libhislip . It is still work in progress but now that I have finished the basics of lxi-gui I hope to continue this project but it won't be done anytime soon.

VXI-11 is available in most LXI compatible instruments and kind of considered the standard option. To keep things simple and get something working fast, you might just want to go with RAW/TCP.

Finally, to make your instrument discoverable on the network you will have to implement either VXI11 discovery or mDNS/DNS-SD. In your case, I recommend the first option as it is easy to implement, especially in an Arduino type environment. It's basically just a specific response to a network broadcast message.

I hope this helps you decide in which direction to go.

awallin:

--- Quote from: lundmar on February 17, 2018, 04:45:46 pm ---A LXI compatible instrument supports one of the following protocols for communicating SCPI: RAW/TCP, VXI11/TCP, HiSlip/TCP.

You have to decide which communication protocol to go with for your server implementation and then add to that your SCPI parser.

RAW/TCP offers fast communication but is less robust. It is easy to implement as it is just a standard socket TCP server. There are countless examples available online on how to create socket TCP servers.

VXI11/TCP is robust but slow as it introduces a lot of protocol communication overhead. It is more complicated to implement as it is a protocol based on the aging RPC framework. Both VXI11 client and server stubs are defined by this file: https://github.com/lxi-tools/liblxi/blob/master/src/vxi11core.rpcl and then generated into C code using the rpcgen tool: https://linux.die.net/man/1/rpcgen . General guides on how to implement a RPC(gen) server are available, for example: https://docs.oracle.com/cd/E19683-01/816-1435/rpcgenpguide-21470/index.html . However, the specific VXI11 server stub implementation is largely undocumented AFAIK which makes it harder to implement.

--- End quote ---

Thanks for this explanation. I found this vxi-11 implementation on arduino due:
https://www.bankras.org/projects/electronics/instrument-of-things/
and that code is now here: https://github.com/bankrasrg/colortestkitmeter

I will try to get it working and see how far I get.
If it gets too complicated I guess I will just fall back to simple http control only.

AW

lundmar:

--- Quote from: awallin on February 18, 2018, 08:05:10 am ---
--- Quote from: lundmar on February 17, 2018, 04:45:46 pm ---A LXI compatible instrument supports one of the following protocols for communicating SCPI: RAW/TCP, VXI11/TCP, HiSlip/TCP.

You have to decide which communication protocol to go with for your server implementation and then add to that your SCPI parser.

RAW/TCP offers fast communication but is less robust. It is easy to implement as it is just a standard socket TCP server. There are countless examples available online on how to create socket TCP servers.

VXI11/TCP is robust but slow as it introduces a lot of protocol communication overhead. It is more complicated to implement as it is a protocol based on the aging RPC framework. Both VXI11 client and server stubs are defined by this file: https://github.com/lxi-tools/liblxi/blob/master/src/vxi11core.rpcl and then generated into C code using the rpcgen tool: https://linux.die.net/man/1/rpcgen . General guides on how to implement a RPC(gen) server are available, for example: https://docs.oracle.com/cd/E19683-01/816-1435/rpcgenpguide-21470/index.html . However, the specific VXI11 server stub implementation is largely undocumented AFAIK which makes it harder to implement.

--- End quote ---

Thanks for this explanation. I found this vxi-11 implementation on arduino due:
https://www.bankras.org/projects/electronics/instrument-of-things/
and that code is now here: https://github.com/bankrasrg/colortestkitmeter

I will try to get it working and see how far I get.
If it gets too complicated I guess I will just fall back to simple http control only.

AW

--- End quote ---

Interesting implementation. Though, it's a shame it is GPLv3.

Good luck.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod