10-13-2016 10:26 PM
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.
10-13-2016 10:40 PM - edited 10-13-2016 10:42 PM
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.
10-14-2016 12:41 AM
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?
10-14-2016 01:51 AM
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…
10-14-2016 01:54 AM
10-14-2016 02:01 AM - edited 10-14-2016 02:01 AM
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?
10-14-2016 02:26 AM - edited 10-14-2016 02:27 AM
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?
10-14-2016 05:29 AM
10-14-2016 10:22 AM - edited 10-14-2016 10:24 AM
Sorry, I double-posted due to the internet issue. This post can be deleted.
10-14-2016 10:22 AM
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.