LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating Multiple Segments Of Temperature Control

Hi,

 

It's been a long time since I used LabView and now I have a job working with it. I'm trying to figure out if what the user wants is even possible.

 

I have a value (temperature) that I would like to increase and decrease slowly over long periods of time. I need to have control over the start value, stop value and time it will take to make the change. The complication lies that I now need to be able to create multiples of these, and allow the user to repeat some and not others. For example, I might want to cycle the temp from 40 to 50 and back to 40 about 20 times then go from 50 - 60 20 times. The extra tough thing is they would like a csv file or table where they can enter all this and choose how many times to cycle or not.

 

I was thinking some kind of for loop for each segment, but I'm not sure how I can automatically create a stacked sequence that will run through all these values.

 

If anybody has even a starting point on this that would be great.

 

Thanks.

0 Kudos
Message 1 of 5
(2,353 Views)

Chris,

 

I have done something similar several years ago.  I no longer have the program so I cannot post an example and am describing this from old memory.

 

The data was stored as an array of clusters.  Each cluster contained a description of one segment.  It had start and end values or start and slope values.  It also had timing information.  For the project I did all the segments could be repeated but not in groups as you require.  To do the group repeats I might add a group identifier to each cluster along with a number of repeats or other ending criteria.

 

I had one cluster or a group of individual controls similar to the ones in the cluster for the user interface. The user only worked on entering one segment at a time. There was an Enter or Save button to put the data into the array.  I also had a graph which showed the user the time and temperature relationship visually.

 

Once you have worked out a data structure, reading it from a csv file should not be difficult.  Put headers in the first row with the names of the controls in the segment cluster.  Then each successive row has the numeric values for each segment.  Plan and document carefully how the data is to be structured and it shoudl be OK.  Pay particular attention to how the repeats are to be descibed in the file.

 

This is one of those things which is not so much difficult as tedious and requiring meticulous attention to details.  I suggest you consider several options and perhps try some simple VIs and csv files to see what will work the best for your application.  Make sure that the "they" who want this get to play with your ideas before you commit a huge amount of time to developing the code.  Also consider any extra features they might want to add, just about the time you get things working. For one thing this means make the cluster a type def so that changes can be done with minimal impact on existing code.

 

Lynn

0 Kudos
Message 2 of 5
(2,348 Views)

Sounds like a job for an array of cluster where each cluster contains controls for StartTemp, StopTemp, Duration.

 

Read from csv into array and iterate through array with FOR loop.

 

 

0 Kudos
Message 3 of 5
(2,347 Views)

Thanks for your help, that looks like where I'm headed.

0 Kudos
Message 4 of 5
(2,336 Views)

Hi,

 

Just jumping in here.  You might consider a case structure with the start temp , stop temp, and a timer check states ( and all the init and save data stuff).

 

Then use a parser to read the file, and store all the state commands into a queue.  There would be checks in the main loop ( holding the case structure) for stopping, etc...

 

 

Two cents 🙂

 

 

 

-------
Mark Ramsdale
-------
0 Kudos
Message 5 of 5
(2,333 Views)