Jump to content

Chris_S

Members
  • Posts

    8
  • Joined

  • Last visited

Posts posted by Chris_S

  1. My main goal here is:

    I have a global I can use normally. That I can guarantee will always exist (its location may change development or exe). I also have a new global that may or may not exist. If it does exist, it will be stored in the same location as the first. If it does not exist I can handle any errors, my code will not be broken, and will still run without problems.

    So for example if I have on my diagram a string global (from global_1.vi) used normally.

    Can I get the path to global_1.vi so I can use that path to call Global_2.vi by reference?

    See Ex1.jpg attachment

    post-9793-0-76250200-1289489330_thumb.jp

  2. It worked for me. Did you wire the VI name with a String or Path datatype? I used String.

    when i tried this within a vi that used the global normally. Yes it worked.

    But when I ran it from a secondary program (with the first program running so the global should be in memory) I got that error.

    And now for something completely different...

    I think you would be better off using Datasocket or the like, where all you have to do is change the URL for differnet environnets.

    Ben

    I really haven’t used datasockets so I do not know. But wouldn’t using different URLs be equivalent to just using paths directly?

    Like saying I can hard code the path to one location or the other. Or have a url to one or the other. Either way there is hard coded information.

  3. Make a static VI reference to the global vi then use the path property of the reference.

    i cant make a ref to the global, because that would hard code the path in the static VI ref. The global may be in different locations on different systems. that is why i need to pull the path on the fly.

    I don't use globals so I can only start with some guesses.

    A global is a callee of the VI so start with that list. I belive you can get a type for each VI ref so look for globals. For all global type vis, open the FP of each and get a ref to all control (traverse FP controls) and find one with the name you are after then get the path to the VI that holds it.

    Like I said, just guessing.

    Ben

    this only works if the global is in that vi. the point is to use the global by reference. using it by ref, it will not show up on a callee list.

    The problem with pulling by reference, is that you need the path to pull it. So i need a way to get the path.

    Our main program houses the global in different locations for development software and released executable software. For all of our development testing, the global is in an llb. when the software is released for use the global will be compiled into an exe that resides in a completely different location. The exe runs a secondary piece of software, stored in a different location. This secondary software is where i need to call the global by reference. Since the secondary is not inside the exe. if i strip path i will only be left with the location of the secondary software, not the exe that contains the global.

    I cant run a list of callers from the secondary, trying to get the exe, because the exe calls everything by callback.

    Im sorry the whole situation is very convoluted. It’s always a pain trying to conform around old issues, as opposed to cost of rewriting old code to do things right.

  4. If it's in memory, you can do this:

    this didnt work.

    Error 1445 occurred at Open VI Reference in Safe_Start.vi

    Possible reason(s):

    LabVIEW: Open VI Reference will no longer match VIs in memory by file name. A VIs full name now includes any owning libraries so a filename is no longer sufficient. You can use strip path to wire the filename as a string, but this will not work for VIs in libraries.

  5. How do I programmatically get the path to a global VI? You cannot use get this VIs path because global VIs don’t have block diagrams.

    So how do I get the path to a global, from inside a top-level VI that uses that global?

    Just how there is a “Current VI’s path” function, I need a “That VI’s path” function

  6. If you are going to make your own copy VI, the following should be the fastest:

    1. Read original file size
    2. Create target file
    3. Set target file size to original file size
    4. Read chunks in multiples of Sectors (1024?)
    5. write these chunks to the target file

    (this is only neccesary if you want a queue).

    As far as I'm concerned there is no copy.vi, there is only a copy primitive (or am I absolutly mistaken)

    Ton

    Is this how the Copy node from the Advanced File Functions palette does it, only without a progress update?

  7. File Copy.VI? Do you mean the Copy node from the Advanced File Functions palette? Yes

    If you want to have a progress indicator, you'll like have to roll your own copy routine. Correct. I’m looking for help on how to make an alternate copy routine.

    -Red Text- My responses

    Chris

  8. I am currently using the File Copy.VI trying to copy a folder from a network location. It is a remote server location and the copy can take upwards of 3 minutes for a 200k file.

    I changed the program to use System EXEC.vi and execute XCOPY, which is significantly faster.

    Does anyone have another way to accomplish this? Possibly a way to do this that will have some type of progress indication?

    Any help is appreciated. Thanks

    Chris

×
×
  • Create New...

Important Information

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