Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

activex control of stepper motor

Solved!
Go to solution
I have a Softmark USB stepper controller that uses an activex ocx. I have the basic Labview control that is provided by Softmark (Softmark.vi). I would likt to add more control to the activex as shown by (step80.vi) but I am not sure of my interfacing with the ActiveX. Any help would be appreciated.
Download All
0 Kudos
Message 1 of 9
(6,508 Views)

Hey Satmandoo-

 

Are you able to control your motor using the example provided by Softmark? In your example, what sort of problems are you seeing. Judging by your code, I think your biggest obstacle is not the ActiveX, but the way in which your send commands to the device. For example, you have an array of two zeros that you are indexing to send a command to the ActiveX invoke node. I am not quite sure why you have the array there, but it seems like you would be more interested in sending the data you are using to index the array to the invoke node. I think as it is, regardless of what number you wish to send to the invoke node, I think you are sending a zero; which might correlate to zero steps and hence no movement regardless of any user inputs.

 

Also, you have a while loop inside of your for loop. The way this is going work is you are going to send one move command to your device, and then you are going to sit in the while loop until hit start/stop. Then you will go to the next iteration of the for loop and repeat this performance. This may be what you intended, but it seems a little out of place.

 

So, I think your first issues is what numeric you are actually sending to the invoke node, and the second issue I see is the while loop within the for loop.

 

Hope this helps.

 

-Ben

Message Edited by BCho on 05-04-2009 11:18 AM
Hope this helps.
-Ben

WaterlooLabs
0 Kudos
Message 2 of 9
(6,471 Views)
I can control the stepper with the Softmark vi. I want to control 2 motors at the same time, at different speeds and directions. Eventually I would like to make the second motor proportional to the first. (ie: motor 1=395 steps to motor 2 =1 step) then motor 2 takes 10 steps forward (proportional) then 9 steps back and repeat. I am a complete newbie at this and am trying to take a diagram I found (http://etidweb.tamu.edu/projects/labview/stepper/diagram.jpg) and interface it withe Softmark activex. and then double it to control 2 motors. Maybe then I can figure out the proportional problem. This will control a toroid winding machine when completed.
0 Kudos
Message 3 of 9
(6,454 Views)

Hey satmandoo-

 

It is difficult to really know how this Softmark.vi is working, especially without the actual hardware. Perhaps a brief description of the performance you are seeing from the Softmark.vi would be helpful. From the looks of it, the vi simply moves a single step either forward or backward depending on which switch is depressed. Without a while loop, this vi seems a little rough. Are you running the code in continuous mode?

 

As for the block diagram that you are using, it too seems like an interesting way to implement stepper control. I would say, because you have a working code with the third party block diagram, use it as a starting point to add the functionality you are looking for.

 

Hope this helps.

 

-Ben

Hope this helps.
-Ben

WaterlooLabs
0 Kudos
Message 4 of 9
(6,435 Views)
Thanks Ben. The problem is that the softmark software only shows the control of one stepper and the controller controls 3. I need to at least control 2 to make my project work. I just don't know how to make activex pick between outputs in order to control 2 motors. Can you show me how to make the Softmark vi control multiple motors. The exe file that comes with the controller controls all 3 but doesn't have the code or the funtionality I need. Thanks again.
0 Kudos
Message 5 of 9
(6,414 Views)

Hey Satmandoo,

 

Unfortunately, I do not have any experience with this particular USB motion controller. However, I have done a little digging and found these: USB Stepper Motor Controller. Does that look familiar? In regards to controlling your motor, it looks like you are simply calling an ActiveX control and sending it certain values that the ActiveX control then knows how to handle. Unfortunately, this ActiveX control is not a common windows ActiveX control and is something that would have been installed when you installed the software for your usb motion controller. Unfortunately, I do not have this ActiveX control so I can not see the methods and properties that are available to you. However, the website I pointed out before seems to suggest that there is source code that controls all three motors (at least at a basic level). Perhaps looking trough the software shipped with your controller or contacting the company that you got the controller from will allow you to get this software.

 

I would suggest looking through the methods available to you with your ActiveX control by left-clicking on the ActiveX invoke node and browsing. You could also see if there are any properties available by putting down an ActiveX property node and wiring the USB refum to it. There might be a property or method that allows you select a particular motor.

 

In regards to adding more control to your code. I would think the easies way to add functionality would be to add a while loop around your entire code. This would allow you to do repeated moves. However, in regards to providing examples as to how to control all three of your motors with your usb controller, this is a matter of what ActiveX properties you have available and then how you use them. I do not have the ActiveX control, so I would not be able to provide any more detailed examples on how to control your exact motion controller.

 

Perhaps contacting the motion controller manufacturer would help or posting more information on the exact device you are working with would help.

 

Hope this helps.

 

-Ben

Message Edited by BCho on 05-07-2009 10:52 AM
Hope this helps.
-Ben

WaterlooLabs
0 Kudos
Message 6 of 9
(6,393 Views)
I have just bought this softmark controller but I can't open the softmark.vi because it work only with labview 8.6. Do you have the version for Labview 8.2? Thanks a lot
0 Kudos
Message 7 of 9
(6,246 Views)

Hey GIGIO76,

 

The VI that was shipped with your motion controller (and linked above) was written and is owned by the makers of that softmark controller. However, I was able to open the linked VI above and save it to in LabVIEW 8.2.

 

Hope this helps.

 

-Ben

Message Edited by BCho on 05-28-2009 05:47 PM
Hope this helps.
-Ben

WaterlooLabs
0 Kudos
Message 8 of 9
(6,230 Views)
Solution
Accepted by topic author Satmandoo
I have purchased a Phidgets 4 stepper controller (~$60) and with a little help from LabVIEW's seminar trainer, I have set it up to do exactly what I needed. The speed is a little slow (383 half steps per second) but it is pretty accurate and the software is easy to work with in LabVIEW.
0 Kudos
Message 9 of 9
(6,218 Views)