LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Control & Simulation Loop Failed to Compile

Highlighted

Hi,

 

I am trying to create two PI controller loops using the control & simulation add on in Labview and when i try to run the program i get an error sayng control & simulation loop failed to compile i have read some of the guidance information on the NI website but didnt understand it well enough to resolve the problem.

 

The first loop i am trying to create is just a straight forward PI controller with about 5.5 sec deadtime. The second loop i am trying to create uses a smith predictor to reduce this deadtime. Both loops are resulting in the same error. Can anyone help or resolve.

 

Cheer,

 

Tom

 

0 Kudos
Message 1 of 5
(1,906 Views)
Highlighted

Hi,

 

I am trying to create two PI controller loops using the control & simulation add on in Labview and when i try to run the program i get an error sayng control & simulation loop failed to compile i have read some of the guidance information on the NI website but didnt understand it well enough to resolve the problem.

 

The first loop i am trying to create is just a straight forward PI controller with about 5.5 sec deadtime. The second loop i am trying to create uses a smith predictor to reduce this deadtime. Both loops are resulting in the same error. Can anyone help or resolve.

 

Cheer,

 

Tom

 

Download All
0 Kudos
Message 2 of 5
(1,906 Views)
Highlighted

It seems that your diagram had some problems in the generated code. It seems that you are using LabVIEW 2015, but was that created in this version or it was 'migrated' from previous version? It looks like it was created in previous versions and it did not migrate properly.

 

Anyway, I was able to make it compile for you. To do that, you can just need to open the transfer function, copy the value (the buttons on the right pane have a copy option), change the transfer function to accept the value from the terminal, and then wire it from the outside of the loop, like this:

 

TF issue.PNG

Then you run one time and it should remove the fail to compile. Then, afterwards, you can go back to the the internal transfer function as you'd expect to work.

 

Another way to make it work is to copy the data from the transfer function, delete the transfer function node from your diagram, drop a new one from the palette and then, paste the controller transfer function back. This should fix the problem you are encountering.

 

In attachment you can find the diagram with the changes I discussed above. Please let me know if that fixes the problem you are encountering.

 

One last thing: did you see the shipping example named "Smith Predictor.vi"? This actually implements similar diagram, but it helps you implementing the PID and shows you some code to demonstrate the concepts:

 

C:\Program Files (x86)\National Instruments\LabVIEW 2015\examples\Control and Simulation\Case Studies\Process Control\Smith Predictor\Smith Predictor.vi

 

 

 

Barp - Control, Simulation, RTT and HIL - National Instruments
Message 3 of 5
(1,840 Views)
Highlighted

Thanks for your help you seemed to have solved that issue for me. I have looked at the example i have now used some of this code in my program thanks for the recommendation.

0 Kudos
Message 4 of 5
(1,812 Views)
Highlighted

I am using labview 13 and i cant open this file, so if possible can u upload file with previous version, it would be of a great help.

Thanking  You.

0 Kudos
Message 5 of 5
(1,801 Views)