Jump to content

Ernest Galbrun

Members
  • Posts

    20
  • Joined

  • Last visited

Everything posted by Ernest Galbrun

  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.
  15. QUOTE (mross @ Dec 18 2008, 06:17 PM) I run Labview 8.6, with a multifunction DAQ PCI-6229, on windows XP. QUOTE (mross @ Dec 18 2008, 06:17 PM) You actually say "modify" the duty cycle faster than 1ms. I don't really understand that comment. If you were producing a frequency of 1KHz then changing it faster than 1ms would be shorter than the actual PWM cycle itself. When you change the duty cycle do you want to to stop in the middle of a cycle or what exactly? If you need faster changes and can plan it out you can use my method and create an exact profile to follow. I wasn't resolving the time less that 1 second, but I am sure it could be done much more quickly than I did it. At some point you would need to use counters on a fast counter board or implenet a hardware solution as mentioned by another. If you pre-program the steps and changes you may be able to avoid the limitations of windows because it is compiled and running on the DAQ board. I can't conceive of a normal use of PWM that requires deterministic control of the pulse train. Perhaps if you explain why you think this is necessary we can figure out a way to produce what you need. I haven't been very clear about my need. The PWM I am generating is set at 50 kHz. The waveform I want to imprint on this PWM is defined with a precision of 200 µs (5 kHz). Since I am using non-RT labview and don't plan on changing that, I had resigned on having a precision of 1 kHz. Maybe the use of the property node (that is the main difference in your vi comparing to the one I am using where I use Daqmx - write to set the duty cycle) is very fast, I will try it.
  16. QUOTE (mross @ Dec 17 2008, 07:18 PM) Thank you for the tip ! However, this seems to rather confirm what I was affraid of, that the duty cycle can not be modified very fast (ie <1 ms). I will try to use this method though, and see how fast I can go. I will keep you informed. In the meantime if anyone know if there is some hardware solution to my problem, I would be glad to look in that direction too. I am looking for an analog/PWM or digital/PWM converter, but couldn't find it anywhere...
  17. Hello, I am currently stuck with a problem : I am reconfiguring a test bench using labview. This bench sends various excitation signals to a target. These signals are presently generated through an analog output, and I am in charge of adding the possibility to do it through a PWM (pulse width modulation) output. Now, I have implemented a standard example of PWM, and i works fine, except that it is far too slow. My signal is specified at 5000 Hz, and it takes around 80 ms to change the duty cycles. Can anyone tell me if there is a solution, software or hardware, to improve the duty cycle modification rate ? (Since I dont use Labvew RT, I would be glad with a 1kHz rate.) Here is the example I pasted from NI website :
  18. Ernest Galbrun

    Hello

    Hi there, I just asked my first question on this amazing forum, and I was thinking that doing some kind of socialisation would be a good way to increase my chances in getting answer. So, here I am, I am a 25 year old labview developper, I live in Grenoble, France, with my wife and two little boys that the aforementionned wife pretends to be my offspring. I learned to use labview at school, and havent done much programming since. I used to be a phd student, but started joining real life six months ago, and I am now in charge of several project where some knowledge in efficient labview programming could be useful. Since there is no veteran in my company (for the moment we are a total of four employees, including the two bosses), I rely on helpful people roaming the internet to help me in my task. Since you rock, all of you, I am sure you will be much helpful and I praise you in advance for the amazing tip you are about to provide me with. Now, please stop lurking the recreation part of the forum, and go have some serious reading.
  19. Hello, I am new to the forum, and I would like to ask a question about the task I am assigned to manage with Labview. Please forgive me in advance for my bad english and my even worse skill in labview programmation. I have a motion device (2 axes, driven with a NI 7342 motion control card) and an acquisition device (USB, serie M) from which I intend to measure analog voltages. The motion device drives the measurement cell, and I dont want to stop the move for every measurement position : I would like to achieve a continuous scan of the area as fast as possible for my motion device, trigerring the acquisition every time I reach the measurement grid points. I am currently wondering how best I must do to synchronize acquisition with control. I think I could use the breakpoint of the motion control card to trigger the acquisition. But I cant figure how I can tell if this is necessary or not. I imagine the synchronzation can be done effectively with the software, without the need to draw this additional wire, but I dont know precisely how it must be done to be effective (the best I can figure is to read the position as often as I can, and trigger the acquisition when the goal is reached). So, here are my two main questions : - What is the best way to synchronize motion with acquisition without using hardware synchronization tools ? - How do I know wether I must use hardware synchronization or wether software synchronization will give me good enough results ?
×
×
  • Create New...

Important Information

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