Jump to content

jgcode

LabVIEW Tools Network
  • Posts

    2,397
  • Joined

  • Last visited

  • Days Won

    66

Posts posted by jgcode

  1. I don't think there's a way to get the qualified name from an object. You can get it from a class reference...

    I suppose what would be ideal is if I could pass in any Object (value) and have a primitive that returns the qname and version of that object.

    A bit late to the conversation I know, but why can't you encapsulate the reference to get the desired effect (assuming Class exists on disk)?

    I remember I had to do something similar when scripting once.

    Don't know it it helps?

    Cheers

    -JG

    Here is an example project

    post-10325-0-95145700-1305206854_thumb.p

    The VI's API accepts a LabVIEW Object as an input

    post-10325-0-82017200-1305206481_thumb.p

    Behind the scenes it just uses a Class Reference but that is encapsulated

    post-10325-0-55517400-1305206849_thumb.p

    Here are the results

    post-10325-0-77892700-1305206483_thumb.p

    I also tested it as a build and these properties are available in the LV Runtime.

    FQN_LV2009.zip

    Code is in LV2009

  2. The outputs of a node (subVI, primitive, structure etc...) are not available until all inputs have been received and the node has finished executing.

    From a design point of view, if the two tasks are truly parallel, and therefore independent of each other, why couple them inside the same subVI? Not a feature I have played with a lot: but would inling the subVI solve this issue. Therefore, I don't think the two examples are exactly the same code because in (2) you have always enforced sequence order.

    And yes, I would not want this to change :)

  3. yeah, when we were prepping for the exam, our conclusion was that the example with the XControl was completely pointless. I understand they have tons of usefulness, and I hope to get into them in the very near future, but for the CLA ... well, i know I passed and I didn't use one.

    I disagree that they are pointless. In the sample exam encapsulating the keypad buttons into an xcontrol makes complete sense. And IMHO is the correct architectural choice wrt to designing the UI for that part of the example. Of course you could code and example without them and still have it work, but in this case, I think an xcontrol is a 'better' choice.

  4. I was wondering want people's thoughts are on the behaviour of the Shared Variable Value Change Event.

    If this variable is written to on e.g. a RT target then it will cause a Value Change Event.

    In this case, as the program loops it updates all variables, with the latest data.

    In the video you will see that the value of the ALARM WORD does not change (stays as zero) however, an event is still fired.

    The problem is that this was happening for a large number of variables (500-1000+) and seemed to be stressing out the Variable Engine (even causing it to crash).

    Now the behaviour seems correct compared to doing the same thing with a e.g. ValSig node on a simple BD.

    But for Network Comms I don't see the point in the Event occurring if the value has not updated but has just been written too with the same value.

    Regardless, (assuming that there is not one already???) do you think there should be an option to filter this behaviour?

    We ended up doing the filtering in the code on the RT side, but a configuration option would be cool.

    Cheers

    -JG

    <object id="scPlayer" width="1168" height="711" type="application/x-shockwave-flash" data="http://content.screencast.com/users/jgcode/folders/LabVIEW/media/d8bb4fe1-a57c-47c1-989c-b80b42238d3c/bootstrap.swf" > <param name="movie" value="http://content.screencast.com/users/jgcode/folders/LabVIEW/media/d8bb4fe1-a57c-47c1-989c-b80b42238d3c/bootstrap.swf" /> <param name="quality" value="high" /> <param name="bgcolor" value="#FFFFFF" /> <param name="flashVars" value="thumb=http://content.screencast.com/users/jgcode/folders/LabVIEW/media/d8bb4fe1-a57c-47c1-989c-b80b42238d3c/FirstFrame.jpg&containerwidth=1168&containerheight=711&content=http://content.screencast.com/users/jgcode/folders/LabVIEW/media/d8bb4fe1-a57c-47c1-989c-b80b42238d3c/LV_2010_-_DSC_-_Shared_Variable_Events_Issue.swf&blurover=false" /> <param name="allowFullScreen" value="true" /> <param name="scale" value="showall" /> <param name="allowScriptAccess" value="always" /> <param name="base" value="http://content.screencast.com/users/jgcode/folders/LabVIEW/media/d8bb4fe1-a57c-47c1-989c-b80b42238d3c/" /> Unable to display content. Adobe Flash is required. </object>

  5. I agree with jgcode that we need to vote the good ideas regarding this up. I did a quick search in the Idea Exchange and I couldn't find an idea regarding being able to configure timers for an event structure... ...jgcode, have you added that idea? if so where, I would like to vote for it.

    I headed to the IE and found these two ideas on the subject of Timers in the Event Structure.

    Cyclic event for event structure ... a kind of timeout but cyclic !

    Combine the event structure and the timed loop

    Given we implement the functionality one way of another, it may be nice to have it native.

    Also, there is (the start of) a few interesting comments in the above ideas.

    As they are a few ideas that have come out of this thread, the authors should definitely post them up to the IE so we can vote them up!

    Hi Fab!

    I searched the IE and found the above so I didn't add my own.

    FWIW, I don't think I want the features of Timed Structure just a simple configured Timer(s) that would expire and get added to the end of the (event) queue - as that is the behaviour I would get if I coded it myself.

    If you think this warrants a new IE please let me know or go ahead and create it and I will vote for it cool.gif

  6. What could be the best way?

    1.) Set these controls references as a class private data In the car class and handle these references on time when a specific method executed,

    2.) Create a new singleton object that contains all of my buttons palced on the front panel, defining methods such as Car_Stated and palce this method a specific position on the diagram?

    Hi durnek60

    I use a combination of both along with handling it directly on the BD depending on my requirements.

    The only issue I can point out with Classes is that you cannot have a XControl reference as private data - well technically you can, but your build will break :).

    In those cases I therefore use a Class and a MFVI for the X-Control or just use a MFVI for everything.

    Of course for small dialogs etc... where I feel I do not benefit greatly from encapsulation etc... then I do stuff straight on the BD cause its easier.

    Cheers

    -JG

    • Like 1
  7. Hello LabVIEW Community.

    I'm gathering some research and would like to know the following:

    1. Do you use LabVIEW Snippets?

    2. How often do you create new snippets?

    3. How do you organize your snippets?

    Just general answers. I'm just getting a feel for how the community is using this feature.

    Thank you in advance.

    Ryan

    Hi Ryan

    I find I post snippets to the online community when I want to post some really simple code and a screenshot.

    But I find myself in most cases uploading VIs either because its quicker (I have made the VI, and have to annotate a screenshot with arrows anyway etc...); or better (contains multiple VIs, nodes (e.g. references) don't get changed) than snippets.

  8. I view XControls as an encapsulated unit of UI functionality, much in the same way a class is an encapsulated unit of programmic functionality. I have found them most useful when I want to reuse some bit of customized UI behavior in multiple places, which doesn't happen often. Usually I just customize the control's behavior on the VI's block diagram rather than creating an xctl. I have too many crashes and issues with xctls to want to use them more than necessary. My personal opinion is that there are better ways to spend your time than by creating an xctl.

    I come to this conclusion too whereby I prefer to create a class that manipulates the UI (via a refnum) then create an xctrl when it gives me the same effect (i.e. encapsulation). But I still wish xctrls get an overhaul one of these days.

    Well I am familiar with them for what it's worth ;)

    But I think I will probably just dig in and create one for fun.

    I think Daklu and I mean familiar equals experience as opposed to knowing of.

    And from a pure exam perspective if one was needed, I would not be wanting to be finding out the caveats etc... of such an implementation biggrin.gif

    So checking them out would definitely be a good idea.

  9. I have been looking at the sample CLA solution which has an XControl. You are not really expected to create an XControl are you?

    Yes, if it suits the requirements. I would say in general, you should be familiar with them if you are architecting projects. Although I have had my fair share of drama with them ;)

×
×
  • Create New...

Important Information

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