Jump to content

ahlers01

Members
  • Posts

    63
  • Joined

  • Last visited

Everything posted by ahlers01

  1. put a 'TCP Network Connection Refnum' indicator on the subVI's front panel and wire it on the block diagram. Then wire it in the connector pane of the subVI as explained yesterday and you'll have access to the connID in the calling VI
  2. - convert your (X,Y) points into two arrays [X] and [Y] - use LV's 'derivative.vi' to calculate arrays [dX] and [dY] - divide the two to get [dY/dX] (this assumes that the points (X,Y) are sorted with respect to X)
  3. On page 2 of the same .pdf document it says: "CHEATING & PLAGIARISM: 1. Cheating is the act of behaving dishonestly for personal gain. Cheating in ME 435L will result in immediate failure of the course and the violators will be reported to the university administration. 2. Plagiarism is the act of taking the intellectual property of another and claiming it as your own. 3. Evidence of such misappropriation of other people
  4. If you save a VI as a template (with the extension .vit) you can create at runtime copies of it using VI Server methods. Basically you use 'Open VI Reference' to instantiate a new VI as a copy of the template. Then you use 'Set Control Value' or 'Set Control Value[Variant]' methods to pass parameters to the newly instantiated VI. Then use 'Run VI' method to run the new VI and finally 'Get Control value' (or 'Get Control Value[Variant]') to retrieve the results. At the end use 'Close VI Reference' to remove the new VI from memory. There is even a method to programmatically create a new VI completely from scratch and do similar as above. This works with unsupported LV functions, however. In the 'scripting' sub-forum of LAVA you'll find more about it. Or look at an implementation example under http://forums.lavausergroup.org/index.php?...findpost&p=1850 Finally, as a help for your real task of creating a menu hierarchy, look at the thread http://forums.lavausergroup.org/index.php?...&hl=right+click in the 'User Interface' sub-forum. The implementation of context-sensitive right mouse click pop-up menus is discussed there and you'll find lots of ideas. -Franz
  5. There was a Labview coding challenge some time ago and the guys there really showed how fast one can do math with big integers in LV. I also took part in the competition and thought that my calculation of 10000! within 95 msec was fast. Three others were still faster, though, and the winning solution by Bruce Ammons calculated 10000! in 57 msec ! You can download his solution from http://www.ni.com/devzone/lvzone/codechallenge6_results.htm -Franz
  6. Probably you solved your task already, but anyway: Download File:post-833-1118947028.vi
  7. Richard, I just answered in NI's forum to the same posting. Besides pointing to the same clipboard.ddl as swainedonald, I there recommended activex and excel. The topic http://forums.lavausergroup.org/index.php?...c=1396&hl=excel in the LAVA forum is maybe something that helps, but at least the topic's author will know better than me what to do to communicate with excel This is another possibly helpful link: http://sine.ni.com/apps/we/niepd_web_displ...034080020E74861 (Searching for 'labview excel' on NI's homepage gives you lots of good hits) -Franz
  8. Could you explain what exactly you do? I do not have that problem, I can copy/paste ASCII information, not bitmaps -Franz
  9. Is it this what you want: ?(be careful when the original 1D arrays have unequal length. You need to pad them in some meaningful way.) -Franz
  10. Use the 'Array to Spreadsheet' function:
  11. Go to www.ni.com/devzone and enter 'design patterns' in the search field. You'll find a lot of good resources on advanced concepts there, also tutorials. State machines are explained as well as the master/slave pattern and many others.. -Franz
  12. Just connect a 1D array of DBL to the 'array type' input of the "Spreadsheet String to Array" function. One can, BTW, also connect arrays of string to the array type connector, which is a sometimes overlooked feature. See examples below:
  13. Generally everything (well, nearly everything) is possible. BUT if you translate a poem from Chinese to English it will not sound the same. So why do you want to translate from LV (which you do not even 'speak') to C++? Stay with C++ if you can solve your programming problems with it. It is object oriented while LV is not (yet). That is a definite advantage of C++. Change to LV if you are interested in measurements and real world solutions. BEWARE though: it opens your eyes for a whole new world of programming and you might never want to go back to C++ any more...
  14. Since frequency f is defined as events per time ( f = 1/t) you would get a hyperbola if you plot y (= f = 1/t ) vs. x ( = t ). What is so interesting in plotting a hyperbola?
  15. I do not understand what you mean by 'frequency against time domain'. Do you want to plot a Signal S in dependence on frequency, S(f), and the same (or another) Signal in dependence on time, S(t), in one plot? That would make little sense, since the x-axes of the plot would be two different quantities.
  16. You may want totry the following Labview case structure (which is a more or less literal translatino of you pseudo code to LV graphical code: Sorry, there are two errors: a) some pictures are missing. But you can reconstruct from the visible frames what's in the missing frames.. b) it should read translation, not 'translatino' (whatever that is)
  17. It is actually quite simple, but maybe difficult to explain to a LV novice... If you post an example data text file I'm sure someone will write an example VI for you to get started...a program says more than 1000 words!
  18. You can use the "Get Date/Time In Seconds" function to set the "XScale.Minimum" property of the waveform chart as shown in the attached image. -Franz
  19. Use the VI property node to obtain a reference to the VI panel, then set the color property of the panel:
  20. There are indeed many ways to label the states of a state-machine. But the string or enum approach make the code much more readable than just numbering the different states. I prefer the strings over the enums for two reasons: - it is (a bit) easier to add a new state when you use strings (the danger of mis-spelling is reduced if there is a default case in the state machine which generates a run-time error like e.g. 'invalid state') - when a menu event occurs, I just pass the menu tag string into the queue which drives the state machine loop. No need to map the menu tag to an enum. This can be done in the simple QSM (queue driven state machine) or in the ESM (event driven state-machine, producer-consumer pattern).
  21. One advantage of the encapsulation provided by an OOP approach is that you don't need to pass ALL RELEVANT INFORMATION to the objects. Each objects 'knows' what it needs to know. Of course you need to pass parameters when calling a 'method' of an object (the 'method' is one of the VIs which comprise the functionality of a class). But these parameters should contain just the information the 'method' needs to know in order to perform its task. I use specific read/write routines to access the system parameters. When a measurement is running, the main panel is not responsive to user input and system parameters cannot change. (Exception: the user can stop a running measurement or batch job. The status of the main (Idle/Measuring) is indicated in the main's titlebar I use a simple QSM since the program dates back to LV 4 or 5. I didn't find the time (nor the motivation) to change it to the event machine driven consumer-producer design pattern mentioned by Michael Ashe and Michael Aivaliotis. For new projects I prefer (and recommend) their approach. Thanks for that info, I guess I'll wait with the HDF stuff until someone makes it work less painful...
×
×
  • Create New...

Important Information

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