LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

increment HOW TO help

Presently, you cannot change the step size of a loop (I'm working on fixing that).  What you can do is use a shift register initialized with a DBL constant.  Inside the loop, use the add function to change the shift register contents by the step size.  Use this shift register wire instead of the i terminal for an index.

 

21519i5FFA0179519A3EE7

- tbob

Inventor of the WORM Global
0 Kudos
Message 31 of 52
(1,020 Views)

 


@tbob wrote:

Presently, you cannot change the step size of a loop (I'm working on fixing that).


tbob means, of course, this idea: http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Real-For-Loop/idi-p/1211713

 

 

I don't tbob is planning to rewrite LabVIEW starting with the for loop. Smiley Wink

Message 32 of 52
(1,009 Views)

 


@NIquist wrote:

I saw that! Smiley Tongue You figured out the 'Add.vi' would work didn't you?  You're starting to get it! Smiley Happy

 

I would still suggest you look at the LabVIEW 101 tutorials.  Once you get comfortable with LV basics it becomes a lot more fun to program with it.


 

I guess i wrote too soon.  I thought you had worked out tbob's solution on your own.  Let me re-quote myself:

"I would still suggest you look at the LabVIEW 101 tutorials.  Once you get comfortable with LV basics it becomes a lot more fun to program with it."

 

tbob, what do you mean 'you're working on that'?!?  How can you execute a fraction of a loop???

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 33 of 52
(1,008 Views)

Wow smercurio.  So you read minds too! Smiley Very Happy

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 34 of 52
(1,001 Views)

The idea isn't new.  In text based languages, you can set the start, stop, and step size of a for loop.  Others proposed the idea for Labview, so did I.  But my wording was not the best, and newer ideas came up in the discussion.  99% of the times, the For Loop is OK as it is.  I am working on presenting the idea again, but with a big twist.  The change would be an option, sort of like right clicking to get a conditional terminal in a for loop.  Most of the times, we don't use this, and we even forget its there.  But when you need it, it is available.  Watch for the new post in the idea exchange forum in the near future.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 35 of 52
(991 Views)

Gothcha tbob!  I've already read the Idea Exchange thread.  It's a good idea that needs careful thinking through.  I'll be sure to look for your new IE post.

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 36 of 52
(981 Views)

So I copy this ??

 

Example_VI_BD.png

 

into this:

dataflow.JPG

 

 

I tried to just copy first "circuit" but labview appears error

21521i26F8365D999F6651

 

 

_________________________
Rookie; LV 2011 on WIN 7
0 Kudos
Message 37 of 52
(974 Views)

If you had studied the tutorials like you have been asked a number of times, you wouldn't be asking basic questions like this.  Our time as volunteers is limited.  We don't have time to teach labview to everone who posts here.  DO THE TUTORIALS, NOW.

 

Read the error message.  It tells you that the output is an array and your indicator is not.  Fixing this would be very very trivial if you would just make an effort to learn Labview on your own.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 38 of 52
(965 Views)

Ok, I make this(check it), but why I need now step and array? I only need step 0-1 (user define), and you said that loop can't do this, so i must use array....

_________________________
Rookie; LV 2011 on WIN 7
0 Kudos
Message 39 of 52
(957 Views)

No, you're still not getting it.  You can use a for loop OR a while loop.  You don't need both in this very simple application.  If you have the while loop version (bottom picture) working with your hardware then you need to use the shift register idea in the for loop (top picture) version, but put it in the while loop!  You can right-click the border of the while loop and add a shift register.  Then, wire it up the same way as in the top picture. You will need to modify the way the loop is stopped.  You should be able to work that out.  Please try at least.

 

Also, you should change the name of your Array indicator.  It is NOT an array, it is just a double.  That is confusing.

 

 

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^{
Message 40 of 52
(952 Views)