Jump to content

Stepper

Members
  • Posts

    15
  • Joined

  • Last visited

Posts posted by Stepper

  1. OK, got to bug you guys one more time (well, at least on this particular subject :D)

    The "set value upon radio-button change" works, but the radio-button has to be in the while-loop. This means that the preset value associated with the selected radio-button gets (re)loaded into the Numeric Control each iteration of the while-loop. This effectively overrides/overwrites any value that the user inputs directly into the Numeric Control box, or increment(decrement via the up/down buttons of the Numeric Control.

    Me thinks that I need to put the radio-button selector and associated value selection into an Event Structure (a new adventure for me), that only executes once upon selection of a (new) radio button. My feeble and ineffective attempt to do this is in the attached jpg. Help, please !?

    post-18375-0-35275300-1344612000_thumb.j

  2. Hello,

    I have a front panel with a Numeric Control and a group of radio buttons.

    When a radio button is selected, I would like the value of this numeric control to be forced to a button-specific preset value.

    How can this be done (in LV 8.0)?

    I presume that it may be somewhat similar to initializing the captions of the radio-buttons to preset values, e.g., values read-in from an external file. I found an example of how to do this, see attached (though I am not sure how it works exactly :(). Of course, that initialization is only done once, not upon an event such as radio-button selection....

    Thanks in advance for any help!

    post-18375-0-82172100-1344428261_thumb.j

  3. OK, thanx for the suggestions! I have implemented the following changes:

    1) move the initialization of the VISA port to outside the loop (duuhh).

    2) unbundle the error cluster and connect the error status to the halt thingy.

    Resulting VI (LV8) attached (I am sure that there are more areas that scream for cleaning up etc. - humor me for now).

    This fixes the problem with selecting the COM port before the loop gets going. Great.

    The communications-LED on the connected hardware is blinking away, which implies communication to the device is active and interating. The concatenated string that is input to the VISA port, follows the GUI inputs as it should. However... I now have to stop and restart the VI before the connected device actually gets the latest user input. Any thoughts on that?

    I will convert the Concatenate function to Format-into-string, as soon as I get the thing to work.

    N4SPP-miniVNA-sig-gen-V12.vi

  4. Hello,

    I have an app that in essence is a simple loop that writes a user-input string to a serial com-port (VISA).

    The VI includes a COM-port selector. However, if the default value of this selector is not equal to the actual port-number to which the serial-device is connected, the app gets stuck in an error-message loop that cannot be stopped with the stop button.

    One solution I can imageine, is having to always explcitly select the COM-port before the write-loop starts (and having an indication when that hasn't been done that). No idea how to do that. Automatically searching for the FTDI-device appears too complicated. I know how to read-in parameters from an external file (I use that for other initialisations), but don't know how to connect that to the port-selection mechanism. So far, the explcit port selection is my preferred solution.

    LabView 8.0 VI screenshot of the VISA-functionality is attached. (I know, I know, there are cleaner ways to do certain things - first want to get it to work)..

    Any help will be greatly appreciated!

    post-18375-0-13867200-1344244361_thumb.j

  5. I am trying to implement a GUI (LabView 8.0) to do a mutually exclusive selection from 8 preset radio frequencies. So obviously I thought of using “radio” buttons:rolleyes:.

    However, I would like to load the button labels (frequency values) from an external file, when the vi starts up. Then the button block must output the selected frequency value to the associated control functionality.

    I know how to read a file and extract individual initialization parameters from it. So initializing each button from a numeric, and outputting the selected value is all I need.

    Can this be done with the radio buttons approach discussed above? Any chance of a sample/example vi?

    Thanks in advance!

  6. Actually, I am trying to interpolate. My intent is to use the target frequency value to get an interpolated number of required motor revolutions (that will in turn be converted in number of steps for a stepper-motor, by multiplying by 400. I could also multiply all values in the first column of the .lvm file by 400).

    So, if I enter "7300" (between 7200 and 7824 in the second column of the data file), I expect to get something like 28.086 as a final answer.

    From its description, it looks like one needs to input an index value to the "Interpolate 1D Array" function. My original hope was that I could use the target frequency value for this, as is. But it looks like the index value needs to be between 0 and the number of elements in the array columns (36 in my case). To make that work, I would have to 1) iterate through the frequency data column to identify between which two entries the target frequency lies (similar to Shaun's vi), then 2) look up what the associated two frequencies are, then 3) create a fractional index by dividing the difference between these frequencies by the target frequency, then 4) add the resulting fractional index to the lower index of those two looked-up frequencies, and finally 5) use the total index to interpolate the motor position in the position column of the array. Wow! And this approach might not even work for the case where the target frequency is identical to a value in the data file...

    :frusty:

  7. Hello,

    I am using LV 8.0 and trying to read a simple .lvm file that has 2 integer columns. The first column represents motor position (in revs), the second column represents an associated parameter (frequency).

    What I am trying to do is to manually enter a "target" value for the frequency, and have the vi return the associated interpolated motor position.

    With my obviously limited experience, I have tried all the possible designs/options that I could find - but just can't get the darn thing to work...

    The .vi and .lvm files are attached.

    Would greatly appreciate any and all help!

×
×
  • Create New...

Important Information

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