Jump to content

Norm Kirchner

NI
  • Posts

    823
  • Joined

  • Last visited

  • Days Won

    25

Posts posted by Norm Kirchner

  1. FWIW, I utilize the technique of running a VI that exists within an lv_EXE's memory space in many applications.

    SMenjoulet was actually one of the first people that I had seen do this elegantly. His creation was LabVIEWx or LVx.

    The basic idea is that within the executable, you have 1 subVI that, at the beginning of the exe's execution, spits out an event reference and stores it internally within a shift register.

    <a href="http://content.screencast.com/users/NJKirchner/folders/Jing/media/c77073a3-5a2a-48d8-bc0f-47f75f104659/2009-12-21_1231.png"><img'>http://content.screencast.com/users/NJKirchner/folders/Jing/media/c77073a3-5a2a-48d8-bc0f-47f75f104659/2009-12-21_1231.png"><img class="embeddedObject" src="http://content.screencast.com/users/NJKirchner/folders/Jing/media/c77073a3-5a2a-48d8-bc0f-47f75f104659/2009-12-21_1231.png" width="536" height="356" border="0" /></a>

    Register the EXE for that event

    <a href="http://content.screencast.com/users/NJKirchner/folders/Jing/media/79ce3e24-5d72-400a-91fa-bc69abd9aa44/2009-12-21_1231.png"><img'>http://content.screencast.com/users/NJKirchner/folders/Jing/media/79ce3e24-5d72-400a-91fa-bc69abd9aa44/2009-12-21_1231.png"><img class="embeddedObject" src="http://content.screencast.com/users/NJKirchner/folders/Jing/media/79ce3e24-5d72-400a-91fa-bc69abd9aa44/2009-12-21_1231.png" width="338" height="289" border="0" /></a>

    REMOTELY (from another VI or lv_EXE) Open a reference to aforementioned EXE through VI server and call that aforementioned subVI via 'CallByRefNode' and pass in the command.

    <a href="http://content.screencast.com/users/NJKirchner/folders/Jing/media/af6aaa05-302d-41cd-a94a-952c8ae82f0b/2009-12-21_1246.png"><img'>http://content.screencast.com/users/NJKirchner/folders/Jing/media/af6aaa05-302d-41cd-a94a-952c8ae82f0b/2009-12-21_1246.png"><img class="embeddedObject" src="http://content.screencast.com/users/NJKirchner/folders/Jing/media/af6aaa05-302d-41cd-a94a-952c8ae82f0b/2009-12-21_1246.png" width="1024" height="598" border="0" /></a>

    And at the end of the day, when you run the Remote Export, you will have fired the event within the LV_EXE along with the data you passed to it.

    Is this close to what you were looking for?

    Also if you're using LV 8.2, there is an issue with an ini key "TCP.ACL = ...." that will need to be copied from the LV ini into your EXE's ini. This may resolve your error 7

    • Like 1
  2. That sounds very cool

    So far I could only find this link which says it cannot be done. Maybe they are hiding it! :ph34r:

    Copied my post from the dark side

    As Holmes said to Watson...."Dig Deeper"

    C:\Program Files\National Instruments\LabVIEW 2009\resource\plugins\lv_newclassctl.vi

    You will need to dig into it to properly understand it, but at the basic level this VI takes a grey cube picture as a constant and replaces the color on the grey cube w/ translated shaded colors and replaces those pixels on the input icon.

    Some effort is warranted putting this into an example, I just don't have the time at the moment. I look forward to seeing what you do with it.

    ~,~

    The Captain was here

    • Like 1
  3. Thats the only place I have seen it.

    I don't know if it's easy or not to do.

    Maybe its as simple as that data being located in the .lvclass file?

    A while ago I was told that there is a VI that accomplishes this that we can use in vi.lib.

    I can't find the information that directed me towards it, but hold out and someone should be able to direct us to it.

  4. A related thought that might be good for this thread.

    A mass icon editor user interface.

    One that would easily let you, for any library (LVOOP or otherwise), see ALL the icons displayed and easily allow you to edit them simply by double clicking

    I've done a mock-up for this but still incomplete, but really should be quite simple if someone runs with it.

    The basic idea is that you have an interface that you point at a library.

    It displays all icons at once so you can make sure that you have a library iconography that all matches and if you need to edit some, 1, all icons.... you now have an interface that might allow that to happen.

    There are too many times that I set up a library and only after the fact of some minor change, something goes haywire in propagating nested library icons and some/all get messed up.

    So if there was a way to see all icons at once and easily change 1/some/all managing library based icons would be Sooooo much easier.

    y'all agree??!

  5. I've been having the opposite problem - trying to work out the best way to store volatile state information for an XControl. If one writes this into display state then you end up with LabVIEW thinking it needs to re-save the parent vi which is a pain. (By volatile state I mean things about the appearance or behaviour of the XControl that need to be kept track off during runtime, but can happily be rest to default values when the program stops - values of sub-controls that form part of the XControl for example).

    I think the answer is to use one of the traditional storage mechanisms like a LV2-stlye global(FGV/USR) but then I got to wondering what happens if I have multiple instances of the same XControl - I know XControl's facades run in separate applications instances, but do multiple XControls share the same application instance or do they get one each ?

    What do others do about volatile state data ?

    There is nothing about the XControl that says you can't have another shift register on the while loop.

    Or another technique is to utilize the 'Close' ability of an XControl to clear state data that you don't want retained.

  6. One thing that really really really .....wait.... wait for it..... really really really... bothers me about the marrying of XControls to classes is that the minute you have an XControl on a FP that uses a class, the class is locked.

    I agree that this is a worthwhile idea, and I've already kudo'd it, but the difficulty developing under this paradigm when doing this needs to be addressed. (or am I wrong)

  7. I'm a bit curious. Why did you use the timeout event with a timeout of 10 ms timeout instead of the mouse move event?

    I'm merely curious. I want to learn from the masters.

    Good question my friend.

    And it is for this reason, it doesn't work as well because if the person moves the mouse faster than LV can move the panel then everything gets out of whack and you lose the drag.

    I started by doing it that way.

    I actually don't like having to revert to polling but it was the only way to get consistent, repeatable and responsive interaction.

    On a very fast PC w/ nothing going on I would imagine that you 'might' not notice it. But if you were to change the algorithm and move the mouse quickly, you'll find that you lose the drag w/ out much effort.

  8. Sorry, but can you explain a little bit how you made the note.vi movable? It seems like something about register user event, but I cannot figure out how to implement it. Thanks again.

    This should help

    DraggableFP.zip

    <object width="786" height="600"> <param name="movie" value="http://content.screencast.com/users/NJKirchner/folders/Jing/media/e383f68c-f6e5-4966-a51b-45a46b0d8724/jingh264player.swf"></param>'>http://content.screencast.com/users/NJKirchner/folders/Jing/media/e383f68c-f6e5-4966-a51b-45a46b0d8724/jingh264player.swf"></param> <param name="quality" value="high"></param> <param name="bgcolor" value="#FFFFFF"></param> <param name="flashVars" value="thumb=http://content.screencast.com/users/NJKirchner/folders/Jing/media/e383f68c-f6e5-4966-a51b-45a46b0d8724/FirstFrame.jpg&containerwidth=786&containerheight=600&content=http://content.screencast.com/users/NJKirchner/folders/Jing/media/e383f68c-f6e5-4966-a51b-45a46b0d8724/2009-12-08_1805.mp4"></param> <param name="allowFullScreen" value="true"></param> <param name="scale" value="showall"></param> <param name="allowScriptAccess" value="always"></param> <param name="base" value="http://content.screencast.com/users/NJKirchner/folders/Jing/media/e383f68c-f6e5-4966-a51b-45a46b0d8724/"></param>'>http://content.screencast.com/users/NJKirchner/folders/Jing/media/e383f68c-f6e5-4966-a51b-45a46b0d8724/"></param> <embed src="http://content.screencast.com/users/NJKirchner/folders/Jing/media/e383f68c-f6e5-4966-a51b-45a46b0d8724/jingh264player.swf" quality="high" bgcolor="#FFFFFF" width="786" height="600" type="application/x-shockwave-flash" allowScriptAccess="always" flashVars="thumb=http://content.screencast.com/users/NJKirchner/folders/Jing/media/e383f68c-f6e5-4966-a51b-45a46b0d8724/FirstFrame.jpg&containerwidth=786&containerheight=600&content=http://content.screencast.com/users/NJKirchner/folders/Jing/media/e383f68c-f6e5-4966-a51b-45a46b0d8724/2009-12-08_1805.mp4" allowFullScreen="true" base="http://content.screencast.com/users/NJKirchner/folders/Jing/media/e383f68c-f6e5-4966-a51b-45a46b0d8724/" scale="showall"></embed> </object>

    • Like 1
  9. An issue has been identified on some peoples systems that have had previous versions of LVS installed.

    This issue is identified by everything looking like everything should work, you see your commands reflected in the LVS widget but nothing happens.

    The updated package is 2.0.5-1 attached to this post

    lavag_cr_LVSpeak-2.0.5-1.ogp

    The issue is due to errors in the plug-ins

    To ensure this is not a problem

    Use the VI Package Manager to simply uninstall both packages,

    Check the directory C:\Program Files\National Instruments\LabVIEW 2009\resource\QuickEdit\Plugins

    Clear the contents of that directory

    re-install both packages

    After which only qualified and tested plugins should be present and your system should be operational

  10. An easy way to accomplish this is through VI server and the usage of Re-entrant Front Panels or the use of *.vit 's

    First step is to make a VI that will be cloned over and over for each new note.

    Flag the open with option 0x08 and it will open a new VI with each call.

    <object width="1020" height="628"> <param name="movie" value="http://content.screencast.com/users/NJKirchner/folders/Jing/media/5fc68419-458d-495e-a4fe-582888c1dcf6/jingh264player.swf"></param>'>http://content.screencast.com/users/NJKirchner/folders/Jing/media/5fc68419-458d-495e-a4fe-582888c1dcf6/jingh264player.swf"></param> <param name="quality" value="high"></param> <param name="bgcolor" value="#FFFFFF"></param> <param name="flashVars" value="thumb=http://content.screencast.com/users/NJKirchner/folders/Jing/media/5fc68419-458d-495e-a4fe-582888c1dcf6/FirstFrame.jpg&containerwidth=1020&containerheight=628&content=http://content.screencast.com/users/NJKirchner/folders/Jing/media/5fc68419-458d-495e-a4fe-582888c1dcf6/2009-12-07_1054.mp4"></param> <param name="allowFullScreen" value="true"></param> <param name="scale" value="showall"></param> <param name="allowScriptAccess" value="always"></param> <param name="base" value="http://content.screencast.com/users/NJKirchner/folders/Jing/media/5fc68419-458d-495e-a4fe-582888c1dcf6/"></param>'>http://content.screencast.com/users/NJKirchner/folders/Jing/media/5fc68419-458d-495e-a4fe-582888c1dcf6/"></param> <embed src="http://content.screencast.com/users/NJKirchner/folders/Jing/media/5fc68419-458d-495e-a4fe-582888c1dcf6/jingh264player.swf" quality="high" bgcolor="#FFFFFF" width="1020" height="628" type="application/x-shockwave-flash" allowScriptAccess="always" flashVars="thumb=http://content.screencast.com/users/NJKirchner/folders/Jing/media/5fc68419-458d-495e-a4fe-582888c1dcf6/FirstFrame.jpg&containerwidth=1020&containerheight=628&content=http://content.screencast.com/users/NJKirchner/folders/Jing/media/5fc68419-458d-495e-a4fe-582888c1dcf6/2009-12-07_1054.mp4" allowFullScreen="true" base="http://content.screencast.com/users/NJKirchner/folders/Jing/media/5fc68419-458d-495e-a4fe-582888c1dcf6/" scale="showall"></embed> </object>

    • Like 1
  11. Sydney,

    Your in luck wrt the event timeout error case.

    You accidentally wired the error wire under the structure

    <object width="944" height="488"> <param name="movie" value="http://content.screencast.com/users/NJKirchner/folders/Jing/media/1bcbcd14-4133-4cbe-b55c-b926cdc518f8/jingh264player.swf"></param>'>http://content.screencast.com/users/NJKirchner/folders/Jing/media/1bcbcd14-4133-4cbe-b55c-b926cdc518f8/jingh264player.swf"></param> <param name="quality" value="high"></param> <param name="bgcolor" value="#FFFFFF"></param> <param name="flashVars" value="thumb=http://content.screencast.com/users/NJKirchner/folders/Jing/media/1bcbcd14-4133-4cbe-b55c-b926cdc518f8/FirstFrame.jpg&containerwidth=944&containerheight=488&content=http://content.screencast.com/users/NJKirchner/folders/Jing/media/1bcbcd14-4133-4cbe-b55c-b926cdc518f8/2009-12-07_0953.mp4"></param> <param name="allowFullScreen" value="true"></param> <param name="scale" value="showall"></param> <param name="allowScriptAccess" value="always"></param> <param name="base" value="http://content.screencast.com/users/NJKirchner/folders/Jing/media/1bcbcd14-4133-4cbe-b55c-b926cdc518f8/"></param>'>http://content.screencast.com/users/NJKirchner/folders/Jing/media/1bcbcd14-4133-4cbe-b55c-b926cdc518f8/"></param> <embed src="http://content.screencast.com/users/NJKirchner/folders/Jing/media/1bcbcd14-4133-4cbe-b55c-b926cdc518f8/jingh264player.swf" quality="high" bgcolor="#FFFFFF" width="944" height="488" type="application/x-shockwave-flash" allowScriptAccess="always" flashVars="thumb=http://content.screencast.com/users/NJKirchner/folders/Jing/media/1bcbcd14-4133-4cbe-b55c-b926cdc518f8/FirstFrame.jpg&containerwidth=944&containerheight=488&content=http://content.screencast.com/users/NJKirchner/folders/Jing/media/1bcbcd14-4133-4cbe-b55c-b926cdc518f8/2009-12-07_0953.mp4" allowFullScreen="true" base="http://content.screencast.com/users/NJKirchner/folders/Jing/media/1bcbcd14-4133-4cbe-b55c-b926cdc518f8/" scale="showall"></embed> </object>

    Also with regards to your second question, right click each of the list-boxes and look at each 'Selection Mode'

    That setting declares what kind of data type the MCL is. If it declared to be 0 or 1, then it will be a scalar. If it is one of the 'x or more' then it will be an array.

    So really for the code that your doing in the MCL sub-vi (from what I can tell) you don't need to strict any of those references and realize that those kind of coercion dots are ok

    good luck

  12. It sounded like you are new to the entire process of using LabVIEW.

    If this is true, I would highly recommend looking into the NI courses that are offered.

    Above and beyond the courses offered by NI, LabVIEW for everyone is a great book that covers a TON of topics from beginner to advanced (although I' not sure how much OO it covers)

    But once you get past just the basics the I would recommend reading some beginner OO books that might not even be LV oriented. AristosQueue has a slew of recommendations on those.

  13. Has anyone created an envelope detector? I have a 300 KHz signal that will be on for varying amounts of time (20 to 40 msec) with a gap between the pulses of about 10 msec. I'd need to figure out the actual on time of the signal. I suppose I could use a peak detector to find all the peaks in the burst and then determine when the peaks drop out, but that just seems kind of clumsy. Any better ideas?

    George

    What kind of Eb/No and signal are you working with? Digital/Analog, constant envelope, Peak/Average ratio.

    I would imagine you would do a power vs time analysis and just look for the power edge.

  14. LabVIEW Speak(LVSpeak) 2.0 has been officially released!

    There is an article in the NI Instrumentation Newsletter about it and a follow up post on the NI Communities with getting started videos and the current packages.

    http://decibel.ni.com/content/groups/labview-apis/blog/2009/11/19/labview-speak--programming-lv-through-voice-commands

    But I've decided to support the independent LV community and keep the discussion on LAVA.

    So hopefully we can get some dark-siders to come over to the light. >8^}>

    I welcome any feedback and keep an eye out for another LAVA topic to be posted regarding building QuickEdit Plugins and another for building LVSpeak Clients

    ~,~

    The Captain Was Here

  15. I know that this can happen if you have both dynamic events and static events fire at the same time because they go into two queues and the order is only determined by the millisecond timer. See here.

    As far as I know, this should NOT apply to val(sgnl) events you string together. I believe they should execute in order.

    I say this from a standpoint of that I have never heard of anything that ensures that they will be ordered properly.

    There is most likely a high likelihood that they will, but this only highlights that people write programs that assume this.

    If AQ or someone in R&D pipes up and says that it is ensured, then I'll fully retract that. But I will never recommend that anyone write a program that depends on having multiple Val(signl) strung together to execute the events in that order for all those reasons above.

    San,

    As a point of information, what is your skill/experience level in LV?

    • Like 1
  16. It is just another way to programmatically fire an event. It is the same as doing it registering an User Event (as jcarmody has posted) albeit most likely a little easier to start with, but not as flexible.

    Bad bad bad jgcode. Bad!

    San... Please disregard the any mention of the (signaling) property. This is something that is VASTLY abused and should be avoided at all costs. let me repeat, DON"T USE THE SIGNALING PROPERTY unless no other way of doing it.

    Newbies use this methodology in excess and end up really regretting it down the line.

    This tactic is not easily traceable, debuggable or extendable (going N+1)

    Just look at some of the stock examples that come with LabVIEW for user events and dynamic events. Your effort will pay off 20 times easily in better code.

    Long story short,

    if you want reactive code to a user input, utilize an event structure to respond to that action.

    If you want reactive code to a group or types of controls/indicators look into dynamic event registration

    If you want code to react to programatically to different parts of programs (without user input) then look into user events.

    and once again BAD JGCODE!

    • Like 1
×
×
  • Create New...

Important Information

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