# UserVSCont() routine

**URL:** <https://forums.nlr.gov/t/uservscont-routine/1215>\
**Category:** Computer-Aided Engineering Software Tools\
**Created:** [October 29, 2015, 10:44am UTC](https://forums.nlr.gov/t/uservscont-routine/1215 "2015-10-29T10:44:50Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Inaki.Sandua](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@Inaki.Sandua](https://forums.nlr.gov/u/Inaki.Sandua)\
**Post date:** [October 29, 2015, 10:44am UTC](https://forums.nlr.gov/t/uservscont-routine/1215/1 "2015-10-29T10:44:50Z")

</div>

Hello,

I am trying to modify the control strategy of the 5MW wind turbine in FAST 7. To do so, I think that the best way is using the UserVSCont() routine (maybe the UserSubs.f90 file). However, I do not know how the program calls it and how I can modify it. I would be so grateful if you could help me.

Regards,

Iñaki

---

<div class="post-metadata">

**Author:** ![Jason.Jonkman](https://dub1.discourse-cdn.com/nrel/user_avatar/forums.nlr.gov/jason.jonkman/32/3086_2.png) [@Jason.Jonkman](https://forums.nlr.gov/u/Jason.Jonkman)\
**Post date:** [October 29, 2015, 2:17pm UTC](https://forums.nlr.gov/t/uservscont-routine/1215/2 "2015-10-29T14:17:34Z")

</div>

Dear Iñaki,

I’m assuming you are referring to the NREL 5-MW turbine. However, the baseline controller for this turbine is implemented as Bladed-style DLL named DISCON.dll. To modify the control strategy, you should change the corresponding controller source code, DISCON.f90, and recompile the DISCON.dll.

Best regards,

---

<div class="post-metadata">

**Author:** ![Inaki.Sandua](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@Inaki.Sandua](https://forums.nlr.gov/u/Inaki.Sandua)\
**Post date:** [October 30, 2015, 8:20am UTC](https://forums.nlr.gov/t/uservscont-routine/1215/3 "2015-10-30T08:20:57Z")

</div>

Dear Jason,

first of all, thank you for your fast answer. So, the program reads the DISCON.dll file , although the VSContrl flag is 2?

Regards,

Iñaki

---

<div class="post-metadata">

**Author:** ![Jason.Jonkman](https://dub1.discourse-cdn.com/nrel/user_avatar/forums.nlr.gov/jason.jonkman/32/3086_2.png) [@Jason.Jonkman](https://forums.nlr.gov/u/Jason.Jonkman)\
**Post date:** [October 30, 2015, 12:36pm UTC](https://forums.nlr.gov/t/uservscont-routine/1215/4 "2015-10-30T12:36:29Z")

</div>

Dear Iñaki,

If you are using the version of FAST v7 compiled with the interface to Bladed-style DLL controllers (e.g., available from here: [nwtc.nrel.gov/system/files/FAST.pdf](https://nwtc.nrel.gov/system/files/FAST.pdf).

Best regards,

---

<div class="post-metadata">

**Author:** ![Inaki.Sandua](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@Inaki.Sandua](https://forums.nlr.gov/u/Inaki.Sandua)\
**Post date:** [October 30, 2015, 2:44pm UTC](https://forums.nlr.gov/t/uservscont-routine/1215/5 "2015-10-30T14:44:23Z")

</div>

Dear Jason,

thank you very much for your help.

Regards,

Iñaki

---

<div class="post-metadata">

**Author:** ![Inaki.Sandua](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@Inaki.Sandua](https://forums.nlr.gov/u/Inaki.Sandua)\
**Post date:** [November 2, 2015, 10:35am UTC](https://forums.nlr.gov/t/uservscont-routine/1215/6 "2015-11-02T10:35:39Z")

</div>

Dear Jason,

now I am using FAST v7 compiled with the interface to Bladed-style DLL controllers, but the program still calls the Kirk Pierce’s routine and makes me set the GBRatio to 1 (and I want a GBRatio of 97). That means that it is not using DISCON.dll?

Regards,

Iñaki

---

<div class="post-metadata">

**Author:** ![Jason.Jonkman](https://dub1.discourse-cdn.com/nrel/user_avatar/forums.nlr.gov/jason.jonkman/32/3086_2.png) [@Jason.Jonkman](https://forums.nlr.gov/u/Jason.Jonkman)\
**Post date:** [November 2, 2015, 1:25pm UTC](https://forums.nlr.gov/t/uservscont-routine/1215/7 "2015-11-02T13:25:04Z")

</div>

Dear Iñaki,

If FAST is still calling Kirk Pierce’s variable-speed generator routine, than you are not using the FAST compiled with the Bladed DLL control interface. You should use FAST v7.02 from here: [wind.nrel.gov/public/jjonkman/FA … erface.exe](http://wind.nrel.gov/public/jjonkman/FAST/FAST_v7.02.00d-bjj_AeroDyn_v13.00.02a-bjj_BladedDLLInterface.exe).

Best regards,

---

<div class="post-metadata">

**Author:** ![Inaki.Sandua](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@Inaki.Sandua](https://forums.nlr.gov/u/Inaki.Sandua)\
**Post date:** [November 2, 2015, 2:50pm UTC](https://forums.nlr.gov/t/uservscont-routine/1215/8 "2015-11-02T14:50:06Z")

</div>

Dear Jason,

you were right, I was calling the “normal” version of FAST7. By the way, if I am using the FAST compiled with the Bladed DLL control interface, should the DISCON.dll file be in the same folder as the .fst file? And does its name have to be DISCON?

Regards,

Iñaki

---

<div class="post-metadata">

**Author:** ![Jason.Jonkman](https://dub1.discourse-cdn.com/nrel/user_avatar/forums.nlr.gov/jason.jonkman/32/3086_2.png) [@Jason.Jonkman](https://forums.nlr.gov/u/Jason.Jonkman)\
**Post date:** [November 2, 2015, 3:58pm UTC](https://forums.nlr.gov/t/uservscont-routine/1215/9 "2015-11-02T15:58:51Z")

</div>

Dear Iñaki,

Unless you change the source code, the Bladed-style DLL control interface in FAST v7.02 assumes the DLL is named DISCON.dll and located anywhere in the search path.

Best regards,

---

<div class="post-metadata">

**Author:** ![Inaki.Sandua](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@Inaki.Sandua](https://forums.nlr.gov/u/Inaki.Sandua)\
**Post date:** [November 2, 2015, 5:11pm UTC](https://forums.nlr.gov/t/uservscont-routine/1215/10 "2015-11-02T17:11:34Z")

</div>

Dear Jason,

thank you for all your help.

Reagrds,

Iñaki
