Jump to content

Ernest Galbrun

Members
  • Content Count

    20
  • Joined

  • Last visited

Community Reputation

0

About Ernest Galbrun

  • Rank
    Active
  1. Nevermind, got it. In my head. I think. There will be copies though, but who cares ? I don't.
  2. Thanks for the answer! (ans yes, I may have put some kind of references to the xControl's facade control inside my class vis This silver line thing is still a little bit harh though Since I haven't been able to recover anything from my xControl...) I will stick with the classes as data for my xControls, it feels good indeed. However, I still think I must have references to A in B's data member, because I will have instances of A in its xControl (since I want to have A's xControl in B's xControl) ?
  3. I'm aware that I answer a 1+ year old message, but I totally agree with that. I have basically learned programming with labVIEW, so I didn't know what a non-programming langage was (I also did quite a bit of c++, which is also a programming language). And back in 2008 I spoke with a PR guy from NI that told me labVIEW was kind of like Matlab. So when people asked me to write them nice programs in Matlab a couple years ago, I joyfuly accepted. That was when I understood what "not a programming language" is. In the end, the situation of LabVIEW is very odd : people who use it think it is not a programming langugage because they don't know what a programming language is ; and people who know also think it's not because NI told them so. Anyway, I know and at least I can thus feel vastly superior to the majority of other humans being, that's one positive point.
  4. Hello again dear labviewers. I come back to labVIEW after a couple of years doing painful things, and indeed labVIEW is great and fun (IMO). However I am a little bit rusty and I would really appreciate your insight on my project. So here is the thing : I have a class, let's call it class A. Associated with this class is a very fine Xcontrol (whose data is of type 'A') which permits interaction with the user. I have yet another class, that I will henceforth call class B. B has a handful of As in its private data member. For elegance sake, I would appreciate if it could own as many As as the Universe would permit, but practically it won't be more than 5. And I have another XControl for B allowing more sophisticated interraction with the user. And of course this interaction involves using A's xControl in the front panel of B's xControl. Here I have settled for a hard defined maximum number of A's xControl instances. I can't figure out what kind of architecture I should use there. My first attempts were failures, eventually leading to an irrecoverable crash of my project (I think it was due to some kind of circular reference), so I have a nice opportunity to start everything again from scratch. What should/could I put in B's private data member ? an array of As ? an array of references to As ? What should/could I use as my xControls data type ? The natural answer is the same type as the class I wish to assaciate it with, but somehow I wonder if it can work in this case ? And most importantly : How do I connect the As that are instanciated in B's xControl with the As that are owned by B in B's xControl data ? thanks, Ernest Galbrun.
  5. Hello, I would like to use a PXI-5404 signal generator (I am generating sine waves 10 to 100 MHz) to actuate piezoelectic device. Given the output impedance of the generator, I would need to add an impedance adaptation device to have enough power, can anyone tell me if they know a device (NI or third party) that would do the trick ?
  6. Putting it in the template folder doesn't work. Changig the default xctl would suit me well, although I can't manage to change the control data types in the vis, do you know why/how to override this lock ? Every XControl has an object as its data type, I guess that is why the class is locked when the Xcontrol is locked. What I do not understand is why eveerything is locked by default when I open a project, and I am wondering if there is any way (key shortcut, anything) to unlock everything at once ?
  7. Better late than sorry, I have started using Xcontrols a few weeks ago, and there are two thing that keep annoying me about these, I'm wondering if I could do anything about it (and a third bonus question whose answer I'm affraid I already know) : 1. Can I make template XControl to add the utility methods I keep implementing ? 2. When I open my project, everything is locked (classes and Xcontrol) and I have to manually unlock every single XControl before I can edit any class. Is there a way to achieve this faster, or to avoid it altogether ? 3, bonus question. Since I have some methods that I implement in every XControl I make, I would like to be able to call them without specifically knowing what class my XControl belongs to. Ideally, I would make a parent XControl class that my XControl would inherit from, but I dont think I can do that. Is there some way (tricky or not) I could achieve my goal ?
  8. The functionality I would enjoy in LVOOP are multiple inheritance, and the possibility to have protected data members.
  9. QUOTE (Cat @ May 6 2009, 02:32 PM) Is it ? If I properly understood what was told by Aristos, accessing members of a class necessarily duplicates them in memory (since there is an unbundle/bundle sequence) unless I use the Place Element Structure ? So that would solve the problem I had in the first place, since the sub-vis would then only necessitate a little bit of memory. This is the fix I was looking for, since what I made didn't prevent data to be copied, although there was no need to duplicate the large datasets. Also, this explains why I only saw this using LVClass, since I usually don't encapsulate large datasets in clusters. Concernig the other issue, what I understand is that Labview never deallocate memory unless I ask it to ?
  10. QUOTE (Aristos Queue @ May 2 2009, 04:40 PM) First of all, sorry for my long silence, I have broken my clavicle last sunday and they wouldn't tell me their wifi access code in the hospital. Anyway, I must have misunderstood the help section about memory management : "vi memory" is not "front panel memory" from what I understand, and it is front panel memory that is automatically freed when the vi is left ? To answer your question, I have not checked if the behavior is the same when not using LVclasses, I just figured that it was probably linked since it seemed blatantly wrong to me, no fork ir I have no local variable, no fork or anything. An object goes it, I unbundle, take the array, multiply by a scalar constant (for example), and rebundle, et voilà, 20 MB used that I will never get back. The workaround I mentionned is indeed the use of the vi http://zone.ni.com/reference/en-XX/help/371361B-01/glang/request_dealloc/' target="_blank">request deallocation which just seems wrong to me for such simple task in an environment that handles memory automatically.
  11. Hello, I would like to have some insight about a memory management issue I encountered recently : I am using LVclass to make some treatment on a data set. The data is constituted of a 2D SGL array whose size may be a few millions of elements. I have been quite surprised to see that, every time I called a method of the said class, the corresponding vi remains in memory. The only way I could found to free the memory was to do it manually. However, I don't understand why it is not done automatically. This memory issue is true for every method I end up using in my program, even the simplest one (multiply the array by a scalar constant).
  12. QUOTE (mross @ Dec 18 2008, 08:49 PM) I want to generate custom signals (sine, triangle, etc.) with a frequency varying from 10 to 200 Hz.
  13. QUOTE (mross @ Dec 18 2008, 08:39 PM) I want the duty cycle of my counter signal (which ticks a 50 000 Hz) to change every 200µsec. Or every ms at the least.
  14. QUOTE (Neville D @ Dec 18 2008, 07:14 PM) Yes, in fact I was hoping for the existence of an integrated device using such a chip, but I will probably end up making the electronic circuit myself.
×
×
  • Create New...

Important Information

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