Jump to content

Aitor Solar

Members
  • Posts

    259
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Aitor Solar

  1. QUOTE(Tomi Maila @ Nov 7 2007, 05:47 PM)

    Has anybody succesfully defined the palette icon of the XNode?

    Yes, it's easy. Things go more or less like this:

    1. If your XNode has a description, the palette will show the XNode library icon.
    2. If the XNode doesn't have a description, then the palette will show the Help VI icon.
    3. If the XNode doesn't have a description nor the Help Ability, then the palette will show the Initialize VI icon.
    4. If the XNode has no description, no Help and no Initialize, the palette won't accept it.

    So, use a description :yes:

    Saludos,

    Aitor

  2. Well, the problem arises in the "7.8" step, when you compare two "7.8" values and the "greater?" function returns true. I'm not an expert on this but I believe is usual for floating point numbers not to be exactly the expected value, due to accuracy limits (number of bytes, etc). Surely someone else can explain better.

    Anyway, it's better to avoid those risks. For example, you can substract both values and check if the difference is greater than 0.1, or work with integers and convert then to double in the end.

    Saludos,

    Aitor

  3. QUOTE(tcplomp @ Oct 22 2007, 01:09 PM)

    To me this sounds rather silly because IMHO an XControl is a standalone piece of software that should be able to run standalone.

    I think it can run standalone. Create the user event in the XControl (for example in the initialization) and store it in the State, then add a property or method for retrieving the user event reference and register it in the owning VI. The XControl will work on its own, and if you don't need the event, don't use it.

    Saludos,

    Aitor

  4. QUOTE(yen @ Oct 8 2007, 10:48 PM)

    Can this be done using scripting?

    No for what I've seen. Through scripting you can tell LV to set the output wiring rule to required, but it has no effect, just like in 8.2. And I suspect in that case Michael would have put it in Ruty Nails.

    It must be something like an automatic adaptation where LV bypass that checking... No idea :wacko:

    Saludos,

    Aitor

  5. QUOTE(PJM_labview @ May 24 2007, 08:48 PM)

    Well there is an easy work around:

    - Enable you control

    - Update value

    - Disable control

    True, but there are also some minor problems with that:

    1) If you try to change a disabled XControl, not only fails but, after that, keeps failing even if you enable it again, until the user interacts with it (or until you close the VI and open it again). I'm assuming the XControl remains in some kind of internal bad state. So if you are not careful enough and forget to remove just one case of "set value while disabled", you can make your XControl useless for the rest of the application.

    2) My XControl is not disabled itself, but inside a disabled tab control. So I have to carry around the tab control refnum to enable and disable it (or get the XControl owner object to enable / disable it). It can be done, but doesn't seem very efficient since there are a lot of XControl instances (almost all the numerical controls/indicators) and I don't know if they are enabled or not :wacko: .

    Anyway, I'll implement some similar solution and hope not to forget anything ;) . Thanks.

    Saludos,

    Aitor

  6. QUOTE(Aristos Queue @ May 23 2007, 09:03 PM)

    Thanks, Aristos.

    Now I have found an ugly bug with XControls. XControl value property doesn't work if the XControl is disabled. I've looked in the NI forums and is a known issue: http://forums.ni.com/ni/board/message?board.id=170&message.id=177819' target="_blank">http://forums.ni.com/ni/board/message?boar...ssage.id=177819

    Now the question is: has been this bug corrected in LV 8.2.1? I have my app almost finished and so I haven't updated to 8.2.1, but I'd do it if that's the solution. If not... If not this would be a big, big problem, since I need to update an XControl value from another VI when that XControl is disabled :(

    I have attached a very simple test VI. If anybody can test it in LV8.2.1 I would be grateful.

    Saludos,

    Aitor

  7. QUOTE(nhollenback @ May 15 2007, 07:28 PM)

    Trust me, I do nothing: I select the Thermometer XControl that ships with LabVIEW 8.20, I hover it over the block diagram and see something strange like an empty lowered box

    http://forums.lavag.org/index.php?act=attach&type=post&id=5880''>http://forums.lavag.org/index.php?act=attach&type=post&id=5880'>http://forums.lavag.org/index.php?act=attach&type=post&id=5880

    And when I release the mouse, crash.

    I don't think the XNodes are related to this (though I have seen strange errors in XNodes when trying to create an XControl input, so who knows).

    Just to be sure we are doing the same, I don't mean to drag an XControl from the front panel to the block diagram (that works) but placing it directly in the BD. Steps: in the BD right click -> Select a VI -> go to the XControl folder -> select "All files" to see the XCtl -> select the XCtl file -> place in the BD.

    Saludos,

    Aitor

  8. QUOTE(nhollenback @ May 15 2007, 02:17 AM)

    Aitor - I noticed your post and just dropped a simple XControl into the BD and it did not crash LV (8.2). It simply did what I expected...create a constant of the data.ctl data type.

    What does your xControl do?

    Nothing special, in fact I also tried it with the xctl in the LV examples (dual thermomether I think it's called, is placed in examples/general/xcontrols) and the behavior is the same: crash boom bang. Did you tried with 8.20 or 8.2.1?

    Saludos,

    Aitor

  9. QUOTE(Ami @ May 1 2007, 05:55 PM)

    Update: Now I realize that he can close the App1.exe, but he needs to know if App1.exe stopped running.

    He could implement an ActiveX / TCP / Shared variable communication with App1 from App2 and test it periodically. If it doesn't respond, abort it through a taskkill or similar. You can even reinitialize it from App2 to avoid lost time.

    Saludos,

    Aitor

  10. I personally don't think XControls are the definitive solution for UI customizing. Are interesting, yes, but have too much caveats. When you make a XControl, you want the behavior of a normal control plus some specific changes. The way XControls are conceived, when you create a new one you go back to a generic control and then you have to add all the things a specific control type (like numeric, picture, etc) does (and then, of course, make the special things you want for your XControl).

    IMHO, some things are not well implemented like the error propagation, the impossibility of using a XControl property or method inside another property or method, the absence of a simple way of adding your own events, etc.

    As you can see, I'm a little dissapointed with XControls even if at the beginning I considered it a great step forward. I'm looking forward Michael's presentation too, because I'd love to love XControls again ;).

    Saludos,

    Aitor

  11. QUOTE(TiT @ Apr 23 2007, 10:39 AM)

    What is you LV version ? Because with LV 8.20 the is no crash with "http://www.google.com", I just get no result and no answer... but no crash !

    That VI is done with LV7.1.1f1, and the error alert before crash says: "The exception Breakpoint. A breakpoint has been reached.", that is also pretty strange, I think. I don't have any LV8+ connected to the web to check if it works, so I'll trust you ;). Probably just a bug that was corrected in later versions.

    Saludos,

    Aitor

×
×
  • Create New...

Important Information

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