Jump to content

jgcode

LabVIEW Tools Network
  • Posts

    2,397
  • Joined

  • Last visited

  • Days Won

    66

Posts posted by jgcode

  1. Hi Jon,

    You typecast from LVObject to LVObject, so I'd expect that you don't get an error for that with "To More Specific Class" prim. I suspect there would be a significant increase in overhead if this primitive were to dynamically check for the class hierarchy when it's fed with LVObject. It seems to me that this is like a using the code below:

    <a href="http://content.screencast.com/users/normandinf/folders/Jing/media/7a120e9c-2ed5-448a-973c-9971c69993b2/class%20typecast.png"><img'>http://content.screencast.com/users/normandinf/folders/Jing/media/7a120e9c-2ed5-448a-973c-9971c69993b2/class%20typecast.png"><img class="embeddedObject" src="http://content.screencast.com/users/normandinf/folders/Jing/media/7a120e9c-2ed5-448a-973c-9971c69993b2/class%20typecast.png" width="452" height="249" border="0" /></a>

    While the other case is clearly wrong as expected.

    In my opinion, this is not a bug in the behavior of the primitive but perhaps a bug in documentation?

    Thanks dude!

    I want to run script that finds any member in Project that is a Child of Parent by Name/Ref (not static - so I can't use the constant).

    Is there a better way to do this? - Given the above, I am thinking just looking at the Ancestor Paths for a match in path?

  2. Public Service Announcement

    <object id="scPlayer" class="embeddedObject" width="378" height="333" type="application/x-shockwave-flash" data="http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/3cd7631c-c3b5-4dda-8550-d8774d332741/jingswfplayer.swf"> <param name="movie" value="http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/3cd7631c-c3b5-4dda-8550-d8774d332741/jingswfplayer.swf"> <param name="quality" value="high"> <param name="bgcolor" value="#FFFFFF"> <param name="flashVars" value="thumb=http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/3cd7631c-c3b5-4dda-8550-d8774d332741/FirstFrame.jpg&containerwidth=378&containerheight=333&content=http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/3cd7631c-c3b5-4dda-8550-d8774d332741/L-VOOP.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/LAVA%20CR/media/3cd7631c-c3b5-4dda-8550-d8774d332741/"> </object>

    • Like 1
  3. I'll expand a little on what I'm doing since there were some requests. I use the MGI Read/Write Anything VIs to save data, but the Read/Write Anything VIs currently save LVClass data as flattened data in a Hex string. The LVClasses represent instruments that are used in tests. I've had lots of problems with changing the data inside the class and then having the unflatten fail because the saved data can't be mutated to the new class version. I know that LVClasses are supposed to handle this, so I don't know if I'm doing something strange or if there is another problem, but the first time it happened I just recreated all the instruments, and I assumed it was a fluke. It has since happened enough other times that I felt I needed to address the problem. In fact, I think I am just now realizing the problem; the file that contains the flattened class data is on a shared network drive. There are typically multiple computers reading the instruments, and its possible they run different versions of the software, so that if the new version reads the old LVClass flattened data and then saves it as a new version, then when the old version trys to read the data it will fail because it doesn't understand the new data. I should verify that this is what is happening.

    However, it is not practical to force every lab computer to update at the same time, so I'm still interested in saving the LVClass data in an ini format. I realize I would lose the mutation handling capabilities of LVClasses, but it is worth the trade if I can have old versions of the application able to mostly read the new versions of the LVClass data, which I think will work fine if the data is saved as text fields.

    Currently, I have added a "Write to INI" and a "Read from INI" dynamic dispatch VI to each LVClass in the instrument hierarchy. This gives me the behavior that I want, but it took several hours and I have to remember to update these methods every time I change the data of the LVClass.

    For all the other LVClasses I've written I haven't needed or wanted to arbitrarily save all the class data. This is the first use case where I've wanted this ability. My use case may be strange because all my LVClasses contain data that I want to be persistent and accessible from multiple versions of the built executable. It may be time for me to learn the LVClass mutation rules. I would welcome any comments about the wisdom or foolishness of wanting to save LVClasses into an ini file.

    Hi Shawn, if NI were to release such an API that would be very cool.

    XML is great and easy to flatten/unflatten to, but if the spec requires ini's then you need to handle it yourself, I would love to see this in the palette (and handle mutations etc...)!

    So I am interested in what you are doing.

    Here are some things I have tried as well:

    Like you I started out using MGI VIs to read write cluster to ini. These are much faster than the OpenG ones (which are only APIs I know to do this).

    The speed diffs comes (from the best of my knowledge) from the fact that the MGI VIs save the data as a string, whereas OpenG uses the key-value paradigm and the Config File API.

    The problem with MGI is that you cannot use them for Inherited Classes and make use of reuse - writing the string deletes the previous string.

    So you cannot store parent and child data in the same section.

    OpenG overcomes this issue as the parent keys will persist, (as long as you choose different data member names you won't lose or overwrite any data) so your child data can be added under the same section.

    All you have to do is call the parent read/write method. Sweet.

    As I like LVOOP, my data clusters are small.

    When you read and write small data clusters, as opposed to cluster in cluster with arrays etc...the speed diff gets muted, so OpenG wins hands down for me.

    Now with a little bit of work, and a great post by Jim, you can easily add forward and backwards capability to your classes read/write methods.

    I normally like to store all the section of the ini in one Settings File that has all persistent data.

    So I have a File IO manager that is reusable and handles the general tasks - such as the file versioning in the header.

    Here is a screenshot from an early implementation:

    The File IO Manager is inherited from (for that Settings File Type) and just calls the Read methods of its data members.

    post-10325-014533100 1284762339_thumb.pn

    If you want to take abstraction a step further you can delegate your read write methods to a Class that does just file io.

    I have looked at using Community scope to expose the Cluster to a Friend Class.

    Either this Class does the ini file io and/or you can inherit from it with the other implementations (jki xml, custom etc...).

    Because you are passing the cluster and due to datatyping you have to have a Friends File IO Class for each Class

    Therefore, I could inherit from a single base class ini for file io using a Variant Interface (I am looking into that at the moment).

    I am thinking I could typecast it back if I need to break it out for any reason.

    Any feedback would be great.

    Also I can post code example if required.

    Francois - are you happy this conversation stays on this thread, or would you prefer it moved?

  4. Hey guys.

    I have updated the LVOOP Theme Creator to LVOOP Assistant as I have added some cool new features.

    Check out the vids below. Feedback much appreciated.

    Enjoy!

    Cheers

    -JG

    Intro

    <object id="scPlayer" class="embeddedObject" width="1009" height="728" type="application/x-shockwave-flash" data="http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/8105de4a-4418-472a-9e60-c8b013c6465c/jingswfplayer.swf"> <param name="movie" value="http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/8105de4a-4418-472a-9e60-c8b013c6465c/jingswfplayer.swf"> <param name="quality" value="high"> <param name="bgcolor" value="#FFFFFF"> <param name="flashVars" value="thumb=http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/8105de4a-4418-472a-9e60-c8b013c6465c/FirstFrame.jpg&containerwidth=1009&containerheight=728&content=http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/8105de4a-4418-472a-9e60-c8b013c6465c/LVOOP%20Assistant%20-%20Intro.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/LAVA%20CR/media/8105de4a-4418-472a-9e60-c8b013c6465c/"> </object>

    Rename LVOOP FP Object Labels

    <object id="scPlayer" class="embeddedObject" width="1009" height="728" type="application/x-shockwave-flash" data="http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/61961fba-3f9d-4c67-8f39-b1f586d1b70e/jingswfplayer.swf"> <param name="movie" value="http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/61961fba-3f9d-4c67-8f39-b1f586d1b70e/jingswfplayer.swf"> <param name="quality" value="high"> <param name="bgcolor" value="#FFFFFF"> <param name="flashVars" value="thumb=http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/61961fba-3f9d-4c67-8f39-b1f586d1b70e/FirstFrame.jpg&containerwidth=1009&containerheight=728&content=http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/61961fba-3f9d-4c67-8f39-b1f586d1b70e/LVOOP%20Assistant%20-%20Rename%20LVOOP%20FP%20Object%20Labels.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/LAVA%20CR/media/61961fba-3f9d-4c67-8f39-b1f586d1b70e/"> </object>

    Create Constructor From Template

    <object id="scPlayer" class="embeddedObject" width="1009" height="728" type="application/x-shockwave-flash" data="http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/a58b5ff7-11f6-4d50-a9c3-b008e0af3e99/jingswfplayer.swf"> <param name="movie" value="http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/a58b5ff7-11f6-4d50-a9c3-b008e0af3e99/jingswfplayer.swf"> <param name="quality" value="high"> <param name="bgcolor" value="#FFFFFF"> <param name="flashVars" value="thumb=http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/a58b5ff7-11f6-4d50-a9c3-b008e0af3e99/FirstFrame.jpg&containerwidth=1009&containerheight=728&content=http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/a58b5ff7-11f6-4d50-a9c3-b008e0af3e99/LVOOP%20Assistant%20-%20Create%20Constructor%20From%20Template.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/LAVA%20CR/media/a58b5ff7-11f6-4d50-a9c3-b008e0af3e99/"> </object>

    Create Scoped Virtual Folders

    <object id="scPlayer" class="embeddedObject" width="1009" height="728" type="application/x-shockwave-flash" data="http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/14f3684e-d9fd-4152-b393-ef6843deb121/jingswfplayer.swf"> <param name="movie" value="http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/14f3684e-d9fd-4152-b393-ef6843deb121/jingswfplayer.swf"> <param name="quality" value="high"> <param name="bgcolor" value="#FFFFFF"> <param name="flashVars" value="thumb=http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/14f3684e-d9fd-4152-b393-ef6843deb121/FirstFrame.jpg&containerwidth=1009&containerheight=728&content=http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/14f3684e-d9fd-4152-b393-ef6843deb121/LVOOP%20Assistant%20-%20Create%20Scoped%20Virtual%20Folders.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/LAVA%20CR/media/14f3684e-d9fd-4152-b393-ef6843deb121/"> </object>

    Methods Sandbox (Batch Create Static and Dynamic Methods from Template)

    <object id="scPlayer" class="embeddedObject" width="1009" height="728" type="application/x-shockwave-flash" data="http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/c0a6f59c-b35d-422e-8e1c-4c1e1705dcaa/jingswfplayer.swf"> <param name="movie" value="http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/c0a6f59c-b35d-422e-8e1c-4c1e1705dcaa/jingswfplayer.swf"> <param name="quality" value="high"> <param name="bgcolor" value="#FFFFFF"> <param name="flashVars" value="thumb=http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/c0a6f59c-b35d-422e-8e1c-4c1e1705dcaa/FirstFrame.jpg&containerwidth=1009&containerheight=728&content=http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/c0a6f59c-b35d-422e-8e1c-4c1e1705dcaa/LVOOP%20Assistant%20-%20Methods%20Sandbox.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/LAVA%20CR/media/c0a6f59c-b35d-422e-8e1c-4c1e1705dcaa/"> </object>

    Tools Menu Plugin (in addition to Quick Drop Interface)

    <object id="scPlayer" class="embeddedObject" width="1009" height="728" type="application/x-shockwave-flash" data="http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/270c6792-6600-4f99-b197-00c665092661/jingswfplayer.swf"> <param name="movie" value="http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/270c6792-6600-4f99-b197-00c665092661/jingswfplayer.swf"> <param name="quality" value="high"> <param name="bgcolor" value="#FFFFFF"> <param name="flashVars" value="thumb=http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/270c6792-6600-4f99-b197-00c665092661/FirstFrame.jpg&containerwidth=1009&containerheight=728&content=http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/270c6792-6600-4f99-b197-00c665092661/LVOOP%20Assistant%20-%20Tools%20Menu.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/LAVA%20CR/media/270c6792-6600-4f99-b197-00c665092661/"> </object>

    Unsaved Class Use Case

    <object id="scPlayer" class="embeddedObject" width="1009" height="728" type="application/x-shockwave-flash" data="http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/8aeafd6a-7cb4-459d-834c-4d62b8e6e25d/jingswfplayer.swf"> <param name="movie" value="http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/8aeafd6a-7cb4-459d-834c-4d62b8e6e25d/jingswfplayer.swf"> <param name="quality" value="high"> <param name="bgcolor" value="#FFFFFF"> <param name="flashVars" value="thumb=http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/8aeafd6a-7cb4-459d-834c-4d62b8e6e25d/FirstFrame.jpg&containerwidth=1009&containerheight=728&content=http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/8aeafd6a-7cb4-459d-834c-4d62b8e6e25d/LVOOP%20Assistant%20-%20Unsaved%20Class.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/LAVA%20CR/media/8aeafd6a-7cb4-459d-834c-4d62b8e6e25d/"> </object>

    Currently, some options are hard-coded to my style but there is no reason I can't open all this up if anyone wants me to e.g.:

    Link to your own Static/Dynamic method (.vit) templates

    Create your own Virtual Folder names etc...

    • Like 1
  5. Yup, therein lies the rub.

    I'm aware of your tool but I've never successfully got the right click framework to work on my development systems. Haven't tried since 2010 though, might have to give it a whirl one day.

    Edit: I totally misread the requirements...quick drop plugin, not RCF...I'll definitely need to take a look.

    Cool. New release will have a Tools Menu plugin, so if you don't use QD either (I mean really, who doesn't?) - you can get to it easy. :)

    I really like your idea - and it sound doable.... ...now to find that thing called time...

  6. I am new to both real-time and remote panel connections using invoke nodes. The program I am trying to run is a host machine application, which is trying to open a remote front panel on a real-time machine. The attached files show the invoke node that seems to be causing the error, as well as the error message from LabVIEW.

    From what I can tell, the host is successfully connecting to the RT, but when it tries to open front panels, the server refuses the connection. Also, it is a sporadic problem. It occurrs maybe 85% of the time.

    Can anyone give me direction as to what may be causing this issue?

    Thanks in advance!

    What version of LabVIEW are you using?

    Here is a link on ni.com that discuss some Problems with Remote Panels in LV2009.SP1 including workarounds

  7. Basically, when editing the icon of a dynamic dispatch VI, I'd like to automatically be able to apply an icon change to all child implementations. Not unlike how icon changes propagate through all objects when you edit a library icon, only you know, now for dynamic dispatch VIs.

    Hey MJE

    My LVOOP Theme Creator tool in LAVACR manipulates LVOOP Icons.

    Have you seen it?

    After posts between AQ, ThSa and myself I added a Transparent option, that allows a Child to "inherent" the Parent's icon.

    So if you update the Parent it will propagate through to the Children.

    Does the tool suit your Use Case?

    If you have any feedback that would be great.

    I am about to roll out another version soon too.

    Cheers

    -JG

    The best demo is probably: The Transparency Video in this post

    <edit>

    Ok, I just re-read your post, you want to change the member icon not the Child Class banner.

    Not in my tool, but still scriptable tho (and would complement the tool)

    </edit>

  8. That's what I *would* have looked like if I would have joined in the post-post party partying. :D

    Now that I know what to expect, hopefully when the next NIWeek rolls around that I can attend, I will be in better shape. :)

    Start drinking now?

  9. Thanks for the kudos, everyone. Darren and I will take it from here and see how far we get... keep an eye open for the beta program come spring to see if we made the case. :-)

    You are welcome.

    Are you able to post the before and after Kudos figures?

    I am interested on how successful your web campaigning was.

    Cheers

    -JG

    <edit>

    From your post I see the main idea went from 79 to 182, which sits it under Top Ideas - thats impressive.

    How did the others go?

    </edit>

  10. [LV2009]

    Whenever I open an installer build spec, that is for a med + size app, I have to wait ages for the dialog to appear, then wait a bit more for it to become editable.

    (Way more than for a executable build spec, and sometimes that takes a bit)

    Sometimes I find its easier to edit the XML directly then to wait, (off the top of my head, I can't remember 86 being as bad)

    Its like its doing a bunch of checks, but nothing really changes between opening it from the last time.

    I am talking minutes... ...anyone know why?

    Cheers

    -JG

  11. Ouch.

    Sorry.:worshippy:

    Isn't meant to. And I tried it in 2009 x32 and x64 and had no problems.

    My 2009 is known for sudden fits of crashing like just deleting stuff off the diagram. Try again?:(

    Diagram looks like this:

    No probs - just my luck!

    Thought I'd warn others tho.

    I saw the diagram before I closed it.

    So where did you get it? Or did you script it yourself?

×
×
  • Create New...

Important Information

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