03-23-2018 09:49 AM
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!
Solved! Go to Solution.
03-23-2018 10:00 AM
Help us to help you by attaching the VI you have written.
Bob Schor
03-23-2018 10:18 AM
This is the screenshot, do you need the vi?
03-23-2018 10:50 AM
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
03-23-2018 11:09 AM
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?
03-23-2018 11:54 AM
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?
03-26-2018 05:04 AM
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)