Announcement

Collapse
No announcement yet.

I can NOT use a 2D array in a Formula box.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • I can NOT use a 2D array in a Formula box.

    I have created a 5 down by 2 across array on the front panel.

    I have a Formula box with the array attached to an input variable named: Action_Array
    There are two lines from the array to the input variable.

    I have an output variable named: Left_Motor_Speed

    In the formula box I have written the line:

    Left_Motor_Speed = Action_Array[1][1];

    An error is displayed saying:

    Error on line 5 is marked by a '#' character: "... Action_Array[1][1];# "

    I have not been able to find any clue as to how to correct this.

  • #2
    Re: I can NOT use a 2D array in a Formula box.

    The attached VI works for me. If you can't figure it out based on the attached VI, it might be easiest if you posted yours (or even better yet, a simplified example).
    Attached Files
    Team 330 beta tester

    Comment


    • #3
      Re: I can NOT use a 2D array in a Formula box.

      Thanks for the example. My final testing code looked exactly like yours but mine would give the error I mentioned.
      I copied your Formula Box into my code and connected it to my array and it failed.
      I replaced my array with yours and it works.
      I didn't think to keep a copy of mine to see what the difference was between your array and mine.

      Oh well, the problem is gone and I thank your for the help.

      Comment

      Working...
      X