i2c Posted April 1, 2007 Report Share Posted April 1, 2007 Hi, I have built an ActiveX control to interact with my hardware, and intend on using labview to control with ActiveX control and my other instruments. Basically my ActiveX control allows me to scan a USB hub for all hardware attached and then be able to communicate with all the hardware, as I may have mroe than 1 set of my hardware attached that I have under test at any one time. I have a means to do this in a sequential fashion but i'd quite like to exploit Labviews parallel abilities and multithread the communications to the devices, so basically scan my USB hub for connected devices (I have this in my ActiveX control) and then depending on how many are attached make my VI create a "thread" or a "process" for each device attached and then run it... So essentially i will find N number of devices attached and then force my Labview VI to use the ActiveX control in a multithreaded way to talk to them all at the same time (i realise its not true parallel.) Any ideas? Im struggling a bit.... Thanks Quote Link to comment
alukindo Posted April 4, 2007 Report Share Posted April 4, 2007 i2c: I did a similar project recently where parallel processes were launched to control multiple PLC devices. As long as your ActiveX control can in fact be run in paralllel then you can call multiple instances of the same ActiveX wrapper VI, as long as you set that VI to be re-entrant. In this case that VI will be 'cloned' to run in as many instances as you want. If you want the VI to run with a front panel showing, then you will need to make the wrapper VI into a template VI (*.vit) and then launch the template VI as multiple instances. Launching VIs in this way will require you to use the VI Server technique. I am told that LabVIEW 8.X has a VI cloning method that may not require you to use the vi template approach: see this link: http://thinkinging.com/2007/03/29/reentrant-vi-clone-name/ Anthony L. Quote Link to comment
TG Posted April 6, 2007 Report Share Posted April 6, 2007 Anthony, I2c, Thank you both for sharing. This thread is very important to me too as I also need to make and manage several running processes at the same time in my application of hardware automation. I believe the same technique you (and Jim Kring) describe for launching clones can accomplish this. (am in process now of learning how to do it. I'll be using 8.2 and Jims new found use for named clone instance as u linked above /\) If Im not mistaken everything you said should just about cover it no? Any pitfalls to watch out for? Best Regards, John 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.