Appendix h - q program mode, General mode description, Loading a q program – Applied Motion ST10-C-CE User Manual
Page 88: Normal q program execution

88
920-0025 Rev K
3/5/2015
CANopen User Manual
Appendix H - Q Program Mode
General Mode Description
In order to expand the functionality of Applied Motion Products CANopen drives, the Q
programming language may be used to execute complex motion profiles that may not be
possible within the scope of CiA 402. The Q program must be written and pre-loaded into the
CANopen drive using Q Programmer (v1.3.5 or later).
Q Programs may also access and manipulate the CANopen General Purpose registers
for use in stored programs. The section above on General Purpose Registers has a chart to
convert from the OD entry to the Q address. See object 0x4000.
Loading a Q Program
As with ST Configurator and Quick Tuner, where the drive must be powered up with the
RS-232 port connected, Q Programmer must be running for the CANopen drive to delay the
normal boot-up procedure. The CAN boot-up will be resumed by closing the Q Programmer
application, or by power-cycling the drive with the RS-232 port disconnected. Once Q Pro-
grammer is in control of the drive, it may be used in the same way as any other Applied Motion
Products Q drive. See the Q Command Reference for more information on Q programming.
Normal Q Program Execution
To execute a stored Q program on a single drive, a value of -1 (FF
h
) must be written to the
mode of operation OD entry, located at dictionary address 6060
h
. The mode of operation can
be verified using OD entry 6061
h
- mode of operation display - which is updated when the cur-
rent operation mode is accepted.
Next, the desired Q segment number, 1-12, must be written to the Q Segment Number
register, located at address 7007
h
.
After power up or node reset, the drive is in disabled state. The value 0006
h
must be
written to the control word OD entry, located at dictionary address 6040
h
. This will put the drive
into “ready to switch on” state and is ready to enable drive operation. If the value 0006
h
is not
written to the control word first, the drive operation can not be enabled.
To enable drive operation, a value of 000F
h
must be written to the controlword OD en-
try, located at dictionary address 6040
h
. This puts the drive into Operation Enabled state and
ready to run the Q program.
To run the selected Q program, a value of 001F
h
must be written to the controlword. The
Q program will then run to completion. The Q program may be re-executed by a 0->1 transition
of the Q Program start bit (bit 4) in the controlword.
To halt execution of a Q program, the halt bit (bit 8) of the controlword must be set to 1.
The Q program will halt immediately and start from the beginning the next time a 0->1 transi-
tion is seen on the Q Program start bit after the halt bit has been cleared.