LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with Control and Simulation Toolkit Code

Hi all,

 

I have some code that I've attached that I'm trying to set up as a discrete state-space controller.  The controller is not to be put on the realtime, but rather, send a setpoint to a shared variable.  The input range is from 0.7-1.5 and the output range should be -100% to 100%.

 

I've made a great recursive model using the Identification Toolkit and as you can see, it has its' own loop that is constantly running and updating.  The problem I'm running into is the controller code.

 

If I run my code for a while, the output goes well beyond the +/-100% range I've specified.  I was hoping someone could look over my code and tell me how best to do this type control, as I'm new to this toolkit and don't know the tricks of the trade.

 

Any help is appreciated!

Thanks,

Matt

0 Kudos
Message 1 of 2
(2,451 Views)

Hey,

 

The first VI in the first loop was missing, and there is a feedback node in the third loop... Why do you have that in your code? I suggest using shift registers if you want to pass data back between iterations...

 

Regards,

A. Zaatari

National Instruments
Applications Engineer
0 Kudos
Message 2 of 2
(2,421 Views)