LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to set a set point number to be performed automatically?

I created this VI where it is required to manually set the set point. I would like to make this automatic and increase the set point by 10 degrees celsius each time.
The temperature will have to vary between 0 and 100 degrees.
How can I do it?

0 Kudos
Message 1 of 12
(2,743 Views)

Have you taken the LabVIEW Tutorials?  Do you understand the concept of a "loop", doing something (say) 11 times?  If you have an index for a Loop that runs for 11 times and takes on the values 0, 1, ... 10, can you think of a way to transform this index into a "set point" that takes on the values 0, 10, ... 100?

 

Bob Schor

0 Kudos
Message 2 of 12
(2,704 Views)

All you probably need is a simple state machine. (A top level FOR loop is very unusual.)

 


@giu95se wrote:

... automatic and increase the set point by 10 degrees celsius each time.


What does "each time" mean?

  • Every time the current setpoint is reached, no matter how long that takes?
  • After a defined elapsed time?

 

Overall, your current code is very dangerous. For example if there is an error, the inner while loop can never complete and the program cannot be stopped gracefully. This does not sound reasonable.

0 Kudos
Message 3 of 12
(2,669 Views)

yes I'm still trying hard to figure out how to set it all up.
Basically what I want my script to do is: set the calibrator to a certain temperature and once this temperature is reached, carry out a resistance measurement using the multimeter.
I would like to make the set point setting automatic and start the new cycle of measurements every time the calibrator reaches the set point considered and the multimeter makes the resistance measurement.

0 Kudos
Message 4 of 12
(2,624 Views)

So you have two states:

  1. Outside setpoint limits
  2. Within setpoint limits

In state 1 you equilibrate temperature and in state 2 you take a measurement and go to the next setpoint. Wash, rinse, repeat until you run out of setpoints.

 

Here's a very simple example that might give you some ideas.

 

(I took some shortcuts, so make sure to not take two measurements if two successive reading are in range. Hint: wait until one reading is out of range before waiting for the next measurement)

0 Kudos
Message 5 of 12
(2,597 Views)

the problem is that what I want is to set the setpoint as a command to my calibrator. This setpoint on my calibrator must be reset every time the measurements are finished.

0 Kudos
Message 6 of 12
(2,575 Views)

@giu95se wrote:

the problem is that what I want is to set the setpoint as a command to my calibrator. This setpoint on my calibrator must be reset every time the measurements are finished.


OK, so that's a new problem. Please describe what you mean by "reset". Your description is very ambiguous. Reset to what? Should be trivial to modify, right?

0 Kudos
Message 7 of 12
(2,570 Views)

in practice I want to set the calibrator at different temperatures 0,10,20,30,40,50 .... up to 100 C.
Then, I set the first setpoint of 20 degrees and wait until the calibrator reaches this temperature verifying that the last 5 samples are the same (by means of the counter).
Once the 20 degree setpoint has been reached, I take the resistance measurement with the multimeter. Once all these operations have been completed, I want it to restart automatically by setting the new setpoint (for example s = 30) and all calculations to be done again.

0 Kudos
Message 8 of 12
(2,567 Views)

The term "5 samples are the same" is vague without specifying a certain allowed range. We should never do equal comparisons with DBL.

 

Still, just whenever a new setpoint is reached, start counting. Do you have problems with implementing that?

 

As I said, the secret is a "state machine". Now you have four states:

 

  1. ramping to the new temperature
  2. start counting at setpoint
  3. take measurement
  4. Set new setpoint.
0 Kudos
Message 9 of 12
(2,553 Views)

what blocks should I use to make the machine read one value at a time when entering?

0 Kudos
Message 10 of 12
(2,531 Views)