LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I create a VI which sweeps from 1000 to 11000 then back to 1000 again


Hi

I feel like a newb asking this question considering that the last thing I did was a GPIB interfacing program, but I'm trying to create a VI which simple sweeps a number starting at 1000, up to 11000 then goes back down to 1000 again, the steps are taken in increments of 1000, attached is a program which almost accomplishes this goal, except that when I give out a positive number it just goes 11000,10000,11000,10000 so on and so forth, any help would be appreciated.

0 Kudos
Message 1 of 4
(2,292 Views)

Instead of analyzing your code to understand exactly what causes this to happen (I don't like nested conditions which look like that), I will just suggest that you take a more simple approach. Attached is one example - if it needs to go up, it goes up, and if it needs to go down, it goes down. This could probably be made more efficient and simple, but this is just a quick example.

To learn more about LabVIEW, I suggest you try searching this site and google for LabVIEW tutorials. Here and here are a couple you can start with. You can also contact your local NI office and join one of their courses.
In addition, I suggest you read the LabVIEW style guide and the LabVIEW user manual (Help>>Search the LabVIEW Bookshelf).


___________________
Try to take over the world!
0 Kudos
Message 2 of 4
(2,275 Views)
Not sure if I understood you correctly but I think something like this might be what you want.
0 Kudos
Message 3 of 4
(2,274 Views)

See attached VI. I guess Sweep 4 is what you need.

0 Kudos
Message 4 of 4
(2,273 Views)