Mokucli 'download' command
Learn about the download command provided by mokucli
-
Moku:Go
Moku:Go Arbitrary Waveform Generator Moku:Go Data Logger Moku:Go Frequency Response Analyzer Moku:Go Logic Analyzer & Pattern Generator Moku:Go Oscilloscope & Voltmeter Moku:Go PID Controller Moku:Go Spectrum Analyzer Moku:Go Waveform Generator Moku:Go Power Supplies Moku:Go Digital Filter Box Moku:Go FIR Filter Builder Moku:Go Lock-in Amplifier Moku:Go General Moku:Go Logic Analyzer/Pattern Generator Moku:Go Time & Frequency Analyzer Moku:Go Laser Lock Box Moku:Go Phasemeter
-
Moku:Lab
Moku:Lab General Moku:Lab Arbitrary Waveform Generator Moku:Lab Data Logger Moku:Lab Digital Filter Box Moku:Lab FIR Filter Builder Moku:Lab Frequency Response Analyzer Moku:Lab Laser Lock Box Moku:Lab Lock-in Amplifier Moku:Lab Oscilloscope Moku:Lab Phasemeter Moku:Lab PID Controller Moku:Lab Spectrum Analyzer Moku:Lab Waveform Generator Moku:Lab Time & Frequency Analyzer Moku:Lab Logic Analyzer/Pattern Generator
-
Moku:Pro
Moku:Pro Arbitrary Waveform Generator Moku:Pro Data Logger Moku:Pro Frequency Response Analyzer Moku:Pro Oscilloscope Moku:Pro PID Controller Moku:Pro Spectrum Analyzer Moku:Pro Waveform Generator Moku:Pro Lock-in Amplifier Moku:Pro Digital Filter Box Moku:Pro FIR Filter Builder Moku:Pro Phasemeter Moku:Pro Multi-instrument Mode Moku:Pro General Moku:Pro Logic Analyzer/Pattern Generator Moku:Pro Time & Frequency Analyzer
- Python API
- MATLAB API
- Arbitrary Waveform Generator
- Data Logger
- Digital Filter Box
- FIR Filter Builder
- Frequency Response Analyzer
- Laser Lock Box
- Lock-in Amplifier
- Oscilloscope
- Phasemeter
- PID Controller
- Spectrum Analyzer
- Time & Frequency Analyzer
- Waveform Generator
- Logic Analyzer & Pattern Generator
- Multi Instrument Mode
- Moku Cloud Compile
- Moku general
- LabVIEW
For Windows users:
Explanations of mokucli download:
Mokucli offers a range of functions accessible through the command window. Try executing the following command:
mokucli --help
The output of this command reveals several options and commands such as stream
, list
, and download
. This Knowledge Base article specifically focuses on providing a detailed explanation of the download
command. (Note that the download
command in mokucli
and the moku download
command in APIs perform identical tasks, thus users only need to make a one-time execution of either command.)
To help understand the functionality of the download
command, you can try inputting:
mokucli download --help
This command downloads the bitstreams for a specific firmware version. Additionally, it allows users to specify the destination for the bitstream file and offers an option for forced rewriting of bitstreams.
To download the bitstreams for a particular FIRMWARE_VERSION to the TARGET_PATH, execute the following command:
mokucli download --target TARGET_PATH FIRMWARE_VERSION
In case the bitstreams have already been downloaded, this command will prompt an error indicating their existing presence. However, you can enforce the completion of the download process by using:
mokucli download --target TARGET_PATH --force FIRMWARE_VERSION
For MATLAB APIs, the bitstream needs to be extracted before use. Extract the .tar.gz file using the following commands:
cd TARGET_PATH
tar -xzvf mokudata-FIRMWARE_VERSION.tar.gz
The successful extraction of the bitstreams folder and files can be confirmed by the displayed screenshot.
Next, assign the file path of the bitstreams to an environment variable to enable their utilization within APIs.
Configure system variable:
To add a new environment variable to the system variables for the target bitstreams path, follow these steps:
First of all, Open the ‘Edit the system environment variables’ panel.
Then, click on the ‘Environment Variable’ tab:
After that, click on the ‘New’ tab to create a new system variable:
Enter the Variable name as ‘MOKU_DATA_PATH’ and input the target bitstreams path as the Variable value:
It is now ready for Python and MATLAB API usage.
For MacOS users:
Explanations of mokucli download:
Mokucli offers a range of functions accessible through the command window. Try executing the following command:
mokucli --help
The output of this command reveals several options and commands such as stream
, list
, and download
. This Knowledge Base article specifically focuses on providing a detailed explanation of the download
command. (Note that the download
command in mokucli
and the moku download
command in APIs perform identical tasks, thus users only need to make a one-time execution of either command.)
To help understand the functionality of the download
command, you can try inputting:
mokucli download --help
This command downloads the bitstreams for a specific firmware version. Additionally, it allows users to specify the destination for the bitstream file and offers an option for forced rewriting of bitstreams.
To download the bitstreams for a particular FIRMWARE_VERSION to the TARGET_PATH, execute the following command:
mokucli download --target TARGET_PATH FIRMWARE_VERSION
In case the bitstreams have already been downloaded, this command will prompt an error indicating their existing presence. However, you can enforce the completion of the download process by using:
mokucli download --target TARGET_PATH --force FIRMWARE_VERSION
For MATLAB APIs, the bitstream needs to be extracted before use. Extract the .tar.gz file using the following commands:
cd TARGET_PATH
tar -xzvf mokudata-FIRMWARE_VERSION.tar.gz
Next, assign the file path of the bitstreams to an environment variable to facilitate their utilization within APIs.
Configure system variable:
Enter the Variable name as ‘MOKU_DATA_PATH’ and input the target bitstreams path as the Variable value:
sudo echo ‘export MOKU_DATA_PATH=/Users/heyanglong/Desktop/bitstreams’ >> ~/.zshrc
source ~/.zshrc
echo $MOKU_DATA_PATH
It is now ready for API usage.