Janne Huttunen [Mon, 20 Oct 2014 20:03:20 +0000 (23:03 +0300)]
Export LCR meter 'auto' bits as config keys instead of mqflags.
The automatic selections of the measured quantity and equivalent circuit
model are more part of the configuration of the meter than attributes
of the measurement result. To reflect this, model them as config keys
instead of mqflags. This allows a driver that supports remote control to
implement 'set' method for them and has the additional benefit of saveing
two flag bits.
Bert Vermeulen [Sat, 18 Oct 2014 21:12:56 +0000 (23:12 +0200)]
scpi-pps: Add channel probe facility to scan.
If the number and specs of the device's channels are not static, i.e.
need to be probed, this facility is needed.
Initially this will be used for the Philips PM2800 series, where only
the model returned by *IDN? is needed. However this could also be used
to do actual discovery with vendor-specific SCPI commands.
Janne Huttunen [Mon, 13 Oct 2014 15:51:32 +0000 (18:51 +0300)]
Allow building libsigrok without libserialport.
Since the DER EE DE-5000 driver is currently the only user of
the es51919 module and it depends on the libserialport, compile
the module only if the DER EE DE-5000 driver is enabled. This
allows libsigrok to be built without libserialport again.
Bert Vermeulen [Thu, 16 Oct 2014 13:24:27 +0000 (15:24 +0200)]
scpi-pps: Disable beeper during session.
At least the Rigol DP800 series trigger the beeper when changing
channels remotely. Which gets rather annoying when doing acquisition
on three channels as fast as you can.
Janne Huttunen [Sat, 11 Oct 2014 12:47:35 +0000 (15:47 +0300)]
Add driver for DER EE DE-5000 LCR meter.
Add a driver for the DER EE DE-5000 LCR meter. This meter is based on
the Cyrustek ES51919/ES51920 chipset and communicates with the host
computer via an optional connectivity kit.
The kit uses an optoisolated unidirectional link to connect to the
meter and an USB cable on the host side. Internally the connection is
using the FTDI FT232R USB UART chip i.e. from the host computer point
of view the meter is connected into an RS-232 serial port.
This driver implements just a thin shim layer for registering the
driver and uses the es51919 module for all the actual work.
Janne Huttunen [Sat, 11 Oct 2014 12:47:34 +0000 (15:47 +0300)]
Add protocol decoder for Cyrustek ES51919 LCR meter chip.
Add a protocol decoder for the Cyrustek ES51919 LCR meter chip.
This chipset (together with ES51920 front-end) is supposedly used
by multiple different portable LCR meters including at least
DER EE DE-5000, Yihua V&A VA520, Mastech MS5308, Uni-T UT612,
CEM DT-9935 and various OEM rebadges of them.
The communication protocol seems to be implemented on the Cyrustek
chip itself so all the different models are expected to use the
same protocol if they implement a host connection. Unfortunately
the protocol is not available in the public documentation of the
chipset, so this implementation is based on reverse engineering it
from traffic captures.
The actual connection between the meter and the host computer may be
different from meter to meter even when based on the same chip. This
module implements a decoder for the protocol and some common helper
functions for interfacing with the meter via an RS-232 serial port.
Janne Huttunen [Sat, 11 Oct 2014 12:47:30 +0000 (15:47 +0300)]
Add two new 'auto' flags.
Add flags for indicating that the meter has selected the measured
quantitiy and/or the used measurement model automatically. These
are similar to the existing auto-range flag.
Janne Huttunen [Sat, 11 Oct 2014 12:47:29 +0000 (15:47 +0300)]
Add quantity and flag for difference measurements.
Add 'SR_MQ_DIFFERENCE' quantity for reporting relative difference
between the current measurement and the reference value. The value
of this quantity will normally be reported in percents. Add also
the flag 'SR_MQFLAG_REFERENCE' for indicating that the reported
value is not the current measurement but the reference value instead.
Janne Huttunen [Sat, 11 Oct 2014 12:47:28 +0000 (15:47 +0300)]
Add measured quantities for LCR meters.
Add parallel and serial model inductance, capacitance and resistance
for LCR meter measurements. Add also secondary quantities many LCR
meters calculate, namely dissipation factor, quality factor and phase
angle.
Janne Huttunen [Sat, 11 Oct 2014 12:47:27 +0000 (15:47 +0300)]
Add two new units.
Add degrees and henrys to the list of supported units. Degree is
an unit of plane angle where one degree is 1/360th of a full circle.
Henry is the SI unit of inductance.
bindings: Better error handling in enumeration get() function.
Prior to this patch a call to get() with an invalid enumeration value
would raise an exception that would, for example, terminate the python
interpreter, whereas now the exception is handled and translated into a
proper python exception.
Bert Vermeulen [Mon, 6 Oct 2014 10:10:25 +0000 (12:10 +0200)]
serial: Add serial_timeout().
This calculates a proper timeout value for blocking writes on the
given serial port, for the given number of bytes. Timeout is based
on a fixed 10ms OS overhead, baud rate, data bits and stop bits.
Martin Ling [Sun, 28 Sep 2014 12:05:33 +0000 (13:05 +0100)]
Add a timeout parameter to blocking serial calls.
Set this new parameter to 0 (no timeout) at every call site. This is
consistent with previous behaviour, so cannot cause any regressions.
Waiting forever for a serial operation is clearly always wrong. Without
specific knowledge of each device and driver however, I can't choose
appropriate timeouts for each call. The maintainers of these drivers
will need to do so, and also add appropriate handling of timeouts.
When this commit is merged, a bug should be entered for each driver
that is touched by it.