ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Maximum value in control design and simulation loop

Hi,

 

I am trying to determine the maximum value when running a CD and Simulation loop. I know if using another type of loop, I could use a shift register and continue to build an array, but I can't seem to form a shift register with the CD and Sim loop. My CD and Sim loop has 100 iterations. Is there any way I can log all 100 values into an array?

 

Thanks

0 Kudos
Message 1 of 9
(4,425 Views)
Did you try using the build array function?
Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 2 of 9
(4,423 Views)

So I should probably have mentioned that I am a labview novice....

 

If I use the build array function  inside of the CD and Sim loop it will only store the last value. I have verified this bychecking the size of the array and it returns a value of 1.

Message Edited by peeroe on 09-23-2009 09:04 PM
0 Kudos
Message 3 of 9
(4,417 Views)
can you post your vi or a sample of your vi?
Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 4 of 9
(4,413 Views)

I have posted the VI. The value that I have labeled as "VITAL VALUE" is the one that I am trying to get the maximum for. It is displayed on the graph in red.

 

Thanks!

0 Kudos
Message 5 of 9
(4,411 Views)

could you post it as 8.6?

Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 6 of 9
(4,408 Views)

Ooops,

 

Sorry about that. Hopefully this one will work a little better.

0 Kudos
Message 7 of 9
(4,406 Views)

hi guys .. didnt found any relative thread to post my problem hence posting here only... sorry for that.

i want to take an output value out of the simulation. is it possible? 

0 Kudos
Message 8 of 9
(3,904 Views)

Hi JUSTBEGINE,

 

Since this thread is older, you would probably be better served creating a new post for issues like this in the future.  As for your immediate question:  Yes, you can pass a value out of a Control & Simulation loop like you'd pass any other value out of a loop in LabVIEW.  If you're unfamiliar with how to do that, here's some getting started information about using loops in LabVIEW:  https://www.ni.com/en/support/documentation/supplemental/08/labview-for-loops-and-while-loops-explai...

 

In addition, you should be able to find examples in the Example Finder (Help >> Find Examples >> Control and Simulation) regarding how to do this.  

Matt | NI Systems Engineering
0 Kudos
Message 9 of 9
(3,895 Views)