Jump to content

robijn

Members
  • Posts

    171
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by robijn

  1. QUOTE(jlokanis @ Nov 13 2007, 09:11 PM)

    Anyone have a better idea? I am about to abandon the tree control altogether...

    Hi,

    You could also, instead of creating a copy of your original data to compare with, create a copy of the tree data to compare with. Most data of the tree can be represented by a 2D array of strings and a 1D array of indentation values.

    Joris

  2. QUOTE(Daklu @ Nov 21 2007, 08:59 PM)

    1. Imagine if Visual Studio only allowed 25 lines in each code module because "functions should never be longer than one screen." What would happen? Aside from mass migration to other programming environments people would cram more code onto each line.

    I don't get the comparison. Visual studio does not have this limitation, neither has LabVIEW. The view of both are limited by what fits on the screen. You have to scroll in both if the code is too large.

    I think this feature would be considered by many as an invitation for satelite view programming. Like with Google Earth you zoom in on the part of the block diagram you want to see. That would result in even worse block diagrams than what I've seen sometimes. I hate the auto resizing structures as they also resize when you don't want them to. And even worse, this resizing messes up other parts of the block diagram. No, a subVI is definitely much more than just a part of the code that could have been present in the main VI.

    Joris

  3. QUOTE(Justin Goeres @ Nov 10 2007, 10:23 PM)

    I think this will trigger it:
    1. Reply to a post.
    2. Reply again to the same post immediately (so it merges).
    3. Click the "Edit" button under your post to edit it and choose Full Edit (although I think Quick Edit does it, too). When the editor loads the linebreaks in the post you're editing will be gone.

    I can confirm this, I found out the same on october 3rd. At that time, only point 1 and 2 were enough to trigger the effect.

    Joris

  4. QUOTE(Justin Goeres @ Nov 10 2007, 10:23 PM)

    I think this will trigger it:
    1. Reply to a post.
    2. Reply again to the same post immediately (so it merges).
    3. Click the "Edit" button under your post to edit it and choose Full Edit (although I think Quick Edit does it, too). When the editor loads the linebreaks in the post you're editing will be gone.

    I can confirm this, I found out the same on october 3rd. At that time, only point 1 and 2 were enough to trigger the effect.

    Joris

  5. QUOTE(Aristos Queue @ Oct 31 2007, 01:06 AM)

    for the growth rate, a measure more akin to lines of code. Anyone ever written a tool that you can point at a directory of VIs and figure out how the surface are of its diagram? And maybe even its average icon density?

    I would be interested in numbers like this:

    0. #nodes, total wire length, #subVI's

    1. #nodes / wire length (low rate means spagetti code)

    2. #wire bends / wire or wire length (low rate indicates better wire straighting)

    3. Code structure complexity indicator: deepest nesting level of structures in the code (except error case around whole VI)

    4. Data structure complexity indicator: number of bunde / unbundle / index array / delete from array / insert into array / replace array el / operations in the code

    5. Code branch obfuscation indicator: number of case frames or dynamic dispatch method calls

    6. Error wire use indicator: is an error wire connection wired through or is the error "put under the carpet" (i.e. lost)

    These numbers should give some fingerprint of what the code looks like.

    I think you should be able to confirm that a program you have hacked together is actually written worse than one that was properly designed :)

    Joris

  6. QUOTE(JFM @ Oct 23 2007, 02:47 PM)

    I guess that the structure should be limited to Fixed Size Arrays or constant number of threads, or do you think it would be possible to have threads allocated on the fly?

    I would say why not..? It's already being done if you place two VI's in parallel. (or do you mean LV internal threads...? I don't think that makes a difference for this problem)

    I'm waiting for the "Number of processors" function on the LV palette...

    Joris

  7. Hi,

    What you can do is have the subVI run continously by placing it parallel to your other code in the main=UI VI. Then communicate the status of the subsystem via globals or (usually better) via functional globals to your main VI. The subVI should store its status when it changes into the global or functional global. The main VI should poll the global or functional global at a limited rate (i.e. not continously, but with a wait in a loop).

    This is the base of many templates. Instead of polling queues are then usually used to communicate with a subprocess, but that is not required if you want to learn how get a subVI to run independently. In many such templates there is a main VI which calls a UI VI and 1 or multiple hardware interface VI and optionally for example a processing VI. These VI's loop autonomously and when they have all stopped looping the main VI stops.

    Joris

  8. QUOTE(Aristos Queue @ Oct 15 2007, 06:51 PM)

    Ok. That's cool. Took me a moment to see how you got from Ben to uaq, but I'm typing on my laptop, and when I stood up, it was suddenly blazingly obvious. ;-)

    When I was something like 5 I had learned the letters of the alphabeth. I couldn't do much useful with them then because I could not really read words. Then I was struck by physics with mirrors, I remember it was triggered by ambulances that have that word mirrored on their hood and so I wanted to know the letters the other way too. I should not have done that. I got into trouble when I had to write words for school. Suddenly I couldn't remember if you wrote bed like bed or like deb. I learned the hard way you should not go to step B if step A isn't mastered yet...

    Joris

  9. QUOTE(PJM_labview @ Oct 15 2007, 11:23 PM)

    I think, for my use case, I would like a tool that auto connect to the connector pane, given the relative position of controls.

    So I would position my control the way I want (no grid), then run the tool (which will attempt to connect doing its best effort, following a few simple rules). It will default to the 4x2x2x4 (4815) connector if no connector selected, else use the existing one.

    Yes this would be a very handy LV feature or tool.

    It could also warn if you connect an error in at top-left or a functional global action (enum) at left or an output at left. If it could not match your controls to the 4x2x2x4 connector it could present you with a choice for an other one... or resize the window to have only the controls visible that are to be attached... or ask you politely to clean things up and position controls better... I like polite software.

    Joris

  10. QUOTE(Milchbilch @ Oct 12 2007, 10:44 AM)

    Do I have in LV really the possibility to use a child's override VI to OVERRIDE the functionallity of a base class vi?

    So is the code of the base vi executed when executing the child's vi?

    If you call the parent (=base) class method, the child (=derived) class method will actually be executed, as it overrides the base class method. Just like you're used to in C++.

    Joris

  11. QUOTE(Michael_Aivaliotis @ Oct 8 2007, 12:03 AM)

    Here's the VI, bonus to whoever figures it out... and yes, it works as expected. The caller will be broken if this output is not wired.

    Hey it's great NI implemented this feature !

    :P

    I've wanted this for years. Indeed forcing error out and objects. I hope it will be selectable in 8.5.1 or whatever version. Probaably the first time NI can remove code from their codebase to add a feature.

    Joris

  12. QUOTE(Jim Kring @ Oct 8 2007, 09:41 PM)

    Resolving the missing items is another issue altogether.

    I am having difficulty resolving links for a complicated projects. It's actually a kind of a merge of two projects, and the VI's point to multiple identically named subVI's. These VI's were exactly the same, but on a different path. Up to now, that would not be a problem, you would just have to force the VI's from the correct path to be in memory first, then load the other VI's and then save once. But now I have to fix all 500+ conflicting VI's one by one... Has anyone found a quicker way ?

    Joris

  13. QUOTE(MikaelH @ Oct 4 2007, 02:08 AM)

    This is not a bug, just a change of how the Copy function works.

    The Copy function don't support files in the LLB any more.

    Does that mean that LLB's soon are unsupported ;)

    Well if I was NI I wouldn't know any other way to get rid of LLB's other than to stop supporting them.

    LLB's are evil. They destroy hierarchy to flat level. They are terrible with file corruption. And you can't store anything but VIs and CTLs in them (or actually NI can...). Yeah, they are really bad.

    But... well... they are very convenient to put stuff in compactly. And they are very fast. And they rule with tools. I'll have a hard time living without LLB's.

    Joris

  14. QUOTE(rolfk @ Oct 3 2007, 08:15 AM)
    Not just LabVIEW for everyone!!! There isn't any standard at all and the only defacto standard is what Windows invented for ini files and as far as Windows is concerned there are no comments in an ini file. The fact that there are lines that contain some data that is never queried with a GetPrivateProfileString is all that makes them comments. Similarly SetPrivateProfileString does not really give you any functionality to add comments to an ini file.
    Hello,Rolf, I think you are making things too complicated here. Microsoft themselves introduced the semicolon (;) as comment symbol, so although it's not a standard as in ISO or IEEE I don't think there can be too much discussion about how you should place comments in an ini file. Note NI calls them config files, I guess to stay out of MS's water. My experience with config files and the routines I have developed a couple of years back, is that it is possible to enhance the functionality and speed greatly over NI's routines. To prevent messing up the file layout, I am modifying only the value part and keep the rest of the text unmodified, and don't reconstruct the section by collecting keys and values. I insert new keys at the beginning of a new line (after the last written entry or at the end, depending on whether somethings was already written). These are simple measures to retain comments.Other useful improvements could be to write entire sections (so you can store other kinds of data). That way, you can store 1D or 2D arrays of DBL/I32/string in a transparant way in a section.JorisPS yeah that smiley should have been a semicolon
  15. I think the VISA parallel port functionality is only meant for parallel printers. Printer output works something like this:

    1 wait until not busy and not error

    2 place next byte on D lines

    3 toggle the strobe line

    4 if more bytes goto 1

    You have much more freedom with the port IO functions, but I think they are limited to low port addresses.

    Have a look on http://beyondlogic.org, the parallel port section.

    Anyway the LPT port is an ancient piece of hardware, and you're lucky if you still have one to play with :) I would limit the use to playing only.

    Joris

  16. Maybe bettter to use the connectionless protocol UDP instead of TCP. This makes (temporary) loss of connectivity not a problem. You will need to number your packets and you need to resend commands if you don't get a respons. But you get no delays if the connection breaks temporary. You are in control of the "connection", not the TCP stack.

    My PDA phone speaks WiFi and I want to try something like this too :)

    Joris

×
×
  • Create New...

Important Information

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