Jump to content

ShaunR

Members
  • Posts

    4,882
  • Joined

  • Days Won

    296

Everything posted by ShaunR

  1. No. But you do need "Windows". Here is a .NET example of what I mean.
  2. Not giving me much to go on here. What gives you the message? Is it windows/linux? It can't be in the error cluster because there is no "Memory Full" error code. If it is in the error cluster, what number (code) is it? Are you trying to dump the whole 100MB contents into an array? (What is the SQL statement?) How much memory do you have and when you get the error, how much is LabVIEW using (you can see it in task manager)?
  3. The main difference between the NI algorithm and most others is that it removes outliers. It calculates a "best fit" using the mean squared difference method and applies a score. If iterations is set to 0, it is finished and returns the line (as in your first image). If iterations are greater than "0" it removes an outlier and then re-calculates the MSD and re-calculates the score to see if the there is an improvement. It keeps iterating until it either reaches a certain score or until it reaches the iteration number So in your second case, if you set the iterations to >0, the final point will be eliminated and it will decide that the first two are the "best fit". You need to have more data points to use this function effectively - the more, the better.
  4. Making Measuremnet On An Image from the Vision Concepts Manual described it in detail. The images are broken on my browser. But it describes the NI method.
  5. it never returned when I did that. this works though. Looks like you need the comparison. for (i=1; i < sizeOfDim(x,0);i++)
  6. It's been a long time since I used a FN., but I tried replicating your image (in 2009) and sizeofDim(x,1) evaluates to "0". My output array is identical to the input.
  7. Quite right. I stand chastised Pravin. Most fonts are fixed character widths. So if you can find the start and you know the width, you can "cut" each char out and analyse it in isolation.
  8. Microsoft have quite a nice definition of the pub/subs (including observer). the main differences seems to be how the clients obtain their updates and methods of registration. I'm more familiar with the content and topic (list) based since that's basically what "Dispatcher" and RSS are. But I've only used them in context with networking so events weren't applicable. I could see a use for observer invocation in something like LV web-services where you basically want to poll updates of remote devices. But it can be a bit prone to server over-loading if there are many observers.
  9. In LV2010 there is a checkbox on in the properties so you don't have to physically place the code in the diagram. That why I said there is no longer a code boundary (as if you had placed the code in the diagram) however it is still represented as a sub-vi.
  10. Well. I wouldn't be complaining about 7 us to calculate a formula node. Sure it can. It has nothing to do with priorities. As I understand it, when a VI is set to subroutine it means it gets executed sequentiality within the VI so there is no chance that a task/thread switch can occur at the call boundary. As for in-line - in theory the code boundary shouldn't exist, but you can select both subroutine and in-line, so I'm not quite sure exactly what happens. Like I said. I haven't really played with in-line but the VI has to be re-entrant whereas for subroutine it doesn't have to be. Well. 7 us for 20k elements isn't bad. That's 0.35ns per element Any faster and it would have calculated it before you ran the VI
  11. What about a "Ghost Busters" machine (temp, pressure, humidity, detect sudden changes etc)
  12. I think your pub/sub definition is really a broadcast definition (like UDP Multicast). I think the observer pattern is just a particular flavour of pub/sub as is "content-based" and "topic based". But I've only ever heard the term in context to events. In other areas I think it's called "List-based" pub/sub.
  13. Making the VI a "subroutine" is the fastest call method (i haven't played with the in-line feature very much but inline+subroutine should be the fastest). What sort of execution times are you seeing? Even a normal call is only 10's of usecs.
  14. I think there are a couple of network Publisher/Subscriber examples kicking around the CR. I'm not sure if they qualify for an "Observer" pattern since some people seem to use both terms interchangeably whilst others use it specifically for events. I think also the "Top-Level Baseline" might qualify too.
  15. Ahhh. IC. Don't bother with PassaMak then 'cos it's mainly UI focused. You have to find the parent that has the attribute you want to cover as many types as possible. Unfortunately, you still have to cast, but you can reduce the cases required.
  16. If you search for "Constant" on the class name you won't need a case for each type as they all have labels.
  17. Well. The easiest way (If using windows) is probably to load an active X or .net browser into a labview container and when a DocumentComplete event occurs; scrape the page for the info you want.
  18. I did say "similar" . The point I was making is that I prefer to simplify and modularise. The ideal result (for me) is a single VI with a multitude of uses but a simple (2 or 3 parameter) interface rather than a number of VI's, specifically tasked towards specific functions. A ploy is a half-way house to that goal. I've already commented on the singleton (anti?) pattern; many moons ago in an earlier post. They are just irrelevant for classic labview and required to get round a problem of your own making (not specifically you, POOPers in general) There is no auxiliary, or basic. there is just API. My definition of that is that it's a collection of functions to facilitate the execution of a task(s) based around a common theme. Perhaps yours is more strict. But I prefer not to restrict myself with semantics Indeed you can just implement as I do, but for classes that would seem, well, a hack, since you should really be creating an "Encryption" object and passing that as an argument to be used by your read/write VI's. Well. I think we've come to the end of this little exercise and I thank you for your participation in the absence of the OP. People can draw from it what they will, but I think it was a fair example given that it was very suited to both approaches without prejudice. so. Only one other thing to say: . Shopping.Create;Shopping. Alcohol := 10 /* litres */Shopping.Food:=20 /* kg */Merry.Create (Shopping);Merry. Happiness = Shopping.Food * Shopping. Alcoholxmas.Create (Merry);
×
×
  • Create New...

Important Information

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