Application Note:QCI-AN060
Date: 28 March 2016

QuickSilver Controls, Inc.
www.QuickSilverControls.com

CiA® 402-CANopen Drives and Motion Control Profile
Included FilesCiA 402 Initialization.qcp
Unit 17 - Remote Configure 16.qcp

Overview
CiA® 402 refers to CAN in Automation (CiA) CANopen® Drives and Motion Control Profile402. The defining documents are available from http://www.can-cia.org/ (See their respective
trademarks.)
Note: The latest specification 302v3 (proposal) contains a significant number of options. The
specification (proposal) is also dynamic as additional features are added by various membersof the Special Interest Group (SIG).
This Application Note describes QuickSilver Controls implementation of the CiA 402
specification. The 402 operation is implemented by downloading a special initialization andoperational code into the SilverDust unit. The minimum code revision is 44-1x. Many of theobjects are directly mapped in the firmware, while other objects are mapped to “user” registers
and evaluated by the 402 initialization program.
CANopen® and CiA® are registered community trade marks of CAN in Automation e.V.

Implementation
CiA 402 is implemented in several layers by many different state machines. CiA 402 also
depends upon other specifications (i.e. CiA 301 regarding the CANopen communications).
The Network Management NMT, Communications protocols, Communications profile, andObject Dictionary portions are all implemented in hardware/firmware. The Power Drive System(PDS) finite state automation (FSA), which is the state machine governing power sequencingof the driver, is implemented in the special 402 initialization code. The Homing Mode (hm) andProfile Position Mode (pp) options are implemented.
For this implementation, the various user registers should not be accessed directly (Objects
21xxh), (reading is permissible). Normal interaction should be done using the CiA 402 objects.

Factory options
Several factory options have been implemented:
Status Word 6041h bit 14 high indicates homing completed and ready for other motions.
Homing routines have additional hard stop homing modes. See Homing section.
An encoder following mode has been added via Modes of operation mode –1. See Encoder
Following.

Property of QuickSilver Controls, Inc.
Page 1 of 50
This document is subject to change without notice.
QuickControl® and QCI® are Registered Trademarks of QuickSilver Controls, Inc.
SilverLode™, SilverNugget™, SilverDust™, PVIA™, QuickSilver Controls™, and AntiHunt™ are trademarks of
QuickSilver Controls, Inc..

Application Note:QCI-AN060

QuickSilver Controls, Inc.

User Options in the code
Main Init and User Customization [0] holds all of the options the user normally should
configure.
Line 9: Identity – sets both the Serial Interface ID. This same value is automatically used to set
the CAN ID on line 22.
Lines 11,13,15,17: Configures the serial interface
Line 20 sets the CAN baud rate.
Line 25 allows the default TPDOs to be enabled or disabled. A system using SDOs for verified
communications would not need (or want) the TPDOs active. A value of 0 leaves them
deactivated, a value of 1 is default and activates them.
Line 27 allows the unit to power up automatically to “Operation Enabled” without going throughthe normal startup sequence. 402 standard operation should have this disabled (0)Lines 30, 32, 34, 36 configure the brake function. If not brake is present, Brake IO Bit number(line 36) to 0 and the brake function will be disabled; if the brake is to be used, select the IO
that will be used (i.e. setting this register to 7 will use IO7). The brake activate time is the delay
to allow the brake to go to the locked state before the drive is disabled . The brake releasetime is the time needed for the brake to allow free rotation after the drive has been enabled
and before any motion is allowed. IO direction to release brake: The IO bit selected will be set
to the selected state (0 = low, 1=high) to cause the driver to release the brake. If used with acontroller with 24v IO, normally a low (0) would be used to energize the brake, releasing clutch
and allowing free rotation. If using your own driver from IO1-IO7, a resistor should be used topull the IO to the brake-locked polarity until the unit has had time to become energized. IO 4, 5,
6, and 7 have only a 200k internal pull-up resistor internally, so a 4.7k resistor to either +5v or
0v (your brake-locked level) should suffice. NOTE: as the brake bit is user configurable, it is
not reflected in the brake bit of the IO word. The user must avoid writing to the IO bit being
used for the brake! The IO configuration word may be set to mask this bit so that it can not be
overwritten via the IO word. See CANopen manual, object 60Feh.
Lines 39-46 – Do not modify. These disable the motor prior to configuration.
Lines 51 and 53 are normally left AUTO to select the appropriate voltage for the motor when
the unit is configured.
Lines 58 and 60 are used to tune the motor controller to the load. The default normally works
from open shaft to about a 5:1 inertial mismatch. See tuning application note for details.
Line 63 sets the motor direction corresponding to a positive motion. CW is the default andrefers to CW direction with the shaft facing you.
Line 65 and 67 sets the anti-hunt constants to allow the motor not to dither when stopped.
They may be set to 0 to disable the anti-hunt. See command reference manual for moredetails.
QuickSilver Controls, Inc.

Page 2 of 50

Application Note:QCI-AN060

QuickSilver Controls, Inc.

Line 69 sets the S-curve factor. This is used only in some of the homing moves, and not for thenormal motions. Normally 0.
Lines 72, 74, and 76 configure the negative limit switch, the positive limit switch and the home
switch, respectively. The limit switches need to be disabled (as shown) if not present toprevent a Fault upon entering “Operation Enabled” due to the detection of an “outside limits”
condition. If disabled, these three switches default to IO1, IO2, and IO3, active high. See
CANopen manual object 2004 for configuration to other IO.
Line 78 – leave enabled for standard 402 with these parameters configured via CAN. Disable
to allow the various parameters to be configured.
Lines 79-118 configure the various motion parameters and response for faults if line 78 isdisabled. See CANopen manual for details.
Line 123 sets the maximum error allowed before indicating motion error.
Line 128 sets the default digital filter for all digital inputs on the IO channels.

BasicsThe drive device is controlled primarily by the use of the Control Word and Target Values, withfault and status feedback provided via the Status Word.
The PDS FSA state machine controls the sequencing of power to the drive, and access todrive motion. It also provides the ability to react to faults and to disable the drive if so needed.
The various configuration registers are normally configured using SDO operations. The status
and command word operations are often set and read using PDO communications, but canalso be managed using SDO operations. PDO operation can “be in the background”, but are
not confirmed, and can also use up significant amounts of bus time if there are many units allreporting their positions continuously while moving. The SDO method allows control of bus
activity as the vast majority of packets are the SDO commands and their responses.
Line 25 (above) should be set to disable the PDO operations if they are not being used, so as
to minimize bus traffic. The choice of operation is a system level decision.

QuickSilver Controls, Inc.

Page 3 of 50

QuickSilver Controls, Inc.

Application Note:QCI-AN060

Control Word and Status Word – System State Machine
Object 6040h is used to request state transitions while Object 6041h reflects the current stateof the State Machine. The boxed names represent States, while the numbered arrows
represent Transitions. The numbered states (#) are the internal states used in theimplementation. In each case, the state reflected by Object 6041h is updated when thetransition has been completed. Fault Reaction Active is the exception in that the fault is
immediately reported when the fault is detected, while the fault reaction is still underway; when
the reaction is completed, the state then automatically transitions to Fault.

State Machine Transition Diagram
Drive
DisabledFault
13Start (0)Fault Reaction

0

14

Not Ready to
Switch On (1)Fault (8)Active (7)1
Switch On
Disabled (2)

2

15

7
12

Ready to Switch
On (3)

9

3

6
Drive
Active8
Switched On (4)

4

10

5

Operation
Enabled (5)1116Quick Stop
Active (6)Note (#) are internal states used
in QCI implementation
QuickSilver Controls, Inc.

Page 4 of 50

QuickSilver Controls, Inc.

Application Note:QCI-AN060

CAN Dictionary Object 6040h writes to the Control Word input (request) to the State Machine,
while Object 6041 displays the Status Word (actual State Machine state).
One set of bit fields in the Control Word is used to implement the commands to the PDS FSA
state machine, while others are dependent upon the operation mode (selected via Object
6060h Mode of Operation and displayed via 6061h Mode of Operation Display).
The rising edge of Bit 7 is used to reset a fault, while bits 3,2,1,0 of the Control Word are used
to request transitions from the current PDS FSA state to a new state. In state Operation
Enabled, Bit 8 halts a current motion, while the functions of Bits 9, 6, 5, and 4 are dependent
upon the current Mode of Operation. Bit 10 is reserved, while bits 15, 14, 13, 12 are“Manufacturer specific” – not currently used, but provided to allow additional functions may be
added to the code to take advantage of these.
Bit Definitions:
Bits 15..11 = Manufacturer specific (optional – may be implemented in user code)
Bits 10 = reserved
Bit 9 = Operation mode specific (vary according to mode selected)
Bit 8 = Halt
Bit 7 = Fault Reset
Bits 6..4 = Operation mode specific (vary according to mode selected)
Bit 3 = Enable Operation
Bit 2 = Quick Stop
Bit 1 = Enable Voltage
Bit 0 = Switch On

Control Word 6040h: “State Transition Commands” Bits
This table shows the encoding of the various PDS FSA operations. These operations cause
the state machine to make the various noted transitions.
Fault Enable Quick Enable Switch
Reset Oper. Stop VoltOn
OPERATION

Bit 7

Bit 3 Bit 2 Bit 1

Bit 0

Transitions"Shutdown""Switch On""Disable Voltage"

0
0
0

X
0
X

1
1
X

1
1
0

0
1
X

2,6,8
3 (switch on)
7,9,10,12 according to state"Quick Stop""Disable Operation"

0
0

X
0

0
1

1
1

X
1

7,10,11 according to state
5"Enable Operation"
0
1
1
1
1
3&4,4,16"Fault Reset"
Rising X
X
X
X
15
Note: “Enable Operation” from state “Ready to Switch on” will perform transitions 3 and 4 insuccession.

QuickSilver Controls, Inc.

Page 5 of 50

Application Note:QCI-AN060

QuickSilver Controls, Inc.

State Transition Events
Transition 0: Startup => Not Ready to Switch ON
Event: Reset - self-test/initialization – happens before CAN is configured. (Thistransition automatically occurs in initialization routine.)
Transition 1: Not Ready to Switch ON => Switch On Disabled
Event: Successful initialization - Activate Communication (This transition automaticallyoccurs in initialization routine.)
Transition 2: Switch On Disabled => Ready to Switch On
Event: "Shutdown" command received from hostTransition 3: Ready to Switch On => Switched On
Event: "Switch On" command received from host - switch on power section (ifapplicable), drive still disabled.
Transition 4: Switched On => Operation Enable
Event: "Enable Operation" command received from host. Enable the drive function.
Transition 5: Operation Enable => Switched On
Event: "Disable Operation" command received from host. Disable drive operation.
Affected by Objects 605Ch.
Transition 6: Switched On => Ready to Switch On
Event: "Shutdown" command received from host. Switch off power section (ifapplicable).
Transition 7: Ready to Switch On => Switch On Disabled
Event: "Quick Stop" or "Disable Voltage" command received from host. Transition states
Transition 8: Operation Enable => Ready to Switch On
Event: "Shutdown" command received from host. Switch off power section, motor free
to rotate. Affected by Objects 605Bh.
Transition 9: Operation Enable => Switch On Disabled
Event: "Disable Voltage command received from host. Switch off power section, motor
free to rotate.
Transition 10: Switched On => Switch On Disabled
Event: "Disable Voltage" and "Quick Stop" command received from host. Switch off
power section, motor free to rotate.
Transition 11: Operation Enable => Quick Stop Active
Event: "Quick Stop" command received from host - execute Quick Stop function. This
operation is affected by Object 605Ah.
Transition 12: Quick Stop Active => Switch On Disabled
QuickSilver Controls, Inc.

Page 6 of 50

Application Note:QCI-AN060

QuickSilver Controls, Inc.

Event: "Quick Stop" or "Disable Voltage" command received from host, turn off power
section. Disable the Drive and Drive Voltage (if applicable).
Transition 13: Any State => Fault Reaction Active
Event: A fault has been detected in the drive - react to the fault according to Objects
605Eh
Transition 14: Fault Reaction Active => Fault
Event: fault recovery completed - disable the drive, power may be switched off. Affectedby Objects 605Eh
Transition 15: Fault => Switch On Disabled
Event: "Fault Reset" command received from host - reset fault detect (if fault has
cleared), bit "Fault Reset" must be cleared by hostTransition 16: Quick Stop Active => Operation Enable
Event: "Enable Operation" command received from host (if quick-stop-option-code –Object 605Ah is 5,6,7 or 8 - enable the drive
NOTE: If a command is received which causes a change of state, this command must beprocessed completely and the new state attained before the next command can be processed.
NOTE: "Drive function disabled" means no energy can be supplied to the motor, reference
values (torque, velocity, position) may be processed, but no signal to the motor results. If the
Brake options has been configured, the brake is turned on, the brake enable delay elapses,
then the drive is disabled; the reverse process happens when the drive function is enabled: thedrive is first enabled, the brake is disabled, the brake disable delay is allowed to elapse, andthen motion is allowed.

QuickSilver Controls, Inc.

Page 7 of 50

Application Note:QCI-AN060

QuickSilver Controls, Inc.

Status Word 6041h
The PDS FSA State is reflected in Status Word (6041h):
Bit 15 = Manufacturer specific (opt)
Bit 14 = Manufacturer Specific (1=Home has completed, ok to use pp mode)
Bits 12..13 = Operation mode specific (opt)
Bits 11 = Internal limit active (position range exceeded, velocity limit, etc.)
Bit 10 = Target Reached (1=Axis motion done; the axis is stopped but not necessarily at target
if Halt active)
Bit 9 = Remote (1=listening to 6040h, 0 = operating as local master - will not respond to acommand written to 6040h)
Bit 8 = manufacturer specific (opt)
Bit 7 = Warning (opt)
Bit 6 = Switch On Disabled
Bit 5 = Quick Stop (0 = Drive is reacting to a Quick Stop request)
Bit 4 = Voltage Enabled (1 = enabled)
Bit 3 = Fault (1 = Fault)
Bit 2 = Operation Enabled (1=Enabled)
Bit 1 = Switched On (1=Switched On)
Bit 0 = Ready to Switch On (1=Ready to Switch on)
Again, bits in the Status Word may be grouped to aid understanding. Current State is reflectedin bits {6, 5, 3, 2, 1, 0}, with various combinations given names corresponding to the earlier
state diagram:
Bits
State
6 5 3 2 1 0
0 x 0 0 0 0 (1) Not Ready to Switch On
1 x 0 0 0 0 (2) Switch on Disabled
0 1 0 0 0 1 (3) Ready to Switch On
0 1 0 0 1 1 (4) Switched On
0 1 0 1 1 1 (5) Operation enabled
0 0 0 1 1 1 (6) Quick Stop Active
0 x 1 1 1 1 (7) Fault Reactive
0 x 1 0 0 0 (8) Fault

Description of States
Not Ready to Switch ON:
Driver “HV” Power Disabled - if there is a provision to switch drive power. Processor
power on, drive initialization in progress, BRAKE on in this state, if present
Switch On Disabled:
Driver “HV” Power Disabled - if there is a provision to switch drive power. Processor
power on, Initialization complete, drive parameters set up, drive disabled
QuickSilver Controls, Inc.

Page 8 of 50

Application Note:QCI-AN060

QuickSilver Controls, Inc.

Ready to Switch On
Ready to have High Voltage power applied.
Switched On
High Voltage enabled to driver, power amp ready, drive function disabled
Operation EnabledPower enabled to driver, no faults have been detected, drive function is enabled andthere is power to motor. The servo is active.
Quick Stop Active
Power enabled to driver, Quick stop function is being executed, drive function isenabled, and power is applied to motor.
Note: If quick stop option codes 0x605A value is set to 5 through 8, the drive willremain active an may be switched quickly to Operation Enabled; other options willcause the drive to be switched off and the state to transition to Switch On Disabled.
Fault Reaction Active
A fault has occurred in drive, quick stop being executed. Drive enabled and power are
applied to drive while reacting.
Fault
A fault has occurred, high voltage MAY be switched off, and drive function is disabled.

QuickSilver Controls, Inc.

Page 9 of 50

Application Note:QCI-AN060

QuickSilver Controls, Inc.

Power up Sequencing
Note: an example of the power up sequencing is provided in “Unit 17 - Remote Configure
16.qcp – also see CiA 402 Initialization section below for flow diagrams.
1) At power up/reset the state machine first reports a Transitions to “Switch on Disabled”
once the CANopen communications are operating. This state is only entered from a
power up / hard reset and indicates the drive needs to be configured.
2) The Master configures/reconfigures PDO configuration objects if the default
configuration is not as needed.
3) The Master configures the various reaction options, default velocities, etc.
4) The master sets the slave NMT state to operational. (This is needed before going into
PDS FSA state “Operation Enabled” to avoid a communications fault.)5) The Master sends operation “Shutdown” to exit state “Switch on Disabled”. Thisacknowledges that the master has completed any configuration needed following a
power up / reset of the drive.
6) The drive transitions to state “Ready to Switch On”
7) The Master sends operation “Switch On” (optionally the master may send operation“Enable operation”, which will perform both Switch On and “Enable operation
functions”).
8) The drive will transition to state “Switched On”
9) The master sends operation “Enable operation” (if it did not already send it in step 7)10) The drive will verify drive enable and power are present and enable the drive. If this is
the first enabling since power up, the drive will perform a commutation alignment “startup wiggle”. Servo operation is enabled. Operational fault detection is enabled to verify
that heartbeat is active and NMT state is “operational”. The drive will monitor object
6060h Mode of Operation to determine what motions are asked of the drive.
11) The master must home the drive before performing any motions. Homing is needed to
set any motion limits as well as to determine the reference position for motion.
a. Master configures homing speeds and accelerations and offset, as well as
maximum velocities and accelerations / decelerations (if not previously set) –See Objects Implemented for Details.
b. Master selects homing method via object 6098h (if not previously set)c. Master selects mode hm (6 = homing mode) via object 6060h
d. Slave responds with mode hm (6) via object 6061h. Status Word bits 12 (HomeFound and 13 (Homing error) are cleared.
e. Master activated homing mode by setting Control Word bit 4 (Start Homing).
Note: Control Word Bit 8 (Halt) must be low. A high will cause the homing to stop;bringing it low again will cause the homing to restart.
f. When the homing starts, the drive clears Status Word bit 10 (Target reached) toindicate motion is active.
g. If the zero point is located in the homing motion, the drive sets Status Word bit 12(Home found), followed by Status Word bit 10 (Target Reached) when the motion
completes. If an error is encountered, then the drive sets Status Word bit 13(Homing Error), followed by Status Word bit 10 (Target Reached) when the
motion stops. Manufacturer specific Status Word bit 14 (Homing Completed) isalso set, indicating the drive is ready to accept other motion commands. The end
QuickSilver Controls, Inc.

Page 10 of 50

Application Note:QCI-AN060

QuickSilver Controls, Inc.

of travel switches as well as the soft position limits are engaged when Status
Word bit 14 is set.
h. The Master may clear Control Word bit 4 (Start) once the homing has started. If it
has not done so, it should clear the bit now.
12) The Master changes to Profile Position Mode of operationa. The master selects mode pp (1=profile position) via object 6060h Mode ofOperation.
b. The drive responds by setting object 6061h Mode of Operation Display to pp (1).
Status word bit 12 (Set Point Acknowledge) is cleared.
13) The Master selects Next position for motion
a. The master sets object 607Ah New Target Position to the next desired target
position. Absolute or relative positioning is determined by Control Word bit 6(Absolute = 0, Relative=1). Control Word bit 8 (Halt) should be low to enable thenext motion. Control Word bit 5 (Change Set Point Now) and bit 9 (Change on
Set Point) should be set according to need (both low if doing point-to-point).
b. The lower motion limit object 607DH sub 1 and upper motion limit object 607DH
sub 2 should be set if soft motion limits are desired. The upper motion limit mustbe larger than the lower motion limit in order for them to be active.
c. Profile Velocity 6083H and Max Profile Velocity 607FH should be configured forthe move. Profile Acceleration 6083H, Profile Deceleration 6084H, Quick stop
deceleration 6085H, Max Acceleration 60C5H, and Max Deceleration 60C6H
should also be configured for the move if not previously configured.
d. Quickstop option 605AH selects the style of quick stop, if used.
e. Halt options 605DH should also be selected
0 (Reserved - use slow ramp)
1 use slow ramp
2 use quick stop ramp
3 slow down on current limit
4 slow down on voltage limit
any other = use quick stop ramp
f. Control word (6040H)signals used within PP mode:
New Setpoint (Bit 4)=> 0->1 latches new set point
Change Setpoint Immediately (Bit 5) => 1 = next set point immediately(override active motion)
Relative/Absolute (Bit 6)=> 0 target is absolute position,
1=position is relative to current trajectory generator value
Halt (Bit 8)=> 1=axis shall be stopped according to 605Dh ,0=position / continue positioning
Change on Setpoint (Bit9)=> 1 = keep axis in motion and change
to new setpoint as it passes the old setpoint (without
stopping if in same direction)g. ( Control Word Bit 4 is already low) If not already set, the master sets/clears
Control Word (6040H) bits 5,6,8,9 to their desired state so as to determine thetype and effect of the next setpoint.
14) The master sets Control Word bit 4 (New Set Point). This causes the new set point andstyle of setpoint to be latched and the motion started.
15) The drive responds by setting Status Word bit 12 (Set Point Acknowledge).
QuickSilver Controls, Inc.

Page 11 of 50

Application Note:QCI-AN060

QuickSilver Controls, Inc.

Status word 6041H optional and mode dependent bit definition in PP mode:
Target Reached (Bit 10)=> 1=target reached (trajectory done, and if nothalted, actual position is within 20 counts of target
position (error limit is hard wired in logic in PP
move setpoint process line 162 )Set point Ack (Bit 12)=> Rising edge indicates set point information has
been latched, falling edge indicates ready for
next set point
Following Error (Bit13)=> 1 = excessive following error
Manufaturer (Bit 15)=> 1= we have completed a home, enable position
limits, etc.
16) If multiple set points are being used, the set point logic implements a 1 deep FIFO
allowing the next move or segment of move to be latched. If the FIFO is full, the Set
point Acknowledge will remain high until the next set point has been consumed, it willthen go low to indicate that the state machine will accept another set point.
17) The Master configures the next position for motion
a. The master may now clear Control Word bit 4 (New Set Point) and change theTarget Position and other target related inputs including various accelerationsand velocities for the next motion (the prior values are latched internally).
b. The drive responds by clearing Status Word bit 10 (Set Point Acknowledge)
when drive is ready to accept another set point into storage. Note that the drive
will always accept a new set point if Control Word bit 5 (Change Set Point Now)
is set.
18) The Master may now continue setting set points, choosing to allow completion before
continuing, overriding, or change on set point (update the acceleration and velocities
without stopping when the first set point is reached). The change on set point assumes
the new set point is in the same direction of travel; if a reversal in direction is needed,
the motion is stopped at the first set point, and then the new motion to the following set
point is initiated. See CiA 402v3 for more details.
19) Once the set points commanded motions have completed (that is the requested
trajectory has completed) and the absolute value of the error is less than 20 counts,
Status 6041H Target Reached (Bit 10) will be asserted. If moved beyond 20 counts bit
10 will be cleared until the error is again less than 20 counts. This means that a actuator
which is jammed will cause a delay in the Target Reached, which should cause timeout
logic in the master to determine the cause. Observing the Target position at the desired
target location and not moving indicates the commanded motion is completed, andobserving the error value excessively large will indicate the motor is jammed. If the error
is decreasing, the axis is exceeding its capability and is catching up.
20) Additional PP move operations are initiated by the actions at step 13 (above). Other
modes of action may be initiated by changing the mode via Register 6060H.
Background fault detection:
If a command error is detected, such as a move that would exceed physical speed limits,
any motion currently in process is ramped to a halt, brake, if any is set, and the motor driveris disabled. The background thread (Thread 2) is checked to make sure it is still operating.
If Thread 2 has faulted, the program is restarted, which will bring the machine back to thepower up state. If thread 2 is still operating, a CAN error 2002.2 H will have bit 10 set andQuickSilver Controls, Inc.

Page 12 of 50

Application Note:QCI-AN060

QuickSilver Controls, Inc.

the internal fault response routine will react according to the selected error behavior as
selected via object 1029.2H
CANopen NMT state is checked and, if CAN has switched to either restarted or
preoperational, then the Comm Fault Reaction routine is started to shutdown the motions
as the communications have been lost.
The driver enable status is checked as well as the power supply voltage to determine if
machine is already active and a fault is present. A fault will force a Fault Reactive action.
Position limits, both hard (switches) and soft limits are not active until the unit has been
homed, to avoid interfering with the homing operations. Soft position limits are only active ifthey have been configured (upper limit > lower limit).
Internal limits, including position limits and velocity limits, are checked in the backgroundwith bit 11 of Status word 6041h set high to reflect limits active and cleared when no longer
active.

QuickSilver Controls, Inc.

Page 13 of 50

QuickSilver Controls, Inc.

Application Note:QCI-AN060
Control Word (6040h): Mode Specific Bits

Control Word (6040h) Bits are also Mode Specific in their meaning:
Mode Specific Command Bit Functions
ProfileProfileHomingInterpolate Encoder
Velocity TorqueMode
Position
Follow
Bit Profile Position (pp) (pv)(tq)(home)(ip)(ef)
4 New Set Point
reserved reserved Start Homing Enable ip New Mode
5 change set now
reserved reserved reserved
reserved Follow
6 abs/relative
reserved reserved reserved
reserved Stop Hard
Halt
8 Halt
Halt
Halt
Halt
Halt
9 Change on Set Point reserved reserved reserved
reserved
Note: only Profile Position and Homing Mode are currently Implemented.
Mode Specific Bit Functions – Descriptions
Mode Bit Function
01
pp
4 New Set Point Ignore input target position
Use new target position
home 4 Start/finish
Start homing
ip
4 Enable ip
No interpolation
Start interpolation modeef
4 Change mode
Rising edge
pp
5 Change Set
Finish current move, then start nextOverride current motionef
5 Follow Mode
Follow Encoder
Stop following encoderpp
6 abs/relAbsolute Positioning
Relative Positioningef
6 Stop Hard
Use same accel ramp to stop
Stop hardAll
8 HaltPosition modeHalt
pp
9 Change on S.P. Reach set point stopped before changing Change on Set point

402 Mode Dependent Status Bits
Status Word (6041h) Bits {12, 13} are Mode specific in their meaning. The Mode of Operationis selected via object 6060h with the current mode displayed via 6061h:
Mode Specific Status Bits
Mode Bit 12pp
1 = Set Point Ack
pv
1=Speed Ack
tq
Reservedhome 1=Homing completedip
1=ip mode activeef
1 =Set point ack

QuickSilver Controls, Inc.

Bit 13
1 = Following Error
1=Max Slip Error
Reserved
1=Homing Error
Reserved
Reserved

Page 14 of 50

Application Note:QCI-AN060

QuickSilver Controls, Inc.

Objects implemented
For more details, see SilverLode CANopen Manual. Note: All position units are encoder
counts. All Velocity units are SilverLode Native units (2^31-1 represents 4000 RPM).
Acceleration and Deceleration are in SilverLode Native Units (Change in Velocity units per 120
us).
1000h Device Type1001h Error Register1002h Manufacturer Status Word
1003h – Predefined Error Field
1005h COB-ID SYNC
1006h Communication Cycle (SYNC) Period
1007 h Synchronous Window Length
100Ch Guard Time (Guarding not supported – use heartbeat)
100Dh Life Guarding (Guarding not supported – use heartbeat)
1012h TIME STAMP COB-ID
1013h High Resolution Time Stamp
1014h COB-ID EMCY
1015h EMCY Inhibit Time1016h Consumer Heartbeat Time => Need to configure for Heartbeat monitoring
1017h Heartbeat Producer Time => Need to configure for Heartbeat generation
1018h Identity Object
1019h Synchronous Counter1029h Error Behavior Object => Need to configure to determine NMT action for Serious Error
1200h SDO Server 1 Parameters (default)
1201h SDO SERVER 2 Parameters => configure if a second SDO Server is desired
1280h SDO CLIENT 1 Parameters (default)
1281h SDO Client 2 Parameters => configure if a second SDO Server is desired
1400h 1st Receive PDO Communications Record => Preconfigured – Change if desired
Update immediately
1401h 2nd Receive PDO Communications Record => Preconfigured – Change if desired
Update immediately
1402h 3rd Receive PDO Communications Record => configure if desired
1403h 4th Receive PDO Communications Record => Preconfigured – Change if desired
Update immediately
1600h First Receive PDO Mapping => Preconfigured – Change if desired
6040h (Command – 16 bits)
1601h Second Receive PDO Mapping => Preconfigured – Change if desired
6040h (Command – 16 bits), 607Ah (New Target Position – 32 bits)
1602h Third Receive PDO Mapping => configure if desired
1603h Fourth Receive PDO Mapping => Preconfigured – Change if desired
6040h (Command – 16 bits), 6098h (Homing method – 8 bits),
6060h (Mode of operation – 8 bits)
1800h First Transmit PDO Communications Parameters => Preconfigured – Change if desired
Trigger on change, No Inhibit time, No Timer
1801h 2nd Transmit PDO Communications Parameters => Preconfigured – Change if desired
Trigger on change, inhibit time = 20ms, Timer = 100ms (slowed due to almost constant
QuickSilver Controls, Inc.

Page 15 of 50

Application Note:QCI-AN060

QuickSilver Controls, Inc.

change of target value)
1802h Third Transmit PDO Communications Parameters => configure if desired
1803h Fourth Transmit PDO Communications Parameters => configure if desired
1A00h First Transmit PDO Mapping => Preconfigured – Change if desired
6041h (Status – 16 bits)
1A01h Second Transmit PDO Mapping => Preconfigured – Change if desired
6041h (Status – 16 bits), 6064h (Actual Position – 32 bits),
6061h (Mode of Operation Display – 8 bits)
1A02h Third Transmit PDO Mapping => configure if desired
1A03h Fourth Transmit PDO Mapping => configure if desired

2000h Critical Error Mask => Select sources to set CAN error bit => Preconfigured
Heartbeat Error (NMT state is checked in code according to PDS FSA state of driver)2001 EMCY Report Mask => Select sources to set as reported errors => configure errors
to be reported
2002 CAN Errors Reported Register
2003h Trigger Event Driven PDO
2004h Limit Switch and Home Switch Mapping => Preconfigured – change if desired
IO1=Lower Limit Switch, IO2 = Upper Limit Switch, IO3=Home Switch, all active high.
Change this object to select other switches or to change active state.
2005h Heartbeat Monitoring Status/State
2006h Read/Clear CAN Hardware Error Status Bits
2007h Current CAN ERRORS Register2008h Remote Input Register Map (not used in 402 implementation)
2009h SSI Data Port
200Ah CAN Switch Data
2100h to 21FCh User Register Mapping to CAN Data Dictionary: DO NOT ACCESS in
CiA 402 mode (OK to read)Special Factory Mode of Encoder Follow (ef) also uses - ok to access these registers for thatmode:
218C.1h Register 140 = Acceleration factory (see EGM)
218D.1h Register 141 = Scale Factor * 10,000,000 (see EGM)

6007h Abort Connection Option Code => Not Implemented this Revision
603Fh – Most Recent Error Code
6040h Control Word => used to send commands to drive
6041h Status Word => used to monitor status
605Ah Quick Stop Options => defaults to 0 needs to be configured
605Bh Shutdown Option => defaults to 0 needs to be configured
605Ch Disable Option => defaults to 0 needs to be configured
605Dh Halt Option => defaults to 0 needs to be configured
605Eh Fault Reaction Option => defaults to 0 needs to be configured
QuickSilver Controls, Inc.

Page 16 of 50

Application Note:QCI-AN060

QuickSilver Controls, Inc.

6060h Modes of Operation => used to select mode
6061h Modes of Operation Display => used to display mode
6062h Position Demand Value (Current trajectory value)
6063h Position Actual Value (Current position measured by encoder)6064h Position Actual Value (Current position measured by encoder)
607Ah New Target Position =>Set the next Set Point in Profile Position (pp) mode
607Ch Home Offset => defaults to 0 – configure for as needed for application
607Dh Position Limits Array => defaults to 0 (disabled) – configure if needed
607Fh Maximum Profile Velocity => defaults to 0 needs to be configured
6081h Profile Velocity => defaults to 0 needs to be configured
6083h Profile Acceleration => defaults to 0 needs to be configured
6084h Profile Deceleration => defaults to 0 needs to be configured
6085h Quick Stop Deceleration => defaults to 0 needs to be configured
6098h Homing Method => use to select homing method
6099h Homing Speeds Array => defaults to 0 needs to be configured
609Ah Homing Acceleration => defaults to 0 needs to be configured
60C5h Maximum Acceleration => defaults to 0 needs to be configured
60C6h Maximum Deceleration => defaults to 0 needs to be configured
60F2h Position Demand Value
60F4h Following Error Actual Value
60FCh Position Demand Value
60FDh Digital Inputs => use to read digital IO
60FEh Digital Outputs =>used to configure extended IO as well as to read and write to it
6502h Supported Drive Modes (pp and hm modes allowed)
67FFh Single Device Type
Needs to be configured
Optional to configure
Used to handshake/interface with the system
Informational

QuickSilver Controls, Inc.

Page 17 of 50

Application Note:QCI-AN060

QuickSilver Controls, Inc.

Encoder Following
A factory motion type –1 has been added to the basic implementation to allow an axis to follow
an external encoder quadrature input signal. The quadrature signals should be applied to IO4
and IO5.
Two parameters are associated with the encoder following mode, Acceleration Factor, andScale Factor. These allow the following mode to be engaged following a leading axis which is
initially stopped or operating slowly when engaging/disengaging the following operation, or toallow the following axis to ramp up to the desired following speed and to ramp down whenengaging and disengaging with a leading axis that is already in motion.
The acceleration factor is the change in effective Scale Factor per input encoder count. If set
as high as the magnitude of the Scale Factor, the motion will immediately reach the rate of
motion as the Scale Factor with no ramp up or ramp down. This is useful for following when
the leader is initially slow or stopped. If the Acceleration Factor set lower, a trapezoidal ramp
up and optionally ramp down will be used. The Scale factor is set at 218C.1h (register 140) as
a U32. The Scale factor is the desired output counts/ input counts * 10,000,000. (See thecommand reference for Electronic Gearing Mode (EGM) for a full description. Note that the theAcceleration Factor and Scale Factor registers are “live” allowing updating while the motion isin progress.
The Encoder Following mode (ef) is only available after homing. The Scale Factor andAcceleration terms should be set prior to use, but can be changed while the motion is inprocess – they are not buffered and are immediately acted upon if the EGM mode is active.
Mode of operation (6060h): Factory mode =-1 selects Encoder Following
Command Word (6040h):
Bit 4 : New Setpoint – rising edge used to select a new mode of operation
Bit 5 : 0 = start following the encoder, 1=stop following the encoder
Bit 6 : 0 = stop using acceleration factor, 1= stop using a hard stop
Bit 8 : 1 = Halt (according to method in 605Dh)
Status Word (6041h):
Bit 9: 1=Target Reached (Trajectory motion stopped) ready to exit ef mode if commanded
Bit 12: Rising edge indicates setpoint acknowledged, falling edge indicates ready for next
setpoint
EF Usage:
After homing, clear New Setpoint. Set encoder following mode by setting 6060h=-1
Wait until mode is acknowledged via 6061h.
Set Acceleration and Scale factor (Note: it is OK to set these prior to entering mode if desired –these registers are not altered by the program)
Clear Command word bits 5 and 8, then set bit 4 high. The set point will be acknowledged via
Status word Bit 12; Bit 9 will also be cleared as we are following the encoder. According to theacceleration and scale factors, the output motion will ramp up and follow the input encoder.
After Status bit 12 is detected high, Command bit 4 should be cleared to a low level.
QuickSilver Controls, Inc.

Page 18 of 50

Application Note:QCI-AN060

QuickSilver Controls, Inc.

The follow encoder can be ended several different ways. If the input motion is stopped, theeasiest method is to exit the motion is to set Command bits 5 and 6 high to indicate stop
following via a hard stop, and then strobe Command bit 4 high until Status bit 12 goes high,then bring Command bit 4 low. The output should already have been stopped, so the stopping
involves ignoring the input encoder changes. The Status bit 9 (Target Reached) should go
active (high) after a short period. The mode may then be exited by selecting a different modevia 6060h. If another follow period is desired rather than exiting, configure Command bits 5
and 8 appropriately and activate via New Setpoint (bit 4), again clearing the strobe bit once
acknowledged. If the input encoder is still in motion and it is desired to stop the following axis,
the stop using acceleration factor may be selected via Command Bit 6 being low. This will
decelerate using the current value of the Acceleration Factor register. Finally, the Halt bit in theCommand word may be used to stop the current motion using the modes configured via
605Dh and the associated deceleration values.
Note: the Maximum acceleration, deceleration, and velocity values associated with the pp
move are ignored in the normal operation of the Encoder Following mode.

QuickSilver Controls, Inc.

Page 19 of 50

Application Note:QCI-AN060

QuickSilver Controls, Inc.

Homing Methods
Homing Method (6098h) selects what homing method will be used. Methods 1 through 35 aredefined in 402v3.0 while methods –1 through –128 are reserved for custom homing methods.
Currently Special Methods –4 through –1 have been implemented.
The default limit switches are Negative Limit Switch = IO1, Positive Limit Switch = IO2, Home
Switch = IO3. These may be reconfigured via Object 2004h.

Methods -1 and -2: Hard Stop
Method -1: Home on Negative Hard Stop
The torque is set to 50% of normal (value configured when home was initiated). Initial
movement is negative. Motion continues until a Moving Error is Detected. The motion is
stopped, the error is cleared, and torque is returned to normal. The home position is the hardstop position.

-1

Moving Error Detected

Method -2: Home on Positive Hard Stop
The torque is set to 50% of normal. Initial movement is positive. Motion continues until a
Moving Error is Detected. The motion is stopped, the error is cleared, and torque is returned tonormal. The home position is the hard stop position.

-2

Moving Error Detected

QuickSilver Controls, Inc.

Page 20 of 50

Application Note:QCI-AN060

QuickSilver Controls, Inc.

Methods -3 and -4: Hard Stop plus Index
Method -3: Home on Negative Hard Stop and Index Pulse
The torque is set to 50% of normal. Initial movement is negative. Motion continues until a
Moving Error is Detected. The motion is stopped, the error is cleared, and torque is returned tonormal. Motion is started in the positive direction. The home position is the first index pulse in
the positive direction from the hard stop.

-3
Index Pulse
Moving Error Detected

Method -4: Home on Positive Hard Stop and Index Pulse
The torque is set to 50% of normal. Initial movement is Positive. Motion continues until a
Moving Error is Detected. The motion is stopped, the error is cleared, and torque is returned tonormal. Motion is started in the negative direction. The home position is the first index pulse in
the negative direction from the hard stop.

-4
Index Pulse
Moving Error Detected

QuickSilver Controls, Inc.

Page 21 of 50

Application Note:QCI-AN060

QuickSilver Controls, Inc.

Methods 1 and 2: Limit Switch plus Index
Method 1: Home on Negative Limit Switch and Index Pulse
Initial movement is negative if the negative limit switch is inactive. The home position is the firstindex pulse in the positive direction from the position where the negative limit switch becomesinactive.

1
Index Pulse
Negative Limit Switch

Method 2: Home on Positive Limit Switch and Index Pulse
Initial movement is positive if the positive limit switch is inactive. The home position is the firstindex pulse in the negative direction from the position where the positive limit switch becomesinactive.

2
Index Pulse
Positive Limit Switch

QuickSilver Controls, Inc.

Page 22 of 50

Application Note:QCI-AN060

QuickSilver Controls, Inc.

Methods 3 through 6: Single Transition Home Switch plus Index
Method 3: Homing on the Positive Home switch and Index Pulse
This method requires a home switch that goes active with movement in the positive direction.
Seeks the Home Switch transition, then finds the first index pulse in the negative direction.

3
Index Pulse
Home Switch

Method 4: Homing on the Positive Home switch and Index Pulse
This method requires a home switch that goes active with movement in the positive direction.
Seeks the Home Switch transition, then finds the first index pulse in the positive direction.

4
Index Pulse
Home Switch

Method 5: Homing on the Positive Home switch and Index Pulse
This method requires a home switch that goes inactive with movement in the positive direction.
Seeks the Home Switch transition, then finds the first index pulse in the positive direction.

5
Index Pulse
Home Switch

QuickSilver Controls, Inc.

Page 23 of 50

Application Note:QCI-AN060

QuickSilver Controls, Inc.

Method 6: Homing on the Positive Home switch and Index Pulse
This method requires a home switch that goes inactive with movement in the positive direction.
Seeks the Home Switch transition, then finds the first index pulse in the negative direction.

6
Index Pulse
Home Switch

Methods 7 to 14 Limited Range Home Switch, Limit Switched and Index
Used with a home switch that is active over only a portion of the travel. Assumes motion fromnegative to positive produces inactive – active – inactive states on the home switch. The
motion will be made until the desired edge of the home sensor is found, then until the desired
index is found.
Method 7: Home Switch and Index: Negative Home Edge, Negative Index
Assumes starting position is in the negative inactive or the active regions of the home switch. If
actually in the positive inactive region, the positive limit switch will activate, causing the motion
to reverse until the wanted edge has been found.
Seeks the lower home switch edge, and then finds the first index in the negative direction.

7
Index Pulse
Home Switch
Positive Limit Switch

QuickSilver Controls, Inc.

Page 24 of 50

Application Note:QCI-AN060

QuickSilver Controls, Inc.

Method 8: Home Switch and Index: Negative Home Edge, Positive Index
Assumes starting position is in the negative inactive or the active regions of the home switch. If
actually in the positive inactive region, the positive limit switch will activate, causing the motion
to reverse until the wanted edge has been found.
Seeks the lower home switch edge, and then finds the first index in the positive direction.

8
Index Pulse
Home Switch
Positive Limit Switch
Method 9: Home Switch and Index: Positive Home Edge, Negative Index
Assumes starting position is in the negative inactive or the active regions of the home switch. If
actually in the positive inactive region, the positive limit switch will activate, causing the motion
to reverse until the wanted edge has been found.
Seeks the upper home switch edge, and then finds the first index in the negative direction.

9
Index Pulse
Home Switch
Positive Limit Switch

QuickSilver Controls, Inc.

Page 25 of 50

QuickSilver Controls, Inc.

Application Note:QCI-AN060

Method 10: Home Switch and Index: Positive Home Edge, Positive Index
Assumes starting position is in the negative inactive or the active regions of the home switch. If
actually in the positive inactive region, the positive limit switch will activate, causing the motion
to reverse until the wanted edge has been found.
Seeks the upper home switch edge, and then finds the first index in the positive direction.

10
Index Pulse
Home Switch
Positive Limit Switch

Method 11: Home Switch and Index: Positive Home Edge, Negative Index
Assumes starting position is in the positive inactive or the active regions of the home switch. If
actually in the negative inactive region, the negative limit switch will activate, causing the
motion to reverse until the wanted edge has been found.
Seeks the upper home switch edge, and then finds the first index in the negative direction.

11
Index Pulse
Home Switch
Negative Limit Switch

QuickSilver Controls, Inc.

Page 26 of 50

QuickSilver Controls, Inc.

Application Note:QCI-AN060

Method 12: Home Switch and Index: Positive Home Edge, Positive Index
Assumes starting position is in the positive inactive or the active regions of the home switch. If
actually in the negative inactive region, the negative limit switch will activate, causing the
motion to reverse until the wanted edge has been found.
Seeks the upper home switch edge, and then finds the first index in the positive direction.

12
Index Pulse
Home Switch
Negative Limit Switch

Method 13: Home Switch and Index: Negative Home Edge, Negative Index
Assumes starting position is in the positive inactive or the active regions of the home switch. If
actually in the negative inactive region, the negative limit switch will activate, causing the
motion to reverse until the wanted edge has been found.
Seeks the lower home switch edge, and then finds the first index in the negative direction.

13
Index Pulse
Home Switch
Negative Limit Switch

QuickSilver Controls, Inc.

Page 27 of 50

Application Note:QCI-AN060

QuickSilver Controls, Inc.

Method 14: Home Switch and Index: Negative Home Edge, Positive Index
Assumes starting position is in the positive inactive or the active regions of the home switch. If
actually in the negative inactive region, the negative limit switch will activate, causing the
motion to reverse until the wanted edge has been found.
Seeks the lower home switch edge, and then finds the first index in the positive direction.

14
Index Pulse
Home Switch
Negative Limit Switch
Note: A slight modification from CiA 402 for starting inside Home Switch Active to allow
seeking Zero at Zero Speed rather than Switch Speed.
Methods 15, 16: Reserved
These methods reserved for future expansion.

Methods 17 and 18 – Home on Limit Switch
Method 17: Home on Negative Limit Switch
Initial movement is negative if the negative limit switch is inactive. The movement is positive
until the negative limit switch becomes inactive. The transition point to inactive defines thehome position.

17
Negative Limit Switch

QuickSilver Controls, Inc.

Page 28 of 50

Application Note:QCI-AN060

QuickSilver Controls, Inc.

Method 18: Home on Positive Limit Switch
Initial movement is positive if the positive limit switch is inactive. The movement is negative
until the positive limit switch becomes inactive. The transition point to inactive defines thehome position.

18
Positive Limit Switch

Methods 19 and 22: Single Transition Home Switch
Method 19: Homing on the Positive Home switch, Negative edge
This method requires a home switch that goes active with movement in the positive direction.
Moves positive if the home switch is inactive, until it becomes active. Moves in the negative
direction until the home switch becomes inactive. Transition point is home.

19Home Switch

Method 20: Homing on the Positive Home switch, Positive edge
This method requires a home switch that goes active with movement in the positive direction.
Moves negative if the home switch is active, until it is inactive. Moves in the positive direction
until the home switch is active. Transition point is home.

20
Home Switch

QuickSilver Controls, Inc.

Page 29 of 50

Application Note:QCI-AN060

QuickSilver Controls, Inc.

Method 21: Homing on the Negative Home switch, Positive edge
This method requires a home switch that goes inactive with movement in the positive direction.
Moves negative if the home switch is inactive, until it is active. Moves in the positive direction
until the home switch is inactive. Transition point is home.

21
Home Switch

Method 22: Homing on the Negative Home switch, Negative edge
This method requires a home switch that goes inactive with movement in the positive direction.
Moves positive if the home switch is active, until it is inactive. Moves in the negative direction
until the home switch is active. Transition point is home.

22Home Switch

QuickSilver Controls, Inc.

Page 30 of 50

Application Note:QCI-AN060

QuickSilver Controls, Inc.

Methods 23 through 25: Two Transition Home Switch and Limit Switches
Used with a home switch that is active over only a portion of the travel. Assumes motion fromnegative to positive produces inactive – active – inactive states on the home switch. The
motion will be made until the desired edge of the home sensor is found, then until the desired
index is found.
Method 23: Home Switch and Index: Negative Home Edge, Negative Direction
Assumes starting position is in the negative inactive or the active regions of the home switch. If
actually in the positive inactive region, the positive limit switch will activate, causing the motion
to reverse until the wanted edge has been found.
Seeks the lower home switch edge, and then finds the transition in negative direction.

23
Home Switch
Positive Limit Switch

Method 24: Home Switch and Index: Negative Home Edge, Positive Direction
Assumes starting position is in the negative inactive or the active regions of the home switch. If
actually in the positive inactive region, the positive limit switch will activate, causing the motion
to reverse until the wanted edge has been found.
Seeks the lower home switch edge, and then finds the transition in the positive direction.

24
Home Switch
Positive Limit Switch

QuickSilver Controls, Inc.

Page 31 of 50

QuickSilver Controls, Inc.

Application Note:QCI-AN060

Methods 25 and 30: Two Transition Home Switch, Limit Switches and Index
Method 25: Home Switch and Index: Positive Home Edge, Negative Direction
Assumes starting position is in the negative inactive or the active regions of the home switch. If
actually in the positive inactive region, the positive limit switch will activate, causing the motion
to reverse until the wanted edge has been found.
Seeks the upper home switch edge, and then finds the transition in the negative direction.

25
Home Switch
Positive Limit Switch

Method 26: Home Switch and Index: Positive Home Edge, Positive Direction
Assumes starting position is in the negative inactive or the active regions of the home switch. If
actually in the positive inactive region, the positive limit switch will activate, causing the motion
to reverse until the wanted edge has been found.
Seeks the upper home switch edge, and then finds the transition in the positive direction.

26
Home Switch
Positive Limit Switch

QuickSilver Controls, Inc.

Page 32 of 50

QuickSilver Controls, Inc.

Application Note:QCI-AN060

Method 27: Home Switch and Index: Positive Home Edge, Negative Direction
Assumes starting position is in the positive inactive or the active regions of the home switch. If
actually in the negative inactive region, the negative limit switch will activate, causing the
motion to reverse until the wanted edge has been found.
Seeks the upper home switch edge, and then finds the transition in the negative direction.

27
Home Switch
Negative Limit Switch

Method 28: Home Switch and Index: Positive Home Edge, Positive Direction
Assumes starting position is in the positive inactive or the active regions of the home switch. If
actually in the negative inactive region, the negative limit switch will activate, causing the
motion to reverse until the wanted edge has been found.
Seeks the upper home switch edge, and then finds the transition in the positive direction.

28
Home Switch
Negative Limit Switch

QuickSilver Controls, Inc.

Page 33 of 50

Application Note:QCI-AN060

QuickSilver Controls, Inc.

Method 29: Home Switch and Index: Negative Home Edge, Negative Direction
Assumes starting position is in the positive inactive or the active regions of the home switch. If
actually in the negative inactive region, the negative limit switch will activate, causing the
motion to reverse until the wanted edge has been found.
Seeks the lower home switch edge, and then finds the transition in the negative direction.

29
Home Switch
Negative Limit Switch

Method 30: Home Switch and Index: Negative Home Edge, Positive Direction
Assumes starting position is in the positive inactive or the active regions of the home switch. If
actually in the negative inactive region, the negative limit switch will activate, causing the
motion to reverse until the wanted edge has been found.
Seeks the lower home switch edge, and then finds the transition in the positive direction.

30
Home Switch
Negative Limit Switch

QuickSilver Controls, Inc.

Page 34 of 50

Application Note:QCI-AN060

QuickSilver Controls, Inc.

Method 31 and 32: Reserved
These methods reserved for future expansion

Methods 33 and 34: Index
Method 33: Home Negative Index
Moves in the negative direction until next index is located.

33
Index Pulse

Method 34: Home Positive Index
Moves in the positive direction until next index is located.

34
Index Pulse

Method 35: Set to current position
Method 35: Home on Current Position
Current position is selected as the new home “zero” position.

35

QuickSilver Controls, Inc.

Page 35 of 50

Application Note:QCI-AN060

QuickSilver Controls, Inc.

Additional Homing Methods
Additional custom homing methods may be requested by contacting QuickSilver Controls, orby editing the 402 Initialization file. Examples would include home against a hard stop in
combination with a sensor or index pulse, etc., to eliminate limit switches in applications inwhich the hardware is sufficiently robust to support a slow “crash” into a hard stop. Any
additional homing methods may be defined to use methods –1 to –128. None of these custom
homing routines are currently implemented.

CiA 402 Initialization
A demonstration configuration program is also provided (“Unit 17 - Remote Configure 16.qcp”)
to test the 402 implementation.
To use this program file, the 402 drive must be initialized to Unit 16 (by use of the switches if
present or by changing the Comm ID for units without CAN ID and CAN Baud switches).
A second drive must be initialized as ID 17 using “Factory Default Initialization - CAN.qcp”
Next, “Unit 17 - Remote Configure 16.qcp” must be downloaded.
The program first configures its own local PDOs and then switches itself to NMT operational.
Next, it configures the 402 drive acceleration and options to allow operation. Next the 402 driveis switched to NMT operational.
The program then steps through the power machine states from Switch On Disabled to Readyto Switch on, Switched On, Operation Enabled. (Note: no error checking is done in this demo
program).
Next, homing mode is selected, using a simple home (home to index - others may be easily
selected). Upon completion, the drive then performs two point to point moves, pausing inbetween.

Initialization Section
The following code excerpt from “Unit 17 - Remote Configure 16.qcp” shows the start of theinitialization of the various configuration objects on the 402 Drive unit.
Note: “CiA 402 Initialization.qcp” has an optional initialization section in Program 2: User CAN
register Initialization. To enable local initialization, disable line 2 in this program, and update
the various modes, accelerations, decelerations, velocities, and limits as desired. This will
reduce the startup overhead if desired.

QuickSilver Controls, Inc.

Page 36 of 50

Application Note:QCI-AN060

QuickSilver Controls, Inc.

Initialization code excerpt from “Unit 17 - Remote Configure 16.qcp”.

QuickSilver Controls, Inc.

Page 37 of 50

Application Note:QCI-AN060

QuickSilver Controls, Inc.

Startup Example:
START
Configure
Local SDO
Read
Remote ID

Present?

No

Yes
Configure Remote
Communications

Remote communications may
be using SDOs or PDOs, orboth at option of programmer.
Watch dog may also be
configured, if wanted.

Set NMT to Operational
Configure Remote unit for operation(User may enable local configurationof these parameters or configure via
CAN)
Home Offset (0x607C.0)
Homing Method (0x6098.0)
Home Speed (0x6099.1)
Homing Speed Zero (0x6099.2)
Homing Acceleration (0x609A.0)
Max Acceleration (0x60C5.0)
Max Deceleration (0x60C6.0)
Max Profile Speed (0x607F.0)
Quick Stop Option (0x605A.0)
Shutdown Option (0x605B.0)
Disable Operation Option (0x605C.0)
Halt Option (0x605D.0)
Fault Reactive Option (0x605E.0)
Quick Stop Deceleration (0x6085.0)

QuickSilver Controls, Inc.

Page 38 of 50

Note: if not configured, thedefaults will be used. For
speed and acceleration,
this is zero, so no motion
will take place.

Application Note:QCI-AN060

QuickSilver Controls, Inc.

(Optional)
Negative Limit (0x607D.1)
Positive Limit (0x607D.2)
Heartbeat (0x1017.0)(Configure Motion Profile – may change
for each motion if desired)
Profile Velocity (0x6081.0)
Profile Acceleration (0x6083.0)
Profile Deceleration (0x6084.0)

QuickSilver Controls, Inc.

Page 39 of 50

QuickSilver Controls, Inc.

Application Note:QCI-AN060

Wait for unit to finish its
start-up routine.
It should end up“Switch On Disable”& “Ready to process”
Bits 963210 = 110000b

Read Status Display (0x6041.0)

Is it“Switch on
Disabled”
?

No

Yes

Is it
Faulted?

Yes

No

If faulted, it will require a
couple extra steps if thefault is recoverable.

Fault Recovery
Perform “Shutdown Request”
Set Control word (0x6040.0) = 6

Read Status Display (0x6041.0)

No

Is it
“Ready to
Switch ON”?
Yes

QuickSilver Controls, Inc.

Page 40 of 50

After performing “Shutdown
Request”, wait for the state totransition to “Ready to Switch
On” & “Ready to Process”
Bits 9653210 = 1010001b

QuickSilver Controls, Inc.

Application Note:QCI-AN060

Perform “Switch On”
Set Control word (0x6040.0) = 7
After performing “SwitchOn”, wait for the state totransition to “Switched On” &“Ready to Process”
Bits 9653210 = 1010011b

Read Status Display (0x6041.0)

No

Is it
“SwitchedON”?

Perform “Enable Operation”
Set Control word (0x6040.0) = 0x0F
After performing “Enable
Operation”, wait for the state
to transition to “Operation
Enabled” & “Ready toProcess”
Bits 9653210 = 1010111b

Read Status Display (0x6041.0)

Is
Is itit“Operation“Operation
Enabled”
Enabled”
??

No

Is it
Faulted?

Yes
Fault Recovery

QuickSilver Controls, Inc.

Page 41 of 50

NoQuickSilver Controls, Inc.

Application Note:QCI-AN060
Set homing method (0x6098.0)
Set Mode of operation = homing(0x6060.0) = 6

The unit must be homed before anyother motion may take place.
The minimal homing is method 35
which sets “where I am is zero”

Read Mode Display (0x6061.0)

Is it“Homing
Mode”?

Wait for the unit to confirm
new mode before
continuing.

No

Yes
Start Homing operation
Set Control word (0x6040.0) = 0x1F

Read Status Display (0x6041.0)

Yes

Is it
Faulted?

No

Fault Recovery

Yes

No

Did
Homingcomplete?

A successful homing will
also set manufacturer
specific bit 14 to indicate
drive may perform user
motions.

Was
HomingSuccessful?

Report Error
Yes

QuickSilver Controls, Inc.

No

Homing complete issignaled as complete by:
Bit 10 (Stopped)=1
and either:
Bit 12 (Homing attained)=1
or
Bit 13 (Homing Error)=1

Page 42 of 50

QuickSilver Controls, Inc.

Application Note:QCI-AN060
De-assert start motion bit.
Set Control word (0x6040.0) = 0x0F

Mode changes are notaccepted while “start motion”
bit is active.

Select new operational mode = PP
Set Mode word (0x6060.0)=1

Read Mode Display (0x6061.0)

Is it“Position
Profile
Mode”
?
Yes

No

The unit is ready for motion. Motions may be
activated one at a time, they may queued (onestarted and another waiting), they may beoverwritten mid motion, they may be paused(Halted). One motion may be started with thesecond point of the motion queued such that thefirst motion does not come to a stop (if the second
point is in the same direction of motion),transitioning to the new point, velocity, andacceleration. The hand shaking for these vary, as
shown.
All of the following motions assume the unit has
been initialized, homed, and set to PP mode.

p

QuickSilver Controls, Inc.

Page 43 of 50

Wait for mode to be
accepted before
initiating a motion.

QuickSilver Controls, Inc.

Application Note:QCI-AN060

Perform a discrete motion andwait for it to complete

Discrete Motion

Read Status Display (0x6041.0)

Is
TargetReached &Ready for new
Set Point
?
Yes

No

Set wanted position or motion
0x607A.0=New target position[Optionally change acceleration,
deceleration or velocity (see above)]
Select PP option bits in Control word:
0x6040.0=0x1F

Read Status Display (0x6041.0)

Is
Set Point
Acknowledge(Bit 12) High?

No

De-assert start bit (set bit 4 low)
0x6040.0=0x0F

QuickSilver Controls, Inc.

Page 44 of 50

In PP mode,Bit 12 = Set point
Acknowledge (0 if waiting for
a new setpoint)
Bit 10 = Target Reached(Stopped)

In example, Target isabsolute, complete priorsetpoint. No change
immediate, no halt., start
motion.
Code is 0x1F
PP specific bits in Control Word
(0x6040.0)
Bit 4 = New Set point
Bit 5 = Change Set point immediately
Bit 6 = absolute (0) / relative (1)Bit 8 = Halt current motion (1)Bit 9 = (0) Complete current set point
before evaluating next (come to stop),(1) go to current set point at velocity,then transition to new accel/velocity
to reach next setpoint.

Application Note:QCI-AN060

Read Status Display (0x6041.0)

Is
TargetReached(Bit 10) High?

No

Done with Move

QuickSilver Controls, Inc.

Page 45 of 50

QuickSilver Controls, Inc.

QuickSilver Controls, Inc.

Application Note:QCI-AN060

Perform multiple motions,
letting each complete and wait
for final motion to complete

Queued Motion

Read Status Display (0x6041.0)
In PP mode,Bit 12 = Set point
Acknowledge (0 if waiting for
a new setpoint)

Is
Ready
for new
Set Point
?

No

Yes
Set wanted position or motion
0x607A.0=New target position[Optionally change acceleration,
deceleration or velocity (see above)]
Select PP option bits in Control word:
0x6040.0=0x1F

Read Status Display (0x6041.0)

Is
Set Point
Acknowledge(Bit 12) High
?

No

Yes
De-assert start bit (set bit 4 low)
0x6040.0=0x0F

Yes

More
Motions?
No

QuickSilver Controls, Inc.

Page 46 of 50

In example, Target isabsolute, complete priorsetpoint. No change
immediate, no halt., start
motion.
Code is 0x1F
PP specific bits in Control Word
(0x6040.0)
Bit 4 = New Set point
Bit 5 = Change Set point immediately
Bit 6 = absolute (0) / relative (1)Bit 8 = Halt current motion (1)Bit 9 = (0) Complete current set point
before evaluating next (come to stop),(1) go to current set point at velocity,then transition to new accel/velocity
to reach next setpoint.

Application Note:QCI-AN060

Read Status Display (0x6041.0)

Is
TargetReached(Bit 10) High?

No

Done with Move

QuickSilver Controls, Inc.

Page 47 of 50

QuickSilver Controls, Inc.

QuickSilver Controls, Inc.

Application Note:QCI-AN060

Perform multi-segment
motions, blending motions andthen waiting for final motion tocomplete

Queued Complex
MotionRead Status Display (0x6041.0)

Is
Set Point
Acknowledge(Bit 12) Low?

In PP mode,Bit 12 = Set point
Acknowledge (0 if waiting for
a new setpoint)No

Yes
Set wanted position or motion
0x607A.0=New target position[Optionally change acceleration,
deceleration or velocity (see above)]
Select PP option bits in Control word:
0x6040.0=0x21F

Read Status Display (0x6041.0)

Is
Set Point
Acknowledge(Bit 12) High
?

No

Yes
De-assert start bit (set bit 4 low)
0x6040.0=0x0F

Yes

More
Segments?
No

QuickSilver Controls, Inc.

Page 48 of 50

In example, Target isabsolute, transition atprior setpoint. No change
immediate, no halt., start
motion.
Code is 0x21F
PP specific bits in Control Word
(0x6040.0)
Bit 4 = New Set point
Bit 5 = Change Set point immediately
Bit 6 = absolute (0) / relative (1)Bit 8 = Halt current motion (1)Bit 9 = (0) Complete current set point
before evaluating next (come to stop),(1) go to current set point at velocity,then transition to new accel/velocity
to reach next setpoint.

Application Note:QCI-AN060

Read Status Display (0x6041.0)

Is
TargetReached(Bit 10) High?

No

Done with Move

QuickSilver Controls, Inc.

Page 49 of 50

QuickSilver Controls, Inc.

QuickSilver Controls, Inc.

Application Note:QCI-AN060

Override an existing motion

Over-ride Motion

In example, Target is absolute,
Change immediately, no halt,
start motion.
Bit 5=1 for Change Immediately
Code is 0x3F

De-assert New Set-Point (Ifasserted) 0x6040.0=0x0F

Set wanted position or motion
0x607A.0=New target position[Optionally change acceleration,
deceleration or velocity (see above)]
Select PP option bits in Control word:
0x6040.0=0x3F
Delay ~ 10 milliseconds

Read Status Display (0x6041.0)

Is
Set Point
Acknowledge(Bit 12) High?

Is
TargetReached(Bit 10) High
?

No

No

De-assert New Set Point bit (set bit
4 low) 0x6040.0=0x0F
0x6040.0=0x0F
Done with Move
QuickSilver Controls, Inc.

The delay is a precaution toprevent reading the completionof the prior motion if the New Set
Point bit was also left high(active) or a second motion wasqueued. An override with anactive motion and a queued
motion does not provide positive
handshaking means to
acknowledge the “Change
Immediately” override command.

Page 50 of 50

Wait for motion
complete before deasserting New Set
Point Bit.