Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Stepper motor continuous running

Hi All,

 

  I am currently trying to control a stepper motor using LabVIEW. I find that I have become stuck when trying to implement a continuous run (event case) mode. This is triggered when a switch on the front panel is set to "continuous run". Instead of obliging however, LabVIEW throws out a continuous error indicating that the channels are already in use (they are not as far as I am aware) and should be reserved (which I thought I had already done).

 

I have attached the code as I am sure I am doing something silly and too zoned in to see it Smiley Frustrated

 

Any help is greatly appreciated.

 

Best wishes,

 

Rammah

 

PS: My apologies for the weird titles.

0 Kudos
Message 1 of 5
(6,511 Views)

Hi Rammah,

 

I have had a look at your code. One question I do have is the use of the IsTaskDone.vi in the loop you are using. When I tried to load this up, the issue I got was that this is a DAQmx Base vi. Could you please try and replace this with the vi from the DAQmx pallete?

 

This is a long shot but will at least put us on a level playing fied.

 

We can have a look further after that.

 

Cheers

 

Liam

Liam A.
National Instruments
Applications Engineer
0 Kudos
Message 2 of 5
(6,496 Views)

Hi Liam,

 

  Firstly - my apologies for the delayed response, slightly side-tracked on a different project.

Secondly - thank you for taking the time to look into this.

 

I have changed the vi to its DAQmx pallete equiv., it hasn't quite solved the problem for me. I have reposted with your suggestion.

 

Best,

 

Rammah

0 Kudos
Message 3 of 5
(6,456 Views)

Hi Rammah,

 

I have taken a look at your code and decided to try to recode some of it to change the overall architecture of your program. I think if you run this version it will be easier to ascertain where the source of the error is and how you can debug it further. I decided to take your events structure and place it in a separate loop so that it can pass simple state commands to a consumer loop performing the code. This is generally advised as performing lots of code in an event structure can lead to front panel locking and other problems in execution.

 

Download this version and give it a try and see if this helps you understand where the problem is in your code. In its current state it is too difficult to debug.

 

I hope this helps you.

 

Kind Regards,


Larry Colvin
Associate Principal Engineer
Dyson Technology Ltd.

0 Kudos
Message 4 of 5
(6,327 Views)

Thanks Larry... I will look into it.

0 Kudos
Message 5 of 5
(6,284 Views)