Jump to content

Mikkel

Members
  • Posts

    74
  • Joined

  • Last visited

Everything posted by Mikkel

  1. QUOTE(TiT @ Mar 6 2007, 08:09 AM) I would love for LabVIEW to support a 'break' operation in for loops (the lack of this feature is actually one of the (few) things that annoys me, when coding in LabVIEW). This way, you would elegantly be able to iterate through an array until some condition is met, and then exit the loop. Yes, I know this can be achieved by using a while loop, but not without first getting the array size, and making the 'compare with i' logic inside the while loop (and enbedding the while loop in a case, to handle if the array is empty). -Mikkel
  2. QUOTE(frentzen @ Mar 5 2007, 03:15 PM) Well, then it would be natural to use a 'While Loop' around your code. If you want the path to be constand, you can use a 'Path Constant' on your diagram. Once a second (use 'Wait (ms)') you could check if the datafile's time/date has changed, and reread the file if it has. More information about loops, delays, and file operations can be found in the examples installed along with LabVIEW (Help/Find Examples...). -Mikkel
  3. QUOTE(frentzen @ Mar 5 2007, 01:21 PM) In stead of using a script to parse your XML file, you could try to parse the XML data (after reading it as a text file) by using the LabVIEW VIs "ParseXMLFragments.vi", "FindFirstTag.vi", "FindMatchingCloseTag.vi", all located in \vi.lib\Utility\xml.llb. This would solve the variant related problems, as well as being more clean code. -Mikkel
  4. QUOTE(Rimmergogo @ Mar 5 2007, 09:48 AM) May I suggest, that you try participate in a constructive manner in stead of replying to your own posts? :thumbdown: This is - by far - the easiest way to get an icon under your name. -Mikkel
  5. Mikkel

    array

    QUOTE(Nullllll @ Mar 4 2007, 07:14 AM) In the lower right corner of the LabVIEW 8 'Getting Started' screen you will find the 'Find Examples...' link. Use this link to find the example most apropriate for your question, and look at the code to learn how this code is written. Here is a link you also might want to read: http://www.catb.org/~esr/faqs/smart-questions.html''>http://www.catb.org/~esr/faqs/smart-questions.html' target="_blank">http://www.catb.org/~esr/faqs/smart-questions.html -Mikkel
  6. QUOTE(LV Punk @ Mar 2 2007, 07:10 PM) As a hex editor i normally use Hiew. Not quite freeware, but a great tool for *cough* hex-editing :ninja: http://www.hiew.ru/ -Mikkel
  7. I use SyncBack - it seems to do the job. http://www.2brightsparks.com/syncback/ Here is btw. a link to a lot of other freeware utilities: http://www.winaddons.com/top-300-freeware-software/ -Mikkel
  8. QUOTE(zero-tolerance @ Mar 1 2007, 11:48 AM) 1) If the order of the elements in the array is not important, you can quite easily find and remove repeated values by first sorting the array ('Sort 1D Array' function). 2) Uhh. Lost me there -Mikkel
  9. QUOTE(Rimmergogo @ Mar 1 2007, 01:44 PM) Since the value you get from 'Y Scale.Bounds:Width' is unsigned, the output type of following addition and the top subtract operation (Horizontal) will be unsigned. Changing the output type from the addition to signed long (with a 'To Long Integer' conversion) solves the problem. -Mikkel
  10. QUOTE(Joost van Hamond @ Feb 27 2007, 12:14 PM) When I read your question I went ahead and made the attached llb (LV 8.0) just for the fun of it. It implements the screen capture the ugly clipboard way, but seems to work. The 'App.Get Image' part was made by yen, and taken from this thread: http://forums.lavag.org/index.php?showtopic=4281 If you want to check for specific data on a web page, it might be more productive and a lot more elegant to retrieve the HTML for the page, and then parse this string. 'Data socket read' can be used for this purpose, if you provide the URL as 'connection in' (if you don't want to implement the HTML transfer yourself using the TCPIP primitives). -Mikkel http://forums.lavag.org/index.php?act=attach&type=post&id=5058 Edit: Dooh! Just re-read your post, and saw that you wrote LV 7.0. Oh, well time to upgrade!
  11. QUOTE(John Rouse @ Feb 27 2007, 06:35 PM) I think I would prefer using the 'Scan from String' function with format string "{ %d.%d.%d" - but it's a matter of taste... -Mikkel
  12. QUOTE(eaolson @ Feb 22 2007, 07:47 PM) As described in post #2, you could make several datafiles and delete older files when they become obsolete. This would solve the 87 GB problem... -Mikkel
  13. Fist off, I think you need to do some modifications to your loop. For a start you could move the initialization of the serial port outside the loop, and look into using a termination char, so you read data line by line in stead of reading all the bytes present in the serial input buffer. Once you have taken care of this, parsing of the data should be a lot easier. -Mikkel
  14. QUOTE(EJW @ Feb 19 2007, 07:49 PM) I think I would stream all the readings into a file - maybe one file pr. hour, and keep deleting the oldest file, so you have at least the last two present on disk. After the test ends, process the last file(s), extracting the last 5 mins. of data. -Mikkel
  15. I don't know what you are doing wrong, but I have attached a VI that finds the callers window handle the ugly way Download File:post-5175-1170935219.vi -Mikkel
  16. I think a better solution is to modify the string already in memory (output from the 'Read Lines From File.vi') and rewrite the complete file. The way you are doing it now is bound to incorrectly overwrite data in the start of the file, leaving an incomplete dataset after the header. -Mikkel
  17. Maybe I don't understand what you are trying to do but: Why are you using variants at all? If you flatten your clusters directly to string, and let your queues contain strings, doesn't this solve the problem? (If you flatten a cluster to string it does not contain element names, but if you flatten the cluster variant it will, at least in LV8.0). -Mikkel
  18. The easy solution would be to use TAB as delimiter in stead of comma in your input If you insist on commas is delimiter: Here is my solution, that uses regexp to split the strings up, I'm not shure if I would call it either easy or efficient... -Mikkel
  19. In my crude 'benchmark' your ASCII->UNICODE is actually slightly slower that my solution. But yours does have a higher 'coolness/simplicity'-score :thumbup: -Mikkel
  20. I actually hadn't noticed that you could resize 'Replace Array Subset' for use on several elements before - as you used it in the original code. You learn - or relearn - something every day -Mikkel
  21. You can look at the "Three Button Dialog.vi" to get some inspiration - it's located here: C:\Program Files\National Instruments\LabVIEW 8.0\vi.lib\Utility\error.llb\Three Button Dialog.vi -Mikkel
  22. As far as I can see (count!) you have 24 chars in your read buffer and 25 in the search pattern, thats why -1 is returned. The reason this might work when you trace it, is most likely that your VISA read VI gets to read more data, as execution is delayed. I don't think it's a problem with the string compare function. -Mikkel
×
×
  • Create New...

Important Information

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