Jump to content

Aitor Solar

  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by Aitor Solar

  1. True, "sc create" and "sc config" are very useful commands to register your app as a service, and don't demand to reboot the machine Regards, Aitor
  2. I've using for years the "anyservice.dll" way described in http://forums.ni.com/t5/LabVIEW/running-labview-program-as-system-service/td-p/878148 and it works great. Unfortunately, original Chen's post seems to be gone, but basically you call asynchronously the DispatchService call in that DLL, and in turn when OS needs them it calls methods BeginService and EndService in a server.dll you provide . You can put the code you need in those two methods, I usually just take the EndService to close my application. Then register your exe as a service (thtrough "sc create" command, for example) and it'
  3. Well, recently I've been working with a class that does a lot of simple tasks, but a sub-group of them have become increasingly complex and sensitive. Now I would like to further isolate that set of properties from the rest of the class VIs to be sure no old and forgotten code messes it all. I'm going to add a new class inside the old class and move the critical fields to it, but that will force me to implement some encapsulation in the original class (to allow the external code call those methods). Your suggestion would be a step in simplifying the problem, but what I'd really need is a "
  4. Thank both of you, it seems logical when you think of it, but I had always thought that leaving that wire unconnected was exactly the same as using "localhost" . Saludos, Aitor
  5. Hi, people. I've found a surprising behavior in the TCP Open Connection VI. Simply put, if you open a TCP connection from LabVIEW to another application in the same computer, using the "TCP Open Connection.vi", and you don't wire anything to the address input, connection works ok. But if then you unplug the ethernet cable from the machine, your connection will be closed in a few seconds (the OS, I'm guessing). Now, if you explicitly use as address "localhost" or in that VI, the TCP connection will survive any plugging / unplugging of the ethernet cable. Moreover, if you start the
  6. You can also prepare your own XML and send it through the "Write Response.vi". Just configure the method VI output type to Stream instead of Terminal. I think this is the best solution as you can format the XML just the way you need, and avoid all that "name - value" tags. Saludos, Aitor
  7. Here you are. The "read characters from file" primitive has been automatically replaced with open - read - close VIs. Saludos, Aitor Open_Data_File_7_1.vi
  8. Right-click in the Register Event Callback node (put the mouse over the "VI Ref" input) and select "Create Callback VI". Et voilá Saludos, Aitor
  9. Well, this seems to work, though you'll need to transform the string into an U32 (the string is the hex value of the reference number). Saludos, Aitor
  10. If you still want to test the variant type before trying the variant casting, the 6th byte in the typedesc will tell you the refnum type (value 7 is for ActiveX Automation references). Though I do agree the other way is probably faster. Saludos, Aitor
  11. 1,718 downloads

    Copyright © 2007, Aitor Solar All rights reserved. Author: Aitor Solar --see readme file for contact information. Description: This is an application for creation and management of XNodes. The program allows to open or create XNodes, to add or remove abilities and to easily access the ability VIs. It's prepared for all the LV82 abilities. Dependancies: The application requires the Internet Toolkit for LabVIEW 8.2 Change Log: 1.5.2: Added managament of the XNode icon. 1.5.0: Added descriptions for the XNode (read/write) and the abilities (only read). 1.4.3: Now, removing an ability
  12. Name: XNode Manager Submitter: LAVA 1.0 Content Submitted: 03 Jul 2009 File Updated: 03 Jul 2009 Category: XNodes LabVIEW Version: 8.2 Version: 1.5.2 License Type: BSD (Most common) Potentially make this available on the VI Package Network?: Yes Copyright © 2007, Aitor Solar All rights reserved. Author: Aitor Solar --see readme file for contact information. Description: This is an application for creation and management of XNodes. The program allows to open or create XNodes, to add or remove abilities and to easily access the ability VIs. It's prepared for all the LV82 abilities
  13. QUOTE (tilli @ Feb 25 2009, 01:36 PM) Great, but I would advise to use "Fract/Exp String to number" instead, is much faster than "Scan value". Saludos, Aitor EDIT: Oops, and nicolasB has been faster than me
  14. Probably the easiest solution is to typecast the user event reference into a user event reference with the name you want. Saludos, Aitor
  15. Well, I would make the listbox an indicator, with no customizing. Then detect a mouse-click event over the second row, position an invisible numeric control over the selected cell and make it visible, so the user can enter a number. Detect the value change event, convert it to string and put it in the listbox. Iy's easy and avoids the possibility of entering a text instead a number. But surely there are many other approaches. Saludos, Aitor
  16. I haven't tested the VI, but I see you are waiting events for refnum value changes. The refnum value won't change until the reference is disposed, since is just the memory address. I think you are looking for a value change event and, in addition, don't use events in the subVI but in the top VI since it's there where the controls are. Saludos, Aitor
  17. QUOTE (Norm Kirchner @ Sep 10 2008, 11:28 PM) The build array bug is known at least from 8.2. In fact I think we talked about it here, but can't find the topic Saludos, Aitor
  18. QUOTE (Norm Kirchner @ Jul 28 2008, 08:33 PM) Interesting idea this "brat" . The (minor) problem I see is the need to stop the brat loop from outside. You don't always stop the top VI with a stop button (there could be stop conditions, external command, etc.), and though you could solve it calling a "value (signaling)" event, I find more elegant to use a callback event, as shown: http://lavag.org/old_files/monthly_07_2008/post-1450-1217313173.jpg' target="_blank"> This way, you can forget the brat VI (and nobody wants to keep an eye on a brat, true?). Saludos, Aitor
  19. I think it's better if you describe a detailed example. I'm sure there is a good way of handle it in LV without the necessity of creating new objects at run time, but it depends on what's your goal. Saludos, Aitor
  20. QUOTE (mamingcao @ Jul 24 2008, 03:08 AM) It would be really difficult (if possible) and involves scripting, dinamic calling of VIs, etc. But maybe it's not necessary, if you just need indicators or buttons to appear in some cases, create them and make them visible / invisible / disabled depending on the case. Saludos, Aitor
  21. Well, some dialogs can show up in remote panels when the remote user has control of the VI, but fail when the remote is just viewing. In any case the file dialog doesn't work in remote panels, either controlling or viewing, and throws the error 43 you are experiencing, so using your own file dialog VI as Neville advises is the answer. Moreover, you probably don't want the remote user to play with any file in your computer, so a file dialog limiting his scope is twice better. Saludos, Aitor
  22. QUOTE (Mads @ Jul 15 2008, 02:10 PM) I know, but that doesn't explain why it works in the development environment and not in the executable. And I can't see why it shoudn't work, anyway: first I set the port I want to use (while the server is off) and then I activate the server through that port. In fact, seems to be more logical for me than the other way (first activate the server through a default port and then changing that port). What if there's already some application using the default port? It will launch an error before you can change that port to avoid conflicts. Saludos, Aitor
  23. Maybe this is too easy to workaround to be considered a bug, but is annoying anyway. This code activates the TCP interface to the VI Server, the only difference between the two cases (true and false) is the property order. In the development environment, both cases work fine. But in an exe, only the second one (first activate, then assign port number) works, the other reports using port 3363 (LV default port, IIRC) even if you have designed another one. BTW, the INI file fot he exe is empty. Saludos, Aitor
  24. QUOTE (Xrockyman @ Jul 11 2008, 01:25 PM) Not that I know. There's a private property to retrieve the references of a group of objects, but is unsupported. Usually there are simpler solutions. For example, to have your controls in tabs, so just disabling the tab disables all its objects. Or to have an invisible control on top of the other controls you wan to disable: make it visible and it will block everything behind. Saludos, Aitor
  • Create New...

Important Information

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