Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

03-24-2016 12:43 AM

Options

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Hi,

I;m trying to use for loop in formula node but it is not working. I want the output (y1) produce value in certain range (a and d, of course a is smaller than d). I' not using primitive labview since a and d are keep changing (both are variables). I did try to put "return 0;" after equation y1 but the error popup.

The issue for loop not working since it gives last value ( i mean 'd') . It not start with a value (initial).

Please help me how to solve this..

Pls ignore other variables that not used in equation. Thank you!! very much

Solved! Go to Solution.

Solution

Accepted by topic author rina

03-24-2016 02:30 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Your code is working.

But why you use loop?

You get last value, so you can get it in one step with correct x;

Also why you say that can't use primitives?

If you use wires instead of terminals or local variables states of values keep constant.

y1, y1_2, y1 3 is the same values calculated different ways.

03-27-2016 08:48 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

many thanks!! after lil bit changes, it works for my case..