Jump to content

Eugen Graf

Members
  • Posts

    432
  • Joined

  • Last visited

Posts posted by Eugen Graf

  1. QUOTE (Justin Goeres @ Jun 13 2008, 10:36 PM)

    If I'm understanding you correctly, you need to make the cluster itself a typedef and it will solve your problem.

    So you will have:

    Queue Type Cluster.ctl
    (typedef) containing
    Action-Enum.ctl
    (typedef)

    Variant

    Yes, you understand it very good. It would solve almost all my problems but I want to use this Queue-Ref-Constant in SubVIs. So I want to define this as Control (Input) in my SubVIs.

  2. QUOTE (Aristos Queue @ Jun 13 2008, 10:05 PM)

    Hm... my reply would be: "Binary strings are massively slower, require more memory, and are not what you want to use unless you absolutely cannot use variants." Save the binary strings for when you're flattening to a file or for communicating over some network connection.

    Ok, I understand you good. So binary string parsing is slower, but don't understand why. No problem.

    Can you tell something about my use case?

    If you define a queue of type Cluster with Action-Enum-Typedef and Variant-Data inside them. Than I change my Typedef, but the queue Type will not be automaticaly updated to this "new" type. What can I do to update queue type automaticaly? Is it possible?

    Thank you

  3. QUOTE (normandinf @ Jun 13 2008, 09:43 PM)

    Thank you for reply, but I want the Output should automatically update if I update my typedef.

    QUOTE (normandinf @ Jun 13 2008, 09:43 PM)

    EDIT: You also have errors in "Core_Start.vi", but that I'm sure you can fix.
    ;)

    Of course, I am in programming phase. This VI is not ready to go now.

    EDIT: Ok, I did it on my way. I redefined my queue to binary string type. Not only due to this problem, much more I want to stay compatible to other programming languages.

  4. So, I got my first error (comic behaviour) using ENUM_Typedef+Variant Cluster instead of Binary String.

    If I define my Queue of this type I have everytime to update my Queue Reference Constant if I add or remove some Items in my ENUM_Typedef.

    Of cource I can define my queue as a variant and add there Enum_Typedef and an substituded variant.

    But I saw that LV-Programmers use commonly a cluster (not a Variant!) with ENUM and Variant inside.

  5. FGV is really a good container for references! :thumbup:

    What do you do if your application should connect more computers e.g. over ethernet? I mean you can't use one FGV on more than on PCs.

    But I find FGV a very nice suggestion.

    QUOTE (JDave @ Jun 13 2008, 01:55 AM)

    And why not use queues or user events to communicate between the loops, as mentioned already?

    Of course, I use it. But my question was how to administrate it.

    had some projects where I used about 5 queues, 1 notifier and 7 User Events. Ok, it's not really the biggest, but it can happen, that I get a project with much more loops,where I have to administrate all references and the programm architecture.

    And of course the reusability of the code, so modularity is very important for me. I want to use some loops, tasks packed in a VI for future projects too. So I want to make it more general.

  6. QUOTE (Justin Goeres @ Jun 13 2008, 12:50 AM)

    That having been said, if I got a bunch of code that used binary strings instead of Enum/Variant, I'd scratch my head and wonder why the original developer was still living in the Dark Ages :P .

    Why? I use it too, it's good. At all because I can unflatten it partionally and have rest of binary string (> 8.0) to parse it. I can do it more dynamic, whereby variant is more static, because you have to place variant into variant. But you can append one binary string to other binary string.

  7. QUOTE (Justin Goeres @ Jun 13 2008, 12:47 AM)

    but have realized that a lot of what I used to use two loops for can actually be done with just one.

    But if your software should get data from 5 different sources each over RS232, TCP/IP, CAN and you should show some dialogs to user, than it can't be done with one loop, because your buffers will get full and you will lost some data if user don't klick OK or Cancel?

    And the next question:

    Producer-Consumer Design Pattern is not enough (for me). I want to communicate from every loop to every other loop. What can you suggest for this?

  8. That is not for tutorial (why not?), it's for me.

    If my loops communicate using queues, notifiers or user events I can't choose which type of them I want to use. I use currently Binay String Type, but I saw that much people use a cluster with ENUM and VARIANT inside. The enum is the action and variant contains data. I use binary string which contains header and data.

    Both is good, has advantages and disadvantages, can you tell me what do you use in this case?

    Thank you

  9. QUOTE (Yen @ Jun 12 2008, 09:39 PM)

    Can you explain what you mean?

    Not really. But it's my impression.

    It shouldn't be so, but I think two brothers Iran and Iraq have different fortunes and this story says about it. Peoples are amerikans who meet one of brother and he converts from one figure to other if he jumps into the hole.

    In really the story may say some other, but I think my impression is no too false. It can be something like this.

  10. Binary strings (my choise)

    + are

    direct representation of data in memory

    takes less memory and so faster

    easier to parse partionally (rest of binary string output in unflatten)

    mostly used by other programming languages (DLLs & co.)

    almost always used by binary protocolls (devices)

    - are

    not readable by users (not really needed for program inside)

    bad for debugging

    Variant (and I think XML too)

    + are

    better to debug

    some properties can be set (like on waveform)

    readable by users (can be used to save programm settings)

    any more???

    - are

    what???

    Can you tell me in which cases I should better take variant?

    Thank you, Eugen

  11. QUOTE (Antoine @ Jun 10 2008, 11:26 PM)

    Hi,

    I don't really know how graph memory is handled but anway my best advice is : do not put 800k values, just put about 5-10 values per pixel (-> check the graph area size). I've saved a lot of memory with this technique.

    Hope this can help.

    Ok, but the graph will be zoomed. Almost each point is needed. Not the whole plot, but I can`t decide which parts are not needed, it`s unknown and variable.

  12. Hello LAVAs,

    I have a big table 25 Columns and about 800000 Raws and user can select which column(s) he want to plot. My plot VI is always the same, I configured it as reentrant and start it using Invoke Node. I did Dispose Ref as True and hope if one clone will be closed, than used memory will be deallokated.

    Thank you

  13. QUOTE (neB @ Jun 10 2008, 03:11 PM)

    Hi Eugen,

    You are trying hard so let me help out a little.

    In this link you will find my collection of "LabVIEW_Performance" tags. You will find a lot of postings by Greg McKaskle in that list since I am working my way through the forum chronologically.

    One of those links (this one) has been called teh "Clear as mud" thread but it illustrates what Aristos Queue was talking about.

    Ben

    Thank you Ben for links.

    So, let me explain my problem.

    I have to programm an application, which postprocess some data, so it shoulb be like MS Excel. My programm should read raw data from flash over 7 Slots x 15000 Pages x 60 Datasets (each dataset contains ca. 10 doubles as binary) and show this data in a table.

    I don't show all the data on one table, but show one of 7 Slots and it's enough to make my PC slower and eats some RAM. The problem is, that this data is not only duplicated, much more the problem is the table with data. Because I convert binary data to ASCII !

    It was the first part of the program. The second part should read the saved table convert it back to doubles (for plots) and make postprocessing. After poistprocessing I have to show the raw data and posprocessed data in one table. One row contains about 25 values! And this data is twice in RAM: doubles for plots and ASCII for the table.

    Not easy to handle this big dataset, so it's realy necessary to reduce the memory usage.

  14. QUOTE (Aristos Queue @ Jun 10 2008, 02:32 AM)

    Pass it through the conpane. LabVIEW will not make a copy just because you pass it to a subVI. As long as you are passing data using wires, you only have to worry about a copy being made if you fork the wire -- and LV will only sometimes make a copy then. If LV can avoid making the copy, it will do so. If you have a very large dataset, pass it into the subVI and then pass it back out again on the other side; don't fork the wire to pass to two different subVIs in parallel.

    Thank You

  15. QUOTE (jdunham @ Jun 10 2008, 12:07 AM)

    Ok, I see these rules are for Java, not for LabVIEW. But I would prefer in Java to programm modularely too. It can be good for beginners and small projects. If you have a big project you should, you have to make subvis or subfunctions online (during programming time) or you have one big function over 10-20 sites. And if you have it, than it is not to easy, to make some modules or subvis from it.

  16. QUOTE (jdunham @ Jun 10 2008, 12:07 AM)

    Sorry, I don`t agree to this rule.

  17. QUOTE (crelf @ Jun 9 2008, 11:17 PM)

    These are all great questions Eugen, but I'm interested in why you want to know - what are you up to? :ninja:

    I think you know it, I want to write my tutorial and have to know these things to be sure what I write.

  18. QUOTE (Yen @ Jun 9 2008, 09:56 PM)

    The wires on separate sides of the tunnel are not the same wire.

    So a tunnel will copy the data from one wire to other and is a node at all because of copy action ? Ok.

    Is a input or output of a subvi a node? Do it copy data? I think no, but I am not sure.

  19. What is the best possibility to get a big dataset from subvi to caller vi? Will this dataset be copied if I do it over connector pane?

    I think better way is not to collect this data in subvi and try to design the subvi as easy as possible, but if I do it than my caller vis block diagramm will be much bigger in pixels.

    Thanks, Eugen

×
×
  • Create New...

Important Information

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