LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sequence task error in DAQmx to create raster scan with 2 stepper motors:Error Code 200088

Solved!
Go to solution

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

0 Kudos
Message 1 of 3
(2,660 Views)
Solution
Accepted by topic author aoifemonahan

 

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

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
Message 2 of 3
(2,645 Views)

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

0 Kudos
Message 3 of 3
(2,624 Views)