Jump to content

Scale


Recommended Posts

Posted

Can any one please tell me how can we create a scale programatically. My requirement is there is an Xcontrol for image display. There should be horizontal and vertical scales on both sides of this control. There is a ring structure for selecting "mm" or "inch" units of the scales. When I select "mm" the scale displayed in the xcontrol should be "mm" scale if I select "inch" inch scale should be displayed.

Please help.

Posted

What are you using to display the data in your Xcontrol, a graph? If so, there are property nodes that you can change the scale to whatever you want it to appear as.

You will probably have to do the conversion of mm to in yourself to display it correctly, but you can use the property node to edit the scale.

Posted

You should be able to use the built-in units of the controls. The user can change them by tyoing in mm, in, ft...

Select visible->Unit Lable and type in mm. You will need to convert your data by cast to unit.

Felix

Posted

Hi, My Xcontrol should look like the attached image. Here the scales should change automatically when we selece mm or inch from a combo box. This control is used to display jpeg images. Thanks

post-16241-125836552075_thumb.jpg

Posted

Sure. Go to your local hardware store and select a big value pack of batteries. Take them off the shelf. Put them in your cart. Buy it and bag it. Take it home. Take it to your room. You are in control of it's movement. Dance with it if you want. A car battery will give you a bigger charge but it's a lot harder to dance with.

The Image VIs have some VIs to create scales, determing the size of the JPEG and the end-value of the scale.

Writing all these info to a picture display should get you started.

I advise you to first do this with normal VIs and deal later with the XControl building, so first the a proof of concept and place the VIs you create into your XControl.

Ton

Posted

Dear Tom,

That was very kind of you. Could you please mention the names of VIs to create scales, determing the size of the JPEG and the end-value of the scale. That will be so greatful for me.

Posted

Dear Ton,

I've already come across that example. But all that VIs are applicable with picture control right? But I have to use image.ctl That is the problem here. Its look and feel also should be like the image attached earlier unsure.gif

Posted

I don't know what image.ctl is.

But with the VIs in the picture palette you can easily create the image you've shown.

What code do you have allready?

Ton

Posted

I don't know what image.ctl is.

But with the VIs in the picture palette you can easily create the image you've shown.

What code do you have allready?

Ton

image.ctl is the IMAQ Vision Image Control. And that does not have a scale at all, since that is not how images are typically used. Calibrating an image to be exact in physical measurements is a very difficult task in itself. Especially since such a scale has only any meaning for a very specific depth plane in the picture. Anything a little further away or closer by has a different scale.

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.