Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Positioning system using stepper motor and implicit rotary encoder for feedback

Hi all

 

I am a mechanical engineer who has been tasked with automating a probe positioning system within a wind tunnel. The mechanical part of the system have been designed however I am struggling with the programming aspect of the project. I’m using a stepper motor (http://uk.rs-online.com/web/p/stepper-motors/3403727/) to drive the system, and using gearing to ensure that I can get the 0.1degree accuracy required. This will be monitored using feedback from a rotary encoder (http://uk.farnell.com/avago-technologies/aedb-9140-a13/encoder-3channel-500cpr-8mm/dp/1161087) which should mechanically give one pulse (signaling 0.1degrees) for every 3 steps completed. 

An NI PCI -7334 motion controller is installed on the PC, I am using a geckodrive and I will be programming with Labview 2012.

Any help you guys could give me would be greatly appreciated, I have very little electrical/programming experience and this has been driving me up the wall for weeks!

 

Cheers

0 Kudos
Message 1 of 6
(8,386 Views)

Hi bdoust,

 

Welcome to the NI Discussion Forums, apologies for the delay in reply but I have been trying to work out if there are any examples in particular that would benefit you.

 

Could you tell me if there is any specific part of the programming you are having trouble with? What have you been able to accomplish so far? Let me know and I should be able to point you in the right direction.

Regards,

Ben Clark
0 Kudos
Message 2 of 6
(8,336 Views)

Hi, no worries cheers for the reply! 

 
 

I've managed to get movement to my desired location using NI motion, but my lecturer has requested that I use an incremental optical encoder for feedback, so that for every 2 steps a pulse would be registered or else the program would cease. 

To achieve this I have written a program from scratch with all the limitations in place that I believe (from what I've read online) should generate the appropriate signals to the stepper motor, and count the steps, though at this point the encoder feedback is not included as the encoder has yet to arrive.  

My hardware arrived at the beginning of this week and after being set up I have managed to get movement using the NI motion method, but nothing has happened with my pulse creation method. The pulse generation method runs in labview without errors when tested, so I believe the issue im having is with the output to the hardware. I have attached my VI bellow (sorry if its a little hard to follow) but im unsure as to why this isnt working! 

 
 

Cheers 

 
 

Ben  

 

0 Kudos
Message 3 of 6
(8,324 Views)

Hi Ben,

 

The code is quite easy to follow but I wouldn't be able to tell yet if these are the appropriate values for your system.

 

The reason why you were receiving no errors is because the error wires were not being used by any function so are essentially ignored (I was able to continue running the code without a motor control unit installed!), I've attached an edited version of your code with error handling which will stop your code from running and it will report any errors that occur, hopefully this will tell you what you need to do to resolve the problem, if not let me know and we can try to work through the VI to catch something not so obvious out.

Regards,

Ben Clark
0 Kudos
Message 4 of 6
(8,312 Views)

Sorry for late reply have been away from the department over the easter break, having now returned i will see if this error code helps point out where im going wrong! I have been thinking about the problem and am concerned that i am not initiating the motor, could this be why the motor is not responding? 

 

Cheers

 

Ben 

0 Kudos
Message 5 of 6
(8,128 Views)

Hi Ben,

 

 

Sorry for the delay in reply. Did you recieve errors when you ran the code? I realise that I missed out an initialisation on the shift regester in this code so you'll want to create a error constant connected to the start of the register so that any found errors do not get stored. Could you explain what you meant by initiating the motor?

Regards,

Ben Clark
0 Kudos
Message 6 of 6
(8,075 Views)