annulla
Visualizzazione dei risultati per 
Cerca invece 
Intendevi dire: 

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
Messaggio 1 di 15
5.101Visualizzazioni
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.
Messaggio 2 di 15
5.085Visualizzazioni
Ah, errors, what are they for again? Smiley Molto-felice

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

Shane.
0 Kudos
Messaggio 3 di 15
5.081Visualizzazioni
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
Messaggio 4 di 15
5.073Visualizzazioni
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
Scarica tutti
Messaggio 5 di 15
5.065Visualizzazioni
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
Messaggio 6 di 15
5.045Visualizzazioni

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
Scarica tutti
Messaggio 7 di 15
5.038Visualizzazioni
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
Messaggio 8 di 15
5.032Visualizzazioni


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.
Messaggio 9 di 15
5.018Visualizzazioni
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
Messaggio 10 di 15
5.015Visualizzazioni