Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

controlling three stepper motors

hiii

 

   i am using RS232.....

   i want to ask you can i control three stepper motors with a single code.... and how should i connect  the three RS232 with a single pc to get its input from my LabVIEW code....

i have written my code for a single stepper motor ...will the three stepper motors be got the same data.???

 

 

 

thanks

do not hesitate to give kudosSmiley Happy
0 Kudos
Message 1 of 9
(4,560 Views)

Sahil,

 

RS232 is not a bus but a peer to peer connection. If you want to communicate to three devices through RS232 your PC must provide three RS232 ports. PCI boards or USB devices are common ways to add RS232 ports to your PC.

 

Kind regards,

Jochen Klier

National Instruments

0 Kudos
Message 2 of 9
(4,559 Views)

hiii jochen

    you are right that my pc must have three RS232 ports..but i want to ask you that can a pc may have 3 RS232  ports..that is ...can a windows based pc be installed with 3 RS232??

 

also the other question is that if i use 3 RS232...can i control 3 Stepper motors with a single code(which controlls only one stepper motor ) by just defining the ports??

 

also the third question is :can i make the ActiveX of a software in labview??

 

 

thanks

thanks

do not hesitate to give kudosSmiley Happy
0 Kudos
Message 3 of 9
(4,537 Views)

Windows can address up to 255 RS232 ports, so 3 ports is entirely possible. From the LabVIEW point of view all you need to change is the resource name to switch between serial ports. So if you use three identical devices connected to three RS232 ports you can use the same code for all three devices. If you want to use all motors at the same time I would recommend to create reentrant subvis from your exisiting code with inputs for the resource name, so you can select the port for each subvi.

 

To answer your last question: You can't create an OCX from a LabVIEW vi, but you can use the LabVIEW ActiveX automation interface to communicate to LabVIEW or to an executable built with LabVIEW through ActiveX. E. g. you can read and write the front panel elements through the ActiveX interface from another application (Click here for more details).

 

Jochen

0 Kudos
Message 4 of 9
(4,534 Views)

hii jochen

 

thanks ..i have got all my answers...i have got what i actually want...

the last answer:i think ActiveX can be formed by not only ocx files but with exe and dll files also...

and i think we can form exe files using labview(by using create project method)..can this be  used to form activex??

actually i want to make the activex for a application ( say paint) then what will you suggest me to do????

 

 

can you please tell me about reentrant vis??

thanks

do not hesitate to give kudosSmiley Happy
0 Kudos
Message 5 of 9
(4,527 Views)

 


sahil wrote:

 

 

the last answer:i think ActiveX can be formed by not only ocx files but with exe and dll files also...

and i think we can form exe files using labview(by using create project method)..can this be  used to form activex??


You think that absolutely correct sahil but it is on the manufacturer of the software whether to make the software Activex enabled or not. And also, you are talkin about .exe and .dll. So let me tell you, that this part also depends upon the manufacturer whether to include that in a .ocx file, .exe or .dll.

 

Coming to your next part, you are telling that you think that exe can be formed in labVIEW. So dear friend, you think this part right too. You can make a .exe of the VIs  you make in labVIEW. But if you think that you can make an exe of an already existing exe, then you think wrong!!!! 

Somil Gautam
Think Weird
0 Kudos
Message 6 of 9
(4,500 Views)

Just to clarify this: LabVIEW and in LabVIEW generated executables provide an ActiveX automation interface if you enable it in the preferences. For the EXE this setting is kept in the appropriate INI file. What you can't do with LabVIEW is creating an ActiveX object, that you can embed in an ActiveX container in another application.

 

Jochen

Message Edited by Jochen on 11-11-2009 09:02 AM
0 Kudos
Message 7 of 9
(4,492 Views)

hiii

 

 


What you can't do with LabVIEW is creating an ActiveX object, that you can embed in an ActiveX container in another application.

that means we can not make activeX for any software which is not activeX controlled..

then how can we call an application which is not activeX enabled ....

thanks

thanks

do not hesitate to give kudosSmiley Happy
0 Kudos
Message 8 of 9
(4,473 Views)

Hey sahil.

 

Look at this. This will show you the requirements for developing an activex control and an activex container

Somil Gautam
Think Weird
0 Kudos
Message 9 of 9
(4,471 Views)