elektronik:lcr_meter_applent_at826
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
elektronik:lcr_meter_applent_at826 [2016/05/15 19:38] – [PC Software] gpipperr | elektronik:lcr_meter_applent_at826 [2018/10/23 20:06] (aktuell) – gpipperr | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
=====Erste Erfahrungen mit dem LCR Meter Applent AT826===== | =====Erste Erfahrungen mit dem LCR Meter Applent AT826===== | ||
+ | **2016/ | ||
Nach längeres Suche nach einen LCR Meter habe ich mich zu Schluss zum Wagnis entschieden ein Gerät aus CN von einer eher unbekannten Firma, [[http:// | Nach längeres Suche nach einen LCR Meter habe ich mich zu Schluss zum Wagnis entschieden ein Gerät aus CN von einer eher unbekannten Firma, [[http:// | ||
Zeile 104: | Zeile 105: | ||
- | === Selber | + | ====Ein HDI Device mit Python |
Zeile 117: | Zeile 118: | ||
| | ||
</ | </ | ||
+ | |||
Abfragen ob das Gerät erkannt werden kann: | Abfragen ob das Gerät erkannt werden kann: | ||
- | <code python> | + | <code python |
import pywinusb.hid as hid | import pywinusb.hid as hid | ||
import sys | import sys | ||
+ | # --------------------------------------------------------- | ||
# Print the data | # Print the data | ||
def readRX_handler(data): | def readRX_handler(data): | ||
Zeile 130: | Zeile 134: | ||
print(" | print(" | ||
+ | # --------------------------------------------------------- | ||
# Get the data from the LCR MEter | # Get the data from the LCR MEter | ||
def getAT826(at826_vendor_id): | def getAT826(at826_vendor_id): | ||
+ | | ||
# Find the AT826 devices of the vendor id | # Find the AT826 devices of the vendor id | ||
all_devices = hid.HidDeviceFilter(vendor_id=at826_vendor_id).get_devices() | all_devices = hid.HidDeviceFilter(vendor_id=at826_vendor_id).get_devices() | ||
Zeile 139: | Zeile 144: | ||
print(" | print(" | ||
else: | else: | ||
+ | | ||
# search for the AT826 | # search for the AT826 | ||
# Open | # Open | ||
Zeile 185: | Zeile 191: | ||
# print(len(out_buffer)) | # print(len(out_buffer)) | ||
# print(out_buffer) | # print(out_buffer) | ||
- | # must be 1 | + | # May be must be 1 ?? to trigger the send process of the api??? |
+ | | ||
out_buffer[0] = 0x00 | out_buffer[0] = 0x00 | ||
out_buffer[1] = 0x00 | out_buffer[1] = 0x00 | ||
out_buffer[2] = 0x00 | out_buffer[2] = 0x00 | ||
out_buffer[3] = 0x40 | out_buffer[3] = 0x40 | ||
+ | | ||
+ | #get the Device information | ||
out_buffer[4] = ord(' | out_buffer[4] = ord(' | ||
Zeile 236: | Zeile 245: | ||
print(' | print(' | ||
at826device.close() | at826device.close() | ||
+ | |||
+ | # --------------------------------------------------------- | ||
# list all devices on the maschine for the HID USB Interface | # list all devices on the maschine for the HID USB Interface | ||
def showAllHDIDef(): | def showAllHDIDef(): | ||
Zeile 247: | Zeile 258: | ||
if __name__ == ' | if __name__ == ' | ||
+ | # Debug, get all informations about all devices | ||
# if sys.version_info < (3,): | # if sys.version_info < (3,): | ||
# | # | ||
- | # | + | # |
# | # | ||
# else: | # else: | ||
Zeile 258: | Zeile 270: | ||
# except UnicodeEncodeError: | # except UnicodeEncodeError: | ||
# | # | ||
- | # | + | # |
- | # Vendor ID of the device | + | |
+ | # Vendor ID of the device | ||
at826_vendor_id = 0x0825 | at826_vendor_id = 0x0825 | ||
- | # at826_vendor_id = 0x1244 | + | |
- | # at826_vendor_id =0x046d | + | |
# Read all devices | # Read all devices | ||
showAllHDIDef() | showAllHDIDef() | ||
+ | | ||
# Get the LCR | # Get the LCR | ||
getAT826(at826_vendor_id) | getAT826(at826_vendor_id) | ||
Zeile 271: | Zeile 284: | ||
</ | </ | ||
- | Der LCR Meter wird erkannt, Packet zum Senden wie im Handbuch beschrieben aufgebaut, im nächsten Schritt müssen | + | Der LCR Meter wird erkannt. |
+ | |||
+ | Packet zum Senden wie im Handbuch beschrieben aufgebaut | ||
+ | |||
+ | Im nächsten Schritt müssen | ||
demnächst mehr ... | demnächst mehr ... | ||
+ | |||
Um zu testen ob es einfach funktioniert mit diesem Beispiel arbeiten: https:// | Um zu testen ob es einfach funktioniert mit diesem Beispiel arbeiten: https:// | ||
- | Mit meinen Multimeter BXM240 ( bzw. [[http:// | + | Mit meinen Multimeter BXM240 ( bzw. [[http:// |
+ | |||
+ | |||
+ | ---- | ||
=== Stoffsammlung zu HID === | === Stoffsammlung zu HID === | ||
Zeile 312: | Zeile 334: | ||
* http:// | * http:// | ||
+ | |||
+ | |||
+ | Neu: | ||
+ | https:// | ||
+ | http:// | ||
---- | ---- |
elektronik/lcr_meter_applent_at826.txt · Zuletzt geändert: 2018/10/23 20:06 von gpipperr