Jump to content

jcarmody

Members
  • Posts

    947
  • Joined

  • Last visited

  • Days Won

    39

Posts posted by jcarmody

  1. The code for generating the typedef and code itself is simple and nice, but there's absolutely no way I would stop using the other solutions (such as the OpenG VIs shown earlier or the MGI VIs) to use this.

    [...]

    Yair,

    The beautiful thing is that Joe's solution makes the typedef constant to use with the OpenG VIs. My current workflow has me creating/editing an ini file and then creating/editing a typedef'd cluster. This makes the cluster for me and, as long as I can fit it neatly in my LabVIEW\projects folder, I see myself using it whenever I need to work with config files.

    What does MGI have for this?

    Jim

  2. [...]

    I'll look into the ability to abstract out which config files are used... <famous last words> it looks pretty easy </famous last words> :)

    Joe Z.

    I wasn't referring to the OpenG alternatives to the NI VIs, I was thinking about the Read and Write Ini cluster VIs.  This snippet uses the Read Ini Cluster VI and the typedef from your program to do read the ini file in two steps (you'll need to convert the variant).  I don't think there's any need to abstract out the config files, unless someone else has a use-case, because I'm only going to use the typedef control. But I'm going to do that every time I have a config file so your work will help me a lot.

    post-7534-126624928909_thumb.png

  3. Yippie!!!  From the Washington Post.

    (tl.dr. - jury acquitted drug dealer when police testimony appeared fabricated)

    I later spoke with one of the jurors, who told me they had been split, 10 for acquittal and two for a guilty verdict. Many of them had simply mistrusted the eyes. They didn't believe he could have possibly seen the ginger ale bottle or the v-neck or the key, and they felt his apparent willingness to lie had tainted the prosecution's whole case.

    Let us know how that goes.  Assuming prisoners have internet access in NC. laugh.gif

    How do you think it would go after the following, hypothetical conversation?

    Judge: I hold you in contempt of court!

    Me: Ya think?

  4. Ok. I really want to know: Why do you need Singleton? What are you using it for? I implemented the example that ships with LabVIEW because lots of people wanted to see some implementation for it. But I honestly am not sure why you want it in LabVIEW. In C++ it makes perfect sense, but not so much in LabVIEW. At least, that's my opinion. Now, you can ask why I would think a construct would be useful in one language and useless in another... I have an answer, but I'd rather not share it at the moment. First I'd like to know what you're doing with these Singleton classes. I have yet to be convinced that it is a useful pattern in LabVIEW.

    Would you share the answer now?  I understand what's been discussed but haven't learned if I should learn to use Singletons.

    Thanks,

    Jim

  5. The wire datatype is always a datatype of its source terminal, which is always first element of Terminals[] property of the wire. And Terminal has Data Type property (variant) and Type Descriptor property (which is not exposed in scripting, so you have to use Scripting Workbench or PMS Assistant to get it).

    What concerns not centered wire - I can't open your code (please save in 8.2) but I belive that you should use Create Described Wire method providing as wire description start and end points which should be center terminal points (see my previous post). Remember that coordinates should be provided in reversed form (y,x). Check out how I do it in my Weird Wires plugin.

    The Data Type property seems to hold the data, not the type.  The Data Type of the States wire contains the Variant "".  I've managed to get the data type, having found a reference that said it is found in the low byte of the first element in the Type Descriptor array.  This turns out to be 26 in most cases, but not all, so I still need help.

    Here's an 8.2 version.

    Insert_AS2Q.llb

  6. I've made this into a JKI RCF plugin to simplify (my) life when writing a VI with a JKI State Machine.  I don't often duplicate cases to make a new one, and I use Linked Tunnels so my tunnels are all wired, but I have to put the Add State(s) to Queue.vi into the new case manually.  I've resorted to leaving it outside the State Machine (initializing the Shift Register) so I have one handy to ctrl-click/copy/drag.  I suspect that's why JKI put it there in the first place.  It only takes a few seconds but I've wanted a RCF plugin for a long time.  (This was one of the first RCF ideas I had.)

    You install this like you would any other RCF plugin.  To use it, select the State String wire, activate the RCF and select "Insert AS2Q" and it'll insert the SubVI eight pixels from the output tunnel (just where my OCD likes it :)).

    Two questions:

    1) How can I test the data type of the wire?  I don't want to activate this plugin unless a String wire is selected.

    2) Am I the only one that thinks this will be useful?

    Thanks,

    Jim

    Insert_AS2Q.llb

  7. You already have everything you need. The average position between terminals is certainly not what you want, but you can get the terminals' position easily from your wire property node.

    post-10515-126342422673_thumb.png

    Almost, but it doesn't give me the position of the terminals relative to the wire's owner.  This is what I worked out after I found that the Case Structure is the Terminal's owner's owner.

    post-7534-126347295903_thumb.png

    • Like 1
  8. I've written a VI to insert the Add State(s) to Queue SubVI and wire it into the States string of a JKI State Machine.  My problem is that I can't figure out how to calculate the position relative to the owner of the wire, so I've hard coded an offset.  It works well enough, but I don't like it.

    Could you look at what I've done and see if you can help me position the SubVI properly?  If I could only find the position of the wires owner I think I could finish this.

    To test this: download the BD Minion, run it, go to a VI with a string wire, select the string wire then press the "Add States to Queue" button.

    Jim

    BDMinion.vi

  9. Unless you want to use VIs available thorugh the VI Package Network (like OpenG and JKI sutff) then you don't need to be connected to the internet to use VIPM internally - you can just set up and access your reuse packages internally (or off an internal network using the enterprise edition of VIPM).

    If you can use portable media, you can install OpenG & JKI packages onto a PC that's not connected to the internet.

  10. Hi all!

    I got a problem here.

    First of all, this is cute!  Use the boolean Not, instead.

    post-7534-126329767483_thumb.png

    I think your problem is that the solenoid VI isn't showing.  Right?  You can make the form into a dialog and that'll make it work, or you can customize the properties of the window.  Use File -> VI Properties (or ctrl-I) and select Window Appearance category.

     post-7534-126329794587_thumb.jpg   OR   post-7534-126329795317_thumb.jpg  

    You can also simplify the logic in solenoid.vi.  I added the Wait function.

    post-7534-12632980673_thumb.png

  11. [...] I'm somewhat nervous about passing this exam!

    Martin,

    I was nervous when I took the exam, so I understand (at least, in part) how you're feeling.  Your four years of experience may put you ahead of where I was (with <1 year) when I passed it. The graders were, thankfully, more compassionate than I would have been were I grading my own submission.  I don't want to lull you into a false sense of security, but also want to let you rest assured that it's a fair test of your ability to implement the fundamentals and not a horrible weeding-out process.  Good luck :).

    Jim 

  12. Has there been any thought given to supporting the Event Structure, in addition to Case Structures?

    I started with plans to include all multi-frame structures but immediately eliminated support for Stacked Sequences and soon found that an Event Structure's frame names aren't accessible.  I asked a question about this on NI's API community here, and it was added to a list of desired access to properties/methods here.  I thought there was another discussion with more comments, but I haven't been able to find anything.  I don't know if anything new was exposed in LV2009 because I don't have it yet.  It's on my list of features to add.

  13. The very first call is VI.FrontPanel.Status=Hidden and the very last call is VI.FrontPanel.Open=False.

    All I see now is the flicker of the Active VI (BD Open) due to the loss and regain of focus.

    Is your try in the code (Your GetCCTSnippet link)?

    Felix

    It's not in the code, but it didn't work.  I tried again (just to be sure).

    Jim

×
×
  • Create New...

Important Information

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