Jump to content

Custom made Graphics


Recommended Posts

Hello everyone.

I have a rotating holder that holds 6 different material samples. This rotating holder is mounted in the centre onto a small motor that rotates the sample holder. The project that I'm involved in is quite big and is to do with Dispersive Fourier Transform Spetroscopy (DFTS), and by this I measure the dielectric properties of different materials. Anyway, most of it is going fine but I'm using now LabView to controll the device, and at the moment I am stuck on this part where I have the sample Holder holding 6 different material samples. At the moment I have it physically built and connected to the actual machine and I've tried it through Hyper Terminal and the motor works, but I also want to actually illustrate this via custom made graphics (so it looks good). So everytime I press a button then this sample holder should be rotating in labview, and the way it should rotate is as follows.

Lets say I have a Numeric Controll and I type the number "1" in it, and I press the Bolean button "Send" then at that point the sample holder should rotate for only one circle (showing that the next material sample is loaded), and if I send a numeric number "2" and I press the "Send" button then the sample Holder should rotate for excacly 2 circles (showing that not the next material sample but the one after it is loaded).... and so on. There might need to be a referance point and it should be on the top of the sample holder (which would be the place where the Laser will go through the material and the measurments are then taken).

I have only attached a very very simple drawing of what I was going to use, and I have painted different circles with different colours indicating that there are different material samples on each hole.

I thought of making a realy good drawing on Paintshop by making it look like a proper holder, and perhaps draw a small motor on the centre to make it look really nice, but I have no idea if LabView would accept it if I just copy and paste the picture and I have no idea how to make it rotate. If any of you can help me out on this I would be most appriciated. Thankyou

Ou, and if anyone wants to make a new drawing (using the same idea to the one I've given you) then please do so, since LabView doesn't have much of drawing options.

Thanks again in advanced.

Download File:post-4068-1158875297.ctl

Link to comment
Could you take 6 digital photos of the holder, one for each of the positions. Then based on the setting of your sample selection control, dipslay the appropriate picture in one of LabView's native picture controls?

Now that I never thought of, but I wouldn't really know how to do that neither :P (sorry not very experienced in LabView), is it possible if you could send me a sample program? Thnx

But I would still preffer it the way I explained on the first posting, and I know that it might take some time to build it but I would be most greatfull to those who have some spare time to spend on this.

Thanks again

Link to comment
Sorry but I have LabView version 7.1. and I can't open the example, possible you can convert it on 7.1 version???

Thnx

If you want to have smooth rotation, a pict ring would be cumbersome, (too many pictures).

This sounds like a perfect application for using the Picture Control.

The turntable picture consists of just a number of circles, filled with different colours.

I would set it up this way:

Set up a cluster array. Each cluster specifies a circle centre, radius and fill colour.

A simple rotation transform on the array would put all the circles where you want them w.r.t. the centre of the picture control.

Once the coordinates are transformed, a loop passes the coordinates to the Draw Circle primitive (in the Picture Control Palette).

If you want to get fancy and use shading, refer to the Robot.vi in the examples directory. There are some good subroutines there. (Shading is just radius+1 then draw an arc of 180 deg.)

Good Luck,

Barrie

Link to comment
If you want to have smooth rotation, a pict ring would be cumbersome, (too many pictures).

This sounds like a perfect application for using the Picture Control.

The turntable picture consists of just a number of circles, filled with different colours.

I would set it up this way:

Set up a cluster array. Each cluster specifies a circle centre, radius and fill colour.

A simple rotation transform on the array would put all the circles where you want them w.r.t. the centre of the picture control.

Once the coordinates are transformed, a loop passes the coordinates to the Draw Circle primitive (in the Picture Control Palette).

If you want to get fancy and use shading, refer to the Robot.vi in the examples directory. There are some good subroutines there. (Shading is just radius+1 then draw an arc of 180 deg.)

Good Luck,

Barrie

Hi Barrie, that sounds like a good idea, and you seem to be using LabView version 8.0, but is it possible to just make a screenshot of the wiring on how you would set this up, (i'm really sorry but I only started using labview resently).

ou and I couldn't find this Robot.vi example, and where is this Example section in this forum cos I couldn;t find it, I can't see the link anywhere.

Thanks a bunch

Link to comment
Hi Barrie, that sounds like a good idea, and you seem to be using LabView version 8.0, but is it possible to just make a screenshot of the wiring on how you would set this up, (i'm really sorry but I only started using labview resently).

ou and I couldn't find this Robot.vi example, and where is this Example section in this forum cos I couldn;t find it, I can't see the link anywhere.

Thanks a bunch

This is a very quick example of the basics. Of course you will want to break out the pattern creation from the display loop, but it should give you a good starting point. As for the fancy stuff, you're on your own. :)

The robot vi is located in LV examples, probably in C:\Program Files\National Instruments\LabVIEW 7.1\examples\picture\robot.llb

The Picture control is a much underused tool. You can really have fun with it!

Good luck and let me know what you come up with.

Barrie

This is a very quick example of the basics. Of course you will want to break out the pattern creation from the display loop, but it should give you a good starting point. As for the fancy stuff, you're on your own. :)

The robot vi is located in LV examples, probably in C:\Program Files\National Instruments\LabVIEW 7.1\examples\picture\robot.llb

The Picture control is a much underused tool. You can really have fun with it!

Good luck and let me know what you come up with.

Barrie

PS If the VI looks like a mess, it's because I created it on my laptop, which is wide screen. GRRRR! Windoze graphics.

And no comments from Macophiles, I've heard it all before. :P

Download File:post-658-1158892153.vi

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.