LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

delete row from array permanently

After I "delete a row" from my table, it doesn't stay deleted. 

Method:
Submit a Waypoint (with numbers)
Manually Cycle to a new GPS row
Submit (another) Waypoint

You will see that the "deleted row" in the array did not actually go away.

How do I get the deleted row to stay deleted?

"Version 8.2"
0 Kudos
Message 1 of 3
(2,557 Views)
That's normal : you delete the row from the GPS List, but you rebuilt it from the data stored in the lower loop shift register ! You should add an event to the even structure to handle the row deletion,acting directly on the 2D double array. No need to have an independent loop !
Chilly Charly    (aka CC)
Message 2 of 3
(2,548 Views)

CC is exactly right. (as always!) 🙂

Some other points.

  • The table is only used as an indicator, so why do you make it a control? (right-click...change to indicator)
  • Value property nodes are very expensive, so use local variables instead. (Of course once the table is an indicator, you would just connect it in place of the property node in the lower loop and you don't need any locals or property nodes at all. :))
  • Your upper loop is extremely expensive, reading a boolean and a property node (property nodes are syncronous!) millions of times/second while not doing anything useful except taxing the CPU at 100%. Polling loops always need a small wait statement. (Again you actually don't need that loop at all). Place an indicator at the [i] terminal for an illustrative demonstration. 😮
  • Make the %motor control a DBL (right-click..representation). It makes no sense to have it as an integer that needs to be coerced to DBL later anyway.

As CC said, all you data is in the orange shift register at all times. All you need to do is delete an array from it in a second event case.

0 Kudos
Message 3 of 3
(2,539 Views)