Jump to content

Black Pearl

Members
  • Posts

    410
  • Joined

  • Last visited

  • Days Won

    13

Posts posted by Black Pearl

  1. Got some of it working!

    Place a string control as vi obj class String Constant using Scripting on the BD.

    Type Cast the reference to String Control using Flatten to String/Unflatten From String (to more specific throws error).

    Now I can succesfully access the Size property of the String Control Class!

    Still need to check with arrays, enums...

    Felix

    Progress: Enums go as well.

    Will try arrays tonight...

  2. Got some time, so here the results.

    New VI object: style = string Control 1; vi obj class = String Constant (Decoration.Text does not work).

    To type cast the object, instead of to more specific class, I use Flatten To/Unflatten From String (works without errors). Now I have the reference as String Control. If I try to set the Key Focus I get Error 1058 'Specified property not found'.

    Felix

    • Like 1
  3. I was playing around a bit as your question is related to mine. Maybe the following might get you a bit further, as I can't continue right now:

    You can create a new String Control on the BD via scripting, but need to pass it as Decoration.Text (String Control from the Enum, Decoration.Text from the Type Specifier). Maybe this can be cast as String Control. If you set the Type Specifier to String Control, you get the error 'the BD is not able to hold that type'.

    To go into more detail how the controls are constructed: The Key Focus is part of the 'Control' (or was it 'String Control' ?), while nested inside you get String Control.Text which is the same as Decoration.Text.

    But I'm not sure how we can reach the container that contains the text and offers us the KeyFocus. I guess that owner is set by the New Object function.

    Other ways to explore, but I still have no hint where to start: The method of GObject CallClassOp, but I didn't find any call parameters searching on LAVA and NI. Even more of a hack would be (maybe it returns a parameter for CallClassOp) to get the binary of the String Control and look for any human readable text. Either we can dereference the Reference of the control (with some MemCpy things), use a hex editor to search the LV memory or we find it in an binary file (I did have a look at mesa.dll with wordpad with no positive results).

    Felix

  4. Propably you can workaround by creating a mouse click on the appropiat location. But this would be heavy coding if you need to interface that via Win API (and not nice plattform independent code).

    Do we have some way to directly pass Mouse Events to LV?

    Felix

  5. The two cases I face are:

    * An array of strings

    * An array of enums

    I would like to set a fixed width for both kinds of elements. I can do this in the editor (It doesn't work for enums alone, but if they are contained in an array container).

    My result so far:

    * Bounds, MasterRect, ... are all write only

    * Left of the array moves the array, but the right side as well

    * Element.Left does have no effect

    * With an FP string, there are 2 ways (Size and Text.Size), none of them available for a BD Constant. Create Constant and Change to Constant as well as Copy/Paste loose the size information.

    Felix

  6. Don't forget that the vanilla way in most text based OOP languages is the by-ref design. These cowboys like to shoot around with pointers instead of keeping all safe on the wire.

    If I were to create a Fewton'O'Eight, I also would consider a queue, create 8 objects and store them in the queue. Whenever a request is received, dequeue one of these objects. Whenever a object is returned, enqueue it again. I think this approach is simpler than the array (because the objects are not ordered).

    Felix

  7. It is on the german wikipedia in the article about design patterns (right after singleton)

    http://de.wikipedia.org/wiki/Erzeugungsmuster

    In the artcle about Singleton, another variant is mentioned: the Multiton.

    Another ressource is the following implementation of the Fewtone (german text, but implementation is java/english)

    http://www.junit-buch.de/doc/fewton.html

    I also found some real examples why you want to have a Fewton. If you have a limited ressource available (network bandwidth), you want to limit the number of processes (number of downloads, torrents ...) that access these, but to a number >1.

    Felix

  8. Tough topic, but face the situation: Computer 'geeks' have no idea about 'gender-studies', and 'gender-studies'-persons have no ideas of computers/geeks. And this is based on simple equations like 'gender-studies'=females(historical feminist background required) and 'computers/geeks'=males(we already call it software, what else do you girls want from us?). But I just want to leave this challenge to the academia staff to solve.

    Here just some info I can throw in:

    * In CS the western countries have a very bad gender ration about (guess) 95% male: 5% female, while in such anti-women countries as Iran you have over 50% women in CS

    * a friend of mine (woman studying CS) tells me, that most of those 5% are non-western (coming from arabic or asian countries)

    -> so this seems to be a cultural issue

    * another friend of mine (she was trying tom revive women power) realized, that in 'free`communities such as Open Source projects, the gender ratio is even worse than in average CS industries (geek factor?)

    * a recent study showed that girls confronted with predjudices (girls are bad at math) performed worse in math tests than girls that were not confronted with these.

    * In engineering, a very big gain is community (think about our lovely LAVA community), but community building is gendered to women. How can we perform at all with that lack of female influence?

    BTW: My sister is VHDLing robots in a big company, geek?

    Felix

  9. I'd say, that the AE is superseded by LVOOP. We shouldn't blame them as Anti-Patterns yet for reasons Ben mentioned (we got used to them) as well as issues we will face when we rewrite legacy code to be OOP.

    The main reason IMO for AEs is encapsulation. So I have a configuration data TD and a set of methods (load, save) and each of these methods (they might be SubVIs or inlined code) goes in one case of the AE.

    When you have a wide variety of parameters for the set of methods on the AE, you will get a messy interface, either due to a big cluster or a huge number of terminals or both... But we managed to deal with that by exposing the relevant parameters only with a set of Wrapper VIs (especially to mark the required inputs). So we have a hierarchy like this:

    n Wrapper VIs

    1 AE with data in shift register

    m SubVis

    Using LVOOP we eliminate the AE layer having only the accessor methods (which is the level of the wrapper).

    n Public Accessor Methods

    1 Private Data Cluster

    m SubVis

    OOP gives as some more benifites:

    * interface, so we have public and private (ok, we can do it also for AEs as suggested above, recently I was thinking of just postfixing VIs to mark it as public/private)

    * inheritance

    But there are differences between both designs, and these will still give the AE a place in our templates folder. Even more, these differences should warn us not to blindly replace AEs by OOP:

    * AEs are effectivily serializing the access to the data (or whatever we encapsulate). And it works even on a network scope as Bens experience tells. And all those 100s of posts about singelton design pattern (and I think no satisfying solution evolved yet) are a clear sign that the time of the AE is not yet over. Either we still think in AE serialization or this is a serious drawback that comes with OOP. My personal thinking is, that the singeltone debate will be solved by employing an AE (either encapsulating the Object or implementing the locking mechanism inside our class.

    * AEs transport the data wireless (that makes a good marketing slogan: 'transmitt your data wireless with Action Engines'). As such they are a good choice for passing data between parallel loops and between states in a SM when we don't want to sacrifice a shift register for that). This implies that an object replacing them must be based on a by-ref design, which still is evolving with the introduction of the DVR last summer. Current designs still suffer from the serialization we get for free with an AE, leading to race conditions and deadlocks.

    I'd conclude, AEs will become a less important design pattern as LV transforms into LVOOP. Maybe in some years, we will look at this design pattern like we look at stacked sequences today (legacy, but still rare/exotic use cases exist where they are correct to use). And as the rise of scripting languages (such as lua) in the text programmers world showed, the AEs might even come back as a way to 'Express program', which of course we all will reject publicly (LAVA shirts on NI week: 'No AEs required') and all will use for things like prototyping, QD-bugfixes (QD != quickdrop, QD=quick-and-dirty, hint: Darren, change the name for the sake of the marketing guys, they will all go crazy if the read this; if not, remind them that microsoft went big with Q-DOS when just removing the 'quick').

    Felix

    • Like 1
  10. There is two kinds of kinematic: Parallel and serial. Parallel kinematics distrubute the forces much better over the robot structure, so they will allow to make them lighter. But their reach is small (google for hexapod). They are also very difficult to design, so there is a few companies that might offer these. Serial kinematics is the classic arm. There also exist some hybrid solutions (3 axis parallel + a serial axis).

    If you are looking for the classic arm robot, the big ones in europe are ABB (white), Fanuc (yellow) and Kuka (orange).

    For sophisticated solutions I am impressed by Adept. I've once seen a 4-axis parallel-kinematics for pick and place tasks in action and I was really impressed.

    Felix

×
×
  • Create New...

Important Information

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