Hi @Tverc2
I recommend making sure that the server is working well on your machine, first. Start by git pull
the latest from pyjoulescope_server. Connect a Joulescope to your machine. Open two terminals. In the first, type:
cd {path/to/pyjoulescope_server}}
python -m joulescope_server server
In the second, type:
cd {path/to/pyjoulescope_server}}
python -m joulescope_server client
Here is what I see in the first:
c:\repos\Jetperch\pyjoulescope_server>python -m joulescope_server server
Serving on ('127.0.0.1', 23423)
INFO:2021-09-22 12:29:38,780:win32_device_notify.py:80:joulescope.usb.winusb.win32_device_notify:open
INFO:2021-09-22 12:29:48,987:server.py:350:joulescope_server.server:ClientManager.run start
INFO:2021-09-22 12:29:48,987:server.py:232:joulescope_server.server:_async_task start
INFO:2021-09-22 12:29:48,990:driver.py:1393:joulescope.driver:scan_for_changes 1 devices: 1 added, 0 removed
INFO:2021-09-22 12:29:48,990:device_thread.py:208:joulescope.usb.device_thread:close
INFO:2021-09-22 12:29:48,991:device_thread.py:139:joulescope.usb.device_thread:DeviceThread.post(close) when thread not running
INFO:2021-09-22 12:29:48,991:device_thread.py:197:joulescope.usb.device_thread:open
INFO:2021-09-22 12:29:48,991:device_thread.py:125:joulescope.usb.device_thread:DeviceThread.run start
INFO:2021-09-22 12:29:48,991:device.py:697:joulescope.usb.winusb.device:WinUsbDevice.close
INFO:2021-09-22 12:29:48,991:device.py:653:joulescope.usb.winusb.device:WinUsbDevice.open
INFO:2021-09-22 12:29:48,991:device.py:682:joulescope.usb.winusb.device:is_high_speed = True
INFO:2021-09-22 12:29:48,991:device.py:683:joulescope.usb.winusb.device:interface_settings = InterfaceDescriptor(
length=9,
descriptor_type=4,
interface_number=0,
alternate_setting=0,
num_endpoints=2,
interface_class=255,
interface_sub_class=0,
interface_protocol=0,
interface=0)
INFO:2021-09-22 12:29:48,991:driver.py:525:joulescope.driver:Create StreamBuffer
INFO:2021-09-22 12:29:49,103:driver.py:556:joulescope.driver:info:
{
"type": "info",
"ver": 1,
"ctl": {
"mfg": {
"country": "USA",
"location": "MD_01",
"lot": "201927_00"
},
"hw": {
"rev": "H",
"sn_mcu": "E10230201E078CAAADDCD9854091005F",
"sn_mfg": "000147"
},
"fw": {
"ver": "1.3.2"
},
"fpga": {
"ver": "0.2.0",
"prod_id": "0x9314acf2"
}
},
"sensor": {
"fw": {
"ver": "1.3.2"
},
"fpga": {
"ver": "1.2.1"
}
}
}
INFO:2021-09-22 12:29:49,103:driver.py:503:joulescope.driver:serial number = 1e200302e170c8aadacd9d58041900f5
INFO:2021-09-22 12:29:49,162:device.py:776:joulescope.usb.winusb.device:read_stream_start 2
INFO:2021-09-22 12:29:49,162:device.py:406:joulescope.usb.winusb.device:endpoint start 0x82 transfer size = 131072 bytes
INFO:2021-09-22 12:29:50,188:server.py:258:joulescope_server.server:_statistics_fn Joulescope:000147
INFO:2021-09-22 12:29:50,688:server.py:258:joulescope_server.server:_statistics_fn Joulescope:000147
INFO:2021-09-22 12:29:51,188:server.py:258:joulescope_server.server:_statistics_fn Joulescope:000147
INFO:2021-09-22 12:29:51,688:server.py:258:joulescope_server.server:_statistics_fn Joulescope:000147
INFO:2021-09-22 12:29:52,158:driver.py:880:joulescope.driver:stop : streaming=True
INFO:2021-09-22 12:29:52,158:device.py:789:joulescope.usb.winusb.device:read_stream_stop 2
INFO:2021-09-22 12:29:52,159:device.py:415:joulescope.usb.winusb.device:endpoint stop
INFO:2021-09-22 12:29:52,159:driver.py:810:joulescope.driver:streaming done(0, )
INFO:2021-09-22 12:29:52,159:server.py:314:joulescope_server.server:_stop_fn Joulescope:000147
INFO:2021-09-22 12:29:52,185:driver.py:880:joulescope.driver:stop : streaming=False
INFO:2021-09-22 12:29:52,185:device_thread.py:208:joulescope.usb.device_thread:close
INFO:2021-09-22 12:29:52,185:device.py:697:joulescope.usb.winusb.device:WinUsbDevice.close
INFO:2021-09-22 12:29:52,185:device_thread.py:102:joulescope.usb.device_thread:DeviceThread._cmd_process_all close
INFO:2021-09-22 12:29:52,185:device_thread.py:132:joulescope.usb.device_thread:DeviceThread.run flush
INFO:2021-09-22 12:29:52,186:device_thread.py:134:joulescope.usb.device_thread:DeviceThread.run done
INFO:2021-09-22 12:29:52,186:server.py:373:joulescope_server.server:Client closed socket
INFO:2021-09-22 12:29:52,187:server.py:249:joulescope_server.server:_async_task done
INFO:2021-09-22 12:29:52,187:server.py:382:joulescope_server.server:ClientManager.run done
and the second:
c:\repos\Jetperch\pyjoulescope_server>python -m joulescope_server client
INFO:2021-09-22 12:29:48,987:client.py:73:joulescope_server.client:req: {'id': 0, 'type': 'hello', 'phase': 'req'}
INFO:2021-09-22 12:29:48,987:client.py:84:joulescope_server.client:rsp: {'id': 0, 'type': 'hello', 'phase': 'rsp', 'status': 200, 'status_msg': 'Success', 'data': {'protocol_version': 1, 'server_version': '0.1.1', 'joulescope_version': '0.9.7'}}
INFO:2021-09-22 12:29:48,987:client.py:73:joulescope_server.client:req: {'id': 1, 'type': 'scan', 'phase': 'req', 'config': 'auto'}
INFO:2021-09-22 12:29:48,990:client.py:84:joulescope_server.client:rsp: {'id': 1, 'type': 'scan', 'phase': 'rsp', 'config': 'auto', 'status': 200, 'status_msg': 'Success', 'data': ['Joulescope:000147']}
INFO:2021-09-22 12:29:48,990:client.py:73:joulescope_server.client:req: {'id': 2, 'type': 'open', 'phase': 'req', 'device': 'Joulescope:000147'}
INFO:2021-09-22 12:29:49,155:client.py:84:joulescope_server.client:rsp: {'id': 2, 'type': 'open', 'phase': 'rsp', 'device': 'Joulescope:000147', 'status': 200, 'status_msg': 'Success'}
INFO:2021-09-22 12:29:49,156:client.py:73:joulescope_server.client:req: {'id': 3, 'type': 'parameters', 'phase': 'req', 'device': 'Joulescope:000147'}
INFO:2021-09-22 12:29:49,157:client.py:84:joulescope_server.client:rsp: {'id': 3, 'type': 'parameters', 'phase': 'rsp', 'device': 'Joulescope:000147', 'status': 200, 'status_msg': 'Success', 'data': {'sensor_power': {'name': 'sensor_power', 'default': 'on', 'path': 'setting', 'options': [['off', 0, []], ['on', 1, []]], 'units': None, 'brief': 'Force the sensor power on or off.', 'detail': 'Altering this parameter during operation may cause errors.', 'flags': ['developer']}, 'source': {'name': 'source', 'default': 'off', 'path': 'setting', 'options': [['off', 0, []], ['raw', 192, ['on']], ['pattern_usb', 9, []], ['pattern_control', 10, []], ['pattern_sensor', 175, []]], 'units': None, 'brief': 'Select the streaming data source.', 'detail': None, 'flags': ['developer']}, 'i_range': {'name': 'i_range', 'default': 'off', 'path': 'setting', 'options': [['auto', 128, ['on']], ['10 A', 1, ['0', 0]], ['2 A', 2, ['1', 1]], ['180 mA', 4, ['2', 2]], ['18 mA', 8, ['3', 3]], ['1.8 mA', 16, ['4', 4]], ['180 µA', 32, ['5', 5]], ['18 µA', 64, ['6', 6]], ['off', 0, []]], 'units': None, 'brief': 'Select the current measurement range (shunt resistor)', 'detail': None, 'flags': []}, 'v_range': {'name': 'v_range', 'default': '15V', 'path': 'setting', 'options': [['15V', 0, ['low', 0]], ['5V', 1, ['high', 1]]], 'units': None, 'brief': 'Select the voltage measurement range (gain)', 'detail': None, 'flags': []}, 'ovr_to_lsb': {'name': 'ovr_to_lsb', 'default': 'off', 'path': 'setting', 'options': [['off', 0, []], ['on', 1, []]], 'units': None, 'brief': 'Map overflow flags to the LSBs', 'detail': None, 'flags': ['developer']}, 'trigger_source': {'name': 'trigger_source', 'default': 'auto', 'path': 'extio', 'options': [['auto', 0, []], ['gpi0', 2, []], ['gpi1', 3, []]], 'units': None, 'brief': 'Select the trigger source', 'detail': None, 'flags': ['hidden']}, 'io_voltage': {'name': 'io_voltage', 'default': '3.3V', 'path': 'extio', 'options': [['1.8V', 1800, []], ['2.1V', 2100, []], ['2.5V', 2500, []], ['2.7V', 2700, []], ['3.0V', 3000, []], ['3.3V', 3300, []], ['3.6V', 3600, []], ['5.0V', 5000, []]], 'units': None, 'brief': 'The GPI/O high-level voltage.', 'detail': None, 'flags': []}, 'gpo0': {'name': 'gpo0', 'default': '0', 'path': 'extio', 'options': [['0', 0, [0]], ['1', 1, [1]]], 'units': None, 'brief': 'The GPO bit 0 output value.', 'detail': None, 'flags': []}, 'gpo1': {'name': 'gpo1', 'default': '0', 'path': 'extio', 'options': [['0', 0, [0]], ['1', 1, [1]]], 'units': None, 'brief': 'The GPO bit 1 output value.', 'detail': None, 'flags': []}, 'current_lsb': {'name': 'current_lsb', 'default': 'normal', 'path': 'extio', 'options': [['normal', 0, []], ['gpi0', 2, []], ['gpi1', 3, []]], 'units': None, 'brief': 'The current signal least-significant bit mapping.', 'detail': None, 'flags': []}, 'voltage_lsb': {'name': 'voltage_lsb', 'default': 'normal', 'path': 'extio', 'options': [['normal', 0, []], ['gpi0', 2, []], ['gpi1', 3, []]], 'units': None, 'brief': 'The voltage signal least-significant bit mapping.', 'detail': None, 'flags': []}, 'control_test_mode': {'name': 'control_test_mode', 'default': 'normal', 'path': 'setting', 'options': [['normal', 3, []], ['usb', 129, []], ['fpga', 130, []], ['both', 131, []]], 'units': None, 'brief': 'Set the test mode', 'detail': None, 'flags': ['developer']}, 'transfer_length': {'name': 'transfer_length', 'default': '256', 'path': 'setting', 'options': [['1', 1, []], ['2', 2, []], ['4', 4, []], ['8', 8, []], ['16', 16, []], ['32', 32, []], ['64', 64, []], ['128', 128, []], ['256', 256, []]], 'units': 'packets', 'brief': 'Set the USB transfer length in packets', 'detail': None, 'flags': ['developer', 'skip_update']}, 'transfer_outstanding': {'name': 'transfer_outstanding', 'default': '8', 'path': 'setting', 'options': [['1', 1, []], ['2', 2, []], ['4', 4, []], ['8', 8, []]], 'units': None, 'brief': 'Set the maximum number of USB transfers issued simultaneously', 'detail': None, 'flags': ['developer', 'skip_update']}, 'current_ranging': {'name': 'current_ranging', 'default': None, 'path': 'current_ranging', 'options': [], 'units': None, 'brief': None, 'detail': None, 'flags': ['hidden']}, 'current_ranging_type': {'name': 'current_ranging_type', 'default': 'interp', 'path': 'current_ranging', 'options': [['off', 'off', []], ['mean', 'mean', []], ['interp', 'interp', ['interpolate']], ['NaN', 'nan', ['nan']]], 'units': None, 'brief': 'The filter type.', 'detail': None, 'flags': []}, 'current_ranging_samples_pre': {'name': 'current_ranging_samples_pre', 'default': '1', 'path': 'current_ranging', 'options': [['0', 0, [0]], ['1', 1, [1]], ['2', 2, [2]], ['3', 3, [3]], ['4', 4, [4]], ['5', 5, [5]], ['6', 6, [6]], ['7', 7, [7]], ['8', 8, [8]]], 'units': None, 'brief': 'The number of samples before the range switch to include.', 'detail': 'Only valid for type "mean" - ignored for "off", "interp", and "NaN".', 'flags': []}, 'current_ranging_samples_window': {'name': 'current_ranging_samples_window', 'default': 'n', 'path': 'current_ranging', 'options': [['m', 'm', []], ['n', 'n', []], ['0', 0, [0]], ['1', 1, [1]], ['2', 2, [2]], ['3', 3, [3]], ['4', 4, [4]], ['5', 5, [5]], ['6', 6, [6]], ['7', 7, [7]], ['8', 8, [8]], ['9', 9, [9]], ['10', 10, [10]], ['11', 11, [11]], ['12', 12, [12]]], 'units': None, 'brief': 'The number of samples to adjust.', 'detail': 'Use "n" for automatic duration based upon known response time. Use "m" for shorter automatic duration that may result in min/max distortion.', 'flags': []}, 'current_ranging_samples_post': {'name': 'current_ranging_samples_post', 'default': '1', 'path': 'current_ranging', 'options': [['0', 0, [0]], ['1', 1, [1]], ['2', 2, [2]], ['3', 3, [3]], ['4', 4, [4]], ['5', 5, [5]], ['6', 6, [6]], ['7', 7, [7]], ['8', 8, [8]]], 'units': None, 'brief': 'The number of samples after the range switch to include.', 'detail': 'Only valid for type "mean" - ignored for "off", "interp", and "NaN".', 'flags': []}, 'buffer_duration': {'name': 'buffer_duration', 'default': '30 seconds', 'path': 'setting', 'options': [['15 seconds', 15, [15]], ['30 seconds', 30, [30]], ['1 minute', 60, [60]], ['2 minutes', 120, [120]], ['5 minutes', 300, [300]], ['10 minutes', 600, [600]], ['20 minutes', 1200, [1200]], ['1 hour', 3600, [3600]], ['2 hours', 7200, [7200]], ['5 hours', 18000, [18000]], ['10 hours', 36000, [36000]], ['1 day', 86400, [86400]]], 'units': 'seconds', 'brief': 'The amount of sample data to store in memory.', 'detail': 'Use care when setting this value. The software requires 1.5 GB of RAM for every 60 seconds at the full 2 MSPS rate.', 'flags': ['skip_update']}, 'reduction_frequency': {'name': 'reduction_frequency', 'default': '2 Hz', 'path': 'setting', 'options': [['100 Hz', 100, [100]], ['50 Hz', 50, [50]], ['20 Hz', 20, [20]], ['10 Hz', 10, [10]], ['5 Hz', 5, [5]], ['2 Hz', 2, [2]], ['1 Hz', 1, [1]]], 'units': 'Hz', 'brief': 'The rate that the device produces statistics, including multimeter values.', 'detail': None, 'flags': ['skip_update']}, 'sampling_frequency': {'name': 'sampling_frequency', 'default': '2 MHz', 'path': 'setting', 'options': [['2 MHz', 2000000, [2000000, 'auto', None, 'default']], ['1 MHz', 1000000, [1000000]], ['500 kHz', 500000, [500000]], ['200 kHz', 200000, [200000]], ['100 kHz', 100000, [100000]], ['50 kHz', 50000, [50000]], ['20 kHz', 20000, [20000]], ['10 kHz', 10000, [10000]], ['5 kHz', 5000, [5000]], ['2 kHz', 2000, [2000]], ['1 kHz', 1000, [1000]], ['500 Hz', 500, [500]], ['200 Hz', 200, [200]], ['100 Hz', 100, [100]], ['50 Hz', 50, [50]], ['20 Hz', 20, [20]], ['10 Hz', 10, [10]]], 'units': 'Hz', 'brief': 'The rate that the device produces samples.', 'detail': None, 'flags': ['skip_update']}, 'model': {'name': 'model', 'default': None, 'path': 'info', 'options': [], 'units': None, 'brief': None, 'detail': None, 'flags': ['read_only', 'hidden']}, 'device_serial_number': {'name': 'device_serial_number', 'default': None, 'path': 'info', 'options': [], 'units': None, 'brief': None, 'detail': None, 'flags': ['read_only', 'hidden']}, 'hardware_serial_number': {'name': 'hardware_serial_number', 'default': None, 'path': 'info', 'options': [], 'units': None, 'brief': None, 'detail': None, 'flags': ['read_only', 'hidden']}}}
INFO:2021-09-22 12:29:49,158:client.py:73:joulescope_server.client:req: {'id': 4, 'type': 'info', 'phase': 'req', 'device': 'Joulescope:000147'}
INFO:2021-09-22 12:29:49,160:client.py:84:joulescope_server.client:rsp: {'id': 4, 'type': 'info', 'phase': 'rsp', 'device': 'Joulescope:000147', 'status': 200, 'status_msg': 'Success', 'data': {'type': 'info', 'ver': 1, 'ctl': {'mfg': {'country': 'USA', 'location': 'MD_01', 'lot': '201927_00'}, 'hw': {'rev': 'H', 'sn_mcu': 'E10230201E078CAAADDCD9854091005F', 'sn_mfg': '000147'}, 'fw': {'ver': '1.3.2'}, 'fpga': {'ver': '0.2.0', 'prod_id': '0x9314acf2'}}, 'sensor': {'fw': {'ver': '1.3.2'}, 'fpga': {'ver': '1.2.1'}}}}
INFO:2021-09-22 12:29:49,160:client.py:73:joulescope_server.client:req: {'id': 5, 'type': 'parameter_get', 'phase': 'req', 'device': 'Joulescope:000147', 'data': {'name': 'i_range'}}
INFO:2021-09-22 12:29:49,161:client.py:84:joulescope_server.client:rsp: {'id': 5, 'type': 'parameter_get', 'phase': 'rsp', 'device': 'Joulescope:000147', 'data': 'auto', 'status': 200, 'status_msg': 'Success'}
INFO:2021-09-22 12:29:49,161:client.py:73:joulescope_server.client:req: {'id': 6, 'type': 'parameter_set', 'phase': 'req', 'device': 'Joulescope:000147', 'data': {'name': 'i_range', 'value': 'auto'}}
INFO:2021-09-22 12:29:49,161:client.py:84:joulescope_server.client:rsp: {'id': 6, 'type': 'parameter_set', 'phase': 'rsp', 'device': 'Joulescope:000147', 'data': {'name': 'i_range', 'value': 'auto'}, 'status': 200, 'status_msg': 'Success'}
INFO:2021-09-22 12:29:49,161:client.py:73:joulescope_server.client:req: {'id': 7, 'type': 'start', 'phase': 'req', 'device': 'Joulescope:000147', 'data': {'fields': ['current', 'voltage']}}
INFO:2021-09-22 12:29:49,163:client.py:84:joulescope_server.client:rsp: {'id': 7, 'type': 'start', 'phase': 'rsp', 'device': 'Joulescope:000147', 'data': True, 'status': 200, 'status_msg': 'Success'}
current: 32256
voltage: 32256
current: 32256
voltage: 32256
...
current: 32256
voltage: 32256
INFO:2021-09-22 12:29:50,190:client.py:59:joulescope_server.client:async: {'type': 'statistics', 'phase': 'async', 'device': 'Joulescope:000147', 'data': {'time': {'range': {'value': [0.5, 1.0], 'units': 's'}, 'delta': {'value': 0.5, 'units': 's'}, 'samples': {'value': 1000000, 'units': 'samples'}, 'sample_range': {'value': [1000000, 2000000], 'units': 'input_samples'}}, 'signals': {'current': {'µ': {'value': -2.3213177639670936e-09, 'units': 'A'}, 'σ2': {'value': 7.45609253180676e-16, 'units': 'A'}, 'min': {'value': -1.0497814173504594e-07, 'units': 'A'}, 'max': {'value': 8.99615457683467e-08, 'units': 'A'}, 'p2p': {'value': 1.9493968750339263e-07, 'units': 'A'}, '∫': {'value': -1.1606588819835468e-09, 'units': 'C'}}, 'voltage': {'µ': {'value': -0.0009271737867749834, 'units': 'V'}, 'σ2': {'value': 1.8944171830659998e-05, 'units': 'V'}, 'min': {'value': -0.01124096941202879, 'units': 'V'}, 'max': {'value': 0.00918980035930872, 'units': 'V'}, 'p2p': {'value': 0.02043076977133751, 'units': 'V'}}, 'power': {'µ': {'value': 9.36213822781648e-12, 'units': 'W'}, 'σ2': {'value': 1.2505675908742891e-20, 'units': 'W'}, 'min': {'value': -7.121401801590821e-10, 'units': 'W'}, 'max': {'value': 7.803207524581524e-10, 'units': 'W'}, 'p2p': {'value': 1.4924609326172344e-09, 'units': 'W'}, '∫': {'value': 4.68106911390824e-12, 'units': 'J'}}, 'current_range': {'µ': {'value': 6.0, 'units': ''}, 'σ2': {'value': 0.0, 'units': ''}, 'min': {'value': 6.0, 'units': ''}, 'max': {'value': 6.0, 'units': ''}, 'p2p': {'value': 0.0, 'units': ''}}, 'current_lsb': {'µ': {'value': 0.5333340000000001, 'units': ''}, 'σ2': {'value': 0.2488890933330933, 'units': ''}, 'min': {'value': 0.0, 'units': ''}, 'max': {'value': 1.0, 'units': ''}, 'p2p': {'value': 1.0, 'units': ''}}, 'voltage_lsb': {'µ': {'value': 0.5333340000000001, 'units': ''}, 'σ2': {'value': 0.2488890933330933, 'units': ''}, 'min': {'value': 0.0, 'units': ''}, 'max': {'value': 1.0, 'units': ''}, 'p2p': {'value': 1.0, 'units': ''}}}, 'source': 'stream_buffer', 'accumulators': {'charge': {'value': -1.1600000000000001e-09, 'units': 'C'}, 'energy': {'value': 4e-12, 'units': 'J'}}}, 'status': 200, 'status_msg': 'Success'}
...
INFO:2021-09-22 12:29:52,158:client.py:73:joulescope_server.client:req: {'id': 8, 'type': 'stop', 'phase': 'req', 'device': 'Joulescope:000147'}
current: 32256
voltage: 32256
INFO:2021-09-22 12:29:52,184:client.py:84:joulescope_server.client:rsp: {'id': 8, 'type': 'stop', 'phase': 'rsp', 'device': 'Joulescope:000147', 'status': 200, 'status_msg': 'Success', 'data': True}
INFO:2021-09-22 12:29:52,184:client.py:73:joulescope_server.client:req: {'id': 9, 'type': 'close', 'phase': 'req', 'device': 'Joulescope:000147'}
INFO:2021-09-22 12:29:52,185:client.py:59:joulescope_server.client:async: {'type': 'stop', 'phase': 'async', 'device': 'Joulescope:000147', 'data': {'event': 0, 'message': ''}, 'status': 200, 'status_msg': 'Success'}
INFO:2021-09-22 12:29:52,186:client.py:84:joulescope_server.client:rsp: {'id': 9, 'type': 'close', 'phase': 'rsp', 'device': 'Joulescope:000147', 'status': 200, 'status_msg': 'Success'}
Close the socket
Does this match what you see?
Note that this line of the server output is very important:
INFO:2021-09-22 12:29:49,162:device.py:776:joulescope.usb.winusb.device:read_stream_start 2
Now, with your LabVIEW client, do you see the same server line?
If so, then your client is correctly sending the TAG_AJS start command, and the client is likely not handling the TAG_ABN binary streaming data response.
If not, we have to make sure that you are sending the correct command.
Let me know what you see!