Jump to content

larsen

Members
  • Content Count

    10
  • Joined

  • Last visited

Community Reputation

0

About larsen

  • Rank
    Active

Profile Information

  • Gender
    Male
  • Location
    copenhagen

LabVIEW Information

  • Version
    LabVIEW 8.6
  • Since
    1991
  1. has not set their status

  2. I use SVN sub version as archive backend but with TortoiseSVN as frontend. TortoiseSVN is a plug-in to windows explorer so you can manage revisioning from the explorer. I.e. completely independent of LV in fact. As you probably know by now, LV8.0 has a built in interface to version management systems which exposes the Microsoft Common Source Code Control interface aka. SCC. This is not supported by SVN or TortoiseSVN but you can put a layer between SVN and SCC. For instance PushOk's svnscc makes interface with LV posible although somewhat limited in functionality compared to TortoiseSVN. Unfo
  3. In any serious application you check for errors and (try to) act sensibly on them. LV error cluster is the recommended carrier. But I am lacking a useful method to keep an order in the different error codes. LV has a built-in error database for the ones defined by NI. User error are reserved in the code range... I tried both methods but they suffer different things: General Error Handler VI is strangely complicated to apply for what little it can do, and the help for it is weird suggesting creating constants at the array input. Why does it have an array of user error codes/messages as in
  4. hello Jim, I think there is a confusion as to what a regular expression is. Search and replace String.vi has both modes. Selected by right-click on it. Take a look at the attached example comparing behaviour of Search and replace String with Search and replace pattern. Both claim to have regular expression inputs (if so selected, at least in LV8), but result differs for regular expression = [\\s\\t] (in \code display) = [\s\t] (as a normal string). Search and replace String.vi: With regular expression= [\\s\\t], string \s\t\n\r is matched in all 4 characters (all written in \ code displ
  5. Manfred, Thanks for your elegant suggestion. Speed is however not a concern in my particular case. Some other time maybe. I tried your vi, but there is a small bit of cleaning up to do though. Could not see how to fix this however, but maybe you can, having it fresh in mind: Currently it removes double characters, which was not what I had in mind: 22 33 becomes 2;3 and not 22;33 It should only slim down duplicated blanks and tabs. /henning
  6. Jim,Thanks to your precious hint I made the attached VI. Note however that I changed "[\s\t]+" into "[ \t]+" to get the newlines preserved. Note also that "[\s\t]+" is the same as "[\s]+" because "\t" is a part of whitespace "\s". But your idea works great. Every time I try to use regular expressions I learn new stuff. thanks for your help henning Download File:post-4913-1147245384.vi
  7. In a string I want to replace any sequence of blanks or tabs (\s or \t) by a single character (for instance a ; ). So a string like 123 456 78 becomes 123;456;78 irrespective if the whitespace is tabs or spaces. This should be possible to do with regular expression gymnastics, but I have not been able to figure it out. Any suggestions are wellcome. I need this to read 2D arrays of numbers from text files. Similare to the "Spreadsheet String to array" function, except that "Spreadsheet String to array" has either tabs or space as delimiter, not both. In a text file it can be
  8. I use a strict typedef cluster (call it StorageTypeDef) to define the structure of the data written to a binary file. The nice thing here is that if I want to change the format of the data, I just modify the cluster typedef StorageTypeDef, and all referencing vi's gets updated. Unfortunate one of the elements is a string. This has a varying length and thus the size of the cluster changes. I deal with this by limiting the string size to a maximum. This maximum value is a constant which I would like to be coded into the cluster type def. So at all times, my cluster typedef contains ALL the
  9. Thank you AMSLCC and Guillaume, Thanks AMSLCC for your suggestions. I did not think of Teststand as an option. I will keep that method in mind, but for this particular application its likely to be overkill. The trick with property node-> value(signalling) was just what I was looking for in this situation. I have seen this property several times but did not figure out its use. Exactly as you write Guillaume, this can make reuse of code in event handlers very easy to implement, and a sequencer is also straight forward. To explore the method I also tried generating events from inside an ev
  10. I have a system with a top-level vi which is commanded via events from front panel controls. This is very convenient during development of an application. Now the application has to move to a more autonomous type application which is started and runs autonoumously without a users interaction. But now there is no user to watch the indicators and push the buttons in the right sequence to setup and start the application. I.e. what I need is some kind of scripting support. I have tried to build a sequencer into the top.vi having the event loop, and which manipulates the controls in the proper s
  11. This code has a lurking disaster because you dont do any check of the x and y is within bounds. If not, crashes are certain. Printf is not posible from a dll. Where should it print to? there is no terminal. You can however use a messagebox char msg[300]; sprintf(msg, "Result of Matrix Multiplication\n"); MessageBox(NULL,msg,"info",MB_OK|MB_ICONERROR); regards henning
×
×
  • Create New...

Important Information

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