LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview using a stepper motor

Could really do with some help I am a 4th year student doing my final year project. The project has a conveyor belt which is driven by a stepper motor, along the conveyor belt there is 5 sensor I want to be able to stop the motor at theses sensors for a certain time and then restart. I have attached the program I have come up with but I have one slight problem the motor will not reactivate without the sensor been made again is there any way around this.

 

Any help would be greatly appreciated.

 

Regards

 

Billy

0 Kudos
Message 1 of 5
(2,347 Views)

Hello,

 

Your problem is not clear for me. Can you explain it more clearly ?

 

Another question : how do you start/stop the motor ? (is it the square wave signal generated in your VI ?)

 

In any cases, your architecture does not seem to be really suitable. As far as I understand you need, I think that a simple "state machine" architecture will be more relevant (you will need to look for information on NI website...there are many tutorials showing that).

0 Kudos
Message 2 of 5
(2,339 Views)

your* need

0 Kudos
Message 3 of 5
(2,338 Views)

Sorry I for got to say/show a start button for the motor. The program does work till the sensor is broken then the motor stops which is correct using time delay but unless the sensor is made again the the motor never restarts.What I want to be able to do is the motor runs to this sensor then the motor stops for a certain time and then continues even if the sensor is never remade

0 Kudos
Message 4 of 5
(2,318 Views)

Hi Bilbo,

 

The case structures in your code go 'True' when the voltage values you are acquiring is greater than / equal to 0.5 V (this is how dynamic data type behaves when converted to boolean). I don't know what sensors you are using and also I could not see a stop command being sent to your motor anywhere in the code.  It is worth considering the state machine architecture as mentioned in the previous reply. you can find a white paper telling more about the state machine  here:

http://digital.ni.com/public.nsf/allkb/5CD79190713D2B558625765F007FCC99

 

If you have to rely on voltage values to detect whether your sensor is activated or not, you will have to continuously monitor your sensors in one state (sensor monitor state) of your state machine and based on the value decide whether you need to move to 'sensor activated'/ sensor deactivated' state. In these states you need to take the appropriate action on your motor (i.e. turn off (in sensor activated state) and turn on (in sensor deactivated state)) and return to your 'sensor monitor' state to monitor your sensor. This will be more clear once you read the article and understand the state machine architecture and how to implement it in LabVIEW.

 

I hope that helps.

 

Thanks and Regards,

Thanks and Regards,
Supreeth.K

0 Kudos
Message 5 of 5
(2,259 Views)