Troubleshooting
Stepper Open Loop Invalid Resource ID Error Causes
Short answer
Error -7006 is not caused by running a stepper axis in open loop. The motion call received an invalid axis number or other resource ID. Keep the encoderless axis in open loop, fix the resource identifier wired into the failing call, and compare it with the resource the successful outbound move used.

On this page
Error -7006 is not caused by running your stepper axis in open loop. The message text says what happened: the motion call at Read Trajectory status.flx received an invalid axis number or another invalid resource ID, such as a vector space, encoder, or I/O port identifier. Your open-loop switch fixed the erratic motion and exposed a second, unrelated problem: somewhere on the rewind path, the program hands the motion function a resource value the controller does not recognize. Keep the axis in open loop, then trace the resource identifier wired into the failing call and compare it with the resource the successful outbound move used.
What the error does and does not mean #
For FlexMotion hardware, this error family reports a resource-selection problem: an invalid axis number, or an invalid identifier for another resource type the function accepts. It does not report motor trouble, drive trouble, or a consequence of open-loop operation. Two identifiers that both appear as plain numbers in LabVIEW are not interchangeable: an axis identifier, an encoder identifier, a vector space identifier, and an I/O port identifier are different resource types, and a motion function accepts only the type its help specifies.
The rewind failure appearing only after you changed loop mode points to the return branch, not the mode. The outbound move worked; the status read or the rewind command that precedes it did not. If your error-heading text and your reproduced message show different numbers such as -70006 and -7006, record the exact value from the error cluster before searching documentation; they are different codes in the same family, and the tracing method below applies to both.
Why open loop was the right change #
An encoderless stepper axis belongs in open loop. In closed-loop stepper mode, the controller uses encoder feedback to generate the velocity profile and to relate commanded steps to measured movement. That control needs a working encoder signal and correct scaling: the encoder counts per revolution and the command steps per revolution must both match the hardware. With no encoder installed, the loop has nothing to close on, and the erratic repeated moves you saw under an interactive test in the configuration tool are the expected symptom.
If you later retrofit feedback, the conversion is a configuration change plus scaling work, covered in converting an open loop stepper to closed loop control. Until then, do not change the mode back to fix the error; changing the mode will not repair an invalid identifier passed by the application.
The Primary Feedback selection you asked about deserves review, but it is not the cure for -7006. Set it to match the installed hardware (no encoder here), and separate two questions: which feedback the operating mode consumes, and which resource value a LabVIEW call actually receives. An inactive feedback field and an invalid function input are different faults.
Symptoms and what each one decides #
- Error at the status read, after a successful outbound move. The status call or the rewind command before it receives a bad resource value. Deciding check: inspect the resource input wired into the failing call, not the motor.
- Erratic, repeated moves under closed-loop stepper mode. The feedback loop has no valid encoder or wrong scaling. Deciding check: confirm whether an encoder exists; if not, keep open loop.
- Normal interactive motion after switching to open loop. The interactive configuration and the physical axis agree. Deciding check: compare the axis selected in your interactive test with the resource value the application passes.
- Failure only at rewind. The return branch uses different wiring or constants than the outbound move. Deciding check: diff the two branches, looking for an uninitialized or default value that exists only on the return path.
Tracing the resource through the return branch #
Work this in order; each step is cheaper than the next.
- Capture the error code, the failing operation name, and the incoming error cluster at Read Trajectory status.flx. Establish whether this call generates the error or merely passes one through from an earlier operation.
- Open the function help for that call and confirm which resource type it accepts: an axis number, an encoder number, a vector space, or an I/O port.
- Trace that input backward through the rewind branch: constants, controls, case structure selections, subVI inputs, and values stored between test stages.
- Compare the value at the failing call with the resource the successful outbound move used and with the axis selected in your interactive configuration tool. A mismatch there is the fault.
- Look for leftover encoder or vector-space operations that assume closed-loop operation. Open-loop mode does not make every encoder-dependent call valid for an encoderless axis.
- Run a minimal test: one axis selected by constant, a short move, then the status read. Add the rewind calculation and the rest of the application logic back only after the minimal sequence passes.
- Log the operation name, the resource value, and the error cluster together, so a successful move followed by a failed status query stays distinguishable from a failed move command.
Position truth on an encoderless axis #
In open loop, the controller tracks the position represented by commanded pulses and receives no confirmation the shaft completed each increment. A mechanical overload, an obstruction, or excessive acceleration can leave the physical table short of the commanded position with no error raised; the same axis can lose position silently after a stall, as covered in whether a stepper motor is damaged after losing steps. So treat the commanded step position and the measured table position as two separate quantities. The controller readback gives you the first; an independent reference gives you the second, and that independent reading is what decides whether your rewind actually reached tolerance.
Worked example of the distinction, for illustration: say the command scaling is 20000 command pulses for one table revolution, the axis is commanded 90000 pulses outbound and then 90000 back, and the drive stalls partway through the return. The controller readback shows 0 commanded net displacement, which is correct arithmetic: 90000 minus 90000 equals 0. An independent dial indicator on the table shows 3 degrees of residual rotation, which is 3 divided by 360, or 0.0083 of a revolution; multiplied by 20000 pulses per revolution that is about 167 pulses of unexecuted command. The readback and the indicator disagree because open loop cannot see the stall. That disagreement is a position problem, never an invalid-resource error, and the two must not be conflated when you debug.
Configuration to record before you change anything #
Before editing anything, write down the existing settings: loop mode, feedback selection, motion scaling (command pulses per revolution and, if feedback existed, encoder counts per revolution), and the drive settings that set command pulses. Restoring a known baseline matters if several people touch the program. The scaling arithmetic for pulse counts is the same discipline used in the pulse scaling calculation article on this site; the values themselves come from your drive and encoder datasheets, not from any universal figure.
One further documented fix belongs on your list if the error appears across configurations that you have verified correct: the NI-Motion readme for the 6.1.x series states that upgrading the motion controller firmware to version 6.1.2 or later corrects certain errors. Check your installed driver and firmware revision against that readme before concluding the fault is in your wiring of the resource input.
The decision #
For this installation: keep the axis configured as an open-loop stepper, because the motor has no encoder and open loop produced correct motion. Change the Primary Feedback selection to match the absent encoder rather than leaving it set to Encoder. Then fix -7006 where it lives: in the rewind branch of the LabVIEW program, at the resource input of the failing call. Trace that value, compare it with the resource the outbound move used, and eliminate any uninitialized return-path default. If the code persists across a verified-correct resource input, check the firmware revision against the vendor readme. Position accuracy is a separate measurement, taken at the table, not at the controller.
One safety note: an encoderless axis that stalls gives no electrical indication that the table is still rotating, so treat any commanded rewind as a live move and keep hands and tools clear of the rotary table during every test, including the minimal ones.
Questions asked
Should Primary Feedback stay set to Encoder on an axis with no encoder?
Change that selection to match the hardware actually installed. An axis without an encoder cannot deliver encoder feedback, so leave the open-loop stepper mode in place and set the feedback selection to none or to whatever non-encoder option your controller configuration tool offers. A feedback field left pointing at an encoder that does not exist will not itself generate the invalid-resource error, but it invites encoder-dependent calls later that can.
Why did the motor move erratically in closed-loop stepper mode?
Closed-loop stepper control uses the encoder counts per revolution and the command steps per revolution to build the velocity profile and to relate commanded steps to measured motion. When the motor has no encoder, or when those two numbers are wrong for the installed parts, the axis repeats or garbles moves. An encoderless axis belongs in open loop, with scaling entered only where feedback genuinely exists.
Are error -7006 and -70006 the same fault?
No. They are different numeric codes in the same family: both point at a resource-selection problem, but you should record the exact number from the error cluster before searching documentation. The diagnostic method is the same either way: identify which call produced it and check the axis or resource identifier wired into that call against the one the working part of the program used.
Can open-loop operation hide a lost-position problem on a stepper?
Yes. In open loop the controller counts commanded steps and never confirms the shaft followed them. A stall from overload or obstruction produces a difference between commanded position and physical table position with no error raised. That is a separate issue from an invalid-resource error, and it is why an encoderless axis needs an independent position reference for the final table position.
