Jump to content

Maite

Members
  • Posts

    23
  • Joined

  • Last visited

Everything posted by Maite

  1. You are rigth, I was bad-mannered, Thanks both of you, for show me the way.
  2. It worked perfectly. Thanks a lot ShaunR !!
  3. http://dl.dropbox.com/u/17940236/Cilindro%201%2C15nm_10 http://dl.dropbox.com/u/17940236/ImageFile Here you have two examples of diferent image files, ImageFile is the one of the screens I post before, and it has 1.76859 Z amplitude, and the second one has a 23 Z amplitude. I don't know exactly the minimun and maximun possible because I am not the one who generates the source file it comes from an external company and they don't say anything about it in the format specifications. I do not know if have a look into this files will be helpfull.
  4. I check it twice, I think is ok both things. I atach the code and the images I get, as you can see it is visible an image in binary mode in the Imaq display ctl, but is too poor and I just realized that is rotated!!
  5. Yes, I tried all the different inputs, and also apply to the data a Lookup table, but I haven't got a reasonable image.I would say the values are between 0 and 255, I wanted to upload the ASCII file but I'm not allowed to upload that kind of file to the forum. It has a header and after it the Image information, I have a SubVi which extracts the image information only.
  6. Sorry If I didn't use the proper words, english is not my mother tongue. You are right guessing my intentions. I have an ASCII file comming from an atomic force microscope which represents an image which is now displayed in an intensity graph, I would like to show it in an Image display.ctl, in order to use the ROI tools to select specific zones that in the intensity graph you can only use the area among two cursors. I have tried yet ArrayToImaq.vi but it displays a black image or if I change the palette to binari I'm able to see the main shapes of the image in red but too unfocused. Thanks.
  7. Thanks I read about mutation, I think It won't be a problem in my case
  8. Hi !! I would like to cast a intensity graph data type to a Image display.ctl. I am adding some funcionality to an old program, and it would be really usefull have the ROI tools that it control offers, but the ascii file I have as source contains an intensity graph data tpe, and I am not able to cenvert it. I read about Lookup tables, but I don't know which parameters should I use, also tried the predefined ones, without success. I can see something in "Binary" mode, but too bad. Do you know how can I cast these types? Thanks in advance!
  9. So, if I create a class which ObjectAtributtes are typedefs (clusters), I will have problems with this class?? I just done that!
  10. When you say 1 2 3 ... and 3 0.01 6 0.08 Do you mean that in the index 3 of the first array do you want to place the index 3 of the second one. Or for the value 3 of the first array you want to place the index 3 of the second??
  11. Thanks!! i will release it in each vi.
  12. Hi! I may ask a stupid task, but what do you thing about the following idea. I have one main UI with three subpanel, two are always the same, and one is changing dinamically. I want to manage the shutdown event in that way: 1. Main UI fires the shutdown event and wait a notification from the two subpanel. 2. The two subpanel vis, recieve the event and close the hardware connections, send a notification to the MainUI.vi 3. Main UI recieves the notifications and continue its execution to shutdown. I attach three screens, to show you how i implemented the notification comunication. Couple of questions. -Is it neccesary "create" first the notifier in the vi which will send the notification or is the same which vi creates it? -As I want to comunicate among two different vi's , I implement inside each an "obtain Notifier" should I destroy this reference in both? Or destroying once is enough? THANKS AGAIN!!
  13. Thanks Aristos for your reply! As you wrote I'm using singletone as a class which can only create an instance. Your tip is a good one, I will keep in mind for the future. I just finished solving the problem, you and Ulf were rigth, I changed the "creation" of the objects to a vi that is only released with the exit of the app, and it works fine. Thanks again guys, you gave me the key
  14. Sorry, I will be glad to offer you some code, but the project is huge and hardware dependent, as you say I should create a small project to show you the problem, but I'm running out of time, so I would try to move the creator of the objects and see if it works fine first. Thanks both of you, I will let you know my progress.
  15. Hi!! I'm new using LabView and I'm a bit lost with its behaviour sometimes! I developed an application based on pluggins, due to I have different modules of functionality which don't need to be executed at the same time,all the pluggins are singletone classes. Also, I did a Main UI with a subpanel to manage the pluggins. Each pluggin has a Main vi which is loaded in the subpanel. At the begining of the executing the app, the Main UI config the pluggins, registering the events they need, assingning the mains vi references to them, its names... So a singletone instance of each pluggin is created. To load/unload a vi, the steps I follow are: First stop (sending an event to stop the vi and waiting for the idle state or aborting it) unload it from the subpanel, and run the indicated vi and loading it after in the subpanel. Well, the first vi loaded in my application allows to create objects (simple Goop pattern) which are stored in another singletone class (acceding straight to its attributes due to is a singletone object i don't need more wires) which is also another plugging, and usually is the second funcionallity executed, but if I "stop" before unload the first vi these objects are lost, I can see the rigth references, but after unloading this vi from the subpanel Labview cannot find these objects anymore. I have inserted a breakpoint to the "destroy" and CleanUp vis but it is not being executed. So they are not being deleted by hand. Do you have any idea why it is happening? It will be so bad if I don't "stop" the main vi's and just load / unload them to the subpanel? Thanks in advance.
  16. Yeah! I've seen the documents and examples. Actually it was the one IU pluggin explained in decibel (https://decibel.ni.com/content/groups/large-labview-application-development/blog/2011/05/08/an-approach-to-managing-plugins-in-a-labview-application) the one which I used to learn how to handle pluggins. The problem became when I tryed to melt it with the singletone pattern in the pluggins. Thanks for all, I will let you know my next steps
  17. Thanks a lot, I didn't know how to access the parent atributes. I have a couple more questions... I don't know If i am wrong, but it seems like you cannot inherit methods from the parent class, for explame in the child in the code you send me it is reimplemented the vi GetLog, when is basiclly the same vi tha is already done in the father. I guess it is caused by the lack of input objects to the singletone vis. So in my case, create a singletone generic vi may not be the proper arquitecture, because i am avoiding recode some vi's. Or I'm thinking, for instance, for the LoadPanel is a vi that just take the main Vi and load it into a subpanel, instead call the parent loadpanel vi, I should call a specific LoadPanel.vi but inside it I can call the parent one in order to reuse code. What do you think? Other aproach would be make the genericPluggin GOOP Single Class and use the parent vis. As I said these vis would need a input with the object whici is calling the vi (if there is another way, please let me know). To mange that we could wire a "class constant" when we use the parent vi's, to indicate which child we want to call, and inside the child vi get the proper Instance, and the neccesary atributes. To avoid calling the GetInstance method out of the singletone class as I did. for instance in the LoadPanel.vi in the main.vi in the "Acquisition state" there will be a call to the LoadParent.vi with an "acquisitionPLugginClass" constant like input, inside "LoadPanel" it will use this constant to know which child is and which methods has to call among the children ones. But sounds me like a "trick"... I'm not sure which one to chose... Which aproach do you thin is the best one? Thanks for you help
  18. THANKS! I will have a look to it rigth now!
  19. Can anyone explain to me how singleton inheritance works? I mean if there is one parent and two childrend all singletone classes, how can one of the child access the parent atributes ?? thanks a lot!
  20. Hi everyone! I am new in the comunity, so this is my first post! I would like to ask you about singletone pattern used with inherintace. I implemented a framework based on pluggins, in which there is a GeneralPluggin with common attributes and five child pluggins that adds some funcionality and its own attributes. I realized that these pluggins coorespond to the singleton pattern so I used the Goop tool to create them in this way. Due to they inherit from a not singletone class (and also a Labview normal class, not goop class) to use the parent vis I made public the "Get_Instance" vi despite I knew it was wrong, in order to give the generic pluggin vis the input value that it needs. The problem with it is that the program, sometimes, creates some instances with the same reference, but ones are filled with the correct data and the other are empty. To solve this issue I'm trying to redo the Genericpluggin class in the singletone pattern and inherit from it again. But I have some questions, how can the child classes access to the parent atributes ? And how can they know which class is the proper child class which is calling the paret funcionality if there is not " class reference In " in the vi, as it is singleton.... I mean without wiring them anything to specify the type... For instance, I have in the parent class an atribute called name, and to different pluging which inherit from this one, one is called acquisition, and the other one tracking, If I drag the parent vi "GetName" which does not recieve an input specifying the class type and inside this Vi it calls to the parent "GetInstance" to have access to its attributes how LabView know if I asking for "Tracking" or for "Acquisition" atributte?? Or in a normal class you wire the child class calling a parent vi method, and as you wire the class in, it knows which child function should call but in this case... I'm a bit confused!!! I saw in other thread in this forum a possible solution, inherit from a normal class and make the children singleton should work. I could try to make the GenericPlugin with goop (after it is done by LabView normal class) which I think it will work better. But I have the same doubts... How can I call the children instances? Implementing a "Must Override" method "GetInstance" and calling this method inside the funcional father Vi...? THANKS IN ADVANCE!!!!
×
×
  • Create New...

Important Information

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