Dual Numerical Control Change

Dear Friends
I have two Numerical Control in the FrontPanel. Now I want to program Numerical Controls such that when I changed one of them the other one change susequently.
for example in the attached VI when I set "A" to 1 "B" should be automatically 1 to and when I changed "B" from 1 to 5 "A" Should be changed to 5 automatically.
Sincerely V.S
Solved!
Go to Solution.
Attachments:
Dual Numerical Control.vi ‏9 KB

Hi, V.S
You have too much event structure in while loop.
It will run step by step.
For example, when you change value A , and it will run "A" event but the last three event wait for user changing value.
The program is not to work, because it wait others event occurs.
You can add more case in one event.
Patrick
Certified LabVIEW Developer
Attachments:
Dual Numerical Control.vi ‏17 KB

Similar Messages

  • How to change numeric control and indicator radix programmat​ically?

    Hi All,
     I need to know how can we change the radix of numeric control as well as numeric indicator while program is running.
    Regards,
    Pramod M G
    Solved!
    Go to Solution.

    Right.  Sorry   Display Format -> Format
    Jim
    You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice

  • Use mouse scroll wheel to change numeric control

    Does anyone know if and how I can use the mouse scroll wheel to change numeric control values?

    Another option would be to change the timeout.  This would avoid the timeout event every ms when the mouse has not "entered" the contol.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines
    Attachments:
    Mouse Scroll.vi ‏14 KB

  • Numeric Control - Text and Background Color changes when operating inc/dec arrows

    Hi,
    I'm developing an application that has a panel with black background and green or red numbers. I've added numeric controls and configured the text color and text background color attributes accordinglingy. I set the numeric control to hot or validate  control mode and show the inc/dec arrows, since I want to be able to incr/decr the numbers.
    The problem is that when I run the application and I hit the inc/dec arrows, then the colors inside the numeric control frame become inverted: the black background becomes white and the green number becomes cyan. I've created a callback function assosicated with the numeric control and tried forcing the text and background color, in the EVENT_VAL_CHANGED section, using the SetCtrlAttrribute() function, but to no avail. Also added ProcessDrawEvents didn't help.
    When I mouse click again outside the numeric control, then it reverts back to its original colors (green text, black background).
    Any suggestions as to how I can fix this ?
    I want it to keep its original colors at all times, even when I'm clicking the incr/decr arrows...
    Kind regards,
    pgriep
    Solved!
    Go to Solution.

    Ok, now I see what's happening.
    The effect you are seeing is a resul of standard numeric control behaviour combined with the black bcakground: when you use arrows to increment/decrement a numeric control its value will be automatically highlighted; on the default background you'll see the white area and figures highlighted in black (white numbers on balck background). If you set the background to black the system will automatically change the colors used to highlight the text, and that's what you're seeing.
    By the way, this does not happens if you use up and down keys on the keyboard: text is not highlighted so colors are not changing.
    Additionally, this is not only valid for numerics: see the behaviour of the string controls on the bottom of your panel when you tab up to them. This effect does not happen on controls set as indicator like the big clock in the upper part of the panel.
    The only way I can see to overcome this behaviour is to hide control built-in arrows and create your own up and down buttons with which you can manipulate the numeric control. I am attaching a modified version of your project with buttons on the left numeric; sorry for the poor aesthetic:  I have used some arrow icons I had on my disk, you may want to create your own arrows with the colors and shape you prefer.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?
    Attachments:
    ModifiedApplication.zip ‏9 KB

  • Programmatically change numeric control increment

    Hi! I need to programmatically change the increment to a numeric control.
    How would I do this in LV6.02? I tried using custom controls (arrows) and an
    indicator and adding/subtracting the increment (separate control) to the
    value. This works ok but my loop runs at 250ms so it updates real slow. Any
    ideas?
    As far as I know LV5 never had the facility but does LV6?
    Leon

    I've used 2 boolean controls (up/down). When either is clicked, the
    increment (standalone numeric control) is added/subtracted to the value, the
    result of which is displayed on a numeric indicator placed beside the
    up/down arrows (makes it look like its an ordinary numeric control). The
    problem is the booleans are read only once every 250ms, causing the
    increment to take place at 4 times a second. If, however, it was a standard
    numeric control, I could change value regardless of loop time (even though
    it would be read only when the loop executed).
    I will try your suggestion. If the control is invisible, will I be able to
    access the arrows? Thanks.
    Leon
    "PdB_Serenity_nl" wrote in message
    news:[email protected]
    com...
    > Have you tried using an invisible (transparant) control on top of the
    > corresponding indicator?
    > Takes less time to draw so your UI-loop can be made more quickly.
    > Or what about a mechanism for detecting that you pressed the up/down
    > button to make the increase-decrease value bigger?

  • Cannot change precision of digital display of a numerical control

    Hi,
    This may be a stupid question. But in the attched slider control, I am unable to set the precision of the digital display. I can only set the precision of the scale. What do I need to do? Thanks.
    Peter
    Attachments:
    Horizontal Fill Slide (numeric control) question.vi ‏9 KB

    In the upper left of the display format tab of the properties dialog box, select digital display.
    I agree that it could be implemented better, for example if you right-click on the digital display ...display format. it should land on the dialog with the digital display selected. It currently does not.
    (as a general rule, you should avoid overlapping controls. It hurts redraw performance)
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    DigitalFormat.jpg ‏42 KB

  • How to create a numeric control (of any type) that can ONLY be increased or decreased by one 'unit' at a time?

    As in the title.  I wish to create a numeric control (no current limitations on its type) with a range of 1-10 (and a step of 1).  The only difficulty I'm having is that the user must only be able to increase or decrease it by 1 at any time.  The code initiated by this value change must have completed at least once before the value can be changed again.  This is because the VI's code is mostly contained in a while loop, and the control is read once every iteration and its last value must not differ by more than 1.
    Is this possible with LabVIEW 6.1 and if so, how?
    One of the solutions I've come up with so far is to disable the control immediately after it's read, and to enable it again immediately before it's read for the next time (I have to assume that the user is unable to click twice before the control is disabled).  Is this an acceptable method or is there a better way?
    I also had an idea of partially disabling a normal numeric control such that it could not be typed in - only the arrows remained operational.  However, i don't know quite how to do this.
    James
    Never say "Oops." Always say "Ah, interesting!"
    Solved!
    Go to Solution.

    Yes, i realize my solution needs the idea that followed it to be feasable in order to work properly.  My bad!
    I did wonder about using a combination like that, but I hoped it could all be done with one object.  Ah well - just means adding an extra little bit of code.  No probs.
    Thank you anyway.
    Never say "Oops." Always say "Ah, interesting!"

  • Programatically bring the cursor to a numerical control while VI running

    Does anyone know how to programatically move the cursor to a particular numerical control while a VI is running?
    I have a VI that polls the user for information, and at one point, the user has to repeatedly type numbers into the same numerical control and press enter. For a number of reasons, it is awkward to be messing with the mouse during this particular test. Each time the user presses a paricular button to send data a to file (which I have linked to the Return key on the keyboard by means of 'key navigation'), I would like the cursor to jump to the relevant numerical control ready for the next number to be entered on the keyboard. Does anyone have any ideas how to do this?
    I have set up a separate key navigation for thenumerical control in question, so if the user presses the Esc key, this control becomes active and the cursor is in place, but I would like to move the cursor there without this extra user button press if at all possible. 
    Regards,
    Will

    Will
     I'm not sure if this is what you are looking for but it might do what you need.
    On the block diagram right click the control in question >>create>>property node>>key focus. Now right click the property node and select Change to write. Wire a boolean true constant to it and place this snippit in the appropriate place(s) in your code depending upon your architecture.
    Hope this helps.
    Using LabVIEW 2010SP1 and TestStand 4.5

  • Default value of a numeric control

    Hello I want to fix the default value of a numeric control using his node property but I haven't found this attribute. It's possible to fix this value through the node property of a block?
    I've tried to fix it, right-clicking on the control....properties....default value....but when I save the vi's and I reopen the vi's, his value has disappeared and value is set 0.
    Do you know another way to fix this value?
    Thank you in advance
    Larson

    The default value is only relevant when the VI is loaded into memory, not every time you start running it. Your code is probably changing the value to some out-of-limit value (probably 0 if your calculations are incorrect) and it is coerced to the minimum. If you want a value to remain constant, don't change it.
    The answer is simple - DON'T RUN CONTINUOUSLY! If you want something to repeat, use a loop. That way, the value will only need to be read once, when the VI starts running. If this didn't help you, you should post the VI and explain more about your problem.
    To learn more about LabVIEW, I suggest you try searching this site and google for LabVIEW tutorials. Here and here are a couple you can start with. You can also contact your local NI office and join one of their courses.
    In addition, I suggest you read the LabVIEW style guide and the LabVIEW user manual (Help>>Search the LabVIEW Bookshelf).
    Try to take over the world!

  • Numeric control error handling

    Hi all,
    I have two question about numeric control.
    1) "How to handle invalid inputs?"
    Let say, I have one numeric control that can only accept 0 to +inf (Range). So negative input will be invalid data input. Whenever I typed the negative value on it, this control automatically changed back to default (min) value. What I want is that. Is there anyway to detect invalid user input? So that I can program whenever user input negative number, it will automatically change back to previous valid input (not default value).
    2) "How to assign the dynamic range of numeric control?"
    I used property node to assign the range but my problem is that. I assigned min 0.1, max 1.2 and increment 0.1 but I cant able to select 1.2 or sometime 0.1 by using increment/decrement arrow. Maybe because of floating points? And also I want to do when user input overrange value (eg.1.3) by typing, the value should go back to previous valid input.
    Any idea? Thanks

    You can choose how LV will react on entries exceeding a limit. The default is, that LV coerces the value to the limit. But you can also ignore the limit and the user can enter any value.
    Nevertheless, if you ignore the limits, you always have to check in your software for invalid values!
    Regarding 2) i couldn't reproduce what you described. Maybe you should post a little example....
    For the 2nd part of your question, please see my answer above...
    hope this helps,
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Update while typing in numeric control?

    So...
    When I type a number into a numeric control, it doesn't update until I hit enter or click somewhere outside the control.
    Problem is, after entering the number, I want to click on a "go" button
    to do something with the new value in numeric control, but unless I
    remember to click somewhere else or hit enter first, I'm doing
    something with the old value, not the new value.
    This gets aggravating.
    How to make sure the value of the numeric control gets updated before doing something with it?
    "update while typing" exists for string controls, but seems conspicuously lacking for other types of controls...

    I cannot reproduce your described behavior: With either a local variable or the numeric control inside the event case, I never see a stale value. Please attach your VI so we can troubleshoot.
    Adding a delay to fix something like this is incorrect and dangerous. If a delay solves the problem, it points to a flaw in the code.  What if somebody will run your program on a slower computer where it would suddenly need a 12ms delay. You'd be back to sqaure one, dealing with race conditions.
    (And why are you using "mouse down" instead of "value changed"?)
    Message Edited by altenbach on 03-21-2006 05:22 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    Events.vi ‏12 KB

  • Invalid input event for numeric control

    Need to catch the event when invalid input being through out, customer doesn't like the notify.
    George Zou
    http://webspace.webring.com/people/og/gtoolbox

    I haven't had a big problem with this, and I plan to continue to use numeric controls instead of making everything strings, but it does seem strange that CVI doesn't catch this.  I like the automatic range checking options, the programmable increment/decrement buttons, and the ease of use.
    You can use a quirk in CVI to catch this: if you enter an invalid number like 1.2.3 or 3...14159 or 1-2, CVI triggers EVENT_VAL_CHANGED, but leaves the original number unchanged.  So you can create a case in the callback for the numeric control for EVENT_VAL_CHANGED, and in that case check to see if the value is the same as the previous value.  If it is, assume an invalid input.  EVENT_VAL_CHANGED does not get fired if you just press Enter without changing the value.
    There are a couple of limitations or drawbacks to this approach.  It doesn't save your invalid entry, so you have to enter the whole thing again instead of just correcting your mistake.  EVENT_VAL_CHANGED also gets fired if you use Delete or Backspace, even if the number you end up with is the same as the previous.  So this approach will flag that as an invalid entry.
    See the attached example.
    Attachments:
    TestInvalidInput.zip ‏6 KB

  • How to Define Limit to Numeric Control

    Dear all,
    I am controlling a motor which is pressing to load cell. I am controlling the motor position with a numeric controller in the front panel, the question is when i  accidently enter a large value(undesired motor's new motor position), than it could damage the load cell.
    In this case : Can we arrange a numeric control in the front panel so that it can accept numbers only between "0" and "10".
    Also : Is it also possible to arrange this from block diagram with wiring reference element as maksimum limit to the numeric control ?
    Kind Regards,
    Best Wishes.

    Right click on your numerical control, go to properties, click the 'Data Entry' tab. Un-tick 'Use Default Limits'.
    You can now set Minimum, maximum, Increment etc.
    This can be done with a property node too if you want to change the values programatically.
    Attachments:
    dataentry.png ‏41 KB

  • Numeric control to hex(in numeric control) conversion ?

    hi 
    I have n.o (numeric control )  which appears as hex display ,  I want to convert it to decimal number and reverse
    can any please show with help of example please

    Since you want to convert the number:
    There is a very elegant way to do it in the control:
    # Place a numeric control on the FP
    # Change the representation to a 'binary' I/U 8/16/32/64 (my example is with I32
    # In the display properties enable the advanced mode and enter all the formats you want to use
     (Hint: new line is shift-enter)
    You can also add some indication like
    dec:%d
    hex:%x
    bin:%b
    The nice thing is that all conversion is made by the FP on the fly whatever numerical format you change. Hey mom, look without any wire
    Greetings from Germany
    Henrik
    LV since v3.1
    “ground” is a convenient fantasy
    '˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'

  • Numeric Control Disable

    Hi, I have a numeric control. I want to disable the option of having the user enter a number and hit enter. I only want them to be able to use the up and down arrows to change the control. Is this possible and how do i implement this? Thanks!

    Wait...I posted the wrong one
    EDIT: Actually I didn't post the wrong one...When you save this make sure you save it disk then place the control on the front panel....I added it the block diagram via drag/drop, but came in as a constant (which I converted to a control), and it didn't work right....So save it, then add the control to the front panel via the controls pallete.
    Message Edited by TWGomez on 04-22-2008 07:15 AM
    Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
    using LV 2010 SP 1, Windows 7
    Attachments:
    Control 1.ctl ‏5 KB

Maybe you are looking for

  • Photoshop CS4 Install Failure

    CS4 just won't install. I get the fatal exception blue screen once it begins installing the Adobe Media Player. The error, once Windows (Vista 32-bit), reboots says the following: Problem signature: Problem Event Name: BlueScreen OS Version: 6.0.6001

  • How can I circumvent the gridpanel layout mechanism?

    I have gridpanel B inside another gridpanel A. gridpanel B is set to six columns. I add two buttons X and Y to gridpanel B, the buttons are layed out like so X Y I would like them layed out by the column they occupy X Y <space for #3> <space for #4>

  • JVM.dll crash in 1.4.2_07

    hi, Platform : windows 2000 server JVM: 1.4.2_07 Once in a while my program is crashing. The code is a C++ program that invokes Java methods via JNI. However, at the time of the crash, it is not making any JNI calls. The crash dump shows the followin

  • In iOS 8 Safari often doesn't load pages without refreshing - anybody else seeing this?

    Since upgrading to iOS 8 on my iPhone 5 - and I also see this on my new iPhone 6 Plus which arrived yesterday - oftentimes when links are clicked on the page just hangs there. But then when I touch refresh it will immediately load. I never saw this p

  • Different between Customer requirement and Sales Order.

    Hi, can any expert explain the Different between Customer requirement and Sales Order to me? Any help would be appreciated. Regards, Tiger