Jump to content

jgcode

LabVIEW Tools Network
  • Posts

    2,397
  • Joined

  • Last visited

  • Days Won

    66

Posts posted by jgcode

  1. I understand. The optimal solution if you need the functionality that you descibe is probably to split the splash into an optional GUI (the visible splash screen) - and a loader.

    Thats exactly what I do :)

    I normally configure an engine that does all the real work (checking and loading) and the Splash GUI just sits on top of it.

    I also have an engine that I can reuse for simple apps, and a template for the splash screen, so I can slot it in pretty quick.

  2. A small tip about splash screens:

    Out of interest...

    I haven't programmed for that bandwidth constraint so conversely I like to launch the Splash Screen (as the Top Level VI) which will then go on to dynamically load the Main Application then go out of memory. This way I can do any prechecking e.g. is required supporting software installed (e.g. Dot NET, DAQmx) - which if missing may cause the Main Application to be broken. So my aim is to prevent launching a broken Main App. Also I can run any bootstrap logic that may cause the Main App's GUI not to be shown (e.g. misisng/corrupt support files etc...) and for the Main App to be shutdown immediately. Lastly I can initialise the Main App's GUI before showing it (as you mentioned). I too configure the Splash Screen in the same way you described for the Main App.

  3. This one's for you guys (via Michael)

    <object width="480" height="385"><param name="movie" value="http://www.youtube.com/watch?v=7UAeSsvHhTg?fs=1&hl=en_US"><param'>http://www.youtube.com/watch?v=7UAeSsvHhTg?fs=1&hl=en_US"><param name="allowFullScreen" value="true"><param name="allowscriptaccess" value="always"><embed src="http://www.youtube.com/watch?v=7UAeSsvHhTg?fs=1&hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></object>

    • Like 1
  4. Cheers everyone.

    Lest we forget the obvious, you _have_ already rung up the company's technical department and asked them, right?

    Well, no - I prefer to query the minds of the geniuses here on LAVA first, or at least in parallel :)

    19.6608 MHz was the closet common timing chip/crystal I could find based on your values and the assumption of a 32-bit counter.

    Wow - you're good.

    I have now got more info and that is correct!

  5. Howdy

    I am interrogating a serial device and want to record its time-source to determine a period of time.

    During this, the Timer may rollover.

    The manual states that the Timer will rollover ~218 seconds (helpful I know :) ).

    So the problem is, without knowing exactly when the rollover occurs, I don't know how to accurately calculate the dt at that rollover.

    As, even though the Sample Rate is set in the EEPROM, the dt (calculated from the Timer) returned can vary slightly between samples e.g. normally 0.01s dt, but can be 0.02s up to 0.05s.

    Here is some actual data from when the rollover occurs:

    post-10325-0-00318600-1290086353_thumb.p

    I am finding it hard not to introduce errors into the timestamp by guessing/asumming the dt at the rollover!

    Has anyone dealt with this before / got an ideas?

    Cheers

    -JG

  6. Howdy, a quick question for any math buffs out there, I am sure there is a simple answer!

    post-10325-0-77530300-1289036709_thumb.p

    I want to generate the Sine Wave as above using the following function:

    post-10325-0-09486100-1289036781_thumb.p

    My question comes from the phase input on the function - what is a formula for converting a starting angle (e.g. 60 deg) into a phase (as it is obviously non-linear)?

    Also another input is Direction? I want to force which direction the curve will go from the Starting Angle (e.g. Up or Down), this will also change the phase.

    Obviously I have a workaround here (as per the above graph) which is to use the function with phase set to 0 then iterate through the points and take a subset, but I am certain there is a more elegant solution... but its Saturday Night here and my brain is fried laugh.gif

    Cheers

    -JG

  7. Hi All,

    I have a bit of code (LV 8.6) which populates a menu ring based on the contents of a directory. I want the user to be able to select from the menu and in doing so trigger an event (within an event structure). So, I set up a "value change" event on the menu ring and basically it works. However, sometimes there may only be one item in the menu ring, in this case, clicking it doesn't change the value and hence doesn't trigger the event. I tried adding a "mouse up" event to the structure, but that is only fired if the user clicks on the increment/decrement button part of the menu ring, not if they click on the text itself.

    The only way around this that I've found is to add a "<Select>" item to the menu ring and make sure this is the default value. Then the user has to select something and thus change the value. Is there a better way to do this?

    Thanks

    Hi Ic3Knight,

    A workaround I also like is to place a refresh button next to the control (menu ring or other) and use its value change event.

    As I also find this is handy when you need to reselect that value at some point.

    post-10325-034054600 1288877504_thumb.pn

    Cheers

    -JG

  8. If you want to check out the current list of "in development" ideas, click here:

    http://forums.ni.com...tab/most-kudoed

    This will pull up a list of ideas filtered to those with status set to "In Development". The list is short this year -- please remember what NI folks have said since the NI Week keynote: LV 2011 is going to be a stability and performance focused release. Even though only a few new features are going in, the ones that made the cut are going to put a smile on a few faces. I know that I'm already enjoying that on my development box I can -- wait for it -- save and then undo! Applause for the pair of really bright developers who figured out that little trick. Anyway, take a look -- there's something in there for everyone.

    Thanks for posting.

    I see your lobbying (Edit .> Create) paid off - so you too must have a smile :)

  9. I am having this problem too but I haven't been able to sort it - can anyone help please?

    I have a class which is only included in one project. When I click on the 'why is it locked' option I'm told:

    A vi in the library is reserved in this application instance or another application instance.

    Hi Martin

    Are you using it across multiple targets?

    Is its being called by an X-Control in memory?

    Maybe some screenshots would help.

    Cheers

    -JG

  10. Seems something is being Queued up there..

    Hey Guys!

    Thanks heaps for the testing and feedback, much appreciated.

    Here are some more of my observations from further testing that tie in with yours - so I think this is starting to make sense!

    • Using a smaller array (1 element instead of 100) as the element of the buffer, the issue went away
    • I also made some changes that sped up the X-Control (e.g. update graph by explicit reference in subVI to implicit reference on facade) which also helped with the above
    • If I smash the X-Control (fast, as per the demo) and hit the stop button, the VI stops but the X-Control continues updating for what can be a while.

    So yes, I am inclined to believe the data is being queued somewhere -> because it can't keep up, and hence this is the cause of the allocations
    The concerning thing is: my application (whilst doing other things in parallel) was only updating the X-Control every 1000ms and was still causing a 1-2+MB/s leak!
    This X-Control could, instead of queuing if it ran late, just ignore data and catch up (given I am not buffering anything inside it) - but that is out of my control.
    For the design I initially wanted to define the interface as a '2D Array of DBL's' (the buffer). So to allow if I want to user the buffer for something else.
    Maybe I will have to look at something else. Ideas:
    • I could buffer the data inside the X-Control so the behavior is like a Chart not a Graph - so the interface just becomes a '1D Array of DBL's'?
    • Or I could reference an external buffer (i.e. using a DVR)? - but didn't want to do that.

    Thoughts?

    Cheers

    -JG

    <edit>Tried toggling Synchronous Display but it did not help the allocations, thanks for suggestion tho</edit>

    • Like 1
  11. [LV2009]

    [Cross-posted to ni.com]

    I have found that if I pass a large data array (~4MB in this example) into an X-Control, it causes massive memory allocations (1 GB+).

    Is this a known issue?

    The X-Control in the video was created, then the Data.ctl was changed to 2D Array - it has not been edited in any other way.

    I also compare the allocations to that of a native 2D Array (which is only ~4MB).

    Note: I jiggled the Windows Task Manager about so that JING would update correctly, its a bit slow, but it essentially just keeps rolling up and doesn't stop.

    Demo code attached.

    Related to this thread by separated as posted to NI for support.

    Cheers

    -JG

    <object id="scPlayer" class="embeddedObject" width="921" height="858" type="application/x-shockwave-flash" data="http://content.screencast.com/users/jgcode/folders/LabVIEW/media/1bfce9bd-6cea-4622-ad26-8da61f63adc7/jingswfplayer.swf"> <param name="movie" value="http://content.screencast.com/users/jgcode/folders/LabVIEW/media/1bfce9bd-6cea-4622-ad26-8da61f63adc7/jingswfplayer.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/1bfce9bd-6cea-4622-ad26-8da61f63adc7/FirstFrame.jpg&containerwidth=921&containerheight=858&content=http://content.screencast.com/users/jgcode/folders/LabVIEW/media/1bfce9bd-6cea-4622-ad26-8da61f63adc7/X-Control%20Memory%20Leak%20Demo.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/1bfce9bd-6cea-4622-ad26-8da61f63adc7/"> Unable to display content. Adobe Flash is required. </object>

    X Control Bug LV2009.zip

  12. Spooky :P

    I was playing with Xconrols this weekend too (not fr buffer stuff though).

    I shelved it in the end since I was really annoyed that a XControl doesn't inherit all the properties and methods of the base data type meaning you have to re-implement all the built in stuff. angry.gif

    I have been playing with them more and more lately and getting a good feel for the style thats required to use them.

    I have a few gripes too that make me stay away from them, e.g. I can't include it's reference as a member of a Class (works in src not in build) etc...

    But some really powerful stuff there - they just need a little make-over IMHO.

  13. Yes, it'll at least stop the level of confusion that lead to this thread.

    I am easily confused. wacko.gif

    The problem was I was hunting for a weird run-time issue, one that only ended up getting resolved after a full install of LabVIEW.

    If I had known about the ? it would have been ok.

    But as I didn't I thought there may have been something sinister there.

    I am not fussed what happens, but if it has potential to trip someone else up then blanking it would only be a good thing.

×
×
  • Create New...

Important Information

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