Jump to content

Using activeX control in Parallel


Recommended Posts

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

Link to comment

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.

Link to comment

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

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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