LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What is the best/most effective way to dynamically build a timed loop in LabView?

I am relatively new to labview (not to code in general) and am looking for the "LabVIEW" way to dynamically build a timed loop. This is what I am trying to accomplish: I have several heaters controlled through labview using Labview's PID toolkit. This works great. I have no issues with DAQ in general. However, throughout an experiment, I want to change the set point of each heater. I could set this up fairly easily using either a timed loop or the wait vi if I knew exactly how many different set points there would be. If possible, I would like to be able to read in a config file that includes the different times and set points for all heaters and dynamically create a loop that can handle this. I have tried using the Elapsed Time vi with an array of time targets; however that didn't seem to work. Has anyone been able to do this? Does anyone know where I could learn about using LabView in this manner? All help is appreciated.
0 Kudos
Message 1 of 3
(2,089 Views)


@DHagan wrote:
I am relatively new to labview (not to code in general) and am looking for the "LabVIEW" way to dynamically build a timed loop. This is what I am trying to accomplish: I have several heaters controlled through labview using Labview's PID toolkit. This works great. I have no issues with DAQ in general. However, throughout an experiment, I want to change the set point of each heater. I could set this up fairly easily using either a timed loop or the wait vi if I knew exactly how many different set points there would be. If possible, I would like to be able to read in a config file that includes the different times and set points for all heaters and dynamically create a loop that can handle this. I have tried using the Elapsed Time vi with an array of time targets; however that didn't seem to work. Has anyone been able to do this? Does anyone know where I could learn about using LabView in this manner? All help is appreciated.

Write a tab-separated spreadsheet file makes it easy to use the write/read from spreadsheet files. Assuming you have a 2D-array of your times and set points it's just a question of setting up a for-loop going through the array row-by-row and extract the elements (expanded index array) to set your points and wait time.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 3
(2,066 Views)

So I already have set up a 2D array to input the times in one column and values in another column. I am also able to read this in from a file if needed. My biggest concern is with actually being able to execute it properly.

 

As of now, I have a for loop that is executed n (length of the array) times; however, it seems that it is executed immideately even before any of the values change. I am using a timed loop method as seen in the attached image. 

0 Kudos
Message 3 of 3
(2,045 Views)