Jump to content

Stepper motor direction


Recommended Posts

I'm using the USB 6008 to control a stepper motor.

I can control the motor to move Clock wise or counter clockwise, my problem is that i can't get the motor to change direction without stopping the motor, switching direction, and then running the program again.

My code is quite simple, I use a case structure to call either a CW.VI or CCW.VI, which controls the actual movement of the motor in that direction.

Suggestions?

post-26901-0-78315800-1327245292.png

Link to comment

Hi

I think you problem is more hardware than software. A close read of the stepper motor manual may well be in order with regard to the rate at which the motor can change from running full speed in one direction to full speed in the other, bearing in mind this will be effected by the system being driven and it's innertia and this may well be the real problem.

It may well be that the soloution is to slow the moter before changing direction. Rather than stopping it completely .

Hope this helps.

Link to comment

Ok so instead of switching directions at full speed, it now de-energizes the motor completely before switching direction.

I think I'm misunderstanding how the case statement works, according to the new VI, what should be happening in my mind is the toggle it set to a direction, the 1st frame calls a VI that deenergizes the motor, the 2nd frame then calls a VI which runs the motor in a given direction.

Now, when the toggle is switched, the case should change and deenergize the motor, then call the VI to run it in the other direction, but I still have to stop the program, toggle the switch, then rerun it.

Does the case statement indeed work this way and my error is somewhere else?

post-26901-0-81639500-1327306972_thumb.p

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.