WimDH / JDS6600

Python library form the JDS6600 DDS Signal Generator/Counter
MIT License
2 stars 1 forks source link

Reverse-engineered commands missing from documentation #12

Open PetteriAimonen opened 11 months ago

PetteriAimonen commented 11 months ago

Thanks for the nice project!

Here is information on missing commands that I discovered by dumping traffic from the official Windows-based GUI. I may have a go at implementing some of these myself at some point, but here is the info so that it is available somewhere.

Write arbitrary waveform

Address can be from a01 to a15. Values are from 0 to 4095, 2048 = middle voltage. Actual voltage scale and offset is set in normal way. Total 2048 values per waveform location.

Query: :a01=2048, ..(total 2048 values).. ,2048.

Response: :ok

Arbitrary waveform is selected as type 101 for a01 waveform ... 115 for a15.

Read arbitrary waveform

Address can be from b01 to b15.

Query: :b01=0.

Response: :b01=2048, ... (total 2048 values) .., 2048

Channel setting sync together

When sync is set to '1', both channels have the same config value.

Query: w54=0,0,0,0,0. Values in order: Freq, Waveform, Amplitude, Offset, Duty

Response: :ok

Frequency measurement function

Measures frequency input on Ext. In

Frequency measurement mode select: :w33=4.

Disable counter mode: :w32=0,0,0,0.

Gate time: :w37=99. value in 100th of seconds, e.g. 99 = 0.99 seconds.

Coupling: :w36=0. 0 for AC, 1 for DC

Mode: :w38=0. 0 to count frequency, 1 to measure period

Result reading: :r81=7. gives response of 8 values:

    :r81=12339990.  # Frequency in 0.1 Hz increments
    :r82=1783785447.
    :r83=15. 
    :r84=40. # Pulse width?
    :r85=55.
    :r86=272.
    :r87=1334378.
    :r88=42. # Pulse width?

Pulse counter

Counter mode select: :w33=5.

Start counter: :w32=1,0,0,0.

Stop counter: :w32=0,0,0,0.

Get count: :r80=0., response :r80=12345. with the number of pulses.

Burst modulation

Burst count: :w49=1. number of bursts to send on trigger

Trigger mode: :w50=0. 0 = manual, 1 = CH2, 2 = Ext.In AC, 3 = Ext.In DC

Enable burst mode: :w32=1,0,0,1., disable :w32=0,0,0,0.

Sweep modulation

Start freq: :w40=1234. frequency in 0.01 Hz

Stop freq: :w41=1234. frequency in 0.01 Hz

Sweep time: :w42=100. time in 0.1 s

Direction: :w43=0 0 = Rise, 1 = Fall, 2 = Rise & Fall

Mode: :w44=0 0 = Linear, 1 = Logarithmic

Sweep channel: :w33=6 6 = CH1, 7 = CH2

Sweep enable: :w32=0,1,0,0., disable :w32=0,0,0,0.

Pulse modulation

Pulse width: :w45=1000,0. first number time, second number unit 0 = ns, 1 = us

Pulse period/cycle: w46=10000,0. first number time, second number unit 0 = ns, 1 = us

Pulse offset: :w47=100. value in percent, not sure how it relates to waveform offset

Pulse amplitude: :w48=500. value in 0.01 V.

Pulse enable: :w32=1,0,1,1. disable :w32=0,0,0,0.

Preset settings

Save preset settings: :w70=0. where value is slot number 0-15

Load preset settings: :w71=0. where value is slot number

WimDH commented 11 months ago

Thank for the info :-)

I'll start with the implementation once I have a bit more time :-) (probably during the cold winter days)

PetteriAimonen commented 11 months ago

There is also this project which may be an useful reference, but lacks a CLI tool and the API is a bit messy https://github.com/on1arf/jds6600_python

WimDH commented 11 months ago

Indeed, the API is less Pythonic, and it lacks tests. That's why I gave it a try, but I'm sure this project can be improved as well.