Hi mikep & alida,
Steps 9 & 10 should work (they work here in the lab for me). Dynamic Position does not use the encoder input to determine where it is, it remembers, instead, the positions you have told it to move to and keeps up with the number of pulses it outputs.
Perhaps you have the CTRIO Output configured wrong, or wired wrong. Or perhaps you hit the Reset (e.g. C201) between moves. If you toggle C201 (Reset) ON between moves, this will reset the CTRIO to position "zero" and it won't remember the previous move.
These outputs, if configured for Pulse (Step/Dir), mean that Output0 will always just output pulses regardless of direction. However, this also means Output1 is the Direction bit. Thus:
If Dynamic Position Parameter3 (V2030-2031) = 5000, and Goto Position bit (C241) is toggled ON, then:
- Output0 --> Outputs 5000 pulses
- Output1 --> Remains OFF
After execution of the above, the CTRIO "knows" it is at position 5000 and the motor should've moved in a particular direction.
If then Dynamic Position Parameter3 (V2030-2031) = 2000, and Goto Position bit (C241) is toggled ON, then:
- Output0 --> Outputs 3000 more pulses (has now output a total of 5000 + 3000 = 8000 pulses)
- Output1 --> Turns ON (reverse direction)
After execution of the above, the CTRIO "knows" it is at position 2000 and the motor should've moved in the opposite direction.
The key above is having a motor drive that utilizes Pulse/Direction. If the drive properly understands this then this will work just fine (like it does for me here in the lab).
If, however, you have the CTRIO Outputs configured for Pulse (CW/CCW), this means Output0 will output pulses for one direction, and Output1 will output pulses for the other direction. Thus:
If Dynamic Position Parameter3 (V2030-2031) = 5000, and Goto Position bit (C241) is toggled ON, then:
- Output0 --> Outputs 5000 pulses
- Output1 --> Remains OFF
After execution of the above, the CTRIO "knows" it is at position 5000 and the motor should've moved in a particular direction.
If then Dynamic Position Parameter3 (V2030-2031) = 2000, and Goto Position bit (C241) is toggled ON, then:
- Output0 --> Remains OFF
- Output1 --> Outputs 3000 pulses
After execution of the above, the CTRIO "knows" it is at position 2000 and the motor should've moved in the opposite direction.
Again, the encoder that you may have wired to the input of the CTRIO has no bearing on the CTRIO Outputs when using Dynamic Positioning.
Direction is determined in different ways, depending on the CTRIO function you are using. A good summary is here in this FAQ:
http://www.hosteng.com/FAQFiles/CTRIO.htm#FAQ0048 Hope this helps!