Aitor Solar Posted September 29, 2006 Report Share Posted September 29, 2006 Hi, people. I would be very grateful if you test this simple program and give me some feedback. Surely the technique is not revolutionary, but I find it useful as a proof of concept. Basically, same.vi gets an input and returns it in the output. So it does nothing, but it adapts to anything you connect to the input. Some instructions to make sure it works (let's hope!): 1) Re-compile all the VIs in the llb. If you get asked for Get Contorl From Type Descriptor.vi, it is usually located in your <LabVIEW directory>/project/_NewProbeWizard.llb. 2) Run relink.vi. 3) Now, drop same.vi in another block diagram and test different inputs. Caveats: a) I've checked it also works with customized controls, but it loses the type definition link. I'll work on that. b) To make it work in LV8+. you'll need the Get Contorl From Type Descriptor.vi from LV7.1, since the modern version has no type descriptor input. Strange. Saludos, Aitor Download File:post-1450-1159532049.llb Quote Link to comment
Aitor Solar Posted October 3, 2006 Author Report Share Posted October 3, 2006 Well, I guess it hasn't worked for anybody . Maybe in the future I'll come to an easier way of doing the same. Saludos, Aitor Quote Link to comment
Grampa_of_Oliva_n_Eden Posted October 3, 2006 Report Share Posted October 3, 2006 Well, I guess it hasn't worked for anybody . Maybe in the future I'll come to an easier way of doing the same.Saludos, Aitor Hi Aitor, I was very excited when I saw your initial post becuase I have wanted to do things like that many times. Unfortunatley my laptop disk crashed :headbang: and I have not managed to get any of my LV versions installed (silly nilm.exe is cloning itself and gobbling up all of my CPU, I digress ). So speaking for myself, your posting looks very interesting and I am planning to learn something from it as soon as I can. Ben Quote Link to comment
Aitor Solar Posted October 3, 2006 Author Report Share Posted October 3, 2006 So speaking for myself, your posting looks very interesting and I am planning to learn something from it as soon as I can. Oh, well, then I hope your computer get repaired fast I have now the LV8.x version, it wasn't that difficult. As previously, compile the whole llb and run relink.vi before using same.vi in a block diagram. LV8 version: Saludos, Aitor Download File:post-1450-1159886824.llb Quote Link to comment
PJM_labview Posted October 3, 2006 Report Share Posted October 3, 2006 Well, I guess it hasn't worked for anybody . Maybe in the future I'll come to an easier way of doing the same.Saludos, Aitor I download it, then I noticed some VIs (that I believe you made) were password protected. My interest pretty much dropped at that point. PJM Quote Link to comment
Aitor Solar Posted October 3, 2006 Author Report Share Posted October 3, 2006 I download it, then I noticed some VIs (that I believe you made) were password protected. My interest pretty much dropped at that point. Oh, I had to make them protected since I tested them in a shared computer. Password is "expreso". I'll put a non-protected version if you like. Saludos, Entro Quote Link to comment
crelf Posted October 3, 2006 Report Share Posted October 3, 2006 Oh, I had to make them protected since I tested them in a shared computer. Password is "expreso". I'll put a non-protected version if you like. I'd prefer it if you edited your original post and replaced the old one with the fully-open version Quote Link to comment
Aitor Solar Posted October 3, 2006 Author Report Share Posted October 3, 2006 I'd prefer it if you edited your original post and replaced the old one with the fully-open version Umm, I can't edit the first post. Is it possible? Sorry for the inconvenience. Somehow, I thought I was trustworthy . Saludos, Aitor Quote Link to comment
crelf Posted October 3, 2006 Report Share Posted October 3, 2006 Umm, I can't edit the first post. Is it possible?Sorry for the inconvenience. Somehow, I thought I was trustworthy . :laugh: Hmmm - maybe it's been there too long for you to be able to edit it? That's okay - just post the new version. Quote Link to comment
Dirk J. Posted October 3, 2006 Report Share Posted October 3, 2006 My interest pretty much dropped at that point.PJM Ah, yes, I remember this one. Quote Link to comment
Aitor Solar Posted October 3, 2006 Author Report Share Posted October 3, 2006 :laugh: Hmmm - maybe it's been there too long for you to be able to edit it? That's okay - just post the new version. There'll have to be tomorrow, I don't have LV here. If after all this fuss you don't tell me is a great idea, I won't post more code ever :laugh:. ... No, wait, it's not a joke . Saludos, Aitor Quote Link to comment
crelf Posted October 3, 2006 Report Share Posted October 3, 2006 If after all this fuss you don't tell me is a great idea, I won't post more code ever :laugh:. It's a great idea! Quote Link to comment
Aitor Solar Posted October 4, 2006 Author Report Share Posted October 4, 2006 LV8.2 version, non-protected Download File:post-1450-1159950912.llb 1) Copy adaptation_8_2.llb in a directory LabVIEW looks for files, like user.lib. 2) Compile all the llb files. Locate get contorl from type descriptor.vi in your LV installation directory. 3) Use same.vi in a block diagram, connect anything and double click. Saludos, Aitor Quote Link to comment
Norm Kirchner Posted October 4, 2006 Report Share Posted October 4, 2006 No dice Aitor. I see how you have it working, but I thing that there is some property that will allow you to link an input type to an output type which is what I think we were all expecting instead of an express implementation. Quote Link to comment
Aitor Solar Posted October 4, 2006 Author Report Share Posted October 4, 2006 Well, I don't know what you were expecting, nor I have promised anything other than a VI who adapts to the input type at develop time. Recently this issue was discussed and it was said a polymorphic VI would be the answer, but making a poly subVI for every possible input type is unaffordable. So you need a VI that, somehow, runs some code when a terminal is connected. That would be, of course, a XNode, but Xnodes are difficult to implement, specially in LV8+, and usually you don't need all the capabilities they offer, but just a way to change some code in that subVI. So I've come to what I thought it was a simpler way. It is, of course, an Express VI, where the configuration VI is used to change what you need of the original VI (by scripting) without a dialog. Is not a perfect solution, since it doesn't update automatically when you connect something (you have to double-click it), but I've found it surprisingly easy. LV passes the config VI all the references you need, from the subVI an its parent VI, to change them the way you like (be it really simple, like this example, or as complex as you could make it). And every instance works indepently, so you can use them in different VIs, or several times in the same VI, without fear. Not that I have presented it as a solution to anything, just a "Hey, I think this is nice, look if it works for you". No doubt a lot of people can make it better. But it's never late to learn, and for sure I have learned a lot from this thread for future participations. Saludos, Aitor Quote Link to comment
mike_spacex Posted October 25, 2006 Report Share Posted October 25, 2006 Hey fellas, check this out --- I added it to the code repository a while ago: XNode Wrapper Not only does the output conform to whatever datatype you wire to the type input, but the code actually DOES SOMETHING! The XNode will script a call to the VI with a similar name and type cast the output to the datatype specified. Email me with questions if you're confused. I'm still trying to refine the documentation. An example of how I use this: I have a program that requires some custom handshaking between server and client using Datasocket communcations. I input the URL and the datatype of the datasocket item I'm requesting. Then, the output conforms to the type I want so I don't have to use the 'Variant to Data' function every time I want to call it. This is handy-- its the same thing the DataSocket Read function, and many other LabVIEW functions do anyway, but now I can do the same thing with any of my own VI's. I'm eager to see the day when NI will release XNodes to us the way they have with XControls. But until then... this'll have to do. Quote Link to comment
Yair Posted October 25, 2006 Report Share Posted October 25, 2006 Hey fellas, check this out --- I added it to the code repository a while ago:XNode Wrapper Nice... :thumbup: I should definitely check that out. Quote Link to comment
Mike Ashe Posted October 25, 2006 Report Share Posted October 25, 2006 Hmmm, I can see maybe using the original express version at the start of the thread as a temporary way to make a wire label. Change the VI icon to be a short black wire with "label" instead of "same" and then use the caption as the wire label. Unfortunately we wtill have the problem that if we move the wire the VI stays in the same place until manually moved. Sigh, when are we getting real wire labels. Oopps .. almost forgot, Great Job ! to both Aitor and nrao ! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.