Jump to content

Tomi Maila

Members
  • Posts

    849
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by Tomi Maila

  1. QUOTE(Tim_S @ Jan 16 2008, 08:18 PM) I'm using a reference that is opened with open application reference. However it's opened outside the scope of my code. QUOTE(Tim_S @ Jan 16 2008, 08:18 PM) Looking at the Open Application Reference, you have to know the machine name and can optionally add the port number when making the connection from A to B, so I assume you know both of those at A. You assume wrong. The part of the code I'm working on only knows the application reference and doesn't know how it has been opened previously. I'm using LabVIEW 8.5 or newer.
  2. Hi, Tail recursion optimization is a compiler optimization mechanism where a recursive call is made to the function instance itself when possible. In the context of LabVIEW this would mean that when a VI makes a recursive call to itself, the call would be executed by the same VI clone when possible. Tail recursion optimization greatly increases recursion performance as there is no need to reserve a new clone for each recursive call. The tail recursion optimization can be made when the output buffers of a recursive call are not used for anything on the block diagram of the calling VI but instead they are one of the following: 1) directly connected to indicators, 2) unconnected or 3) connected to structure borders or similar non-executed nodes. Tail recursion optimization cannot be made when an output of a subVI node is connected to a node or other operation that needs the data in the buffer to execute. Tail recursion optimization can also be made across subVI borders as long as the same conditions apply across the subVI borders. That is A.vi can call B.vi that calls A.vi so that the call can be tail recursive optimizined if the call of A in B can be tail recursive optimized and the call of B in A can be tail recursive optimized. I just tested if LabVIEW 8.5 recursion supports tail recursion optimization and it doesn't. See the attached VI for computing factorial in a way that would be tail recursion optimizable. My question is targeted for LabVIEW R&D, is there a special reason for the fact that tail recursion optimization isn't supported by LabVIEW? Will you support in the (near) future LabVIEW versions? Tail recursion optimization increases
  3. Hi, Assuming I've a network of multiple computers, say A, B and C. On one computer A I've a LabVIEW application App_A running. In that application I've a valid reference to a remote LabVIEW application App_B running on a second computer B. Is it possible to find out the ip address and the port number of that application App_B from the valid reference in App_A. I need to be able to open a reference to the same application App_B on B from computer C. I need to somehow pass App_C on computer C sufficient information to connect to App_B on computer B and the only thing I've is the reference to App_B valid in App_A only. Tomi
  4. There are two types of events 1) static events and 2) dynamic events. Static events are directly subscribed by the event structure and cannot be unregistered. Dynamic events on the other hand can be registered and unregistered as you wish. When an event is registered, it can be catched with event structure. When an event is unregistered, it will be ignored by the event structure. To register events, use register for events node and wire your boolean control reference as the event source. To unregister events, use the same node but this time use existing dynamic event registration refnum and wire null reference to the to the event source input. So actually you change your event to listen to a non-existing boolean button instead of your real one. Then you can change it back when you feel like it. For more details see an example VI Dynamically Register for Events.vi shipped with LabVIEW located in labview\examples\general\dynamicevents.llb Cheers, Tomi
  5. Tomi> The discussion in this thread insipred me to post an article on recursive types to my blog at ExpressionFlow. robijn> PS Very clear article Tomi ! Thanks I promised to keep posting on challenging subjects as well Let's see if LabVIEW 10.25½ includes recursive types
  6. QUOTE(Gavin Burnell @ Jan 8 2008, 12:07 PM) I don't think it's possible to get XNodes to even work with LabVIEW classes. LabVIEW simply crashes when a class type wire in connected to an XNode. At least this is my experience. Do you have some knowledge that would allow using XNodes with LabVIEW classes? I would really love to use XNodes with LabVIEW classes.
  7. The discussion in this thread insipred me to post an article on recursive types to my blog at ExpressionFlow. QUOTE(Aristos Queue @ Jan 7 2008, 04:06 PM) No.
  8. QUOTE(Aristos Queue @ Jan 6 2008, 09:10 PM) Actually there are languages that allow recursive types without reference mechanism. However I think at least in eager languages there must be a mechanism to end the recursion. Lazy languages could possibly allow infinite recursion that simply is not evaluated until needed. C++ pointer mechanism that AQ referred to is one way to end the recursion. Anohter way to end the type recursion is to allow a variable to be of type 1 or type 2. Let's use symbol '|' to denote for this type of or. Then we can define a recursive class Class A(y) { x : A | Nothing = y } where the class A has a variable x that can either be of class A or of class Nothing. The class Nothing is a empty Class with not functions and not private data. We now can define a few variables of class a. a1 : A(Nothing); a2 : A(a1); a3 : A(a2); A lazy language could have something like this Class NaturalNumber(initialValue) { next : NaturalNumber(initialValue+1) function getValue { return initialValue } } The constructor parameter initialValue is a number that is passed to the class when created. We assume that constructor parameters are stored byt the language as a class private data automatically. The class has a private data called next. However next not initialized until referred to; lazy languages compute data only when the data is actually needed. Now we can define all natural numbers the following way naturalNums = NaturalNumber(0); // initialize class NaturalNumber with constructor parameter 0. We can get the three first natural numbers with the following lines naturalNums.getValue; // returns 0 naturalNums.next.getValue // evaluates initialValue (1) of naturalNumber.next and returns it naturalNums.next.next.getValue // evaluates initialValue (2) of naturalNumber.next.next and returns it So to conclude, AQ, never say never;) APPENDIX - Notation Class definition: Class ClassName(list of constructor parameters) { class body ... } Function deifinition; function functionName(list of arguments) { function body ... } Variable definition: varname : VarType | AlternateType | AlternateType [= initial_value] Variable definition with constructor parameters: varname : VarType(constructor arguments) Class construction: Class argument list is stored as if it was private data. Class body is executed Edited several times, last edit at 8.17 pm GMT -- Tomi
  9. Actually one thing came into my mind. Opening a web page using ActiveX intefrace may be a security issue. As a result it may be that some security software such as virus protection or malware protection may disable this feature from Windows. So I suggest you investigate if disabling your virus protection has an affect to this HTML help issue. Tomi
  10. My machine, where everything works properly, doesn't have NI drivers installed. Could there be something installed with NI driver CD that could mesh up with things?
  11. When I open help for Dictionary Create with LV 8.5 on Windows XP, a new Firefox 2.0.0.11 tab is opened and the following file shown file:///C:/Program%20Files/National%20Instruments/LabVIEW%208.5/help/OpenG/dictionary/Dictionary_Create.htm So I guess it works for me. Tomi
  12. Thank you all! I really enjoy your company, otherwise I wouldn't have made that many posts Don't stop keeping interesting discussion going on... I'll keep up trying to participate these discussions regularily and I also try to occasionally keep posting thse hurts-the-brain issues.
  13. I wrote a subVI for LabVIEW 8.0 and later that should be able to set the process priority class of LabVIEW application instance under Windows 2000, XP, 2003 and Vista. Download File:post-4014-1198863975.vi
  14. QUOTE(Jim Kring @ Dec 27 2007, 12:35 AM) Then you should set the XP process scheduling system to work the same way as in Windows 2003 server where the front most processes don't get extra "boost". The instructions how to disable the boost for front most applications can be found for example in this blog entery. The blog also instructs how to modify the time slice used for process scheduling. Surely you can also run your LabVIEW apps under Windows 2003 server as well if you don't want to use the tricks. If you don't need to do this programmatically, you can disable the front most application boost from Control Panel -> System -> Advanced -> Pefromance -> Advanced -> Processor Scheduling. The second thing you may want to do is to set your application priority above normal. This can be done by calling the Windows API function SetPriorityClass. I don't know if LabVIEW uses this API directly as well to set the priority of different scheduling systems. You propably can call this function directly from LabVIEW by configuring call library node to use Kernel32.dll. Also take a look at these lecture notes, beginning from page 30 the Windows XP process scheduling system is covered. I must confess I've never used these tricks, I just know they exist. So you're on your own if you try these. Please report if you had any success. Tomi
  15. Jim, do you need background application performance or front most application performance or both? Windows XP is optimized for front most application performance whereas Windows 2003 server is otpimized for background application performance.
  16. QUOTE(Justin Goeres @ Dec 22 2007, 01:17 AM) Not all goodies are open source I wanted to hide the anwfully spaghettious code... and a few tricks
  17. I'd like to thank all LAVA members for another amazing year. To spend your christmas holidays ExpressionFlow has developed you an amazing LabVIEW Block Diagram game for LabVIEW 8.5. I wish everyone Merry Christmas and Happy New Year 2008. Enjoy your holidays. Tomi
  18. QUOTE(Dan Bookwalter @ Dec 18 2007, 07:40 PM) I guess I've downloaded it from NI labs and then forgot all about it
  19. In LabVIEW 8.5 there is something called Native 3D Graph under the folder LabVIEW 8.5\Native 3D Graph Anyone has any experience with this package? Is this something supported or something forthcoming that was accidentally included into the build? Seems interesting though, especially the 3D XControl. Though I'd like to be able to draw multiple surfaces and set suface properties such as transparency for each surface separately. Tomi
  20. I've not coded our own Matlab tools by myself. However I checked how do we open ActiveX automation and it seems that for Automation Refnum input of Automation Open node we use constant to automation class MLApp.DIMLApp. Is this the same class you are trying to open an automation refnum for? Tomi
  21. This is one of those features that can be implemented with XNodes.... Simply use AugmentSelf ability to connect your XNode to the stop terminal of a loop and even place your XNode on top of that stop terminal so that it hides the original stop terminal.
  22. There are a few alternatives to call Matlab code directly from LabVIEW. First in the latest LabVIEW version 8.5 there is a new structure called MathScript node. This structure can execute Matlab scripts directly within LabVIEW. However not all Matlab functionality, especially toolkits are available. Then there is an older structure called MATLAB Script node that uses ActiveX under Windows to communicate with Matlab installed on your computer. Third option is to call Matlab directly via the ActiveX interface. Refer to Matlab documentation to find out how the ActiveX interface can be used to call Matlab from external programs.
  23. QUOTE(mballa @ Dec 13 2007, 09:13 AM) If this is the case then you can simply rename the VI you want to remove and then remove. What always works is removing items from a class by editing the .lvclass file with a text or an XML editor. This never fails Tomi
  24. It seems I've missed this topic. There is a simple workaround. Simply open the .lvclass file with a text editor and remove the lines in the items in memory section within the lvclass XML file. Next time you open the class, everything works smoothly. Tomi
  25. QUOTE(shoneill @ Dec 12 2007, 10:21 AM) At least in LabVIEW 8.5 you can copy a value of a class control or indicator from right click menu and then paste it to a class constant, control or indicator.
×
×
  • Create New...

Important Information

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