Jump to content

Aitor Solar

Members
  • Content Count

    259
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Aitor Solar


  1. 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's done.

     

    Regards,

    Aitor


  2. 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 "this field can only be modified by this subset of VIs".

     

    Saludos,

    Aitor


  3. 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 127.0.0.1 in that VI, the TCP connection will survive any plugging / unplugging of the ethernet cable.

    Moreover, if you start the connection with cable unplugged, the connection will survive any further plug/unplug even if you didn't explicitly set it to localhost. This on Windows XP at least.

    You can easily test this behavior with the Simple Data Client.vi and Simple Data Server.vi examples found on LV. Run as they are provided and unplug the cable: ok. Disconnect the address wire on de client, repeat process and get error 66 in a few seconds.

    Saludos,

    Aitor


  4. index.php?app=downloads&module=display&section=screenshot&id=57

    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.

    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 also disconnects the VI from the XNode Library. Solved the "absolute path" bug.

    1.4.0: Initial release in the Repository Code

    Click here to download this file


  5. 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


  6. QUOTE (Norm Kirchner @ Sep 10 2008, 11:28 PM)

    Workaround for the build array...... put the XControl as the top element inputs to the build array and no broken wires.

    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 :unsure:

    Saludos,

    Aitor


  7. QUOTE (mamingcao @ Jul 24 2008, 03:08 AM)

    My company are considering use LabView to do the GUI designed.

    But could LabView add GUI component at runtime ? like a button or a indicator.

    It hard to find Doc about this. Thanks!

    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


  8. 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


  9. QUOTE (Mads @ Jul 15 2008, 02:10 PM)

    This is not a bug, it's the established way LV decides the order in which to do things: If you have a property node it will execute the actions on it from top to bottom. All you have to do in the first case is to swap the positions of the properties.

    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


  10. 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.

    post-1450-1216115877.jpg?width=400

    BTW, the INI file fot he exe is empty.

    Saludos,

    Aitor


  11. QUOTE (Xrockyman @ Jul 11 2008, 01:25 PM)

    Hello, I am using a "log-in" system and I want do disable some controls. To do that I'm using the property node "Disable". The problem is that I have a lot of controls to disable, is not possible to create a "property node" for a group of control or other objects?

    Thanks in advance.

    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


  12. Well, the [0,1,2] array was just an example, obviously consecutive arrays can be generated easier but I was referring to any kind of array. Say you have a boolean array defining different properties of an object. You would like to generate n copies of the default configuration array for n objects in your application and treat them as a 2D array for easy comparison.

    Sure this woundn't be a essential modification, since is the first time I have encountered this problem in all these years, but still it would be useful in some cases.

    Saludos,

    Aitor

    BTW, when testing if the initialize array function admits a cluster with an array inside (it does) I have discovered that if you take a waveform constant and try to duplicate the cluster elements inside the cluster, LV crashes. Funny.

×
×
  • Create New...

Important Information

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