-
-
Notifications
You must be signed in to change notification settings - Fork 2
usage
defcronyke edited this page Jan 12, 2021
·
1 revision
cargo run --release -- -h
Finished release [optimized] target(s) in 0.03s
Running `target/release/signal-gen-cjds66 -h`
signal-gen-cjds66 v0.1.9
Copyright © 2020-2021 Jeremy Carter <jeremy@jeremycarter.ca>
An unofficial program to control the CJDS66 60MHz DDS
Signal Generator/Counter (hardware by Koolertron).
See: https://gitlab.com/defcronyke/signal-gen-cjds66
Device: https://bit.ly/2J07i6X
LICENSE
-------
By using this software, you agree to the following
LICENSE TERMS (if you don't agree, you aren't allowed
to use this software, and you must not use it from now
on):
MIT License
Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and
associated documentation files (the "Software"), to
deal in the Software without restriction, including
without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom
the Software is furnished to do so, subject to the
following conditions:
The above copyright notice and this permission notice
shall be included in all copies or substantial
portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY
OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.
-------
USAGE:
signal-gen-cjds66 [FLAGS] [OPTIONS]
-------
FLAGS:
--cc Clear the count on measurement mode.
--gp Get the signal amplitude for channel 1 in volts.
--gq Get the signal amplitude for channel 2 in volts.
--go Get the output state of on or off for channels 1 and 2. For example, ch1 on, ch 2 off: 1,0
--gty Get the duty cycle for channel 1 in percent.
--gcy Get the duty cycle for channel 2 in percent.
--ge Get the signal frequency for channel 1 in whichever unit the channel is currently set to (one
of: uHz, mHz, Hz, kHz, Mhz).
--gf Get the signal frequency for channel 2 in whichever unit the channel is currently set to (one
of: uHz, mHz, Hz, kHz, Mhz).
--gez Get the signal frequency for channel 1 in hertz (Hz).
--gfz Get the signal frequency for channel 2 in hertz (Hz).
--gmc Get the measurement count.
--gmdc Get the measurement duty cycle.
--gmf Get the measurement frequency value in frequency mode (hertz).
--gmfp Get the measurement frequency value in period mode (hertz).
--gmp Get the measurement period.
--gmpwn Get the measurement pulse width (negative).
--gmpw Get the measurement pulse width (positive).
-m, --model Get the device's model number.
--ms Get the device's model number and serial number.
--gr Get the phase in ° (degrees).
-s, --serial Get the device's serial number.
--gg Get the voltage offset for channel 1 in volts.
--gn Get the voltage offset for channel 2 in volts.
--gw Get the waveform preset for channel 1.
--gx Get the waveform preset for channel 2.
-h, --help Prints help information
--bin Send binary output to stdout. Currently only works with the --txt-to-wav flag. You should
probably pipe this to another command or redirect it to a file, otherwise it might break your
terminal session.
--bc Set the burst mode to CH2 burst.
--ba Set the burst mode to external burst AC.
--bd Set the burst mode to external burst DC.
--bm Set the burst mode to manual trigger.
--cf Set the measurement mode to count frequency.
--cp Set the measurement mode to counting period.
--ac Set the measurement mode coupling option to AC.
--dc Set the measurement mode coupling option to DC.
--sdf Set the sweep direction to fall (reverse).
--sdr Set the sweep direction to rise (normal).
--sdrf Set the sweep direction to rise and fall (round trip).
--sml Set the sweep mode to linear.
--smg Set the sweep mode to logarithm.
--b1 Burst pulse once.
-O, --start-burst Set the extended function to start bursting.
-D, --start-count Set the extended function to start counting.
-N, --start-measure Set the extended function to start measuring, and to stop counting, sweep, pulse, and
bursting.
-Q, --start-pulse Set the extended function to start pulse.
-S, --start-sweep1 Set the extended function to start sweep on channel 1.
-U, --start-sweep2 Set the extended function to start sweep on channel 2.
-R, --burst Switch the function panel to bursting mode.
-C, --count Switch the function panel to counting mode.
-A, --main1 Switch the function panel to main channel 1 mode.
-B, --main2 Switch the function panel to main channel 2 mode.
-M, --measure Switch the function panel to measurement mode.
-P, --pulse Switch the function panel to pulse mode.
--sweep1 Switch the function panel to sweep channel 1 mode.
--sweep2 Switch the function panel to sweep channel 2 mode.
-Y, --sys Switch the function panel to system settings (SYS) mode.
-V, --version Prints version information
OPTIONS:
-d, --device <path>... The device(s) to communicate with.
--rw <slot_number> Get an arbitrary waveform's data from the device, from one of the 60 save
slots. It displays on stdout an output format which is suitable for saving
to a .txt file, which can later be loaded back onto the device using the
--wws flag.
Ex: --gwd 5 > file.wav.txt
--lpr <preset_number> Load all the values for the device from a numbered preset.
--spr <preset_number> Save all the current values on the device as a numbered preset.
-p, --ampli-ch1 <ch1_ampli_v> Set the signal amplitude for channel 1 in volts. The value must be a number
0.000-20.0, and is further limited by any voltage offset which may be
currently set. For example: -p 0.001
-q, --ampli-ch2 <ch2_ampli_v> Set the signal amplitude for channel 2 in volts. The value must be a number
0.000-20.0, and is further limited by any voltage offset which may be
currently set. For example: -q 0.001
--wws <slot_number> Write an arbitrary waveform to the device from stdin, and save it in one of
the 60 slots.
Ex (using file redirection to stdin): --wws 5 < file.wav.txt
--wwc <slot_number> Write an arbitrary waveform to the device from a WaveCAD (.wav) file, and
save it in one of the 60 slots.
Ex: --wwc 5,file.wav
-a, --wave-arb-ch1 <ch1_arb_preset> Set the arbitrary waveform preset for channel 1. The value must be a number
1-60. For example: -a 1
-b, --wave-arb-ch2 <ch2_arb_preset> Set the arbitrary waveform preset for channel 2. The value must be a number
1-60. For example: -b 1
--bn <num_pulses> Burst pulse number. Set the number of burst pulses.
-o, --output <ch1_on,ch2_on> Set the output state to on or off for channels 1 and 2. For example, ch1
on, ch 2 off: -o 1,0
-t, --duty-ch1 <ch1_duty_cycle> Set the duty cycle for channel 1 in percent. The value must be a number
0.0-99.9. For example: -t 40.1
-c, --duty-ch2 <ch2_duty_cycle> Set the duty cycle for channel 2 in percent. The value must be a number
0.0-99.9. For example: -c 40.1
-e, --freq-hz-ch1 <ch1_freq_Hz> Set the waveform frequency for channel 1 in Hz. The value must be a number
0.0-60000000.0. For example: -e 0.01
-f, --freq-hz-ch2 <ch2_freq_Hz> Set the waveform frequency for channel 2 in Hz. The value must be a number
0.0-60000000.0. For example: -f 0.01
-k, --freq-khz-ch1 <ch1_freq_kHz> Set the waveform frequency for channel 1 in kHz. The value must be a number
0.0-60000.0. For example: -k 0.00001
-l, --freq-khz-ch2 <ch2_freq_kHz> Set the waveform frequency for channel 2 in kHz. The value must be a number
0.0-60000.0. For example: -l 0.00001
-y, --freq-mega-ch1 <ch1_freq_MHz> Set the waveform frequency for channel 1 in MHz (megahertz). The value must
be a number 0.0-60.0. For example: -y 0.00000001
-z, --freq-mega-ch2 <ch2_freq_MHz> Set the waveform frequency for channel 2 in MHz (megahertz). The value must
be a number 0.0-60.0. For example: -z 0.00000001
-i, --freq-milli-ch1 <ch1_freq_mHz> Set the waveform frequency for channel 1 in mHz (millihertz). The value
must be a number 0.0-80000000.0. For example: -i 0.01
-j, --freq-milli-ch2 <ch2_freq_mHz> Set the waveform frequency for channel 2 in mHz (millihertz). The value
must be a number 0.0-80000000.0. For example: -j 0.01
-u, --freq-micro-ch1 <ch1_freq_uHz> Set the waveform frequency for channel 1 in uHz. The value must be a number
0.0-80000000.0. For example: -u 0.01
-2, --freq-micro-ch2 <ch2_freq_uHz> Set the waveform frequency for channel 2 in uHz. The value must be a number
0.0-80000000.0. For example: -2 0.01
--gt <gate_time> Set the measurement gate time in seconds. The value must be a number 0.01-
10.0. For example: --gt 0.01
-r, --phase <phase_deg> Set the phase in ° (degrees). The value must be a number 0.0-360.0, and
360.0 wraps around to 0.0. For example: -r 180.7
--pa <pulse_amplitude_volts> Set the amplitude for the pulse function in volts.
--po <pulse_offset_percent> Set the offset for the pulse function in percent.
--pdu <pulse_period_microseconds> Set the period for the pulse function in microseconds.
--pdn <pulse_period_nanoseconds> Set the period for the pulse function in nanoseconds.
--pwu <pulse_width_microseconds> Set the pulse width for the pulse function in microseconds.
--pwn <pulse_width_nanoseconds> Set the pulse width for the pulse function in nanoseconds.
--se <end_freq_hz> Set the sweep end frequency.
--ss <start_freq_hz> Set the sweep starting frequency.
--st <sweep_time_seconds> Set the sweep time
-T, --track <track_features> Set the tracking mode. The value must be either a set of comma-separated
setting names (see below), or a set of zeros and ones in the range of 0-
11111, each bit corresponding to a feature you want to toggle tracking
on/off for (1 being on and 0 being off). For example: track frequency and
amplitude: -T 101
The bit position meanings are as follows:
0: frequency | freq | fq | fr | f
1: waveform | wave | wav | wv | w
2: amplitude | ampli | amp | am | a
3: dutycycle | duty | dc | du | d
4: offset | off | os | ot | o
turn off tracking: 0 | none | null | non | nil | no | n
You can also use any of the names above separated by commas to turn on
the tracking by feature name.
Ex:
frequency and amplitude sync: -T freq,amp
Or you can use the single character versions with no commas in between.
Ex:
frequency and amplitude sync: -T fa
Turn tracking off like this: -T n
Note that a value of zero (or no value) in the bit position will turn off
tracking for the corresponding feature, so to turn tracking off for all
features, you can do: -T 0
You can also separate the values with commas if you prefer: -T 1,0,1
-g, --offset-ch1 <ch1_volt_offset> Set the voltage offset for channel 1 in volts. The value must be a number
-9.99-9.99. For example: -g -1.23
-n, --offset-ch2 <ch2_volt_offset> Set the voltage offset for channel 2 in volts. The value must be a number
-9.99-9.99. For example: -n -1.23
-w, --wave-preset-ch1 <ch1_preset> Set the waveform preset for channel 1. The value must be either the name of
the waveform preset (see below), or a number 0-16, for example,
sine wave: -w 0
Accepted preset names:
0: sine || sin
1: square || sq
2: pulse || pul
3: triangle || tri
4: partialsine || partial-sine || parsine || par-sine || parsin || par-sin
|| psine || p-sine || psin || p-sin
5: cmos || cm
6: dc
7: halfwave || half-wave || hw || h-w
8: fullwave || full-wave || fw || f-w
9: pos-ladder || posladder || pos-lad || poslad || positive-ladder ||
positiveladder || pl
10: neg-ladder || negladder || neg-lad || neglad || negative-ladder ||
negativeladder || nl
11: noise || nois || noi || no || n
12: exp-rise || exprise || e-r || er || e-rise || erise || e-ris || eris
13: exp-decay || expdecay || e-d || ed || e-decay || edecay || e-dec ||
edec
14: multi-tone || multitone || m-t || mt || m-tone || mtone
15: sinc || sc
16: lorenz || loren || lor || lz
-x, --wave-preset-ch2 <ch2_preset> Set the waveform preset for channel 2. The value must be either the name of
the waveform preset (see channel1 help item for details), or a number 0-16.
For example, sine wave: -x 0
--txt-to-wav <txt_file_path> Convert the device's arbitrary waveform text file format to a WaveCAD file.
It will be output in the same directory as the input file, with the .txt
extension removed, leaving it with just a .wav extension. This file can be
used as input to upload a wave to the device with the --wwc flag.
Ex: --txt-to-wav file.wav.txt
-v, --verbose <verbosity_level> Set the verbosity for the output of this command (Ex. 0-1). The verbosity
defaults to 1 if specified with no value. [default: 1]
--wav-to-txt <wav_file_path> Convert a WaveCAD file to the device's arbitrary waveform text file format.
It will be output in the same directory as the input file, with a .txt
extension. This file can be used as stdin input to upload a wave to the
device with the --wws flag.
Ex: --wav-to-txt file.wav