10-03-2022 11:09 AM
@Yamaeda wrote:
If you change the scale.min and scale.max and keep the needle in the middle (or just a fixed graphical needle) you'd get a similar effect.
Take a look the image, when depth approaching 0, needle is not in the middle of scale.min and scale.max.
Unless you allow negative depth.
10-04-2022 05:24 AM
@LLindenbauer
when customizing what? The vertical slide bar? There is no option in that to replace the pointer. Kindly clarify this. And yes i don't plan it to change it in the future so a quick way would be the best
10-04-2022 05:28 AM
@zou
How do I move the whole control up/down and not just the scale? And what control are you talking about? Please explain in some more detail as I'm only a beginner to labview
I've attached a vi, this is the length and marker width that i need.
10-04-2022 05:32 AM
@yameda
Where are these scale.min and scale.max options in labview?
The inputs to the Draw Scale vi are to be inputted once while designing (as shown in the vi attached to my previous reply), how do i change those?
10-04-2022 09:23 AM
@sarwatsarfaraz wrote:
@zou
How do I move the whole control up/down and not just the scale? And what control are you talking about? Please explain in some more detail as I'm only a beginner to labview
I've attached a vi, this is the length and marker width that i need.
I can't open your VI. I'm using 2018.
There is an example: Vertical Scrollbar.vi
It's installed on your computer with LabVIEW.
It moves all the controls in a cluster up and down.
10-06-2022 10:50 AM - edited 10-06-2022 10:59 AM
@sarwatsarfaraz wrote:
@LLindenbauer
when customizing what? The vertical slide bar? There is no option in that to replace the pointer. Kindly clarify this. And yes i don't plan it to change it in the future so a quick way would be the best
Sorry, I can't show you the details with screenshots right now - I'll try my best using words and links.
First, use a graphics tool to make your depth scale, like so:
Then add a slide to your vi and open the control editor. Switch to customize mode https://www.ni.com/docs/en-US/bundle/labview/page/lvconcepts/custom_cont_ind_type.html#d110e62
Note that you are able to select the different parts of the control:https://www.ni.com/docs/en-US/bundle/labview/page/lvconcepts/custom_cont_ind_type.html#d110e200
Copy the scale to the clipboard, then right click on the "Slider" element and select "Copy from Clipboard". Add a simple decoration (e.g. a box or arrow) around the midway point of the control to indicate the current depth. Put some more decorations over the slide to hide the unused portions of the new sliding scale.
If you save this control, the new scale moves around and the new needle will stand still. Now you have to line up the values you enter into the control with the values displayed on the needle. Depending on how accurate you want that to be, there are various methods. To keep it super simple, take a few readings of the control to get pairs of x_set and x_displayed and set up a linear fit to give x_set = x_displayed * k + d. Solve for k and d, put the formula into a subVI and connect x_set to the slide indicator. You could also do some tricks with using the pixel size of the elements. The physical style of indicator is not very precise in the first place, so that may be good enough.
10-06-2022 11:13 AM
It takes an artist to create some of these, but you can Google labview cockpit controls to see exactly what is possible with LabVIEW front panels. I'm sure that, next to these, yours should be relatively simple to create.
10-10-2022 12:15 AM
This seems doable but I'm having some problems while doing this:
1. I am entering the control editor mode by right-clicking on the scale > advanced > customize (shown in 'control editor img.png'). Then I only have the scale in the control editor not the slide, I have to drag the 'slide' on it. I can also not select the different parts of the control in the control editor. Are you opening the control editor by a different method so that you're able to select the different parts of control?
2. I can 'Copy to Clipboard' the scale, but when I right click the slide, there is no option of 'Copy from clipboard'. Probably because I've dragged the slide from the Front Panel to the control editor window. (shown in 'can't copy from clipboard.png')
3. What exactly do you mean by control? The scale or the slide or the whole vi?
10-10-2022 02:12 AM
Please ignore my previous questions, I figured out the answers to them (edit time has expired)
I cannot replace the slider element with the scale as you're telling. the slider element is being replaced with some weird object.
I've attached the pictures below
10-10-2022 04:59 AM
@sarwatsarfaraz wrote:
Please ignore my previous questions, I figured out the answers to them (edit time has expired)
I cannot replace the slider element with the scale as you're telling. the slider element is being replaced with some weird object.
I've attached the pictures below
That might result from trying to insert a vector image. These sometimes behave differently.
Here's how I imagined it:
First, I snipped your scale as a bitmap and inserted is an image (this is optional but having it in the same place makes it easer to show). I copied it again from there (Copy to Clipboard). Then, I select the slider element and "Insert Picture from Clipboard".
This replaces the needle with the moving scale. Make the element at least as tall as the new scale. Then add the static elements - the new needle and a screen to hide the unused part of the slide.
Now you are ready for a test drive of the submarine. The element is quite tall, but you can hide it inside a cluster to make it easier to handle.
Have Fun!