LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

plotting XY graphs - with negative numbers

hi!

i have two arrays..

the array A and B

i connected the 2 arrays with XY graph, because i want to plot the data contains to the two arrays

the problem is that the XY graph don't plot the negative elements...

why??

thanks a lot!!

andrikos
0 Kudos
Message 1 of 13
(5,239 Views)
hi,
 
I can see the problem that you mention. See the picture.
 


Message Edited by Jorge Amaral on 04-05-2008 05:56 PM
Software developer
www.mcm-electronics.com





PORTUGAL
0 Kudos
Message 2 of 13
(5,233 Views)

Please attach a simplified version of your code and some data.

Some things to check:

  1. Set the axes to autoscaling to make sure all data shows
  2. I assume A=X and B=Y. Are both arrays the same lenght?
  3. Are you using the express XY graph?

 

 

0 Kudos
Message 3 of 13
(5,220 Views)
i attach a photo from the block diagram..

the arrays have the same length

i have the autoscale and it don;t plot the negative elements..

y?

is the same type of arrays..

thanks!

andrikos



0 Kudos
Message 4 of 13
(5,194 Views)

Something is missing on your code image, because you have indicators on both sides and no data source. We cannot see where the data is coming from!

What are the datatytpes of the various wires? (enable the context help and hover over the wires)

Please attach your real code, it is impossible to tell from a picture what's wrong.

0 Kudos
Message 5 of 13
(5,187 Views)
this was a segment of the whole program.. it was very big and i attached a segment of this..

and now..

i attach the whole program..

the programm has 3 stages.

in the first stage i take the data from an optical mouse.. about movements and the buttons..

in the second stage i decode the data

in the third stage, i plot the movement of the mouse

in the two arrays i have the X and Y movements..

thanks!

andrikos
0 Kudos
Message 6 of 13
(5,178 Views)

Looks like your arrays are possibly unsigned integers (U32) which don't have negative numbers.

Data representation is a mess in general. Look at all the the coercion dots. You are using I32 and U32 indicators on the same wire!

(Your sequence structure has no purpose and only complicates the code.. You can delete it with no change in outcome. You could use autoindexing at the FOR loop. You could use a single "index array" resized to the desired number of outputs instead of all these instances, etc... Your "integration" code is very convoluted and does way to many calculations.)

It really would be much easier if you would attach the actual VI! Thanks. 🙂

0 Kudos
Message 7 of 13
(5,170 Views)
i deleted all the arrays..

but i have the same problem again..

it don't plot the negative elements..

i attach the vi.. 🙂

pls.. help me..

thanks a lot!

andrikos

0 Kudos
Message 8 of 13
(5,159 Views)
These arrays were just indicators. You need to change the data itself. Easiest would be to insert "ToI32" after "boolean array to number".
 


Message Edited by altenbach on 04-06-2008 05:03 PM
0 Kudos
Message 9 of 13
(5,149 Views)


andrikoscy wrote:
i attach a photo from the block diagram..




Please don't upload large bitmap files with your message.Smiley Mad  Your attached file is actually .bmp that was renamed to .jpg.  Please make it a Jpeg before uploading, or better yet a .png.
0 Kudos
Message 10 of 13
(5,139 Views)