Jump to content

chris754

Members
  • Posts

    63
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by chris754

  1. You're missing something, but its tough to tell what you are doing wrong without code. Are you calling the parent class override method? You should be. The parent class override method will automatically call the correct child class method. Do you have dynamic dispatch enabled on the override methods? This should be as well. Using an array of Parent class is fine, no need for an array of variants or anything like that.

  2. I would also be careful with you local variable of "triggered" that is set to FALSE. There is no way, right now, that this is guaranteed to execute before or after the FOR loop, possibly causing unintended behavior. I would move it somewhere where you can guarantee the correct order of operation.

  3. I understand what you are saying. We have a program that loads a bunch of modules that can be independent in-and-of themselves. Each module has a top-level vi that becomes a "sub vi" when called through the larger program. Why not sub-top level vi? I think that is relatively clear in purpose. It says that this VI can be run independently, but also is part of a larger hierarchy in which it is not the main. It is a dominant branch in a root system.

     

    Or another idea would be to relate it to management.  You have your top-level (CEO if you will), then manager VI or supervisor VIs, then your subvis.

  4. Here is my watchdog example. Just threw this together this morning, so not the greatest coding job, but shows one way I implement this type of thing. Just run the Test-Main.vi. It will launch an "actor" (not a real actor, but something to act as one). If you use the abort, the watchdog will kick in a close the clone, if you use the stop the shutdown will kick in and close the actor. I use a user event within the actor to tell my watchpuppy to stop if the actor has finished its task.

    WATCHDOG EXAMPLE.zip

    • Like 1
  5. Correct. I have a watchdog.vi in the top-level VI, with watchpuppy.vi in each actor. The watchdog sends out an event every so often (about 1sec), if the watchpuppy doesn't receive an event in say 1.5 secs, it aborts the vi. I can post an example if you'd like. They are easily removed or disabled later if you decide you do not want them in the final version. Although I usually keep them.

  6. I would hazard the LabVIEW loses track of the port when it disappears. Try using the VISA Find Resourse after switching to D2XX and see if it appears in the list. I would bet that it doesn't. I'm not sure how to force LabVIEW to refresh its resource list during runtime, LabVIEW seems to refresh it for me. I would make sure that the port is properly closed using VISA close before switching back and forth, I see that you did this, but maybe it was done in parallel or something? It's tough to tell without seeing code.

  7. I've encountered this with an exe loading an llb. What was happening was the llb needed to include an NI VI. When it wasn't included labview would search for it and eventually found it, but then this window appears, once you include it, it goes away. This often happens when the EXE is built with "remove unused members of project libraries" checked. For instance, in my case, the VISA commands were missing and needed to be found. So I would look for instance like this or try unchecking the box and see if that does you any good.

  8. Indeed, just plain-old byref oop. Anyway, I have found the error (sort of). I make a copy of the original data and put that data into the generate event VI. If I put the original data into the generate event, the problem goes away. I now just need to find a way around this. The data must get destroyed by labview at somepoint, however, I do not know why this is because the data was placed on a shift register, and therefore was still in use. Still working on a test VI for this (busy time of year right now).

  9. I will try to make a test VI to show what is happening. The destroy VI only gets called on a shutdown event, and I'm sure that that has not been triggered. As far as implementation I take a labview class and stuff it inside a DVR and pass the reference around, I am not sure what the name is for this type of implementation.

×
×
  • Create New...

Important Information

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