Jump to content

Francois Normandin

Members
  • Posts

    1,209
  • Joined

  • Last visited

  • Days Won

    46

Posts posted by Francois Normandin

  1. QUOTE (JasonD @ May 28 2003, 07:46 AM)

    I've been wishing for a freehand sketchpad for the diagram view. Maybe also have the basic "draw tools" - text, squares, fills, lines, etc.

    I'd love to be able to just look at the back panel, and circle a big chunk of code and then maybe have some explainitory text next to it.

    It would have to be a layers thing, so you could click a button to hide or show.

    yeah, that's what subvi's are for but still...

    Some people use a one-frame Stacked Sequence Structure to wrap a piece of code and put some text. Not my favorite, but that could do the trick.

    I'm not sure a free-hand sketchpad would increase readability of the block diagrams. But the draw tools might be useful I agree, although it's that sort of thing that might be nice to have, but how many times will you really need something like this? For the moment, decorations can be dropped on the front panel and copied to the diagram.

  2. QUOTE (schneidley @ Sep 23 2008, 03:36 PM)

    i'm trying to use labview to output a +3.3 and +5V DC signal for relay control. i can get the usb6008 to read signals, but it just seems to not want to output a signal. i've played with digital and analog output, and gotten nowhere. i think i'm just missing something stupid. can anyone give me a start on what i should be doing? thanks

    ~B.

    Can you describe more your experimental setup? With the information at hand, it could be a number of problems... maybe your software works fine but you don't have enough current to latch the relay, or you might have a software problem?

    1- I'd look in MAX in the test panel for device USB6008. If you can set it to 3.3V and measure it correctly with a voltmeter, then your device works and you know you are looking at the correct pin number...

    2- In LabVIEW, try using the DAQ assistant to setup a simple AO code.

  3. QUOTE (Mads @ Sep 22 2008, 10:18 AM)

    The search could be made binary instead, that would cut the number of Nth line calls dramatically...

    Indeed you're right. :yes: Thanks for the wiki-link.

    John has suggested this a few posts above.

    QUOTE (jlokanis @ Sep 22 2008, 02:32 AM)

    1. Speed (it is slow). I am not up to writting a word wrap detector right now. By using the Get Nth Line function, I can support a text control with any font. I think this could be improved by doing a binary search algorithm, but I would need to know how many lines a text control contains. As noted, this is not easy and requires counting <CR> and word wraps.

  4. QUOTE (Aristos Queue @ Sep 21 2008, 11:56 PM)

    Get Nth Line is something I wrote to make various UI problems solvable. The problem is that it has to mimic the rendering of the text in the current font in order to figure out where word wrapping occurs. The font system is structured in the OS such that there's no way to do it except by actually rendering the font off screen (at least no other mechanism that I could puzzle out). As you observed, this means that for very large blocks of text, you'll have a slow down as if the entire file were drawn on a very large screen. Ugly.

    So, you'll have to do this: Pick a font. Measure the width of every character in that font in pixels. Then do your own running calculations of where the word wrapping occurs. This should be very fast. It's something that Get Nth Line cannot do because it has to work with all possible fonts. Doing your own running calculation of the word wrapping will allow you to avoid the graphics rendering.

    And now you know why word processors are such a pain to write and why so many end up so bloated and slow. And you know why MS Word was such an impressive app when it was released. It was able to track font runs very very quickly -- a seriously non-trivial problem, though it seems simple enough when you start on it.

    Thanks for those insights... I had really no idea about that!

    QUOTE (jlokanis @ Sep 22 2008, 02:32 AM)

    1. Speed (it is slow). I am not up to writting a word wrap detector right now. By using the Get Nth Line function, I can support a text control with any font. I think this could be improved by doing a binary search algorithm, but I would need to know how many lines a text control contains. As noted, this is not easy and requires counting <CR> and word wraps.

    Sure would be a nice snippet of code...

  5. QUOTE (crelf @ Sep 19 2008, 07:57 PM)

    Maybe your svn is beginning to slow down your network after all... :laugh:

    (Quoting myself...)

    QUOTE (normandinf @ Sep 19 2008, 07:09 PM)

    One trick is to use the method "Get Nth Line".

    I tested the method a little tonight and I don't think it will be useful with large files as it seems very slow. It took a few seconds to scan a 591 lines string on my QuadCore! For long files, like help documents, it's gonna take a better scanning algorithm.

  6. QUOTE (PJM_labview @ Sep 16 2008, 03:56 PM)

    Yeah, I get that a lot too...

    QUOTE (PJM_labview @ Sep 16 2008, 03:56 PM)

    From what I see I came up with a similar solution than Darren (using the linker info). I believe that this solution does not work in the runtime engine.

    About, the "LVClassPathFromInstance", this was just a side question to know if the
    Get
    LV
    Class Path.vi
    work in runtime (which it does).

    I tried it and it does not work in EXE. (If AQ says it, I'll believe him).

    I wonder if you could load them dynamically at runtime, check their inheritance and then close them all? If that's possible in EXE, I bet it would be slow and not memory-effective but it would get you there... :2cents: It is not available either at runtime... :(

    QUOTE (PJM_labview @ Sep 16 2008, 03:56 PM)

    Well here it is. This is saved in LV86. I didn't include Norm's Tree Control API vis, neither the OpenG packages I used, to keep the llb small. I'm sure you don't need them ;) , but if someone else does, please follow the links to get them as it makes too large a file to upload.

    Download File:post-10515-1221609011.llb

  7. QUOTE (PJM_labview @ Sep 15 2008, 05:09 PM)

    Have you looked at this post from Darren about Inheritance hierarchy? The VI is password-protected but should work at runtime.

    I guess that's the output from LVClassPathFromInstance call you're looking for. I've used it to get the complete class hierarchy recursively. I don't have the result on my daytime computer, but could find it tonight. It's simply an implementation of Darren's VI with the tree control API from Norm the Captain.

  8. QUOTE (crelf @ Sep 14 2008, 01:03 PM)

    I can't!!!!

    We've got presentation during lunch time of the second season of BSG on the conference screen starting today. Since it's as big as a cinema screen, I'll try to wait a until spring to see these spoilers or else I'll know of the 5th Cylon... ;)

    (Yes, second season... we started a little bit late!)

  9. QUOTE (Graeme @ Sep 11 2008, 05:30 PM)

    Hi all,

    The attached VI and its comments say it all, but briefly, if you have an Enum constant wired to a Case Structure selector and the Case Structure has had "Add Case For Every Value" applied, then if you are commenting in a case for which the Enum constant is not set, then the comment does not behave properly (it only updates when you click outside of the comment).

    Trivial in the greater scheme of things I know, but threw me a curved ball for a while. Responses welcome.

    Regards, Graeme.

    I can confirm that it doesn't work for me in 8.5 but it has been fixed in 8.6...

  10. It's happening in 8.6 too.

    We're at the limit of resolution of the algorithm. In DBL precision, this happens around 1E+14 or so.

    I tried to wrap the Large EXT control to 0-2pi interval and I should have gotten the full EXT resolution (see pic)

    Except that the division seems to be suffering from the same problem and it doesn't work. Since the sine and cosine are most probably calculated using some Taylor series (x^n/n! type of equation), we run into serious problems with 9E18^n/n!. I don't know which "n" is being computed, but if you compute until you converge, it could explain the algorithm becoming unstable.

    post-10515-1221169123.png?width=400

  11. QUOTE (Daklu @ Sep 9 2008, 03:14 PM)

    Is there some special technique required to insert a class cube on a custom palette? I've tried several times but it doesn't seem to be working.

    The Class Cube is a built-in function and I don't think you can access it. In the palette editor, when selecting "Display path to palette file...", you get a message saying it's built-in.

    However, if you create a control and put the class cube in (type def or not), you can insert this wrapper control in any palette or save it to user.lib.

  12. QUOTE (crelf @ Sep 8 2008, 12:33 PM)

    Nope - I said "...the top ten countries by number of medals..." - Jamaica was 13th by number of gold and 20th by total number of medals.

    Fair enough ;)

  13. QUOTE (crelf @ Sep 6 2008, 06:29 PM)

    ...and if you take the top ten countries by number of medals, prorata them by capita, Australia is #1 ! ! ! winner.gif

    Okay, that's probably taking it a little too far :)

    I don't want to spoil it, but I think Jamaica would win it for gold medal/capita ratio...

  14. QUOTE (Raymond Tsang @ Aug 24 2008, 06:12 PM)

    I simply monitored it in the Task Manager. It's not perfect because it monitors everything else along with LabView, but if you had a reference of some kind that was opened repeatedly and never closed, you'd have had an increase in system memory usage.

    QUOTE (giopper @ Aug 23 2008, 10:18 PM)

    Although it shouldn't be a problem,

    I suggest to move the "open" before the main loop

    and the "close" after exiting the main loop.

    I agree. And when writing to file, the file position will automatically be at the end of what you just wrote. Hence, no need to tell the file to go at the end, except if some other program could access this file at the same time and set position differently.

×
×
  • Create New...

Important Information

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