LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Stepper Motor Data Input from Dialog Box

Solved!
Go to solution

I am trying to build a program to run some stepper motors. In the beginning I want users to be able to input e.g. the speed of the motor. I managed to create a first and a second dialog box but I cannot get the data that the user have imput, to change the value of the frequency of the motor.

 

 

I'd be glad if you can help. tsaki.... tsan!

0 Kudos
Message 1 of 7
(2,897 Views)

Help us to help you by attaching the VI you have written.

 

Bob Schor

0 Kudos
Message 2 of 7
(2,894 Views)

This is the screenshot, do you need the vi?

0 Kudos
Message 3 of 7
(2,882 Views)

To repeat myself, "Help us to help you by attaching the VI you have written".  If I were asking your help for a 1000-line Matlab routine, you wouldn't want me to send you a picture of the code, but rather the code, right?

 

However, even with the picture (which is tiny, hard to read, etc.), there's a question -- what is the nature of your Stepper Motor?  Do you communicate with a controller over a serial line?  Do you send "commands" as Text strings?  Alternatively, are there analog or digital inputs to the Motor (say, a voltage to make it turn a certain speed, or a TTL input that is High for Clockwise or Low for Counterclockwise)?  From what I can (barely) see in your picture, you might be mixing Serial and other data types on the same Task line ...

 

Can tell a lot more from the VI itself ...

 

Bob Schor

0 Kudos
Message 4 of 7
(2,870 Views)

I am communicating to my stepper which is a nema13 1A 24Volts with arduino. I control the speed by varying the frequency and the direction by sending a single character.

 

The problem is that I want the frequency to be controlled by an input of a prompt dialog box. Is that possible?

 

I don't have currently access to the vi sorry. Is it possible tho?

0 Kudos
Message 5 of 7
(2,862 Views)
Solution
Accepted by topic author tsakitsan

I do have some questions.  What are you expecting as the float output of your LEADSCREW Pitch?  You have that output wired and entering a loop then going to a [U32]Control???  What is the purpose of the Knob [DBL] control?

  • First, that pitch value is never going to change within the loop
  • The Frequency (Hz) [U32] control should become a float indicator
  • The Frequency (Hz) indicator then should be removed from the loop
  • Not sure about the purpose of the Knob [DBL] control within the loop - remove
Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
Message 6 of 7
(2,859 Views)

Changed the frequency control to indicator, removed from while loop and connected it with the dialog box! Worked!

 

Last question. Even though I can control the direction and speed of the motor I cannot control the steps it will do.

I remember on LIFA there was StepsToMove function? 

How can I specify the exact steps? Which block should I use?

 

(accepted as solution+kudos given)

0 Kudos
Message 7 of 7
(2,832 Views)