Commit Graph

4021 Commits

Author SHA1 Message Date
Stefan Brüns 66836720f7 scpi/usbtmc: fix remote locking according to USBTMC spec
According to USBTMC usb488 subclass spec, wValue hast to be 0 for both
LOCAL_LOCKOUT and GO_TO_LOCAL. At least required for R&S HMO1002, the
bad request results in a STALL. Fixes bug #783.
2016-04-23 17:08:44 +02:00
Diego F. Asanza 3db03efa4a Working trigger on rising and falling edges. 2016-04-23 17:04:18 +02:00
Uwe Hermann 1a7ff3d087 fx2lafw: Only run dslogic_stop_acquisition() on DSLogic. 2016-04-17 15:49:47 +02:00
Diego F. Asanza 40ebad3524 Ensure DSLogic can be stopped.
After acquisition start, DSLogic stores samples in memory, and when done it
sends a USB packet with the trigger position.

This initial fillup can take some time. If the user requests a session stop
in between, the USB transfer is cancelled and the session hangs because it
is not closed properly.

This commit manages this case and closes the session properly when
acquisition is stopped by the user.

Signed-off-by: Diego F. Asanza <f.asanza@gmail.com>
2016-04-17 15:31:58 +02:00
Sergey Alirzaev c04ca4da17 ftdi-la: order the channels properly 2016-04-17 14:54:08 +02:00
Andrew Bradford 4801798f63 udev: Add DSLogic Pro rule
Signed-off-by: Andrew Bradford <andrew.bradford@kodakalaris.com>
2016-04-17 14:53:21 +02:00
Stefan Brüns 851329ca3a contrib: add udev rules for HAMEG HO720/HO730 2016-04-17 14:50:42 +02:00
Stefan Brüns d71ead65ea contrib: add udev rules for R&S HMO1002 in VCP and USBTMC mode 2016-04-17 14:50:42 +02:00
Stefan Brüns d38f4e7a0f scpi/serial: Add USB IDs for R&S HMO 1002 Series 2016-04-17 14:50:42 +02:00
Stefan Brüns 356f64f8c7 hameg-hmo: support triggering on either falling or rising edge
At least the HMO 1002 allows triggering on rising or falling edge, the
corresponding SCPI value is "EITH"

See also bug #740
2016-04-17 14:50:42 +02:00
Stefan Brüns e3abd15d08 hameg-hmo: fix "invalid argument" exception when setting trigger edges
The hameg-hmo driver uses the values from the trigger_slopes array.
2016-04-17 14:50:42 +02:00
Stefan Brüns da1726cc4c hameg-hmo: Add Rohde&Schwarz HMO 1002
Hameg is a R&S measurement instruments subsidiary. The HMO 1002 is an
entry level scope, compatible with the SCPI commands of the larger models.
2016-04-17 14:50:42 +02:00
Uwe Hermann 797f1a0cf3 sanity_check_all_drivers(): Add some code comments. 2016-04-17 14:50:18 +02:00
Uwe Hermann bc48ec3755 gmc-mh-1x-2x: Make two functions static. 2016-04-17 14:24:05 +02:00
Uwe Hermann 3c996d8e23 scpi-pps: Drop unused function prototype. 2016-04-17 14:22:37 +02:00
EJ 116670b15d Fix #786 by checking for opts in the bindings 2016-04-17 09:30:54 +02:00
Wolfram Sang 1f706c21a2 input: vcd: skip BOM at beginning of file
According to the infos I have, VCD files should be plain ASCII, but we
got report of a version adding a UTF8 BOM at the beginning of the file,
so we need to skip it.

This fixes bug #755.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2016-04-13 09:35:03 +02:00
Diego F. Asanza 62974b235a Set DSLogic in logic analyzer mode.
It was being initialized in DSO mode.

Signed-off-by: Diego F. Asanza <f.asanza@gmail.com>
2016-04-13 09:35:03 +02:00
Diego Asanza 3f0ff41284 Fix DSLogic FPGA binary image upload and signal acquisition.
For some reason, uploading the FPGA binary into DSLogic in small chunks
does not work. In this commit, the whole binary image is loaded into memory
and transfer is done in one chunk.

Furthermore, the FPGA configuration structure was not initialized
properly. This was changed with the initialization values taken from the
original DSLogic software.

Signed-off-by: Diego Asanza <f.asanza@gmail.com>
2016-04-13 09:35:02 +02:00
Soeren Apel 600cc1a8a5 Demo: Use 20Vpp as amplitude instead of 50Vpp 2016-04-06 21:11:37 +02:00
Uwe Hermann f9197887e4 ftdi-la: Move ftdi_la_set_samplerate() to protocol.c. 2016-04-03 17:22:05 +02:00
Uwe Hermann f227338297 Rename 'ft2232h' driver to 'ftdi-la'.
The driver already supports more than just the FT2232H chip.
2016-04-02 18:36:52 +02:00
Uwe Hermann dba986ab0a configure.ac: The ft2232h driver also depends on libusb. 2016-03-30 13:38:55 +02:00
Sergey Alirzaev 4f7fdcdd74 ft2232h: Add support for FTDI FT2232H/FT232R chip as LA.
This closes bug #780.
2016-03-30 13:36:02 +02:00
Alexandru Gagniuc 625430bf88 hp-3457a: Implement workaround for double-precision data
Certain output modules do not understand double-precision data.
Although we need double precision to represent the full resolution
of 7.5 digit readings, temporarily convert data to single precision
so that the output modules understand it. While the reasing might be
off by a few counts, we ensure the output modules do not display
completely bogus data.

For details, see bug #779.
2016-03-30 12:50:59 +02:00
Alexandru Gagniuc db23af7fc2 hp-3457a: Implement basic configuration and sampling
KNOWN ISSUES:
- When sampling with 100 NPLC, the poll function will timeout a few
times before the first sample is acquired. Increasing the timeout
passed to sr_scpi_source_add() will cause all the other commands to
be processed slowly, producing a sampling rate of about one sample
every ten seconds.
- Support for plug-in cards (44491A and 44492A) is not implemented.
- Support for AC, AC+DC and four-wire resistance measurements is not
implemented.
- Support for configuring the frequency measurement source is not
implemented.
2016-03-30 12:50:27 +02:00
Alexandru Gagniuc fadb19ac96 hwdriver: Add configuration key for number of powerline cycles
High precision multimeters have a special setting, called "number of
powerline cycles" (NPLC) which determines the integration time of the
ADC in terms of the power line period. Some devices need their NPLC
adjusted from the default value before they can measure at their full
rated precision.
2016-03-30 12:39:25 +02:00
Alexandru Gagniuc 8b0ad3a559 scpi/libgpib: Place device in local mode before closing handle
Devices connected on a real GPIB bus are placed in remote mode when
opening them. libgpib does not automatically place devices back in
local mode when closing the handle. It is thus possible to lock out a
GPIB device by probing it with libsigrok.

This happens on the HP 3457A meter, which does not have a "LOCAL"
command, and must be put back in local mode via GPIB handshake.
ibloc() takes care of this, and it does it on a per-device basis,
such that other devices on the GPIB bus are not affected.
2016-03-30 12:39:20 +02:00
Alexandru Gagniuc daf13c570f scpi/libgpib: Print error string instead of number on errors
libgpib has an error_string which formats a numeric error code into a
human-readable description. Use that instead of printing the numeric
code, as it makes debugging easier.
2016-03-30 12:32:55 +02:00
Alexandru Gagniuc 00b2a092c3 hp-3457a: Initial driver skeleton. 2016-03-30 12:32:55 +02:00
Soeren Apel 0586a0ef59 srzip: Optimize analog output saving
- Don't set capturefile if no logic channels are saved
 - Don't set total probes if no logic channels are saved
 - Save analog channels without index gaps (e.g. probe1/probe4)
2016-03-28 01:06:29 +02:00
Soeren Apel f476dd2d2b Enable loading of session files without total probes defined 2016-03-28 01:06:29 +02:00
Soeren Apel 9cfc695ffe Enable loading of session files without the unit size defined 2016-03-28 01:06:29 +02:00
Soeren Apel 7c69b528e4 Enable loading of session files without the capture file defined 2016-03-28 01:06:28 +02:00
Soeren Apel e5b280e4c7 analog save: Avoid index duplication between analog & logic channels. 2016-03-24 08:55:42 +01:00
Soeren Apel 1393bccfcb input/raw_analog: Prevent "duplicate const decl specifier" warning
Warnings emitted by gcc before this patch:
src/input/raw_analog.c:51:13: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
        const char const *fmt_name;
                   ^
src/input/raw_analog.c:55:35: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
static const struct sample_format const sample_formats[] =
                                  ^
2016-03-22 08:29:25 +01:00
Soeren Apel d9d57ceb28 Bindings: Update create_analog_packet() to the new analog format 2016-03-22 08:25:08 +01:00
Uwe Hermann 74a9c0adc0 output/srzip: Minor whitespace fixes. 2016-03-15 18:40:50 +01:00
Martin Ling 2dc4081540 session_driver: Process analog chunks into analog packets. 2016-03-14 00:34:09 +01:00
Martin Ling 906921bad2 session_driver: Read analog chunks from file. 2016-03-14 00:34:09 +01:00
Martin Ling b317d1bbfb sr_session_load(): Create analog channels from loaded file. 2016-03-14 00:34:09 +01:00
Martin Ling 26918dced0 srzip: Renumber analog channels from zero in output file. 2016-03-14 00:34:09 +01:00
Martin Ling 7163dcbe18 srzip: Save analog data. 2016-03-14 00:34:09 +01:00
Martin Ling eab052996c srzip: Store total number of analog channels. 2016-03-14 00:34:09 +01:00
Martin Ling 828832194f srzip: Count only logic channels in "total probes". 2016-03-14 00:34:09 +01:00
Uwe Hermann 8ccf5ceb17 udev rules file: Add entry for Hantek 6022BE. 2016-03-13 23:33:56 +01:00
Uwe Hermann c940b7a32f hantek-6xxx: libusb_get_device_descriptor() cannot fail. 2016-03-13 23:33:56 +01:00
Chriter f2a66a8ee6 hantek-6xxx: Initial driver implementation.
Note: This commit is based on the initial implementation by
Christer Ekholm (but stashed into one commit), with some adaptations
(forward porting, coding style and consistency fixes) by Uwe Hermann.
2016-03-13 23:33:56 +01:00
Chriter 6c6bc80a99 hantek-6xxx: Initial driver skeleton. 2016-03-09 19:20:13 +01:00
Uwe Hermann 5af975b587 maynuo-m97: Fix a typo in an error message. 2016-03-05 18:51:39 +01:00