Jump to content

ragglefrock

Members
  • Posts

    105
  • Joined

  • Last visited

Everything posted by ragglefrock

  1. QUOTE(lraynal @ Apr 12 2007, 08:50 AM) There are less differences between cloned templates and reentrancy than there used to be in previous versions of LV. Before LV 8, you couldn't view the front panel for a reentrant VI in run mode, and you couldn't debug reentrant VIs. This made template clones the desirable solution for spawning dialogs and debugging. The difference before LV 8 was that template clones were treated essentially as completely separate VIs that happened to have the same source code. Reentrant VIs, however, shared most of their source code and front panel between all the calls. Only their data space was separate. In LV 8 and on, you can view front panels for reentrant VIs and debug them, although I still believe they share some internal memory components. So many of the cases where you had to use template clones you can now use reentrant VIs. I'm sure there's still a scenario where one is preferable over the other. I haven't used templates too much, so maybe someone can chime in with some of their advantages.
  2. QUOTE(torekp @ Feb 7 2007, 02:54 PM) If all your decimation factors happen to be powers of 2, then it will be much cheaper for you to use bit shifting instead of the Quotient & Remainder function for dividing. Keep in mind that dividing an unsigned integer by 2^x is the same as shifting the integer x bits to the right without carrying (wrapping around). If you want the remainder, then subtract the result of the bitshift times the power of 2 and subtract it from the original. Something along the lines of the following, though you could perhaps optimize it further.
  3. QUOTE(dsaunders @ Feb 7 2007, 06:45 PM) You can cause notify event cases to execute programmatically by creating User Events whose data type masks the event data itself. For instance, for a Mouse Move event, you could create a User Event with a cluster containing a Ctrl refnum, Coordinates cluster, etc. If the data matches up exactly, you can register the event case for the User Event alongside the notify event. Note, though, that generating the User Event only causes the Event case to execute, not the other registered event (like moving the mouse). You also can't mask filter events like Mouse Down? with User Events.
  4. This doesn't solve your specific problem because you're using LV 6.1, but there's a roundabout solution to the problem in general using LabVIEW 8.x, .NET 2.0 or higher and Iron Python, the .NET flavor of Python. It's all described here on Brian Tyler's blog. It involves wrapping the ActiveX server for LV into a .NET assembly, then loading that assembly in Iron Python. The advantage is that Python is a dynamic language and doesn't require precompiled code. So you can dynamically execute actions such as setting properties of LabVIEW objects. I realize it's not sufficient for your needs, but it's pretty cool!
  5. There's a tutorial online that details using VI Server to keep track of reentrant copies of VIs that need to individually store internal data. It's also got examples you can download. Check it out. Hope this helps! Jarrod
×
×
  • Create New...

Important Information

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