Jump to content

infinitenothing

Members
  • Posts

    367
  • Joined

  • Last visited

  • Days Won

    15

Posts posted by infinitenothing

  1. Yes, I agree with the above. You need to unflatten to singles.

     

    I am getting something of this sort from the UDP Read function in labview when I wired an indicator to it: ƒª’?

     

    If you're still having trouble, can you switch that indicator to show you hex (right click, select hex display) and paste a few lines of that here? Even better if we know what the correct values would be (for example, you could send an array of "1.5")

  2. I don't think flushing events would solve this, e.g. how can you be sure that the last element isn't already in the event queue, meaning that flushing will remove the most important element you actually want to handle.

     

    Letting the timeout case handle the last event can be very neat, and I use this very often in small UIs. Another option is to use a size limited queue used with the lossy enqueue primitive. This can be handled in the timeout case, or in a separate consumer loop depending on the requirements.

     

    /J

    You can tell the flush event queue to flush all but the last one. It also outputs the number of events that were flushed so you can use that to detect you're at the end

    ykKlxS1.png

  3. I've made some things like this. Usually I've used a tab control with the common controls floating over and the custom controls on their designated pages. The tab change event would sometimes hide or re-caption certain common controls. If you want another function, I'd make another tab page fill out the captions and visible flags.

     

    You need to send that over TCPIP? no prob, just send the function and a flattened cluster of the page contents or even send each individual control on value change. Not infinitely expandable or perfectly decoupled but it got the job done.

  4. It's really a risk calculation. You have to anticipate what are the odds that down the road you'll want some feature (programmatic access? in place editing?) that globals can't easily provide. If you think you have a 10% chance you'll need that and it would take your 40 hours to pull out all your global and put in a better data type, you'd need to save 4 hours of development time to justify using a global. Maybe you should put in a fudge factor for unknown unknowns. So you'll want to save 40 hours of dev time to justify their use.

  5. You're going to have to give us some more examples of the echo so we know what to look for. If it always looks the same you can use the cross correlation of a "good looking" echo segment vs the waveform you want to search. The x location of the peak of the cross correlation will tell you where they line up (the start of your echo).

    http://paulbourke.net/miscellaneous/correlate/

  6. Inspired by these two threads:

    http://lavag.org/topic/18657-notifiers-not-working-when-use-consecutive-create-notifier-vis-without-delay/

    http://lavag.org/topic/4028-notifier-signals-missed/

     

    I was wondering if I could create my own notifier that could switch between references without the history management. Here's what I came up with. I'm not expecting this to be very fast. I thought it was an interesting use case for occurrences.

     

    Test Case:

    cxAGkPS.png

    Obtain Notifier

    5EQjiKp.png

    Wait on notification

    SkiiaC6.png

    I probably need a mechanism to check and retry if the "Latest Message Is Valid" flag is false after the "Wait on occurrence".

     

    Send Notification

    t8zpBrP.png

  7. In my opinion the advanced behavior is the more intuitive way. It's not intuitive (as you saw with the original post) that the order of the senders should matter. We normally don't think about the receivers having an internal memory (we expect the primitives to be stateless except for the ones that enable statefullness). The other primitive (no history) maybe should be on the advanced pallet because it's for the power users that go faster.

  8. I looked through that thread and I wonder if there's a better implementation of the notifier behavior like using subscribers or something

    drjdpowell: Here's how this affects messages. I defeated the reentrancy by wrapping your "wait for notification" in a nonreentrant subVI. If "data 1" executes first, all messages are delivered nicely. If data 2 fires first (as shown in the image below), you get a timeout (or a  deadlock if the timeout is -1)

    OUfzM2H.png

    5uIYL4q.png

     

    You can make it so both messages are delivered by using the "Wait on notification with history" primitive in your "wait on notification" VI instead of the normal "wait on notification" primitive.

    • Like 1
×
×
  • Create New...

Important Information

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