Jump to content

MViControl

Members
  • Posts

    62
  • Joined

  • Last visited

Posts posted by MViControl

  1. the following question from Jetqin still haven't been answered:

    how does this line fitting algorithm find the initial subset of points to start?

     

     

    below is my personal understand for the question:

    Pixel Radius specifies the neighborhood pixel relationship for the initial subset of points being used.

    The pixel radius defines the maximum distance allowed, in pixels, between a valid point and the estimated line. The algorithm estimates a line where at least half the points in the set are within the pixel radius. If a set of points does not have such a line, the function attempts to return the line that has the most number of valid points.

     

    Can anybody explain the detail process of how it works?

  2. With Any reference you have to be careful to use a shift register to use the reference in a loop. because if the loop does not execute a tunnel-out will have a null (default data), but a shift register will carry the correct data out of the loop. To make my point see attached snippet

    post-12-076189600 1285942270_thumb.png

    Thanks Sam,

    I think you mentioned a very important point.

    But in the framework, we always took the queue refnum which been created before loop start, in this case, we can make sure very time, the enqueue function will use a valid refnum, if I am wrong, please correct me, thank you.

  3. Bug: The EnQueue VI should use SR for the Queue reference because if you have an empty array as your input the Output Queue reference will be null.

    I am not so clear about what you mentioned, the reference will always point to the queue buffer, whatever you enqued the element to(if enqueue an empty element array, it should not impact to the application running).

    I am realy appreciate If you could make your worry clear, so that we can make this framwork more stable.

    If you want. You can easily add error prioritising to your error handler (then you can handle critical errors, warnings etc,etc).

    Thanks buddy, can you please upload the vi instead of picture:worshippy:

  4. Hi all,

    I just created a new version of Framework "GKY-Paralellism-3Loops V1.0"and want to share with friends here(see attachment)

    I am not so satisfied with 2 thing in this version:

    1) the exit of 3 Loops.

    when a error happened in one loop, only after user triger a event, the application can exit. I plan to use event to avoid this in next version, but I also want get suggestions about EXIT LOOPS from here.

    2) Error handling Loop was not added in this version, cause until now I haven't got good idea about how to handling errors in the Error loop, maybe someone can add this loop so that we can complete the framework together.

    enjoy and waiting for suggestions!

    GKY-Paralellism-3Loops-V1.0.zip

    • Like 1
  5. Controls can be added to any VI at edit time, no matter if it's a newly created VI or not.

    What is the purpose of this XControl you want to create? There might be way to achieve your goal other then creating a LabVIEW Development Environment by yourself... ;)

    To be honest, I am studying the Xcontrol technique of LabVIEW, and I found if we can create controls by code, then we could dynamically change the GUI, it just a try.

    P.S I do not want to creating LabVIEW DE by myself, I just want to try the capbility when I saw the VI scripting functions. ;)

  6. You can't dynamically make a control within a VI. What are you trying to accomplish?

    I want to build a XControl which could allow user add buttons by input button tag dymanically, I had ever thought this can be implimented by VI scripting, but finaly found the control can only been created in a new opened VI.

  7. As far as I know, you can't set the picture ring to scale the images. That said, I haven't used one in a long time.

    One thing you can do is implement the "ring" yourself by displaying an array of picture controls (or several pictures in a single control) and detecting which one was clicked using mouse down events. There are different ways of scaling images, and you can see one here.

    Thanks Yair,

    I had ever thought I can use Pict Ring directly, now I try to made a xcontrol to impliment the function.

  8. Hi Techie

    Just so you know, these controls are available in the package: ni_lib_ni.com_inspired_controls.vip

    (This package is available from the LabVIEW Tools Network, and will automatically shows up in VIPM)

    I recommend handing out at the UI Interest Group for more (where I just found a sweet VI by Ton thumbup1.gif)

    Thanks buddy,

    Actualy, I did get some useful controls which can build professional UI very fast, my point here is that people here can share the controls what they have here.

  9. I can't give you an exact number, but the answer is "more than you should ever need."

    To be honest, I think you're basing your decision on the wrong criteria. Events and queues can both be used to transmit data to parallel loops, but they have different purposes. Events are used in a "one-to-many" situation. You have one event source and many event consumers. Queues are used in a "many-to-one" situation. You might have many sources enqueueing messages, but only one consumer dequeuing messages. If you have a "one-to-one" relationship you can use either, but queues are easier to work with.

    I try not to think of it as an "event queue" because the event structure doesn't necessarily process events in the exact order they were received. (Ton knows more about that than I do.) Plus you have no way to manipulate the "event queue." Think of it as an "event handler" instead. When using events it is better to set up an event structure in a loop to receive events and then send messages and the event data (via a queue) to a parallel loop to do the actually processing. That way your event handler stays free to process events as they come in and you don't have to worry about events stacking up.

    When is it a good idea to use events? The first is obviously when you have to process the user's fp input. The Producer/Consumer Design Pattern (Events) template is a good starting point for that. I also use events when I'm writing asynchronous code modules as a way to notify clients of things they might be interested in. Personally I haven't found events particularly useful in other situations, mainly because of the edit time overhead associated with them.

    Uhh... neither. I know lots of people tout the virtues of the Queued State Machine; personally I think it's a poor pattern because it doesn't promote good design decisions. Using a queue to store sequences of states to be executed can easily lead to code that contains hidden errors and is hard to maintain. You can use a queue to transmit messages and data from the UI loop to the Processing loop, but don't use that queue to control state as well.

    Thanks for reply!

    What kind of design pattern do you often use for the parallel process?

    I guess untill the memory of your computeris full.

    That will happen faster with an event structure than with a queue, the overhead of the event structure includes the actual timestamp when the event happens.

    Ton

    then from this point of view, is the queue better than events?

  10. Hello,

    I have to use chart in my project since I need draw a real time curve, but I also want to show the grid of the chart (just like graph), but I found there is no option to config this. Can anybody share the information if you done this successfuly before.

    thx

×
×
  • Create New...

Important Information

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