From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

stepper motor case structure

Hey everyone

I am currently a physics student and for my final year project I am building a mini CT scanner which involves the use of two stepper motors. I currently have a program working which controlls the motors but i am having difficulty in reversing the rotation. Unlike conventional CT scanners, I must rotate the sample. Would anyone be able to help me figure out how to automatically change the case structure form true to false in order to reverse the stepper motor and without stopping the program.

Many thanks

John

0 Kudos
Message 1 of 4
(2,315 Views)

You need to move your boolean control to be inside of the loop.  As of right now, that control is only read once before the loop.  By moving it inside, you can read it every iteration.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 4
(2,306 Views)

thanks for the reply. Yes the rotation can now be changed when the program is running but i need help with automatically changing the motor orientation e.g after a certain time interval

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

From this point, it is just a matter of figuring out what logic you want to be in place of that control.

 

You can go by the number of iterations and switch if you go beyond a certain count.  You could go by your rotations completed.  It is just a simple comparison.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 4
(2,293 Views)