06-20-2019 07:04 AM
Hi all,
I'm trying to run 2 instruments concurrently using the PID setpoint profile but I'm having trouble setting up the time to work properly. In the time column, if I want the program to change values every 5 seconds, I have to set each value in ascending order as 5,10,15,20, etc.
What I'd like to do is just input 5,5,5,5,etc. in the column as I need second precision and changes in the order of 100k seconds. Having to add all of the previous values up and add them to the next row is a massive pain. I know there will likely be some simple way to programatically add the time together as the loop runs but I'm just not LV enough to see it.
Any help would be appreciated.
Solved! Go to Solution.
06-20-2019 08:09 AM
Hi Potticary,
your current VI will iterate of all elements of the "Setpoint" array - and will wait for 1s for each element.
After all that waiting the loop outputs two arrays, fed into those PIDSetpointProfile functions.
Whats the point of waiting all that long in the FOR loop?
06-20-2019 08:31 AM
No point of the wait whatsoever. I was trying something just before I posted and forgot to remove it.
Sorry.
06-20-2019 08:49 AM
Hi Potticary,
What I'd like to do is just input 5,5,5,5,etc. in the column as I need second precision and changes in the order of 100k seconds.
What is a "second precision"? What are "changes in the order or 100k seconds"?
Having to add all of the previous values up and add them to the next row is a massive pain.
I don't know what you are trying to "add up" and "add to next row"…
The PIDSetpointProfile expects an array of clusters, consisting of a time and a setpoint. Nothing to "add up"…
06-20-2019 09:03 AM
What is a "second precision"? What are "changes in the order or 100k seconds"?
I need the profile to change with second precision, e.g. I may need a step to be 3487 seconds (i.e. I can't break it down into minutes or hours). I also need to make steps of the order of 100k seconds, e.g. a step may be 246099 seconds.
I don't know what you are trying to "add up" and "add to next row"…
If I'm running a temperature controller with which I need a 1 hour ramp to 55 degrees and then a 5 min decrease to -5 degrees and a hold of 30 mins. Currently those three rows work if they read:
55 | 3600
-5 | 3900
-5 | 5700
The time values have to be the sum of all values before it + the new value. What I'd like to be able to do is:
55 | 3600
-5 | 300
-5 | 1800
Unless I'm missing the point altogether.
06-20-2019 09:07 AM
Hi Potticary,
so you want to use shift register in that FOR loop to sum up the "Time" values?
Why don't you use a shift register then?
(This is pretty basic LabVIEW stuff, but I guess you already know that Training section in the header of this LabVIEW board!?)
06-20-2019 09:21 AM
Everythings basic to those that know how to use it, huh?
No problem, most of the language used in context help and the training resources fly straight over my head, so are no good to me without weeks to read manuals. At least I can look up shift registers now!
I apologise for being too beginner to be on the forums and deserve the belittling, but I'm sure it would have taken me weeks to find what I was looking for on my own.
Thanks.