LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Step motor control with a time delay

Solved!
Go to solution

Hi all,

 

I am trying to control a step motor to move in vertical direction by Labview2010. The specific Labview function blocks are created by the manufacturer of the step motor. Now the axis can move up/down properly but my question is that I want it to move with a time interval. For example, we set the desired position to 10mm and waiting time 1s. When I click on the start button once only the axis moves 1mm and wait 1s. Then axis moves another 1mm and wait 1s. This action will obviously repeat 10 times until the axis reaches 10mm position.

 

I will be very thankful if someone could give me some hints.

 

 

Best regards,

Nicky

0 Kudos
Message 1 of 4
(2,905 Views)
Solution
Accepted by topic author Nicky87

Hello!

 

If I understood you right, this might help you. It's created in LV2010

 

Note that you should put in some logic before running the forloop, since 0mm travel and 0mm resolution is not a good thing to run. 

Regards,
Even
_________________________________
Certified LabVIEW Associate Developer

Automated Test Developer
Topro AS
Norway
Message 2 of 4
(2,902 Views)

Thanks Even. That's exactly what I meant.

0 Kudos
Message 3 of 4
(2,895 Views)

You're welcomeSmiley Happy

 

You should some more to the code so that it's more reliable. There might be some miscalculation between the travel distance and the resolution, i.e. 5mm travel and 2mm resolution will give the forloop 2,5. This should be either 2 or 3. I'm not quite sure how the for loop handles this. I think it will round to nearest. You should anyways check it out. Also avoid using 0mm.

 

Good look with your projectSmiley Happy 

Regards,
Even
_________________________________
Certified LabVIEW Associate Developer

Automated Test Developer
Topro AS
Norway
0 Kudos
Message 4 of 4
(2,887 Views)