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

07-15-2019 12:52 PM

Options

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

I am entering this formula :

z = -10*log((10**((x)/10))-(10**(-(y)/10))); in the formula node. An error is displayed. Error on line 1 is marked by a '#' character: "... = -10*log((10**((x)#/10))-(10**(-(y)/10" Formula node: array indexing expected. Did not get it. Please provide me with a solution

Highlighted
Options

07-15-2019 01:24 PM - edited 07-15-2019 01:29 PM

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

Hi Chhavi,

Did not get it.

So you wire an array to your formula node - and don't get the error ""array indexing expected"?

Why use a formula node at all?

Because of famous polymorphism you can easily replace the controls/indicators by arrays…

Best regards,

GerdW

CLAD expired, using 2009SP1 + LV2011SP1 + LV2017 (+LV2018 sometimes) on Win7+cRIO

Kudos are welcome

GerdW

CLAD expired, using 2009SP1 + LV2011SP1 + LV2017 (+LV2018 sometimes) on Win7+cRIO

Kudos are welcome

07-16-2019 06:16 AM

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

A for loop around the expression node would work too.

Indeed, no reason for the FN...

LabVIEW Programming ((make LV more popular, read this)

07-16-2019 07:19 AM

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

07-16-2019 12:28 PM - edited 07-16-2019 12:29 PM

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

I abhor the formula node for the simple reason that you have no chance for syntax error using native math primitives instead. (My typing is, well... bad.)

Bill

(Mid-Level minion.)

My support system ensures that I don't look totally incompetent.

Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

Humble author of the CLAD Nugget.

(Mid-Level minion.)

My support system ensures that I don't look totally incompetent.

Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

Humble author of the CLAD Nugget.

07-17-2019 02:16 AM

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

I do like expression nodes for simple scaling, like going from mm to m and vice versa.

A typical bug with the formula node and expression node is related to the fact that we use commas as separators over here. And when you use a number with a comma, you can get a valid expression, but not a valid result:

y=x*12,34;

This results in y=12 for x=1, not y=12,34!

LabVIEW Programming ((make LV more popular, read this)

07-17-2019 04:49 AM

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

Moreover, you can't inline a subvi, which has an expression node or formula node within

that's the main reason we use those structures only for prototyping

here's my favorite:

http://zone.ni.com/reference/en-XX/help/371361R-01/lvinstio/degrees_to_radians/