LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help im stuck right now

Ok so I have built a function that will increase in increments that is specify and I am outputting it to a device to control it. Now this is the part i need help with I want to to hold at the setpoint that I can specify for a period of time then slowly decrease can anyone help im usisng labview 7.1

0 Kudos
Message 1 of 21
(3,215 Views)

Can you give an example of what you would like to see for a few iterations of the vi?

Tim
GHSP
0 Kudos
Message 2 of 21
(3,200 Views)

Im sorry I don't get what you are asking.

0 Kudos
Message 3 of 21
(3,181 Views)

It looks like you're trying to use a numeric counter in a loop as a substitute for a millisecond timer.

 

In my experience, this is not a good idea, because the timing is somewhat inconsistent and also because a millisecond timer is much easier to use.

 

What is the purpose of the inner loop?  Is it supposed to work like a delay timer that runs for X number of seconds?  Or is it supposed to prepare an array of Y values for the build waveform?

0 Kudos
Message 4 of 21
(3,178 Views)

It builds the Y values of the array and the interval will give the X value spacing.

0 Kudos
Message 5 of 21
(3,172 Views)

In that case, it can be greatly simplified.

 

The "Add 0" function obviously isn't doing you any good.

 

If you don't need it for timing, you can remove the Wait function.

 

The "Add 1" function and feedback node can be replaced with the "i" (iteration terminal).

 

A good rule of thumb for loops is: "If you know how many times it will run before it starts, use a For Loop.  If the number of times it runs is uncertain, use a While Loop."

 

It looks to me like you want to generate an array that goes from Init+0.001 to SetPoint by steps of 0.001.  The attached VI will do this. 

 

I realize this doesn't solve your problem yet, but I think it puts us a step towards figuring out what to do next.

 

Can you check this out and tell us what else is needed?

 

 

 

 

 

 

 

0 Kudos
Message 6 of 21
(3,165 Views)

Im using version 7.1 it wont let me open that file

0 Kudos
Message 7 of 21
(3,162 Views)

My version, 11, will only let me save back to 8.0.

 

Here's a screen cap:

 

Blockdiagram.jpg

0 Kudos
Message 8 of 21
(3,150 Views)

I think im going to leave it as it because I might have to change my step values to smooth out my function. I'm not going to be back in to work on this til monday morning at 8am you have been a great help hopefully you can continue helping me out that would be great.

0 Kudos
Message 9 of 21
(3,144 Views)

You might also want to check out the Ramp Pattern VI if you have it (not in LV base).

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 10 of 21
(3,134 Views)