LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

control, design and simulation

Hello everybody,

 

I am trying to run a simulation in Control Design and Simulation module. My simulation consists of various simulation systems. The subsystems are working as desired when run as separate units, but when I run the complete system, the subsystems fail to produce the output values. 

I have not used any local variables or any discrete function vi inside a subsystem.

 

Where am I wrong ? Any help would be much appreciated.

 

 

0 Kudos
Message 1 of 11
(4,483 Views)

When you say: Fail to produce a output, what do you mean?

 

On the right side of the Control and Simulation loop you have the 'Error Out' cluster. Create a control from it and see if you have an error. Also, which version of LabVIEW are you using?

 

If this is not producing an error, then try to change the solver you are using. It would help if you could post your code (or at least pictures) of it.

Barp - Control, Simulation, RTT and HIL - National Instruments
0 Kudos
Message 2 of 11
(4,471 Views)

I mean the indicators connected to various subsystems are inactive and don't produce any output values. I tried to find the error using the Error Cluster, but it didn't show any error. I am using LabVIEW 2011. I have attached the complete system including the subsystems. The individual systems are working fine. I changed the solver too, but the problem persisted. Please try to identify the error.


@Barp wrote:

When you say: Fail to produce a output, what do you mean?

 

On the right side of the Control and Simulation loop you have the 'Error Out' cluster. Create a control from it and see if you have an error. Also, which version of LabVIEW are you using?

 

If this is not producing an error, then try to change the solver you are using. It would help if you could post your code (or at least pictures) of it.


 

0 Kudos
Message 3 of 11
(4,457 Views)

OK, I was able to open the System.vi and I noticed also that you don't have any result. The problem is that a lot of functions (VIs) in you diagram are VIs with another Control and Simulation Loop inside. So, when you run the top level simulation loop, this will try to run the VI that has another simulation loop inside and it will not continue work until the first one is done. So, that is the reason you have this problem.

 

You probably wanted those VI to be Subsystems, so when you place them all on the same simulation loop, they will try to combine all subsystems into one simulation and solve all models at the same time. Since you already have the VIs, the easiest way to create subsystems is to select all the code inside the Control and Simulation Loop inside the VI and use Edit >> Create new Simulation Subsystem and save that new subsystem VI into your file system. Then you can substitude the VI with Simulation loop with the proper subsystem.

 

Does it make sense?

 

sim inside sim 2.png

Barp - Control, Simulation, RTT and HIL - National Instruments
0 Kudos
Message 4 of 11
(4,450 Views)

....Incorrect post.

       -deleted-

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
0 Kudos
Message 5 of 11
(4,440 Views)

 I also try to study, and use about Control Design and Simulation, now I want to as all of you that if now I'm using Simulation, by created transfer funcntion, n I want to use CD Convert from Simulation to Control Deasign, how could I do? Thanks!

0 Kudos
Message 6 of 11
(4,358 Views)

For me I just want to know how to use CD Convert Simulation to Control Design. Please just give me a small example thanks.

0 Kudos
Message 7 of 11
(4,336 Views)

This function is only used to convert the model datatype from Simulation into Control Design. In the software, both cluster have the same information, but they are different datatypes. Now, notice that you do not need to use this function directly since you can just wire a 'control design' datatype directly to the Simulation Transfer Function and the function will convert it internally.

 

Why do you need to use this function? Anyway, here is the location of some examples:

 

<LabVIEW Folder>\examples\Control and Simulation\Simulation

 

Hopefully this helps...

Barp - Control, Simulation, RTT and HIL - National Instruments
0 Kudos
Message 8 of 11
(4,323 Views)

Ok, thanks for your reply but what I want to ask Please see the pic, in here I just want to see the result of the equation from the Simulation, or do you have any way please recommand me, becouse I dont know how to connect number 1 and number 2 with the simulation. But if I use the collector I found the result is not right so pls give me some advise.

Thanks!

0 Kudos
Message 9 of 11
(4,305 Views)

The numbers on the diagram are the transfer function and the 'sampling time' the second. I can't see why you want to do this connection. Are you trying to make transfer function of the simulation show on the front panel? If that is the case, you have two options:

1. Create a model with "Construct Transfer Function.vi", make the Simulation function "transfer function" to shows its terminal (on the configuration dialog) and then, wire both to the front panel.

2. Copy the model from the config page and then, paste on the block diagram. You should just wire this model into terminal showing on your graph.

 

We have some examples that does that. If this doesn't give you more information, feel free to tell me which version of LabVIEW you are using and what are you trying to do.

Barp - Control, Simulation, RTT and HIL - National Instruments
0 Kudos
Message 10 of 11
(4,294 Views)