LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

dynamic picture

Solved!
Go to solution

Hello. I need show object position  in a 2D indicator. 

 

I have a background , an object and  3 datas (x,y,z) for position  you can see in attachment. 

 

I want this: when x,y,z values sum are not equal 0 (-x+x, -y+y, -z+z) my object changing position.

 

You can think x and z values like angle (if x sum >0 => z sum<0). 

 

Is my prolem clear and Can anyone help me.

 

Thanks.

Download All
0 Kudos
Message 1 of 7
(3,069 Views)

Hi keremgeliz,

 

you need to draw your picture with the coordinates you calculate from your xyz values. When those values change you draw that image again…

 

You can get this cheaper by putting your bg as decoration in the background and using your "object" to customize a boolean button with. Then all you need to do is setting the position of that button using its properties…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 7
(3,057 Views)

Hi GerdW Thanks for your interest. Now i create a vi (on attachment) But still have big problems. 

I cant use 3 coordinates in a 2D indicator. But i think its not problem for me because x = - z 

Now i dont know how can i change x (angle) position in picture indicator.

 

So i need  your help still.

 

Best Regards

Kerem

Download All
0 Kudos
Message 3 of 7
(3,044 Views)

Hi kerim,

 

a small solution using some basic math (and complex numbers):
check.png

As I said before: calculate the coordinates of your "object" and draw it in a 2D picture indicator…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 7
(3,023 Views)

Hi GerdW,

 

Now i am using your draws for my background but I have to use my original object (its cannot drawable with LV). 

 

So that i need change my object angle with "draw unflatten pixmap.vi" i think but different data types with complex data (in my attachment)

 

Or i need otherwise (i dont know how).

 

Best Regards.

Kerem

 

0 Kudos
Message 5 of 7
(3,010 Views)
Solution
Accepted by topic author keremgeliz

Hi Kerem,

 

you cannot rotate your image like that.

The point array is generated just for the DrawPoints function I used in my example!

 

But there are several threads in the forum that discuss how to rotate image data. Do a little search…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 6 of 7
(2,998 Views)

Thank you so much GerdW i found my solution in forums with your help 

 

http://forums.ni.com/t5/LabVIEW/Example-quot-Rotate-Vase-vi-quot/td-p/1007524/highlight/true/page/2

 

This link is my solution.

 

 

0 Kudos
Message 7 of 7
(2,986 Views)