Jump to content

Khalid

Members
  • Posts

    160
  • Joined

  • Last visited

Posts posted by Khalid

  1. Hello 187063,

    You first said:

    if i would like to obtain the values for column 1 and 2 for row a ...
    With two columns (and many rows), this is a 2-D array!

    You then said:

    mine is not a 2 D array, i'm just reading the data frrom a file

    So, it's a little confusing as to what it really is :wacko: . Are you saying that the data is in the form of rows and columns but in a file? If this is the case, you can try using the 'Read From Spreadsheet File.vi' This will give you an array which you can index out as shown above. If that doesn't work for you, post a sample data file.

    Good luck!

    Khalid Ansari

  2. Hi Jeff,

    No, there's no specific reason for my tab-control being inside the Events structure. As you may know already, only latched booleans need to be inside (so that their values are read and they get popped-out on the front-panel correctly).

    Does my VI from above run fine as-is for you? What specific issues are you're having with the Events structure? Is it possible to make a demo VI which exhibits these issues and post here?

    If you haven't already, you may want to go through the 'Caveats and Recommendations when Using Events in LabVIEW' topic from LabVIEW's online help.

    :arrow: About NI's policy of forcibly upgrading users to newer versions, I humbly disagree with you. Normally I prefer not to get into such issues, but in defense of NI, I must say couple of things: There's the 'Save for previous' option which allows one to save VIs for the older version. That's how I could get you a 7.0 VI though I am using 7.1. You were not forced to upgrade.

    Another practical example is that the 7.1 version of the LabVIEW-DSC module, for instance, is a free upgrade. This is because there aren't as many new features in this version.

    Anyways, we're all entitled to our opinions.

    Regards and good luck with your project..

    Khalid

  3. I am attaching a 7.0 VI which uses the mouse scroll-wheel to scroll through the listbox control. It scrolls the listbox contents only when the mouse is over the listbox, as expected. As it stands, this is a very specific example. When time permits I (or y'all) can make this more general to scroll through other similar controls.

    The working principle in brief:

    -check if mouse is over the listbox using the 'Mouse Enter' event,

    -check scrolling, and direction,

    -depending on the direction, update listbox (within the valid range),

    -stop scrolling when mouse is moved away ('Mouse Leave' event).

    Notifiers are used in a master-slave pattern to manage the events. And note that the VI's window-scrolling is disabled.

    Hope this helps.

    Regards,

    Khalid Ansari

    Download File:post-19-1088490696.vi

  4. Hello Jeff,

    I am attaching a 7.1 VI which shows one way of doing this (let me know if you need a 7.0 version). As you can see, the VI is pretty straight-forward. I used the 'key down?' filter event. It doesn't have to be the filter event, but since function keys are usually used elsewhere it may be a good idea to use the filter event and discard the keys.

    Hope this helps.

    Regards,

    Khalid Ansari

    Download File:post-19-1088477941.vi

  5. Hello LabRat,

    Did you try the shipping example which shows how to do this? It can be found under examples\comm\VBtoLV.vbp. I am not sure if this example shipped with LabVIEW 5.0 however.

    LV.AppName = "MyApp.vi"

    In any case, you should not be using LV.AppName. This is a read-only property that outputs "LabVIEW.exe" (or whatever the built executable's name is). Instead, you should use the Call method on the VI class (passing it the parameter names and values). For details, see LabVIEW Help for 'VI class (ActiveX)'.

    Hope this helps. Again, check out the shipping example. I just tried and it works fine. If you do not have the example, you can take a look at the following one from NI's DevZone (I haven't tried this one though):

    http://sine.ni.com/apps/we/niepd_web_displ...source=External

    Regards,

    Khalid

  6. Hi Craig,

    Maybe this does what you're looking for..

    We can get the absolute position of the button text. From this, we can find the absolute position of the button (irrespective of the label and caption positions):

    Get the size of the text and the size of the button itself. Subtracting the text-size from the button-size, and then dividing by two will give us the offset from the absolute position of the text. Subtracting this offset from the absolute position of the text will give us the absolute position (top, left) of the button -- regardless of where the label and captions are (see attached 7.1 VI).

    Caveat: this assumes (rightfully?) that the button text is smaller than the button size.. However, the above can be modified to take care of this case as well using an absolute value (no pun intended) for the offset.

    Hope this is what you were looking for.

    Regards,

    Khalid

    Download File:post-19-1087102723.vi

  7. bulentt: Is there any way to write a Vertical text

    Well, you could use Brian Renken's VIs to do this. You can download the VIs from his website (sroll down to 'Draw Sideways String' section)

    http://labview.brianrenken.com/downloads.shtm

    He explains how he went about accomplishing this in a LTR article.. an interesting read:

    http://LabVIEW.BrianRenken.com/downloads/SidewaysText.pdf

    I guess he proves anything can be done if one puts his mind to it!

    Regards,

    Khalid Ansari

  8. Hello Paul,

    Looks like you first had LabVIEW 6.1 and DSC 6.1. Then you moved to a different machine with only LabVIEW 7.0 (but no DSC). And you want to run those VIs. I am afraid this won't work.

    Even if you find and get all the VIs and the DLLs, there are other things in DSC like the DSC Engine, the Citadel database, system services, built-in servers and proxies, third-party servers, etc., which would make it impossible for you to run the DSC-created application on just pure LabVIEW (assuming your app does indeed use the DSC features).

    At the minimum, you would need a Run Time System of DSC (different from the LV Run Time Engine).

    What you can however do is, install the DSC 6.1 on LabVIEW 7.0. This combination will work fine. If the DSC 6.1 CD is missing, you may want to contact your NI Sales person to get it replaced. I am sure they have your purchase records.

    Finally, another option is -- depending on what your app did -- you can try to make it a non-DSC, pure-LV app.

    Hope this was helpful.

    Regards,

    Khalid Ansari

×
×
  • Create New...

Important Information

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