10-24-2017 08:34 AM
Hi all, I am trying to solve the following issue: Problem set:
To controll a pressure profile I utilize the PID setpoint profile function to set a time - setpoint profile. The VI asks for absolut time
time setpoint
10 5
20 10
50 10
100 0
This input sets the following profile:
10 s to 5 bar
10 s to 10 bar
20 s at 10 bar
30 s to 0 bar.
As you can see this is not very user friendly, especially with more complicated profiles.
More useful would be to have an array where the user enters the time for EACH segment and using an array operation with a foor loop to generate the absolute value time table the subVI asks for.
The VI I try to find should add the segment time cumulatively and update the n-1 entry in the array after each iteration of the loop so that the last segment time is added to the sum of all previous segment times.
Basically read n value from input array add to n-1 value write to new array
next step is to read the next value from the input table and add to the sum of the previous iteration so that
5
10
3
1
becomes
5
15
18
19
I very much appreciate your suggestions and help.
, e.g. 5s 10bar, 15s 20 bar, 60s 20bar the segment looks like compressing for 20 bar in 5 seconds, changing to 20 bar in 10s and holding 20 bar for 40s. This is not very inutitiv espcially for complicated profiles. It is much easier to have an imput with realtive time, e.g. relative run time of the segment.
I tried several versions of using an array combined with a for loop and shift register
10-24-2017 08:45 AM
@fuSi0nized wrote:
I tried several versions of using an array combined with a for loop and shift register
A For Loop and shift register is exactly what you need. Why don't you post whichever version of your VI that you felt came the closest to what you want, and then we can help you figure out where you need to fix it.
10-24-2017 08:46 AM
10-24-2017 09:14 AM
Thanky you for your fast responses.
I solved the problem. Beforehand, I had no array to write my data into. The data was written to the input table. Solution was to create a new table using build table and apend the table after each iteration.
@Gerd you got me wrong I just ask for a hint and not the complete solution.
10-24-2017 09:20 AM - edited 10-24-2017 09:22 AM
Hi fusi,
@Gerd you got me wrong I just ask for a hint and not the complete solution
Well, you got hints from us… 😄
In your VI you don't need this additional BuildArray function in the loop: use an autoindexing output to create your Array2!
10-24-2017 09:28 AM
Thank you very much, this is a neat simplifcation.
Regards,