View Single Post
  #7   Spotlight this post!  
Unread 12-08-2009, 21:56
Manoel's Avatar
Manoel Manoel is offline
Registered User
FRC #0383 (Brazilian Machine)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 2000
Location: Porto Alegre, RS, Brazil
Posts: 608
Manoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond repute
Send a message via ICQ to Manoel Send a message via MSN to Manoel
Re: Help with basic algorithm on LabVIEW

Quote:
Originally Posted by Greg McKaskle View Post
I'm confused as to what you are wanting, so I've attached a typical low-tech UI wrapped around a loop that does single point I/O, ctl, and output and accumulates the values for further processing. Perhaps some part of this helps.

If you want a higher tech UI using the event structure, I'll post one of those too, but since RT doesn't do events, these simple polling UIs are often useful.

By the way, the False case is the wire going through, and a delay of 50ms, just to slow down the UI and avoid reading stuff 1,000,000 times a second. You could also put processing or display of the entire dataset there.

Also, I'll describe the other thing that is often useful. Build a simple subVI that takes in your setpoint, the process variable and the output. Chart all of them on the subVI similar to how you'd see in a textbook. You can drop these near any control block, and wire it up. While the panel is closed, not much is going on, but you can open it, bump the setpoint and watch the oscillations and other effects of the control. You close the panel when you don't need it.

Greg McKaskle
Hi Greg,

Thanks for the help, but the control part is already working - in simulation, at least.

What I really need to do is the simpler stuff that I outlined above:

- output a specific setpoint, and measure output and control variables for a period of time
- only after the first experiment is over, output a different setpoint, dependent on the output variable measured in the first part of the experiment, again, for some defined period of time
- calculate using the data obtained in the two experiments, then iterate

You can replace setpoint, output and control variables with any name you want, since that's not the part that I'm stuck - it's the algorithm itself.
__________________
Manoel Flores da Cunha
Mentor
Brazilian Machine
Team # 383
Reply With Quote