05-18-2016 01:10 PM
Hi,
I am trying to create a LabVIEW program that will control two bipolar stepper motors to create a raster scan. I am using Labview 2012 SP1 along with a usb 6008 and DAQmx. I have gotten the motors to move in one direction but when I try and get them to move in another direction in a seperate task, I get an error code -200088 stating that my task is invalid. This occurs at the start task vi to move the x motor in the opposite direction.
The logic behind the program is as follows:
1. Move the x motor a number of steps to the right
2. Move the y motor a number of steps down
3. Move the x motor the same number of steps as 1 to the left
4. Move the y motor the same number of steps as 2 down
5. Repeat
I can get steps 1 and 2 working but I get problems with step 3. I am using a stacked sequence to show the task for each step.
I would greatly appricate any advice on this matter as it is part of a final year project
Thank you,
Aoife
Solved! Go to Solution.
05-18-2016 02:40 PM
You can solve this pretty simply. Move all the calls to DAQmx Start to happen *before* the sequence structure rather than inside it. Similarly,
move all the calls to DAQmx Stop and DAQmx Clear to happen *after* the sequence structure rather than inside it.
I would sequence the DAQmx Write calls to write the direction bit *before* writing the clock bit. And I would highly recommend you wire
up your error ins and outs so you can be informed of any errors in the DAQmx tasks.
-Kevin P
05-19-2016 05:11 AM
Thank you so much!
I placed my start tasks out of the sequence structure and my VI worked. My end and clear blocks were placed outside but they don't implement until the whole squence strutcure ends but it doesn't matter.
I really appriciate it
Aoife