LAVA Forums Buy cool LAVA gear Forums RSS Feed

Welcome Guest ( Log In | Register )

> Related links

Check out our General Code Repository Files. Also, before posting here, check to see if your post doesn't fit into another subforum by category.


Tags
(This content has not been tagged yet)
 
Reply to this topic Start new topic
> For Next Loop
rimer
post Feb 13 2004, 03:45 PM
Post #1


I want a LabVIEW icon under my name!


Member
Posts: 3
Joined: 19-January 04
Member No.: 240
LV:6.1


I am totally new to Labview programming and I guess I haven't yet fully learned the ropes. unsure.gif
I have two numeric controls and a numeric indicator on the front panel. The two controls represent starting and ending values. I want to display the numbers from start value, start value plus one to end value sequentially on the display but only when I receive a (boolean?) response from the rest of the block diagram.
I hope someone can help. frusty.gif
Thanks!


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Ad
post Feb 13 2004, 03:45 PM
Post #















Tags
(This content has not been tagged yet)
Go to the top of the page
Quote Post
Norm Kirchner
post Feb 13 2004, 05:43 PM
Post #2


Extremely Active
****

Premium Member
Posts: 595
Joined: 8-December 03
From: Dallas, Texas
Member No.: 208
Using LabVIEW Since:2000
LV:8.6 ,8.2.1 ,7.1.1
United States us_texas us_ohio My Gallery


Something like this?
See attached picture

This post has been edited by njkirchner: Feb 13 2004, 05:43 PM
Attached thumbnail(s)
Attached Image
 

--------------------
Norman J. Kirchner Jr.
Automation Software Engineer

~,~ The Captain Was Here
Premium Blend


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
rimer
post Feb 13 2004, 06:19 PM
Post #3


I want a LabVIEW icon under my name!


Member
Posts: 3
Joined: 19-January 04
Member No.: 240
LV:6.1


Hello njkirchner ,

I am thankful for your quick response. I built and tried the vi and found that it counts up to n-1 rather than n. If my second numeric control is set to 10 the max count will be 9. Any ideas on fixing it? Also is there a way of resetting the numeric indicator to 0 at start up?
Much obliged! yes.gif


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Michael_Aivaliot...
post Feb 15 2004, 07:43 PM
Post #4


Confucius say: Crowded elevator always smell different to midget
Group Icon
*****

Admin
Posts: 2367
Joined: 13-October 02
From: Planet Earth
Member No.: 2
Using LabVIEW Since:1994
LV:8.5 ,8.2.1 ,7.1.1
Greece Canada United States My Blog My Gallery


I would recommend that you read-up on FOR loops... book.gif The loop will iterate for the number wired inthe the N terminal. All you need to do is +1 to that number and it will iterate one more time.

If you need to reset any control, you can use a local variable. You can use them to write 0's to the controls. Put the reset code outside, before you enter the loop.

--------------------


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
rimer
post Feb 15 2004, 07:47 PM
Post #5


I want a LabVIEW icon under my name!


Member
Posts: 3
Joined: 19-January 04
Member No.: 240
LV:6.1


oops.gif Thanks Michael,I will follow your advice!


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post

Reply to this topicStart new topic

 




Time is now: 1st December 2008 - 11:08 PM