LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

2D Cartesian Coordinate Rotation bug?

I am seeing unusual behaviour in a program I'm working on.

When performing a 2D cartesian rotation, normally things are fine but when I feed it X and Y arrays with zero elements, it seems to "remember" the last set of data sent to it and outputs basically the last set of data instead of size zero arrays.....

Can anyone reproduce this?  Is this fixed in later versions? I'm using LV 8.2.1, and can't use a different version because the customer insists on it.



Shane.


Message Edited by Intaris on 08-12-2008 07:55 AM
0 Kudos
Message 1 of 15
(3,773 Views)
I'm using 8.2 and I don't see that behavior. The function does output an error if you feed in empty arrays, though.
Message 2 of 15
(3,757 Views)
Ah, errors, what are they for again? Smiley Very Happy

I thought I had one once, but then I found out I was mistaken.....

Shane.
0 Kudos
Message 3 of 15
(3,753 Views)
It DOES give an error (not an error cluster, an error number....) but it still gives out the previously entered set of data.

I think this is not the expected behaviour.

Please try out the attached VI.

Oh, and try to enter data before running the VI, I forgot the "Make current values default" step.  Doh!

I'm using 8.2.1.

Shane.


Message Edited by Intaris on 08-12-2008 11:04 AM
0 Kudos
Message 4 of 15
(3,745 Views)
I see the behavior in your implementation, but I did not see the behavior in the implementation I had put together:

or this one:


VERY strange.



Message Edited by smercurio_fc on 08-12-2008 11:17 AM
Download All
Message 5 of 15
(3,737 Views)
smercurio,

thanks for having a look at the issue.

Can you try to make an example similar to mine where I'm calling the SAME vi instance (yours have two copies of the same VI - theoretically no difference since it's not actually set to reentrant, even if the DLL call within IS) first with data, and then without?

My Computer has been a bit wierd (LV crashed on me today and otherwise behaves strange sometimes).  If you can re-create my VI without problems, then I think I need a re-install the OS and everything else..  It IS about time, but I hate doing it.

I really hope you can reproduce it.  I hate reinstalls.

Shane.
0 Kudos
Message 6 of 15
(3,717 Views)

Shane, I can fully reproduce this in LabVIEW 8.5.1, so I think it is a bug.

Such a VI should NOT output stale data if the inputs are empty arrays!

Attached is a demonstration of the problem and workaround using complex math. 😉

(I strongly prefer using complex data for xy graph. It is so much cleaner. ;))



Message Edited by altenbach on 08-12-2008 12:22 PM
Download All
Message 7 of 15
(3,710 Views)
Thanks altenbach,

I thought I was going crazy (or my PC was haunted by data past...)

I'll file a Bug report.

Regarding the complex numbers, I came across that the other day reading up on the different data types an XY graph accepts.  How's it performance-wise.  Sure beats a for loop with a bundle in it.....

Shane.
0 Kudos
Message 8 of 15
(3,704 Views)


Intaris wrote:
Sure beats a for loop with a bundle in it.....

Well, you can also bundle the x and y array without the loop
 
(Go back to your code, right-click the inner FOR loop, and "remove for loop".)
 
======> Look, no broken wires, just different colors!!
 
I have not done much benchmarking, but I don't expect the differences to be dramatic (not orders of magnitude ;)).
 
 
Don't forget to also post a link to here in the August 2008 Bug thread.
Message 9 of 15
(3,690 Views)
Yeah, it'll take an Array for X and an Array for Y, but only when there's a single plot, no?

I generally stick to the Array of clusters of Array of X and Y points because it's easily extended to multiple plots without breaking all the code dealing with the data.

Having said that, I think I might need to re-think the benefits versus the burden.....

Shane.
0 Kudos
Message 10 of 15
(3,687 Views)