DMC-Complete is a tool for LabVIEW users that suggests your next block for you while you program. Simply select on a block on your block diagram and instantly receive suggestions for the next block to use and drop it with a single-click.
⚡ Blazing fast – predictions in a fraction of a second
💻 Runs entirely on device – no internet needed
💾 Tiny footprint on your disk, CPU, and RAM
🧩 Supports all your custom libraries
🤝 Completely open source under the BSD 3-Clause License
Under the hood, DMC-Complete uses a Markov chain model trained on code you provide it to build a key-value map of the form:
List of "parent blocks" -> List of subsequent blocks and how often they appear afterwards
When you select a block, it checks the map and provides suggestions to you in decreasing order of occurrences in the training data. This approach to next-block prediction is uniquely suited to LabVIEW where variables don't have names and code is easy to represent graphically.
In the indexing and autocompletion process, there is a MarkovModel class that is given training data and later used to predict subsequent blocks. It inherits from the AbstractModel class, which defines the core interface for training and prediction.
To implement your own pipeline:
- Create a new class that extends
AbstractModel. - Implement the required methods (e.g.,
Train,Predict). - Point the indexer and autocompleter to use your model instead of
MarkovModel.
This allows you to experiment with alternative ML approaches while still using the same indexing and autocompletion infrastructure.
NOTE: The source code for this project has been saved with LabVIEW 2020.
- Install the SQLite Library by JDP Science using VIPM
- Download and extract the code or clone the repo to an install location of your choice.
- Open
DMC-Complete.lvproj - From the Project Explorer view, run
Indexer.vi0. Click "Load Pre-Index" to download an index built on the default LabVIEW example files that should speed up the training process significantly.- Click "Load Example Paths" to use the example files for your version of LabVIEW and examples for your installed libraries.
- Add any folders of code you'd like to train on in addition.
- Click "Run Training" and wait for the process to complete. If you need to stop the process early, you can click the stop button in the top right corner and cleanly end the process. Repeating the previous steps should let you pick up where you left off in training.
- Click the stop button to close the indexer.
- Open up the Block Diagram editor for a file you would like to work in.
- Run the
Autocompleter.vifile inside the repo. - Use the suggestions that appear when you click on a block to help you code!
- Open
<LabVIEW Dir>\resource\dialog\QuickDrop - Rename
Convert QD Object String to 2D Array.vitoConvert QD Object String to 2D Array - Backup.vi - Rename
QuickDrop Process Drop Information.vitoQuickDrop Process Drop Information - Backup.vi - Copy the files from
DMC-Complete\QuickDropinto<LabVIEW Dir>\resource\dialog\QuickDropand open them to make sure that load dependencies correctly. - Run
Autocompleter.viand suggestions should start appearing in QuickDrop.
Absolutely! There are many ways for you to help out from raising an issue for bugs you've spotted or features you'd like to making a pull request with code that addresses open issues. To learn more, check out the CONTRIBUTING.md guide.
