# Waveform Generator (VCO)

**URL:** <https://forum.liquidinstruments.com/t/waveform-generator-vco/1267>\
**Category:** Support & Troubleshooting\
**Created:** [February 6, 2026, 11:34pm UTC](https://forum.liquidinstruments.com/t/waveform-generator-vco/1267 "2026-02-06T23:34:46Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![alkmbozkurt](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@alkmbozkurt](https://forum.liquidinstruments.com/u/alkmbozkurt)\
**Post date:** [February 6, 2026, 11:34pm UTC](https://forum.liquidinstruments.com/t/waveform-generator-vco/1267/1 "2026-02-06T23:34:46Z")

</div>

**Moku model: Moku Delta**  
**Operating system: Windows 11**  
**Software version: 4.1.1**

**Bug or support request description:**

I am trying to operate the instruments from MATLAB. I always thought the Waveform Generator as VCO whose frequency is very prone to adjust. Vut it turns out that when I try to update its frequency in a MATLAB script it takes too much and unconsistent time (0.45 seconds)? Is there a faster and better way to update the waveform generator from API? The “codeword” that I am calculating to update my VCO frequency is something I have to calculate on PC. Therefore in my MATLAB API loop I wanna use it and update the frequency of Waveform Generator.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Dylan](https://avatars.discourse-cdn.com/v4/letter/d/e95f7d/32.png) [@Dylan](https://forum.liquidinstruments.com/u/Dylan)\
**Post date:** [February 7, 2026, 1:01am UTC](https://forum.liquidinstruments.com/t/waveform-generator-vco/1267/2 "2026-02-07T01:01:04Z")

</div>

Hello @alkmbozkurt ,

If you are trying to use the waveform generator as a VCO, do you have a tuning signal to adjust the frequency? Typically VCOs operate by using a time varying DC signal to adjust the frequency. If so, you can configure your waveform to have frequency modulation, and feed the tuning signal to the input. This will allow the waveform generator to behave as a VCO.

 ![Screenshot 2026-02-06 at 4.57.46 PM](https://canada1.discourse-cdn.com/flex035/uploads/liquidinstruments/original/1X/fcf112f8f68948ca6dea60bbf95a656e09a8016f.png)

You can also use the API to dynamically adjust the frequency, but this may not adjust the frequency fast enough. I hope this helps!

-Dylan

---

<div class="post-metadata">

**Author:** ![alkmbozkurt](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@alkmbozkurt](https://forum.liquidinstruments.com/u/alkmbozkurt)\
**Post date:** [February 7, 2026, 5:14am UTC](https://forum.liquidinstruments.com/t/waveform-generator-vco/1267/3 "2026-02-07T05:14:09Z")

</div>

Hey, Thank you for your help. I do have a tuning voltage signal, but that is being computed within my API. Thats where I have a problem.

---

<div class="post-metadata">

**Author:** ![Dylan](https://avatars.discourse-cdn.com/v4/letter/d/e95f7d/32.png) [@Dylan](https://forum.liquidinstruments.com/u/Dylan)\
**Post date:** [February 9, 2026, 10:23pm UTC](https://forum.liquidinstruments.com/t/waveform-generator-vco/1267/4 "2026-02-09T22:23:51Z")

</div>

Hello @alkmbozkurt ,

Thank you for getting back to me, could you please describe a bit about your setup? You mention that you have a tuning voltage signal, where is this signal coming from? Is it being sent to one of Moku’s inputs? What is the output of the Moku connected to? Could you share a bit about what your script is doing? Looking forward to hearing from you!

-Dylan

---

<div class="post-metadata">

**Author:** ![alkmbozkurt](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@alkmbozkurt](https://forum.liquidinstruments.com/u/alkmbozkurt)\
**Post date:** [February 9, 2026, 11:43pm UTC](https://forum.liquidinstruments.com/t/waveform-generator-vco/1267/5 "2026-02-09T23:43:08Z")

</div>

Hello Dylan,

Thanks for respose. So I am making a demodulation using lock-in amplifier and extracting real time X/Y values. I am doing this from MATLAB API. Then, I am feeding this X and Y values to a custom MATLAB function of mine. This custom MATLAB function yields a ‘number’ based on X and Y values. I am using the outcome of the of this function as a ‘codeword’ to update the frequency of the waveform generator. I am doing this in a MATLAB loop. What I observe is, every 5th or 6th ‘frequency update’ of voltage\_generator, the update does not happen and loop lags. I was asking for is there any more efficient way to update the frequency of the VCO from MATLAB API.

---

<div class="post-metadata">

**Author:** ![Dylan](https://avatars.discourse-cdn.com/v4/letter/d/e95f7d/32.png) [@Dylan](https://forum.liquidinstruments.com/u/Dylan)\
**Post date:** [February 10, 2026, 12:00am UTC](https://forum.liquidinstruments.com/t/waveform-generator-vco/1267/6 "2026-02-10T00:00:58Z")

</div>

Hello @alkmbozkurt ,

Thank you for the clarification! Just to be clear, you are demodulating a signal with the Lock-In Amplifier, collecting the corresponding X and Y values, and calculating a value that is used to tune the Waveform Generator? If this is the case, I would recommend to use Custom Instrument to do the signal processing in real time onboard Moku. Using the API to implement this type of feedback is going to be much too slow.

 ![Screenshot 2026-02-09 at 3.55.14 PM](https://canada1.discourse-cdn.com/flex035/uploads/liquidinstruments/original/1X/37e9f10dfabdd0f97b76af64dfa867d9ad936852.png)

Instead of collecting the data from Moku and using MATLAB to calculate the tuning signal, you can implement the algorithm directly on the FPGA using Custom Instrument. In this set up, the X and Y values are fed to Custom Instrument, and you can create an algorithm in Verilog or VHDL that will generate a tuning signal on Output A of the Custom Instrument module. [Here](https://apis.liquidinstruments.com/mc/) is a page that describes Custom Instrument and Moku Compile. I hope this is helpful!

-Dylan

---

<div class="post-metadata">

**Author:** ![alkmbozkurt](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@alkmbozkurt](https://forum.liquidinstruments.com/u/alkmbozkurt)\
**Post date:** [February 10, 2026, 1:36am UTC](https://forum.liquidinstruments.com/t/waveform-generator-vco/1267/7 "2026-02-10T01:36:42Z")

</div>

Exactly, you get the operation correct. Well I considered implemeting a custom DSP block to do the signal processing but my custom function is pretty complicated, requires special libraries etc. I will definetly give a try to Custom Instrument. I have seen bunch of examples on different VHDL or Verilog codes of different custom instruments but is there a well defined documentation for how to make your own DSP block on Custom Instrument? And lastly, is it possible to use external VHDL libraries / IP cores inside a Custom Instrument VHDL block?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Dylan](https://avatars.discourse-cdn.com/v4/letter/d/e95f7d/32.png) [@Dylan](https://forum.liquidinstruments.com/u/Dylan)\
**Post date:** [February 10, 2026, 7:37pm UTC](https://forum.liquidinstruments.com/t/waveform-generator-vco/1267/8 "2026-02-10T19:37:41Z")

</div>

@alkmbozkurt ,

[This](https://apis.liquidinstruments.com/mc/) link is a good starting point for getting started with Custom Instrument and Moku Compile; we also have a lot of prewritten examples on our [GitHub](https://github.com/liquidinstruments/moku-examples/tree/main/mc). It is possible to use external libraries and IP cores as well. We have a few precompiled IP cores which can be accessed [here](https://github.com/liquidinstruments/moku-examples/tree/main/mc/IP%20Core%20Templates%20and%20Examples), and you also have the ability to import your own IP cores by uploading the .xci files, you can read more about that [here](https://liquidinstruments.com/white-papers/using-ip-cores-in-mcc/). I hope this helps!

-Dylan
