From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ploting setpoint and setpoint ramp

I've got it going now, but it has some bugs if you change the setpoint while ramping and I'm unsure how to add a delay prior to starting a ramp.  Any suggestions?

0 Kudos
Message 11 of 12
(309 Views)

Consider using shift registers to retain the value of your data between iterations of the while loop, similar to a standard state machine. Your code is already close to the state machine architecture (case structure inside a while loop) so it probably wouldn't be a huge change to your code. If you decided to go for a state machine you could have an emun with cases like "setpoint change," "ramping," "delay," etc. Just something to consider, here's some resources if you'd like more information:

 

State Machines

 

Shift Registers: Passing Values between Loop Iterations

 

It looks like you are getting closer to a fully functional application, keep us updated.

 

Tim W.

Applications Engineering

National Instruments

http://www.ni.com/support 

0 Kudos
Message 12 of 12
(303 Views)