-
Posts
432 -
Joined
-
Last visited
Content Type
Profiles
Forums
Downloads
Gallery
Posts posted by Eugen Graf
-
-
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) containingAction-Enum.ctl(typedef)VariantYes, 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.
-
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
-
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.
-
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.
-
Hello LAVAs!
I get following error and don't know how to. Please help!
Thank you, Eugen
-
I know there is no one right answer.
Ok, I will ask you on the other way.
Which software design pattern you prefer for which kind of applications?
Please look this list:
http://en.wikipedia.org/wiki/Design_patter...uter_science%29
Than you all for answers, Eugen
-
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.
-
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 .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.
-
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?
-
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
-
Hello, this Question in not easy, but:
which programm architecture do you use in your projects if you use very much parallel loops, which communicates with syncronisation tools (Queues, Notifiers, User Events and so on)?
Thank you, Eugen
-
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.
-
Amerikanisatiton !!! I see it in this movie.
Can be thistwo frends are Iran and Iraq ?
-
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
-
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.
-
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
-
Yes, I use LV 8.5
Yes, my table will be updates only ONCE.
Do I realy need FGV ?
Can anybody say me if anything can be replaced to reduce memory usage?
Here some screens.
-
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.
-
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
-
QUOTE (jdunham @ Jun 10 2008, 12:07 AM)
1. That's what wires are for, so use them! Putting data out on the connector pane does not necessarily make a copy.2. The http://www.cs.cmu.edu/%7Ejch/java/rules.html' rel='nofollow' target="_blank">first rule of optimization is: Don't do it!
Your computer uses the same amount of electricity (in general) whether or not your code is efficient.
From the above link:
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.
-
QUOTE (jdunham @ Jun 10 2008, 12:07 AM)
1. That's what wires are for, so use them! Putting data out on the connector pane does not necessarily make a copy.2. The http://www.cs.cmu.edu/%7Ejch/java/rules.html' rel='nofollow' target="_blank">first rule of optimization is: Don't do it!
Your computer uses the same amount of electricity (in general) whether or not your code is efficient.
From the above link:
Sorry, I don`t agree to this rule.
-
-
-
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
Variant vs. Binary String
in Application Design & Architecture
Posted
QUOTE (jdunham @ Jun 13 2008, 11:50 PM)
I am exatly on this pint now:
http://forums.lavag.org/Can-t-find-Type-De...ion-t11161.html