LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to control the movement of a custom picture in Labview 8.6?

Hello everyone, I'm new to labview programming. I've found that we can insert a custom picture by simply dragging it into the front panel, but I don't know how to change its attributes in my program. For instance, I want to make the picture move down (Changing the Y coordinate) via a loop, then what should I do? Thanks in advance. 

0 Kudos
Message 1 of 13
(4,115 Views)

You'd be better off placing the picture into a 2D Picture control.  You can use property nodes of that control to move it around.

0 Kudos
Message 2 of 13
(4,103 Views)

RavensFan 已写:

You'd be better off placing the picture into a 2D Picture control.  You can use property nodes of that control to move it around.


Thank you for your reply. Would you mind telling me where can I find the 2D picture control? In the front panel or the program panel? 

0 Kudos
Message 3 of 13
(4,084 Views)

Hi Jacobi,

 

where can I find the 2D picture control? In the front panel or the program panel?

Well, you will find this control where all controls can be found: in the front panel. (This is pretty basic LabVIEW stuff - you did take the free beginner courses offered by NI?)

In the BD (block diagram, not "program panel") you will find functions you can use to draw in 2D picture controls…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 13
(4,066 Views)
Hi jacob, you can find that on the Graph palette >>controls>>2D picture control
Venugopal
0 Kudos
Message 5 of 13
(4,064 Views)

GerdW 已写:

Hi Jacobi,

 

where can I find the 2D picture control? In the front panel or the program panel?

Well, you will find this control where all controls can be found: in the front panel. (This is pretty basic LabVIEW stuff - you did take the free beginner courses offered by NI?)

In the BD (block diagram, not "program panel") you will find functions you can use to draw in 2D picture controls…


Oh, it's my fault that I forgot to mention that I don't use an english version of labview, sorry. But now I think I've found the 2D picture in the front panel. I don't want to draw in it and I just want to control a *.png's movement, so how can I do that? 

 

VenuGopal@57 已写:
Hi jacob, you can find that on the Graph palette >>controls>>2D picture control

Yes, I've now found it, thanks. What do you think of the movement issue? And how to attach a *.png to this controller? 

 

0 Kudos
Message 6 of 13
(4,061 Views)

Hi Jacobi,

 

I don't want to draw in it and I just want to control a *.png's movement, so how can I do that?

Well, you need to "draw" that PNG into the 2DPictureIndicator. There is a function to load PNG images and another function to draw that image into the control. Check the picture functions palette… (I think there are also example VIs explaining exactly the task of loading an image and displaying it: did you check them?)

To move the PNG (or better: move the indicator, that displays the PNG) you need to use properties of that indicator. There is a property to read/write the position of the indicator with respect to it's pane origin…

 

Most of this is pretty easy: Did you take the free beginner courses offered by NI on their website?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 13
(4,051 Views)
Hi jacobi, So, If you don't want to draw. then simply get that image into the 2D picture control and by using property node or invoke node change the position of the 2D picControl . i am not sure this is what you give more details about your task
Venugopal
0 Kudos
Message 8 of 13
(4,012 Views)

Sorry, I double-posted due to the internet issue. This post can be deleted. 

0 Kudos
Message 9 of 13
(3,991 Views)

GerdW 已写:

Hi Jacobi,

 

I don't want to draw in it and I just want to control a *.png's movement, so how can I do that?

Well, you need to "draw" that PNG into the 2DPictureIndicator. There is a function to load PNG images and another function to draw that image into the control. Check the picture functions palette… (I think there are also example VIs explaining exactly the task of loading an image and displaying it: did you check them?)

To move the PNG (or better: move the indicator, that displays the PNG) you need to use properties of that indicator. There is a property to read/write the position of the indicator with respect to it's pane origin…

 


VenuGopal@57 已写:
Hi jacobi, So, If you don't want to draw. then simply get that image into the 2D picture control and by using property node or invoke node change the position of the 2D picControl . i am not sure this is what you give more details about your task

Thank you for your information. I now uses such a structure to load an image, can it be used here for this specific purpose? 


Most of this is pretty easy: Did you take the free beginner courses offered by NI on their website?


Please, don't be so ironic. A course requires us to acquire the basic knowledge of labview in a very short period time, so I can't learn it systematically now. Perhaps I will take the courses afterwards.

0 Kudos
Message 10 of 13
(3,990 Views)