README
1
2=== lxi-tools ===
3
4
51. Introduction
6
7 lxi-tools is a collection of open source software tools that enables
8 control of LXI compatible instruments such as modern oscilloscopes, power
9 supplies, spectrum analyzers etc.
10
11 All features are consolidated in the 'lxi' application which provides a
12 simple commandline interface to discover LXI instruments, send SCPI
13 commands, and capture screenshots from supported LXI instruments.
14
15 Also provided is a GUI application which provide some of the features of
16 the commandline tool.
17
18 lxi-tools rely on liblxi for all communication.
19
20
212. Usage
22
232.1 lxi-gui (BETA)
24
25 (See screenshot images/lxi-gui-beta.png)
26
27 The lxi-gui application provides some of the same features as the
28 commandline tool but presents them in a GUI frontend.
29
30
312.2 lxi
32
33 The commandline interface of the lxi application is described in the output
34 from 'lxi --help':
35
36 Usage: lxi [--version] [--help] <command> [<args>]
37
38 -v, --version Display version
39 -h, --help Display help
40
41 Commands:
42 discover [<options>] Search for LXI devices
43 scpi [<options>] <scpi-command> Send SCPI command
44 screenshot [<options>] [<filename>] Capture screenshot
45 benchmark [<options>] Benchmark
46
47 Discover options:
48 -t, --timeout <seconds> Timeout (default: 3)
49 -m, --mdns Search via mDNS/DNS-SD
50
51 Scpi options:
52 -a, --address <ip> Device IP address
53 -p, --port <port> Use port (default: VXI11: 111, RAW: 5025)
54 -t, --timeout <seconds> Timeout (default: 3)
55 -x, --hex Print response in hexadecimal
56 -i, --interactive Enter interactive mode
57 -s, --script <filename> Run script file
58 -r, --raw Use raw/TCP
59
60 Screenshot options:
61 -a, --address <ip> Device IP address
62 -t, --timeout <seconds> Timeout (default: 15)
63 -p, --plugin <name> Use screenshot plugin by name
64 -l, --list List available screenshot plugins
65
66 Benchmark options:
67 -a, --address <ip> Device IP address
68 -p, --port <port> Use port (default: VXI11: 111, RAW: 5025)
69 -t, --timeout <seconds> Timeout (default: 3)
70 -c, --count <count> Number of request messages (default: 100)
71 -r, --raw Use raw/TCP
72
73
742.2.1 Example - Discover LXI devices on available networks
75
76 $ lxi discover
77 Searching for LXI devices - please wait...
78
79 Broadcasting on interface lo
80 Broadcasting on interface eth0
81 Found "RIGOL TECHNOLOGIES,DS1104Z,DS1ZA1234567890,00.04.03.SP2" on address 10.42.1.20
82 Found "RIGOL TECHNOLOGIES,DP831,DP8F1234567890,00.01.14" on address 10.42.1.67
83 Broadcasting on interface wlan0
84
85 Found 2 devices
86
87
882.2.2 Example - Send SCPI command to an instrument
89
90 $ lxi scpi --address 10.42.1.20 "*IDN?"
91 RIGOL TECHNOLOGIES,DS1104Z,DS1ZA1234567890,00.04.03
92
93 To dump response to file simply do:
94
95 $ lxi scpi --address 10.42.1.20 "*IDN?" > response.txt
96
97
982.2.3 Example - Capture screenshot from a Rigol 1000z series oscilloscope:
99
100 $ lxi screenshot --address 10.42.1.20 --plugin rigol-1000z
101 Saved screenshot image to screenshot_10.42.1.20_2017-11-11_13:45:47.png
102
103 Or using plugin autodetection simply:
104
105 $ lxi screenshot --address 10.42.1.20
106 Loaded rigol-1000 screenshot plugin
107 Saved screenshot image to screenshot_10.42.1.20_2017-11-11_13:46:02.png
108
109
1102.2.4 Example - Capture screenshot and convert it to any image format
111
112 By default the format of the captured screenshot image is dictated by which
113 screenshot plugin and instrument are in play. However, it is possible to
114 write the screenshot image to stdout and pipe it directly to other tools for
115 image processing.
116
117 For example, use ImageMagicks convert tool to automatically convert
118 screenshot image to JPG:
119
120 $ lxi screenshot --address 10.42.1.20 - | convert - screenshot.jpg
121
122
1232.2.5 Example - List available screenshot plugins
124
125 $ lxi screenshot --list
126 Name Description
127 keysight-ivx Keysight InfiniVision 2000X/3000X series oscilloscope
128 rigol-1000z Rigol DS/MSO 1000z series oscilloscope
129 rigol-2000 Rigol DS/MSO 2000 series oscilloscope
130 rigol-dg4000 Rigol DG 4000 series function generator
131 rigol-dm3000 Rigol DM 3000 series digital multimeter
132 rigol-dp800 Rigol DP 800 series power supply
133 rigol-dsa Rigol DSA 700/800 series spectrum analyzer
134 rs-hmo1000 Rohde & Schwarz HMO 1000 series oscilloscope (experimental)
135 siglent-sdm3000 Siglent SDM 3000/3000X series digital multimeter
136 siglent-sdg Siglent SDG 1000X/2000X/6000X series waveform generator
137 siglent-sds Siglent SDS 1000X/2000X series oscilloscope
138 siglent-ssa3000x Siglent SSA 3000X series spectrum analyzer
139 tektronix-2000 Tektronix DPO/MSO 2000 series oscilloscope (experimental)
140
141
1422.2.6 Example - Benchmark instrument request/response performance
143
144 $ lxi benchmark --address 10.42.1.20
145 Benchmarking by sending 100 ID requests. Please wait...
146 Result: 24.7 requests/second
147
148
1493. Installation
150
151 The latest release version can be downloaded from https://lxi-tools.github.io
152
1533.1 Installation from release tarball
154
155 Install steps:
156
157 $ ./configure
158 $ make
159 $ make install
160
161 Note: lxi-tools depends on liblxi so you need to go install liblxi first.
162
163
1643.2 Installation using package
165
166 lxi-tools comes prepackaged for various GNU/Linux distributions. Visit
167 https://lxi-tools.github.io to see list of supported distributions.
168
169
1704. Tested instruments
171
172 The commandline lxi tool is tested to work successfully with the following
173 LXI compatible instruments:
174
175 Instrument Working features
176
177 Keysight Technologies AWG 33612A (discover+scpi+screenshot)
178 Keysight Technologies DMM 34461A (discover+scpi+screenshot)
179 Keysight Technologies MSO-X 3024T (discover+scpi+screenshot)
180 Rigol Technologies DG4062 (discover+scpi+screenshot)
181 Rigol Technologies DG4102 (discover+scpi+screenshot)
182 Rigol Technologies DG4162 (discover+scpi+screenshot)
183 Rigol Technologies DP831 (discover+scpi+screenshot)
184 Rigol Technologies DP832 (discover+scpi+screenshot)
185 Rigol Technologies DM3068 (discover+scpi+screenshot)
186 Rigol Technologies DS1104Z (discover+scpi+screenshot)
187 Rigol Technologies DS2302 (discover+scpi+screenshot)
188 Rigol Technologies DSA815 (discover+scpi+screenshot)
189 Rigol Technologies MSO1104Z (discover+scpi+screenshot)
190 Rigol Technologies MSO2302A (discover+scpi+screenshot)
191 Rohde & Schwarz HMC 8012 (discover+scpi+screenshot)
192 Rohde & Schwarz HMC 8043 (discover+scpi+screenshot)
193 Rohde & Schwarz HMO 1202 (discover+scpi+screenshot)
194 Rohde & Schwarz HMO 3054 (scpi+screenshot)
195 Rohde & Schwarz RTB 2004 (discover+scpi+screenshot)
196 Siglent Technologies SDG1032X (discover+scpi+screenshot)
197 Siglent Technologies SDG2122X (discover+scpi+screenshot)
198 Siglent Technologies SDG6052 (discover+scpi+screenshot)
199 Siglent Technologies SDS1202X-E (discover+scpi+screenshot)
200 Siglent Technologies SDS1204X-E (discover+scpi+screenshot)
201 Siglent Technologies SDS2304X (discover+scpi+screenshot)
202 Siglent Technologies SDM3045X (discover+scpi+screenshot)
203 Siglent Technologies SDM3055 (discover+scpi+screenshot)
204 Siglent Technologies SDM3065X (discover+scpi+screenshot)
205 Siglent Technologies SPD3303X-E (scpi)
206 Siglent Technologies SSA3032X (discover+scpi+screenshot)
207
208 Note: Feel free to add your instrument(s) to the list via GitHub pull
209 request or simply create a GitHub issue reporting your instrument(s) and
210 which features work.
211
212
2135. Contributing
214
215 lxi-tools is open source. If you want to help out with the project please
216 join in.
217
218 All contributions (bug reports, code, doc, ideas, etc.) are welcome.
219
220 Please use the github issue tracker and pull request features.
221
222 Also, if you find this free open source software useful please consider
223 making a donation: https://www.paypal.me/lundmar
224
225
2266. Website
227
228 Visit https://lxi-tools.github.io
229
230
2317. License
232
233 This code is released under BSD-3, commonly known as the 3-clause (or
234 "modified") BSD license.
235
236
2378. Authors
238
239 Created by Martin Lund <martin.lund@keep-it-simple.com>
240
241 See the AUTHORS file for full list of authors.
242
243
2449. Sponsors
245
246 A thank you to the following sponsors that have donated test equipment to
247 support the lxi-tools open source effort:
248
249 * KIKUSUI Electronics Corp.
250
251
README.md
1# lxi-tools
2
3[![Build Status](https://travis-ci.org/lxi-tools/lxi-tools.svg?branch=master)](https://travis-ci.org/lxi-tools/lxi-tools)
4[![Snap Status](https://build.snapcraft.io/badge/lxi-tools/lxi-tools.snapcraft.svg)](https://build.snapcraft.io/user/lxi-tools/lxi-tools.snapcraft)
5
6## 1. Introduction
7
8lxi-tools is a collection of open source software tools that enables control of
9LXI compatible instruments such as modern oscilloscopes, power supplies,
10spectrum analyzers etc.
11
12All features are consolidated in the 'lxi' application which provides a simple
13commandline interface to discover LXI instruments, send SCPI commands, and
14capture screenshots from supported LXI instruments.
15
16Also provided is a GUI application which provide some of the features of the
17commandline tool.
18
19lxi-tools rely on liblxi for all communication.
20
21
22## 2. Usage
23
24### 2.1 lxi-gui (BETA)
25
26<p align="center">
27<img src="images/lxi-gui-beta.png">
28</p>
29
30The lxi-gui application provides some of the same features as the commandline
31tool but presents them in a GUI frontend.
32
33### 2.2 lxi
34
35The commandline interface of the lxi application is described in the output
36from 'lxi --help':
37```
38 Usage: lxi [--version] [--help] <command> [<args>]
39
40 -v, --version Display version
41 -h, --help Display help
42
43 Commands:
44 discover [<options>] Search for LXI devices
45 scpi [<options>] <scpi-command> Send SCPI command
46 screenshot [<options>] [<filename>] Capture screenshot
47 benchmark [<options>] Benchmark
48
49 Discover options:
50 -t, --timeout <seconds> Timeout (default: 3)
51 -m, --mdns Search via mDNS/DNS-SD
52
53 Scpi options:
54 -a, --address <ip> Device IP address
55 -p, --port <port> Use port (default: VXI11: 111, RAW: 5025)
56 -t, --timeout <seconds> Timeout (default: 3)
57 -x, --hex Print response in hexadecimal
58 -i, --interactive Enter interactive mode
59 -s, --script <filename> Run script file
60 -r, --raw Use raw/TCP
61
62 Screenshot options:
63 -a, --address <ip> Device IP address
64 -t, --timeout <seconds> Timeout (default: 15)
65 -p, --plugin <name> Use screenshot plugin by name
66 -l, --list List available screenshot plugins
67
68 Benchmark options:
69 -a, --address <ip> Device IP address
70 -p, --port <port> Use port (default: VXI11: 111, RAW: 5025)
71 -t, --timeout <seconds> Timeout (default: 3)
72 -c, --count <count> Number of request messages (default: 100)
73 -r, --raw Use raw/TCP
74```
75
76#### 2.2.1 Example - Discover LXI devices on available networks
77
78```
79 $ lxi discover
80 Searching for LXI devices - please wait...
81
82 Broadcasting on interface lo
83 Broadcasting on interface eth0
84 Found "RIGOL TECHNOLOGIES,DS1104Z,DS1ZA1234567890,00.04.03.SP2" on address 10.42.1.20
85 Found "RIGOL TECHNOLOGIES,DP831,DP8F1234567890,00.01.14" on address 10.42.1.67
86 Broadcasting on interface wlan0
87
88 Found 2 devices
89```
90
91#### 2.2.2 Example - Send SCPI command to an instrument
92
93```
94 $ lxi scpi --address 10.42.1.20 "*IDN?"
95 RIGOL TECHNOLOGIES,DS1104Z,DS1ZA1234567890,00.04.03
96```
97To dump response to file simply do:
98```
99 $ lxi scpi --address 10.42.1.20 "*IDN?" > response.txt
100```
101
102#### 2.2.3 Example - Capture screenshot from a Rigol 1000z series oscilloscope
103
104```
105 $ lxi screenshot --address 10.42.1.20 --plugin rigol-1000z
106 Saved screenshot image to screenshot_10.42.1.20_2017-11-11_13:45:47.png
107```
108
109Or using plugin autodetection simply:
110
111```
112 $ lxi screenshot --address 10.42.1.20
113 Loaded rigol-1000 screenshot plugin
114 Saved screenshot image to screenshot_10.42.1.20_2017-11-11_13:46:02.png
115```
116
117#### 2.2.4 Example - Capture screenshot and convert it to any image format
118
119By default the format of the captured screenshot image is dictated by which
120screenshot plugin and instrument are in play. However, it is possible to write
121the screenshot image to stdout and pipe it directly to other tools for image
122processing.
123
124For example, use ImageMagicks convert tool to automatically convert screenshot
125image to JPG:
126
127```
128 $ lxi screenshot --address 10.42.1.20 - | convert - screenshot.jpg
129```
130
131#### 2.2.5 Example - List available screenshot plugins
132
133```
134 $ lxi screenshot --list
135 Name Description
136 keysight-ivx Keysight InfiniVision 2000X/3000X series oscilloscope
137 rigol-1000z Rigol DS/MSO 1000z series oscilloscope
138 rigol-2000 Rigol DS/MSO 2000 series oscilloscope
139 rigol-dg4000 Rigol DG 4000 series function generator
140 rigol-dm3000 Rigol DM 3000 series digital multimeter
141 rigol-dp800 Rigol DP 800 series power supply
142 rigol-dsa Rigol DSA 700/800 series spectrum analyzer
143 rs-hmo1000 Rohde & Schwarz HMO 1000 series oscilloscope
144 siglent-sdm3000 Siglent SDM 3000/3000X series digital multimeter
145 siglent-sdg Siglent SDG 1000X/2000X/6000X series waveform generator
146 siglent-sds Siglent SDS 1000X/2000X series oscilloscope
147 siglent-ssa3000x Siglent SSA 3000X series spectrum analyzer
148 tektronix-2000 Tektronix DPO/MSO 2000 series oscilloscope (experimental)
149```
150
151#### 2.2.6 Example - Benchmark instrument request/response performance
152
153```
154 $ lxi benchmark --address 10.42.1.20
155 Benchmarking by sending 100 ID requests. Please wait...
156 Result: 24.7 requests/second
157```
158
159## 3. Installation
160
161The latest release version can be downloaded from https://lxi-tools.github.io
162
163### 3.1 Installation using release tarball
164
165Install steps:
166```
167 $ ./configure
168 $ make
169 $ make install
170```
171
172Note: lxi-tools depends on liblxi so you need to go install liblxi first.
173
174### 3.2 Installation using package
175
176lxi-tools comes prepackaged for various GNU/Linux distributions. Visit
177https://lxi-tools.github.io to see list of supported distributions.
178
179## 4. Tested instruments
180
181The commandline lxi tool is tested to work successfully with the following LXI
182compatible instruments:
183
184| Instrument | Working features |
185|-----------------------------------|----------------------------|
186| Keysight Technologies AWG 33612A | (discover+scpi+screenshot) |
187| Keysight Technologies DMM 34461A | (discover+scpi+screenshot) |
188| Keysight Technologies MSO-X 3024T | (discover+scpi+screenshot) |
189| Rigol Technologies DG4062 | (discover+scpi+screenshot) |
190| Rigol Technologies DG4102 | (discover+scpi+screenshot) |
191| Rigol Technologies DG4162 | (discover+scpi+screenshot) |
192| Rigol Technologies DP831 | (discover+scpi+screenshot) |
193| Rigol Technologies DP832 | (discover+scpi+screenshot) |
194| Rigol Technologies DM3068 | (discover+scpi+screenshot) |
195| Rigol Technologies DS1104Z | (discover+scpi+screenshot) |
196| Rigol Technologies DS2302 | (discover+scpi+screenshot) |
197| Rigol Technologies DSA815 | (discover+scpi+screenshot) |
198| Rigol Technologies MSO1104Z | (discover+scpi+screenshot) |
199| Rigol Technologies MSO2302A | (discover+scpi+screenshot) |
200| Rohde & Schwarz HMC 8012 | (discover+scpi+screenshot) |
201| Rohde & Schwarz HMC 8043 | (discover+scpi+screenshot) |
202| Rohde & Schwarz HMO 1202 | (discover+scpi+screenshot) |
203| Rohde & Schwarz HMO 3054 | (scpi+screenshot) |
204| Rohde & Schwarz RTB 2004 | (discover+scpi+screenshot) |
205| Siglent Technologies SDG1032X | (discover+scpi+screenshot) |
206| Siglent Technologies SDG2122X | (discover+scpi+screenshot) |
207| Siglent Technologies SDG6052 | (discover+scpi+screenshot) |
208| Siglent Technologies SDS1202X-E | (discover+scpi+screenshot) |
209| Siglent Technologies SDS1204X-E | (discover+scpi+screenshot) |
210| Siglent Technologies SDS2304X | (discover+scpi+screenshot) |
211| Siglent Technologies SDM3045X | (discover+scpi+screenshot) |
212| Siglent Technologies SDM3055 | (discover+scpi+screenshot) |
213| Siglent Technologies SDM3065X | (discover+scpi+screenshot) |
214| Siglent Technologies SPD3303X-E | (scpi) |
215| Siglent Technologies SSA3032X | (discover+scpi+screenshot) |
216
217Note: Feel free to add your instrument(s) to the list via GitHub pull request
218or simply create a GitHub issue reporting your instrument(s) and which features
219work.
220
221## 5. Contributing
222
223lxi-tools is open source. If you want to help out with the project please join
224in.
225
226All contributions (bug reports, code, doc, ideas, etc.) are welcome.
227
228Please use the github issue tracker and pull request features.
229
230Also, if you find this free open source software useful please consider making
231a donation:
232
233[![Donate](https://www.paypal.com/en_US/i/btn/x-click-but21.gif)](https://www.paypal.me/lundmar)
234
235## 6. Website
236
237Visit https://lxi-tools.github.io
238
239## 7. License
240
241This code is released under BSD-3, commonly known as the 3-clause (or
242"modified") BSD license.
243
244## 8. Authors
245
246Created and maintained by Martin Lund \<martin.lund@keep-it-simple.com>
247
248See the AUTHORS file for full list of authors.
249
250## 9. Sponsors
251
252A thank you to the following sponsors that have donated test equipment to
253support the lxi-tools open source effort:
254
255 * KIKUSUI Electronics Corp.
256
257