01-13-2014 08:53 AM
@vagmakman wrote:
I still cannot solve the ramp down problem. I cannot connect the file path to a loop with a ramp down code. It says i connected two terminals of different types. Can you be more detailed? I am quite new to labview.
Thank you all for your time anyway.
Best regards,
Evangelos
There you shouldn't be wiring the path to an existing terminal. Wiring a path to, say a terminal for a double, will give such an error. If you wire something to the edge of a loop (or through it to an indicator/control), it will CREATE the necessary terminal. But I think you may be getting hung up on the wrong aspect here. The key issue is to enforce "data flow". If you just have two loops sitting in the block diagram, there is no way to know which will run first. By wiring something related to the file save into the second loop, it ensures that the second loop will not run until AFTER data exists on the wire. In the case of the file path, this will only occur once the user has selected the file path. So we want something related to the file save section, it doesn't necessarily have to be the file path.
In terms of you actual ramp down, it's exactly the same as your ramp up with the numbers going down. take the highest value from your ramp, and send it to the second loop. Now in this loop, simply subtract instead of add. (make sure that auto-indexing is disabled so you get a single value instead of an array)
01-13-2014 09:25 AM
Thank you for your answer again.
I found a nice solution. The Flat Sequence structure.
There wasn't the problem to build the ramp down. Only the way to make it run after the ramp up and the save.
Problem solved for now. If I have any more difficulties I will ask again.
Best regards,
Evangelos
01-13-2014 10:07 AM
@vagmakman wrote:
Thank you for your answer again.
I found a nice solution. The Flat Sequence structure.
There wasn't the problem to build the ramp down. Only the way to make it run after the ramp up and the save.
Problem solved for now. If I have any more difficulties I will ask again.
Best regards,
Evangelos
Just my input, but the flat sequence structure is probably one of the worst solutions you could implement. There are multitudes of better ways than to force sequential execution with a flat sequence structure.
Before you dive off the deep end and devlop bad programming practices that will get you into big trouble down the road, please at least consider reading this tutorial first.