SPiiPlus ACSPL+ Command & Variable Reference Guide

Download as pdf or txt
Download as pdf or txt
You are on page 1of 575

SPiiPlu s Co m m a nd &

Variable Re f e r e nc e
Guide

Reference Guide

Version NT 2.20
SPiiPlus Command & Variable Reference

31 January 2013, V e r s i o n N T 2 . 2 0

COPYRIGHT
Copyright ® 1999 - 2013 ACS Motion Control Ltd.
Changes are periodically made to the information in this document. Changes are published as release
notes and are subsequently incorporated into updated revisions of this document.
No part of this document may be reproduced in any form without prior written permission from ACS
Motion Control.
TRADEMARKS
ACS Motion Control, PEG and SPiiPlus are trademarks of ACS Motion Control Ltd.
EtherCAT® is registered trademark and patented technology, licensed by Beckhoff Automation GmbH,
Germany.
Visual Basic and Windows are trademarks of Microsoft Corporation.
Any other companies and product names mentioned herein may be the trademarks of their respective
owners.

Web Site: www.AcsMotionControl.com


Information: [email protected]
Tech Support: [email protected]

ACS Motion Control, Ltd.


Ramat Gabriel Industrial Park
POB 5668
Migdal HaEmek, 10500
ISRAEL
Tel: (972) (4) 6546440
Fax: (972) (4) 6546443

NOTICE
This guide contains proprietary information belonging to ACS Motion Control Ltd. Such information is
supplied solely for the purpose of assisting users of the ACSPL+ motion control programing language
The text and graphics used in this guide are for the purpose of reference and illustration only. The
specifications on which they are based are subject to change without notice.

The information in this document is deemed to be correct at the time of publishing. ACS Motion Control
reserves the right to change specifications without notice. ACS Motion Control Motion Control is not
responsible for incidental, consequential, or special damages of any kind in connection with using this
document.

Version NT 2.20 ii Reference Guide


SPiiPlus Command & Variable Reference

Changes in Version NT 2.20

Page Change
54 Corrected tables for the ASSIGNFINS command.
73 SPINJECT command added.
74 STOPINJECT command added.
76 Added format of ARC1 for use with XSEG...ENDS
80 Added format of ARC2 for use with XSEG...ENDS
84 Added format of LINE for use with XSEG...ENDS
113 XSEG...ENDS extended segment motion command added.
170 SLEBIASA variable added.
171 SLEBIASB variable added.
174 SCGAIN variable added
175 SCPHASE variable added
193 Added bit 16 (#NEWSEGM) and bit 17 (#STARV) to the AST variable.
284 SLILI variable added.
327 S_SETUP variable added.
370 Expanded the explanation of the use of 214 key with the SETCONF function.
388 ECUNMAPIN function added.
388 ECUNMAPOUT function added.
41 ASSIGNMARK command was added.
44 The CMnt-x-320/UDMpm-x-320 / UDMpc-x-048 Mapping PEG Engines to
Encoders table for ASSIGNPEG was updated with new options.
72 #MEMORY command was added.
72 GETCONF(312, Index) command was added.
161 New quadrature single-ended encoder type (value = 2) was added to
E_TYPE variable.
308 Corrected values for the SLCROUT, SLPROUT, and SLVROUT variables.
384 ECGETREG function added.
383 ECCLRREG function added.
502 LOG commands was added.
504 LOG HOST_TICKS commands was added.
68 SPDC command updated.

Version NT 2.20 iii Reference Guide


SPiiPlus Command & Variable Reference

Conventions Used in this Guide

Text Formats
Several text formats and fonts, illustrated in Table 1, are used in the text to convey information
about the text.

Table 1 Text Format Conventions


Format Description
Bold ACSPL+ command names. Software tool menus, menu items,
dialog box names, and dialog box elements.
Italic Emphasis or an introduction to a key concept. In a command syntax,
specifies a variable name or other information that the user
provides.
Monospace Code example.
blue italic Names of other documents.
blue bold Cross references, web pages, and e-mail addresses.

Command Formats
Table 2 provides the symbols employed in sample ACSPL+ commands. The general format is:
COMMAND {+f | -f} arguments . . . [options]

Table 2 ACSPL+ Command Syntax Symbols


Element Description
command Language element that must be entered as shown (keyword, command,
function, and the like).
{} Indicates a set of choices from which to choose one.
| Separates two mutually exclusive choices. Only one of them is to be used.
… An argument that can appear more than once.
[] Optional item(s)

Version NT 2.20 iv Reference Guide


SPiiPlus Command & Variable Reference

Flagged Text
The following symbols are used in flagging text:

Note
Notes include additional information or programming tips.

Caution
A Caution describes a condition that may result in damage to
equipment.

Warning
A Warning describes a condition that may result in serious bodily
injury or death.

Advanced
Indicates a topic for advanced users.

Model
Highlights a specification, procedure, condition, or statement that depends on
the product model.

Version NT 2.20 v Reference Guide


SPiiPlus Command & Variable Reference

Related Documents
The following documents provide additional details relevant to this guide:

Table 3 Related Documentation


Document Description
SPiiPlus C Library Reference C++ and Visual Basic® libraries for host PC applications. This
guide is applicable for all the SPiiPlus motion control products.
SPiiPlus COM Library Reference COM Methods, Properties, and Events for Communication with the
Controller.
SPiiPlus MMI Application Studio A complete guide for using the SPiiPlus MMI Application Studio
User Guide and associated monitoring tools.
SPiiPlus Utilities User Guide A guide for using the SPiiPlus User Mode Driver (UMD) for
settingup communication with the SPiiPlus motion controller.
SPiiPlus NT/DC Hardware Guide Technical description of the SPiiPlus NT/DC product line.
SPiiPlus PDMnt Hardware Guide Technical description of the SPiiPlus PDMnt Network Interface.
SPiiPlus SDMnt Hardware Guide Technical description of the SPiiPlus SDMnt Step Motor Drive
Module.
SPiiPlus UDMnt Hardware Technical description of the SPiiPlus UDMnt Universal Drive
Guide Module.
MC4U-CS Control Module Technical description of the MC4U Control Module integrated
Hardware Guide motion control product line.
HSSI Expansion Modules Guide High-Speed Synchronous Serial Interface (HSSI) for expanded I/O,
distributed axes, and nonstandard devices.
SPiiPlus NT PEG and MARK Provides details on using the PEG commands in NT systems.
Operations Application Notes

About This Document


This document details all of the elements making up the SPiiPlus ACSPL+ Programming
Language as well as the command set that may be entered through the SPiiPlus MMI
Appicationi Studio Communication Terminal for use in a SPiiPlus NT system.
The document is organized as follows:
 Chapter 1 - ACSPL+ Commands
 Chapter 2 - ACSPL+ Variables
 Chapter 3 - ACSPL+ Functions
 Chapter 4 - Terminal Commands
 Chapter 5 - SPiiPlus Error Codes

Version NT 2.20 vi Reference Guide


SPiiPlus Command & Variable Reference Table of Contents

Table of Contents
Conventions Used in this Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iv
Text Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iv
Command Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iv
Flagged Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v
Related Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi
About This Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi
1 ACSPL+ Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 Axis Management Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.1.1 BREAK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.1.2 COMMUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.1.3 CONNECT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.1.4 DEPENDS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.1.5 DISABLE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.1.6 ENABLE/ENABLEALL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.1.7 FCLEAR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
1.1.8 GO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
1.1.9 GROUP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
1.1.10 HALT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
1.1.11 IMM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
1.1.12 KILL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
1.1.13 SAFETYCONF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
1.1.14 SAFETYGROUP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
1.1.15 SET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
1.1.16 SPLIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
1.2 Interactive Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
1.2.1 DISP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
1.2.2 INTERRUPT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
1.2.3 INTERRUPTEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
1.2.4 SEND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
1.2.5 TRIGGER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
1.3 PEG and MARK Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
1.3.1 ASSIGNFINS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
1.3.2 ASSIGNMARK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
1.3.3 ASSIGNPEG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
1.3.4 ASSIGNPOUTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
1.3.5 PEG_I . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
1.3.6 PEG_R . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
1.3.7 STARTPEG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
1.3.8 STOPPEG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
1.4 Miscellaneous Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
1.4.1 AXISDEF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
1.4.2 DC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
1.4.3 STOPDC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
1.4.4 READ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
1.4.5 SETPROTECTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

Version NT 2.20 vii Reference Guide


SPiiPlus Command & Variable Reference Table of Contents

1.4.6 SPDC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
1.4.7 WRITE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
1.4.8 ECREPAIR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
1.4.9 ECRESCAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
1.4.10 GETCONF(312, Index) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
1.4.11 #MEMORY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
1.4.12 SPINJECT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
1.4.13 STOPINJECT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
1.5 Motion Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
1.5.1 ARC1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
1.5.2 ARC1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
1.5.3 ARC2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
1.5.4 ARC2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
1.5.5 JOG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
1.5.6 LINE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
1.5.7 LINE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
1.5.8 MASTER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
1.5.9 MPOINT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
1.5.10 MPTP...ENDS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
1.5.11 MSEG...ENDS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
1.5.12 PATH...ENDS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
1.5.13 POINT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
1.5.14 PROJECTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
1.5.15 PTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
1.5.16 PVSPLINE...ENDS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
1.5.17 SLAVE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
1.5.18 STOPPER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
1.5.19 TRACK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
1.5.20 XSEG...ENDS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
1.6 Program Flow Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
1.6.1 Assignment Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
1.6.2 BLOCK...END . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
1.6.3 CALL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
1.6.4 GOTO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
1.6.5 IF, ELSEIF, ELSE...END . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
1.6.6 INPUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
1.6.7 LOOP...END . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
1.6.8 ON...RET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
1.6.9 TILL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
1.6.10 WAIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
1.6.11 WHILE...END . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
1.7 Program Management Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
1.7.1 DISABLEON . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
1.7.2 ENABLEON . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
1.7.3 PAUSE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
1.7.4 RESUME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
1.7.5 START . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
1.7.6 STOP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133

Version NT 2.20 viii Reference Guide


SPiiPlus Command & Variable Reference Table of Contents

1.7.7 SPiiPlus PLC Program Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134


1.7.7.1 PLCSTART . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
1.7.7.2 PLCSTOP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
2 ACSPL+ Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
2.1 Axis Configuration Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
2.1.1 AFLAGS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
2.1.2 ENTIME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
2.1.3 MFF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
2.1.4 MFLAGS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
2.1.5 SETTLE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
2.1.6 SLPMAX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
2.1.7 SLPMIN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
2.1.8 STEPF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
2.1.9 STEPW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
2.1.10 SYNV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
2.1.11 TARGRAD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
2.1.12 Brake Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
2.1.12.1 BOFFTIME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
2.1.12.2 BONTIME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
2.1.12.3 VELBRK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
2.1.13 Feedback Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
2.1.13.1 E_FREQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
2.1.13.2 E_SCMUL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
2.1.13.3 E_TYPE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
2.1.13.4 EFAC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
2.1.13.5 E2FAC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
2.1.13.6 EOFFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
2.1.13.7 E2OFFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
2.1.13.8 FVFIL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
2.1.13.9 RVFIL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
2.1.13.10 SCSOFFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
2.1.13.11 SLEBIASA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
2.1.13.12 SLEBIASB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
2.1.13.13 SCCOFFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
2.1.13.14 SLABITS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
2.1.13.15 SCGAIN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
2.1.13.16 SCPHASE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
2.1.14 Safety Limits Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
2.1.14.1 CERRA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
2.1.14.2 CERRI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
2.1.14.3 CERRV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
2.1.14.4 DELV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
2.1.14.5 DELI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
2.1.14.6 ERRA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
2.1.14.7 ERRI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
2.1.14.8 ERRV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
2.1.14.9 SLLIMIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184

Version NT 2.20 ix Reference Guide


SPiiPlus Command & Variable Reference Table of Contents

2.1.14.10 SRLIMIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185


2.1.14.11 XACC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
2.1.14.12 XCURI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
2.1.14.13 XCURV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
2.1.14.14 XRMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
2.1.14.15 XRMST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
2.1.14.16 XSACC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
2.1.14.17 XVEL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
2.2 Axis State Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
2.2.1 AST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
2.2.2 IND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
2.2.3 IST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
2.2.4 M2ARK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
2.2.5 MARK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
2.2.6 MST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
2.2.7 RMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
2.2.8 LOCALST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
2.2.9 NST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
2.3 Data Collection Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
2.3.1 DCN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
2.3.2 DCP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
2.3.3 S_DCN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
2.3.4 S_DCP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
2.3.5 S_ST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
2.4 Input and Output Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
2.4.1 AIN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
2.4.2 AOUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
2.4.3 EXTIN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
2.4.4 EXTOUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
2.4.5 IN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
2.4.6 OUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
2.5 Monitoring Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
2.5.1 SMNA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
2.5.2 SMNV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
2.5.3 TIME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
2.5.4 USAGE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
2.6 Motion Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
2.6.1 ACC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
2.6.2 APOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
2.6.3 DAPOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
2.6.4 DEC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
2.6.5 FACC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
2.6.6 FPOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
2.6.7 F2POS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
2.6.8 FVEL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
2.6.9 F2VEL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
2.6.10 GACC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
2.6.11 GJERK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221

Version NT 2.20 x Reference Guide


SPiiPlus Command & Variable Reference Table of Contents

2.6.12 GMOT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221


2.6.13 GMQU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
2.6.14 GMTYPE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
2.6.15 GPATH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
2.6.16 GPHASE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
2.6.17 GRTIME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
2.6.18 GSEG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
2.6.19 GSFREE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
2.6.20 GVEC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
2.6.21 GVEL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
2.6.22 JERK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
2.6.23 KDEC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
2.6.24 MPOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
2.6.25 NVEL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
2.6.26 PE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
2.6.27 RACC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
2.6.28 ROFFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
2.6.29 RPOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
2.6.30 RVEL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
2.6.31 TPOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
2.6.32 VEL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
2.7 Program Execution Control Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
2.7.1 ONRATE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
2.7.2 PCHARS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
2.7.3 PERL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
2.7.4 PERR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
2.7.5 PEXL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
2.7.6 PFLAGS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
2.7.7 PLINES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
2.7.8 PRATE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
2.7.9 PST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
2.8 Safety Control Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
2.8.1 AERR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
2.8.2 ECERR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
2.8.3 ECST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
2.8.4 FAULT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
2.8.5 FDEF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
2.8.6 FMASK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
2.8.7 MERR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
2.8.8 SAFIN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
2.8.9 SAFINI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
2.8.10 S_ERR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
2.8.11 S_FAULT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
2.8.12 S_FDEF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
2.8.13 S_FMASK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
2.8.14 S_SAFIN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
2.8.15 S_SAFINI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
2.8.16 SYNC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270

Version NT 2.20 xi Reference Guide


SPiiPlus Command & Variable Reference Table of Contents

2.9 Induction Motor Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271


2.9.1 SLCFIELD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
2.9.2 SLCSLIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
2.10 Nanomotion Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
2.10.1 SLDZMIN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
2.10.2 SLDZMAX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
2.10.3 SLZFF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
2.11 Servo-Loop Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
2.11.1 DCOM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
2.11.2 Servo-Loop Current Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
2.11.2.1 SLBIASA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
2.11.2.2 SLBIASB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
2.11.2.3 SLIKI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
2.11.2.4 SLIKP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
2.11.2.5 SLIFILT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
2.11.2.6 SLIOFFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
2.11.2.7 SLILI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
2.11.3 Servo-Loop Velocity Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
2.11.3.1 SLVKI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
2.11.3.2 SLVKIIF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
2.11.3.3 SLVKISF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
2.11.3.4 SLVKP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288
2.11.3.5 SLVKPIF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
2.11.3.6 SLVKPSF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
2.11.3.7 SLVLI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
2.11.3.8 SLVRAT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
2.11.4 Servo-Loop Velocity Notch Filter Variables . . . . . . . . . . . . . . . . . . . . . . . 292
2.11.4.1 SLVNFRQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292
2.11.4.2 SLVNWID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
2.11.4.3 SLVNATT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
2.11.5 Servo-Loop Velocity Low Pass Filter Variables . . . . . . . . . . . . . . . . . . . . . 295
2.11.5.1 SLVSOF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
2.11.5.2 SLVSOFD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
2.11.6 Servo-Loop Velocity Bi-Quad Filter Variables . . . . . . . . . . . . . . . . . . . . . 296
2.11.6.1 SLVB0DD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
2.11.6.2 SLVB0DF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
2.11.6.3 SLVB0ND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298
2.11.6.4 SLVB0NF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
2.11.7 Servo-Loop Position Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
2.11.7.1 SLDRA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
2.11.7.2 SLDRAIF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301
2.11.7.3 SLDRX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302
2.11.7.4 SLPKP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303
2.11.7.5 SLPKPIF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304
2.11.7.6 SLPKPSF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
2.11.8 Servo-Loop Compensations Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
2.11.8.1 SLAFF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
2.11.8.2 SLFRC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307

Version NT 2.20 xii Reference Guide


SPiiPlus Command & Variable Reference Table of Contents

2.11.8.3 SLFRCD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307


2.11.9 Servo-Loop Miscellaneous Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
2.11.9.1 SLCROUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
2.11.9.2 SLPROUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
2.11.9.3 SLVROUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
2.12 Commutation Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
2.12.1 SLCHALL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
2.12.2 SLCNP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315
2.12.3 SLCPA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
2.12.4 SLCOFFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
2.12.5 SLCORG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
2.12.6 SLCPRD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319
2.13 System Configuration Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
2.13.1 CFG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
2.13.2 CTIME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321
2.13.3 IENA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
2.13.4 IMASK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
2.13.5 ISENA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
2.13.6 S_FLAGS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
2.13.7 S_SETUP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327
2.14 Communication Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
2.14.1 BAUD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
2.14.2 COMMCH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329
2.14.3 COMMFL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
2.14.4 CONID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331
2.14.5 ECHO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332
2.14.6 DISPCH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
2.14.7 GATEWAY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335
2.14.8 SUBNET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
2.14.9 TCPIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337
2.14.10 TCPIP2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338
2.14.11 TCPPORT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
2.14.12 UDPPORT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340
2.15 Miscellaneous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
2.15.1 JITTER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
2.15.2 MSSYNC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
2.15.3 FK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
2.15.4 XARRSIZE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
2.15.5 PLCFLG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344
2.15.6 MAXPLCU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345
3 ACSPL+ Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
3.1 Arithmetical Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348
3.1.1 ABS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
3.1.2 ACOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
3.1.3 ASIN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
3.1.4 ATAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
3.1.5 ATAN2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352

Version NT 2.20 xiii Reference Guide


SPiiPlus Command & Variable Reference Table of Contents

3.1.6 CEIL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352


3.1.7 COS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
3.1.8 EXP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
3.1.9 FLOOR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354
3.1.10 HYPOT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354
3.1.11 LDEXP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355
3.1.12 LOG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355
3.1.13 LOG10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
3.1.14 POW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
3.1.15 SIGN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
3.1.16 SIN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
3.1.17 SQRT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358
3.1.18 TAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358
3.2 Array Processing Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359
3.2.1 AVG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359
3.2.2 COPY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360
3.2.3 FILL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362
3.2.4 MAX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363
3.2.5 MAXI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363
3.2.6 MIN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364
3.2.7 MINI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364
3.3 Miscellaneous Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365
3.3.1 GETCONF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365
3.3.2 SYSINFO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369
3.3.3 GETVAR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370
3.3.4 SETCONF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370
3.3.5 SETVAR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
3.3.6 STR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
3.3.7 STRTONUM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379
3.3.8 NUMTOSTR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380
3.3.9 BCOPY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
3.4 EtherCAT Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383
3.4.1 ECCLRREG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383
3.4.2 ECGETREG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
3.4.3 ECIN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385
3.4.4 ECOUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386
3.4.5 ECGETSLAVES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387
3.4.6 ECUNMAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387
3.4.7 ECUNMAPIN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388
3.4.8 ECUNMAPOUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388
3.5 CoE Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
3.5.1 COEREAD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
3.5.2 COEWRITE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
3.6 Servo Processor Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392
3.6.1 GETSP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
3.6.2 GETSPA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394
3.6.3 GETSPV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394
3.6.4 MONSP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394

Version NT 2.20 xiv Reference Guide


SPiiPlus Command & Variable Reference Table of Contents

3.6.5 MONSPV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396


3.6.6 SETSP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398
3.6.7 SETSPV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398
3.7 Signal Processing Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
3.7.1 DEADZONE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400
3.7.2 DSIGN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
3.7.3 DSTR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403
3.7.4 EDGE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405
3.7.5 INP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406
3.7.6 INTGR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408
3.7.7 LAG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409
3.7.8 MAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411
3.7.9 MAPB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413
3.7.10 MAPN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415
3.7.11 MAPNB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417
3.7.12 MAPNS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418
3.7.13 MAPS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420
3.7.14 MAP2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422
3.7.15 MAP2B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425
3.7.16 MAP2N . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427
3.7.17 MAP2NB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430
3.7.18 MAP2NS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432
3.7.19 MAP2S . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435
3.7.20 MATCH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437
3.7.21 OUTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439
3.7.22 RAND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440
3.7.23 ROLL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441
3.7.24 SAT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442
4 Terminal Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444
4.1 Entering Terminal Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444
4.2 Query Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445
4.2.1 Default Query Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446
4.2.2 Predefined Query Output Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447
4.2.3 User-Defined Query Output Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448
4.3 Program Management Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448
4.3.1 Program Management Command Arguments . . . . . . . . . . . . . . . . . . . . . . . 448
4.3.2 Program Buffer Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450
4.3.2.1 Open/Close Buffer (#) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450
4.3.2.2 D ........................................................ 452
4.3.2.3 F/FI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453
4.3.2.4 L ........................................................ 454
4.3.2.5 PROTECT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456
4.3.2.6 UNPROTECT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456
4.3.3 RESET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457
4.3.4 Listing Program Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457
4.3.4.1 VGR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457
4.3.4.2 VSD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458

Version NT 2.20 xv Reference Guide


SPiiPlus Command & Variable Reference Table of Contents

4.3.4.3 VS/VSG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458


4.3.4.4 VSF/VSGF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460
4.3.4.5 VG/VGF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460
4.3.4.6 VL/VLF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461
4.3.4.7 V/VF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461
4.3.4.8 VSP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462
4.3.4.9 VST/VSGT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463
4.3.4.10 VSTF/VSGTF/VSDT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463
4.3.4.11 VGV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464
4.3.5 Program Handling Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464
4.3.5.1 C ........................................................ 465
4.3.5.2 X ........................................................ 466
4.3.5.3 S/SR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467
4.3.5.4 P ........................................................ 468
4.3.6 Debug Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469
4.3.6.1 XS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469
4.3.6.2 XD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470
4.3.6.3 BS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470
4.3.6.4 BR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471
4.4 System Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472
4.4.1 SI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472
4.4.2 SIR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476
4.4.3 IR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 488
4.4.4 U ......................................................... 489
4.4.5 TD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490
4.4.6 SC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490
4.4.7 ETHERCAT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492
4.4.8 ECMAPREP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 500
4.4.9 CC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 501
4.4.10 PLC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 501
4.4.11 LOG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 502
4.4.12 LOG HOST_TICKS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504
5 SPiiPlus Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506
5.1 ACSPL+ Syntax Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506
5.2 ACSPL+ Compilation Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 523
5.3 ACSPL+ Runtime Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 531
5.4 Motion Termination Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 543
5.5 System Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 549
5.6 EtherCAT Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 553

Version NT 2.20 xvi Reference Guide


SPiiPlus Command & Variable Reference List of Figures

List of Figures
Figure 1 CONNECT Using MAP Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Figure 2 DISABLE and Mechanical Brake Output Process- Positive BONTIME . . . . . 12
Figure 3 DISABLE and Mechanical Brake Output Process - Negative BONTIME. . . . 12
Figure 4 ENABLE and Mechanical Brake Output Process - Positive BOFFTIME . . . . 14
Figure 5 ENABLE and Mechanical Brake Output Process - Negative BOFFTIME . . . 14
Figure 6 ARC1 Coordinate Specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Figure 7 ARC2 Center Point and Rotation Angle Specification . . . . . . . . . . . . . . . . . . . 79
Figure 8 SLAVE /pt Illustration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Figure 9 Single-Axis Motion Using MPTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Figure 10 Two-Axis Group Motion Using MPTP/v . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Figure 11 Results of Example MSEG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Figure 12 PATH...ENDS Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Figure 13 PROJECTION of the XA Plane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Figure 14 FPOS - PROJECTION Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Figure 15 PROJECTION Example - Final Result . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Figure 16 PVSPLINE Motion Diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Figure 17 Use of STOPPER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Figure 18 Corner Processing - Exact Path Option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Figure 19 Illustration of COPY Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361
Figure 20 Illustration of Shift . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395
Figure 21 Symmetrical Dead Zone Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401
Figure 22 Asymmetrical Dead Zone Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
Figure 23 DSIGN Function Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403
Figure 24 EDGE Function Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406
Figure 25 INTGR Function Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409
Figure 26 LAG Function Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410
Figure 27 MAP Example on the Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412
Figure 28 MAPB Example on the Scope. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414
Figure 29 MAPN Example on the Scope. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416
Figure 30 MAPNB Example on the Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418
Figure 31 MAPNS Example on the Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420
Figure 32 MAPS Example on the Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422
Figure 33 MAP2 Example on the Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424
Figure 34 MAP2B Example on the Scope. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427
Figure 35 MAP2N Example on the Scope. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429
Figure 36 MAP2NB Example on the Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432
Figure 37 MAP2NS Example on the Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434
Figure 38 MAP2S Example on the Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437
Figure 39 ROLL Example on the Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442
Figure 40 SAT Example on the Scope. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443
Figure 41 Communication Terminal Window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444
Figure 42 Interaction of Program Buffer States. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464

Version NT 2.20 xvii Reference Guide


SPiiPlus Command & Variable Reference List of Tables

List of Tables
Table 1 Text Format Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iv
Table 2 ACSPL+ Command Syntax Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iv
Table 3 Related Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi
Table 4 ACSPL+ Command Set. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Table 5 DISP Command Option Escape Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Table 6 Type Characters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Table 7 Channel Designation for TRIGGER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Table 8 SPiiPlusNT/DC-LT/HP/LD-x/SPiiPlus SAnt-x Mapping of Engine Inputs to
Physical Inputs (Servo Processor 0) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Table 9 SPiiPlusNT/DC-LT/HP/LD-x/SPiiPlus SAnt-x Mapping of Engine Inputs to
Physical Inputs (Servo Processor 1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Table 10 CMnt-x-320/UDMpm-x-320/UDMpc-x-048/CMba-x-320/CMhp-x-
320/UDMba-x-320/UDMhp-x-320 Mapping of Engine Inputs to Physical Inputs
(Servo Processor 0) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Table 11 UDMlc-x-048/UDIlt-x/UDIhp-x Mapping of Engine Inputs to Physical Inputs
(Servo Processor 0) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Table 12 Mark-1 Inputs to Encoders Mapping for SPiiPlusNT/DC-LT/HP/LD-x /SPiiPlus
SAnt-x Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Table 13 Mark-2 Inputs to Encoders Mapping for SPiiPlusNT/DC-LT/HP/LD-x /SPiiPlus
SAnt-xUnits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Table 14 Mark-1 and Mark-2 Inputs to Encoders Mapping for for CMnt-x-320/
UDMpm-x-320/UDMpc-x-048/CMba-x-320/CMhp-x-320/UDMba-x-
320/UDMhp-x-320 Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Table 15 SPiiPlusNT/DC-LT/HP/LD-x/SPiiPlus SAnt-x Mapping PEG Engines to
Encoders (Servo Processor 0) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Table 16 SPiiPlusNT/DC-LT/HP/LD-x/SPiiPlus SAnt-x Mapping PEG Engines to
Encoders (Servo Processor 1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Table 17 CMnt-x-320/UDMpm-x-320/UDMpc-x-048/CMba-x-320/CMhp-x-320 Mapping
PEG Engines to Encoders (Servo Processor 0) . . . . . . . . . . . . . . . . . . . . . . . . . 46
Table 18 UDMlc-x-048/UDIlt-x/UDIhp-x Mapping PEG Engines to Encoders (Servo
Processor 0) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Table 19 SPiiPlusNT/DC-LT/HP/LD-x/SPiiPlus SAnt-x General Outputs Assignment for
Use as PEG Pulse Outputs (Servo Processor 0) . . . . . . . . . . . . . . . . . . . . . . . . 47
Table 20 SPiiPlusNT/DC-LT/HP/LD-x/SPiiPlus SAnt-x General Outputs Assignment for
Use as PEG Pulse Outputs (Servo Processor 1) . . . . . . . . . . . . . . . . . . . . . . . . 47
Table 21 General CMnt-x-320/UDMpm-x-320 Outputs Assignment for Use as PEG Pulse
Outputs (Servo Processor 0) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Table 22 SPiiPlusNT/DC-LT/HP/LD-x/SPiiPlus SAnt-x Mapping of Engine Outputs to
Physical Outputs (Servo Processor 0) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Table 23 SPiiPlusNT/DC-LT/HP/LD-x/SPiiPlus SAnt-x Mapping of Engine Outputs to
Physical Outputs (Servo Processor 1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Table 24 CMnt-x-320/UDMpm-x-320/UDMpc-x-048 Mapping of Engine Outputs to
Physical Outputs (Servo Processor 0) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Table 25 CMnt-x-320/UDMpm-x-320/UDMpc-x-048 Mapping of Engine Outputs to
Physical Outputs (Servo Processor 0) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

Version NT 2.20 xviii Reference Guide


SPiiPlus Command & Variable Reference List of Tables

Table 26 CMba-x-320/CMhp-x-320/UDMba-x-320/UDMhp-x-320 Mapping of Engine


Outputs to Physical Outputs (Servo Processor 0) . . . . . . . . . . . . . . . . . . . . . . . . 52
Table 27 CMba-x-320/CMhp-x-320/UDMba-x-320/UDMhp-x-320 Mapping of Engine
Outputs to Physical Outputs (Servo Processor 0) . . . . . . . . . . . . . . . . . . . . . . . . 52
Table 28 PEG State Output Signals Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Table 29 Commonly Monitored SPDC Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Table 30 Matrix Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Table 31 IF Control Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Table 32 Alphabetical Listing of All ACSPL+ Variables . . . . . . . . . . . . . . . . . . . . . . . 136
Table 33 AFLAGS Bit Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
Table 34 MFLAGS Bit Designators. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
Table 35 AST Bit Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
Table 36 MST Bit Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
Table 37 LOCALST Bit Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Table 38 NST Bit Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
Table 39 PFLAGS Bit Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
Table 40 PST Bit Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
Table 41 ECST Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
Table 42 Axis Fault Bits. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
Table 43 FDEF Bit Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
Table 44 FMASK Bit Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
Table 45 MERR Return Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
Table 46 SAFINI Valid Bits. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
Table 47 S_FAULT Fault Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
Table 48 S_FDEF Bit Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
Table 49 S_FMASK Bit Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
Table 50 SLCROUT Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
Table 51 SLPROUT Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
Table 52 SLVROUT Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
Table 53 IENA Bit Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
Table 54 ISENA Bit Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
Table 55 S_FLAGS Bit Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
Table 56 COMMCH Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329
Table 57 COMMFL Bit Descriptions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
Table 58 ECHO Channel Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332
Table 59 DISPCH Channel Numbers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334
Table 60 GETCONF Return Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366
Table 61 SYSINFO Return Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369
Table 62 16-bit Binary value Template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371
Table 63 SETCONF Arguments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371
Table 64 Supported Error Counter Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
Table 65 MAP Array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412
Table 66 MAPB Array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414
Table 67 MAPN Array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416
Table 68 MAPNB Array. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418
Table 69 MAPNS Array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420
Table 70 MAPS Array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422
Table 71 MAP2 Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424

Version NT 2.20 xix Reference Guide


SPiiPlus Command & Variable Reference List of Tables

Table 72 MAP2B Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426


Table 73 MAP2N Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429
Table 74 MAP2NB Table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431
Table 75 MAP2NS Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434
Table 76 MAP2S Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436
Table 77 Line Designation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449
Table 78 ACSPL+ Syntax Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506
Table 79 ACSPL+ Compilation Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 523
Table 80 ACSPL+ Runtime Errors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 531
Table 81 ACSPL+ Motion Termination Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 543
Table 82 ACSPL+ System Errors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 549
Table 83 ACSPL+ EtherCAT Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 553

Version NT 2.20 xx Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

1 ACSPL+ Commands
ACSPL+ comes with a complete programming command set. The commands are divided into
following categories:
 Axis Management Commands
 Interactive Commands
 PEG and MARK Commands
 Miscellaneous Commands
 Motion Commands
 Program Flow Commands
 Program Management Commands
This chapter covers the ACSPL+ commands.
The ACSPL+ command set is:

Table 4 ACSPL+ Command Set (page 1 of 4)


Command Action
ARC1 Adds an arc segment to MSEG...ENDS motion.
ARC1 Adds an arc segment to XSEG...ENDS motion
ARC2 Adds an arc segment to MSEG...ENDS motion.
ARC2 Adds an arc segment to XSEG...ENDS motion
PEG_I Assigns PEG input
ASSIGNMARK s
ASSIGNPEG Assigns PEG engine to encoder
ASSIGNPOUTS Assigns PEG outputs
AXISDEF Assigns an alias to an axis
BLOCK...END Performs a group of ACSPL+ commands in one controller cycle.
BREAK Immediately terminates a motion and provides smooth transition to the
next motion in the motion queue.
CALL Calls subroutine.
COMMUT Performs auto commutation for DC brushless (AC servo) motors.
CONNECT Defines a formula for calculating reference position (RPOS).
DC Activates data collection.
DEPENDS Specifies a logical dependence between a motor and axes.
DISABLE Shuts off one or more drives. DISABLE ALL provides DISABLE
operation for all axes.
DISABLEON Disables autoroutine activation in a buffer.
DISP Builds a string and sends it to the default communication channel.

Version NT 2.20 1 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Table 4 ACSPL+ Command Set (page 2 of 4)


Command Action
ECREPAIR Returns the system back to the operational state if one or more slaves
underwent a reset or power cycle.
ENABLE/ENABLEALL Activates one or more drives
ENABLEON Enables autoroutine activation in a buffer.
FCLEAR Clears faults.
GO Starts a motion that was created using the /w command option.
GOTO Transfers program execution to another point in the program.
GROUP Defines an axis-group for coordinate multi-axis motion.
HALT Terminates one or more motions using a third-order deceleration profile
(DEC deceleration).
HALTALL provides HALT operation for all axes.
IF, ELSEIF, ELSE...END IF command structure.
IMM Provides on-the-fly change of motion parameters.
INPUT Suspends program execution pending user input
INTERRUPT Causes an interrupt that can be intercepted by the host.
INTERRUPTEX Causes an interrupt similar to that of the INTERRUPT command.
JOG Creates a jog motion.
KILL Terminates one or more motions using a second-order deceleration
profile and the KDEC deceleration value.
KILL ALL provides KILL operation for all axes.
LINE Adds a linear segment to MSEG...ENDS motion.
LINE Adds a linear segment to XSEG...ENDS motion.
LOOP...END Loop command structure.
MASTER Defines a formula for calculating MPOS.
MPOINT Adds a set of points to MPTP...ENDS, PATH...ENDS or
PVSPLINE...ENDS motion.
MPTP...ENDS Creates a multipoint motion.
MSEG...ENDS Creates a segmented motion.
ON...RET The autoroutine structure. An the autoroutine is automatically executed
when a specific condition is satisfied. The routine interrupts the
currently executing program, executes the commands specified in the
autoroutine body, and then returns control to the interrupted program.
PATH...ENDS Creates an arbitrary path motion with linear interpolation between the
specified points.
PAUSE Suspends program execution in a buffer.
PEG_I Activates incremental PEG, where pulses are generated at predefined,
fixed position intervals.
PEG_R Activates random, table-based PEG, where pulses are generated at
predefined positions.
PLCSTART Cold starts any PLC program in the system.

Version NT 2.20 2 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Table 4 ACSPL+ Command Set (page 3 of 4)


Command Action
PLCSTOP Stops any PLC program that is running.
POINT Adds a point to MPTP...ENDS, PATH...ENDS, or
PVSPLINE...ENDS motion.
PROJECTION An expansion command to the MSEG...ENDS set of commands, that
allows the controller to perform a three dimensional segmented motion
such as creating arcs and lines on a user-defined plane.
PTP Creates a point-to-point motion.
PVSPLINE...ENDS Creates an arbitrary path motion with spline interpolation between the
specified points.
READ Reads an array from a file in the flash memory.
RESUME Resumes program execution in a buffer.
SAFETYCONF Configures fault processing for one or more axes.
SAFETYGROUP Activates the fault response for all axes in the axis_list when any axis
triggers the fault, and manages the axes as a block in response to KILL
and DISABLE.
SEND Same as DISP, but also specifies the communication channel or
channels.
SET Defines the current value of either feedback (FPOS), reference (RPOS),
or axis (APOS) position.
SETPROTECTION Changes protection attribute for a variable.
SLAVE Creates a master-slave motion.
SPDC Activates data collection from a Servo Processor variable.
SPINJECT Initiates the transfer of MPU real-time data to the Servo Processor.
SPLIT SPLIT breaks apart an axis group.
SPLITALL breaks apart all axis groups. See GROUP.
START Activates program execution in a buffer.
STARTPEG Activates PEG motion for specified axis.
STOP Terminates program execution in a buffer.
STOPDC Terminates data collection.
STOPINJECT Stops the transfer of MPU real-time data to the Servo Processor.
STOPPEG Terminates PEG operation.
STOPPER Adds a segment separator to MSEG...ENDS motion.
TILL Delays program execution until a specified expression produces a non-
zero (true) result.
TRACK Creates tracking motion.
TRIGGER Specifies a triggering condition. Once the condition is satisfied, the
controller issues an interrupt to the host computer.
WAIT Delays program execution for a specified number of milliseconds.
WHILE...END While command structure.

Version NT 2.20 3 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Table 4 ACSPL+ Command Set (page 4 of 4)


Command Action
WRITE Writes an array to a file in the flash memory.
XSEG...ENDS Creates extended segment motion.

Version NT 2.20 4 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

1.1 Axis Management Commands


The Axis Management commands are:

Command Action
BREAK Immediately terminates a motion and provides smooth transition to the
next motion in the motion queue.
COMMUT Performs auto commutation for DC brushless (AC servo) motors.
CONNECT Defines a formula for calculating reference position (RPOS).
DEPENDS Specifies a logical dependence between a motor and axes.
DISABLE Shuts off one or more drives. DISABLE ALL provides DISABLE
operation for all axes.
ENABLE/ENABLEALL Activates one or more drives
FCLEAR Clears faults.
GO Starts a motion that was created using the /w command option.
GROUP Defines an axis-group for coordinate multi-axis motion.
HALT Terminates one or more motions using a third-order deceleration profile
(DEC deceleration).
HALTALL provides HALT operation for all axes.
IMM Provides on the fly change of motion parameters.
KILL Terminates one or more motions using a second-order deceleration
profile and the KDEC deceleration value.
KILLALL provides KILL operation for all axes.
SAFETYCONF Configures fault processing for one or more axes.
SAFETYGROUP Creates a safety axis group. When any axis in the group triggers a fault,
the fault affects all axes in the group.
SET Defines the current value of either feedback (FPOS), reference
(RPOS), or axis (APOS) position.
SPLIT SPLIT breaks apart an axis group - see GROUP.
SPLITALL breaks apart all axis groups.

1.1.1 BREAK
Description
BREAK immediately terminates the currently executed motion of the specified axis without
building a deceleration profile, and initiates the next motion in the axis motion queue, if it
exists.
Syntax
BREAK axis_list

Version NT 2.20 5 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Arguments

axis_list Axis or list of axes, valid numbers are: 0, 1, 2, ... up to the number of axes
in the system minus 1.

Comments
BREAK executes differently in the following cases:
1. When the next motion waits in the motion queue, BREAK terminates the current motion
and starts the next motion immediately.
2. When there is no next motion in the motion queue BREAK has no immediate effect. The
current motion continues until the next motion appears in the motion queue. At that moment
the controller breaks the current motion and provides a smooth velocity transition profile
from motion to motion. If the current motion finishes before the next motion comes to the
queue, the command has no effect.
COM Library Methods
Break
C Library Functions
acsc_Break
Example

PTP 0, 1E8 !Move to point 1E8


PTP 0, -1E8 !Add another motion to the motion queue
WAIT 10000 !Wait 10 seconds
BREAK 0 !Terminate the first motion (PTP 0, 1E8)
!and immediately start the next motion:
!(PTP 0, -1E8)
STOP !End program

1.1.2 COMMUT
Description
COMMUT performs auto commutation and may be used when the following conditions hold
true:
 The motor is DC brushless (AC servo)
 The motor is enabled
 The motor is idle
 The axis is already configured and properly tuned
Syntax
COMMUT axis [,excitation_current][,settle_time][,slope]

Version NT 2.20 6 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Arguments

axis The affected axis, valid numbers are: 0, 1, 2, ... up to the number of axes in
the system minus 1.
excitation_current Optional - Given as a percentage of the full current command. The default
value is set to 98% of XRMS.
settle_time Optional - Determines settling time for the auto commutation process
initiated by COMMUT. The default value is 500 msec.
The entire auto commutation process lasts approximately three times
longer, since the command executes the algorithm three times for
verification.
slope Optional - The slope parameter is optional, and used only in special cases.
If a value is assigned to this parameter then the excitation current command
builds up with some slope. The parameter sets the duration of the current
build-up process in milliseconds. It is usually recommended to omit this
parameter, in which case the excitation current is built instantly.

Comments
COMMUT is generally used in auto commutation-based startup programs.
The excitation current, settle time and slope are optional parameters for the auto commutation
process initiated by COMMUT.
Refer to the relevant section in the Setup Guide for a complete description of the commutation
process.
COM Library Methods
Commut, WaitMotorCommutated
C Library Functions
acsc_Commut, acsc_WaitMotorCommutated
Example

COMMUT 0,80,100,30 !Commut 0 axis with an excitation current


!of 80%. Settling time is 100msec, and a
!current build-up slope of 30msec.

1.1.3 CONNECT
Description
CONNECT defines a formula for calculating reference position (RPOS). This formula can
include any other axes variables. DEPENDS must follow CONNECT.
Syntax
CONNECT axis_RPOS = formula

Version NT 2.20 7 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Comments
Care needs to be taken when using complex non-default connections. Especially with
articulated robots, the non-default connections can involve inverse trigonometric functions,
square roots, division, and other mathematical operations that can cause numerical errors when
not properly posed. While it is recommended that CONNECT command be written to avoid
this from occurring, it is not always possible; therefore proper handling of the numerical errors
is necessary.
The following are general guidelines concerning the CONNECT command:
1. The default relation between an axis position (APOS) and its reference (motor) position
(RPOS) is 1:1.
2. Defining a different relation can be very useful for mechanical error corrections, dynamic
error compensation, backlash compensation, inverse kinematics and more.
3. If the CONNECT relation is based on another axis position, it creates a strict link (like a
mechanical connection) between all defined axes for as long as the function is active.
4. The variable MFLAGS<axis>.17 (bit 17) disables or enables a customized (non-default)
CONNECT formula definition. See MFLAGS.
5. After CONNECT it is recommended to initialize ROFFS with the first value in the
correction table (as seen in the example: 

SET RPOS0=MAP(APOS0,ARRAY,100,200)

This forces ROFFS to be zero and prevents the creation of a constant offset to RPOS.
6. ENABLE/ENABLEALL, DISABLE and KILL change the value of ROFFS. Therefore,
if these commands follow CONNECT, then redefine the CONNECT formula, and RPOS
should be initialized to nearest value.
7. To stop motion after using CONNECT, use HALT instead of KILL. HALT does not
affect the ROFFS variable.
If a numerical error occurs when evaluating a non-default connection, the output sent to RPOS
is undefined. As such it is recommended to toggle back to the default connection and then go
back to non-default connection.
When going back to the default connection the simplest way is to set MFLAGS().17. When
this happens RPOS does not change, but APOS will change and be set to RPOS. However, this
sudden change of APOS may also cause a numerical error if APOS is used in a CONNECT
function. If this happens MFLAGS().17 will be set, but the non-default connection will still be
active.
A more robust way of handling this change is to first explicitly change the connect function of
all applicable axes to RPOS = APOS. When this happens neither RPOS nor APOS will change
instantaneously, so no numerical error should occur. Then MFLAGS().17 can be set without
causing a numerical error.
Related ACSPL+ Commands
DEPENDS
Related ACSPL+ Variables
RPOS, APOS, ROFFS

Version NT 2.20 8 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Example

GLOBAL REAL ARRAY(6) !Define ARRAY.


ARRAY(0)=60;ARRAY(1)=40;ARRAY(2)=90;ARRAY(3)=-40;ARRAY(4)=60; ARRAY(5)=10
!Populate Correction point ARRAY for MAP
!function.
MFLAGS(0).17=1 !Set default connection between APOS and
!RPOS (RPOS=APOS).
ENABLE 0 !Enable 0 axis.
MFLAGS(0).17=0 !Set non-default connection between APOS
!and RPOS (RPOS is a function of APOS).
CONNECT RPOS0=APOS0+MAP(APOS0,ARRAY,100,200)
!CONNECT formula between RPOS0 and
!APOS0 using the MAP function with
!correction table ARRAY.
DEPENDS 0,0 !Assign Axis 0 to Motor 0. See DEPENDS.
SET APOS0=0;SET RPOS0=0 !Initialize APOS and RPOS at 0.
PTP 0, MAP(APOS0,ARRAY,100,200)
!Moves axis 0 to the first point in the
!correction ARRAY to avoid a constant
!offset in ROFFS, as explained in Comment 2.
PTP 0, 1300 !Move to 1300. Each point during the motion
!is modified according to the correction
!ARRAY in the MAP function.
STOP !End program

Figure 1 illustrates the results of this example on the SPiiPlus MMI Application Studio Scope.

Figure 1 CONNECT Using MAP Function

Version NT 2.20 9 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

1.1.4 DEPENDS
Description
DEPENDS is used only following CONNECT.
DEPENDS specifies a logical dependence between a physical axis (motor) and the same or
other logical axes. By default, the physical axis (motor) is assigned to its axis. DEPENDS is
necessary because the controller is generally not capable of deriving dependence information
from the CONNECT formula.
Syntax
DEPENDS physical_axis, axis_list
Arguments

physical_axis Physical axis (motor).


axis_list Axis or list of axes, valid numbers are: 0, 1, 2, ... up to the number of axes
in the system minus 1.

Comments
1. Once a CONNECT command is executed, the controller resets the motor dependence
information to the default-the motor depends only on the corresponding axis.
2. If a connection formula actually causes the motor to be dependent on another axis / axes,
the DEPENDS command must follow to specify actual dependence.
Related ACSPL+ Commands
CONNECT
Example
See the examples from CONNECT.

1.1.5 DISABLE
Description
DISABLE deactivates one, several, or using DISABLEALL, all drives. After DISABLE,
RPOS= FPOS which means that no position error exists, or PE<axis> = 0.
Syntax
DISABLE axis_list [,reason]
Arguments

axis_list Axis, or list of axes, valid numbers are: 0, 1, 2, ... up to the number of axes
in the system minus 1.
reason reason is an optional parameter. reason must be an integer constant or
expression that equates to an integer and specifies a reason why the motor
was disabled. If the parameter is specified, its value is stored in the MERR
variable. If the parameter is omitted, MERR stores zero after the disable
operation

Version NT 2.20 10 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Related ACSPL+ Commands


ENABLE/ENABLEALL, FCLEAR, DISABLEALL
Related ACSPL+ Variables
MERR, FPOS, RPOS
COM Library Methods
Disable, DisableM, DisableAll
C Library Functions
acsc_Disable, acsc_DisableM, acsc_DisableAll
Examples:
Figure 4 and Figure 5 illustrate the DISABLE process using positive and negative
BONTIME values.
The examples are followed by screens illustrating the results of DISABLE for both positive and
negative BONTIME.
Example 1:
DISABLE (0,1) !Disables the 0 and 1 motors. A fault
!notification window will be displayed.

Example 2:
DISABLE (0,1), 6100 !Disable 0 and 1 motors, store 6100 as the
!reason. 6100 specifies a user-defined error code
!which is stored in MERR.

Example 3:
DISABLE ALL !Disable all motors.

Version NT 2.20 11 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Figure 2 DISABLE and Mechanical Brake Output Process- Positive BONTIME

Figure 3 DISABLE and Mechanical Brake Output Process - Negative BONTIME

Version NT 2.20 12 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

1.1.6 ENABLE/ENABLEALL
Description
ENABLE activates one or more drives. After ENABLE, the motor starts following the
reference position (RPOS) and axis faults are enabled. ENABLEALL activates all drives.
Syntax
ENABLE|ENABLEALL axis_list
Arguments

axis_list Axis or list of axes, valid numbers are: 0, 1, 2, ... up to the number of axes
in the system minus 1.

Comments
Motor specification is a single axis like 0 or 13, a string of axes enclosed in parentheses and
separated by commas, for example: (0,1,13), or the keyword: ALL for all axes.
Related ACSPL+ Commands
DISABLE
Related ACSPL+ Variables
ENTIME, MFLAGS<axis>.#ENMOD
COM Library Methods
Enable, EnableM, WaitMotorEnabled
C Library Functions
acsc_Enable, acsc_EnableM, acsc_WaitMotorEnabled
Examples
Figure 4 and Figure 5 illustrate the ENABLE process using positive and negative
BOFFTIME values.
Example 1:

ENABLE 0 !Enable 0 axis.

Example 2:

ENABLE (0,1) !Enable 0 and 1 axes.

Version NT 2.20 13 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Figure 4 ENABLE and Mechanical Brake Output Process - Positive BOFFTIME

Figure 5 ENABLE and Mechanical Brake Output Process - Negative BOFFTIME

Version NT 2.20 14 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

1.1.7 FCLEAR
Description
FCLEAR clears the FAULT variable and the results of the previous fault stored in MERR.
Syntax
FCLEAR axis_list
Arguments

axis_list Axis or list of axes, valid numbers are: 0, 1, 2, ... up to the number of axes
in the system minus 1.

Comments
1. Motor specification is a single axis like 0 or 13, a string of axes enclosed in parentheses and
separated by commas, for example: (0,1,13), or the keyword: ALL for all axes.
2. If the axis designation is omitted the command clears the system faults. If an axis is
specified, the command clears the FAULT and MERR components for the specified axes.
However, if the reason for the fault is still active, the controller will immediately set the fault
again following FCLEAR.
3. If one of the cleared faults is an encoder error, FCLEAR also resets the feedback position
to zero.
Related ACSPL+ Variables
MERR, FAULT
COM Library Methods
FaultClear, FalutClearM
C Library Functions
acsc_FaultClear, acsc_FaultClearM
Examples
Example 1:

FCLEAR (0,1) !Clear FAULT and MERR variables for 0 and 1 axes

Example 2:

FCLEAR ALL !Clear FAULT and MERR variables for all axes

Version NT 2.20 15 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

1.1.8 GO
Description
GO starts a motion that has been created using the /w (wait) suffix.
Syntax
GO axis_list
Arguments

axis_list Axis or list of axes, valid numbers are: 0, 1, 2, ... up to the number of axes
in the system minus 1.

Comments
1. Motor specification is a single axis like 0 or 13, a string of axes enclosed in parentheses and
separated by commas, for example: (0,1,13), or the keyword: ALL for all axes.
2. Where GO specifies a single axis, that axis may not be included in any group. GO starts the
last created motion for the same axis. If the motion was not created, or has been started
before, the command has no effect.
3. Where GO specifies a leading axis in a group, GO starts the last created motion for the same
axis group. If the motion was not created, or has been started before, the command has no
effect.
COM Library Methods
Go, GoM
C Library Functions
acsc_Go, acsc_GoM
Related ACSPL+ Commands
HALT, MSEG...ENDS, JOG, MPTP...ENDS, PATH...ENDS, PTP, PVSPLINE...ENDS,
SLAVE, TRACK
Example

PTP/w (0,1), 1000, 1000 !Create PTP motion, but do not start
PTP/w 3, 8000 !Create PTP motion, but do not start
GO (0,1) !Start both motions at the same time

Version NT 2.20 16 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

1.1.9 GROUP
Description
GROUP defines an axis group for coordinate multi-axis motion. The first axis in the axes list
is the leading axis. The motion parameters of the leading axis become the default motion
parameters for all axes in the group. Motion on all axes in a group will start and conclude at the
same time.
Syntax
GROUP axis_list
Arguments

axis_list Axis or list of axes, valid numbers are: 0, 1, 2, ... up to the number of axes
in the system minus 1.

Comments
An axis can belong to only one group at a time. If the application requires restructuring the axes,
it must split the existing group and only then create the new group.
Related ACSPL+ Variables
VEL, ACC, DEC, JERK, KDEC, GVEC, GVEL, GACC, GJERK
Related ACSPL+ Commands
SPLIT
COM Library Methods
Group
C Library Functions
acsc_Group
Example

GROUP (0,1) !Creates an axis group that includes axes 0 and 1.


PTP (0,1), 1000, 10000 !PTP axis 0 to 1000, and axis 1 to 10000.

Version NT 2.20 17 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

1.1.10 HALT
Description
In single axis motion, HALT terminates currently executed motion and clears all other motions
waiting in the axis motion queue. The deceleration profile is defined by DEC (deceleration
variable).
In group motion, HALT terminates currently executed motion of all group axes, and clears all
other motions waiting in the axes motion queues.The deceleration profile is defined by the DEC
(deceleration) variable of the leading axis.
Syntax
HALT axis_list[,reason]
Arguments

axis_list List of axes to be halted.


reason An optional argument, which must be an integer constant or expression that
equates to an integer, and specifies a cause why the axis was halted. If the
parameter is specified, its value is stored in the AERR variable. If the
parameter is omitted, AERR stores 5003 after HALT.

Comments
HALT ALL terminates the motion of all axes.
Related ACSPL+ Commands
KILL
COM Library Methods
Halt, HaltM
C Library Functions
acsc_Halt, acsc_HaltM
Examples
Example 1:

HALT 0 !Terminates 0 axis motion, the deceleration is


! according to DEC(0)

Example 2:

HALT (0,2) !Terminates currently executed motion on axes


!0 and 2.

Example 3:

HALT ALL !Terminates currently executed motion on all axes.

Version NT 2.20 18 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

1.1.11 IMM
Description
In single axis motion, IMM provides on-the-fly changes of the following motion parameters:
 VEL (Velocity)
 ACC (Acceleration)
 DEC (Deceleration)
 JERK (Jerk)
IMM affects the motion in progress and all motions waiting in the corresponding motion queue.
In group motion, IMM provides on-the-fly changes for the motion parameters of the leading
axis only.
Syntax
IMM axis_motion parameter=value or formula
Arguments

axis_motion parameter The motion parameter with the specified axis (valid numbers are: 0, 1, 2, ...
up to the number of axes in the system minus 1).
value or formula User specified value or formula.

Related ACSPL+ Variables


VEL, ACC, DEC, JERK
COM Library Methods
SetAccelerationImm, SetDecelerationImm, SetJerkImm, SetKillDecelerationImm, 
SetVelocityImm
C Library Functions
acsc_SetAccelerationImm, acsc_SetDecelerationImm, acsc_SetJerkImm,
acsc_SetKillDecelerationImm, acsc_SetVelocityImm
Example

IMM VEL(0)=5000 !Immediately change the 0 axis velocity to 5000

1.1.12 KILL
Description
Use KILL after a safety event to decelerate and stop the axis faster than during normal
deceleration and stop.
In single axis motion, KILL terminates currently executed motion and clears all other motions
waiting in the axis motion queue. The deceleration profile uses a second-order deceleration
profile and the KDEC (kill deceleration) value.

Version NT 2.20 19 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

In group motion, KILL terminates currently executed motion only for the specified axes, and
clears all other motions waiting in the axis/axes motion queue.The deceleration profile uses a
second-order deceleration profile and the KDEC (kill deceleration) variable of each axis.
Syntax
KILL axis_list[,reason]
Arguments

axis_list List of axes to be killed, valid numbers are: 0, 1, 2, ... up to the number of
axes in the system minus 1, or ALL for all axes.
reason An optional argument, which must be an integer constant or expression that
equates to an integer, and specifies a cause why the axis was killed. If the
parameter is specified, its value is stored in the MERR variable. If the
parameter is omitted, MERR stores zero after KILL.

Caution
For systems having more than 15 axes, the use of KILL ALL may
cause Over Usage or Servo Processor Alarm faults.

Comments
1. KILL ALL terminates the motion of all axes. The deceleration profile is defined by the
KDEC (kill deceleration) variable of each axis.
2. If several sequential KILL operations specify different causes for the same motor, only the
first cause is stored in MERR and all subsequent causes are ignored.
3. A cause stored in MERR is cleared by FCLEAR or ENABLE/ENABLEALL.
Related ACSPL+ Commands
HALT, FCLEAR, ENABLE/ENABLEALL
Related ACSPL+ Variables
MERR, KDEC
COM Library Methods
Kill, KillAll
C Library Functions
acsc_Kill, acsc_KillAll
Examples
Example 1:

KILL 1 !Kill axis 1 deceleration is according to KDEC(1)

Version NT 2.20 20 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Example 2:

KILL 0, 5011 !Kill 0 axis, store 5011 as the reason.


!Code 5011 corresponds to left limit error;
!therefore the 0 motor will be reported as
!disabled due to fault involving left limit.

Example 3:

KILL (0,1,2) !Kill 0, 1 and 2 axes according to the KDEC


!of each specified axis.

Example 4:

KILL ALL, 6100 !Kills all axes, and stores the cause in MERR.
!(6100 is the code for a user-defined cause.)

1.1.13 SAFETYCONF
Description
SAFETYCONF configures fault processing for one or more axes, by disabling the default
response to a defined axis FAULT, and performs one of the following responses:
 Ignore the interrupt
 Kill the motion
 Disable the axis
 Kill the motion and then disable the axis
Syntax
SAFETYCONF axis_list, fault_name, “conf_string”
Arguments

axis_list Axis or list of axes, valid numbers are: 0, 1, 2, ... up to the number of axes
in the system minus 1.
fault_name Any axis fault name like #LL for left limit.
conf_string A string enclosed in double quotation marks with one or more of the
following characters determines the action of SAFETYCONF:
 K (KILL)
 D (DISABLE)
 KD (KILL-DISABLE)
 + when a fault occurs in any member of the axis_list, the fault response
applies to all axes of the controller (each axis fault response can be
unique)
 - applies FMASK<axis>.#fault-name = 0 for all axes of the controller

Version NT 2.20 21 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Comments
If an empty string is specified, fault detection is enabled, but the controller has no response to
the fault. However, an autoroutine can intercept the fault and provide a response.
Related ACSPL+ Commands
The #SC Communication Terminal command shows the current fault response configuration
for all axes.
Examples
Example 1:

SAFETYCONF 0,#PE,"K" !The 0 motion will be killed if the 0


!Position Error fault occurs.
Example 2:

SAFETYCONF !Changes the response to the Left Limit fault of


(3,5),#LL,"KD"
!3 and 5 axes to KILL and then DISABLE.

Example 3:

SAFETYCONF ALL,#DRIVE,"D+" !All axes will be disabled if the Drive


!Alarm fault occurs in any axis.

Example 4:

SAFETYCONF ALL,#VL,"-" !Velocity Limit fault will be masked for


!all axes.

1.1.14 SAFETYGROUP
Description
SAFETYGROUP activates the fault response for all axes in the axis_list when any axis
triggers the fault, and manages the axes as a block in response to KILL and DISABLE.
To cancel the defined SAFETYGROUP, send the command again with only the first axis as
the axis_list.
Syntax
SAFETYGROUP axis_list
Arguments

axis_list List of axes, valid numbers are: 0, 1, 2, ... up to the number of axes in the
system minus 1.

COM Library Methods


GetSafetyInputPort

Version NT 2.20 22 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

C Library Functions
acsc_GetSafetyInputPort
Examples
Example 1:

SAFETYGROUP (0,1,5) !Creates safety group for axes 0, 1 and 5.

Example 2:

SAFETYGROUP 0 !Cancels the previously created safety group for


!axes 0, 1 and 5.

1.1.15 SET
Description
SET defines the current value of either feedback (FPOS), reference (RPOS), or axis (APOS)
position. SET can be initiated when the axis is disabled, or on-the-fly. APOS and FPOS are
updated automatically when SET is specified for RPOS,
If a non-default CONNECT is used, assign different values to APOS and RPOS.
Related ACSPL+ Variables
RPOS
Syntax
SET axis_RPOS=value or formula
Arguments

axis_RPOS The reference position of the specified axis, valid numbers are: 0, 1, 2, ...
up to the number of axes in the system minus 1.
= The assignment operator
value or formula User-defined value or formula

COM Library Methods


SetRPosition, SetFPosition
C Library Functions
acsc_SetRPosition, acsc_SetFPosition
Example

SET RPOS(0)=300 !Axis 0 RPOS = 300

Version NT 2.20 23 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

1.1.16 SPLIT
Description
SPLIT breaks down a group created using GROUP by designating any axis in the axis list.
SPLIT ALL breaks down all groups.

Note
If the SPLIT command specifying an axis that is currently in motion is
executed within the buffer, the buffer execution is suspended until the motion
is completed. However, if the SPLIT command is sent from the host or as a
Communication Terminal command, it returns error 3087: "Command
cannot be executed while the axis is in motion".

Syntax
SPLIT axis_list
Arguments

axis_list Axis or list of axes, valid numbers are: 0, 1, 2, ... up to the number of axes
in the system minus 1.

Related ACSPL+ Commands


GROUP
COM Library Methods
Split, SplitAll
C Library Functions
acsc_Split, acsc_SplitAll
Examples
Example 1:

GROUP (0,1,5) !Create an axis group including axes 0, 1 and 5.


GROUP (2,3,7) !Create an axis group including axes 2, 3 and 7.
SPLIT 0 !Breaks down axis group 0, 1 and 5.

Example 2:

GROUP (0,1,5) !Create an axis group including axes 0, 1 and 5.


GROUP (2,3,7) !Create an axis group including axes 2, 3 and 7.
SPLIT ALL !Breaks down axis group 0, 1 and 5
!and group 2, 3 and 7.

Version NT 2.20 24 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

1.2 Interactive Commands


The Interactive commands are:

Command Action
DISP Builds a string and sends it to the default communication channel.
INTERRUPT Causes an interrupt that can be intercepted by the host.
INTERRUPTEX Causes an interrupt similar to that of the INTERRUPT command.
SEND Same as DISP, but also specifies the communication channel or
channels.
TRIGGER Specifies a triggering condition. Once the condition is satisfied, the
controller issues an interrupt to the host computer.

1.2.1 DISP
Description
DISP builds an ASCII output string and sends it to a communication channel. The ASCII output
can include text segments and variable values defined in various format displays. The output
string is sent to the default communication channel defined by the standard variable DISPCH.
Syntax
DISP argument [, argument. . .]
Arguments

argument An expression or string where:


Expression:
ACSPL+ expression as one or more variables
String:
"[text] [escape-sequence] [format-specifier]"
String must be enclosed with double quotation marks.
[, argument. . .] Optional subsequent arguments.

Command Options
An input string can include one or more of the following:
 Text
Escape Sequence - appears in the output string as a non-printing character or other
specified character, as described in Table 5.
 Formatting Specification - determines how the results of an expression that follows the
input string is formatted in the output string.

Version NT 2.20 25 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Table 5 DISP Command Option Escape Sequences


Escape Sequence Added Character to Output String
\r Carriage return - 0x0d
\s Avoid carriage return
\n New line - 0x0a
\t Horizontal tab - 0x09
\xHH Any ASCII character where HH represents the ASCII code of the
character.

Note
The output format specification syntax adheres to a restricted version of the
C language syntax.

The format specification syntax is:


% [width] [.precision] type
where:

[width] Optional specification for the minimum number of characters in the


output. If width is smaller than the number of digits of a displayed
number, the specified width is ignored, and the displayed number
includes all digits.
[.precision] Optional number that specifies the maximum number of characters
printed for all or part of the output field, or the minimum number of digits
printed for integer values.
type Required character that determines whether the associated argument is
interpreted as a character, a string, or a number, described in Table 6.

Table 6 Type Characters (page 1 of 2)


Type Output Format
d Signed decimal integer
u Unsigned decimal integer
x Unsigned hexadecimal integer, using "abcdef"
X Unsigned hexadecimal integer, using "ABCDEF"
e Signed value having the form [ - ]d.dddd e [sign]ddd where d is a single decimal digit,
dddd is one or more decimal digits, ddd is exactly three decimal digits, and sign is + or -.
E Identical to the e format except that E rather than e introduces the exponent.
f Signed value having the form [ - ]dddd.dddd, where dddd is one or more decimal digits.
The number of digits before the decimal point depends on the magnitude of the number,
and the number of digits after the decimal point depends on the requested precision.

Version NT 2.20 26 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Table 6 Type Characters (page 2 of 2)


Type Output Format
g Signed value printed in f or e format, whichever is more compact for the given value and
precision. The e format is used only when the exponent of the value is less than -4 or
greater than or equal to the precision argument. Trailing zeros are truncated, and the
decimal point appears only if one or more digits follow it.
G Identical to the g format, except that E, rather than e, introduces the exponent (where
appropriate).

Comments
1. If an input string argument contains n format specifiers, the specifiers apply to the n
subsequent expression arguments.
2. DISP processes arguments from left to right, as follows:
a. Expressions: The expression is evaluated and the ASCII representation of the result is
placed in the output string. The format of the result is determined by the formatting
specifications (if any) in the input string.
b. Input strings: Text is sent as-is to the output string. Escape sequences are replaced by
the ASCII codes that they represent. Formatting specifications are applied to the results
of any expressions that follow the string.
3. DISP cannot be used from the SPiiPlus MMI Application Studio Communication
Terminal, only from a program buffer.
4. DISP can only display the value of a single element of an array.
In order to receive unsolicited messages by a host application, perform the following:
1. Set DISPCH to -2.
2. Set bit 4 of COMMFL to 1.
3. Send SETCONF(306,-1,1) from the same communication channel where unsolicited
messages are expected to be received.
In order to stop the receipt of unsolicited messages by a host application: send
SETCONF(306,-1,0) from the same communication channel where there is no need any more
to receive unsolicited messages.
Related ACSPL+ Commands
SEND, SETCONF
Related ACSPL+ Variables
DISPCH, COMMFL
COM Library Methods
OpenMessageBuffer, GetSingleMessage, CloseMessageBuffer
C Library Functions
acsc_OpenMessageBuffer, acsc_GetMessage, acsc_CloseMessageBuffer

Version NT 2.20 27 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Examples
Example 1:

DISP "%15.10f",FPOS0 !Display FPOS0 in 15 digits with 10 digits


!following the decimal point.
!Output: 997.2936183303
STOP

Example 2:

DISP "0 FVEL=%15.10f", FVEL0


!Output: 0 FVEL= 997.2936183303
STOP

Example 3:

DISP "%1i",IN0.2 !Output: the current state of IN0.2 as


!one digit 0 or 1.
STOP

Example 4:

DISP "IN0 as hex: %04X",IN0


!Output: IN0 as hex: 0A1D
STOP

Example 5:

DISP "IN0.0-3 as binary: %1u%1u%1u%1u", IN0.0,IN0.1,IN0.2,IN0.3


!Output: IN0.0-3 as binary: 0110
STOP

Example 6:

DISP "Elapsed time is: ", TIME


!Output: Elapsed time is: 4.93258E+006
STOP

Example 7:

DISP "Expression, default formating:", FPOS0*2+FPOS1+5 , FPOS1


!Output: Expression, default formatting: 6.28657
!0.286485
STOP

Version NT 2.20 28 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Example 8:

REAL AXIS_NAME ; AXIS_NAME=0 ;


DISP "Axis",AXIS_NAME," was disabled due to error code", MERR(AXIS_NAME)
!Display the reason of axis disable due to a fault.
!Output: Axis 0 was disabled due to error code 0
STOP

Example 9:

DISP "%5i\r", FPOS0, "%5i", FPOS1


!Standard format, minimum 5 positions, no decimals,
!and a carriage return between the two values.
!Output:
!711
!2024
STOP

Example 10:

DISP "Hexadecimal format: %08X", MFLAGS(0), " and also %08x", MFLAGS(0)
!Hexadecimal format, minimum 8 positions, capital
!letters or lower case letters.
!Output: Hexadecimal format: 002A2300 and also
!002a2300
STOP

Example 11:

DISP "0 FPOS: %15.3e", FPOS0," and 1 FPOS: %15.3e", FPOS1


!Scientific format, minimum 15 positions, 3 decimals
!of FPOS0 and FPOS1.
!Output:
!0 FPOS: 5.000e-001 and
!1 FPOS: 2.865e-001
STOP

Example 12:

REAL AAA; !Standard or scientific format, small letters or


!capital letters.
AAA=10; !Assigning integer value to AAA
DISP "%g", AAA; !Output: 10
AAA=1e9 !Assigning Hex value to AAA
DISP "%g", AAA !Output: 1e+009
DISP "%G", AAA !Output: 1E+009
STOP

Version NT 2.20 29 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

1.2.2 INTERRUPT
Description
INTERRUPT causes an unconditional trigger that is intercepted by the host. Once a program
executes INTERRUPT, the interrupt signal is sent to the host application. This interrupt is
detected by the COM library EnableEvent or C Library acsc_SetCallBack functions which
then call interrupt type ACSC_INTR_ACSPL_PROGRAM.
Syntax
INTERRUPT
Related ACSPL+ Commands
TRIGGER
COM Library Methods
EnableEvent, DisableEvent, SetCallbackMask, SetCallbackPriority, GetCallbackMask
C Library Functions
acsc_InstallCallback, acsc_SetCallbackMask, acsc_SetCallbackPriority,
acsc_GetCallbackMask
Examples
Example 1:
INTERRUPT used in an ACSPL+ program:

ENABLE 0 !Enable axis 0


SET FPOS0=0 !Set axis 0 feedback position = 0
PTP 0, 1000 !ACSPL+ executes a PTP motion.
TILL MST(0).#MOVE=0 !The motor reaches the destination point
!and stops.
INTERRUPT !INTERRUPT is sent to the host application.
STOP

Example 2
INTERRUPT used in a Host COM Lib application:

SET ch = New Channel !Initialize ch as a COM library object


CALL ch.EnableEvent(ch.ACSC_INTR_ACSPLPROGRAM)
!Enable INTERRUPT as an event. The host application
!waits for an interrupt from the controller initiated
!by INTERRUPT from within the ACSPL+ program.
Private Sub ch_ACSPLPROGRAM(ByVal Param As Long) MsgBox ("Motion is Stopped")
!When an interrupt occurs, launch a message box
!displaying “Motion is Stopped”
EndSub

Version NT 2.20 30 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Example 3
INTERRUPT used in a Host C Lib application:

int WINAPI CallbackInput (unsigned __int64 Param,void* UserParameter);


// will be defined later

int CardIndex;//Some external variable, which contains card index
// set callback function to monitor digital inputs
if (!acsc_InstallCallback(Handle, // communication handle
CallbackInput, // pointer to the user callback function
&CardIndex, // pointer to the index
ACSC_INTR_INPUT // Type of callback
))
{
printf("callback registration error: %d\n", acsc_GetLastError());
}

// If callback was installed successfully, the CallbackInput function will
// be called each time the any digital input has changed from 0 to 1.
// CallbackInput function checks the digital inputs 0 and 1
int WINAPI CallbackInput (unsigned __int64 Param,void* UserParameter)
{
if (Param & ACSC_MASK_INPUT_0 && *UserParameter == 0)
//Treat input 0 only for card with index 0
{
// input 0 has changed from 0 to 1
// doing something here
}
if (Param & ACSC_MASK_INPUT_1 && *UserParameter == 1)
//Treat input 1 only for card with index 1
{
// input 1 has changed from 0 to 1
// doing something here
}
return 0;
}

1.2.3 INTERRUPTEX
Description
The INTERRUPTEX command operates in a manner similar to INTERRUPT but has the
following differences:
 It triggers the dedicated call-back ACSC_INTR_ACSPL_PROGRAM_EX (21)
 It receives two mandatory integer parameters. Their values will be passed along with the
interrupt to the host instead of the buffer mask passed in the old INTERRUPT function as
a 64-bit integer.

Version NT 2.20 31 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

 Adjacent (“glued”) interrupts are processed differently (because parameters are not
OR’ed):
• There is an internal queue of 100
• The next interrupt value will be triggered only after C Library delivers the previous one
• The maximum output rate is 1 interrupt per CTIME
• On queue overflow, the interrupt is lost
Syntax
INTERRUPTEX (32-bit_high_value,32-bit_low_value)
Arguments
32-bit_high_value Most significant value of a combined 64-bit integer
32-bit_low_value Least significant value of a combined 64-bit integer

Comments
INTERRUPTEX is supported by both by SPiiPlusNT and SPiiPlusSC products. For the
SPiiPlusSC-HP products, the interrupt is passed via Shared Memory, which makes it very fast
(100+(Cycle-time)/2 for the round trip on the average). For the SPiiPlusNT and the
SPiiPlusSC-LT products, the interrupt is passed via the communication channel
(Ethernet/Serial RS-232).

Note
An application that uses C Library must make sure to empty the queue,
register the callback and wait enough time until the queue is empty.

The parameters are passed to the host as a single 64-bit integer with the first parameter as the
32-bit most significant value word and the second parameter is the 32-bit least significant word.
COM Library Methods
EnableEvent, DisableEvent, SetCallbackMask, SetCallbackPriority, GetCallbackMask
C Library Functions
acsc_InstallCallback, acsc_SetCallbackMask, acsc_SetCallbackPriority,
acsc_GetCallbackMask
Examples
Example 1:

Enable 0 ! Enable axis 0


SET FPOS0=0 ! Set axis 0 position to 0
PTP/e 0,1000 ! Move to position 1000
INTERRUPTEX (0x12, 0x34) ! interrupt with parameter, host will receive
! 0x0000001200000034
Stop

Version NT 2.20 32 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Example 2:

Global integer interrupt_description (0x100)


Global integer interrupt_queue
interrupt_queue = 0
interrupt_buff =0 ! No pending interrupts
Enable 0 ! Enable axis 0
SET FPOS0=0 ! Set axis 0 position to 0
interrupt_description(interrupt_queue)= 0x1 ! Setting description to 1
! indicating pre-motion
! state
interrupt_queue = (interrupt_queue+1)&0xff ! One more pending interrupt
INTERRUPTEX (0x00, interrupt_queue)! Interrupt description in
! interrupt_description (0)
PTP/e 0,1000 ! Move to position 1000
interrupt_description(interrupt_queue) = 0x2 ! Setting description to 2
! indicating post-motion
! state
interrupt_queue = (interrupt_queue+1)&0xff! One more pending interrupt
INTERRUPTEX (0x00, interrupt_queue) ! Interrupt description in
! interrupt_description (1)
Stop

Version NT 2.20 33 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

1.2.4 SEND
Description
SEND is the same as DISP, but also specifies the communication channel for the output string.
Syntax
SEND channel_number, argument [, argument. . .]
Arguments

channel-number An integer that defines the communication channel to which the message
will be sent, as follows:
-2: All channels
-1: Last used channel
1: Serial Port 1
2: Serial Port 2
6: Ethernet network (TCP)
7: Ethernet network (TCP)
8: Ethernet network (TCP)
9: Ethernet network (TCP)
10: Ethernet point-to-point (UDP)
16: MODBUS Slave
36: Ethernet network (TCP)
37: Ethernet network (TCP)
38: Ethernet network (TCP)
39: Ethernet network (TCP)
argument An expression or string where:
Expression:
ACSPL+ expression as one or more variables
String:
"[text] [escape-sequence] [format-specifier]"
String must be enclosed with double quotation marks.
[, argument. . .] Optional subsequent arguments.

Command Options
For a list of Command Options, relevant Comments, and Examples, see DISP.
Related ACSPL+ Commands
DISP
Related ACSPL+ Variables
DISPCH
COM Library Methods
Send
C Library Functions
acsc_Send

Version NT 2.20 34 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

1.2.5 TRIGGER
Description
TRIGGER specifies a triggering condition. Once the condition is satisfied, the controller
issues an interrupt to the host computer, as follows:
1. Sets AST<axis>.#TRIGGER = 0
2. Examines the triggering condition every MPU cycle
Once the condition is satisfied, the controller performs the following:
1. Sets AST<axis>.#TRIGGER = 1
2. Produces an interrupt to the host application (software interrupt 10, enabled by IENA.26).
The controller continues calculating the TRIGGER expression until another TRIGGER
command is executed in the same channel. Each time the expression changes its value from zero
to non-zero, the controller sets AST<axis>.#TRIGGER = 1 and causes an interrupt.

Note
Full application of the TRIGGER command to channels greater than 7 is
not currently supported.

Syntax
TRIGGER channel, expression[, timeout]
Arguments
channel An integer number from 0 to 7 that specifies the trigger’s sequential
number. The number defines the AST element where the triggering bit
will be set and defines the bit in the interrupt tag that is automatically sent
to the host application as an interrupt.
expression Specifies the triggering condition. After TRIGGER is executed, the
controller checks the expression condition each MPU cycle. Triggering
occurs when the expression condition is satisfied. If the argument is
omitted, triggering in the specified channel is disabled.
timeout Specifies triggering timeout in milliseconds. A positive number specifies
the time allowed for the triggering condition to be satisfied. If the timeout
has elapsed and the triggering condition has not been satisfied, the
controller unconditionally raises the trigger bit. After any triggering, the
controller resets timeout counting to zero. If the argument is omitted,
triggering works without timeout.

Table 7 Channel Designation for TRIGGER


Channel Triggering Bit Hexadecimal Interrupt Tag
(Software Interrupt 10)
0 AST0.11 0x00000001
1 AST1.11 0x00000002

Version NT 2.20 35 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Table 7 Channel Designation for TRIGGER


Channel Triggering Bit Hexadecimal Interrupt Tag
(Software Interrupt 10)
2 AST2.11 0x00000004
3 AST3.11 0x00000008
4 AST4.11 0x00000010
5 AST5.11 0x00000020
6 AST6.11 0x00000040
7 AST7.11 0x00000080

Related ACSPL+ Commands


INTERRUPT
Related ACSPL+ Variables
IENA, AST
COM Library Methods
GetCallbackMask, SetCallbackMask
C Library Functions
acsc_GetCallbackMask, acsc_SetCallbackMask
Example

TRIGGER 1, MST(0).#MOVE=0, 3000


!1 – once the triggering condition is satisfied,
!the triggering bit AST1.#TRIGGER will be set
!to "1", and the interrupt tag to the host
!application is 0x00000002.
!MST(0).#MOVE=0 – the triggering condition.
!Actuate trigger interrupt when the motor in
!the 0 axis is in position (not moving).
!3000 – check the triggering condition for
!3000 msec. If the triggering condition is not
!satisfied after 3000 msec, then set the
!triggering bit AST(1).TRIGGER to "1".

Version NT 2.20 36 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

1.3 PEG and MARK Commands


The PEG and MARK commands are:
Command Action
ASSIGNFINS Assigns input pins.
ASSIGNMARK Assigns MARK inputs pins to encoders.
ASSIGNPEG Assigns PEG engines to encoders.
ASSIGNPOUTS Assigns PEG outputs.
PEG_I Activates incremental PEG, where pulses are generated at predefined,
fixed position intervals.
PEG_R Activates random, table-based PEG where predefined pulses are
generated at pre-defined positions.
STARTPEG Starts PEG motion for specified axis.
STOPPEG Terminates PEG motion.

Version NT 2.20 37 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

1.3.1 ASSIGNFINS
Description
The ASSIGNFINS function is used for setting input pins assignment and mapping between
FGP_IN signals to the bits of the IN variable.

Note
The axis and input/output assignments of a unit can be obtained by running
#SI in the SPiiPlus MMI Appication Studio Communication Terminal. For
example, the following is a fragment from the response to this command:
Axes Assignment: 0,1,2,3,4,5,6,7

Inputs/Outputs Assignment:
Digital inputs (IN): 0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7
Digital outputs (OUT): 0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7
Analog inputs (AIN): 0,1,2,3
Analog outputs (AOUT): 0,1,2,3
HSSI channels: 4
Ext. inputs (EXTIN): 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
Ext. outputs (EXTOUT): 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15

Syntax
ASSIGNFINS axis, input_index, bit_code
Arguments
axis Any axis number of the same unit.
input_index 0 for IN_0, 1 for IN_1, ..., 9 for IN_9.
bit_code Bit code for mapping engines inputs to physical inputs according to
Table 8 and Table 9 for SPiiPlusNT/DC-LT/HP/LD-x/SPiiPlus SAnt-x,
Table 10 for SPiiPlus CMnt-x-320/UDMpm-x-320/UDMpc-x-
048/CMba-x-320/CMhp-x-320/UDMba-x-320/UDMhp-x-320 units, and
Table 11 for UDMlc-x-048/UDIlt-x/UDIhp-x.

Table 8 SPiiPlusNT/DC-LT/HP/LD-x/SPiiPlus SAnt-x Mapping of Engine


Inputs to Physical Inputs (Servo Processor 0)
Bit Code IN_3 IN_2 IN_1 IN_0
MARK-1 Y MARK-1 X
000 None None None None
(default)
111 Reserved Reserved FGP_IN1 FGP_IN0

Version NT 2.20 38 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Table 9 SPiiPlusNT/DC-LT/HP/LD-x/SPiiPlus SAnt-x Mapping of Engine


Inputs to Physical Inputs (Servo Processor 1)
Bit Code IN_7 IN_6 IN_5 IN_4
MARK-1 T MARK-1 Z
000 None None None None
(default)
111 Reserved Reserved FGP_IN3 FGP_IN2

Table 10 CMnt-x-320/UDMpm-x-320/UDMpc-x-048/CMba-x-320/CMhp-x-
320/UDMba-x-320/UDMhp-x-320 Mapping of Engine Inputs to
Physical Inputs (Servo Processor 0)
Bit Code IN_3 IN_2 IN_1 IN_0
MARK-1 Y MARK-1 X
000 None None None None
(default)
111 Reserved Reserved FGP_IN1 FGP_IN0

Table 11 UDMlc-x-048/UDIlt-x/UDIhp-x Mapping of Engine Inputs to Physical


Inputs (Servo Processor 0)
Bit Code IN_3 IN_2 IN_1 IN_0
MARK-1 T MARK-1 Z MARK-1 Y MARK-1 X
000 None None None None
(default)
111 FGPIN3 FGPIN2 FGP_IN1 FGP_IN0

Note
The Bit Code: 111, both for Servo Processor 0 and Servo Processor 1, is
used for switching the physical input pins to Fast General Purpose Inputs:
FGP_IN0 to FGP_IN3. The state of the Fast General Purpose Inputs can
be read or changed using the ACSPL+ IN(x) variable. The Fast General
Purpose Inputs are mapped as follows:
FGP_IN0 is mapped to bit 16 of the IN(x) variable
FGP_IN1 is mapped to bit 17 of the IN(x) variable
FGP_IN2 is mapped to bit 18 of the IN(x) variable
FGP_IN3 is mapped to bit 19 of the IN(x) variable
All other physical input pins are unaffected.
Bit Codes 001-110 are not used.

Version NT 2.20 39 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Comments
ASSIGNFINS is a blocking command in the sense that the ACSPL+ program moves to the next
line or command only after this command has been fully executed or an error is generated.
Related ACSPL+ Commands
ASSIGNPEG, ASSIGNPOUTS, PEG_I, PEG_R, STARTPEG, STOPPEG
COM Library Methods
None
C Library Functions
acsc_AssignFastInputsNT

Version NT 2.20 40 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

1.3.2 ASSIGNMARK
Description
The ASSIGNMARK function is used for Mark inputs-to-encoder assignment. It allows
mapping available physical Mark inputs pins to different encoders..
Syntax
assignmark axis, mark_type, inputs_to_encoder_bit_code
Arguments
Axis Axis index

mark_type 1 for Mark-1


2 for Mark-2

inputs_to_encoder_bit_code Bit code for inputs-to-encoders mapping according to Table 12


and Table 13 for SPiiPlusNT/DC-LT/HP/LD-x/SPiiPlus SAnt-x
units, or Table 14 for CMnt-x-320/UDMpm-x-320/UDMpc-x-048
/CMba-x-320/CMhp-x-320/UDMba-x-320/UDMhp-x-320 units.

Table 12 Mark-1 Inputs to Encoders Mapping for SPiiPlusNT/DC-LT/HP/LD-x


/SPiiPlus SAnt-x Units
Bit code Encoder Encoder Encoder Encoder Encoder Encoder Encoder Encoder
0(X) 1(Y) 4(Z) 5(T) 2(A) 3(B) 6(C) 7(D)
00000 0(X) 1(Y) 4(Z) 5(T) - - - -
(default)
00001 1(Y) 4(Z) 5(T) 0(X) - - - -
00010 4(Z) 5(T) 0(X) 1(Y) - - - -
00011 5(T) 0(X) 1(Y) 4(Z) - - - -
00100 - 1(Y) 4(Z) 5(T) 0(X) - - -
00101 0(X) - 4(Z) 5(T) - 1(Y) - -
00110 0(X) 1(Y) - 5(T) - - 4(Z) -
00111 0(X) 1(Y) 4(Z) - - - - 5(T)
01000 - - 4(Z) 5(T) 0(X) 1(Y) - -
01001 0(X) 1(Y) - - - - 4(Z) 5(T)
01010 0(X) - - - - 1(Y) 4(Z) 5(T)
01011 - 1(Y) - - 0(X) - 4(Z) 5(T)
01100 - - 4(Z) - 0(X) 1(Y) - 5(T)
01101 - - - 5(T) 0(X) 1(Y) 4(Z) -
01110 - - - - 0(X) 1(Y) 4(Z) 5(T)
01111 - - - - 1(Y) 4(Z) 5(T) 0(X)
10000 - - - - 4(Z) 5(T) 0(X) 1(Y)
10001 - - - - 5(T) 0(X) 1(Y) 4(Z)

Version NT 2.20 41 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Table 13 Mark-2 Inputs to Encoders Mapping for SPiiPlusNT/DC-LT/HP/LD-x


/SPiiPlus SAnt-xUnits
Bit code Encoder Encoder Encoder Encoder Encoder Encoder Encoder Encoder
0(X) 1(Y) 4(Z) 5(T) 2(A) 3(B) 6(C) 7(D)
00000 GP IN6 GP IN7 GP IN4 GP IN5 - - - -
(default)
00001 GP IN7 GP IN4 GP IN5 GP IN6 - - - -
00010 GP IN4 GP IN5 GP IN6 GP IN7 - - - -
00011 GP IN5 GP IN6 GP IN7 GP IN4 - - - -
00100 - GP IN7 GP IN4 GP IN5 GP IN - - -
00101 GP IN6 - GP IN4 GP IN5 - GP IN7 - -
00110 GP IN6 GP IN7 - GP IN5 - - GP IN4 -
00111 GP IN6 GP IN7 GP IN4 - - - - GP IN5
01000 - - GP IN4 GP IN5 GP IN6 GP IN7 - -
01001 GP IN6 GP IN7 - - - - GP IN4 GP IN5
01010 GP IN6 - - - - GP IN7 GP IN4 GP IN5
01011 - GP IN7 - - GP IN6 - GP IN4 GP IN5
01100 - - GP IN4 - GP IN6 GP IN7 - GP IN5
01101 - - - GP IN5 GP IN6 GP IN7 GP IN4 -
01110 - - - - GP IN6 GP IN7 GP IN4 GP IN5
01111 - - - - GP IN7 GP IN4 GP IN5 GP IN6
10000 - - - - GP IN4 GP IN5 GP IN6 GP IN7
10001 - - - - GP IN5 GP IN6 GP IN7 GP IN4

Note In Table 12 and Table 13, the Bit code affects all of the inputs in the row.
For example, Bit code: 00010 performs the following assignments for these
inputs:
Mark-1 4(Z)—Encoder 0(X)
Mark-1 5(T)—Encoder 1(Y)
Mark-1 0(X)—Encoder 4(Z)
Mark-1 1(Y)—Encoder 5(T)

Version NT 2.20 42 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Table 14 Mark-1 and Mark-2 Inputs to Encoders Mapping for for CMnt-x-320/
UDMpm-x-320/UDMpc-x-048/CMba-x-320/CMhp-x-320/UDMba-x-
320/UDMhp-x-320 Units
Bit Encoder 0(X) Encoder 1(Y) Encoder 2(A) Encoder 3(B)
code Mark-1 Mark-2 Mark-1 Mark-2 Mark-1 Mark-2 Mark-1 Mark-2
Input Input Input Input Input Input Input Input
000 Mark-1 Mark-2 Mark-1 Mark-2 Mark-1 GP IN6 Mark-1 GP IN7
(deafult) 0(X) 0(X) 1(Y) 1(Y) 0(X) 1(Y)
001 GP IN6 Mark-1 Mark-1 Mark-1 Mark-2 Mark-1 Mark-1 Mark-1
1(Y) 0(X) 1(Y) 0(X) 1(Y) 0(X) 1(Y)
010 - Mark-2 GP IN4 GP IN5 GP IN6 Mark-2 GP IN6 -
1(Y) 1(Y)
011 - GP IN7 GP IN6 GP IN7 - GP IN7 - -

Version NT 2.20 43 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

1.3.3 ASSIGNPEG
Description
Position Event Generation (PEG) is a fast output based on an axis position with sub
microsecond delay. The ASSIGNPEG function is used for engine-to-encoder assignment as
well as for the additional digital outputs assignment for use as PEG pulse outputs.

Note
The axis and input/output assignments of a unit can be obtained by running
#SI in the SPiiPlus MMI Appication Studio Communication Terminal. For
example, the following is a fragment from the response to this command:
Axes Assignment: 0,1,2,3,4,5,6,7

Inputs/Outputs Assignment:
Digital inputs (IN): 0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7
Digital outputs (OUT): 0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7
Analog inputs (AIN): 0,1,2,3
Analog outputs (AOUT): 0,1,2,3
HSSI channels: 4
Ext. inputs (EXTIN): 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
Ext. outputs (EXTOUT): 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15

Syntax
ASSIGNPEG axis, engines_to_encoders_code, dig_out_assign_code
Arguments
axis Any axis number of the same unit.
engines_to_encoders_ Bit code for engines-to-encoders mapping according to Table 15 and
code Table 16 for SPiiPlusNT/DC-LT/HP/LD-x/SPiiPlus SAnt-x, Table 17
for CMnt-x-320/UDMpm-x-320/UDMpc-x-048/CMba-x-320/CMhp-x-
320/UDMba-x-320/UDMhp-x-320, and Table 18 for SPiiPlusUDMlc-x-
048/UDIlt-x/UDIhp-x.
dig_out_assign_code General Purpose outputs assignment to use as PEG pulse outputs
according to Table 19 and Table 20 for SPiiPlusNT/DC-LT/HP/LD-
x/SPiiPlus SAnt-x, or Table 21 for CMnt-x-320\UDMpm-x-320 units.

Version NT 2.20 44 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Table 15 SPiiPlusNT/DC-LT/HP/LD-x/SPiiPlus SAnt-x Mapping PEG Engines to


Encoders (Servo Processor 0)
Bit Servo Processor 0
Code
Encoder 0(X) Encoder 1(Y) Encoder 2(A) Encoder 3(B)
000 PEG0 PEG1 PEG2 no
(default)
001 PEG0 PEG1 no PEG2
010 PEG0 PEG1 no no
PEG2
011 PEG0 PEG1 no no
PEG2
100 PEG0 no no no
PEG1
PEG2
101 no PEG0 no no
PEG1
PEG2

Table 16 SPiiPlusNT/DC-LT/HP/LD-x/SPiiPlus SAnt-x Mapping PEG Engines to


Encoders (Servo Processor 1)
Bit Servo Processor 1
Code
Encoder 4(Z) Encoder 5(T) Encoder 6(C) Encoder 7(D)
000 PEG4 PEG5 PEG6 no
(default)
001 PEG4 PEG5 no PEG6
010 PEG4 PEG5 no no
PEG6
011 PEG4 PEG5 no no
PEG6
100 PEG4 no no no
PEG5
PEG6
101 no PEG4 no no
PEG5
PEG6

Version NT 2.20 45 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Table 17 CMnt-x-320/UDMpm-x-320/UDMpc-x-048/CMba-x-320/CMhp-x-320
Mapping PEG Engines to Encoders (Servo Processor 0)
Bit Servo Processor 0
Code Encoder 0(X) Encoder 1(Y) Encoder 2(A) Encoder3(B)
000 PEG0 PEG1 PEG2 no
(default)
001 PEG0 PEG1 no PEG2*
010 PEG0 PEG1 no no
PEG2
011 PEG0 PEG1 no no
PEG2
100 PEG0 no no no
PEG1
PEG2
101 no PEG0 no no
PEG1
PEG2
110 no no PEG0** no
PEG1**
PEG2**
111 no no PEG0** PEG1*
PEG2**

* These combinations are supportef for CMnt-x-320\UDMpm-x-320 only.


** These combinations are not supported by UDMpc-x-048.

Table 18 UDMlc-x-048/UDIlt-x/UDIhp-x Mapping PEG Engines to Encoders


(Servo Processor 0)
Bit Servo Processor 0
Code Encoder 0(X) Encoder 1(Y) Encoder 2(A) Encoder3(B)
000 PEG0 no no no
(default)
001 no PEG0 no no
010 no no PEG0 no
011 no no no PEG0
100 no no no no
101 no no no no
110 no no no no

Version NT 2.20 46 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Note
In Table 15, Table 16 and Table 17 the Bit Code affects all of the
connectors in the row, for example, the Bit Code: 001 for those connectors
controlled by Servo Processor 0 performs the following assignments:
PEG0  Encoder 0
PEG1  Encoder 1
PEG2  Encoder 3

Table 19 SPiiPlusNT/DC-LT/HP/LD-x/SPiiPlus SAnt-x General Outputs


Assignment for Use as PEG Pulse Outputs (Servo Processor 0)
Bit Code Servo Processor 0
GP Out 0 GP Out 1 GP Out 2 GP Out 3
0000 (default) GP Out 0 GP Out 1 GP Out 2 GP Out 3
0001 PEG0_PULSE GP Out 1 GP Out 2 GP Out 3
0010 GP Out 0 PEG2_PULSE GP Out 2 GP Out 3
0011 GP Out 0 GP Out 1 PEG1_PULSE GP Out 3
0100 GP Out 0 GP Out 1 GP Out 2 Reserved
0101 GP Out 0 PEG2_PULSE GP Out 2 Reserved
0110 PEG0_PULSE GP Out 1 PEG1_PULSE GP Out 3
0111 PEG0_PULSE PEG2_PULSE PEG1_PULSE Reserved
1000 - 1111 Reserved Reserved Reserved Reserved

Table 20 SPiiPlusNT/DC-LT/HP/LD-x/SPiiPlus SAnt-x General Outputs


Assignment for Use as PEG Pulse Outputs (Servo Processor 1)
Bit Code Servo Processor 1
GP Out 4 GP Out 5 GP Out 6 GP Out 7
0000 (default) GP Out 4 GP Out 5 GP Out 6 GP Out 7
0001 PEG4_PULSE GP Out 5 GP Out 6 GP Out 7
0010 GP Out 4 PEG6_PULSE GP Out 6 GP Out 7
0011 GP Out 4 GP Out 5 PEG5_PULSE GP Out 7
0100 GP Out 4 GP Out 5 GP Out 6 Reserved
0101 GP Out 4 PEG6_PULSE GP Out 6 Reserved
0110 PEG4_PULSE GP Out 5 PEG5_PULSE GP Out 7
0111 PEG4_PULSE PEG6_PULSE PEG5_PULSE Reserved
1000 - 1111 Reserved Reserved Reserved Reserved

Version NT 2.20 47 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Table 21 General CMnt-x-320/UDMpm-x-320 Outputs Assignment for Use as


PEG Pulse Outputs (Servo Processor 0)
Bit Code Servo Processor 0
GP Out 0 GP Out 1 GP Out 2 GP Out 3
0000 (default) GP Out 0 GP Out 1 GP Out 2 GP Out 3
0001 PEG0_PULSE GP Out 1 GP Out 2 GP Out 3
0010 GP Out 0 PEG1_PULSE GP Out 2 GP Out 3
0011 GP Out 0 GP Out 1 PEG2_PULSE GP Out 3
0100 GP Out 0 GP Out 1 GP Out 2 GP Out 3
0101 GP Out 0 PEG1_PULSE GP Out 2 GP Out 3
0110 PEG0_PULSE GP Out 1 PEG2_PULSE GP Out 3
0111 PEG0_PULSE PEG1_PULSE PEG2_PULSE GP Out 3
1000 - 1111 Reserved Reserved Reserved Reserved

Note
In Table 19 and Table 20, and Table 21 the Bit Code affects the entire row,
for example, for those connectors controlled by Servo Processor 0, 0110
switches GP Out 0 to PEG0_PULSE and GP Out 1 to PEG2_PULSE.
The same Bit Code applied to those connectors controlled by Servo
Processor 1 switches GP Out 4 to PEG4_PULSE and GP Out 6 to
PEG5_PULSE.

Related ACSPL+ Commands


PEG_I, ASSIGNPOUTS, PEG_I, PEG_R, STARTPEG, STOPPEG
COM Library Methods
None
C Library Functions
acsc_AssignPegNT

Version NT 2.20 48 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

1.3.4 ASSIGNPOUTS
Description
The ASSIGNPOUTS function is used for setting input pins assignment and mapping between
FGP_OUT signals to the bits of the OUTvariable.
Each PEG engine has 1 PEG pulse output and 4 state outputs for a total of 5 outputs per PEG
engine and a total of 30 outputs for the whole PEG generator. The controller supports 10
physical output pins that can be assigned to the PEG generator. The user defines which 10
outputs (of the 30) of the PEG generator are assigned to the 10 available physical output pins.
Some of the output pins are shared between the PEG and the HSSI.
The tables below define how each of the 30 outputs of the 6 PEG engines can be routed to the
10 physical output pins - 4 PEG out signals, 3 PEG state signals, and 3 HSSI signals. It needs
to be noted that some of the signals cannot be routed to the physical pins.

Note
The axis and input/output assignments of a unit can be obtained by running
#SI in the SPiiPlus MMI Appication Studio Communication Terminal. For
example, the following is a fragment from the response to this command:
Axes Assignment: 0,1,2,3,4,5,6,7

Inputs/Outputs Assignment:
Digital inputs (IN): 0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7
Digital outputs (OUT): 0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7
Analog inputs (AIN): 0,1,2,3
Analog outputs (AOUT): 0,1,2,3
HSSI channels: 4
Ext. inputs (EXTIN): 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
Ext. outputs (EXTOUT): 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15

Syntax
ASSIGNPOUTS axis, output_index, bit_code
Arguments
axis Any axis number of the same unit.
Starting from Version 2.15, axis parameter can be any axis number of the
same unit.
output_index Output Index (0 for OUT_0, 1 for OUT_1, ..., 9 for OUT_9)
bit_code Bit code for engines outputs to physical outputs mapping according to
Table 22 and Table 23 for SPiiPlusNT/DC-LT/HP/LD-x/SPiiPlus SAnt-
x, and Table 24 and Table 25 for CMnt-x-320/UDMpm-x-320/UDMpc-
x-048 units, and Table 26 and Table 27 for CMba-x-320/CMhp-x-
320/UDMbax-320/UDMhp-x-320.

Version NT 2.20 49 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Table 22 SPiiPlusNT/DC-LT/HP/LD-x/SPiiPlus SAnt-x Mapping of Engine


Outputs to Physical Outputs (Servo Processor 0)
Bit Code OUT_4 OUT_3 OUT_2 OUT_1 OUT_0
(HSSI1_DO) (T_PEG) (Z_PEG) (Y_PEG) (X_PEG)
000 HSSI1_DO PEG5_PULSE PEG4_PULSE PEG1_PULSE PEG0_PULSE
(default)
001 PEG0_STATE1 PEG0_STATE0 PEG2_PULSE PEG1_STATE0 PEG4_STATE0
010 PEG2_STATE1 PEG2_STATE0 PEG1_STATE1 Reserved Reserved
011 Reserved Reserved Reserved Reserved Reserved
100 Reserved Reserved Reserved Reserved Reserved

111 Reserved FGP_OUT3 FGP_OUT2 FGP_OUT1 FGP_OUT0

Table 23 SPiiPlusNT/DC-LT/HP/LD-x/SPiiPlus SAnt-x Mapping of Engine


Outputs to Physical Outputs (Servo Processor 1)
Bit Code OUT_9 OUT_8 OUT_7 OUT_6 OUT_5
HSSI0_CON HSSI0_DO X_STATE2 X_STATE1 X_STATE0
000 HSSI0_CON HSSI0_DO PEG0_STATE PEG0_STATE PEG0_STATE0
(default) 2 1
001 PEG0_STATE0 PEG0_STATE PEG2_STATE PEG1_STATE PEG1_STATE0
2 0 1
010 PEG2_STATE1 PEG5_STATE PEG6_PULSE PEG5_PULSE PEG4_PULSE
0
011 PEG6_STATE1 Reserved PEG4_STATE PEG4_STATE Reserved
1 0
100 Reserved Reserved Reserved Reserved Reserved
111 Reserved Reserved FGP_OUT6 FGP_OUT5 FGP_OUT4

Version NT 2.20 50 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Table 24 CMnt-x-320/UDMpm-x-320/UDMpc-x-048 Mapping of Engine Outputs


to Physical Outputs (Servo Processor 0)
Bit Code OUT_1 OUT_0
(Y_PEG) (X_PEG)
000 PEG1_PULSE PEG0_PULSE
(default)
001 Encoder X Encoder X 
Phase B Phase A
010 Encoder Y Encoder Y 
Phase B Phase A
011 Reserved Reserved
100 Reserved Reserved

111 FGP_OUT1 FGP_OUT0

Table 25 CMnt-x-320/UDMpm-x-320/UDMpc-x-048 Mapping of Engine Outputs


to Physical Outputs (Servo Processor 0)
Bit Code OUT_6 OUT_5
(X_STATE1) (X_STATE0)
000 PEG0_STATE1 PEG0_STATE0
(default)
001 PEG1_STATE1 PEG1_STATE0
010 PEG2_STATE1 PEG2_STATE0
011 Encoder X Phase B Encoder X 
Phase A
100 Encoder Y Phase B Encoder Y 
Phase A
101 Encoder X INDEX Encoder X INDEX

110 Encoder Y INDEX Reserved

111 Reserved Reserved

Version NT 2.20 51 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Table 26 CMba-x-320/CMhp-x-320/UDMba-x-320/UDMhp-x-320 Mapping of


Engine Outputs to Physical Outputs (Servo Processor 0)
Bit OUT_4 OUT_3 OUT_2 OUT_1 OUT_0
Code (Y_STATE2) (Y_STATE1) (Y_STATE0) (Y_PEG) (X_PEG)
000 PEG1_STATE2 PEG1_STATE1 PEG1_STATE0 PEG1_PULSE PEG0_PULSE
(default)
001 PEG0_STATE2 PEG0_STATE1 PEG0_STATE0 Encoder X Encoder X 
Phase B Phase A
010 PEG2_STATE2 PEG2_STATE1 PEG2_STATE0 Encoder Y Encoder Y 
Phase B Phase A
011 Encoder A Encoder A  Encoder A Phase Encoder A Encoder A 
INDEX Phase B A Phase B Phase A
100 Reserved Reserved Reserved PEG2_PULSE Reserved

101 Reserved Reserved Reserved PEG2_PULSE PEG0_PULSE


or or
PEG1_PULSE PEG2_PULSE
110 Reserved Reserved Reserved PEG0_PULSE PEG0_PULSE
or or
PEG1_PULSE PEG1_PULSE
or or
PEG2_PULSE PEG2_PULSE
111 Reserved Reserved FGP_OUT2 FGP_OUT1 FGP_OUT0

Note
For Bit Codes 101 and 110, the OUT_0 (X_PEG) and OUT_1 (Y_PEG)
mappings are supported for default PEG pulse polarity only.

Table 27 CMba-x-320/CMhp-x-320/UDMba-x-320/UDMhp-x-320 Mapping of


Engine Outputs to Physical Outputs (Servo Processor 0)
Bit OUT_9 OUT_8 OUT_7 OUT_6 OUT_5
Code (Y_STATE3) (X_STATE3) (X_STATE2) (X_STATE1) (X_STATE0)
000 PEG1_STATE3 PEG0_STATE3 PEG0_STATE2 PEG0_STATE1 PEG0_STATE0
(default)
001 PEG0_STATE3 PEG1_STATE3 PEG1_STATE2 PEG1_STATE1 PEG1_STATE0
010 PEG2_STATE3 PEG2_STATE3 PEG2_STATE2 PEG2_STATE1 PEG2_STATE0
011 PEG2_STATE0 Encoder Y Encoder Y Encoder X Encoder X
Phase B Phase A Phase B Phase A
100 PEG2_STATE1 Encoder Y Reserved EncoderY  Encoder Y
INDEX Phase B Phase A
101 Reserved Reserved Reserved Encoder X Encoder X
INDEX INDEX

Version NT 2.20 52 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

110 Reserved PEG2_PULSE PEG2_PULSE Encoder Y PEG2_PULSE


INDEX
111 Reserved Reserved Reserved Reserved Reserved

Note
The Bit Code: 111, both for Servo Processor 0 and Servo Processor 1, is
used for switching the physical output pins to Fast General Purpose
Outputs: FGP_OUT0 to FGP_OUT6. The state of the Fast General
Purpose Outputs can be read or changed using the ACSP+ OUT(x)
variable. The Fast General Purpose Outputs are mapped as follows:
FGP_OUT0 is mapped to bit 16 of the OUT(x) variable
FGP_OUT1 is mapped to bit 17 of the OUT(x) variable
FGP_OUT2 is mapped to bit 18 of the OUT(x) variable
FGP_OUT3 is mapped to bit 19 of the OUT(x) variable
FGP_OUT4 is mapped to bit 20 of the OUT(x) variable
FGP_OUT5 is mapped to bit 21 of the OUT(x) variable
FGP_OUT6 is mapped to bit 22 of the OUT(x) variable

Comments
ASSIGNPOUTS is a blocking command in the sense that the ACSPL+ program moves to the
next line or command only after this command has been fully executed or an error is generated.
Related ACSPL+ Commands
ASSIGNPEG, PEG_I, PEG_I, PEG_R, STARTPEG, STOPPEG
COM Library Methods
None
C Library Functions
acsc_AssignPegOutputsNT

Version NT 2.20 53 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

1.3.5 PEG_I
Description
Position Event Generation (PEG) is a fast output, based on an axis position with sub
microsecond delay. In addition to position-based pulses, the controller can also generate a
specified number of time based pulses.
PEG_I is an incremental PEG where the controller generates a pulse at a predefined start
position followed by a stream of pulses at a specified distance interval, up to a predefined end
position.
Before using PEG, initialize the outputs using ASSIGNPEG.
Syntax
PEG_I [/wi] axis, width, first_point, interval, last_point
Arguments
axis Any axis number of the same unit.
width Width of the Pulse.
first_point First point for the PEG generation.
interval The distance between PEG events.
last_point Last point for PEG generation.

Comments
1. If the switch: /w is included, the execution of the command is delayed until the execution of
the STARTPEG command.
2. If the switch: /i is included, the PEG pulse output signal is inverted.
3. The parameters that can be set by the command are identical to those that can be set for
SPiiPlusCM / SPiiPlusSA /SPiiPlus 3U controllers except for time-based-pulses and time-
based-period the setting of which is not supported.
4. When the PEG pulse is activated, the voltage between the two differential PEG outputs (+)
and (-) drops to -5V. When the PEG pulse is non-activated, the voltage between the two
differential PEG outputs is 5V.
5. SPiiPlus products that provide PEG outputs and the general purpose digital outputs on the
same pins, use ASSIGNPEG before PEG activation.
6. If the PEG interval is short and the time between pulses is less than one MPU cycle,
additional pulses might be generated at points beyond the last PEG position.
7. PEG works correctly if the sign of the interval corresponds to the direction of motion. If the
motor moves in the opposite direction to the interval sign, PEG pulses may be generated in
unexpected positions.
8. When using a Sin-Cos encoder, PEG is triggered at the zero crossing of the sine-cosine
waves and not at the precise interpolated position.
9. Theoretically the minimum time interval between two incremental PEG pulses is
200ns, i.e., the max frequency = 5MHz.
Related ACSPL+ Commands
PEG_R, ASSIGNPEG, ASSIGNPOUTS, STARTPEG, STOPPEG

Version NT 2.20 54 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Related ACSPL+ Variables


AST
COM Library Methods
None
C Library Functions
acsc_PegIncNT, acsc_WaitPegReady
Example

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! PEG pulses are fired on axis 6 based on axis encoder 7 !
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
GLOBAL AXIS6
GLOBAL AXIS7
AXIS6=6 ! Axis assignments
AXIS7=7

set FPOS(AXIS7)=0

assignpeg AXIS7, 0b001, 0b0


! Refer to Table 15: last column indicates that Encoder 7 is assigned to PEG6.
! 0b0 indicates that the digital outputs are at their default value according
! to Table 20, thus not used as PEG signals.

assignpouts AXIS7, 7, 0b010


! Axis6 being assigned. Output 7 is used. 0b010 indicates PEG6_Pulse is being
! fired (from table6.)

ST:
peg_i AXIS7,0.5,-100,-200,-10000
TILL AST(AXIS7).#PEGREADY
!Wait till command executes and configuration is set, in order to ensure 
!proper PEG engine's execution prior to start of movement
ptp/e AXIS7,-12000
stoppeg AXIS7 ! Prevent PEG pulses' firing on the 'way back'
ptp/e AXIS7,0
goto ST

stop

Version NT 2.20 55 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

1.3.6 PEG_R
Description
Position Event Generation (PEG) is a fast output, based on an axis position with sub
microsecond delay. In addition to position-based pulses, the controller can also generate a
specified number of time based pulses.
PEG_R is a random, table-based PEG where the controller fires a pulse at predetermined
positions defined in an array. A four-output state can be configured along with the PEG pulse.
Before using PEG, initialize outputs using ASSIGNPEG.
Syntax
PEG_R [/wi] axis, width, mode, first_index, last_index, POS_ARRAY, STATE_ARRAY
Arguments
axis Any axis number of the same unit.
width Width of the Pulse.
mode PEG state output signals configuration according to Table 28.
Bits 0-3 relates the PEG State 0 of the specific PEG engine
Bits 4-7 relates the PEG State 1 of the specific PEG engine
Bits 8-11 relates the PEG State 2 of the specific PEG engine
Bits 12-15 relates the PEG State 3 of the specific PEG engine
The most commonly used value is 0x4444 - PEG State Outputs 0-3 are
configured with the ‘State” option (bits 2, 6, 10, 14 are ON).
first_index Index of first entry in the array for PEG generation
last_index Index of last entry in the array for PEG generation
POS_ARRAY The Random Event Positions array, maximum of 256/1024 members
STATE_ARRAY The Outputs States array defining the four PEG output states, maximum
of 256/1024 members

Version NT 2.20 56 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Table 28 PEG State Output Signals Configuration


Bit Signal Description Default
Value
0 Pulse polarity 0- Output-0 positive pulse ‘0’
1- Output-0 negative pulse
1 State polarity 0- Output-0 positive state ‘0’
1- Output-0 negative state
2-3 Output type 00- Output-0 three state ‘00’
01- Output-0 State
10- Output-0 Pulse
11- Output-0 Pulse&State
4 Pulse polarity 0- Output-1 positive pulse ‘0’
1- Output-1 negative pulse
5 State polarity 0- Output-1 positive state ‘0’
1- Output-1 negative state
7-6 Output type 00- Output-1 three state ‘00’
01- Output-1 State
10- Output-1 Pulse
11- Output-1 Pulse&State
8 Pulse polarity 0- Output-2 positive pulse ‘0’
1- Output-2 negative pulse
9 State polarity 0- Output-2 positive state ‘0’
1- Output-2 negative state
11-10 Output type 00- Output-2 three state ‘00’
01- Output-2 State
10- Output-2 Pulse
11- Output-2 Pulse&State
12 Pulse polarity 0- Output-3 positive pulse ‘0’
1- Output-3 negative pulse
13 State polarity 0- Output-3 positive state ‘0’
1- Output-3 negative state
15-14 Output type 00- Output-3 three state “00”
01- Output-3 State
10- Output-3 Pulse
11- Output-3 Pulse&State

PEG state output types:


“Three state” - PEG state output is not in use
“State” - PEG state output will be changed according to the STATE_ARRAY values
“Pulse” - PEG state output will be changed according to PEG pulse value.
“Pulse & State” - PEG state output will be changed according to the result of AND operation
between STATE_ARRAY values AND PEG pulse value.

Version NT 2.20 57 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Pulse Polarity:
If positive or negative pulse is used as PEG pulse value for the specific “PEG State Output”.
State Polarity:
If positive or negative state is used as PEG pulse value for the specific “PEG State Output”.
Comments
1. If the switch: /w is included, the execution of the command is delayed until the execution of
the STARTPEG command.
2. If the switch: /i is included, the PEG pulse output signal is inverted.
3. The parameters that can be set by the command differ from those that could be set for
SPiiPlusCM/SPiiPlusSA/SPiiPlus 3U controllers with the addition of the new first_index
and last_index parameters. The setting of parameters: time-based-pulses and time-based-
period, however, which could be set for SPiiPlusCM/SPiiPlusSA/SPiiPlus 3U controllers is
not supported.
4. When the PEG pulse is activated, the voltage between the two differential PEG outputs (+)
and (-) drops to -5V. When the PEG pulse is de-activated, the voltage between the two
differential PEG outputs is 5V.
5. In PEG_R, the number of position-based pulses is limited to eight pulses per controller
cycle and the minimum time interval must be >200nsec.
6. When a PEG STATE is activated, the voltage between the two differential PEG outputs
(+) and (-) becomes 5V. When the PEG STATE is de-activated, the voltage between the
two differential PEG outputs is -5V.
7. The last three arguments are optional. If array_state is omitted, the controller generates the
PEG pulses at each position but does not change the state of any output. If time-based-pulses
and time-based-period are omitted, the controller does not generate time based pulses.
8. When using a Sin-Cos encoder, PEG is triggered at the zero crossing of the sine-cosine
waves and not at the precise interpolated position.
9. For SPiiPlus products that provide PEG outputs and general purpose digital outputs on
same pins, use ASSIGNPEG before PEG activation.
Related ACSPL+ Commands
PEG_I, ASSIGNPEG, ASSIGNPOUTS, STARTPEG, STOPPEG
Related ACSPL+ Variables
AST
COM Library Methods
None
C Library Functions
acsc_PegRandomNT, acsc_WaitPegReady

Version NT 2.20 58 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Example

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!PEG pulses are fired on axes 0,1,2 according to encoder of axis 0 !
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
GLOBAL AXIS0
GLOBAL AXIS1
GLOBAL AXIS2

GLOBAL REAL ARR(16) !Definition of a 16 point position array


ARR(0)=100;ARR(1)=150;ARR(2)= 200;ARR(3)=250;
ARR(4)=300;ARR(5)=350;ARR(6)=400;ARR(7)= 450;
ARR(8)=500;ARR(9)=550;ARR(10)= 600;ARR(11)=650;
ARR(12)=700;ARR(13)=750;ARR(14)=800;ARR(15)=1000;

GLOBAL INT STAT(16) !Definition of 16 point state array. The values define
PEGx_STATEy
STAT(0)=0b0001;STAT(1)=0b0100;STAT(2)=0b1111;STAT(3)=0b1110;
STAT(4)=0b0101;STAT(5)=0b0001;STAT(6)=0b0100;STAT(7)=0b1111;
STAT(8)=0b1110;STAT(9)=0b0101;STAT(10)=0b0001;STAT(11)=0b0100;
STAT(12)=0b1111;STAT(13)=0b0001;STAT(14)=0b0100;STAT(15)=0b1111;

AXIS0=0
AXIS1=1
AXIS2=2

set FPOS(AXIS0)=0
set FPOS(AXIS1)=0
set FPOS(AXIS2)=0

assignpeg AXIS0, 0b100, 0b0

assignpouts AXIS0, 0, 0b000 !Assign bit code 000 from Table 19 to AXIS0, at
!Pin0
assignpouts AXIS1, 1, 0b000
assignpouts AXIS2, 2, 0b001

ST:
peg_r AXIS0,0.5,0x4444,0,15,ARR,STAT !Activate random PEG for axis 0
peg_r AXIS1,0.5,0x4444,0,15,ARR,STAT
peg_r AXIS2,0.5,0x4444,0,15,ARR,STAT

!Wait till command executes and configuration is set, in order to


!ensure proper PEG engine's execution prior to start of movement
TILL AST(AXIS0).#PEGREADY
TILL AST(AXIS1).#PEGREADY
TILL AST(AXIS2).#PEGREADY

ptp/e AXIS0,5000
stoppeg AXIS0 ! Prevent PEG pulses' firing on the 'way back'
ptp/e AXIS0,0
goto ST
stop

Version NT 2.20 59 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

1.3.7 STARTPEG
Description
The STARTPEG command initiates the PEG process on the specified axis. The command is
used in both the Incremental and Random PEG modes.
Syntax
STARTPEG axis
Arguments
axis Any axis of the same unit.

Comments
STARTPEG is a blocking command in the sense that the ACSPL+ program moves to the next
line or command only after this command has been fully executed or an error is generated.
If STOPPEG has been issued before the last PEG position, you have to use STARTPEG to
resume PEG engine firings from the current point.
Related ACSPL+ Commands
ASSIGNPEG, ASSIGNPOUTS, PEG_I, PEG_R, STOPPEG
Related ACSPL+ Variables
AST
COM Library Methods
None
C Library Functions
acsc_StartPegNT

1.3.8 STOPPEG
Description
STOPPEG terminates the PEG immediately. The function is used with both Incremental and
Random PEG modes
Syntax
STOPPEG axis
Arguments

axis Any axis of the same unit.

Related ACSPL+ Commands


ASSIGNPEG, ASSIGNPOUTS, PEG_I, PEG_R, STARTPEG
COM Library Methods
None

Version NT 2.20 60 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

C Library Functions
acsc_StopPegNT
Example

PEG_I/S 0, 0.003, 1000, 1000, 3000, 2, 0.01


PTP 0, 3000 !The program initiates synchronous PEG, with PTP
!motion on axis 0.
WAIT 2 !Two milliseconds after motion starts, PEG
!will be terminated by STOPPEG.
STOPPEG 0

1.4 Miscellaneous Commands


The Miscellaneous commands are:

Command Action
AXISDEF Establishes an axis alias.
DC Activates data collection.
ECREPAIR Returns the system back to the operational state if one or more slaves
underwent a reset or power cycle.
GETCONF(312, Index) Gets the RAM load in percentage, or the amount of total physical
memory, or the amount of free physical memory.
#MEMORY Retrieves RAM availability.
READ Reads an array from a file in the flash memory.
SETPROTECTION Changes protection attribute for a variable.
SPDC Activates data collection from a Servo Processor variable.
SPINJECT Initiates the transfer of MPU real-time data to the Servo Processor.
STOPINJECT Stops the transfer of MPU real-time data to the Servo Processor.
STOPDC Terminates data collection.
WRITE Writes an array to a file in the flash memory.

1.4.1 AXISDEF
Description
The AXISDEF command enables the user to assign an alias to one or more axes. Once
assigned, the user can use the alias throughout the program in any command requiring an axis
argument.
Syntax
AXISDEF axis_alias = axis

Version NT 2.20 61 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Arguments
axis_alias Any string with the following restrictions:
 Only one name can be defined for one axis, that is, different names
cannot be used for the same axis.
 The names must be unique, i.e., two axes cannot be defined with the
same name.
 An axis name must not be the same of any other variable name, label,
keyword, etc.
A compilation error occurs if one of the above restrictions is not satisfied.
axis The axis number, valid numbers are: 0, 1, 2, ... up to the number of axes in
the system minus 1.

Comments
The AXISDEF command can be repeated many times to define all required aliases.
The axis name must be defined either in the D-Buffer, or in one of the buffers in which it is
used. In any case, the axis definition has global scope (the definitions of the same axis in a
different program must be identical as applies to all global variables).

Although postfix indexing can be used, it is recommended using explicit indexing and
providing names as symbolic constants.
Related ACSPL+ Commands
None
COM Library Methods
None
C Library Functions
None
Examples
1. An axis name can be used in expressions as a symbolic constant. For example, given the
program includes the declaration:
AXISDEF Q=3
the following command
VEL(Q)=1000;
assigns 1000 to the required velocity of axis 3.
2. As user variables, axis-related standard variables accept explicit indexing. However, axis-
related standard variables also accept postfix indexing. For example, given a program that
includes the declaration:
AXISDEF Q=3, X1=1, X2= 2
the following table provides examples of index formats:

Version NT 2.20 62 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Explicit Indexing Postfix Indexing


VEL(3) or VEL(Q) VEL3
ACC(1) or ACC(X1) ACC1
SLVKI(2) or SLVKI(X2) SLVKI2

1.4.2 DC
Description
DC (Data Collection) accumulates data of any specified standard or user-defined variable with
a constant sampling rate. DC synchronized with motion (see Command Option /s) is called
Axis Data Collection. DC not synchronized with motion is called System Data Collection.
DC terminates due to:
 STOPDC
 The defined DC array is completed
Syntax (except for DC/s)
DC[/switch] array_name, number of points, time-interval, variable_1,
[variable_2...variable_N]
Syntax for DC/s
DC/s axis, global array, number of points, time-interval, variable_1, [variable_2...variable_N]
Arguments

global array The name of a global array that stores samples


number of points Define the number of samples
time-interval Define the time interval between each sample
variable_1 Define variable/s to be sampled. The number of rows defined in
array_name must match the number of variables to be sampled

Switches
/switch can be one of the following:
/s Triggers DC with the next motion command. DC synchronized with motion is called Axis
Data Collection
/w Create the synchronous data collection, but do not start until GO. Command option /w can
only be used with the /s.
/c Cyclic data collection

Version NT 2.20 63 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Comments
1. The maximum number of elements in a DC array is 100,000 (number of variables x number
of samples <100,000).
2. DC can include up to 10 sampled variables.
3. Only one DC (system data collection) process can run at the same time.
4. Up to eight DC/s (axis data collection) processes can be simultaneously executed where
each process fills a separate array.
5. DC/c does not self-terminate. STOPDC terminates cyclic data collection.
6. DC/c uses the collection array as a cyclic buffer and can continue to collect data
indefinitely. When the array is full, each new sample overwrites the oldest sample in the
array.
7. After the cyclic data collection concludes, the controller reorganizes the sample array so that
the first element represents the oldest sample and the last element represents the most recent
sample.
8. Variable S_ST.#DC = 1 when non-synchronized DC is active.
9. Variable AST<axis>.#DC = 1 when synchronized DC is active.
Related ACSPL+ Commands
STOPDC, SPDC
Related ACSPL+ Variables
S_ST, AST, S_DCN, S_DCP, DCN, DCP
COM Library Methods
DataCollection, WaitCollectEnd, StopCollect
C Library Functions
acsc_DataCollectionExt, acsc_WaitCollectEnd, acsc_StopCollect
Examples
Example 1:
Cyclic Data Collection

GLOBAL REAL ARRAY (2)(1000)


!Define a real type array for two variables
!(rows) and 1000 sampling points (columns).
DC/C ARRAY,1000,3,FPOS0,TIME
!Start cyclic data collection and store 1000
!samples in SAMPLE_ARRAY. The time ARRAY.
!The time between each sampling point is 3 msec.
!The FPOS0 standard variable samples are stored
!in the first row of ARRAY, and the TIME
!variable values are stored in the second row.
TILL ^S_ST.#DC !Wait until S_ST.#DC = 0 (DC collection is
!finished).
STOP

Version NT 2.20 64 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Example 2
Motion Synchronized Data Collection

GLOBAL REAL ARRAY (2)(1000)


!Define a real type array for two variables
!(rows) and 1000 sampling points (columns).
DC/S 0,SAMPLE_ARRAY,1000,3,FPOS0,TIME
!Start cyclic data collection when motion
!(synchronized on axis 0) begins, and store 1000
!samples in SAMPLE_ARRAY. The time ARRAY. The time
!between each sampling point is 3 msec.
!The FPOS0 standard variable samples are stored in
!the first row of SAMPLE_ARRAY, and the TIME
!variable values are stored in the second row.
TILL ^AST(0).#DC !Wait until AST.#DC = 0 (DC collection is
!finished).
STOP

Version NT 2.20 65 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

1.4.3 STOPDC
Description
Immediately terminates DC and SPDC.
Syntax
STOPDC[/switch]
Switch
/switch can be:
/s Terminate synchronized data collection

Comments
1. STOPDC with an argument delays termination of DC.
2. STOPDC/s terminates synchronous DC initiated by DC/s.
3. Multiple axis specification is not allowed.
Related ACSPL+ Commands
DC, SPDC
Related ACSPL+ Variables
S_ST, AST, S_DCN, S_DCP, DCN, DCP
COM Library Methods
DataCollection, StopCollect, WaitCollectEnd
C Library Functions
acsc_DataCollectionExt, acsc_StopCollect, acsc_WaitCollectEnd
Examples
Example 1

STOPDC 50 !Collect an additional 50 samples and then


!terminate DC.
Example 2

STOPDC/S 1 !Stop synchronous axis data collection for axis 1

1.4.4 READ
Description
Reads a file from the controller’s nonvolatile (flash) memory to a user defined array. The file
must exist in the nonvolatile memory by previously writing it using the WRITE command.
Syntax
READ array,filename

Version NT 2.20 66 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Arguments
array User defined array to which the data will be imported
filename Non-volatile memory file name

Comments
1. The filename must not include the file name extension.
2. Declare the user array name in the buffer where the command is executed.
3. If READ is executed from the Communication Terminal as a command, array must
specify the name of a global array.
4. READ can not be used with the SPiiPlus Simulator.
Related ACSPL+ Commands
WRITE
COM Library Methods
Read
C Library Functions
acsc_Read
Example

GLOBAL REAL ARRAY(5)!Define a real global array


READ ARRAY,FILENAME !Read the defined file to the array

1.4.5 SETPROTECTION
Description
SETPROTECTION sets any ACSPL+ variable as read-only when the controller is in
Protected mode. Enable or disable protected mode with the Communication Terminal
commands: PROTECT and UNPROTECT, respectively. SETPROTECTION takes effect
only after the controller is set to the Protected mode.
Syntax
SETPROTECTION standard_variable
Arguments
standard_variable Any standard ACSPL+ variable.

Comments
1. PFLAGS<buffer_number>.#NOEDIT disabled changing buffer in protected mode. The bit
can be defined separately for each buffer.
2. PFLAGS<buffer_number>.#NOVIEW disables viewing the buffer in protected mode.The
bit can be defined separately for each buffer.
3. The controller accepts #RESET in protected mode. This way, the user can delete a
protected application, and reset the controller to the factory-default state, even if the

Version NT 2.20 67 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

password is unknown. Access #RESET from the SPiiPlus MMI menu command
Application.
Related Variables
CFG
Example

SETPROTECTION VEL=1

1.4.6 SPDC
Description
SPDC (Servo Processor Data Collection) performs fast data collection and accumulates data
about the specified Servo Processor variable with a constant maximum sampling rate of 20kHz.
A typical use for SPDC is for collecting position error (PE) and feedback position (FPOS) data
at the fast Servo Processor rate.
The Servo Processor value is different from the MPU value. The Servo Processor always uses
counts and not units. The Servo Processor position value is not affected by SET FPOS
command. An offset is added at the MPU level only. The formula (that you can find in our
manuals) is:
FPOS = FP*EFAC + EOFFS
where FPOS is the MPU variable and FP is the Servo Processor calculated value.
SPDC terminates due to:
 STOPDC
 After accumulating the defined number of samples
Syntax
SPDC [/r] Array, number_of_samples, sampling_period, SP_number, SP_Address1,
[SP_Address2]
Arguments

Array Array name, up to XARRSIZE variable value.


By default, Array is assumed to be an integer array, if the /r switch is
added, it defines the array as real.
number_of_samples The number of samples to collect, the maximum value depends on the size
of the array.
sampling_period The time, in millisecords, that each sample is taken.
SP_number The number of the Servo Processor to be sampled
SP_Address1 The address of the Servo Processor variable in the Servo Processor to
sample,
SP_Address2 As an option, you can add another address of an other Servo Processor
variable in the Servo Processor to sample,

Version NT 2.20 68 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Note
Since memory addresses may vary between SPiiPlus products and revisions,
it is highly recommended to define a variable to represent SP_Address as the
return value of GETSPA. SPDC can then use this variable in any SPiiPlus
product or revision.

Related ACSPL+ Commands


STOPDC
Comments
1. Only one SPDC command per Servo Processor can run at the same time.
2. Table 27 lists the most commonly used Servo Processor variables for SPDC.

Table 29 Commonly Monitored SPDC Variables


Variable Axis Servo Processor Variable
Position Error 0,1,2,3 axes[0].PE
Feedback Position 0,1,2,3 axes[0].fpos
Feedback Velocity 0,1,2,3 axes[0].fvel
Sin Analog Input 0,1,2,3 axes[0].sin
Cos Analog Input 0,1,2,3 axes[0].cos
Phase A Current 0,1,2,3 axes[0].is
Phase B Current 0,1,2,3 axes[0].it
Current Command 0,1,2,3 axes[0].command

Version NT 2.20 69 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Example

! ------------ Declare data arrays ----------------------


GLOBAL INT DATA(15000)
!Declare global array of integer of size 15000
REAL PAR_ADDRESS
PAR_ADDRESS=GETSPA(0,"axes[0].PE")
! ------------ Define motion parameters-------------------------------
VEL(0) = 5000
ACC(0) = 100000
DEC(0) = 100000
JERK(0) =2e6
!--------------Run motion and do fast data collection ----------------
SET FPOS(0) = 0
ENABLE 0
SPDC DATA,15000,0.05,0,PAR_ADDRESS
PTP/e 0, 1000
PTP/e 0, -1000
PTP/e 0, 1000
!Use the following if you need to convert the data to one column to
!export to Excel (otherwise you can collect 30000 points by SPDC above)
!Convert the array data from one row to one column to fit to export to Excel.
!INT DATA1(15000)(1)
!INT J; J=0
!LOOP 15000;DATA1(J)(0)=DATA(J);J=J+1;END
STOP

1.4.7 WRITE
Description
Writes an array (any system or user-defined variable) to a file in the controller’s nonvolatile
(flash) memory.
Syntax
WRITE user-array, filename
Arguments
user-array User defined array from which the data will be imported
filename Non-volatile memory file name

Comments
1. The nonvolatile memory filename must not include an extension.
2. The user-array name must be declared in the buffer where the command is executed.
3. If WRITE is executed from the Communication Terminal as a command, user-array has
to specify the name of a global array.
4. If filename does not exist, it is created. If the file already exists, it is over written.
5. WRITE cannot be used with the SpiiPlus Simulator
Related ACSPL+ Commands
READ

Version NT 2.20 70 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

COM Library Methods


Write
C Library Functions
acsc_Write

1.4.8 ECREPAIR
Description
ECREPAIR serves to return the system back to the operational state if one or more slaves
underwent a reset or power cycle. It provides an ability to recover EtherCAT network when
there is a need to replace unit for maintenance without the need to perform commutation,
homing, etc., to all other units within the EtherCAT network.
Syntax
ECREPAIR
Comments
ECREPAIR performs the following steps:
1. Detects which nodes are not communicating
2. Brings all slaves to the EtherCAT OP state
3. Establishes inter-slaves and master-slaves synchronization
4. Downloads Servo Processor programs to repaired nodes only
5. Restores all Servo Processor variable values accordingly
ECREPAIR can take a long time to complete; therefore it is recommended calling
ECREPAIR from a Program Buffer. It is possible to execute the ECREPAIR command from
the SPiiPlus MMI Application Studio Communication Terminal; however, in this case the
communication timeout should be configured to be longer.

Caution
It is strongly recommended not to take any other actions until
ECREPAIR completes.

Once the process is complete, the system state can be evaluated through:
 ECST
 SYNC values
 Servo Processor Alarm indication on all axes
 The View System Configuration task of the System Configuration Wizard
If all of these indicators show normal operation status, the ECREPAIR operation was
successful.

Version NT 2.20 71 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

EtherCAT slaves that were operational before ECREPAIR activation will keep their feedback
and commutation valid.

1.4.9 ECRESCAN
Description
ECRESCAN triggers the system to rescan the EtherCAT network after a slave has been
removed or been added in order to refresh the network composition data.
Syntax
ECRESCAN
Arguments
None
Comments
The command can be entered either through a Program Buffer or via the SPiiPlus MMI
Application Studio Communication Terminal.

1.4.10 GETCONF(312, Index)


Description
This function gets the RAM load in percentage, the amount of total physical memory, or the
amount of free physical memory.
Syntax
GETCONF(312, Index)
Arguments

Index  0 – memory load in percentage


 1 – amount of total physical memory
 2 – amount of free physical memory

Return Value
According to the specified index.

1.4.11 #MEMORY
Description
The function retrieves RAM availability.
Syntax
#MEMORY
Arguments
None.

Version NT 2.20 72 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Return Value
Available RAM.
Example

#MEMORY
There is 15 percent(s) of memory in use.
There are 114.83 total MBytes of physical memory.
There are 96.91 free MBytes of physical memory.

1.4.12 SPINJECT
Description
SPINJECT initiates the transfer of MPU real-time data to the Servo Processor.
Syntax
SPINJECT([/switch] Array,Nsamples,Node,Addr1,[Addr2])
Arguments

Array Data source: 1 or 2 dimensional ACSPL+ array (real or integer).


Nsamples Number of samples from the source Array to inject. If the process is not
cyclic, the injection will stop after this number of samples. The last
telegram will be padded by the last element if needed.
Node The number of the EtherCAT node as in Servo Processor data collection.
Addr1 Address inside the Servo Processor, it must correspond to a floating or
integer variable in Servo Processor program.
Addr2 Address inside the Servo Processor, it must correspond to a floating or
integer variable in Servo Processor program. Used only if Array is 2
dimensional.

Switches
/switch can be one of the following:
/c Cyclic: For each MPU cycle the FW fills CTIME*20 values from the
source Array. Once the end is reached, the process continues from the
start.
/r Designates a real source.

Examples

INT MYDCOM(1)
SPINJECT/C MYDCOM,1,0,getspa(0,”axes[0].direct_command”)
!MYDCOM is RT control of DCOM inside Servo Processor0

Version NT 2.20 73 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

real K(2)(30000)
!Fill K array with SIN and COS values
SPINJECT K,30000,0, getspa(0,”dummy_double[1]”) ,
getspa(0,”dummy_double[2]”)

1.4.13 STOPINJECT
Description
STOPINJECT stops active injection process on the given Servo Processor.
Syntax
STOPINJECT Servo_Processor
Arguments

Servo_Processor Identifies the Servo Processor upon which the injection process is
operating.

Example

STOPINJECT 1
!Stops the injection process on Servo Processor1

1.5 Motion Commands


The Motion commands are:

Command Action
ARC1 Adds an arc segment to MSEG...ENDS motion.
ARC1 Adds an arc segment to XSEG...ENDS motion.
ARC2 Adds an arc segment to MSEG...ENDS motion.
ARC2 Adds an arc segment to XSEG...ENDS motion
JOG Creates a jog motion.
LINE Adds a linear segment to MSEG...ENDS motion.
LINE Adds a linear segment to XSEG...ENDS motion.
MASTER Defines a formula for calculating MPOS.
MPOINT Adds a set of points to MPTP...ENDS, PATH...ENDS or
PVSPLINE...ENDS motion.
MPTP...ENDS Creates a multipoint motion.
MSEG...ENDS Creates a segmented motion.
PATH...ENDS Creates an arbitrary path motion with linear interpolation between the
specified points.

Version NT 2.20 74 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Command Action
POINT Adds a point to MPTP...ENDS, PATH...ENDS, or
PVSPLINE...ENDS motion.
PROJECTION An expansion command to the MSEG...ENDS set of commands, that
allows the controller to perform a three dimensional segmented motion
such as creating arcs and lines on a user-defined plane.
PTP Creates a point-to-point motion.
PVSPLINE...ENDS Creates an arbitrary path motion with spline interpolation between the
specified points.
SLAVE Creates a master-slave motion.
STOPPER Adds a segment separator to MSEG...ENDS motion.
TRACK Creates tracking motion.
XSEG...ENDS Creates an extended segment motion.

Caution
For systems having more than 15 axes, avoid using motion
commands to start the motion of all axes simultaneously as this may
cause Over Usage or Servo Processor Alarm faults.

1.5.1 ARC1
Description
ARC1 must be initialized with MSEG...ENDS. Use ARC1 to specify the center point and final
point coordinates of an arc and the direction of rotation. Direction is designated by a plus sign
(+) or (–) for clockwise or counterclockwise rotation depending on the encoders’ connections.

Figure 6 ARC1 Coordinate Specification


Syntax
ARC1 axis_list, center-point, final-point, direction[,user-specified velocity]

Version NT 2.20 75 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Arguments
axis_list List of axes involved, valid numbers are: 0, 1, 2, ... up to the number of
axes in the system minus 1.
The ARC1 axis_list can involve two or more axes, see PROJECTION.
center-point Center point coordinates.
final point Last point.
direction Use + for motion in the direction of increasing encoder counts, or - for
motion in the direction decreasing encoder counts.
user-specified velocity If MSEG command option /v is used, the user-specified velocity must be
the last parameter in the ARC1 syntax.

Comments
1. ARC1 and ARC2 differ only by the required arguments. ARC1 requires the coordinates of
the center point, final point, and the direction of rotation. ARC2 requires the coordinates of
the center point and the rotation angle in radians. Each command produces the same result,
so selection of either ARC1 or ARC2 depends on the available data.
2. A single ARC1 command can not create a complete circle because the start point and end
point of the motion can not be the same. Use two ARC1 commands, or use ARC2.
Related ACSPL+ Commands
MSEG...ENDS, ARC2, LINE, STOPPER, PROJECTION
COM Library Methods
Arc1, ExtArc1
C Library Functions
acsc_Arc1, acsc_ExtArc1
Example
See MSEG...ENDS.

1.5.2 ARC1
Description
This format of ARC1 is used for extended segment motion and in this form must be initialized
with XSEG...ENDS. Use ARC1 to specify the center point and final point coordinates of an
arc and the direction of rotation. Direction is designated by a plus sign (+) or (–) for clockwise
or counterclockwise rotation depending on the encoders’ connections.

Version NT 2.20 76 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Syntax
ARC1 [/switches] (axis_list), center_point_axis1,center_point_axis2,
destination_point_axis1,destination_point_axis2,direction,
[,velocity][,end_velocity][,values, variables[,index [,masks]]]
Arguments
axis_list Defines one or two axes, specified as axes numbers separated by comma or
as axes names separated by comma. The axes should only be those axes
specified in the corresponding XSEG command.
center_point_axis1 Center point position for the first axis
center_point_axis2 Center point position for the second axis
destination_point_axis1 Destination position of the first axis
destination_point_axis2 Destination position of the second axis
direction Direction is specified as + or -. It defines clockwise or counterclockwise
rotation depending on the encoder connection: “+” for motion in the
direction of increasing encoder counts, or “-” for motion in the direction
decreasing encoder counts.
velocity [Optional, only used with /v switch]
Defines required velocity for the current and for all subsequent segments.
See Switches explanation for details.
end_velocity [Optional, only used with /f switch]
Defines required velocity at the end of the current segment. See Switches
explanation for details.
values [Optional, only used with /o switch]
Defines the values to be written to variables array at the beginning of the
current segment execution. values is a one-dimensional user defined array
of integer or real type with maximum size of 10 elements .
variables [Optional, only used with /o switch]
Defines the user-defined array, which will be written with values data at the
beginning of the current segment execution. variables is a one-dimensional
user defined array of the same type and size as the values array.
index [Optional, only used with /o switch]
Defines the first element (starting from zero) of the variables array, to which
values data will be written. If argument is omitted, values data is written to
the variables array starting from the first element (index 0).
masks [Optional, only used if values and variables are integer]
Defines the masks that are applied to values before the values are written to
variables array at the beginning of the current segment execution. masks is
a one-dimensional user-defined array of integer type and the same size as
the values array. The masks are only applied for integer values:

variables(n) = (variables(n) AND (NOT mask(n))) OR (values(n) AND


mask(n))

If argument is omitted, all values bits are written to variables.


If values is a real array, the masks argument should be omitted.

Version NT 2.20 77 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Switches
The following optional /switches may be used singularly or in combination with the ARC1
command:
/v Specify required velocity.
The switch requires an additional parameter that specifies the required velocity. The switch
changes the required velocity for the current segment and for all subsequent segments.
If the switch is not specified, the required velocity does not change.
/f Decelerate to the end of segment.
The switch requires an additional parameter that specifies the end velocity. The controller
decelerates to the specified velocity at the end of segment. The specified value should be
less than the required velocity; otherwise the parameter is ignored. The switch affects only
one segment.
The switch also disables corner detection and processing at the end of segment.
If the switch is not specified, deceleration is not required. However, in special cases the
deceleration might occur due to corner processing or other velocity control conditions.
/o Synchronize user variables with segment execution. The switch requires additional two or
three parameters that specify values, user variable and mask. See details in Arguments for
explanation.

Version NT 2.20 78 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

1.5.3 ARC2
Description
ARC2 must be initialized with MSEG...ENDS. Use ARC2 to specify the center point and
rotation angle in radians of an arc segment. Designate direction by positive or negative rotation
angle, depending on the encoders’ connections.

Figure 7 ARC2 Center Point and Rotation Angle Specification


Syntax
ARC2 axis_list, center-point, rotation-angle and direction [,user-specified velocity]
Arguments
axis_list List of axes involved, valid numbers are: 0, 1, 2, ... up to the number of
axes in the system minus 1.
The ARC2 axis_list can involve two or more axes, see PROJECTION.
center-point center point coordinates
final point last point
rotation angle and Rotation is in radians. Use + for motion in the direction of increasing
direction encoder counts, or - for motion in the direction decreasing encoder counts
user-specified velocity If MSEG command option /v is used, the user-specified velocity must be
the last parameter in the ARC2 syntax.

Comments
ARC1 and ARC2 differ only by the required arguments. ARC1 requires the coordinates of the
center point, final point, and the direction of rotation. ARC2 requires the coordinates of the
center point and the rotation angle. Each command produces the same result, so selection of
either ARC1 or ARC2 depends on the available data.
Related ACSPL+ Commands
MSEG...ENDS, ARC1, LINE, STOPPER, PROJECTION
COM Library Methods
Arc2, ExtArc2
C Library Functions
acsc_Arc2, acsc_ExtArc2
Example
See MSEG...ENDS.

Version NT 2.20 79 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

1.5.4 ARC2
Description
This format of ARC2 is used for extended segment motion and in this form must be initialized
with XSEG...ENDS. Use ARC2 to specify the center point and rotation angle in in radians of
an arc segment. Designate direction by positive or negative rotation angle, depending on the
encoders’ connections.
Syntax
ARC2 [/switches] (axis_list), center_point_axis1,center_point_axis2, rotation_angle,
[,velocity][,end_velocity][,values, variables[,index[,masks]]]
Arguments
axis_list Defines one or two axes, specified as axes numbers separated by comma or
as axes names separated by comma. The axes should only be those axes
specified in the corresponding XSEG command.
center_point_axis1 Center point position for the first axis
center_point_axis2 Center point position for the second axis
rotation_angle Defines central angle of the arc, signed according to rotation direction: plus
for a counter-clock-wise arc, minus for a clock-wise arc.
velocity [Optional, only used with /v switch]
Defines required velocity for the current and for all subsequent segments.
See Switches explanation for details.
end_velocity [Optional, only used with /f switch]
Defines required velocity at the end of the current segment. See Switches
explanation for details.
values [Optional, only used with /o switch]
Defines the values to be written to variables array at the beginning of the
current segment execution. values is a one-dimensional user defined array
of integer or real type with maximum size of 10 elements .
variables [Optional, only used with /o switch]
Defines the user-defined array, which will be written with values data at the
beginning of the current segment execution. variables is a one-dimensional
user defined array of the same type and size as the values array.

Version NT 2.20 80 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

index [Optional, only used with /o switch]


Defines the first element (starting from zero) of the variables array, to which
values data will be written. If argument is omitted, values data is written to
the variables array starting from the first element (index 0).
masks [Optional, only used if values and variables are integer]
Defines the masks that are applied to values before the values are written to
variables array at the beginning of the current segment execution. masks is
a one-dimensional user-defined array of integer type and the same size as
the values array. The masks are only applied for integer values:

variables(n) = (variables(n) AND (NOT mask(n))) OR (values(n) AND


mask(n))

If argument is omitted, all values bits are written to variables.


If values is a real array, the masks argument should be omitted.

Switches
The following optional /switches may be used singularly or in combination with the ARC2
command:
/v Specify required velocity.
The switch requires an additional parameter that specifies the required velocity. The switch
changes the required velocity for the current segment and for all subsequent segments.
If the switch is not specified, the required velocity does not change.
/f Decelerate to the end of segment.
The switch requires an additional parameter that specifies the end velocity. The controller
decelerates to the specified velocity at the end of segment. The specified value should be
less than the required velocity; otherwise the parameter is ignored. The switch affects only
one segment.
The switch also disables corner detection and processing at the end of segment.
If the switch is not specified, deceleration is not required. However, in special cases the
deceleration might occur due to corner processing or other velocity control conditions.
/o Synchronize user variables with segment execution. The switch requires additional two or
three parameters that specify values, user variable and mask. See details in Arguments for
explanation.

1.5.5 JOG
Description
JOG creates a motion with constant velocity and no defined end point.
JOG motion terminates by:
 HALT, KILL, BREAK, DISABLE
 Execution of any other motion command for the same axis
 Limit switch activation
 Any fault activation that disables the drive or kills the motion

Version NT 2.20 81 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Syntax
JOG[/switch] axis_list [,user-specified-velocity][,user-specified-direction]
Arguments
axis_list List of axes, valid numbers are: 0, 1, 2, ... up to the number of axes in the
system minus 1.
user-specified-velocity Optional parameter used if the /v command option is specified
user-specified-direction Optional parameter. Motion direction is designated by a plus sign (+) for
increasing feedback counts or (–) or decreasing feedback counts. If no
operator is used, motion is in the direction of increasing encoder counts.

Switches
/switch can be:
/v Use the specified velocity instead of the default velocity (VEL).
/w Create the motion, but do not start until GO.

Related ACSPL+ Commands


GO, HALT, KILL, BREAK, IMM
Related ACSPL+ Variables
AST, MST, MERR, VEL, ACC, JERK, FPOS, RPOS, GPHASE
COM Library Methods
Jog, JogM
C Library Functions
acsc_Jog, acsc_JogM
Examples
Example 1:

JOG/v 0, 500 !Jog 0 axis with VEL 500

Version NT 2.20 82 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Example 2:

JOG (0,1,2), –++ !Jog axes 0, 1, and 2 where axis 0 jogs in the
!negative direction and axes 1 and 2 jog in the
!positive direction.

1.5.6 LINE
Description
LINE must be initialized with MSEG...ENDS. LINE adds a linear segment to a segmented
motion.
Syntax
LINE axis_list, final-position1, final-position2[,user-specified velocity]
Arguments
axis_list List of axes, valid numbers are: 0, 1, 2, ... up to the number of axes in the
system minus 1.
final position1 First coordinate
final position2 Second coordinate
user specified velocity Optional user-specified velocity if LINE was initiated by MSEG/v.

Comments
1. ENDS informs the controller that no more segments will be specified. If ENDS is omitted,
motion stops at the last point of the sequence and waits for the next point.
2. If the LINE axis_list involves two or more axes, see PROJECTION.
Related ACSPL+ Commands
MSEG...ENDS, ARC1, ARC2, STOPPER, PROJECTION
COM Library Methods
See: Points and Segments Manipulation
C Library Functions
See: Points and Segments Manipulation
Example
See MSEG...ENDS.

Version NT 2.20 83 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

1.5.7 LINE
Description
This format of LINE is used for extended segment motion and in this form must be initialized
with XSEG...ENDS. Use LINE to add a linear segment that starts at the current point and ends
in the destination point to the motion path.
Syntax
LINE [/switches] (axis_list), destination_point_axis1[,destination_point_axis2] 
[,velocity][,end_velocity][,values, variables[,index[,masks]]]
Arguments
axis_list Defines one or two axes, specified as axes numbers separated by comma or
as axes names separated by comma. The axes should only be those axes
specified in the corresponding XSEG command.
destination_point_axis1 Destination position of the first axis
destination_point_axis2 Destination position of the second axis
velocity [Optional, only used with /v switch]
Defines required velocity for the current and for all subsequent segments.
See Switches explanation for details.
end_velocity [Optional, only used with /f switch]
Defines required velocity at the end of the current segment. See Switches
explanation for details.
values [Optional, only used with /o switch]
Defines the values to be written to variables array at the beginning of the
current segment execution. values is a one-dimensional user defined array
of integer or real type with maximum size of 10 elements .
variables [Optional, only used with /o switch]
Defines the user-defined array, which will be written with values data at the
beginning of the current segment execution. variables is a one-dimensional
user defined array of the same type and size as the values array.
index [Optional, only used with /o switch]
Defines the first element (starting from zero) of the variables array, to which
values data will be written. If argument is omitted, values data is written to
the variables array starting from the first element (index 0).
masks [Optional, only used if values and variables are integer]
Defines the masks that are applied to values before the values are written to
variables array at the beginning of the current segment execution. masks is
a one-dimensional user-defined array of integer type and the same size as
the values array. The masks are only applied for integer values:

variables(n) = (variables(n) AND (NOT mask(n))) OR (values(n) AND


mask(n))

If argument is omitted, all values bits are written to variables.


If values is a real array, the masks argument should be omitted.

Version NT 2.20 84 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Switches
The following optional /switches may be used singularly or in combination with the LINE
command:
/v Specify required velocity.
The switch requires an additional parameter that specifies the required velocity. The switch
changes the required velocity for the current segment and for all subsequent segments.
If the switch is not specified, the required velocity does not change.
/f Decelerate to the end of segment.
The switch requires an additional parameter that specifies the end velocity. The controller
decelerates to the specified velocity at the end of segment. The specified value should be
less than the required velocity; otherwise the parameter is ignored. The switch affects only
one segment.
The switch also disables corner detection and processing at the end of segment.
If the switch is not specified, deceleration is not required. However, in special cases the
deceleration might occur due to corner processing or other velocity control conditions.
/o Synchronize user variables with segment execution. The switch requires additional two or
three parameters that specify values, user variable and mask. See details in Arguments for
explanation.

1.5.8 MASTER
Description
MASTER defines master-slave motion by creating a dependency between an axis position or
velocity to a variable and/or an expression. MASTER always follows the (axis) MPOS
variable. SLAVE initiates the motion defined by MASTER and must follow MASTER.

Note
Velocity Lock is the default state for MASTER. Initiate MASTER with
SLAVE/p for position lock.

The following actions terminate the master-slave dependency, however, these actions do not
necessarily terminate the motion:
 KILL or HALT to the slave axis.
 DISABLE to either axis or both axes.
 Setting the logical dependence between master and slaves axes to zero. For example,
MASTER MPOS(0) = 0.
Syntax
MASTER axis_MPOS=formula

Version NT 2.20 85 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Arguments
axis_MPOS Define master value for axis
= Assignment operator
formula A variable and/or expression

Related ACSPL+ Commands


SLAVE, GO, HALT, KILL, ENABLE/ENABLEALL, DISABLE, MAP
Related ACSPL+ Variables
AST, XSACC, SYNV, MFF
COM Library Methods
SetMaster, Slave, SlaveStalled
C Library Functions
acsc_SetMaster, acsc_Slave, acsc_SlaveStalled
Examples
Example 1:

MASTER MPOS(0)=5*RVEL(1)
!Creates a master-slave dependency where
!the 0 axis velocity is slaved to five times
!the 1 axis reference velocity (RVEL)
SLAVE 0 !Initiates the 0 axis motion

Example 2:
Figure 8 illustrates SLAVE/pt used in the following syntax example.

MASTER MPOS(0)=FPOS(1)+MARK (1)


!Create a master slave dependency, where
!axis 0 is the slave. The master axis
!is 1, and the FPOS (feedback position)
!expression plus the MARK position
!are the references for the slaved axis 0.
SLAVE/pt 0, -500, 500
!SLAVE command with position lock
!and specified boundary switches,
!for axis 0. -500 is the left
!position boundary, and 500 is the
!right position boundary.

Version NT 2.20 86 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Figure 8 SLAVE /pt Illustration


In Figure 8, Position 1 is outside of the defined boundary and the master-slave dependency is
stalled. Position 2 is within the defined boundary and the master-slave dependency is active.

1.5.9 MPOINT
Description
MPOINT specifies an array of destination points used by MPTP...ENDS, PATH...ENDS or
PVSPLINE...ENDS motion commands. An MPOINT array must conclude with ENDS.
Syntax
MPOINT axis_list, array-name (number of rows,number of points)
Arguments
axis_list List of axes involved. Axes must be in the same order as defined in
MPTP, PATH or PVSPLINE.
array (number of The MPOINT array must be defined as Real.
rows,number of points) The number of rows is the first element and the number of columns is the
second element. A three-axis, five-point array is defined as follows: real
array (3)(5).
Each row defines the values for the points for each axes, and depending
on command preceding MPOINT, the defined velocities, and the defined
times. The array must contain, at least, the same number of columns
declared in the array as the number of defined points. Extra array columns
are ignored. See Array Structures for a description of various array
configurations.

Related ACSPL+ Commands


MPTP...ENDS, POINT, PATH...ENDS, PVSPLINE...ENDS
COM Library Methods
MultiPoint, MultiPointM, Spline, SplineM, AddPVPoint, AddPVPointM, AddPVTPoint,
AddPVTPointM
C Library Functions
acsc_MultiPoint, acsc_MultiPointM, acsc_Spline, acsc_SplineM, acsc_AddPVPoint,
acsc_AddPVPointM, acsc_AddPVTPoint, acsc_AddPVTPointM
Array Structures
There are different point array structures depending on the MPOINT enabling command and
command options. These structures are described below.

Version NT 2.20 87 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

1. A five-point, three-axis MPOINT array enabled by MPTP or PATH without command


options appears as follows:

ARRAY (3)(5)
Point 1 Point 2 Point 3 Point 4 Point 5
0 Axis 1000 2000 3000 4000 5000
1 Axis 5000 4000 3000 2000 1000
5 Axis 0 2000 4000 6000 8000

See Example 1.
2. If MPOINT follows MPTP/v, the point array must include an additional row to specify the
transition velocity from the previous point to the current point and appears as follows:

ARRAY (4)(5)
Point 1 Point 2 Point 3 Point 4 Point 5
0 Axis 1000 2000 3000 4000 5000
1 Axis 5000 4000 3000 2000 1000
5 Axis 0 2000 4000 6000 8000
Velocity 6000 7000 5000 4000 4000

See Example 2.
3. If MPOINT follows PATH/t, the point array must include an additional row to specify the
time interval between the previous point and the current point and appears as follows:

ARRAY (4)(5)
Point 1 Point 2 Point 3 Point 4 Point 5
0 Axis 1000 2000 3000 4000 5000
1 Axis 5000 4000 3000 2000 1000
5 Axis 0 2000 4000 6000 8000
Time 250 250 250 250 250

Time is specified in milliseconds.


4. If MPOINT follows PVSPLINE without command option /t, the array must include two
sets of rows for each axis:
• The first set defines the destination points
• The second set defines the velocity at the destination points
For example:

Version NT 2.20 88 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

ARRAY (6)(5)
Point 1 Point 2 Point 3 Point 4 Point 5
0 Axis 1000 2000 3000 4000 5000
1 Axis 5000 4000 3000 2000 1000
5 Axis 0 2000 4000 6000 8000
0 Axis VEL 5000 5000 5000 5000 5000
1 Axis VEL 2500 2500 2500 2500 2500
5 Axis VEL 3000 3000 3000 3000 3000

5. If MPOINT follows PVSPLINE/t, the array must include an additional column that
specifies the time interval between the previous point and the current point. Time is in
milliseconds. For example:

ARRAY (7)(5)
Point 1 Point 2 Point 3 Point 4 Point 5
0 Axis 1000 2000 3000 4000 5000
1 Axis 5000 4000 3000 2000 1000
5 Axis 0 2000 4000 6000 8000
0 Axis VEL 5000 5000 5000 5000 5000
1 Axis VEL 2500 2500 2500 2500 2500
5 Axis VEL 3000 3000 3000 3000 3000
Time 500 500 500 500 500

See Example 3.
6. If MPTP/r enables MPOINT, the array points are relative.
Examples
Example 1:
Illustrating sample code based on the ARRAY (3)(5) structure.

REAL ARRAY(3)(5) !Defines ARRAY with three rows and


!five columns as real.
INT NUMBER_of_POINTS !Defines NUMBER_of _POINTS as an integer variable.
! ------------ Fill the ARRAY array----------------------
ARRAY(0)(0)=1000;ARRAY(0)(1)=2000;ARRAY(0)(2)=3000;ARRAY(0)(3)=4000;
ARRAY (0)(4)=5000;ARRAY(1)(0)=5000;ARRAY(1)(1)=4000;ARRAY(1)(2)=3000;
ARRAY (1)(3)=2000;ARRAY(1)(4)=1000;ARRAY(2)(0)=0;ARRAY(2)(1)=2000;
ARRAY (2)(2)=4000;ARRAY (2)(3)=6000;ARRAY(2)(4)=8000
NUMBER_of_POINTS=5 !Set NUMBER_of_POINTS
ENABLE (0,1,5) !Enable axes 0, 1 and 5

Version NT 2.20 89 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

PATH (0,1,5), 1 !PATH initiates simultaneous motion for axes 0, 1,


!and 5. The time interval is one millisecond between
!each destination point.
MPOINT (0,1,5), ARRAY, NUMBER_of_POINTS
!Define an MPOINT array for axes 0, 1 and 5 where
!ARRAY and NUMBER_of_POINTS are called
ENDS (0,1,5) !Concludes MPOINT
STOP !End program

Example 2:
Illustrating sample code based on the ARRAY (4)(5) structure.

REAL ARRAY(4)(5) !Defines ARRAY with four rows and


!five columns as real.
INT NUMBER_of_POINTS !Defines NUMBER_of _POINTS as an integer
!variable.
! ------------ Fill the ARRAY array----------------------
ARRAY(0)(0)=1000;ARRAY(0)(1)=2000;ARRAY(0)(2)=3000;ARRAY(0)(3)=4000;
ARRAY (0)(4)=5000;ARRAY(1)(0)=5000;ARRAY(1)(1)=4000;ARRAY(1)(2)=3000;
ARRAY (1)(3)=2000;ARRAY(1)(4)=1000;ARRAY(2)(0)=0;ARRAY(2)(1)=2000;
ARRAY(2)(2)=4000;ARRAY(2)(3)=6000;ARRAY(2)(4)=8000;ARRAY(3)(0)=6000;
ARRAY(3)(1)=7000;ARRAY(3)(2)=5000;ARRAY(3)(3)=4000;ARRAY(3)(4)=4000
NUMBER_of_POINTS=5 !Set NUMBER_of_POINTS
ENABLE (0,1,5) !Enable axes 0, 1 and 5
PATH (0,1,5), 1 !PATH initiates simultaneous motion for axes
!0, 1 and 5. The time interval is one millisecond
!between each destination point.
MPOINT (0,1,5), ARRAY, NUMBER_of_POINTS
!Define an MPOINT array for axes 0, 1 and 5
!where ARRAY and NUMBER_of_POINTS are called.
ENDS (0,1,5) !Concludes MPOINT
STOP !End program

Version NT 2.20 90 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Example 3:
Illustrating sample code based on the ARRAY (7)(5) structure.

REAL ARRAY(7)(5) !Defines ARRAY with seven rows and


!five columns as real.
INT NUMBER_of_POINTS !Defines NUMBER_of _POINTS as an integer variable.
! ------------ Fill the ARRAY array----------------------
ARRAY(0)(0)=1000;ARRAY(0)(1)=2000;ARRAY(0)(2)=3000;ARRAY(0)(3)=4000;
ARRAY (0)(4)=5000;ARRAY(1)(0)=5000;ARRAY(1)(1)=4000;ARRAY(1)(2)=3000;
ARRAY (1)(3)=2000;ARRAY(1)(4)=1000;ARRAY(2)(0)=0;ARRAY(2)(1)=2000;
ARRAY(2)(2)=4000;ARRAY(2)(3)=6000;ARRAY(2)(4)=8000;ARRAY(3)(0)=5000;
ARRAY(3)(1)=5000;ARRAY(3)(2)=5000;ARRAY(3)(3)=5000;ARRAY(3)(4)=5000;
ARRAY(4)(0)=2500;ARRAY(4)(1)=2500;ARRAY(4)(2)=2500;ARRAY(4)(3)=2500;
ARRAY(4)(4)=2500;ARRAY(5)(0)=3000;ARRAY(5)(1)=3000;ARRAY(5)(2)=3000;
ARRAY(5)(3)=3000;ARRAY(5)(4)=3000;ARRAY(6)(0)=500;ARRAY(6)(1)=500;
ARRAY(6)(2)=500;ARRAY(6)(3)=500;ARRAY(6)(4)=500
NUMBER_of_POINTS=5 !Set NUMBER_of_POINTS
ENABLE (0,1,5) !Enable axes 0, 1 and 5
PVSPLINE/t (0,1,5) !PVSPLINE/t initiates simultaneous motion for axes
!0, 1 and 5 with a user-defined time interval
!between each point.
MPOINT (0,1,5), ARRAY, NUMBER_of_POINTS
!Define an MPOINT array for axes 0, 1 and 5
!where ARRAY and NUMBER_of_POINTS are called.
ENDS (0,1,5) !Concludes MPOINT
STOP !End program

1.5.10 MPTP...ENDS
Description
MPTP initiates multipoint sequential positioning to a set of points. MPTP by itself does not
specify any point, however dwell time at each point can be optionally specified. Points are
specified by the POINT or MPOINT commands that follow MPTP.
In single axis motion, MPTP generates sequential motion between the defined array points,
where at the end of each segment, RVEL = 0, as if each segment was defined by a separate PTP
command.
In group motion, where more than one axis is declared, the first axis in the axis_list is the
leading axis. The motion parameters of the leading axis become the default motion parameters
for all axes in the group. Motion on all axes in a group start and conclude at the same time.
MPTP generates sequential motion between the defined array points, where at the end of each
set of points, RVEL = 0, as if each motion was defined by a separate PTP command.

Version NT 2.20 91 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Transition to the next motion in the motion queue, if it exists, will not occur until ENDS
executes.
MPTP terminates with:
 HALT, KILL, or BREAK
 Any fault activation that disables the drive or kills the motion
 DISABLE by the user
Syntax
MPTP[/switch] axis_list[,dwell]
Arguments
axis_list List of axes, valid numbers are: 0, 1, 2, ... up to the number of axes in the system
minus 1.
dwell Dwell is an optional argument, expressed in milliseconds.

Switches
/switch can be:

/w Create the motion, but do not start until the GO command.


/v Use the specified velocity instead of the default velocity (VEL).
/c Use the point sequence as a cyclic array
/r Coordinates of each point are relative to the previous point’s coordinates.

Comments
1. MPTP motion starts only after the first point is specified
2. MPTP motion with all of its points is considered as one motion command in the motion
queue.
3. An MPOINT array declaration used in MPTP must be defined as Real.
4. MPTP/c does not end automatically. Use HALT, KILL, or BREAK to stop cyclic motion.
Related ACSPL+ Commands
GO, HALT, KILL, BREAK, IMM, MPOINT, POINT
Related ACSPL+ Variables
ACC, DEC, JERK, VEL
COM Library Methods
ToPoint, ToPointM, ExtToPoint, ExtToPointM
C Library Functions
acsc_ToPoint, acscToPointM, acsc_ExtToPoint, acsc_ExtToPointM

Version NT 2.20 92 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Examples
Example 1:
In the following example, dwell is not required, therefore the comma and the second argument
following 1000 are omitted.

MPTP 0, 1000 !Create a multipoint motion of the 0 axis


!with a dwell of 1000 msec at each point.

Example 2:

REAL ARRAY1 (4) !Define an array called ARRAY1 with four members
!as REAL
! ------------ Fill the ARRAY1 array----------------------
ARRAY1(0)=0;ARRAY1(1)=1000;ARRAY1(2)=0;ARRAY1(3)=1000
MPTP 0, 500 !MPTP motion for 0 axis, dwell 500 msec at each point
POINT 0, 2000 !First point
MPOINT 0, ARRAY1,3 !Use three points from ARRAY1
POINT 0, 3000 !Second point
POINT 0, 5000 !Third point
ENDS 0 !Ends the point sequence for 0 axis

Figure 9 illustrates the above code for a single-axis motion initiated by MPTP. Note that not
all of the members defined in ARRAY1 necessarily need to be used by MPOINT. In this
example, only three of the defined members are called.

Figure 9 Single-Axis Motion Using MPTP

Version NT 2.20 93 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Example 3:

MPTP/v XY !Create multipoint motion in group XY with


!user defined velocity and no dwell.
POINT XY,10000,0,5000 !Move to first point at velocity 5000
POINT XY,1000,1000,5000 !Add second point at velocity 5000
POINT XY,2000,1000,5000 !Add third point at velocity 5000
POINT XY,2000,0,100 !Add fourth point at velocity 100
ENDS XY !End the point sequence for XY
Figure 10 illustrates the above code for two-axis group motion initiated by MPTP/v.

Figure 10 Two-Axis Group Motion Using MPTP/v

1.5.11 MSEG...ENDS
Description
MSEG initiates two-axis segmented motion. MSEG itself does not specify a line or arc
segment. Motion starts only after the first segment is specified with a motion segment
command.
Segmented motion moves axes along a continuous path where the path is defined as a sequence
of line and arc segments on a plane.
Use the following commands to define segmented motion:
 ARC1 - adds an arc segment to a segmented motion and specifies the coordinates of center
point, coordinates of the final point, and the direction of rotation
 ARC2 - Adds an arc segment to a segmented motion and specifies the coordinates of center
point, rotation angle and direction.
 ENDS- terminates the point sequence

Version NT 2.20 94 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

 LINE - adds a linear segment to a segmented motion.


 PROJECTION - sets a projection array for a segmented motion.
 STOPPER - provides a smooth transition between two segments of segmented motion.
MSEG motion terminates with:
 HALT, KILL, or BREAK
 Any fault activation that disables the drive or kills the motion
 DISABLE by the user
Syntax
MSEG[/switch] axis_list, initial-position-axis1,initial-position-axis2
Arguments
axis_list Axes list, valid numbers are: 0, 1, 2, ... up to the number of axes in the
system minus 1.
initial-position axis1 Start coordinate for the first axis
initial-position-axis2 Start coordinate for the second axis

Switches
/switch can be:
/w Create the motion, but do not start until GO.
/v Use the specified velocity instead of the default velocity (VEL).
/c Use the MSEG segment sequence as a cyclic array.

Comments
1. Use command option /c to create cyclic motion where the final point of the last segment
becomes the first point of the next motion cycle. MSEG/c does not automatically finish.
Use HALT, KILL, or BREAK to end cyclic motion.
2. If command option /v is used, specify the user-defined velocity in each instance of LINE,
ARC1, or ARC2.
3. The MSEG command uses a motion que buffer of up to 50 segments.
Related ACSPL+ Commands
GO, HALT, KILL, BREAK, IMM
Related ACSPL+ Variables
ACC, DEC, JERK, VEL
COM Library Methods
For MSEG: Segment, Line, ExtLine, Arc1, ExtArc1, Arc2, ExtArc2, Stopper, Projection
For ENDS: FinalPoint
C Library Functions
For MSEG: acsc_Segment, acsc_Line, acsc_Arc1, acsc_Arc2, acsc_ExtLine, acsc_ExtArc1,
acsc_ExtArc2, acsc_Projection, acsc_Stopper
For ENDS: ascs_FinalPoint

Version NT 2.20 95 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Example

MSEG (0,1), 1000, 1000 !MSEG initiates segmented motion for the 0 and 1 axes
!group with initial coordinates of (1000,1000).
ARC1 (0,1), 1000, 0, 1000, -1000, -
!Add an arc segment with a center point located at
!(1000,0) and the final point located at (1000,-1000)
!with negative movement in terms of the encoder.
LINE (0,1), -1000, -1000
!Add line segment with final point (-1000,-1000).
ARC2 (0,1), -1000, 0, -3.141529
!Add arc segment with center (-1000,0) and a
!rotation angle of - radians.
LINE (0,1), 1000, 1000 !Add line segment with center (1000,1000).
ENDS (0,1) !Ends the point sequence for the 0 and 1 axes group.
STOP !Ends program

Figure 11 illustrates the motion created by the example.

Figure 11 Results of Example MSEG

Version NT 2.20 96 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

1.5.12 PATH...ENDS
Description
PATH initiates an arbitrary path motion with linear interpolation using POINT, or MPOINT
for an array of points. The arbitrary path sequence must conclude with ENDS.
PATH motion terminates due to:
 Interruption by any new motion command before the current motion concludes terminates
the PATH motion and causes an error.
 Any fault activation that disables the drive or kills the motion
 User termination by HALT, KILL, or DISABLE
Syntax
PATH[/command options]axis_list [,time-interval]
Arguments
axis_list Axes list, valid numbers are: 0, 1, 2, ... up to the number of axes in the
system minus 1.
time interval Optional time interval specification in milliseconds. PATH specified
without \t must have the time interval specification as the last argument.
The argument defines the time interval between all motion points.

Command Options

/w Create the motion, but do not start until the GO command.


/t Enables a user-defined time interval in a point array
/c Use the point sequence as a cyclic array. After arriving at the last point, continue from the first
point.
/r Coordinates of each point are relative to the previous point’s coordinates.

Version NT 2.20 97 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Figure 12 PATH...ENDS Diagram


Comments
Since a time interval and the destination point are specified, variables VEL, ACC, DEC, JERK
have no effect on this motion.
Related ACSPL+ Commands
MPTP...ENDS, POINT, MPOINT, PVSPLINE...ENDS
COM Library Methods
ToPoint, ToPointM, ExtToPoint, ExtToPointM
C Library Functions
acsc_ToPoint, acsc_ToPointM, acsc_ExtToPoint, acsc_ExtToPointM
Example
See Example 2 of MPOINT for a three axis example of MPTP...ENDS motion.

1.5.13 POINT
Description
POINT adds a destination point to multi-point or arbitrary motion paths. A sequence of
destination points can be specified with a sequence of POINT commands. POINT must follow
MPTP...ENDS, PATH...ENDS, or PVSPLINE...ENDS. Refer to each command for a list of
available command options. The sequence of specified points must conclude with ENDS.
Syntax
POINT syntax depends on the command options used in the initializing commands, as follows:
 POINT initiated by MPTP:
POINT axis_list, axis_list destination positions

Version NT 2.20 98 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

 POINT initiated by MPTP/v:


POINT axis_list, axis_list destination positions, vector velocity (GVEL)
See Example 1.
 POINT initialized by PATH:
PATH[/command options]axis_list, time-interval
POINT axis_list, axis_list destination positions
See Example 2.
 POINT initialized by PATH/t:
POINT axis_list, axis_list destination positions, time interval in milliseconds
See Example 3.
 POINT initialized by PVSPLINE:
PVSPLINE[command options]axis_list, time-interval
POINT axis_list, axis_list destination positions
See Example 4.
 POINT initialized by PVSPLINE/t:
PVSPLINE[command options]axis_list
POINT axis_list, axis_list destination positions, velocity at destination position, time
interval in milliseconds
See Example 5.
Comments
1. POINT axis specifications must follow the same order as the initializing MPTP, PATH or
PVSPLINE commands.
2. All arguments following the axis_list must appear as a comma separated list, and must
correspond to the number of axes. See for an illustration of this rule.
Related ACSPL+ Commands
MPOINT, MPTP...ENDS, PATH...ENDS, PVSPLINE...ENDS
COM Library Methods
MultiPoint, MultiPointM, Spline, SplineM, AddPVPoint, AddPVPointM, AddPVTPoint,
AddPVTPointM
C Library Functions
acsc_MultiPoint, acsc_MultiPointM, acsc_Spline, acsc_SplineM, acsc_AddPVPoint,
acsc_AddPVPointM, acsc_AddPVTPoint, acsc_AddPVTPointM

Version NT 2.20 99 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Examples
Example 1:

MPTP/v (0,1,5) !Initiates MPTP motion for axes 0, 1 and 5.


!simultaneously with a user-defined velocity(GVEL)
!at each point.
POINT (0,1,5), 1000,4000,6000,7000
!Defines destination points 1000, 4000, and 6000 for
!axes 0, 1, and 5 with a GVEL of 7000 units.
ENDS (0,1,5) !Ends MPTP/v point sequence for axes 0, 1, and 5.
STOP !Ends program

Example 2:

PATH/r (0,1,5),1000 !Initiates PATH motion for axes 0, 1, and 5.


!simultaneously where each destination point is
!relative to the previous point and the time
!interval between each point is one second.
POINT (0,1,5), 1000,2000,3000
!Defines destination points 1000, 2000, and 3000 for
!axes 0, 1, and 5 respectively.
ENDS (0,1,5) !Ends PATH point sequence for axes 0, 1, and 5.
STOP !Ends program

Example 3:

PATH/t (0,1,5) !Initiates PATH motion for axes 0, 1, and 5.


!simultaneously with a user-defined time interval
!between points.
POINT (0,1,5), 1000,2000,3000, 500
!Defines destination points 1000, 2000, 3000 for axes
!0, 1, and 5, respectively and a time interval of
!500 msec between points.
ENDS (0,1,5) !Ends PATH point sequence for axes 0, 1, and 5.
STOP !Ends program

Version NT 2.20 100 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Example 4:

PVSPLINE (0,1,5), 10 !Initiates PVSPLINE motion for axes 0, 1, and 5.


!Points are given at 10 msec intervals.
POINT (0,1,5), 200, 100, 300, 1000, 2000, 1500
!Defines points for axes 0, 1, and 5 with respective
!values of 200, 100, 300 and velocities at each
!point 1000, 2000, 1500, respectively.
ENDS (0,1,5) !Ends PVSPLINE point sequence.
STOP !Ends program

Example 5:

PVSPLINE/t (0,1,5) !Initiates PVSPLINE motion for axes 0, 1, and 5, with


!a user-defined time interval between points.
POINT (0,1,5), 200, 100, 300, 1000, 2000, 1500, 250
!Defines destination points for axes 0, 1, and 5
!with respective values of 200, 100, 300 and
!velocities at each respective point of 1000, 2000,
!1500. The time interval between points is 250 msecs.
ENDS (0,1,5) !Ends PVSPLINE point sequence for axes 0, 1, and 5.
STOP !Ends program

1.5.14 PROJECTION
Description
PROJECTION is an expansion command to the MSEG...ENDS set of commands, that allows
the controller to perform a three dimensional segmented motion such as creating arcs and lines
on a user-defined plane. The method for this 3D segmented motion is to set a transformation
matrix that defines a new plane for the segmented motion.
Syntax
PROJECTION axes_list, Transformation Matrix
Arguments
axes_list List of axes, valid numbers are: 0, 1, 2, ... up to the number of axes in the
system minus 1.
Transformation Matrix Defines the new plane

Version NT 2.20 101 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Comments
1. MSEG must precede PROJECTION.
2. Prior to using PROJECTION, the related axes must be grouped using GROUP.
3. The motion parameters of the segmented motion with PROJECTION are calculated based
on the leading axis described in the GROUP command. The other involved axes motion
parameters are not relevant. The parameters are calculated to meet a uniform travel time to
all grouped axes.
Related ACSPL+ Commands
MSEG...ENDS, LINE, ARC1, ARC2, GROUP
COM Library Methods
Projection
C Library Functions
acsc_Projection
Example
1. This example program creates a segmented motion on a new plane (in this example - a
circle) on a plane rotated around Axis X by 70° relative to plane AX, as illustrated in
Figure 13.
2. ARC2 defines the circle’s center coordinates on plane AX. PROJECTION transforms
these coordinates to the new plane, based on the values in the transformation matrix (Matrix
M, in this example).
3. Populate the transformation matrix with the values from table given below. The first two
rows define the relationship between the X and Y coordinates of the last MSEG...ENDS
motion and their respective axes in the new plane. The third row defines the tangent angle
of the new plane. In this example uses a 70° angle in reference to Axis A, where tan70=2.74.

Table 30 Matrix Values


Axis X Coordinate A Coordinate
X 1 0
A 0 1
B 0 2.74

Version NT 2.20 102 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Figure 13 PROJECTION of the XA Plane


Figure 14 illustrates the reference position of axes 0, 4, and 5 (corresponding to the XAB
coordinates illustrated in Figure 13).

Figure 14 FPOS - PROJECTION Example

Version NT 2.20 103 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Figure 15 illustrates the circle's trajectory viewed from the XA plane.

Figure 15 PROJECTION Example - Final Result

REAL M(3)(2) !Defines Transformation Matrix M as real array


! ------------ Set the transformation matrix values----------------------
M(0)(0)=1;M(0)(1)=0;M(1)(0)=0;M(1)(1)=1;M(2)(0)=0;M(2)(1)=2.74
VEL(0)=1000;ACC(0)=10000;DEC(0)=10000
!Axis motion parameters
ENABLE (0,4,5) !Enable the 0, 4 and 5 axes (required)
!Corresponding to XAB coordinates shown in Figure 15.
GROUP (0,4,5) !Group the 0, 4 and 5 axes (required)
SET FPOS(0)=0;SET FPOS(4)=0;SET FPOS(5)=0
!Sets the FPOS for 0, 4 and 5, respectively, to 0.
MSEG (0,4),0,0 !Define original plane.
PROJECTION (0,4,5),M !PROJECTION of axes XAB by matrix M.
ARC2 (0,4),750,0,6,24 !ARC2 performed on new plane.
ENDS (0,4) !Concludes MSEG.
STOP !End Program

Version NT 2.20 104 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

1.5.15 PTP
Description
PTP (point-to-point) generates motion for the specified axis or axes to a specified destination
point.
When PTP specifies a single axis, the motion profile is calculated according to VEL, ACC,
DEC, JERK values of the axis.
In group motion, when PTP specifies multiple axes, the group motion profile is based on the
leading axis’ VEL, ACC, DEC, JERK motion values, unless PTP/m is used.
PTP terminates due to:
 Interruption by any new motion command
 Any fault activation that disables the drive or kills the motion
 User termination by HALT, KILL, or BREAK.
Syntax
PTP[command options]axis_list, destination-point[,value for v, value for f]
Arguments
axis_list Single axis or axis group, valid numbers are: 0, 1, 2, ... up to the number of
axes in the system minus 1.
destination point Final destination.
value for v Optional argument for user-defined velocity.
value for f Optional argument for user-defined velocity at a destination point

Command Options

/e Wait for motion termination before executing next command.


/f Specify non-zero velocity at each destination point (or points) in a series of PTP motions
/m Use the motion profile values of the axis group as a whole, rather than those of the leading
axis, without exceeding any of the defined axes motion VEL, ACC, DEC, JERK values.
/r The destination point is relative to the start point.
/v Use the specified velocity instead of the default velocity (VEL).
/w Create the motion, but do not start until GO.

Comments
1. Axes destination points, and relative velocity in the PTP command can also be an
expression.
2. PTP can be used for executing point-to-point motion for a group of axes. For example, PTP
(0,1,2) creates motion for axes 0, 1, and 2 as a group.
Related ACSPL+ Commands
MPTP...ENDS, POINT

Version NT 2.20 105 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

COM Library Methods


ToPoint
C Library Functions
acsc_ToPoint
Examples
Example 1:

PTP/v 1, 2000, 500 !PTP axis 1 to point 2000 with velocity 500

Example 2:

PTP/rw (0,1), 1000, !PTP axes 0 and 1 where the 1 target point is 1000
2000
!and the 0 target point is 2000. The target points
!are relative to the start point. Motion will not
!commence until GO command is issued.

Example 3:

ENABLE 0 !Enables axis 0


VEL(0)=10000 !Sets the default axis 0 velocity to 10000
SET RPOS(0)=0 !Sets the current axis 0 position to 0
PTP/rf 0, 2000, 1000 !Initiates a relative axis 0 motion of 2000 with end
!velocity of 1000 at the destination point
PTP 0, 4000 !Initiates an absolute axis 0 motion to 4000
STOP !Ends program

1.5.16 PVSPLINE...ENDS
Description
PVSPLINE (position-velocity spline) creates an arbitrary motion trajectory where the
controller provides cubic spline interpolation between two points. The user specifies the end
point and the end velocity for each motion segment. ENDS must terminate the point sequence.
PVSPLINE motion terminates due to:
 Interruption by any new motion command
 Any fault activation that disables the drive or kills the motion
 User termination by HALT, KILL, or DISABLE
Syntax
PVSPLINE[command options]axis_list[,time-interval]

Version NT 2.20 106 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Arguments

axis_list Single axis or axis group, valid numbers are: 0, 1, 2, ... up to the number of
axes in the system minus 1.
time-interval Optional argument for user-defined time interval, in milliseconds, between
points.

Command Options

/r The point coordinates are relative to the previous point


/w Create the motion, but wait to start for GO
/t Non-uniform time interval: time interval is specified for each point along with the
point coordinates
/c Perform the point sequence as a cyclic array-after the last point, start the motion again
from the first point.

Comments
1. Since the time interval and the destination point are defined, variables VEL, ACC, DEC,
and JERK have no effect on PVSPLINE.
2. If PVSPLINE motion is ended with HALT, the controller does not follow the motion
trajectory during deceleration.
3. PVSPLINE specified with /t must NOT have a time-interval specification. Instead, specify
the time interval for each point as an additional argument for POINT or as an additional
array row in MPOINT.
Related ACSPL+ Commands
POINT, MPOINT
COM Library Methods
Spline, SplineM, AddPVPoint, AddPVPointM, AddPVTPoint, AddPVTPointM
C Library Functions
acsc_Spline, acsc_SplineM, acsc_AddPVPoint, acsc_AddPVPointM, acsc_AddPVTPoint,
acsc_AddPVTPointM
Example

REAL ARRAY_NAME(4)(5) !Defines a point array of four rows and five columns
!and a variable that defines the number of array rows
!that are part of the motion.
INT NUMBER_of_POINTS !Defines NUMBER_of _POINTS as an integer variable.
NUMBER_of_POINTS=3 !Assigns 3 to the NUMBER_of_POINTS variable.
PVSPLINE/r (0,1),10 !Initiates PVSPLINE motion for axis 0 and 1 with
!relative destination points and a time interval of
!10 milliseconds between each point.
POINT (0,1),200,100,1000,2000

Version NT 2.20 107 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

!Defines values for 0 and 1 axes where:


!200, 100=destination point for the 0 and 1 axes,
!respectively; and 1000, 2000=velocity at specified
!points for the 0 and 1 axes, respectively.
MPOINT (0,1), ARRAY_NAME, NUMBER_of_POINTS
!Defines an MPOINT array for the 0 and 1 axes, where
!ARRAY_NAME is called, and where NUMBER_of_POINTS
!defines the number of array columns involved in the
!motion.
ENDS (0,1) !Ends MPOINT for 0 and 1 axes.
STOP !Ends program.

Figure 16 illustrates a typical PVSPLINE motion.


The following diagram illustrates a typical PVSPLINE motion.

Figure 16 PVSPLINE Motion Diagram

Version NT 2.20 108 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

1.5.17 SLAVE
Description
SLAVE initiates a motion based on position lock or velocity lock slaved to a master value or
expression. Only individual axes are allowed. The initiated motion starts immediately if the axis
is idle, otherwise the motion waits in the motion queue until all previously created motions
finish. SLAVE must precede MASTER.
MASTER - SLAVE dependency terminates with:
 Any fault activation that disables the drive or kills the motion
 HALT, KILL, BREAK
 DISABLE to the SLAVE axis.
 Setting the logical dependence between master and slave axes to zero. For example
MASTER MPOS(0)=0
Syntax
SLAVE[/command options] axis[,lower boundary, upper boundary]
Arguments
axis Axis designation, valid numbers are: 0, 1, 2, ... up to the number of axes in
the system minus 1.
lower boundary Optional argument used for setting the lower boundary of master-dependent
SLAVE motion.
upper boundary Optional argument used for setting the upper boundary of master-dependent
SLAVE motion.

Command Options

/w Create the motion, but do not start until GO is executed.


/p Master - Slave motion generated by position lock.
/t Create slave motion within specified position boundaries.

Comments
1. When /p is used, the controller first initiates velocity lock. Only after the achieving velocity
lock the controller will engage position lock.
2. If no command option is specified, the default mode is velocity lock.
Related ACSPL+ Commands
MASTER, GO, HALT, KILL, DISABLE
Related ACSPL+ Variables
XSACC, SYNV, MFF, JERK, ACC, VEL APOS
COM Library Methods
SetMaster, Slave, SlaveStalled

Version NT 2.20 109 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

C Library Functions
acsc_SetMaster, acsc_Slave, acsc_SlaveStalled
Example
See MASTER for an example of MASTER - SLAVE syntax.

1.5.18 STOPPER
Description
STOPPER is used in conjunction with MSEG...ENDS to avoid velocity jumps at segment
inflection points. When STOPPER is specified between two segments, the controller provides
smooth deceleration to zero before STOPPER and a smooth acceleration to the default or
specified velocity after STOPPER.
Syntax
STOPPER axis_list
Arguments
axis_list Single axis or axis group, valid numbers are: 0, 1, 2, ... up to the number of
axes in the system minus 1.

Related ACSPL+ Commands


MSEG...ENDS, ARC1, ARC2, LINE, PROJECTION
COM Library Methods
Stopper
C Library Functions
acsc_Stopper
Example
Figure 17 illustrates the following example. For this illustration the reference position (RPOS)
for axes 0 and 1 was set to (0,0).

MSEG (0,1), 0, 0 !MSEG initiates segmented motion for the 0 and 1 axis
!group with the point on the plane located at (0, 0).
LINE (0,1), 1000, 2500 !Add line segment with final point at (1000, 2500).
STOPPER (0,1) !Slow down to zero.
ARC1 (0,1), 0,2000, -1000,2500, +
!Add arc segment with final point (-1000, 2500) and
!center point (0, 2000).
STOPPER (0,1) !Slow down to zero.
LINE (0,1), 0, 0 !Add line segment with final point (0, 0).
ENDS (0,1) !End MSEG.
LINE (0,1), 1000, 1000 !Add line segment with final point (1000, 1000).
ENDS (0,1) !Ends the point sequence for the 0 and 1 axis
!group.

Version NT 2.20 110 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Figure 17 Use of STOPPER

1.5.19 TRACK
TRACK initiates track motion. In TRACK motion, a new point-to-point move is generated to
a new target position whenever the variable TPOS (target position) changes. TRACK does not
terminate automatically. If TPOS is not assigned a new value, motion stops at the last TPOS
and waits. If a new TPOS value is assigned, motion continues.
TRACK terminates due to:
 Any subsequent motion command except TRACK.
 Any fault activation that disables the drive or kills the motion.
 User termination by HALT, KILL, or DISABLE.
Syntax
TRACK [/switch] axis
Arguments

axis Axis designation, valid numbers are: 0, 1, 2, ... up to the number of axes in
the system minus 1.

Switch
/switch can be:
/w Create the motion, but do not start until GO.

Version NT 2.20 111 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Comments
1. While PTP code appears shorter and simpler, there are applications where TRACK is
preferable to PTP. For example, TRACK provides an easy way to change the destination
position at any time during the motion by changing the target position (TPOS) variable. The
controller terminates the current motion and proceeds to the next destination point, on-the-
fly.
2. TRACK is for single axis motion only.
3. TPOS is updated every controller cycle.
Related ACSPL+ Commands
PTP
COM Library Methods
Track
C Library Functions
acsc_Track
Example

TRACK 0 !Initiates TRACK for 0 axis.


TPOS(0) = NewTarget !The controller generates a PTP motion to the point
!designated by NewTarget.

Version NT 2.20 112 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

1.5.20 XSEG...ENDS
Description
The XSEG...ENDS (Extended Segmented Motion) command block provides the following:
 Corner detection
 Detection of segments, where required velocity violates axis velocity/acceleration limits
 Velocity limitation at corners and problematic segments
 Building a velocity profile using multi-segment look-ahead algorithm
Use the following commands to define the segmented motion:
 ARC1 - adds an arc segment to a segmented motion and specifies the coordinates of center
point, coordinates of the final point, and the direction of rotation
 ARC2 - Adds an arc segment to a segmented motion and specifies the coordinates of center
point, rotation angle and direction.
 LINE - adds a linear segment to a segmented motion.
 ENDS- terminates the point sequence

Syntax
XSEG [/switches] (axis_list), initial_position_axis1,initial_position_axis2
[,velocity][,end_velocity][,junction_velocity][,angle] [,starvation_margin
[,segments_buffer]]
Segment commands (ARC1, ARC2, LINE)
ENDS

Version NT 2.20 113 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Arguments
axis_list Single axis or axis group, valid numbers are: 0, 1, 2, ... up to the number of
axes in the system minus 1.
initial_position_axis1 Initial position of the first axis.
initial_position_axis2 Initial position of the second axis.
velocity [Optional, only used with /v switch]
Defines required velocity instead of default velocity (VEL).
end_velocity [Optional, only used with /f switch]
Defines required velocity at the end of each segment.
junction_velocity [Optional, only used with /j switch]
Defines required velocity at the junction.
angle [Optional, only used with /a switch]
The junction will be treated as a corner if actual junction angle is more than
defined.
starvation_margin [Optional] Starvation margin in milliseconds. The controller sets the
AST.#NEWSEGM bit starvation_margin millisecond before the starvation
condition occurs.
By default, if the argument is not specified, the starvation margin is 500
milliseconds.
segments_buffer [Optional] One-dimensional user defined real array. The controller uses this
array to store adding segments. By default, if the argument is not specified,
the controller allocates internal buffer for storing 50 segments only. The
argument allows the user application to reallocate the buffer for storing
larger number of segments. The larger number of segments may be required
if the application needs to add many very small segments in advanced.

Switches
The following optional /switches may be used singularly or in combination with the XSEG
command:
/w Do not start until the GO command.
If the switch is not specified, the motion starts immediately after the first motion segment
is defined.
/v Specify required velocity.
The switch requires additional parameter that specifies required velocity.
If the switch is not specified, the required velocity is derived from the leading axis
parameters.
/m Use maximum velocity under axis limits.
With this switch, no required velocity should be specified.
The required velocity is calculated for each segment individually on the base of segment
geometry and axis velocities (VEL values) of the involved axes.

Version NT 2.20 114 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

/f Decelerate to the end of each segment.


The switch requires an additional parameter that specifies end velocity. The controller
decelerates to the specified velocity in the end of each segment. The specified value should
be less than the required velocity; otherwise the parameter is ignored.
If the switch is not specified, deceleration in each segment is not required. However, in
specific segments deceleration might occur due to corner processing or other velocity
control conditions.
/j Decelerate to corner.
The switch requires an additional parameter that specifies corner velocity. The controller
detects corner on the path and decelerates to the specified velocity before the corner. The
specified value should be less than the required velocity; otherwise the parameter is
ignored.
If switch j is not specified while switch a is specified, zero value of corner velocity is
assumed.
If switches j and a are not specified, the controller provides automatic calculation of the
corner processing.
/a Do not treat junction as a corner, if junction angle is less than or equal to the specified value
in radians.
The switch requires an additional parameter that specifies negligible angle in radians.
If switch a is not specified while switch j is specified, the controller accepts default value
of 0.01 radians that is about 0.57 degrees.
If switches j and a are not specified, the controller provides automatic calculation of the
corner processing.

Comments
For each two adjacent segments, the controller calculates the tangent vector to each segment in
the junction point. If the two vectors are equal, the segments are tangent, and no special
processing is required. If not, the two segments build a corner. In a corner, the controller
behavior follows the corner processing option selected by the user for XSEG motion.
Currently the only option available is: Exact path where no deviation from the specified path
is permitted. The user specifies two additional parameters: threshold angle and corner velocity.
The controller compares the corner angle and the threshold angle. If the corner angle is smaller,
the controller ignores the corner and tries to move as if the junction is smooth (the threshold
angle cannot be large, otherwise passing the junction at working velocity can produce
mechanical jerk). If the corner angle is greater, the controller executes deceleration to achieve
the junction point with the specified corner velocity (as shown in Figure 18).

Version NT 2.20 115 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Figure 18 Corner Processing - Exact Path Option


XSEG updates the following motion related parameters:
 Motion and Axis Statuses: AST, MST
 Vector velocity, acceleration and jerk: GVEL, GACC, GJERK
 Axis velocity: GVEC
 Motion queue status and motion type: GMQU, GMTYPE
 Trajectory vector distance from the beginning of the first segment: GPATH
 Elapsed motion time: GETIME
 Current executed segment and segments buffer status: GSEG, GSFREE
XSEG builds the algorithm upon the following axis motion parameters as axis constraints:
VEL, ACC, and JERK.
In connection with the segments_buffer argument, for most applications the internal buffer size
is enough and should not be enlarged.

Note
The buffer is for the internal use of the controller only and should not be used
by the user application.

The buffer size calculation rule: each segment requires about 600 bytes, so if necessary to
allocate the buffer for 200 segments, it should be at least 600 * 200 = 120,000 bytes. The
following declaration defines a 120,000 bytes buffer:
real buf(15000)

Note
See XARRSIZE for details how to declare a buffer with more than 100000
elements.

Version NT 2.20 116 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Examples
Example 1
XSEG (1,0),0,0 !Segmented motion for axes 1 and 0. Required velocity
!is derived from the axis 1, i.e., VEL(1) value. No
!deviation from the path is permitted. If the path
!contains a corner, and the junction angle is more
!than default value 0.01 radians, the velocity
!decelerates to zero in the corner point.
XSEG/vf !Segmented motion for axes 0 and 1 with initial point
(0,1),0,0,100,50 !(0,0) with required velocity 100 units/sec; at the
!end of each segment, the motion should decelerate
!to 50 units/sec.
XSEG/vja !Segmented motion for axes 1 and 2 with initial point
(1,2),1000,1000, !(1000,1000) and required velocity is 100 units/sec.
100,20,0.05 !If the path contains a junction, and the junction
!angle is more than 0.05 radians, the velocity
!decelerates to 20 unit/sec in the junction point.

Example 2
XSEG (0,1),1000,1000 !Create segment motion in axes XY with initial point
!(1000,1000)

ARC1 (0,1),1000,0,1000,–1000,– !Add arc segment with center (1000,0), final point (1000,
!1000), clockwise rotation

LINE (0,1),–1000,-1000 !Add line segment with final point ( 1000, 1000)

ARC2 (0,1),–1000,0,–3.141529 !Add arc segment with center ( 1000,0) and rotation
!angle of -

LINE (0),1000 !Add line segment with final point (1000,1000)

ENDS (0,1) !End the segment sequence

The XSEG command creates the segment motion. The motion does not start at this moment.
Actual motion starts once the previous motion ends and one or more segments are added. The
four segment commands specify the following path:

Version NT 2.20 117 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Note
The LINE command may specify one axis that actually moves in this
segment. Other axes specified in XSEG hold their positions while the linear
segment is in progress.

The ARC1 and ARC2 commands always specify two axes.


The ARC1 and ARC2 commands differ by the required arguments. The ARC1 command
specifies the coordinates of the center point, coordinates of the final point and the direction of
rotation (+ for counter-clockwise, – for clockwise rotation). The ARC2 command specifies the
coordinates of the center point and rotation angle (positive for counter clockwise, negative for
clockwise rotation). The ARC1 and ARC2 commands may produce the same result, so the user
may select the one that suits the available data. If the user knows the coordinates of the center
point, coordinates of the final point and the direction of rotation, ARC1 is preferable. If the user
knows the coordinates of the center point and rotation angle, ARC2 is preferable.
The ENDS command informs the controller that no more segments will be specified for the
motion.

1.6 Program Flow Commands


The Program Flow commands are:

Command Action
Assignment Command Assigns values
BLOCK...END Executes a group of commands in one MPU cycle
CALL Calls subroutine.
GOTO Transfers program execution to another point in the program.
IF, ELSEIF, ELSE...END IF command structure.
INPUT Suspends program execution pending user input
LOOP...END Loop command structure.
ON...RET Defines an autoroutine
TILL Delays program execution until a specified expression produces a non-
zero (true) result.
WAIT Delays program execution for a specified number of milliseconds.
WHILE...END While command structure.

Version NT 2.20 118 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

1.6.1 Assignment Command


Description
The Assignment command (=) is used to assign a value to ACSPL+ standard or user-defined
variables with read/write options.
Syntax
variable_name = value
Arguments
variable_name Can be:
 Name of ACSPL+ standard or user-defined variable
 An element of an ACSPL+ or user array
 One bit of integer variable or integer array element (applicable only to
those variables having specifically named bits, for example, IMASK)
value Can be of integer or real type. The value argument can either be:
 A specific value
 An expression that during runtime calculates to a value

Comments
Assigning to an ACSPL+ variable is limited by the following rules:
 Assignment to read-only variable (for example, FPOS) is prohibited
 Assignment to a protected variable (for example, ERRI) is allowed in only in the
Configuration mode.
After assignment, the previous value of the variable is replaced by the new value.
User local and global variables must be declared before they can be used in an assignment
command.
 Explicit indexing only is allowed for user array variables.
 If a user variable is scalar, no indexing is required.
 If a user variable is one-dimensional array, it requires one index. Two-dimensional arrays
require two indexes.
A bit can have only two possible values: 0 (false) or 1 (true), while the value result, which
defines the bit value, can be any value. Assignments convert the value as follows:
 If the value is zero, the bit is set to zero
 If the value is non-zero, the bit is set to one
Although bit assignments are applicable to any integer variable or array element, they are
mainly used for changing flag variables and output bits.
The controller executes assignment commands in the following order:
1. Calculate value
2. Convert the type of calculated value to the type of variable_name (if the types differ)
3. Assign the result to variable_name

Version NT 2.20 119 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Examples

VEL(0) = 1000 !Assign 1000 to axis 0 default velocity -


!explicit indexing.
VEL0 = 1000 !Assign 1000 to axis 0 default velocity -
!postfix indexing.
Var1 = FPOS(0) !Assign value of ACSPL+ variable to user variable.
Var2(0)(5) = 200 !Assign to element of user array.
OUT0.5 = 1 !Assign to digital output 5

1.6.2 BLOCK...END
Description
Commands specified within the BLOCK...END structure are executed in one MPU cycle.
Syntax
BLOCK
command-list
END
Arguments
command-list List of commands, separated by semi-colons.

Comments
1. The structure provides an alternative to specifying command-list commands in one line. The
commands within the structure can be specified in several lines. However, the controller
executes all commands in one controller cycle, as if they were written in one line.
2. Commands and functions that may cause delay (WAIT, TILL, GETSP, WHILE...END,
LOOP...END etc.) provide delay even if they are used within the BLOCK...END structure.
Example

INT XX,YY,ZZ !Defines variables as integers


BLOCK !BLOCK command
XX=TIME !XX is assigned the TIME standard variable
YY=TIME !(controller timer from power-up, in mSec.
!One execution line later, YY is also
!assigned the TIME standard variable.
!Because both lines were written in the
!BLOCK…END block, they are both executed
!during the same controller cycle hence the
!difference between the two values =0
!(ZZ=0).
!If both lines were NOT written within the
!BLOCK structure, the difference would be
!one controller cycle (ZZ=1).

Version NT 2.20 120 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

END !End the BLOCK command


ZZ=YY-XX !The result in this example is ZZ=0.

1.6.3 CALL
Description
CALL calls a subroutine according to a specified label. All subroutines must begin with a label
and conclude with RET.
Syntax
CALL label

STOP
label:

RET
Arguments

label Unique name identifier.

Related ACSPL+ Commands


GOTO
Comments
1. A label specified by CALL must be defined somewhere in the same program buffer. The
subroutine starts after the label and spans all commands up to RET.
2. CALL transfers program execution to the start of the subroutine and stores the return point
in the stack. When RET executes, the return point is extracted from the stack and execution
continues from the next command after CALL.
3. Subroutines can be nested; a subroutine can call another subroutine, and so on.
4. CALL can only call a sub-routine located in the same buffer
Example

! ------------ Start subroutine labeled CHECK_PE ----------------------


CALL CHECK_PE !Call a subroutine named CHECK_PE.
DISABLE 0 !This line will be executed when the
!subroutine is terminated by the RET command.
STOP !Ends program.
CHECK_PE: !Subroutine label name.
WHILE (ABS(PE(0)>20)) !Subroutine command lines.
DISP "PE is :", PE(0)

Version NT 2.20 121 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

END !End WHILE loop.


RET !Terminate subroutine and return to main program.

1.6.4 GOTO
Description
GOTO transfers program execution to a particular point in the program specified by a unique
label.

Caution
Avoid using GOTO to enter or exit a subroutine. Failure to do so will
result in program termination due to a stack violation error. As an
alternative see CALL.

Syntax
GOTO label
Arguments
label A unique label defined in the program buffer.

Comments
1. A label specified by GOTO must be defined somewhere in the same program buffer.
2. The next executed command is located after the label.
Related ACSPL+ Commands
CALL
Example

GOTO ARR !Go to a label named ARR

1.6.5 IF, ELSEIF, ELSE...END


Description
IF, ELSEIF, ELSE, and END are building blocks used in the IF control structures. These
commands specify a condition which must be met before executing a list of commands. IF
control structures must conclude with END.
If the condition result is none-zero (true), the command list in the corresponding clause
executes and all subsequent conditions are not validated and all other command lists are
skipped. After executing the command list, the program continues from the next line after END.
If a condition result is zero (false), the command list is skipped. The program then checks
subsequent ELSEIF conditions. If no condition result is true, the command list following
ELSE executes, if it exists. The program then continues from the command following END.
Table 31 describes the IF control structure syntax using these building blocks.

Version NT 2.20 122 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Syntax

Table 31 IF Control Structures


Syntax IF Structure
IF expression IF-END
command list
END
IF expression IF-ELSE-END
command list
ELSE
command list
END
IF expression IF-ELSEIF-END
command list
ELSEIF sequence
END
IF expression IF-ELSEIF-ELSE-END
command list
ELSEIF sequence
ELSE
command list
END

Comments
1. The IF -ELSE -END control structure has two command lists. One follows IF and the
second follows ELSE. Only one command list executes, depending on the result of the
expression following IF.
2. The IF-ELSEIF-END, and IF-ELSEIF- ELSE -END forms provide validation of a
sequence of conditions.
3. IF control structures may contain any number of ELSEIF clauses. Each ELSEIF clause
specifies its own condition. The conditions are validated in the following order:
a) Condition after IF
b) Condition after first ELSEIF
c) Condition after second ELSEIF
Examples
Example 1:
This example program fragment activates either output 5 or 6 and shuts off the other, depending
on the state of input 3.

IF IN0.3 !Check if the third bit of IN0 is 1.


OUT0.5 = 1 !Set the 5th bit of OUT0 to 1.
OUT0.6 = 0 !Set the 6th bit of OUT0 to 0.
ELSE !Execute the next commands only if the IF
!condition was false
OUT0.5 = 0 !Set the 5th bit of OUT0 to 0.
OUT0.6 = 1 !Set the 6th bit of OUT0 to 1.

Version NT 2.20 123 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

END !End of the IF body.


STOP !Ends program

Example 2:
The following program fragment implements a saturation effect by limiting variable V0 to a
range from -256 to +256.

IF V0 < -256 !Check if V0 is less than -256


V0 = -256 !Assign -256 to V0 (low saturation)
ELSEIF V0 > 256 !If V0 is not less than -256, check if it
!is greater than 256
V0 = 256 !Assign 256 to V0 (high saturation)
END !End of the IF body (no saturation if
!V0 is equal to or more than 256)
STOP !Ends program

1.6.6 INPUT
Description
INPUT suspends program execution in a specific buffer until the host or the user (via the
Terminal option) provides a specific value or values.
Syntax
INPUT(array)
Arguments
array User defined array.

Comments
The INPUT command accepts as an argument a scalar or array variable. The command delays
program execution until the host provides an input. The input from the host is expected to
consist of one or more numbers separated by spaces or commas and followed by a carriage
return. The INPUT command scans the numbers in the input and stores them in the argument
variable.
If the argument variable is scalar, INPUT takes the first number in the input and stores it in the
argument variable.
If the argument is an array, INPUT fills argument the array with the values from the input.
The function execution is completed when the scalar is stored or the array is filled or a carriage
return is encountered.
COM Library Methods
SuspendBuffer
C Library Functions
acsc_SuspendBuffer

Version NT 2.20 124 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Related ACSPL+ Commands


None
Examples
Example 1:

INT ARR(10) !Declares a ten-element array.


… !Other program commands.
INPUT (ARR) !Wait for user to enter values in ARR array.

Program execution halts until input is received from the host.


Assume that a user enters: 20 30 40 <ENTER>, the program stores the three values in ARR(0),
ARR(1), and ARR(2) and resumes execution. Since the user has entered only three numbers,
the program will store 0 (zero) as the value in the elements: ARR(3) through ARR(9).

Note
The user may enter the value of a keyboard function key, 0 (zero) followed
by an integer from 1 to 12, in which case the value is stored separately in the
standard variable: FK.

Example 2:

INT ARR(2) !Declares a two-element array.


DISP "[FILL AXIS NUMBER],[FILL DISTANCE TO GO]"
!Display the text in the Terminal
INPUT (ARR) !This command stops the program until the two
!variables are entered into the ARR array.
SET FPOS(ARR(0))=0 !Set the feedback position to zero.
ENABLE (ARR(0)) !Enable the drive specified by the value of ARR(0).
PTP/RE (ARR(0)), (ARR(1))
!Move the ARR(0) axis to position ARR(1)

Version NT 2.20 125 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

1.6.7 LOOP...END
Description
The LOOP command structure provides a fixed number of command list repetitions set by the
definition of an exact value, or any expression. LOOP control structures must conclude with
END.
Syntax
LOOP expression
command_list
END
Arguments

expression Defines the number of loops. It can also be a specific integer number.
command_list Any set of commands that are to be repeated.

Comments
1. If the expression result is zero or negative, the command list is not executed and the
program continues from the next line after END.
2. If the expression result is not an integer the command rounds-off the number to the closest
integer.
Examples
Example 1:

LOOP 10 !Do 10 repetitions.


J=J+1 !J is increased by 1 for each repetition.
END !End LOOP.
STOP !Ends program.

Example 2:

LOOP ARR !Do repetitions equal to value labeled by ARR.


J=J+1 !J is increased by 1 for each repetition.
END !End LOOP.
STOP !Ends program.

Example 3:

LOOP YY*325/TT !Do repetitions equal to the value of the


!expression YY*325/TT
J=J+1 !J is increased by 1 for each repetition.
END !End LOOP.
STOP !Ends program.

Version NT 2.20 126 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

1.6.8 ON...RET
Description
ON...RET defines an autoroutine. An autoroutine consists of a condition, and a body.
Autoroutines must conclude with RET. The autoroutine condition is checked every MPU
cycle. Once the autoroutine condition is met, the autoroutine interrupts, executes the lines in the
body (until RET), and then transfers execution control back to the interrupted program line.

Caution
The controller should never directly execute ON. If the program execution
flow comes to ON, the controller asserts a runtime error and aborts the
program. To avoid this error, use ON after STOP.

Syntax
ON condition
auto_routine body
RET
Comments
1. Once the buffer in which an autoroutine is compiled, that autoroutine is enabled.
2. The controller implements edge-detection in autoroutine condition verification. If a
condition becomes true, the controller activates the autoroutine only once. If afterwards the
condition remains true, the controller does not activate the autoroutine again. The condition
must become false and then become true again in order to activate the autoroutine again.
3. Only one autoroutine can be active in a buffer at a time.
Related ACSPL+ Commands
ENABLEON, DISABLEON
Examples
Example 1:
Demonstrates a typical use of an autoroutine for processing controller faults. The autoroutine
provides an error message when a drive alarm on 0 axis occurs.

STOP !STOP must precede the autoroutine.


ON FAULT(0).#DRIVE !Activate autoroutine when bit
!FAULT(0).#DRIVE changes from 0 to 1
DISABLE 0 !Disable drive X
DISP "0 Axis Drive Alarm" !Display message
RET !End of autoroutine

Version NT 2.20 127 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Example 2:
Illustrates how all variables, not only faults, can be used in autoroutine conditions. Assuming
that output OUT0.6 is connected to a LED indicator, the following autoroutine signals the
motion state bit to activate the indicator, and deactivate it when the 0 axis is no longer in motion.

STOP !STOP must precede the autoroutine.


ON MST(0).#MOVE !When MST(0).#MOVE bit changes from 0 to
!1 (signaling that the axis is moving)
OUT0.6 = 1 !Set output 6 to 1 (turn on the LED)
RET !End of autoroutine
ON ^MST(0).#MOVE !When MST(0).#MOVE bit changes from 1 to
!0 (signaling that the axis is no longer
!moving)
OUT0.6 = 0 !Set output 6 to 0 (turn off the LED)
RET !End of autoroutine

1.6.9 TILL
Description
TILL delays program execution until the result of a specified expression is met, or the return
value is non-zero.
Syntax
TILL expression [,time_out]
Arguments

expression Defines how long to pause the program execution


time_out Used to specify a time-out in milliseconds. Use time_out to limit the time
that an expression can return zero.

Related ACSPL+ Commands


WAIT
Examples
Example 1:
TILL ^MST(0).#MOVE !Wait for 0 axis termination

Example 2:
TILL IN0.0=1, 2000 !Wait until input #0 =1 or 2000 milliseconds

Example 3
TILL RPOS(0)<>0 !Wait until RPOS(0) is not equal to 0

Version NT 2.20 128 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

1.6.10 WAIT
Description
WAIT delays program execution for the specified number of milliseconds.
Syntax
WAIT wait_time
Arguments

wait_time Defines how long to delay the program execution. wait_time can also be
defined by an expression.

Related ACSPL+ Commands


TILL
Examples
Example 1:
WAIT 2000 !Wait 2000 milliseconds

Example 2:
WAIT YY=65/TT !Milliseconds defined by an expression

1.6.11 WHILE...END
Description
The WHILE command structure provides repetitive execution of commands list as long as a
condition is satisfied. If the condition was not satisfied when checked for the first time, program
execution continues from the command following END.
WHILE control structures must conclude with END.
Syntax
WHILE condition
command_list
END
Arguments
condition Condition controlling the execution of the WHILE command_list.
command_list List of commands to be executed.

Related ACSPL+ Commands


IF, ELSEIF, ELSE...END, TILL

Version NT 2.20 129 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Examples
Example 1:

WHILE S_ST.#DC !Indicate data collection active.


OUT0.0=^OUT0.0 !Blink LED.
WAIT 200 !Blink period is 200msec.
END

Example 2:

WHILE (ABS(PE(0)>20)) !Do if the 0 axis Position Error is greater


!than 20.
DISP "PE is :", PE(0) Display the 0 axis Position Error
END

Example 3:

WHILE 1 !Run forever


PTP/e 0, 1000
PTP/e 0, -1000
END

1.7 Program Management Commands


The Program Management commands are:

Command Action
DISABLEON Disables autoroutine activation in a buffer.
ENABLEON Enables autoroutine activation in a buffer.
PAUSE Suspends program execution in a buffer.
RESUME Resumes program execution in a buffer.
START Activates program execution in a buffer.
STOP Terminates program execution in a buffer. STOPALL terminates all
programs.
PLCSTART Cold starts any PLC program in the system.
PLCSTOP Stops any PLC program that is running.

Version NT 2.20 130 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

1.7.1 DISABLEON
Description
DISABLEON disables autoroutine activation in a buffer. The command has the same
functionality as PFLAGS.#NOAUTO=1.
Syntax
DISABLEON [(buffer-number)]
Arguments
buffer-number Optional argument, if no buffer number is mentioned, the command
disables autoroutines in all buffers.

Related ACSPL+ Commands


ON...RET, ENABLEON

1.7.2 ENABLEON
Description
ENABLEON enables autoroutine activation in a buffer. The command has the same
functionality as PFLAGS.#NOAUTO=0.
Syntax
ENABLEON [(buffer-number)]
Arguments
buffer-number A number between 0 and 15 specifying the buffer in which the
autoroutine is to be enabled.. If no buffer number is given, the command
enables autoroutines in all buffers.

Related ACSPL+ Commands


ON...RET, ENABLEON

1.7.3 PAUSE
Description
PAUSE suspends program execution in a specific buffer.
Syntax
PAUSE buffer-number
Arguments
buffer-number A number between 0 and 15 specifying the buffer in which the program
is to be suspended.

Related ACSPL+ Commands


RESUME

Version NT 2.20 131 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Example
PAUSE 5 !Pauses buffer five

1.7.4 RESUME
Description
RESUME resumes the program execution in a specific buffer after the execution was paused.
Syntax
RESUME buffer-number
Arguments
buffer-number A number between 0 and 15 specifying the buffer in which the program
execution that was suspended by the PAUSE command is to resumed.

Related ACSPL+ Commands


PAUSE
Example
RESUME 5 !Resume buffer five

1.7.5 START
Description
START activates program execution at a specified line number, or a specific label in a specified
buffer that is different from the buffer where START is enabled.
Syntax
START buffer-number, line-number | label
Arguments
buffer-number A number between 0 and 15 specifying the buffer.
line-number | label The line number of the program within the buffer where execution is to
begin, or a label identifying the line number.

Comments
1. Unless line #1 is used in the START command, it is recommended to use a label since line
numbers are prone to change if programs lines are deleted or inserted.
2. START executes successfully if the target buffer is loaded with a program, compiled, but
not running. Otherwise, START causes a run-time error and aborts the current program.
3. The program activated by START executes concurrently with the program containing the
START command, and other active programs.
Related ACSPL+ Commands
STOP, BREAK

Version NT 2.20 132 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

Examples
Example 1:

START 8,15 !Start program in buffer 8 line 15

Example 2:

START 8,Start_here !Start program in buffer 8, at the line identified


!by the Start_here label.

1.7.6 STOP
Description
STOP terminates program execution in the specified buffer. STOPALL terminates program
execution in all buffers.
Syntax
STOP buffer-number
Arguments
buffer-number A number between 0 and 15 specifying the buffer in which the program
execution is to be halted.

COM Library Methods


StopBuffer
C Library Functions
acsc_StopBuffer
Example
STOP 5 !Terminate program execution in buffer five.

Version NT 2.20 133 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Commands

1.7.7 SPiiPlus PLC Program Commands


SPiiPlus PLC constitutes a virtual PLC (Programmable Logic Controller) and was constructed
using the Infoteam Software GmbH OpenPCS application. SPiiPlus PLC has built-in
PLCOpen-compliant function blocks for controlling motion. Each function block may be
applied to any SPiiPlus controlled axis or to CANopen DS402 intelligent non-ACS drives that
are certified by ACS, as well as for non-ACS I/O devices. For details see the SPiiPlus PLC User
Guide.
There are two ACSPL+ commands that are associated with SPiiPlus PLC programs:

1.7.7.1 PLCSTART
Description
PLCSTART cold starts any PLC program that has been compiled and loaded into the system.
Syntax
PLCSTART

1.7.7.2 PLCSTOP
Description
PLCSTOP stops any PLC program that running.
Syntax
PLCSTOP

Version NT 2.20 134 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2 ACSPL+ Variables
This chapter covers the ASCPL+ variables. ACSPL+ has a complete set of built-in variables for
use in setting values that control ACSPL+ programs. The ACSPL+ variables are divided into
the following categories:
 Axis Configuration Variables
Along with the following subgroups:
• Brake Variables
• Feedback Variables
• Safety Limits Variables
 Axis State Variables
 Data Collection Variables
 Input and Output Variables
 Monitoring Variables
 Motion Variables
 Program Execution Control Variables
 Safety Control Variables
 Induction Motor Variables
 Nanomotion Variables
 Servo-Loop Variables
Along with the following subgroups:
• Servo-Loop Current Variables
• Servo-Loop Velocity Variables
• Servo-Loop Velocity Notch Filter Variables
• Servo-Loop Velocity Low Pass Filter Variables
• Servo-Loop Velocity Bi-Quad Filter Variables
• Servo-Loop Position Variables
• Servo-Loop Compensations Variables
• Servo-Loop Miscellaneous Variables
 Commutation Variables
 System Configuration Variables
 Communication Variables
 Miscellaneous
 Miscellaneous

Version NT 2.20 135 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

The ACSPL+ programming variables are:

Table 32 Alphabetical Listing of All ACSPL+ Variables (page 1 of 6)


Name Description Variable Group
ACC Acceleration Motion
AERR Axis Error Safety Control
AFLAGS Axis Flags Axis Configuration
AIN Analog Inputs Input and Output
AOUT Analog Outputs Input and Output
APOS Axis Position Motion
AST Axis State Axis State
BAUD Serial Communication Baud Rate Communication
BOFFTIME Brake Deactivation Time Axis Configuration - Brake
BONTIME Brake Activation Time Axis Configuration - Brake
CERRA Critical Position Error in Accelerating Axis Configuration - Safety
Limits
CERRI Critical Position Error in Idle Axis Configuration - Safety
Limits
CERRV Critical Position Error in Moving Axis Configuration - Safety
Limits
CFG Configuration Mode System Configuration
COMMCH Communication Channel Communication
COMMFL Communication Flags Communication
CONID Controller Identification Communication
CTIME Controller Cycle Time System Configuration
DAPOS Delayed Axis Position Motion
DCN Axis DC, Number of Samples Data Collection
DCOM Drive Command Servo-Loop
DCP Axis DC, Period Data Collection
DEC Deceleration Motion
DELI Delay on Transition to Idle State Axis Configuration - Safety
Limits
DELV Delay on Transition to Velocity State Axis Configuration - Safety
Limits
DISPCH Default Communication Channel Communication
E_FREQ Primary Encoder Frequency Axis Configuration - Feedback
E_SCMUL Primary Encoder Sin-Cos Multiplier Axis Configuration - Feedback
E_TYPE Primary Encoder Type Axis Configuration - Feedback
E2FAC Secondary Encoder Factor Axis Configuration - Feedback
E2OFFS Secondary Encoder Offset Axis Configuration - Feedback
ECERR Contains EtherCAT Error Code Safety Control

Version NT 2.20 136 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Table 32 Alphabetical Listing of All ACSPL+ Variables (page 2 of 6)


Name Description Variable Group
ECHO Echo Communication Channel Communication
ECST Contains EtherCAT Status Safety Control
EFAC Primary Encoder Factor Axis Configuration - Feedback
ENTIME Enable Time Axis Configuration
EOFFS Primary Encoder Offset Axis Configuration - Feedback
ERRA Position Error in Accelerating Axis Configuration - Safety
Limits
ERRI Position Error in Idle Axis Configuration - Safety
Limits
ERRV Position Error in Moving Axis Configuration
EXTIN Extended Inputs (HSSI) Input and Output
EXTOUT Extended Outputs (HSSI) Input and Output
F2POS Secondary Feedback Position Motion
F2VEL Secondary Feedback Velocity Motion
FACC Primary Feedback Acceleration Motion
FAULT Faults Safety Control
FDEF Default Response Mask Safety Control
FK Function Key Miscellaneous
FMASK Fault Mask Safety Control
FPOS Primary Feedback Position Axis State
FVEL Primary Feedback Velocity Motion
FVFIL Primary Feedback Velocity Filter Axis Configuration - Feedback
GACC Group Acceleration Motion
st
GATEWAY Gateway Address for 1 Ethernet Communication
GJERK Group Jerk Motion
GMOT Motion Number Motion
GMQU Motion Queue Motion
GMTYPE Motion Type Motion
GPATH Group Path Motion
GPHASE Motion Phase Motion
GRTIME Remaining Motion Time Motion
GSEG Motion Segment Motion
GSFREE Free Motion Segments Motion
GVEC Group Vector Motion
GVEL Group Velocity Motion
IENA Interrupt Enable/Disable System Configuration
IMASK Interrupt Mask System Configuration
IN Digital Inputs Input and Output

Version NT 2.20 137 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Table 32 Alphabetical Listing of All ACSPL+ Variables (page 3 of 6)


Name Description Variable Group
IND Primary Index Position Axis State
ISENA Specific Interrupt Enable/Disable System Configuration
IST Index State Axis State
JERK Jerk Motion
JITTER Time difference between physical timer SPiiPlusSC
interrupt and start of SC real-time task
KDEC Kill Deceleration Motion
LOCALST Reads the status of STO1, STO2, Axis State
Emergency Stop and Component Failure for
the given axis from the firmware.
M2ARK Secondary Mark Position Axis State
MARK Primary Mark Position Axis State
MAXPLCU Establishes percentage of SPiiPlus Miscellaneous
processing time allocated to PLC program
MERR Motor Error Safety Control
MFF Master Feed Forward Axis Configuration
MFLAGS Motor Flags Axis Configuration
MPOS Master Position Motion
MST Motor State Axis State
MSSYNC Difference between master clock and bus SPiiPlusSC
clock
NST Reads the status of EtherCAT Sync and Axis State
GPRT errors for each axis in the system.
NVEL Minimal Velocity Motion
ONRATE Autoroutine Rate Program Execution Control
OUT Digital Outputs Input and Output
PCHARS Program Size in Characters Program Execution Control
PE Non-Critical Position Error Motion
PERL Program Error Line Program Execution Control
PERR Program Error Program Execution Control
PEXL Program Executed Line Program Execution Control
PFLAGS Program Flags Program Execution Control
PLCFLG Controls SPiiPlus PLC execution Miscellaneous
PLINES Program Size in Lines Program Execution Control
PRATE Program Rate Program Execution Control
PST Program State Program Execution Control
RACC Reference Acceleration Motion
RMS RMS current of axis Axis State
ROFFS Reference Offset Axis State

Version NT 2.20 138 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Table 32 Alphabetical Listing of All ACSPL+ Variables (page 4 of 6)


Name Description Variable Group
RPOS Reference Position Axis State
RVEL Reference Velocity Motion
RVFIL Reference Velocity Filter Axis Configuration - Feedback
S_DCN System DC, Number of Samples Data Collection
S_DCP System DC, Period Data Collection
S_ERR System Error Safety Control
S_FAULT System Faults Safety Control
S_FDEF System Default Response Mask Safety Control
S_FLAGS System Flags System Configuration
S_FMASK System Fault Mask Safety Control
S_SAFIN System Safety Inputs Safety Control
S_SAFINI System Safety Inputs Inversion Safety Control
S_SETUP Bit mask defining various system System Configuration
settings
S_ST State of System Data Collection Data Collection
SAFIN Safety Inputs Safety Control
SAFINI Safety Inputs Inversion Safety Control
SCCOFFS Sin-Cos Offset (Cosine) Axis Configuration - Feedback
SCGAIN Cosine gain compensation Axis Configuration - Feedback
SCPHASE Cosine phase compensation Axis Configuration - Feedback
SCSOFFS Sin-Cos Offset (Sine) Axis Configuration - Feedback
SETTLE Settling Time Axis Configuration
SLABITS Absolute Position Bits Axis Configuration - Feedback
SLAFF Acceleration Feed Forward Servo-Loop - Compensations
SLBIASA Current Phase A Bias Servo-Loop - Current
SLBIASB Current Phase B Bias Servo-Loop - Current
SLCFIELD Induction Motor Excitation Induction Motor
SLCHALL Hall Shift Commutation
SLCNP Number of Motor Poles Commutation
SLCOFFS Commutation Offset Commutation
SLCORG Commutation Origin Commutation
SLCPA Phase Advance Commutation
SLCPRD Commutation Period Commutation
SLCROUT Commutation Feedback Servo-Loop - Miscellaneous
SLCSLIP Induction Motor Slip Factor Induction Motor
SLDRA DRA frequency Servo-Loop - Position
SLDRAIF Provides an Idle Factor to the SLDRA Servo-Loop - Position
variable.

Version NT 2.20 139 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Table 32 Alphabetical Listing of All ACSPL+ Variables (page 5 of 6)


Name Description Variable Group
SLDRX Maximum DRA correction Servo-Loop - Position
SLDZMAX Maximum Dead Zone position Servo-Loop - Nanomotion
SLDZMIN Minimum Dead Zone position Servo-Loop - Nanomotion
SLEBIASA Defines encoder hardware Sine offset Axis Configuration - Feedback
SLEBIASB Defines encoder hardware Cosine offset Axis Configuration - Feedback
SLFRC Static Friction Servo-Loop - Compensations
SLFRCD Dynamic Friction Servo-Loop - Compensations
SLIKI Integrator Gain Servo-Loop - Current
SLIKP Integrator Proportional Gain Servo-Loop - Current
SLIFILT Internal Current filter Servo-Loop - Current
SLILI Determines output voltage Servo-Loop - Current
SLIOFFS Current Command Offset Servo-Loop - Current
SLLIMIT Soft Left Limit Safety Limits
SLPKP Proportional Position Gain Servo-Loop - Position
SLPKPIF Provides an Idle Factor to the SLPKP Servo-Loop - Position
variable
SLPKPSF Provides a Settling Factor to the SLPKP Servo-Loop - Position
variable
SLPMAX Modulo Axis Upper Limit Axis Configuration
SLPMIN Modulo Axis Lower Limit Axis Configuration
SLPROUT Position Feedback Routing Servo-Loop - Miscellaneous
SLVB0DD Bi-Quad filter damping ratio denominator Servo-Loop - Filter
SLVB0DF Bi-Quad filter algorithm denominator Servo-Loop - Filter
SLVB0ND Bi-Quad filter damping ratio numerator Servo-Loop - Filter
SLVB0NF Bi-Quad filter algorithm numerator Servo-Loop - Filter
SLVKI Velocity Integrator Coefficient Servo-Loop - Velocity
SLVKIIF Provides an Idle Factor to SLVKI variable Servo-Loop - Velocity
SLVKISF Provides a Settle Factor to the SLVKI Servo-Loop - Velocity
variable
SLVKP Proportional Velocity Gain Servo-Loop - Velocity
SLVKPIF Provides an Idle Factor to the SLVKP Servo-Loop - Velocity
variable
SLVKPSF Provides a Settle Factor to the SLVKP Servo-Loop - Velocity
variable
SLVLI Integrator Velocity Limit Servo-Loop - Velocity
SLVNATT Notch Filter Attenuation Servo-Loop - Filter
SLVNFRQ Notch Filter Frequency Servo-Loop - Filter
SLVNWID Notch Filter Width Servo-Loop - Filter
SLVRAT Velocity Feed Forward Ratio Servo-Loop - Velocity

Version NT 2.20 140 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Table 32 Alphabetical Listing of All ACSPL+ Variables (page 6 of 6)


Name Description Variable Group
SLVROUT Velocity Feedback Servo-Loop - Miscellaneous
SLVSOF Low-Pass Filter Bandwidth Servo-Loop - Filter
SLVSOFD Low-Pass Filter Damping Servo-Loop - Filter
SLZFF Defines zero velocity feed forward position Servo-Loop - Nanomotion
SMNA Software Monitor Address Monitoring
SMNV Software Monitor Value Monitoring
SRLIMIT Soft Right Limit Safety Limits
STEPF Stepper Factor Axis Configuration
STEPW Stepper Pulse Width Axis Configuration
st
SUBNET Subnet Mask for 1 Ethernet Communication
SYNC Slave Sync counter Safety Control
SYNV Synchronous Velocity Axis Configuration
TARGRAD Target Radius Axis Configuration
st
TCPIP IP Address for 1 Ethernet Communication
nd
TCPIP2 IP Address for 2 Ethernet Communication
TCPPORT TCP Port Number Communication
TIME Elapsed Time Monitoring
TPOS Target Position Motion
UDPPORT UDP Port Number Communication
USAGE MPU Usage Monitoring
VEL Velocity Motion
VELBRK Brake Velocity Axis Configuration - Brake
XACC Maximum Acceleration Axis Configuration - Safety
Limits
XARRSIZE Maximum Array Size Miscellaneous
XCURI Maximum Current in Idle Axis Configuration - Safety
Limits
XCURV Maximum Current in Moving Axis Configuration - Safety
Limits
XRMS RMS Current Limit Axis Configuration - Safety
Limits
XRMST RMS Current Time Constant Axis Configuration - Safety
Limits
XSACC Maximum Slave Acceleration Axis Configuration - Safety
Limits
XVEL Maximum Velocity Axis Configuration - Safety
Limits

Version NT 2.20 141 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2.1 Axis Configuration Variables


The Axis Configuration variables are:

Name Description
AFLAGS Axis Flags
ENTIME Enable Time
MFF Master Feed forward
MFLAGS Motor Flags
SETTLE Axis Settling Time Parameter
SLCFIELD Defines magnetic field component of an induction motor
SLCSLIP Defines the slip constant component of an induction motor
SLPMAX Specifies the upper limit of modulo axis
SLPMIN Specifies the lower limit of modulo axis
STEPF Stepper Factor
STEPW Stepper Pulse Width
SYNV Synchronous velocity for MASTER-SLAVE motion
TARGRAD Axis settling target envelope parameter

2.1.1 AFLAGS
Description
AFLAGS is an integer array, with one element for each axis in the system, each element of
which contains a set of 4 bits.
Syntax
AFLAGSaxis_index.bit_designator = 1|0
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
bit_designator The meanings of bit_designator are given in Table 33.meanings of
bit_designator

Table 33 AFLAGS Bit Description


Bit Name No. Description
#NOS 0 No S-Profile
#SEMIS 1 Semi-S-Profile
#AUX 2 Auxiliary Axis
#NOGROUP 3 Disable Group

Version NT 2.20 142 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Tag
3
Comments
Currently, only AFLAGS(axis_index).#NOGROUP can be set in the variable.
AFLAGS(axis_index).#NOGROUP disables the axis in a group, so that any group or motion
command that includes the axis in a group will fail.
Other bits are reserved for future use, and must be set to zero.
Accessibility
Read-Write

Note
AFLAGS values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger

2.1.2 ENTIME
Description
ENTIME is a real array, with one element for each axis in the system, and is used for
controlling the execution of ENABLE/ENABLEALL.
Syntax
ENTIME(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges from 2.22507e-308 to 1.79769e+308, Default = 50.

Tag
37

Version NT 2.20 143 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Comments
Since the drive enable process is relatively long, (50 - 100msec) ENTIME defines a time
duration in msec between ENABLE/ENABLEALL and the moment the controller considers
the drive as enabled and all faults as FAULT(axis_index).#PE, FAULT(axis_index).#CPE,
FAULT(axis_index).#DRIVE are triggered.
Exact usage of the variable depends on the flag bit MFLAGS(axis_index).#ENMODE (bit
19). See MFLAGS.
Accessibility
Read-Write

Note
ENTIME values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Commands


ENABLE/ENABLEALL
COM Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.1.3 MFF
Description
MFF is a real array, with one element for each axis in the system, and is used for specifying the
feed forward time, in milliseconds, for MPOS calculations.
Syntax
MFF(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges from 0 to 10, Default = 2.

Tag
87

Version NT 2.20 144 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Comments
The controller calculates the MPOS value according to a formula supplied by the MASTER
command. A non-zero MFF value provides additional extrapolation of the calculated value to
the predicted value at the current time plus MFF. The purpose is to compensate delay
introduced by the controller and the external circuits.
The default value of MFF depends on the controller model so that it compensates the delay
introduced by the controller itself. Increase the MFF value if you want to compensate additional
delay introduced by sensor or other circuits.
Accessibility
Read-Write

Note
MFF values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Commands


MASTER
Related ACSPL+ Variables
ENTIME
COM Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.1.4 MFLAGS
Description
MFLAGS is an integer array, with one element for each axis in the system, each element of
which contains a set of bits used for configuring the motor.
Syntax
MFLAGS(axis_index).bit_designator = 0|1
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
bit_designator The MFLAGS bit designators are given in Table 34.

Version NT 2.20 145 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Table 34 MFLAGS Bit Designators (page 1 of 3)


Name No. Description
#DUMMY 0 0 (default) = The axis is defined as non-dummy.
1 = The axis is defined as dummy. A dummy axis is an inactive axis which
is not connected to a drive and a motor. When an axis is defined as a
dummy the following apply:
 In SPiiPlus controllers, excluding Control Modules, the two analog
outputs of the axis can be used as General Purpose outputs.
 In all SPiiPlus products: all faults of the axis are disabled.
 In all SPiiPlus products ENABLE/ENABLEALL is disabled.
#OPEN 1 0 (default): Closed-loop control - for servo motors only.
1: Open-loop control. In open loop control the user defines the value of the
command/s to the drive with variable DCOM.
#HOME 3 0 (default): Axis homing procedure not done.
1: Axis homing procedure done.
This bit can be changed by a user program to 1
(MFLAGS(axis_index).#HOME = 1) following a successful homing
process. The controller clears the bit during power-up, but then neither
changes the bit nor verifies its value. Based on this bit the user can
implement any logic in his program application.
#STEPPER 4 0 (default): Axis is defined as a servo motor.
1: Axis is defined as a pulse-direction stepper motor in open loop.
#ENCLOOP 5 0 (default): Stepper feedback loop is not active.
1: The axis provides a stepper feedback loop. In this case the
FPOS(axis_index) variable will indicate the number of pulses that
were sent to the pulse-direction stepper drive and not the encoder
counts - if an encoder is connected and #STEPENC (bit 6 = 1).
#ENCLOOP is effective only if #STEPPER (bit 4) = 1.
#STEPENC 6 0 (default): Stepper encoder feedback loop is not active.
1: The controller provides an encoder feedback to the pulse-direction
stepper. In this case, the FPOS(axis_index) variable will indicate the
quadrature encoder counts, and not the stepper pulse-direction pulses if
#ENCLOOP (bit 5 = 1).
#STEPENC is effective only if #STEPPER (bit 4) = 1. The encoder
feedback is used for monitoring the axis position by a user application, and
does not affect the open loop control of the stepper motor.
#NANO 7 0 (default): Defines the axis as a servo or stepper motor.
1: Defines the axis as a Nanomotion piezo ceramic motor.
#BRUSHL 8 0 (default): The motor is a non-DC brushless type or the amplifier provides
commutation itself and uses one ±10V input from the
controller.
1: The controller provides commutation for the DC brushless motor. The bit
must be set only if the controller is connected to a three-phase amplifier
with two-phase input commands.

Version NT 2.20 146 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Table 34 MFLAGS Bit Designators (page 2 of 3)


Name No. Description
#BRUSHOK 9 #BRUSHOK is applicable only for DC Brushless motors when
#BRUSHL.8 =1.
0 (default): DC brushless motor is not commutated.
1: DC brushless motor is commutated. After power-up the controller clears
the bit. The controller automatically sets this bit =1 only after a
successful commutation or auto-commutation processes.
#DBRAKE 11 0 (default): Dynamic brake is disabled
1: The controller will apply dynamic braking to stop the motor when the
axis is disabled and the feedback velocity is less than the predefined
value of VELBRK. See the SPiiPlus Setup Guide, Dynamic Brake for
a complete explanation.
#INVENC 12 0 (default): Encoder counting is non-inverted.
1: The controller inverts the direction of encoder counting. This does not
affect the motion direction.
#INVDOUT 13 0 (default): Drive output command/s are not inverted.
1: The controller inverts the drive output command/s. This effectively
inverts the direction of the motion and the sign of the feedback.
#NOTCH 14 0 (default): Notch filter is disabled.
1: Notch filter is active
#NOFILT 15 0 (default): The control algorithm includes a second-order filter specified
by bandwidth SLVSOF.
1: The control algorithm by-passes the second-order filter.
#DEFCON 17 0: CONNECT is allowed. See CONNECT.
1 (default): The controller applies the default connection between APOS
and RPOS (RPOS=APOS).
While #DEFCON = 1, the controller does not accept CONNECT for the
axis.
The bit is reset to 1 every time the controller is restarted.
#ENMOD 19 0: Enable time is defined by ENTIME, or when the drive switches its drive
alarm signal to the inactive state - whichever comes first. If the signal
remains active more than ENTIME milliseconds,
ENABLE/ENABLEALL fails.
1 (default): The value of ENTIME defines the enable time.
#DUALLOOP 20 0 (default): The control algorithm implements a regular single-loop scheme
obtaining the position and velocity feedback from the same feedback
sensor as defined by SLPROUT.
1: The control algorithm implements a dual-loop scheme.
#LINEAR 21 0 (default): The axis is defined as rotary.
1: The axis is defined as linear.
#BRAKE 23 0 (default): The controller does not provide mechanical brake control.
1: The brake is deactivated when the motor is enabled and activated when
the motor is disabled. For detailed description, see commands
ENABLE/ENABLEALL and DISABLE, and variables BOFFTIME,
BONTIME variables.

Version NT 2.20 147 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Table 34 MFLAGS Bit Designators (page 3 of 3)


Name No. Description
#HSSI 24 0 (default): Direct drive connection.
1: Remote drive connection via HSSI.
#COG 25 0 (default): Cogging compensation disabled
1: Cogging compensation enabled.
#PI 26 0 (default): The controller provides a current command to the external drive
(when the external drive provides current loop control).
1: The controller provides a velocity command to the drive when the
external drive provides velocity and current loops control.
#HALL 27 Note:
#HALL applies only to DC brushless motors when #BRUSHL (bit
8) =1.
0 (default): Commutation is not based on Hall signals.
1: Commutation is based on Hall signals.
#INVHALL 28 Note:
#INVHALL applies only for DC brushless motors when #BRUSHL (bit
8) =1.
0 (default): Motor Hall signals are non-inverted.
1: Motor Hall signals are inverted.
#MODULO 29 0 (default): Axis is defined as non-modulo.
1: Axis is defined as MODULO. In MODULO mode, physically, the
motion of the axis is not limited, but each time RPOS goes out of the
defined SLPMIN...SLPMAX range, the controller brings RPOS into
range by changing the internal offset EOFFS.
See SLPMAX and SLPMIN.
#USER1 30 The functionality of this bit can be defined by the user.
0 (default): Functionality not defined
1: User defined functionality
#USER2 31 The functionality of this bit can be defined by the user.
0 (default): Functionality not defined
1: User defined functionality

Tag
88
Comments
MFLAGS is typically configured using the SPiiPlus MMI Application Studio  Toolbox 
Setup  Adjuster when setting the Dynamic Brake.
Use direct bit assignment for on-the-fly changes, for example, from closed-loop operation to
the open-loop and vice versa.
Accessibility
Read-Write

Version NT 2.20 148 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Note
MFLAGS values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Commands


CONNECT, ENABLE/ENABLEALL, GETCONF
Related ACSPL+ Variables
SLPROUT, APOS, RPOS
COM Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger

2.1.5 SETTLE
Description
SETTLE is a real array, with one element for each axis in the system, and is used for setting
the Settling Time, it controls MST(axis_index).#INPOS.
Syntax
SETTLE(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges from 0 to 1.79769e+308, Default = 0.

Tag
123
Comments
When the motor is not moving, the controller compares the position error (PE value) and the
target envelope (TARGRAD value) every MPU cycle. #INPOS is raised when PE drops to
within the range (-TARGRAD, +TARGRAD) and remains within the range for a period of time
equal or greater than SETTLE.
If the motor starts to move or PE goes out of the range, MST(axis_index).#INPOS is cleared.
Accessibility
Read-Write

Version NT 2.20 149 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Note
SETTLE values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Variables


TARGRAD, MST, PE
COM Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.1.6 SLPMAX
Description
SLPMAX is a real array, with one element for each axis in the system, the elements of which
are used for storing the maximum range of a modulo axis.
Syntax
SLPMAX(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges from -1.79769e+308 to 1.79769e+308, Default = 8000.

Tag
194
Comments
SLPMAX stores the maximum range of a modulo axis, see MFLAGS.#MODULO (bit 29).
SLPMAX can be changed only when the motor is disabled.
Accessibility
Read-Write

Note
SLPMAX values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Version NT 2.20 150 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Related ACSPL+ Variables


SLPMIN, EOFFS
COM Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.1.7 SLPMIN
Description
SLPMIN is a real array, with one element for each axis in the system, the elements of which
are used for storing the minimum range of a modulo axis.
Syntax
SLPMIN(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges from -1.79769e+308 to 1.79769e+308, Default = 0.

Tag
195
Comments
SLPMIN stores the minimum range of a modulo axis, see MFLAGS.#MODULO (bit 29).
SLPMIN can be changed only when the motor is disabled.
Accessibility
Read-Write

Note
SLPMIN values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Variables


SLPMAX, EOFFS
COM Library Methods
ReadVariable, WriteVariable

Version NT 2.20 151 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

C Library Functions
acsc_ReadReal, acsc_WriteReal

2.1.8 STEPF
Description
STEPF is a real array, with one element for each axis in the system, and is used for defining
the ratio between one stepper pulse and user units. See the SPiiPlus Setup Guide, Stepper Drive
section for more information.
Syntax
STEPF(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges from 1e-015 to 1e+015, Default = 1.

Tag
129
Comments
STEPF = 1 (default) means that motion is performed in motor steps. For example,
PTP/R 0,320
will move the motor by 320 steps from the current position.
If another unit is required for motion programming, the user must configure an appropriate
value for STEPF. For example, a controlled plant provides a gear ratio of 500 motor pulses per
inch. If the motion programming unit must be provided in inches, the configured STEPF value
must be 0.002 (1/500).
Accessibility
Read-Write

Note
STEPF values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

COM Library Methods


ReadVariable, WriteVariable

Version NT 2.20 152 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

C Library Functions
acsc_ReadReal, acsc_WriteReal

2.1.9 STEPW
Description
STEPW is a real array, with one element for each axis in the system, and is used for defining
the pulse width, in milliseconds, for the stepper motor. See the SPiiPlus Setup Guide, Stepper
Drive section for more information.
Syntax
STEPW(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges from 2.5*10-6 (25 nanoseconds) to 0.051 (51
microseconds), Default = 0.001.

Tag
130
Comments
The value defines the width of the pulses generated on the pulse output for stepper control.
Accessibility
Read-Write

Note
STEPW values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

Version NT 2.20 153 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2.1.10 SYNV
Description
SYNV is a real array, with one element for each axis in the system, and is used for defining the
criteria for the allowed difference between MASTER and SLAVE velocities during slave-
master axis synchronization.
Syntax
SYNV(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges from 2.22507e-308, 1.79769e+308, Default = 1.

Tag
131
Comments
Synchronous velocities of master and slaved axes in velocity lock mode are indicated by the
slaved axis AST(axis_index).#VELLOCK (bit 8).
Synchronous positioning of master and slaved axes in position lock mode is indicated by the
slaved axis AST(axis_index).#POSLOCK (bit 9).
MASTER-SLAVE motion always begins out of synchronization. The controller tries to
achieve slave-master synchronization where the slave pursues the master in order to
synchronize their velocities. The velocities are considered synchronized if the absolute
difference is less than SYNV.
Accessibility
Read-Write

Note
SYNV values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Commands


MASTER, SLAVE
Related ACSPL+ Variables
XSACC
COM Library Methods
ReadVariable, WriteVariable

Version NT 2.20 154 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

C Library Functions
acsc_ReadReal, acsc_WriteReal

2.1.11 TARGRAD
Description
TARGRAD is a real array, with one element for each axis in the system, and is used for
defining the parameters for MST(axis_index).#INPOS.
Syntax
TARGRAD(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges from 2.22507e-308, 1.79769e+308, Default = 1.

Tag
132
Comments
When the motor is enabled but in a standstill position, the controller compares PE to the target
envelope (TARGRAD) each MPU cycle. #INPOS = 1 when PE moves into the defined range
(-TARGRAD, +TARGRAD) and remains within that range for a period of time equal or greater
than defined by SETTLE.
If the motor starts to move or goes out of range, #INPOS is cleared.
Accessibility
Read-Write

Note
TARGRAD values cannot be modified if protection is applied to this
variable through SPiiPlus MMI Application Studio  Toolbox 
Application Development  Protection

Related ACSPL+ Variables


SETTLE, MST(axis_index).INPOS, PE
COM Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

Version NT 2.20 155 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2.1.12 Brake Variables


The Brake variables are:

Name Description
BOFFTIME Brake Deactivation Time
BONTIME Brake Activation Time
VELBRK Braking Velocity

2.1.12.1 BOFFTIME
Description
BOFFTIME is a real array, with one element for each axis in the system, and is used for
specifying the brake deactivation time in milliseconds.
Syntax
BOFFTIME(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges from 2.22507e-308 to 1.79769e+308, Default = 100000.

Tag
9
Accessibility
Read-Write

Note
BOFFTIME values cannot be modified if protection is applied to this
variable through SPiiPlus MMI Application Studio  Toolbox 
Application Development  Protection

Related ACSPL+ Commands


ENABLE/ENABLEALL - The brake is deactivated automatically when the ENABLE
command is executed.
Related ACSPL+ Variables
MFLAGS
COM Library Methods
ReadVariable, WriteVariable

Version NT 2.20 156 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

C Library Functions
acsc_ReadReal, acsc_WriteReal

2.1.12.2 BONTIME
Description
BONTIME is a real array, with one element for each axis in the system, and is used for
specifying the brake activation time in milliseconds.
Syntax
BONTIME(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges from 2.22507e-308 to 1.79769e+308, Default = 100000.

Tag
10
Accessibility
Read-Write

Note
BONTIME values cannot be modified if protection is applied to this
variable through SPiiPlus MMI Application Studio  Toolbox 
Application Development  Protection

Related ACSPL+ Commands


DISABLE, FCLEAR, DISABLEALL

Note
The brake is activated automatically when the DISABLE command is
executed.

Related ACSPL+ Variables


MERR, FPOS, RPOS
COM Library Methods
ReadVariable, WriteVariable

Version NT 2.20 157 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

C Library Functions
acsc_ReadReal, acsc_WriteReal

2.1.12.3 VELBRK
Description
VELBRK is a real array, with one element for each axis in the system, and is used for defining
dynamic braking.
Syntax
VELBRK(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges from 0 to 1.79769e+308, Default = 0.

Tag
140
Comments
If MFLAGS(axis_index).#BRAKE is = 1, the controller will apply dynamic braking to stop
the motor when the axis is disabled and the feedback velocity is less than the predefined value
of VELBRK.
Accessibility
Read-Write

Note
VELBRK values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Variables


MFLAGS(axis_index).#BRAKE
COM Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

Version NT 2.20 158 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2.1.13 Feedback Variables


The Feedback variables are:

Name Description
E_FREQ Encoder Frequency
E_SCMUL Encoder Sin-Cos Multiplier
E_TYPE Encoder Type
EFAC Encoder Factor
E2FAC Secondary Encoder Factor
EOFFS Axis Encoder Offset
E2OFFS Axis Encoder Offset for Secondary Encoder
FVFIL Primary Feedback Velocity Filter
RVFIL Reference Velocity Filter
SCSOFFS Defines the sine offset.
SLEBIASA Defines firmware sine offset.
SCCOFFS Defines the cosine offset.
SLEBIASB Defines hardware cosine offset.
SLABITS Total number of absolute position bits for an absolute encoder
SCGAIN Feedback gain compensation variable
SCPHASE Feedback phase compensation variable

2.1.13.1 E_FREQ
Description
E_FREQ is an integer array, with one element for each axis in the system, and is used for
defining the maximum encoder pulse frequency (in MHz).
Syntax
E_FREQ(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value of each member can be one of:
 2 (shown as 2MHz but practically is 2.5MHz, default for an analog
Sin-Cos encoder)
 20 (default for a digital encoder)
 60

Tag
27

Version NT 2.20 159 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Comments
The encoder is represented in the controller as a synchronous state machine that is activated by
a clock, with programmable frequency in the SPiiPlus processor.
E_FREQ provides three optional clock rates that define the maximum encoder pulse frequency
(in MHz) measured after an internal 4x multiplication.
In general, using a higher E_FREQ enables to read a higher rate of encoder input. However,
the electrical noise immunity is reduced and Encoder Error FAULT might occur. Per case, it is
recommended to use the lowest possible E_FREQ that does not generate an Encoder Error
FAULT. In case of an Encoder Error, do FCLEAR (axis_index) and try a higher E_FREQ
value.
For more information, see the Encoder Input Clock section in the SPiiPlus Setup Guide.
Accessibility
Read-Write

Note
E_FREQ values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger

2.1.13.2 E_SCMUL
Description
E_SCMUL is an integer array, with one element for each axis in the system, and is used for
specifying the Sin-Cos multiplication factor for the encoder.
Syntax
E_SCMUL(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges from 2 to 16, Default = 10.

Tag
28

Version NT 2.20 160 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Comments
E_SCMUL specifies the Sin-Cos multiplication factor as a power of 2. The maximum value of
16 corresponds to a multiplication of 65536 = 216. The minimum value of 2 corresponds to a
multiplication of 4 = 22.
Accessibility
Read-Write

Note
E_SCHMUL values cannot be modified if protection is applied to this
variable through SPiiPlus MMI Application Studio  Toolbox 
Application Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger

2.1.13.3 E_TYPE
Description
E_TYPE is an integer array, with one element for each axis in the system, and is used for
defining the encoder type.
Syntax
E_TYPE(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value of each element can be one of:
 0 - Up-down counter
 1 - Clock direction counter
 2 - Quadrature single-ended encoder
 3 - Quadrature encoder (Default)
 4 - Sin-Cos encoder multiplier
 5 - HSSI encoder
 9 - Resolver
 10 - EnDat 2.2
 11 - Smart-Abs
 12 - Panasonic
 13 - BiSS-C
 14 - Hiperface

Version NT 2.20 161 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Tag
29
Comments
The most common encoder type is quadrature, which corresponds to the default value 3.
A value of 9 is supported only by the following products:
 SPiiPlus CMnt-x-320 (where x is either 1 or 2)
 SPiiPlus UDMpm-x-320 (where x is either 1 or 2)
A valued of 2 is supported by the following products:
 SPiiPlus UDMlc-x-048
 SPiiPlus UDIlt-x / UDIhp-x
As a configuration variable, the variable can be changed only if the controller is in configuration
mode.
Accessibility
Read-Write

Note
E_TYPE values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Variables


None
COM Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger

2.1.13.4 EFAC
Description
EFAC is a real array, with one element for each axis in the system, and is used for defining a
factor between the raw feedback in encoder counts and the FPOS value calculated by the
controller.
Syntax
EFAC(axis_index) = value

Version NT 2.20 162 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value of each member ranges between 1e-15 to 1e+15, Default = 1.

Tag
36
Comments
When reading the feedback position from the SP, the controller executes feedback transform
according to the formula:
FPOS = FP*EFAC + EOFFS
where FPOS is the controller feedback position in user units, FP is an SP-calculated feedback
position in encoder counts, EFAC is a user-defined value of the corresponding EFAC factor,
and EOFFS represents an offset.
As a configuration variable, the EFAC value is normally defined by SPiiPlus MMI
Application Studio  Toolbox  Setup  Adjuster during the setup procedure of the
system.
Accessibility
Read-Write

Note
EFAC values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Variables


All standard variables that are based on position units.
COM Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.1.13.5 E2FAC
Description
E2FAC is a real array, with one element for each axis in the system, and is used for defining a
factor between the secondary raw feedback in encoder counts and the F2POS value calculated
by the controller.

Version NT 2.20 163 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Syntax
E2FAC(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value of each member ranges between 1e-15 to 1e+15, Default = 1.

Tag
32
Comments
When reading the secondary feedback position from the SP, the controller executes feedback
transform according to the formula:
F2POS = FP2*E2FAC + E2OFFS
where F2POS is the secondary controller feedback position in user units, FP2 is an SP-
calculated secondary feedback position in encoder counts, E2FAC is a user-defined value of the
corresponding E2FAC factor, and E2OFFS represents an offset.
As a configuration variable, the E2FAC value is normally defined by SPiiPlus MMI
Application Studio  Toolbox  Setup  Adjuster during the setup procedure of the
system.
Accessibility
Read-Write

Note
E2FAC values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Variables


F2POS, EOFFS
COM Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

Version NT 2.20 164 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2.1.13.6 EOFFS
Description
EOFFS is a real array, with one element for each axis in the system, and is used for defining
the offset between the raw feedback from the encoder counts and the FPOS value calculated by
the controller.
Syntax
EOFFS(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value can be any integer.

Tag
38
Comments
EOFFS provides the offset between the raw feedback in encoder counts and the FPOS value
calculated by the controller. The value of EOFFS changes when the set command defines a new
origin for an axis.
When reading the feedback position from the SP, the controller executes feedback transform
according to the formula:
FPOS = FP*EFAC + EOFFS
where FPOS is the controller feedback position in user units, FP is an SP-calculated feedback
position in encoder counts, EFAC is a user-defined value of the corresponding EFAC factor,
and EOFFS represents an offset.
Accessibility
Read-Only
Related ACSPL+ Variables
EFAC, FPOS
COM Library Methods
ReadVariable
C Library Functions
acsc_ReadReal

Version NT 2.20 165 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2.1.13.7 E2OFFS
Description
E2OFFS is a real array, with one element for each axis in the system, and is used for defining
the offset between the raw feedback from the secondary encoder counts and the FPOS value
calculated by the controller.
Syntax
E2OFFS(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value can be any integer.

Tag
34
Comments
E2OFFS provides the offset between the raw feedback from the secondary encoder (in encoder
counts) and the F2POS value calculated by the controller. The value of E2OFFS changes when
the set command defines a new origin for the axis's secondary feedback.
When reading the secondary feedback position from the SP, the controller executes feedback
transform according to the formula:
F2POS = FP2*E2FAC + E2OFFS
where F2POS is the secondary controller feedback position in user units, FP2 is an SP-
calculated secondary feedback position in encoder counts, E2FAC is a user-defined value of
the corresponding E2FAC factor, and E2OFFS represents an offset.
Accessibility
Read-Only
Related ACSPL+ Variables
E2FAC, F2POS
COM Library Methods
ReadVariable
C Library Functions
acsc_ReadReal

2.1.13.8 FVFIL
Description
FVFIL is a real array, with one element for each axis in the system, and is used for setting the
intensity (in %) of the filter that the controller uses when calculating FVEL.

Version NT 2.20 166 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Syntax
FVFIL(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges from 0 to 100, Default = 30.

Tag
54
Comments
FVFIL = 0 corresponds to no filtering. In this case the controller calculates FVEL as the
derivative of the FPOS variable:
 = (FPOSn - FPOSn-1)*K
FVELn = 
where K is a scaling factor that reduces FVEL to user units per second.
As the FPOS value is supplied by a discrete physical sensor, the FVEL value calculated
without filtering contains a considerable amount of noise.
Non-zero value of FVFIL provides additional filtering in the FVEL calculation according to
the formula:
FVELn = *((1 - FVFIL)/100) + FVELn-1*(FVFIL/100))
Accessibility
Read-Write

Note
FVFIL values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Variables


FVEL
COM Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

Version NT 2.20 167 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2.1.13.9 RVFIL
Description
RVFIL is a real array, with one element for each axis in the system, and is used for specifying
the power of the filter that the controller uses to calculate RVEL.
Syntax
RVFIL(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value is a percent ranging from 0 to 100, Default = 0.

Tag
110
Comments
The value is specified as a percent where 0 means no filtering. In this case the controller
calculates RVEL as the first difference of RPOS as follows:
 = (RPOS - RPOSn-1) * K
RVELn = 
where K is a scaling factor that translates RVEL to position units per second.
A non-zero value for RVFIL provides additional filtering in the RVEL calculation according
to the formula:
RVELn =  * ((1- (RVFIL/100)) + (RVELn-1 * (RVFIL/100))
The default value of RVFIL is zero. No filtering is required as long as the axis motion is not a
MASTER-SLAVE motion. In this case RPOS is a calculated value and the first difference
provides a smooth approximation of velocity.
If an axis is involved in a MASTER-SLAVE motion, RPOS usually contains a signal from a
discrete physical sensor that causes a certain amount of noise in the first difference. Increase
the value of RVFIL if a smoother approximation is required.
Accessibility
Read-Write

Note
RVFIL values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Version NT 2.20 168 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Related ACSPL+ Commands


MASTER
Related ACSPL+ Variables
RVEL
COM Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.1.13.10 SCSOFFS
Description
SCSOFFS is a real array, with one element for each axis in the system, and is used for defining
a Sin-Cos Sine offset.
Syntax
SCSOFFS(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value designates the offset ranging from -32766 to 32766.

Tag
202
Comments
The digital range corresponds to ±0.5 Volts. This number is used to modify the offset of the Sin-
Cos encoder signal related to the axis. The ratio between this number and the offset is 9.6.
Accessibility
Read-Write

Note
SCSOFFS values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

COM Library Methods


ReadVariable, WriteVariable

Version NT 2.20 169 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

C Library Functions
acsc_ReadReal, acsc_WriteReal

2.1.13.11 SLEBIASA
SLEBIASA is a real array, with one element for each axis in the system, and is used for
defining a Sin-Cos encoder’s hardware compensation for the Sine offset.
Syntax
SLEBIASA(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value designates the offset ranging from -50 to 50; Default: 0.

Tag
164
Comments

Model
SLEBIASA performs the same function as SCSOFFS with the difference
beng that it corresponds to hardware offset compensation of encoder signals.
Only certain SPiiPlus products: SPiiPlusNT-HP, CMnt, and UDMpc have an
option for hardware offset compensation. Hardware compensation has some
advantages over software compensation, such as, the possibility to get analog
signals out of saturation, and making hardware based features like PEG more
accurate.
SLEBIASA is normally set as part of the SPiiPlus MMI Application Studio
Sin Cos Encoder Compensation tool routine. The tool first calculates the
software compensation variable (SCSOFFS), and then writes the final value
to the hardware variable SLEBIASA and resets the software one.

Accessibility
Read-Write
COM Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

Version NT 2.20 170 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2.1.13.12 SLEBIASB
SLEBIASB is a real array, with one element for each axis in the system, and is used for defining
a Sin-Cos encoder’s hardware compensation for the Cosine offset.
Syntax
SLEBIASB(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value designates the offset ranging from -50 to 50; Default: 0.

Tag
165
Comments

Model
SLEBIASB performs the same function as SCCOFFS with the difference
beng that it corresponds to hardware offset compensation of encoder signals.
Only certain SPiiPlus products: SPiiPlusNT-HP, CMnt, and UDMpc have an
option for hardware offset compensation. Hardware compensation has some
advantages over software compensation, such as, the possibility to get analog
signals out of saturation, and making hardware based features like PEG more
accurate.
SLEBIASB is normally set as part of the SPiiPlus MMI Application Studio
Sin Cos Encoder Compensation tool routine. The tool first calculates the
software compensation variable (SCCOFFS), and then writes the final value
to the hardware variable SLEBIASB and resets the software one.

Accessibility
Read-Write
COM Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.1.13.13 SCCOFFS
Description
SCSOFFS is a real array, with one element for each axis in the system, and is used for defining
a Sin-Cos Cosine offset.

Version NT 2.20 171 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Syntax
SCCOFFS(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value designates the offset ranging from -32766 to 32766.

Tag
203
Comments
The digital range corresponds to ±0.5 Volts. This number is used to modify the offset of the Sin-
Cos encoder signal related to the axis. The ratio between this number and the offset is 9.6.
Accessibility
Read-Write

Note
SCCOFFS values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.1.13.14 SLABITS
Description
SLABITS is an integer array, with one element for each axis in the system, and is used for
setting the total number of absolute position bits for an absolute encoder.
Syntax
SLABITS(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges between 16 to 50, Default = 49.

Version NT 2.20 172 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Tag
220

Version NT 2.20 173 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Comments
SLABITS is used for setting the total number of absolute position bits for an absolute encoder.
This is the sum of the multi-turn resolution bits and the turn resolution bits. For example, for an
encoder with 17 bits turn resolution and 16 bits multi-turn resolution, SLABITS should be set
to 33.
Accessibility
Read-Write

Note
SLABITS values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Variables


E_TYPE
COM Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger

2.1.13.15 SCGAIN
SCGAIN is a real array, with one element for each axis in the system, and is a Sin-Cos encoder
gain compensation variable used to compensate the Cosine signal for an improper amplitude
relative to the Sine signal.
Syntax
SCGAIN(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges between 0.5 and 1.5; Default: 1.

Tag
204
Comments
The value of SCGAIN is normally set by the SPiiPlus MMI Application Studio Sin Cos
Encoder Compensation tool routine when calculating the optimum encoder compensation.

Version NT 2.20 174 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Accessibility
Read-Write
COM Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger

2.1.13.16 SCPHASE
SCPHASE is a real array, with one element for each axis in the system, and is a Sin-Cos
encoder phase compensation variable and is used to compensate the Cosine signal for an
improper phase difference relative to the Sine signal.
Syntax
SCPHASE(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value in degrees, the value of which ranges between -15 and 15; Default:
0.

Tag
205
Comments
The value of SCPHASE is normally set by the SPiiPlus MMI Application Studio Sin Cos
Encoder Compensation tool routine when calculating the optimum encoder compensation.
Accessibility
Read-Write
COM Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger

Version NT 2.20 175 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2.1.14 Safety Limits Variables


The Safety Limits variables are:

Name Description
CERRA Critical Position Error (Accelerating)
CERRI Critical Position Error (Idle)
CERRV Critical Position Error (Velocity)
DELI Delay on Transition to Idle State
DELV Delay on Transition to Velocity State
ERRA Tolerable Error (Accelerating)
ERRI Tolerable Error (Idle)
ERRV Tolerable Error (Velocity)
SLLIMIT Software Left Limit-feedback count down limit
SRLIMIT Software Right Limit-feedback count up limit
XACC Over Acceleration fault parameter
XCURI Maximum idle motor current
XCURV Maximum drive current during motion
XRMS Axis RMS over current fault parameter
XRMST RMS Current Time Constant
XSACC Maximum slave axis acceleration
XVEL Over Velocity fault parameter

2.1.14.1 CERRA
Description
CERRA is a real array, with one element for each axis in the system, and is used for defining
the Position Error criterion for acceleration/deceleration states.
Syntax
CERRA(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value of each member ranges between 2.22507e-308 and 1.79769e+308,
Default = 1000.

Tag
11

Version NT 2.20 176 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Comments
CERRA defines critical position error fault (FAULT(axis_index).#CPE) criterion when the
motor is in acceleration or deceleration motion states.
As a configuration variable, the CERRA value is normally defined by SPiiPlus MMI
Application Studio  Toolbox  Setup  Adjuster during the setup procedure of the
system.
Accessibility
Read-Write

Note
CERRA values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Variables


FAULT(axis_index).#CPE
CERRI, CERRV, DELI, DELV
COM Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.1.14.2 CERRI
Description
CERRI is a real array, with one element for each axis in the system, and is used for defining
the critical Position Error when the motor is idle.
Syntax
CERRI(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value of each member ranges between 2.22507e-308 and 1.79769e+308,
Default = 1000.

Tag
12

Version NT 2.20 177 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Comments
As a configuration variable, the CERRI value is normally defined by SPiiPlus MMI
Application Studio  Toolbox  Setup  Adjuster during the setup procedure of the
system.
Accessibility
Read-Write

Note
CERRI values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Variables


FAULT(axis_index).#CPE
CERRA, CERRV, DELI, DELV
COM Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.1.14.3 CERRV
Description
CERRV is a real array, with one element for each axis in the system, and is used for defining
the critical Position Error when the motor is moving with constant velocity.
Syntax
CERRV(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value of each member ranges between 2.22507e-308 and 1.79769e+308,
Default = 1000.

Tag
13

Version NT 2.20 178 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Comments
As a configuration variable, the CERRV value is normally defined by SPiiPlus MMI
Application Studio  Toolbox  Setup  Adjuster during the setup procedure of the
system.
Accessibility
Read-Write

Note
CERRV values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Variables


FAULT(axis_index).#CPE
CERRA, CERRI, DELI, DELV
COM Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.1.14.4 DELV
Description
DELV is a real array, with one element for each axis in the system, and is used for defining the
delay of transition to the Constant Velocity state.
Syntax
DELV(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value of each member ranges between 2.22507e-308 and 1.79769e+308,
Default = 50.

Tag
24
Comments
DELV is defined in msecs and applies a delay when the motion state changes to a constant
velocity state (GPHASE(axis_index) = 4).

Version NT 2.20 179 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

DELV affects the following faults:


 FAULT(axis_index).#PE
 FAULT(axis_index).#CPE
Accessibility
Read-Write

Note
DELV values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Variables


ERRA, ERRI, ERRV, DELI, FAULT.#CPE, FAULT.#PE
COM Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.1.14.5 DELI
Description
DELI is a real array, with one element for each axis in the system, and is used for defining the
delay of transition to the Idle state.
Syntax
DELI(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value of each member ranges between 2.22507e-308 and 1.79769e+308,
Default = 50.

Tag
23
Comments
DELI is defined in milliseconds and applies a delay when the motion state changes from any
motion state to idle (GPHASE(axis_index) = 0 or 12).
DELI affects the following faults and current limits:

Version NT 2.20 180 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

 FAULT(axis_index).#PE
 FAULT(axis_index).#CPE
 XCURI(axis_index)
 XCURV(axis_index)
Accessibility
Read-Write

Note
DELI values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Variables


ERRA, ERRI, ERRV, DELV, FAULT(axis_index).#CPE, FAULT(axis_index).#PE
COM Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.1.14.6 ERRA
Description
ERRA is a real array, with one element for each axis in the system, and is used for defining the
Position Error criterion for Acceleration/Deceleration states.
Syntax
ERRA(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges from 2.22507e-308 to 1.79769e+308, Default = 100.

Tag
39
Comments
ERRA defines the maximum tolerable position error (FAULT(axis_index).#PE) when the
motor is moving with acceleration.

Version NT 2.20 181 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

As a configuration variable, the ERRA value is normally defined by SPiiPlus MMI


Application Studio  Toolbox  Setup  Adjuster during the setup procedure of the
system.
Accessibility
Read-Write

Note
ERRA values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Variables


FAULT(axis_index).#PE, FDEF
ERRI, ERRV, DELI, DELV
COM Library Methods
ReadVariable, WriteVariable,
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.1.14.7 ERRI
Description
ERRI is a real array, with one element for each axis in the system, and is used for defining the
maximum tolerable Position Error (FAULT(axis_index).#PE) when the motor is idle.
Syntax
ERRI(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges from 2.22507e-308 to 1.79769e+308, Default = 100.

Tag
40
Comments
As a configuration variable, the ERRI value is normally defined by SPiiPlus MMI
Application Studio  Toolbox  Setup  Adjuster during the setup procedure of the
system.

Version NT 2.20 182 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Accessibility
Read-Write

Note
ERRIvalues cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Variables


FAULT(axis_index).#PE
ERRA, ERRV, DELI, DELV
COM Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.1.14.8 ERRV
Description
ERRV is a real array, with one element for each axis in the system, and is used for defining the
maximum tolerable Position Error (FAULT(axis_index).#PE) when the axis is moving with
constant velocity.
Syntax
ERRV(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges from 2.22507e-308 to 1.79769e+308, Default = 100.

Tag
41
Comments
As a configuration variable, the ERRV value is normally defined by SPiiPlus MMI
Application Studio  Toolbox  Setup  Adjuster during the setup procedure of the
system.
Accessibility
Read-Write

Version NT 2.20 183 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Note
ERRV values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Variables


FAULT(axis_index).#PE
ERRA, ERRI, DELI, DELV
COM Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.1.14.9 SLLIMIT
Description
SLLIMIT is a real array, with one element for each axis in the system, and is used for defining
the minimum allowed Left position for the motor.
Syntax
SLLIMIT(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges from -1.79769e+308 to 1.79769e+308, Default = 2e+014.

Tag
124
Comments
If reference position RPOS is less than this value, a software Left Limit fault results and bit
FAULT(axis_index).#SLL is = 1.
Accessibility
Read-Write

Version NT 2.20 184 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Note
SLLIMIT values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Variables


RPOS, FAULT(axis_index).#SLL, SRLIMIT
COM Library Methods
ReadVariable, WriteVariable, GetFault
C Library Functions
acsc_ReadReal, acsc_WriteReal, acsc_GetFault

2.1.14.10 SRLIMIT
Description
SRLIMIT is a real array, with one element for each axis in the system, and is used for defining
the minimum allowed Right position for the motor.
Syntax
SRLIMIT(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges from -1.79769e+308 to 1.79769e+308, Default = 2e+014.

Tag
128
Comments
If reference position RPOS is less than this value, a software Right Limit fault results and
FAULT(axis_index).#SRL is = 1.
Accessibility
Read-Write

Note
SRLIMIT values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Version NT 2.20 185 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Related ACSPL+ Variables


RPOS, FAULT(axis_index).#SRL, SLLIMIT
COM Library Methods
ReadVariable, WriteVariable, GetFault
C Library Functions
acsc_ReadReal, acsc_WriteReal, acsc_GetFault

2.1.14.11 XACC
Description
XACC is a real array, with one element for each axis in the system, and is used for defining the
maximum allowed acceleration for the motor.
Syntax
XACC(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges from 2.22507e-308 to 1.79769e+308, Default = 1e+007.

Tag
141
Comments
If the reference acceleration RACC exceeds this value, the Acceleration Limit fault is activated
and bit #AL is set in variable FAULT.
Accessibility
Read-Write

Note
XACC values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Variables


FAULT(axis_index).#AL, RACC
COM Library Methods
ReadVariable, WriteVariable, GetFault

Version NT 2.20 186 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

C Library Functions
acsc_ReadReal, acsc_WriteReal, acsc_GetFault

2.1.14.12 XCURI
Description
XCURI is a real array, with one element for each axis in the system, and is used for limiting
the drive output when the motor is enabled but in standstill position.
Syntax
XCURI(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges from 0 to 100, Default = 50.

Tag
142
Comments
XCURI is defined as a percentage of the maximum output voltage. For example, in SPiiPlus
PCI-4/8, the maximum output voltage is ±10V. Setting XCURI to 50 will limit the drive output
to ±5V when the motor is idle.
Accessibility
Read-Write

Note
XCURI values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Variables


FAULT(axis_index).#CL, XRMS, XCURV
COM Library Methods
ReadVariable, WriteVariable, GetFault
C Library Functions
acsc_ReadReal, acsc_WriteReal, acsc_GetFault

Version NT 2.20 187 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2.1.14.13 XCURV
Description
XCURV is a real array, with one element for each axis in the system, and is used for limiting
the drive output when the motor is moving.
Syntax
XCURV(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges from 0 to 100, Default = 50.

Tag
143
Comments
XCURV is defined as a percentage of the maximum output voltage. For example, in SPiiPlus
PCI-4/8, the maximum output voltage is ±10V. Setting XCURV to 50 will limit the drive
output to ±5V when the motor is moving.
Accessibility
Read-Write

Note
XCURV values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Variables


FAULT(axis_index).#CL, XRMS, XCURV
COM Library Methods
ReadVariable, WriteVariable, GetFault
C Library Functions
acsc_ReadReal, acsc_WriteReal, acsc_GetFault

2.1.14.14 XRMS
Description
XRMS is a real array, with one element for each axis in the system, and is used for setting the
maximum allowable rms current.

Version NT 2.20 188 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Syntax
XRMS(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges from 0 to 100, Default = 50.

Tag
144
Comments
The SP program calculates RMS of the corresponding controller drive output. If the calculated
value exceeds the XRMS value, an overcurrent fault occurs. XRMS is defined as a percentage
of the maximum output voltage.
Accessibility
Read-Write

Note
XRMS values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Variables


FAULT(axis_index).#CL, XCURI, XCURV
COM Library Methods
ReadVariable, WriteVariable, GetFault
C Library Functions
acsc_ReadReal, acsc_WriteReal, acsc_GetFault

2.1.14.15 XRMST
Description
XRMST is a real array, with one element for each axis in the system, and is used for setting the
time constant in milliseconds for the XRMS to activate the overcurrent protection. For
calculation of XRMS activation time, see SPiiPlus Setup Guide.
Syntax
XRMST(axis_index) = value

Version NT 2.20 189 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges from 200 to 3260, Default = 3230.

Tag
145
Accessibility
Read-Write

Note
XRMST values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Variables


FAULT(axis_index).#CL, XCURI, XCURV, XRMS
COM Library Methods
ReadVariable, WriteVariable, GetFault
C Library Functions
acsc_ReadReal, acsc_WriteReal, acsc_GetFault

2.1.14.16 XSACC
Description
XSACC is a real array, with one element for each axis in the system, and is used for defining
the maximum allowed slave acceleration in MASTER-SLAVE motion.
Syntax
XSACC(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges from 2.22507e-308 to 1.79769e+308, Default = 1e+007.

Tag
146

Version NT 2.20 190 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Comments
When a slave is synchronized to a master, the controller verifies the slave acceleration against
the XSACC value each MPU cycle. If the slave acceleration exceeds XSACC, the motion falls
out of synchronization. The controller tries to regain synchronism by having the slave pursue
the master with the maximum allowed motion parameters.
Accessibility
Read-Write

Note
XSACC values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Commands


MASTER, SLAVE
Related ACSPL+ Variables
SYNV
COM Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.1.14.17 XVEL
Description
XVEL is a real array, with one element for each axis in the system, and is used for defining the
maximum allowed velocity for the axis.
Syntax
XVEL(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges from 2.22507e-308 to 1.79769e+308, Default = 2e+006.

Tag
147
Comments
If RVEL feedback velocity exceeds XVEL, FAULT(axis_index).#VL = 1.

Version NT 2.20 191 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Note
Trying to adjust the position and velocity loops when XVEL is not correctly
set will produce poor results. Verify that XVEL is correctly defined to fit the
application and other requirements before adjusting the loops.

Accessibility
Read-Write

Note
XVEL values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Variables


FAULT(axis_index).#VL, RVEL, FVEL
COM Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.2 Axis State Variables


The Axis State variables are:

Name Description
AST Axis State
IND Index Position
IST Index State
LOCALST Status of STO1, STO2, Emergency Stop and Component Error
MARK Mark Position
M2ARK Secondary Mark Position
MST Motor State
NST Status of EtherCAT Sync and GPRT errors for each axis in the system.
RMS RMS current
ROFFS Reads the offset calculated by the controller in the connect formula.

Version NT 2.20 192 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2.2.1 AST
Description
AST is an integer array, with one element for each axis in the system, the elements of which
contain a set of bits used for displaying the current axis state.
Syntax
[command] AST(axis_index).bit_designator
Arguments

command Typical commands are DISP and the like.


axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
bit_designator A description of the AST bit designators is given in Table 35.

Table 35 AST Bit Descriptions (page 1 of 2)


Bit Name No. Description
#LEAD 0 1 = axis is leading in a group
#PEG 2 1 = PEG is in progress
#DC 3 1 = Axis data collection is in progress
#PEGREADY 4 1 = all values are loaded and the
Incremental/Random PEG is ready to
respond to movement
#MOVE 5 1 = Axis is involved in a motion
#ACC 6 1 = Axis in accelerating motion state
#BUILDUP 7 1 = Segments build-up
#VELLOCK 8 1 = Slave is synchronized to master in
velocity lock mode - slave velocity
strictly follows the master velocity.
#POSLOCK 9 1 = Slave is synchronized to master in
position lock mode - slave position
strictly follows the master position.
#TRIGGER 11 1 = Produces an interrupt to the host
application, enabled by IENA.26

Version NT 2.20 193 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Table 35 AST Bit Descriptions (page 2 of 2)


Bit Name No. Description
#NEWSEGM 16 The controller sets the bit to inform that a
new segment is required to be provided by the
application. The bit is set starvation_margin
ms before the starvation condition occurs.
The starvation condition is indicated by
#STARV bit.
#STARV 17 The controller sets the bit to indicate
starvation condition. The starvation condition
means that there are not enough further
segments to continue the motion with
required velocity. In this case, the controller
starts decelerating the motion with ½ JERK in
order to prevent motion discontinuity and
avoid mechanical jerks. Once the application
begins supplying segments at a sufficient
rate, the controller returns the motion back to
normal condition.
Note, that often the starvation condition
causes inefficient velocity generation and
increases the time required for completing the
required motion path.

Tag
7
Accessibility
Read-Only
Related ACSPL+ Commands
MASTER-SLAVE
Related ACSPL+ Variables
MST
COM Library Methods
ReadVariable, GetAxisState
C Library Functions
acsc_ReadInteger, acsc_GetAxisState

2.2.2 IND
Description
IND is a real array, with one element for each axis in the system, the elements of which store
the position of the last encountered encoder index in user-defined units.The variable operates
in connection with IST(axis_index).#IND.

Version NT 2.20 194 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Tag
72
Comments
After power-up, IST(axis_index).#IND is reset and the value of IND is undefined because an
index capture has not yet occurred. When the motor encounters an encoder index,
IST(axis_index).#IND is raised and the current FPOS position is latched to IND.
Subsequent index values are ignored as long as #IND remains raised.
To resume the latching logic IST(axis_index).#IND must be explicitly cleared by the command
IST(axis_index).#IND=0.
Accessibility
Read-Only

Note
IND values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Variables


IST, FPOS
COM Library Methods
ReadVariable, GetIndexState, ResetIndexState
C Library Functions
acsc_ReadReal, acsc_GetIndexState, acsc_ResetIndexState

2.2.3 IST
Description
IST is an integer array, with one element for each axis in the system, the elements of which
contain a set of bits that indicate the state of the IND and the MARK variables for the given
axis.
Syntax
IST(axis_index).bit_designator = value

Version NT 2.20 195 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
bit_designator The IST has four bit designators:
 #IND (bit 0) - Primary encoder index
 #IND2 (bit 1) - Secondary encoder index
 #MARK (bit 2) - Mark 1
 #MARK2 (bit 3) - Mark 2
value value can be zero or non-zero.

Tag
79
Comments
The controller processes Index/Mark signals as follows: when an Index/Mark signal is
encountered for the first time, the controller latches FPOS or F2POS to one of the variables
IND, MARK, M2ARK and sets the corresponding IST bit = 1.
When finding an Index for the first time, the correct procedure is:
1. Start by setting the index flag to 1: IST(axis).#IND=1.
2. Then reset the flag to 0: IST(axis).#IND=0.
This puts the system in the correct mode for finding the Index.
As long as an IST bit is raised, the controller does not latch another value to the corresponding
variable. To resume the latching logic, the user application must explicitly reset the
corresponding IST bit to 0.
Accessibility
Read-Write
Related ACSPL+ Variables
FPOS, F2POS, IND, MARK, M2ARK
COM Library Methods
ReadVariable, WriteVariable, GetIndexState, ResetIndexState
C Library Functions
acsc_ReadInteger, acsc_WriteInteger, acsc_GetIndexState, acsc_ResetIndexState

2.2.4 M2ARK
Description
M2ARK is a real array, with one element for each axis in the system, the elements of which
store the position of the last encountered MARK2 signal in IST(axis_index).#MARK2.
Tag
84

Version NT 2.20 196 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Comments
After power-up IST(axis_index).#MARK2 is reset and the value of MARK2 is undefined.
When the motor encounters a MARK2 signal, the bit is raised and the current FPOS position
is latched to IST(axis_index). #MARK2.
If the motion continues and the motor encounters another M2ARK signal, the new value is
ignored as long as #MARK2 = 1.
To resume the latching logic, IST(axis_index). #MARK2 must be explicitly cleared with the
command IST(axis_index). #MARK2=0.
Accessibility
Read-Only
Related ACSPL+ Variables
IST, FPOS,F2POS, MARK
COM Library Methods
ReadVariable, GetIndexState,
C Library Functions
acsc_ReadReal, acsc_GetIndexState

2.2.5 MARK
Description
MARK is a real array, with one element for each axis in the system, the elements of which store
the position of the last encountered MARK1 signal in IST(axis_index).#MARK.
Tag
85
Comments
After power-up, IST(axis_index).#MARK is reset and the value of MARK is undefined.
When the motor encounters a MARK1 signal, the bit is raised and the current FPOS position
is latched to IST(axis_index).#MARK.
If the motion continues and the motor encounters another MARK1 signal, the new value is
ignored as long as #MARK = 1.
To resume the latching logic, IST(axis_index).#MARK must be explicitly cleared with the
command IST(axis_index).#MARK=0.

Note
MARK values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Version NT 2.20 197 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Accessibility
Read-Only
Related ACSPL+ Variables
IST, FPOS, F2POS, IND, M2ARK, IENA
COM Library Methods
ReadVariable, GetIndexState
C Library Functions
acsc_ReadReal, acsc_GetIndexState

2.2.6 MST
Description
MST is an integer array, with one element for each axis in the system, the elements of which
contain a set of bits that display the current motor state, as given in Table 36, for the given axis.

Table 36 MST Bit Descriptions


Bit Name No Description
#ENABLED 0 0: motor is disabled
1: motor is enabled.
#OPEN 1 0: motor is operating with closed loop control
1: motor is operating with open loop control.
#INPOS 4 Obsolete bit. Use the #MOVE bit to get
indication on the state of the motor.
#MOVE 5 0: Motor is not moving and has reached the
target position (see variables TARGRAD
and SETTLE)
1: Motor is moving
#ACC 6 0 = Motor is not accelerating
1 = Motor is accelerating.

Tag
90
Accessibility
Read-Only
Related ACSPL+ Commands
All motion commands.
Related ACSPL+ Variables
FPOS, F2POS, APOS, RPOS
COM Library Methods
ReadVariable, GetMotorState

Version NT 2.20 198 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

C Library Functions
acsc_ReadInteger, acsc_GetMotorState

2.2.7 RMS
Description
RMS is a real array, with one element for each axis in the system, the elements of which store
the RMS current for an axis (in %). The value ranges between 1 and 100.
Tag
223
Accessibility
Read-Only
Related ACSPL+ Variables
XRMS
COM Library Methods
ReadVariable
C Library Functions
acsc_ReadReal

2.2.8 LOCALST
Description
LOCALST is a read-only integer array, with one element for each axis in the system, each
element of which contains a set of 4 bits. The variable bits are set from the firmware according
to the input states that are local for a given axis.
Syntax
LOCALSTaxis_index.bit_designator = 1/0
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
bit_designator The meanings of bit_designator are given in Table 37.

Table 37 LOCALST Bit Description (page 1 of 2)


Bit Name Bit No. Description
#STO1 0 STO1 input is on/off
#STO2 1 STO2 input is on/off

Version NT 2.20 199 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Table 37 LOCALST Bit Description (page 2 of 2)


Bit Name Bit No. Description
#ES 2 Emergency Stop input is on/off
#COMP 3 Component failure input is on

Tag
237
Comments
This variable only reports the local state of these inputs (present in the same enclosure as the
axis). It will not report system-wide faults, only those that would affect the axis even if it were
the only axis in the system.
Accessibility
Read-Only
COM Library Methods
ReadInteger
C Library Functions
acsc_ReadInteger

2.2.9 NST
Description
NST is an integer array, with one element for each EtherCAT node in the system, each element
of which contains a set of 2 bits. The variable enables users to differentiate between different
causes of servo processor alarm faults.
Syntax
NSTnode_index.bit_designator = 1|0
Arguments

node_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of nodes in the system minus 1.
bit_designator The meanings of bit_designator are given in Table 38.

Table 38 NST Bit Description


Bit Name Bit No. Description
#SYNC 0 Sync error
#GPRT 1 GPRT error

Tag
229

Version NT 2.20 200 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Comments
If the #SYNC or #GPRT error bit is set in NST, there will be a network error in all axes, and
servo processor alarm in all the axes related to the node related to the NST. These faults indicate
a problem in the interface between the firmware and the node.
The setting of the #SYNC error bit means that one or more slaves are out of synchronization
with the master.
The setting of the #GPRT error bit means that the queue (the size, of which, is 400) for the
GPRT commands (commands that are sent by request) was full and some commands to be sent
were lost. For example, for the SPiiPlusDC-LT-4 controller 8 such commands can be sent every
cycle, these commands can be found in a reserved place in the EtherCAT telegram for the
command1,…,command8.
FCLEAR for any axis associated with the node axis will reset all bits of the NST variable of
that node.
Accessibility
Read-Only
COM Library Methods
ReadInteger
C Library Functions
acsc_ReadInteger

2.3 Data Collection Variables


The Data Collection variables are:

Name Description
DCN Axis Data Collection, Number of Samples
DCP Axis Data Collection, Period
S_DCN System Data Collection, Number of Samples
S_DCP System Data Collection, Period
S_ST State of System Data Collection

2.3.1 DCN
Description
DCN is an integer array, with one element for each axis in the system, the elements of which
store the number of data collection samples per given axis.
Tag
19

Version NT 2.20 201 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Comments
DCN stores a defined number of axis data collection samples, as follows:
1. While an axis data collection is in progress DCN displays the index of the array element
that stores the next sample.
2. When an axis data collection terminates for the corresponding axis, DCN stores the
number of actually collected samples. If the data collection terminates automatically, the
variable is always equal to the requested number of samples specified in DC. If STOPDC
terminates data collection, DCN may contain less than the specified number of samples.
If an axis data collection is in progress, DCN increments each time the next sample is stored.
When the data collection terminates, the DCN holds the last value, until the next data collection
starts for the same axis.
Accessibility
Read-Only
Related ACSPL+ Commands
DC, STOPDC
Related ACSPL+ Variables
AST, DCP
COM Library Methods
ReadVariable, DataCollection, StopCollect, WaitCollectEnd
C Library Functions
acsc_ReadInteger, acsc_DataCollectionExt, acsc_StopCollect, acsc_WaitCollectEnd

2.3.2 DCP
Description
DCP is a real array, with one element for each axis in the system, the elements of which store
the axis data collection samples based on a specified sampling period. When an axis data
collection terminates, DCP stores the sampling period.
Tag
21
Comments
DCP is generally equal to the specified period, however because period is rounded to an integer
number of controller cycles, the actual period may differ from the period specified in the DC
command.
If DC/t (temporal data collection) was executed, DCP may be greater than the requested
minimal period.
When a system data collection starts, DCP is assigned a real data collection period.
Accessibility
Read-Only

Version NT 2.20 202 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Related ACSPL+ Commands


DC, STOPDC
Related ACSPL+ Variables
AST, DCN
COM Library Methods
ReadVariable, DataCollection, StopCollect, WaitCollectEnd
C Library Functions
acsc_ReadReal, acsc_DataCollectionExt, acsc_StopCollect, acsc_WaitCollectEnd

Version NT 2.20 203 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2.3.3 S_DCN
Description
S_DCN is a scalar integer that stores a defined number of system data collection samples.
Tag
111
Comments
S_DCN stores a defined number of system data collection samples, as follows:
1. While a system data collection is in progress S_DCN displays the index of the array
element that stores the next sample.
2. When a system data collection terminates, the variable stores the number of actually
collected samples. If the data collection terminates automatically, the variable is always
equal to the requested number of samples specified in the dc command. If the data
collection terminates due to the STOPDC command, the variable may be less than the
requested number of samples.
For cyclic data collection S_DCN displays the current number of collected samples and
changes as follows:
1. At the start of data collection, S_DCN is assigned with zero.
2. With each sampling, S_DCN is incremented until it reaches the specified size of the sample
array
3. S_DCN remains unchanged - the newest sample overwrites the oldest, so the total number
of samples remains the same.
As long as cyclic data collection is in progress, the application cannot use the sample array.
After the cyclic data collection finishes, the controller repacks the sample array so that the first
element represents the oldest sample and the last element represents the most recent sample.
Accessibility
Read-Only
Related ACSPL+ Commands
DC, STOPDC
Related ACSPL+ Variables
S_ST, S_DCP
COM Library Methods
ReadVariable, DataCollection, StopCollect, WaitCollectEnd
C Library Functions
acsc_ReadInteger, acsc_DataCollectionExt, acsc_StopCollect, acsc_WaitCollectEnd

Version NT 2.20 204 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2.3.4 S_DCP
Description
S_DCP is real variable that stores the period of system data collection sampling.
Tag
112
Comments
When a system data collection terminates, the S_DCP stores the sampling period. Unless a
temporal data collection was executed, the variable is always equal to the requested period
specified in the DC command.

Note
S_DCP is generally equal to the specified period, however because the
period is rounded to an integer number of controller cycles, the actual
period may differ from the period specified in the DC command.

Accessibility
Read-Only
Related ACSPL+ Commands
DC, STOPDC
Related ACSPL+ Variables
S_ST, S_DCN
COM Library Methods
ReadVariable, DataCollection, StopCollect, WaitCollectEnd
C Library Functions
acsc_ReadReal, acsc_DataCollectionExt, acsc_StopCollect, acsc_WaitCollectEnd

2.3.5 S_ST
Description
S_ST is a scalar integer variable that provides the state of System Data Collection.
Tag
120
Comments
S_ST provides a bit that indicates if system data collection is currently in progress.
Bit 3:
0 - System data collection off
1 - System data in progress.

Version NT 2.20 205 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Accessibility
Read-Only
Related ACSPL+ Commands
DC, STOPDC
Related ACSPL+ Variables
S_DCN, S_DCP
COM Library Methods
ReadVariable, DataCollection, StopCollect, WaitCollectEnd
C Library Functions
acsc_ReadInteger, acsc_DataCollectionExt, acsc_StopCollect

2.4 Input and Output Variables


The Input and Output variables are:

Name Description
AIN Analog Inputs
AOUT Analog Outputs
COMMCH Returns the last activated communication channel.
DCOM Drive command - in open loop
EXTIN Extended digital inputs (HSSI)
EXTOUT Extended digital outputs (HSSI)
IN General Purpose Digital Inputs
OUT General Purpose Digital Outputs

2.4.1 AIN
Description
AIN is a real array, the size of which is determined by the total number of analog input signals
in the system, and is used for defining the level of an analog signal from an external source such
as a sensor or a potentiometer.
Syntax
AIN(index) = value
Arguments

index A number between 0 up to the maximum number of analog input signals


minus one.
value value is the scaling, by percent, of the signal and ranges from -100 to
+100, Default = 0.

Version NT 2.20 206 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Tag
4
Comments
None
Accessibility
Read-Only
COM Library Methods
ReadVariable, GetAnalogInput
C Library Functions
acsc_ReadReal, acsc_GetAnalogInput

2.4.2 AOUT
Description
AOUT is a real array, the size of which is determined by the total number of analog output
signals in the system, and is used for defining the level of a general purpose analog signal that
is sent to an external device.
Syntax
AOUT(index) = value
Arguments

index A number between 0 up to the maximum number of analog output signals


minus one.
value value is the scaling, by percent, of the signal and ranges from -100 to
+100, Default = 0.

Tag
5
Comments
1. Some aspects of AOUT are model-dependent, including the number of analog outputs and
type of analog inputs (differential or single-ended).
2. In SPiiPlus controllers (not CM) AOUT can be used only when the axis is defined as
Dummy - see MFLAGS.
3. To define the analog output command to a drive (connected to a motor) in open loop, refer
to DCOM.
Accessibility
Read-Write
Related ACSPL+ Variables
MFLAGS

Version NT 2.20 207 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

COM Library Methods


ReadVariable, WriteVariable, GetAnalogOutput, SetAnalogOutput
C Library Functions
acsc_ReadReal, acsc_WriteReal, acsc_GetAnalogOutput, acsc_SetAnalogOutput

2.4.3 EXTIN
Description
EXTIN is an integer array, the size of which is determined by the total number of HSSI input
signals in the system, and reads the current state of the HSSI inputs. The number of inputs
depends on the number of HSSI modules in the system.
For details about the HSSI, see the HSSI Modules Hardware Guide.
Tag
42
Accessibility
Read-Only
Related ACSPL+ Variables
EXTOUT, IN
COM Library Methods
ReadVariable, GetExtInput, GetExtInputPort
C Library Functions
acsc_ReadInteger, acsc_GetExtInput, acsc_GetExtInputPort

2.4.4 EXTOUT
Description
EXTOUT is an integer array, the size of which is determined by the total number of HSSI
output signals in the system, which can be used for reading or setting the current state of the
HSSI outputs. The number of outputs depends on the number of HSSI modules in the system.
For details about the HSSI, see the HSSI Modules Hardware Guide.
Syntax
EXTOUT(index) = value
Arguments

index A number between 0 and 511.


value value ranges from -2147483648, 2147483647, Default = 0.

Tag
43

Version NT 2.20 208 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Accessibility
Read-Write
Related ACSPL+ Variables
EXTIN, OUT
COM Library Methods
ReadVariable, WriteVariable, GetExtOutput, SetExtOutput, GetExtOutputPort,
SetExtOutputPort
C Library Functions
acsc_ReadInteger, acsc_WriteInteger, acsc_GetExtOutput, acsc_SetExtOutput,
acsc_GetExtOutputPort, acsc_SetExtOutputPort

2.4.5 IN
Description
IN is an integer array, the size of which is determined by the total number of digital input signals
in the system, and stores the current state of the General Purpose digital inputs.
Syntax
IN(port).bit
Arguments

port A number between 0 and the total number of ports in the system minus
one.
bit bit can be 0-31.

Tag
71
Comments
General Purpose inputs are represented by bits 0..31 of IN(port). Each bit reports the state of
one General Purpose input.
For example, entering the query command ?IN(0).0 in the SPiiPlus MMI Application Studio
Communication Terminal will return "0" if inputs #0 is non-active or "1" when active.

Note
In some SPiiPlus controllers, the digital input pins can also be used as
MARK.

Accessibility
Read-Only

Version NT 2.20 209 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Related ACSPL+ Variables


OUT, EXTOUT
COM Library Methods
ReadVariable, GetInput, GetInputPort
C Library Functions
acsc_ReadInteger, acsc_GetInput, acsc_GetInputPort

2.4.6 OUT
Description
OUT is an integer array, the size of which is determined by the total number of digital output
signals in the system, and can be used for reading or writing the current state of the General
Purpose digital outputs.
Syntax
OUT(port).bit
Arguments

port A number between 0 the total number of ports in the system minus one.
bit bit can be 0-31.

Tag
94
Comments
General purpose outputs are represented by bits 0..31 of OUT(port). Each bit reports the state
of one general purpose output for the given port.
For example, the query command ?OUT(23).0 = 1 through the SPiiPlus MMI Application
Studio Communication Terminal will activate the outputs #0 of port 23.

Note
In some SPiiPlus controllers the digital output pins can also be used as PEG
- see ASSIGNPEG.

Accessibility
Read-Write
Related ACSPL+ Variables
IN, EXTIN
COM Library Methods
ReadVariable, WriteVariable, SetOutput, GetOutput, SetOutputPort, GetOutputPort

Version NT 2.20 210 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

C Library Functions
acsc_ReadInteger, acsc_WriteInteger, acsc_SetOutput, acsc_GetOutput, acsc_SetOutputPort,
acsc_GetOutputPort

2.5 Monitoring Variables


The Monitoring variables are:

Name Description
SMNA Software Monitor Address
SMNV Software Monitor Value
TIME Elapsed Time
USAGE MPU Usage

2.5.1 SMNA
Description
SMNA is a scalar integer and is used for defining the SP address of a variable to be monitored
by SMNV.
Syntax
SMNA = value
Arguments

value value ranges between -2147483648 to 2147483647, Default = 0.

Tag
125
Comments
After SMNA is set, the requested SP variable is copied to SMNV each MPU cycle. The SMNV
variable can be used in ACSPL+ expressions, in immediate commands, or in data collection.
Accessibility
Read-Write
Related ACSPL+ Variables
SMNV
COM Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger

Version NT 2.20 211 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2.5.2 SMNV
Description
SMNV is a scalar integer used for storing a monitored value requested by SMNA.
Tag
126
Comments
After SMNA is set, the requested SP is copied to SMNV each MPU cycle. SMNV can be used
in ACSPL+ expressions, in immediate commands or in data collection.
The values it can store range from -2147483648 to 2147483647, Default = 0.
Accessibility
Read-Only
Related ACSPL+ Variables
SMNA
COM Library Methods
ReadVariable
C Library Functions
acsc_ReadInteger

2.5.3 TIME
Description
TIME is a real variable that provides the defines the elapsed time (in milliseconds) from the
controller power-up.
Tag
134
Accessibility
Read-Only
COM Library Methods
ReadVariable
C Library Functions
acsc_ReadReal

Version NT 2.20 212 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2.5.4 USAGE
Description
USAGE is a real variable used for storing the amount of MPU usage as a percentage of the real-
time tasks in the controller cycle during the execution of real-time tasks.
Tag
137
Comments
The real-time tasks always have the greatest priority. If the usage reaches 90% or more, the
response time of the controller deteriorates, in addition, it is dangerous and may cause jerks in
the motion profile.
The USAGE variable value can be used in autoroutines for halting the application should usage
exceed a certain value.
Accessibility
Read-Only
COM Library Methods
ReadVariable
C Library Functions
acsc_ReadReal

2.6 Motion Variables


The Motion variables are:

Name Description
ACC Default Acceleration
APOS Axis Position
DEC Default Deceleration
DAPOS Delayed Axis Position
FACC Feedback Acceleration
FPOS Feedback Position
F2POS Secondary Feedback Position
FVEL Feedback Velocity
F2VEL Secondary Feedback Velocity
GACC Group Acceleration
GJERK Group Jerk
GMOT Motion Number
GMQU Motion Queue
GMTYPE Motion Type

Version NT 2.20 213 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Name Description
GPATH Group Path
GPHASE Motion Phase
GRTIME Remaining Motion Time
GSEG Motion Segment
GSFREE Free Motion Segments
GVEC Group Vector
GVEL Group Velocity
JERK Default jerk
KDEC Default kill deceleration
MPOS Master Position
NVEL Sets a non-zero axis velocity in stepper motor applications
TPOS Target position for track motion
PE Position Error
RACC Reference Acceleration
RPOS Reference Position
RVEL Reference Velocity
VEL Velocity

2.6.1 ACC
Description
ACC is a real array, with one element for each axis in the system, and is used for defining the
motion profile acceleration.
Syntax
ACC(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges from 2.22507e-308 to 1.79769e+308, Default = 100000.

Tag
1
Comments
For single-axis motion, ACC defines the axis acceleration. If the axis is a leading axis in a
group, ACC defines the vector acceleration of the common motion.
If ACC is changed when a motion is in progress, the change does not affect currently executing
motions, or motions that were created before the change.

Version NT 2.20 214 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Accessibility
Read-Write

Note
ACC values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Commands


IMM, SLAVE, and all motion commands where the profile is generated by the controller.
Related ACSPL+ Variables
DEC, JERK, KDEC, VEL
COM Library Methods
ReadVariable, WriteVariable, SetAcceleration. GetAcceleration, SetAccelerationImm
C Library Functions
acsc_ReadReal, acsc_WriteReal, acsc_SetAcceleration. acsc_GetAcceleration,
acsc_SetAccelerationImm

2.6.2 APOS
Description
APOS is a real array, with one element for each axis in the system, and is used for defining the
current reference value for the axis in user-defined units.
Syntax
See SET
Tag
6
Comments
APOS is updated each MPU cycle if a motion that involves the axis is in progress.
If the corresponding motor has a default connection (MFLAGS(axis_index).#DEFCON =1),
APOS = RPOS.
Accessibility
Read-Only - Can be changed using SET.
Related ACSPL+ Commands
MASTER-SLAVE
Related ACSPL+ Variables
MPOS

Version NT 2.20 215 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

COM Library Methods


ReadVariable
C Library Functions
acsc_ReadReal

2.6.3 DAPOS
Description
DAPOS is a real array, with one element for each axis in the system. DAPOS reads the delayed
Axis Position value which is synchronized with RPOS and FPOS.
Syntax
DAPOS is activated as part of the SPiiPlus MMI Application Studio Scope.
Tag
18
Comments
Use DAPOS only to view the axis position in the Scope when comparing the axis position to
the RPOS.
In the SPiiPlus, APOS (axis position) is not synchronized with RPOS and FPOS and are
characterized by a few msec delay.
When implementing a non-default CONNECT, it may be necessary to monitor APOS versus
RPOS with the Scope.
Accessibility
Read-Only
Related ACSPL+ Commands
CONNECT
Related ACSPL+ Variables
APOS, RPOS
COM Library Methods
ReadVariable
C Library Functions
acsc_ReadReal

Version NT 2.20 216 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2.6.4 DEC
Description
DEC is a real array, with one element for each axis in the system and is used for specifying the
motion profile deceleration in milliseconds.
Syntax
DEC(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges from 2.22507e-308 to 1.79769e+308, Default = 100000.

Tag
22
Comments
For single-axis motion, DEC defines axis deceleration. If the axis is a leading axis in a group,
DEC defines the vector deceleration of the common motion.
If DEC is changed when a motion is in progress, the change does not affect currently executing
motions or motions that were created before the change.
Accessibility
Read-Write

Note
DEC values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Commands


HALT, IMM, SLAVE
Related ACSPL+ Variables
ACC, JERK, KDEC, VEL
COM Library Methods
ReadVariable, WriteVariable, SetDeceleration. GetDeceleration, SetDecelerationImm
C Library Functions
acsc_ReadReal, acsc_WriteReal, acsc_SetDeceleration. acsc_GetDeceleration,
acsc_SetDecelerationImm

Version NT 2.20 217 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2.6.5 FACC
Description
FACC is a real array, with one element for each axis in the system, and is used for defining the
feedback acceleration value of the axis.
Tag
46
Accessibility
Read-Only
Related ACSPL+ Variables
FVEL
COM Library Methods
ReadVariable, GetAcceleration
C Library Functions
acsc_ReadReal, acsc_GetAcceleration

2.6.6 FPOS
Description
FPOS is a real array, with one element for each axis in the system, and is used for defining the
current feedback position for the motor.
Tag
52
Comments
The user can shift the origin of feedback position using SET.
The user can select the units of feedback position by setting the EFAC variable.
Accessibility
Read-Only
Related ACSPL+ Commands
SET
Related ACSPL+ Variables
APOS, RPOS
COM Library Methods
ReadVariable, GetFPosition, SetFPosition
C Library Functions
acsc_ReadReal, acsc_GetFPosition, acsc_SetFPosition

Version NT 2.20 218 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2.6.7 F2POS
Description
F2POS is a real array, with one element for each axis in the system, and is used for defining the
current secondary feedback value for the motor in user-defined units.
Tag
44
Comments
The user can shift the origin of secondary feedback position using SET.
The user can select the units of secondary feedback position by setting the E2FAC variable.
The application needs to explicitly clear IST(axis_index).#IND2 in order to resume the
latching logic.
Accessibility
Read-Only - Can be changed by SET.
Related ACSPL+ Commands
SET
Related ACSPL+ Variables
IST
COM Library Methods
ReadVariable
C Library Functions
acsc_ReadReal

2.6.8 FVEL
Description
FVEL is a real array, with one element for each axis in the system, the elements of which store
the measured velocity.
Tag
53
Accessibility
Read-Only
Related ACSPL+ Variables
FVFIL, RVEL, XVEL
COM Library Methods
ReadVariable, GetFVelocity

Version NT 2.20 219 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

C Library Functions
acsc_ReadReal, acsc_GetFVelocity

2.6.9 F2VEL
Description
F2VEL is a real array, with one element for each axis in the system, the elements of which store
the measured secondary velocity.
Tag
45
Accessibility
Read-Only
Related ACSPL+ Variables
FVFIL, RVEL, XVEL, FVEL
COM Library Methods
ReadVariable, GetFVelocity
C Library Functions
acsc_ReadReal, acsc_GetFVelocity

2.6.10 GACC
Description
GACC is a real array, with one element for each axis in the system, and is used for deriving the
vector acceleration of a group motion.
For example when the three axes 0, 1 and 2 are moving as a group, the GACC is calculated by:

2 2 2
GACC =  Acceleration 0  +  Acceleration 1  +  Acceleration 2 

Note
GPATH, GVEL, GACC, GJERK, GPHASE, and GRTIME are not updated
while the motion is in progress.

Tag
55
Accessibility
Read-Only

Version NT 2.20 220 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Related ACSPL+ Commands


GROUP
Related ACSPL+ Variables
GVEL, GJERK, GPATH, GPHASE, GRTIME
COM Library Methods
ReadVariable, GetAcceleration
C Library Functions
acsc_ReadReal, acsc_GetAcceleration

2.6.11 GJERK
Description
GJERK is a real array, with one element for each axis in the system, and is used for deriving
the vector acceleration of a group motion.
For example when the three axes 0, 1 and 2 are moving as a group, the GJERK is calculated by:

GJERK =  Jerk 0  2 +  Jerk 1  2 +  Jerk 2  2

Note
GPATH, GVEL, GACC, GJERK, GPHASE, and GRTIME are not
updated while the motion is in progress.

Tag
57
Accessibility
Read-Only
COM Library Methods
ReadVariable
C Library Functions
acsc_ReadReal

2.6.12 GMOT
Description
GMOT is an integer array, with one element for each axis in the system, and defines the ordinal
number of the current motion.

Version NT 2.20 221 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Tag
58
Comments
The GMOT value is valid only if one of the following is true:
 Single-axis motion in progress
 The axis is a leading axis in a group and motion in the group is in progress
After power-up, GMOT is zero and increments each time a motion of the corresponding
axis/axis group terminates.
GMOT resets to zero each time the axis group is created or split.
Accessibility
Read-Only.
Related ACSPL+ Commands
GROUP, SPLIT
COM Library Methods
ReadVariable
C Library Functions
acsc_ReadInteger

2.6.13 GMQU
Description
GMQU is an integer array, with one element for each axis in the system, and defines the total
number of motions in the motion queue including the currently executing motion. The
maximum motion queue per axis is 5.
Tag
59
Comments
GMQU is valid only if one of the following is true:
 Single-axis motion in progress
 The axis is a leading axis in a group and motion in the group is in progress
After power-up GMQU is zero. The variable is incremented by one each time a new motion of
the corresponding axis/axis group is issued. It is decremented by one each time a motion of the
corresponding axis/axis group terminates.
GMQU resets to zero each time an axis is regrouped, i.e., a group that contains the axis is
created or split-up.
Accessibility
Read-Only

Version NT 2.20 222 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

COM Library Methods


ReadVariable
C Library Functions
acsc_ReadInteger

2.6.14 GMTYPE
Description
GMTYPE is an integer array, with one element for each axis in the system. The MPU updates
GMTYPE each time a motion involving the corresponding axis or axis group starts or
terminates.
Tag
60
Comments
GMTYPE is updated according to the type of the motion as follows:
0 - no motion
1 - PTP motion
2 - MPTP...ENDS motion
3 - TRACK motion
4 - MSEG...ENDS motion
5 - JOG motion
6 - SLAVE motion
7 - PATH...ENDS motion
8 - PVSPLINE...ENDS motion
10 - XSEG...ENDS motion
Accessibility
Read-Only
COM Library Methods
ReadVariable
C Library Functions
acsc_ReadInteger

Version NT 2.20 223 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2.6.15 GPATH
Description
GPATH is a real array, with one element for each axis in the system. GPATH defines the
current path value, defined as the distance from the motion origin to the current motion point,
or in the case of Extended Segmented Motion, the distance from the beginning of the first
segment.
Tag
61
Comments
GPATH updates each MPU cycle if one of the following is true:
 Single-axis motion in progress
 The axis is a leading axis in a group and motion in the group is in progress
If either of these conditions is not true, GPATH retains its previous value.
For single-axis motion, GPATH defines a positive distance from the initial point of the motion.
If the axis is a leading axis, GPATH defines a vector distance along the trajectory from the
motion origin.

Note
GPATH, GVEL, GACC, GJERK, GPHASE, and GRTIME are not
updated while the motion is in progress.

Accessibility
Read-Only
COM Library Methods
ReadVariable
C Library Functions
acsc_ReadReal

2.6.16 GPHASE
Description
GPHASE is an integer array, with one element for each axis in the system. GPHASE defines
the current phase of a motion.
Tag
62

Version NT 2.20 224 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Comments
GPHASE can have the following values:
0 - no motion
1 - acceleration buildup
2 - constant acceleration
3 - acceleration finishing
4 - constant velocity
5 - deceleration buildup
6 - constant deceleration
7 - deceleration finishing
8 - kill deceleration
The following values apply only in the case of MASTER-SLAVE motion:
9 - asynchronous phase of master-slave motion
10 - synchronous phase of master-slave motion
11 - stalled phase of master-slave motion.
12 - dwell phase in JOG or MPTP...ENDS motions, or no defined target point in
PATH...ENDS, PVSPLINE...ENDS or MPTP...ENDS motions.

Note
GPATH, GVEL, GACC, GJERK, GPHASE, and GRTIME are not
updated while the motion is in progress.

Accessibility
Read-Only
COM Library Methods
ReadVariable
C Library Functions
acsc_ReadInteger

Version NT 2.20 225 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2.6.17 GRTIME
Description
GRTIME is a real array, with one element for each axis in the system. GRTIME defines an
estimated value of time (in milliseconds) remaining until the end of the current motion.
Tag
63
Comments
GRTIME updates each MPU cycle if one of the following is true:
 Single-axis motion in progress
 The axis is a leading axis in a group and motion in the group is in progress
GRTIME does not update if the motion is JOG or MASTER-SLAVE. If GRTIME does not
update, it retains its previous value.
Normally, 1-2 msec after motion starts, GRTIME accepts the correct value. In rare cases, the
GRTIME value remains high during motion phases 1 and 2, and accepts correct value at the
beginning of phase 3.

Note
GPATH, GVEL, GACC, GJERK, GPHASE, and GRTIME are not
updated while the motion is in progress.

Accessibility
Read-Only
COM Library Methods
ReadVariable
C Library Functions
acsc_ReadReal

2.6.18 GSEG
Description
GSEG is an integer array, with one element for each axis in the system. GSEG defines the
ordinal number of the currently executing segment.
Tag
64

Version NT 2.20 226 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Comments
GSEG updates only under one of the following conditions
 Single-axis motion in progress, or
 The axis is a leading axis in a group and motion in the group is in progress
If either of these conditions is not true, GSEG retains its previous value.
GSEG updates as follows:
 If the current motion in the axis/axis group is not MSEG...ENDS, the GSEG value is -1.
 The value resets to zero when a multi segment motion starts
 The value increments each time when the motion passes from one segment to the next.
 The value decrements each time the motion passes from one segment to the previous
(possible only in master-slave motion).
 Because the motion returns to the start point in cyclic motion, GSEG may appear greater
than the number of a segment in the motion, if the motion overruns the segment sequence
in positive direction.
 For master-slave cyclic motion, GSEG may appear negative, if the motion overruns the
segment sequence in a negative direction.
Accessibility
Read-Only
COM Library Methods
ReadVariable
C Library Functions
acsc_ReadInteger

2.6.19 GSFREE
Description
GSFREE is an integer array, with one element for each axis in the system. GSFREE is updated
for the leading axis with the number of free cells in the segment queue.
Tag
65
Comments
If GSFREE is zero, the segment queue is full and the next coming POINT or MPOINT
command will be delayed until the required number of cells are freed.
Accessibility
Read-Only
Related ACSPL+ Variable
GSEG

Version NT 2.20 227 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

COM Library Methods


ReadVariable
C Library Functions
acsc_ReadInteger

2.6.20 GVEC
Description
GVEC is a real array, with one element for each axis in the system. GVEC is updated each
MPU cycle, if a motion involving the axis is in progress. If the motion is not in progress, GVEC
retains its previous value.
Tag
66
Comments
In single-axis motion, GVEC = 1 or -1, depending on the motion direction.
In multi-axis group motion, GVEC values for all axes in the group are updated each MPU cycle
and together build up a tangent vector for the motion trajectory.
GVEC can also be used for retrieving a tangent vector.
Accessibility
Read-Only
COM Library Methods
ReadVariable
C Library Functions
acsc_ReadReal

2.6.21 GVEL
Description
GVEL is a real array, with one element for each axis in the system, and is used for deriving the
vector velocity of a group motion.
For example when the three axes 0, 1 and 2 are moving as a group, the GVEL is calculated by:

2 2 2
GVEL =  Velocity 0  +  Velocity 1  +  Velocity 2 

Version NT 2.20 228 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Note
GPATH, GVEL, GACC, GJERK, GPHASE, and GRTIME are not
updated while the motion is in progress.

Tag
67
Accessibility
Read-Only
COM Library Methods
ReadVariable
C Library Functions
acsc_ReadReal

2.6.22 JERK
Description
JERK is a real array, with one element for each axis in the system, and is used for defining the
jerk of the motion profile.
Syntax
JERK(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges from 2.22507e-308 to 1.79769e+308, Default = 2e+007.

Tag
80
Comments
For single-axis motion, JERK defines the axis jerk. If the axis is a leading axis in a group,
JERK defines vector jerk of the common motion.
If JERK is changed when a motion is in progress, the change does not affect currently
executing motions, or motions that were created before the change.
Accessibility
Read-Write

Version NT 2.20 229 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Note
JERK values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Commands


IMM, and all motion commands where the profile is generated by the controller.
Related ACSPL+ Variables
ACC, DEC, KDEC, VEL
COM Library Methods
ReadVariable, WriteVariable, GetJerk, SetJerk, SetJerkImm
C Library Functions
acsc_ReadReal, acsc_WriteReal, acsc_GetJerk, SetJerk, acsc_SetJerkImm

2.6.23 KDEC
Description
KDEC is a real array, with one element for each axis in the system, and is used for defining
deceleration when a motion is killed by the user or fails due to a fault.
Syntax
KDEC(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges from 2.22507e-308 to 1.79769e+308, Default = 100000.

Tag
81
Comments
For single-axis motion, the value defines axis deceleration. If the axis is a leading axis in a
group, KDEC defines the vector deceleration when the common motion is killed or fails.
If KDEC is changed when a motion is in progress, the change does not affect currently
executing or motions that were created before the change.
Accessibility
Read-Write

Version NT 2.20 230 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Note
KDEC values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Variables


ACC, DEC, JERK, VEL
COM Library Methods
ReadVariable, WriteVariable, SetKillDeceleration, GetKillDeceleration,
SetKillDecelerationImm
C Library Functions
acsc_ReadReal, acsc_WriteReal, acsc_SetKillDeceleration, acsc_GetKillDeceleration,
acsc_SetKillDecelerationImm

2.6.24 MPOS
Description
MPOS is a real array, with one element for each axis in the system, and defines the current
master position value for the axis in user units.
Tag
89
Comments
MASTER must precede MPOS for the specified axis. MPOS updates each controller cycle
according to the formula specified in MASTER.
Accessibility
Read-Only
Related ACSPL+ Commands
MASTER, SLAVE
Related ACSPL+ Variables
FPOS, F2POS, APOS
COM Library Methods
ReadVariable, SetMaster, Slave
C Library Functions
acsc_ReadReal, acsc_SetMaster, acsc_Slave

Version NT 2.20 231 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2.6.25 NVEL
Description
NVEL is a real array, with one element for each axis in the system, and is used for specifying
the start velocity for an axis in stepper motor applications.
Syntax
NVEL(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges from 0 to 1.79769e+308, Default = 0.

Tag
91
Comments
1. An NVEL element affects the motion of the corresponding axis and the multi-axis motions
if the axis is a leading axis in the group.
2. If an element is zero, the normal motion profile starts from zero velocity and finishes at
zero velocity.
If an element is non-zero, at the beginning of motion the velocity immediately jumps to the
NVEL value and then continues the regular motion profile. At the end of the motion, the
motion approaches the final point at the velocity specified by NVEL, and then immediately
drops to zero. For example, KILL and HALT slow the velocity to the value specified in
NVEL, and then the velocity drops to zero.
Accessibility
Read-Write

Note
NVEL values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Commands


IMM, and all motion commands where the profile is generated by the controller.
Related ACSPL+ Variables
VEL
COM Library Methods
ReadVariable, WriteVariable

Version NT 2.20 232 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

C Library Functions
acsc_ReadReal, acsc_WriteReal

2.6.26 PE
Description
PE is a real array, with one element for each axis in the system, and is used for displaying the
difference between RPOS and FPOS (the current position error) denoting a noncritical position
error.

Note
The PE value is valid only if the motor is enabled.

Tag
98
Accessibility
Read-Only
Related ACSPL+ Commands
All motion commands.
Related ACSPL+ Variables
FPOS, RPOS, FAULT
COM Library Methods
ReadVariable
C Library Functions
acsc_ReadReal

2.6.27 RACC
Description
RACC is a real array, with one element for each axis in the system, and defines the current
reference acceleration value for the motor in user-defined units.
Tag
106
Comments
RACC updates each controller cycle, and is calculated by digital differentiation of RVEL.
Accessibility
Read-Only

Version NT 2.20 233 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Related ACSPL+ Commands


All motion related commands.
Related ACSPL+ Variables
RVEL, RPOS
COM Library Methods
ReadVariable
C Library Functions
acsc_ReadReal

2.6.28 ROFFS
Description
ROFFS is a real array, with one element for each axis in the system, the elements of which store
the Reference Offset.
Tag
107
Comments
As long as the motor is in the default connection (MFLAGS(axis).#DEFCON = 1), offset
ROFFS is zero. Once a user specifies connect formula such as:
CONNECT RPOS(0) = F(…)
the controller calculates offset ROFFS(0) to prevent a sudden change in RPOS(0) that may
cause the motor to jump. The controller then calculates:
RPOS(0) = F(…) + ROFFS(0)
each controller cycle.
The controller recalculates ROFFS to prevent motor jump when the commands CONNECT,
SET, ENABLE/ENABLEALL, DISABLE, KILL are executed. ROFFS reads the current
value of the offset.

Note
Watching the ROFFS value facilitates development and debugging of
applications with complex kinematics.

Accessibility
Read-Only
Related ACSPL+ Commands
CONNECT, SET, ENABLE/ENABLEALL, DISABLE, KILL

Version NT 2.20 234 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Related ACSPL+ Variables


MFLAGS(axis_index).#DEFCON (bit 17 = Default Connection)
COM Library Methods
ReadVariable
C Library Functions
acsc_ReadReal

2.6.29 RPOS
Description
RPOS is real array, with one element for each axis in the system, the elements of which store
the current desired motor reference position.
Tag
108
Comments
RPOS updates each MPU cycle according to the connection specified for the motor, see
CONNECT.
When the motor is disabled, RPOS = FPOS.
Accessibility
Read-Only
Related ACSPL+ Commands
SET, CONNECT, and all motion commands.
Related ACSPL+ Variables
FPOS, RVEL, RACC
COM Library Methods
ReadVariable, GetRPosition, SetRPosition
C Library Functions
acsc_ReadReal, acsc_GetRPosition, acsc_SetRPosition

2.6.30 RVEL
Description
RVEL is a real array, with one element for each axis in the system, the elements of which store
the current motor reference velocity in user-defined units.
Tag
109
Accessibility
Read-Only

Version NT 2.20 235 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Related ACSPL+ Commands


All motion commands.
Related ACSPL+ Variables
RPOS, RACC, FVEL
COM Library Methods
ReadVariable, GetRVelocity
C Library Functions
acsc_ReadReal, acsc_GetRVelocity

2.6.31 TPOS
Description
TPOS is a real array, with one element for each axis in the system, and is used for defining or
updating the target position in TRACK motion.
Syntax
TPOS(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges from -1.79769e+308 to 1.79769e+308, Default = 0.

Tag
135
Comments
The controller update occurs as follows:
 When the controller executes PTP motion, the axes’ target coordinates are stored in the
TPOS elements.
 During MPTP...ENDS motion, the controller updates the target coordinates each time
motion to the next point starts.
 When the controller executes TRACK motion, the axes’ target coordinates are stored in
the TPOS elements.
Accessibility
Read-Write

Version NT 2.20 236 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Note
TPOS values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Commands


TRACK
COM Library Methods
ReadVariable, WriteVariable, Track
C Library Functions
acsc_ReadReal, acsc_WriteReal, acsc_Track

2.6.32 VEL
Description
VEL is a real array, with one element for each axis in the system, and is used for defining the
default velocity of the motion profile. If a motion command does not specify a specific velocity,
the default value is used.
Syntax
VEL(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges from -1.79769e+308 to 1.79769e+308, Default = 10000.

Tag
139
Comments
For single-axis motion, the value defines axis velocity. If the axis is a leading axis in a group,
its value defines a vector velocity of common motion.
If VEL is changed when a motion is in progress, the change does not affect currently executing
motions or motions that were created before the change.
Accessibility
Read-Write

Version NT 2.20 237 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Note
VEL values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Commands


IMM, and all motion commands where the profile is generated by the controller.
Related ACSPL+ Variables
ACC, DEC, JERK, KDEC,
COM Library Methods
ReadVariable, WriteVariable, SetVelocity, GetVelocity, SetVelocityImm
C Library Functions
acsc_ReadReal, acsc_WriteReal, acsc_SetVelocity, acsc_GetVelocity, acsc_SetVelocityImm

2.7 Program Execution Control Variables


The Program Execution Control variables are:

Name Description
ONRATE Autoroutine Rate
PCHARS Program Size in Characters
PERL Program Error Line
PERR Program Error
PEXL Executed Line
PFLAGS Program Flags
PLINES Number of Lines
PRATE Program Rate
PST Program State

2.7.1 ONRATE
Description
ONRATE is an integer array with one element for each program buffer plus one for the D-
Buffer and is used for controlling the autoroutine execution rate.
Syntax
ONRATE(buffer_index) = value

Version NT 2.20 238 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Arguments

buffer_index buffer index - a number between 0 and the total number of buffers minus
one (the highest number is that of the D-Buffer).
value value ranges from 1 to 10, Default = 1.

Tag
93
Comments
ONRATE is set through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Program Manager  Program Buffer Parameters.
When an autoroutine executes in the program buffer, the execution rate is ONRATE lines per
each MPU cycle. The normal rate of program execution (when no autoroutine is activated) is
defined by PRATE.
Accessibility
Read-Write

Note
ONRATE values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger

2.7.2 PCHARS
Description
PCHARS is an integer array with one element for each program buffer plus one for the D-
Buffer that stores the total number of characters stored in the buffer.
Tag
95
Accessibility
Read-Only
COM Library Methods
ReadVariable

Version NT 2.20 239 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

C Library Functions
acsc_ReadInteger

2.7.3 PERL
Description
PERL is an integer array with one element for each program buffer plus one for the D-Buffer
that stores the line number where the error occurred.
Tag
99
Comments
If an error occurs during ACSPL+ program execution, the controller stores the line number
where the error occurred in the corresponding element of the PERL array.
Accessibility
Read-Only
Related ACSPL+ Variables
PERR
COM Library Methods
ReadVariable, GetProgramError
C Library Functions
acsc_ReadInteger, acsc_GetProgramError

2.7.4 PERR
Description
PERR is an integer array with one element for each program buffer plus one for the D-Buffer
that stores an error code.
Tag
100
Comments
If an error occurs during ACSPL+ program execution, the controller stores the error code in the
corresponding element of the PERR array.
Accessibility
Read-Only
Related ACSPL+ Variables
PERL
COM Library Methods
ReadVariable, GetProgramError

Version NT 2.20 240 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

C Library Functions
acsc_ReadInteger, acsc_GetProgramError

2.7.5 PEXL
Description
PEXL is an integer array with one element for each program buffer plus one for the D-Buffer
that stores the number of the currently executed line.
Tag
101
Comments
PEXL stores the number of the currently executed line in the buffer. If the program has not
executed, the variable reads zero.
Accessibility
Read-Only
Related ACSPL+ Variables
PERL, PERR
COM Library Methods
ReadVariable
C Library Functions
acsc_ReadInteger

2.7.6 PFLAGS
Description
PFLAGS is an integer array with one element for each program buffer plus one for the D-
Buffer, each element of which contains a set of bits that defines the behavior of the program
buffer.
Syntax
PFLAGS(buffer_index).(bit) = 0|1
Arguments

buffer_index buffer index - a number between 0 and 16 (16 being the D-Buffer).
bit See Table 39

Version NT 2.20 241 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Table 39 PFLAGS Bit Description


Bit Name No. Description
#NOAUTO 0 0 (default): Autoroutines (if exist in the buffer) are enabled.
1: Autoroutines (if exist in the buffer) are disabled.
#NOEDIT 1 0 (default): User program can be viewed and edited.
1: User program can be viewed but cannot be edited, see PROTECT
Terminal command.
#DYNAMIC 2 0 (default): Buffer works in normal order.
1: Not applicable (obsolete option)
#PRIVLG 4 0 (default): Buffer works in normal order.
1: Sets the buffer as privileged which means that the program in the buffer
can change the values of protected variables, start and stop other ACSPL+
programs, and execute any other action that in a regular buffer would
cause a protection violation.
#DEBUG 5 0 (default): Buffer works in normal order.
1: Not applicable (obsolete option)
#NOVIEW 6 0 (default): The program is visible in the buffer.
1: The program in the buffer hidden from being viewed.

Tag
102
Accessibility
Read-Write

Note
PFLAGS values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Commands


PROTECT
COM Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger

2.7.7 PLINES
Description
PLINES is an integer array with one element for each program buffer plus one for the D-Buffer
each element of which contains the total number of lines stored in the associated buffer.

Version NT 2.20 242 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Tag
103
Accessibility
Read-Only
Related ACSPL+ Variables
PCHARS
COM Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger

2.7.8 PRATE
Description
PRATE is an integer array with one element for each program buffer plus one for the D-Buffer
each element of which is used for defining the program execution rate for the given buffer.
Syntax
PRATE(buffer_index) = value
Arguments

buffer_index buffer index - a number between 0 and 16 (16 being the D-Buffer).
value value ranges from 1 to 10, Default = 1.

Tag
104
Comments
PRATE is set through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Program Manager  Program Buffer Parameters.
PRATE defines the program execution rate. The execution rate is PRATE lines per each MPU
cycle.
PRATE is used only if no autoroutine is activated in the buffer. While an autoroutine is
executed, ONRATE defines execution rate.
For example, if the controller is configured so that PRATE(2) is 1, but ONRATE(2) is 4, the
program in Buffer 2 will be executed one line per one controller cycle, and any autoroutine
specified in Buffer 2 that interrupts the program will be executed four lines per one controller
cycle. When the RET command that terminates the autoroutine is executed, the controller
switches back to the rate of one line per one cycle.

Version NT 2.20 243 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Accessibility
Read-Write

Note
PRATE values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Variables


ONRATE
COM Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger

2.7.9 PST
Description
PST is an integer array with one element for each program buffer plus one for the D-Buffer each
element of which contains a set of bits that display the current state of the given program buffer.
The PST bits are detailed in Table 40.

Table 40 PST Bit Description


Bit Name No. Description
#COMPILED 0 0: Program in buffer is not compiled
1: Program in buffer is compiled
#RUN 1 0: Program is not running.
1: Program is running.
#SUSPEND 2 0: Program in buffer is not suspended.
1: Program is suspended after STEP or due to a breakpoint in debug
mode.
#DEBUG 5 0: Buffer works in normal order (default).
1: Not applicable (obsolete option)
#AUTO 7 0: Autoroutine is not running
1: Autoroutine is running.

Tag
105
Accessibility
Read-Only

Version NT 2.20 244 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

COM Library Methods


ReadVariable, GetProgramState
C Library Functions
acsc_ReadInteger, acsc_GetProgramState

2.8 Safety Control Variables


The Safety Control variables are:

Name Description
AERR Axis Error
CERRA Critical Position Error (Accelerating)
CERRI Critical Position Error (Idle)
CERRV Critical Position Error (Velocity)
DELI Delay on Transition to Idle State
DELV Delay on Transition to Velocity State
FAULT Faults
ECST Contains Ethernet status
ECERR Contains Ethernet error code
FDEF Default Response Mask
FMASK Fault Mask
MERR Motor Error
SAFIN Safety Inputs
SAFINI Safety Inputs Inversion
S_ERR System Error
S_FAULT System Faults
S_FDEF System Default Response Mask
S_FMASK System Fault Mask
S_SAFIN System Safety Inputs
S_SAFINI System Safety Inputs Inversion
SYNC Slave synchronization indicator

Version NT 2.20 245 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2.8.1 AERR
Description
AERR is an integer array, with one element for each axis in the systems, the elements of which
store the termination codes.
Tag
2
Comments
When a motion starts, the controller zeroes the AERR elements for each axis involved in the
motion. When the motion terminates for any reason, the controller stores the termination code
in the corresponding AERR element. The element remains unchanged until the next motion
starts for the corresponding axis.
Single-axis motion stores its termination code in the AERR element that corresponds to the
axis. Multi-axis motion stores its termination code in the AERR element that corresponds to
the leading axis of the motion.
Accessibility
Read-Only
Related ACSPL+ Variables
MERR
COM Library Methods
ReadVariable, GetMotionError
C Library Functions
acsc_ReadInteger, acsc_GetMotionError

2.8.2 ECERR
Description
ECERR is a scalar variable containing an EtherCAT error code. The EtherCAT error codes are
given in Table 83.
Syntax
ECERR
Arguments
None
Tag
239
Comments
Any EtherCAT error sets ECST.#OP to false and the error code is latched in ECERR.
Accessibility
Read-Only

Version NT 2.20 246 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

COM Library Methods


ReadVariable
C Library Functions
acsc_ReadInteger

2.8.3 ECST
Description
ECST is a scalar variable affecting the EtherCAT state. The EtherCAT state is reflected in the
first six bits as given in Table 41.

Table 41 ECST Bits


Bit Designator Description
0 #SCAN The scan process was performed successfully, that is, the
Master was able to detect what devices are connected to
it.
1 #CONFIG There is no deviation between XML and actual setup.
The Master succeeded to initialize the network by steps
described in configuration file.
2 #INITOK All bus devices are successfully set to INIT state. The
Master started all devices to the initial state.
3 #CONNECTED Indicates valid Ethernet cable connection to the master.
The physical link of EtherCAT cable is OK on the Master
side.
4 #INSYNC If DCM is used, indicates synchronization between the
Master and the bus.
5 #OP The EtherCAT bus is operational. The Master
successfully turned each Slave into full operational mode
and the bus is ready for full operation.
6 #DCSYNC Distributed clocks are synchronized.

Syntax
ECST.bit_designator = 1|0
Arguments
None
Tag
238
Comments
All bits (except #INSYNC in some cases) should be true for proper bus functioning.
For monitoring the bus state, checking bit #OP is sufficient. Any bus error will reset the #OP bit.
Accessibility
Read-Only

Version NT 2.20 247 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

COM Library Methods


ReadVariable
C Library Functions
acsc_ReadInteger

2.8.4 FAULT
Description
FAULT is an integer array, with one element for each axis in the systems, the elements of
which contain a set of bits that stores axis-related fault bits
The fault bits are detailed in Table 42.

Table 42 Axis Fault Bits (page 1 of 2)


Bit Fault Fault Description
0 #RL HARDWARE RIGHT LIMIT.
1 = Right limit switch is activated.
1 #LL HARDWARE LEFT LIMIT.
1 = Left limit switch is activated.
2 #NT NETWORK ERROR.
1 = EtherCAT network error is activated.
4 #HOT MOTOR OVERHEAT.
1 = Motor's temperature sensor indicates overheat.
5 #SRL SOFTWARE RIGHT LIMIT.
1 = Axis reference position (RPOS) is greater than the software right limit margin
(SRLIMIT).
6 #SLL SOFTWARE LEFT LIMIT.
1 = Axis reference position (RPOS) is less than the software left limit margin
(SLLIMIT).
7 #ENCNC ENCODER NOT CONNECTED.
1 = Primary encoder (for digital encoder type only) is not connected.
8 #ENC2NC ENCODER 2 NOT CONNECTED.
1 = Secondary encoder (for digital encoder type only) is not connected.
9 #DRIVE DRIVE ALARM.
1 = Signal from the drive reports a failure.
10 #ENC ENCODER ERROR.
1 = Primary encoder miscounts.
11 #ENC2 ENCODER 2 ERROR.
1 = Secondary encoder miscounts.

Version NT 2.20 248 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Table 42 Axis Fault Bits (page 2 of 2)


Bit Fault Fault Description
12 #PE POSITION ERROR.
1 = Position error (PE) has occurred.

PE is defined by the following variables:


 ERRI - Maximum position error while the axis is idle
 ERRV - Maximum position error while the axis is moving with constant
velocity
 ERRA - Maximum position error while the axis is accelerating or
decelerating
 DELI - Delay on transition from ERRA to ERRI
 DELV - Delay on transition from ERRA to ERRV
13 #CPE CRITICAL POSITION ERROR.
1 = Position error (#PE) exceeds the value of the critical limit.

#CPE errors occur outside normal range of operation and #CPE > #PE.
The critical limit depends on the axis state and is defined by the following
variables:
 CERRI if the axis is idle (not moving)
 CERRV if the axis is moving with constant velocity
 CERRA if the axis is accelerating or decelerating
 DELI - Delay on transition from ERRA to ERRI
 DELV - Delay on transition from ERRA to ERRV
14 #VL VELOCITY LIMIT.
1 = Absolute value of the reference velocity (RVEL) exceeds the limit defined
by the XVEL parameter.
15 #AL ACCELERATION LIMIT.
1 = Absolute value of the reference acceleration (RACC) exceeds the limit
defined by the XACC parameter.
16 #CL CURRENT LIMIT.
1 = RMS current calculated in the Servo Processor exceeds the limit value
defined by the XRMS parameter.
17 #SP SERVO PROCESSOR ALARM.
1 = Axis Servo Processor loses its synchronization with the MPU. The fault
indicates a fatal problem in the controller.
20 #HSSINC HSSI NOT CONNECTED.
1 = HSSI module is not connected.

Tag
47
Comments
FAULT indicates axis related fault bits as detected by the safety mechanism. When each of the
faults is active (such as Left Limit), the corresponding fault bit becomes = 1 while the fault is
active, and automatically reverts to 0 when the fault is no longer active.
 Each fault can be masked by FMASK.

Version NT 2.20 249 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

 The logic of some faults can be inverted by SAFINI.


 The default response of each fault can be disabled by FDEF. In this case, any customized
default response can be implemented by autoroutines - see ON...RET.
For a list of S_FAULT related system fault bits see Table 47.

Version NT 2.20 250 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Accessibility
Read-Only

Note
FAULT values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Variables


S_FAULT, FDEF, S_FDEF, FMASK, S_FMASK, SAFIN, S_SAFIN, SAFINI, S_SAFINI
COM Library Methods
ReadVariable, GetFault
C Library Functions
acsc_ReadInteger, acsc_GetFault

2.8.5 FDEF
Description
FDEF is an integer array, with one element for each axis in the system, the elements of which
contain a set of bits used for setting a default response to an axis fault.
Syntax
FDEF(axis_index)[.bit_designator] = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
bit_designator The FDEF bit designators are given in Table 43.
value value ranges from -2147483648 to 2147483647, Default = -1.

Table 43 FDEF Bit Description (page 1 of 4)


Bit Fault Fault Description Default Response (FDEF)
0 #RL HARDWARE RIGHT LIMIT The controller kills the violating axis.
1 = Right limit switch is activated. As long as the fault is active, the
controller kills any motion that tries to
move the axis in the direction of the
limit; however, motion within the
permissible range is allowed.
1 #LL HARDWARE LEFT LIMIT Same as for #RL.
1 = Left limit switch is activated.

Version NT 2.20 251 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Table 43 FDEF Bit Description (page 2 of 4)


Bit Fault Fault Description Default Response (FDEF)
2 #NT NETWORK ERROR Halts all program buffers and waits for
1 = EtherCAT network error detected. receipt of network Sync signal.
4 #HOT MOTOR OVERHEAT None.
1 = Motor's temperature sensor
indicates overheat.
5 #SRL SOFTWARE RIGHT LIMIT The controller kills the violating axis. As
1 = Axis reference position (RPOS) is long as the fault is active, the controller
greater than the software right limit kills any motion that tries to move the
margin (SRLIMIT). axis in the direction of the limit. Motion
in the direction out of the limit is
allowed.
6 #SLL SOFTWARE LEFT LIMIT Same as #SRL.
1 = Axis reference position (RPOS) is
less than the software left limit
margin (SLLIMIT).
7 #ENCNC ENCODER NOT CONNECTED The controller disables the violating
1 = Primary encoder (for digital encoder axis.
type only) is not connected.
8 #ENC2NC ENCODER 2 NOT CONNECTED No default response.
1 = Secondary encoder (for digital
encoder type only) is not
connected.
9 #DRIVE DRIVE FAULT The controller disables the violating
1 = Signal from the drive reports a axis.
failure. This fault is only detected when the axis
is enabled. To catch this fault in an
ACSPL+ program, write an autoroutine.
10 #ENC ENCODER ERROR The controller disables the violating
1 = Primary encoder miscounts. axis. The faults remain active until the
user resolves the problems and enables
the axis again or executes FCLEAR.
11 #ENC2 ENCODER 2 ERROR Same as #ENC.
1 = Secondary encoder miscounts.

Version NT 2.20 252 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Table 43 FDEF Bit Description (page 3 of 4)


Bit Fault Fault Description Default Response (FDEF)
12 #PE POSITION ERROR. None.
1 = Position error (PE) has occurred.

PE is defined by the following


variables:
 ERRI - Maximum position error
while the axis is idle
 ERRV - Maximum position error
while the axis is moving with
constant velocity
 ERRA - Maximum position error
while the axis is accelerating or
decelerating
 DELI - Delay on transition from
ERRA to ERRI
 DELV - Delay on transition from
ERRA to ERRV
13 #CPE CRITICAL POSITION ERROR The controller disables the violating
1 = Position error (#PE) exceeds the axis.
value of the critical limit.

#CPE errors occur outside normal range


of operation and #CPE > #PE.
The critical limit depends on the axis
state and is defined by the following
variables:
 CERRI if the axis is idle (not
moving)
 CERRV if the axis is moving with
constant velocity
 CERRA if the axis is accelerating
or decelerating
 DELI - Delay on transition from
ERRA to ERRI
 DELV - Delay on transition from
ERRA to ERRV
14 #VL VELOCITY LIMIT The controller kills the violating axis.
1 = Absolute value of the reference
velocity (RVEL) exceeds the limit
defined by the XVEL parameter.
15 #AL ACCELERATION LIMIT The controller kills the violating axis.
1 = Absolute value of the reference
acceleration (RACC) exceeds the
limit defined by the XACC
parameter.

Version NT 2.20 253 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Table 43 FDEF Bit Description (page 4 of 4)


Bit Fault Fault Description Default Response (FDEF)
16 #CL CURRENT LIMIT The controller disables the violating
1 = RMS current calculated in the axis.
Servo Processor exceeds the limit
value defined by the XRMS
parameter.
17 #SP SERVO PROCESSOR ALARM The controller disables the violating axis
1 = Axis Servo Processor loses its and kills the motion that involves the
synchronization with the MPU. axis.
The fault indicates a fatal problem
in the controller.
20 #HSSINC HSSI NOT CONNECTED None.
1 = HSSI module is not connected.

Tag
48
Comments
When an FDEF bit = 1, the controller executes the default response when the corresponding
fault occurs. If the FDEF bit = 0, the default response is disabled.
Not every fault has a default response. For a fault that has no default response, the
corresponding FDEF bit is inoperative.
Accessibility
Read-Write

Note
FDEF values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Variables


FAULT, S_FAULT, S_FDEF, FMASK, S_FMASK, SAFIN, S_SAFIN, SAFINI,
S_SAFINI
COM Library Methods
ReadVariable, WriteVariable, GetResponseMask, SetResponseMask, GetFaultMask,
SetFaultMask
C Library Functions
acsc_ReadInteger, acsc_WriteInteger, acsc_GetResponseMask, acsc_SetResponseMask,
acsc_GetFaultMask, acsc_SetFaultMask

Version NT 2.20 254 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2.8.6 FMASK
Description
FMASK is an integer array, with one element for each axis in the system, the elements of which
contain a set of bits used for enabling or disabling each axis fault bit.
Syntax
FMASK(axis_index)[.bit_designator] = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
bit_designator The FDEF bit designators are given in Table 44.
value value ranges from -2147483648 to 2147483647, Default=1040414435.

Table 44 FMASK Bit Description (page 1 of 2)


Bit Fault Fault Description
0 #RL HARDWARE RIGHT LIMIT
1 = Right limit switch is activated.
1 #LL HARDWARE LEFT LIMIT
1 = Left limit switch is activated.
2 #NT NETWORK ERROR
1 = EtherCAT network error detected.
4 #HOT MOTOR OVERHEAT
1 = Motor's temperature sensor indicates overheat.
5 #SRL SOFTWARE RIGHT LIMIT
1 = Axis reference position (RPOS) is greater than the software right limit margin
(SRLIMIT).
6 #SLL SOFTWARE LEFT LIMIT
1 = Axis reference position (RPOS) is less than the software left limit margin
(SLLIMIT).
7 #ENCNC ENCODER NOT CONNECTED
1 = Primary encoder (for digital encoder type only) is not connected.
8 #ENC2NC ENCODER 2 NOT CONNECTED
1 = Secondary encoder (for digital encoder type only) is not connected.
9 #DRIVE DRIVE FAULT
1 = Signal from the drive reports a failure.
10 #ENC ENCODER ERROR
1 = Primary encoder miscounts.
11 #ENC2 ENCODER 2 ERROR
1 = Secondary encoder miscounts.

Version NT 2.20 255 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Table 44 FMASK Bit Description (page 2 of 2)


Bit Fault Fault Description
12 #PE POSITION ERROR
1 = Position error (PE) has occurred.

PE is defined by the following variables:


 ERRI - Maximum position error while the axis is idle
 ERRV - Maximum position error while the axis is moving with constant
velocity
 ERRA - Maximum position error while the axis is accelerating or decelerating
 DELI - Delay on transition from ERRA to ERRI
 DELV - Delay on transition from ERRA to ERRV
13 #CPE CRITICAL POSITION ERROR
1 = Position error (#PE) exceeds the value of the critical limit.

#CPE errors occur outside normal range of operation and #CPE > #PE.
The critical limit depends on the axis state and is defined by the following
variables:
 CERRI if the axis is idle (not moving)
 CERRV if the axis is moving with constant velocity
 CERRA if the axis is accelerating or decelerating
 DELI - Delay on transition from ERRA to ERRI
 DELV - Delay on transition from ERRA to ERRV
14 #VL VELOCITY LIMIT
1 = Absolute value of the reference velocity (RVEL) exceeds the limit defined by
the XVEL parameter.
15 #AL ACCELERATION LIMIT
1 = Absolute value of the reference acceleration (RACC) exceeds the limit defined
by the XACC parameter.
16 #CL CURRENT LIMIT
1 = RMS current calculated in the Servo Processor exceeds the limit value defined
by the XRMS parameter.
17 #SP SERVO PROCESSOR ALARM
1 = Axis Servo Processor loses its synchronization with the MPU. The fault
indicates a fatal problem in the controller.
20 #HSSINC HSSI NOT CONNECTED
1 = HSSI module is not connected.

Tag
51
Comments
The default value = 1 and causes the controller to check for the fault associated with that bit, as
follows:
0 = the corresponding FAULT bit is disabled.
1 = the corresponding FAULT is enabled and examined each MPU cycle.

Version NT 2.20 256 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Accessibility
Read-Write

Note
FMASK values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Variables


FAULT, S_FAULT, S_FDEF, S_FMASK, SAFIN, S_SAFIN, SAFINI, S_SAFINI
COM Library Methods
ReadVariable, WriteVariable, GetResponseMask, SetResponseMask, GetFaultMask,
SetFaultMask
C Library Functions
acsc_ReadInteger, acsc_WriteInteger, acsc_GetResponseMask, acsc_SetResponseMask,
acsc_GetFaultMask, acsc_SetFaultMask

2.8.7 MERR
Description
MERR is an integer array, with one element for each axis in the system, the elements of which
store a code indicating the termination cause of the last motion of an axis.
The MERR return values are listed in Table 45.

Table 45 MERR Return Values (page 1 of 2)


Error Code Description
0 Motor Enabled, in motion, or motion terminated by the user using KILL, HALT, or
DISABLE.
5003 Motion was terminated by user
5007 Motor was disabled due to a generalized fault
5008 Motor was killed due to a generalized fault
5010 Motor failed: Hardware Right Limit
5011 Motor failed: Hardware Left Limit
5014 Motor failed: Motor Overheat
5015 Motor failed: Software Right Limit
5016 Motor failed: Software Left Limit
5017 Motor failed: Encoder Not Connected
5018 Motor failed: Encoder 2 Not Connected
5019 Motor Failed: Drive Fault

Version NT 2.20 257 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Table 45 MERR Return Values (page 2 of 2)


Error Code Description
5020 Motor Failed: Encoder Alarm
5021 Motor Failed: Encoder 2 Alarm
5022 Motor Failed: Position Error
5023 Motor Failed: Critical Position Error
5024 Motor Failed: Velocity Limit
5025 Motor Failed: Acceleration Limit
5026 Motor Failed: Overcurrent
5027 Motor Failed: Servo Processor Alarm
5032 Motor Failed: Attempt of motion while a fault is active
5033 Motor Failed: Attempt of motion in disabled direction
5035 Motor Failed: Program Error
5036 Motor Failed: Memory Overflow
5037 Motor Failed: MPU Overuse
5038 Motor Failed: Hardware Emergency Stop
5039 Motor Failed: Servo Interrupt
5060 (Integrated Control Models only) Drive alarm: No fault
5061 (Integrated models only) Drive alarm: Short Circuit
5062 (Integrated Control Models only) Drive alarm: External Protection Activated
5063 (Integrated Control Models only) Drive alarm: Power supply too low
5064 (Integrated Control Models only) Drive alarm: Power supply too high
5065 (Integrated Control Models only) Drive alarm: Temperature too high
5066 (Integrated Control Models only) Drive alarm: Power supply 24VF1
5067 (Integrated Control Models only) Drive alarm: Power supply 24VF2.
5068 (Integrated Control Models only) Drive alarm: Emergency Stop
5069 (Integrated models only) Drive alarm: Power down
5070 Phase lost.
5071 Drive not ready (power up).
5072 Over-current.
5073 Not in used (reserved).
5074 Damper not ok.
5075 (Integrated Control Models only) Drive alarm: Digital drive interface not connected.

Tag
86
Comments
MERR is updated every time the axis motion is terminated. MERR stores the last termination
code until either FCLEAR or ENABLE/ENABLEALL is executed.

Version NT 2.20 258 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Accessibility
Read-Only
Related ACSPL+ Commands
FCLEAR
Related ACSPL+ Variables
AERR, PERR
COM Library Methods
ReadVariable, GetMotorError
C Library Functions
acsc_ReadInteger, acsc_GetMotorError

2.8.8 SAFIN
Description
SAFIN is an integer array, with one element for each axis in the system, the elements of which
contain a set of bits that indicates the raw state, before processing, of the axis safety inputs.
The value of each element in the array ranges from -2147483648 to 2147483647, Default=0.
Tag
121
Comments
1. The SAFIN uses the same bit numbers as in S_SAFIN and as the corresponding faults in
FAULT and S_FAULT.
2. SAFIN is normally read-only. However, when working with the Simulator, read/write is
permitted to simulate safety inputs.
3. Only the SAFIN bits below are valid.

Bit Name No. Description


#RL 0 Hardware Right Limit
#LL 1 Hardware Left Limit
#HOT 4 Motor Overheat
#DRIVE 9 Drive Fault

Accessibility
Read-Only

Version NT 2.20 259 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Note
SAFIN can be written to when working with the SPiiPlus Simulator.

Related ACSPL+ Variables


FAULT, S_FAULT, FDEF, S_FDEF, FMASK, S_FMASK, S_SAFIN, SAFINI,
S_SAFINI
COM Library Methods
ReadVariable
C Library Functions
acsc_ReadInteger

2.8.9 SAFINI
Description
SAFINI is an integer array, with one element for each axis in the system, the elements of which
contain a set of bits defining the active state of the axis safety input variable (SAFIN)
specifying inversion of the signal input logic, if required.
Syntax
SAFINI(axis_index)[.bit_designator] = value
Arguments

axis_index axis_index designates the specific axis: 0, 1, 2, .. up to the number of axes


in the system minus 1.
bit_designator The valid SAFINI bits are given in Table 46.
value value ranges from -2147483648 to 2147483647, Default=0.

Table 46 SAFINI Valid Bits


Bit Name No. Description
#RL 0 Hardware Right Limit
#LL 1 Hardware Left Limit
#HOT 4 Motor Overheat
#DRIVE 9 Drive Fault

Tag
122

Version NT 2.20 260 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Comments
1. When a SAFINI bit=0, the corresponding signal is not inverted and the high voltage state
is considered active.
2. When a SAFINI bit=1, the bit is inverted and the low voltage state is considered active.

Version NT 2.20 261 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Accessibility
Read-Write

Note
SAFINI values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Variables


FAULT, S_FAULT, FDEF, S_FDEF, FMASK, S_FMASK, SAFIN, S_SAFIN, S_SAFINI.
COM Library Methods
ReadVariable, WriteVariable, SetSafetyInputPortInv, GetSafetyInputPortInv
C Library Functions
acsc_ReadInteger, acsc_WriteInteger, acsc_SetSafetyInputPortInv,
acsc_GetSafetyInputPortInv

2.8.10 S_ERR
Description
S_ERR is a scalar integer that contains the code of the initialization error set during powerup.
Tag
113
Comments
Accessibility
Read-Only
Related ACSPL+ Variables
None
COM Library Methods
ReadVariable
C Library Functions
acsc_ReadInteger

2.8.11 S_FAULT
Description
S_FAULT is a scalar integer variable consisting of a set of bits equating to the occurrence of
faults. S_FAULT has two categories of bits, Axis Faults and System Faults (faults that are not
related to any specific axis).
The S_FAULT bits are described in Table 47.

Version NT 2.20 262 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Table 47 S_FAULT Fault Bits (page 1 of 2)


Bit Fault Fault Description
Axis Faults
0 #RL HARDWARE RIGHT LIMIT
1 = Right limit switch is activated.
1 #LL HARDWARE LEFT LIMIT
1 = Left limit switch is activated.
2 #NT NETWORK ERROR.
1 = EtherCAT network error is activated.
4 #HOT MOTOR OVERHEAT
1 = Motor's temperature sensor indicates overheat.
5 #SRL SOFTWARE RIGHT LIMIT
1 = Axis reference position (RPOS) is greater than the software right limit margin
(SRLIMIT).
6 #SLL SOFTWARE LEFT LIMIT
1 = Axis reference position (RPOS) is less than the software left limit margin
(SLLIMIT).
7 #ENCNC ENCODER NOT CONNECTED
1 = Primary encoder (for digital encoder type only) is not connected.
8 #ENC2NC ENCODER 2 NOT CONNECTED
1 = Secondary encoder (for digital encoder type only) is not connected.
9 #DRIVE DRIVE FAULT
1 = Signal from the drive reports a failure.
10 #ENC ENCODER ERROR
1 = Primary encoder miscounts.
11 #ENC2 ENCODER 2 ERROR
1 = Secondary encoder miscounts.
12 #PE POSITION ERROR
1 = Position error (PE) has occurred.

PE is defined by the following variables:


 ERRI - Maximum position error while the axis is idle
 ERRV - Maximum position error while the axis is moving with constant
velocity
 ERRA - Maximum position error while the axis is accelerating or
decelerating
 DELI - Delay on transition from ERRA to ERRI
 DELV - Delay on transition from ERRA to ERRV

Version NT 2.20 263 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Table 47 S_FAULT Fault Bits (page 2 of 2)


Bit Fault Fault Description
13 #CPE CRITICAL POSITION ERROR
1 = Position error (#PE) exceeds the value of the critical limit.

#CPE errors occur outside normal range of operation and #CPE > #PE.
The critical limit depends on the axis state and is defined by the following
variables:
 CERRI if the axis is idle (not moving)
 CERRV if the axis is moving with constant velocity
 CERRA if the axis is accelerating or decelerating
 DELI - Delay on transition from ERRA to ERRI
 DELV - Delay on transition from ERRA to ERRV
14 #VL VELOCITY LIMIT.
1 = Absolute value of the reference velocity (RVEL) exceeds the limit defined
by the XVEL parameter.
15 #AL ACCELERATION LIMIT
1 = Absolute value of the reference acceleration (RACC) exceeds the limit
defined by the XACC parameter.
16 #CL CURRENT LIMIT
1 = RMS current calculated in the Servo Processor exceeds the limit value
defined by the XRMS parameter.
17 #SP SERVO PROCESSOR ALARM
1 = Axis Servo Processor loses its synchronization with the MPU. The fault
indicates a fatal problem in the controller.
20 #HSSINC HSSI NOT CONNECTED
1 = HSSI module is not connected.
System Faults
25 #PROG PROGRAM FAULT
1 = Run time error occurs in one of the executing ACSPL+ programs.
26 #MEM MEMORY OVERFLOW
1 = User application requires too much memory.
27 #TIME MPU OVERUSE
1 = User application consumes too much time in the controller cycle.
28 #ES HARDWARE EMERGENCY STOP
1 = ES signal is activated.
29 #INT SERVO INTERRUPT
1 = The servo interrupt that defines the controller cycle is not generated. The fault
indicates a fatal controller problem.
30 #INTGR FILE INTEGRITY
1 = The integrity of the user application in controller RAM is checked by the
controller at power-up and whenever an #IR Terminal command is issued.
31 #FAILURE COMPONENT FAILURE
1 = An MC4U hardware component other than the drive, such as the Power
Supply, I/O card, or encoder card, has failed.

Version NT 2.20 264 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Tag
114
Comments
An S_FAULT bit, such as Left Limit, will be = 1 whenever one or more Left Limit fault bits
are = 1. In this manner, S_FAULT provides an indication of the aggregate state of each
FAULT bit.
Accessibility
Read-Only

Note
S_FAULT values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Variables


FAULT, FDEF, S_FDEF, FMASK, S_FMASK, SAFIN, S_SAFIN, SAFINI, S_SAFINI
COM Library Methods
ReadVariable, GetFault
C Library Functions
acsc_ReadInteger, acsc_GetFault

2.8.12 S_FDEF
Description
S_FDEF is a scalar integer variable consisting of a set of bits for defining the default response
for the system faults contained in S_FAULT. S_FDEF is connected to S_FAULT in the same
way that FDEF is connected with FAULT.
Syntax
S_FDEF[.bit_designator] = value
Arguments

bit_designator The S_FDEF bits and associated responses are given in Table 48.
value value ranges from -2147483648 to 2147483647, Default = 1.

Version NT 2.20 265 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Table 48 S_FDEF Bit Description


Bit Fault Fault Description Default Response
(S_FDEF)
25 #PROG PROGRAM FAULT The controller kills all axes.
1 = Run time error occurs in one of the
executing ACSPL+ programs.
26 #MEM MEMORY OVERFLOW The controller kills all axes.
1 = User application requires too much
memory.
27 #TIME MPU OVERUSE No default response.
1 = User application consumes too
much time in the controller cycle.
28 #ES HARDWARE EMERGENCY STOP The controller disables all axes,
1 = ES signal is activated. halts all buffer programs, and sets
the offset of each axis to 0.
29 #INT SERVO INTERRUPT The controller disables all axes.
1 = The servo interrupt that defines the
controller cycle is not generated.
The fault indicates a fatal controller
problem.
30 #INTGR FILE INTEGRITY No default response
1 = The integrity of the user application
in controller RAM is checked by
the controller at power-up and
whenever an #IR Terminal
command is issued.
31 #FAILURE COMPONENT FAILURE No default response
1 = An MC4U hardware component The user has to supply a user-
other than the drive, such as the defined fault response.
Power Supply, I/O card, or encoder
card, has failed.

Tag
115
Comments
The default value for all S_FDEF bits is 1, which enables the default response. If an S_FDEF
bit = 0, the default response is disabled.
Accessibility
Read-Write

Version NT 2.20 266 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Note
S_FDEF values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Variables


FAULT, S_FAULT, FDEF, FMASK, S_FMASK, SAFIN, S_SAFIN, SAFINI, S_SAFINI
COM Library Methods
ReadVariable, WriteVariable, GetResponseMask, SetResponseMask, GetFaultMask,
SetFaultMask
C Library Functions
acsc_ReadInteger, acsc_WriteInteger, acsc_GetResponseMask, acsc_SetResponseMask,
acsc_GetFaultMask, acsc_SetFaultMask

2.8.13 S_FMASK
Description
S_FMASK is scalar integer variable consisting of a set of bits for enabling or disabling the
system faults contained in S_FAULT. S_FMASK is connected to S_FAULT in the same way
that FMASK is connected with FAULT.
Syntax
S_FMASK[.bit_designator] = value
Arguments

bit_designator The S_FMASK bits and associated responses are given in Table 49.
value value ranges from -2147483648 to 2147483647, Default=0.

Table 49 S_FMASK Bit Description (page 1 of 2)


Bit Fault Fault Description
25 #PROG PROGRAM FAULT
1 = Run time error occurs in one of the executing ACSPL+ programs.
26 #MEM MEMORY OVERFLOW
1 = User application requires too much memory.
27 #TIME MPU OVERUSE
1 = User application consumes too much time in the controller cycle.
28 #ES HARDWARE EMERGENCY STOP
1 = ES signal is activated.

Version NT 2.20 267 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Table 49 S_FMASK Bit Description (page 2 of 2)


Bit Fault Fault Description
29 #INT SERVO INTERRUPT
1 = The servo interrupt that defines the controller cycle is not generated. The
fault indicates a fatal controller problem.
30 #INTGR FILE INTEGRITY
1 = The integrity of the user application in controller RAM is checked by the
controller at power-up and whenever a #IR immediate command is issued.
31 #FAILURE COMPONENT FAILURE
1 = An MC4U hardware component other than the drive, such as the Power
Supply, I/O card, or encoder card, has failed.

Tag
117
Comments
The S_FMASK default value = 1 and causes the controller to check for the fault associated with
that bit, as follows:
0: The corresponding FAULT bit is disabled
1: The corresponding FAULT is enabled and examined each MPU cycle.
Accessibility
Read-Write

Note
S_FMASK values cannot be modified if protection is applied to this
variable through SPiiPlus MMI Application Studio  Toolbox 
Application Development  Protection

Related ACSPL+ Variables


FAULT, S_FAULT, FDEF, S_FDEF, FMASK, SAFIN, S_SAFIN, SAFINI, S_SAFINI
COM Library Methods
ReadVariable, WriteVariable, GetFaultMask, SetFaultMask
C Library Functions
acsc_ReadInteger, acsc_WriteInteger, acsc_GetFaultMask, acsc_SetFaultMask

Version NT 2.20 268 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2.8.14 S_SAFIN
Description
S_SAFIN is a scalar integer variable that indicates the raw state of the #ES bit (Emergency
Stop) input stored in the SAFIN variable.
The value ranges from -2147483648 to 2147483647, Default=0.
Tag
118
Comments
S_SAFIN uses the same bit numbers as in SAFIN and as the corresponding faults in FAULT
and S_FAULT, but only the #ES bit is meaningful.

Note
S_SAFIN can be written to when working with the SPiiPlus Simulator.

Accessibility
Read-Only
Related ACSPL+ Variables
FAULT, S_FAULT, FDEF, S_FDEF, FMASK, S_FMASK, SAFIN, SAFINI, S_SAFINI
COM Library Methods
ReadVariable, GetSafetyInputPort
C Library Functions
acsc_ReadInteger, acsc_GetSafetyInputPort

2.8.15 S_SAFINI
Description
S_SAFINI is a scalar integer variable used for defining the active state of the system safety
input variable (S_SAFIN) specifying inversion of the signal input logic, if required.
Tag
119
Comments
1. When a S_SAFINI bit=0, the corresponding signal is not inverted and the high voltage
state is considered active.
2. When a S_SAFINI bit=1, the bit is inverted and the low voltage state is considered active.

Version NT 2.20 269 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Accessibility
Read-Write

Note
S_SAFINI values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Variables


FAULT, S_FAULT, FDEF, S_FDEF, FMASK, S_FMASK, SAFIN, S_SAFIN, SAFINI
COM Library Methods
ReadVariable, WriteVariable, SetSafetyInputPortInv, GetSafetyInputPortInv
C Library Functions
acsc_ReadInteger, acsc_WriteInteger, acsc_SetSafetyInputPortInv,
acsc_GetSafetyInputPortInv

2.8.16 SYNC
Description
SYNC is an integer array (one element per each slave node) the elements of which contain a
slave synchronization indicator for the node.
Tag
222
Accessibility
Read-Only
COM Library Methods
ReadVariable
C Library Functions
acsc_ReadInteger

Version NT 2.20 270 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2.9 Induction Motor Variables


The Induction Motor variables are:

Name Description
SLCFIELD Induction Motor Excitation
SLCSLIP Induction Motor Slip Factor

2.9.1 SLCFIELD
Description
SLCFIELD is a real array with one element for each axis in the system. It is used along with
SLCSLIPfor controlling permanent magnet (PM) synchronous motors (so called “DC
Brushless motors”). SLCFIELD defines the magnetic field component.
Syntax
SLCFIELD(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value provides the percentage of the peak current of the amplifier ranging
from 0 to 25.

Tag
217
Comments

Vector control, also known as Field Oriented Control, is a control technique that imitates the
DC motor operation and applies it to AC motors: PM synchronous motors (DC brushless
motors) and induction motors. This technique decomposes the motor current into two
independent components:
 The magnetizing (direct) component that influences the total magnetic flux.
 The torque-producing (quadrature) component that influences the generated torque. This
component is perpendicular to the magnetizing component.

In PM synchronous motors, the magnetizing component is in phase with the permanent magnet
field. The goal is usually to keep this component zero, so all the current is dedicated to torque
production. This maximizes the torque/current ratio and improves the efficiency and dynamic
performance.

Version NT 2.20 271 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

The magnetic field variable, SLCFIELD, is usually set equal to the nominal magnetizing
current of the motor. It should be around the “knee” of the magnetizing curve of the motor - it
should be high enough to maximize the torque constant of the motor, but must not be too high
to prevent magnetic saturation. The exact value is provided by the motor manufacturer, but it
can also be estimated based on 10-40% of the nominal current.

The value of SLCFIELD is expressed as percentage of the peak current of the amplifier and is
calculated according to the following formula:

2 I mag
Field  100
I peak

where:
Imag The nominal excitation current of the Provided by the manufacturer, of 10-40%
motor (rms value). of the nominal current
Ipeak The amplitude of the maximum current of
the amplifier.

Note
SLCFIELD = 0 identifies an induction motor.

Accessibility
Read-Write

Note
SLCFIELD values cannot be modified if protection is applied to this
variable through SPiiPlus MMI Application Studio  Toolbox 
Application Development  Protection

Related ACSPL+ Variables


SLCSLIP
COM Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

Version NT 2.20 272 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2.9.2 SLCSLIP
Description
SLCSLIP is a real array with one element for each axis in the system. It is used along with
SLCFIELDfor controlling permanent magnet (PM) synchronous motors (so called “DC
Brushless motors”). SLCSLIP defines the slip constant.
Syntax
SLCSLIP(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value designates the slip frequency ranging from 0 to 5000.

Tag
218
Comments

The range of SLCSLIP is typically 200-1000. A reference value is calculated as follows:


I peak
SLCSLIP  131 f n Hz  sn [%] 
2I n

where:

fn - The nominal supply frequency

sn - The nominal slip, given by:


ns  nn
sn 
ns

where:
ns - The synchronous velocity
nn - The nominal velocity
Ipeak - The peak current of the amplifier
In - The nominal motor current (rms)

For example, the nominal data of a 1.05kW motor is:

nn = 2870rpm, ns = 3000rpm, In = 8.1A, and fn = 50Hz

Version NT 2.20 273 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

So the nominal slip of the motor is:


3000  2870
s  0.0433
3000

For Ipeak = 10A, the value of SLCSLIP will be:


10
SLCSLIP  131 50  0.0433  248
2  8.1

Accessibility
Read-Write

Note
SLCSLIP values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Variables


SLCFIELD
COM Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.10 Nanomotion Variables


The Nanomotion variables are used to set various Dead Zone parameters in support of
Nanomotion piezo ceramic motor motion.
The Nanomotion variables are:

Name Description
SLDZMIN Defines the Dead Zone minimum position.
SLDZMAX Defines the Dead Zone maximum position.
SLZFF Defines the zero velocity feed forward position.

Version NT 2.20 274 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2.10.1 SLDZMIN
Description
SLDZMIN is a real array, with one element for each axis in the system, and is used for defining
the minimum position of the Dead Zone.
Syntax
SLDZMIN(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges between -1.79769e+308 to 1.79769e+308, Default = 1.

Tag
162
Comments
The Dead Zone mechanism stops the motor when the position approaches the target within the
value of SLDZMIN. The value depends on the system specifications; usually SLDZMIN is
between 1.0 to 2.0 counts.
Accessibility
Read-Write

Note
SLDZMIN values cannot be modified if protection is applied to this
variable through SPiiPlus MMI Application Studio  Toolbox 
Application Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.10.2 SLDZMAX
Description
SLDZMAX is a real array, with one element for each axis in the system, and is used for
defining the maximum position of the Dead Zone.
Syntax
SLDZMIN(axis_index) = value

Version NT 2.20 275 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges between -1.79769e+308 to 1.79769e+308, Default = 1.

Tag
163
Comments
The Dead Zone mechanism starts the motor again when the error radius increases above the
value SLDZMAX. The value depends on the system specifications; usually SLDZMAX is
between 4.0 to 10.0 counts.
Accessibility
Read-Write

Note
SLDZMAX values cannot be modified if protection is applied to this
variable through SPiiPlus MMI Application Studio  Toolbox 
Application Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.10.3 SLZFF
Description
SLZFF is a real array, with one element for each axis in the system, and is used for defining
zero velocity feed forward position.
Syntax
SLZFF(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges between 0 to 1.79769e+308, Default = 300.

Version NT 2.20 276 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Tag
189
Comments
Using SLZFF improves settling time by stopping the feed forward velocity when the axis is
getting close to the target position. The distance from the target is defined by SLZFF (in user
units). The proper value of SLZFF depends on the total moving mass and the resolution of the
encoder. It increases with mass and encoder resolution. Usually:
 For HR1 motor with encoder resolution of 0.1M, set SLZFF to 100: 300 counts.
 For HR8 motor with encoder resolution of 0.1M, set SLZFF to 300 - 400 counts.
Accessibility
Read-Write

Note
SLZFF values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.11 Servo-Loop Variables

Advanced
Servo-Loop variables are fully accessible at the ACSPL+ level. While
ACSPL+ programs generally do not refer to servo-loop variables at run
time, an advanced program could change a servo-loop variable on-the-
fly to provide adaptive control.

The servo-loop variables are used for configuration and adjustment, and are set through
SPiiPlus MMI Application Studio  Setup  Adjuster.
The Servo-Loop variable is:

Name Description
DCOM Drive Command

Version NT 2.20 277 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Additional servo-loop variables are grouped as follows:


 Servo-Loop Current Variables
 Servo-Loop Velocity Variables
 Servo-Loop Position Variables
 Commutation Variables
 Servo-Loop Velocity Notch Filter Variables
 Servo-Loop Compensations Variables
 Servo-Loop Miscellaneous Variables

2.11.1 DCOM
Description
DCOM is a real array, with one element for each axis in the system, and is used for defining
the maximum drive command.
Syntax
DCOM(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges from -100 to 100, Default = 0.

Tag
20
Comments
When operating in the open loop mode (MFLAGS.1=1), DCOM defines a percentage of the
maximum drive command, for example, the SPiiPlus PCI 4/8 provides differential drive output
from -10 to +10V. Therefore, assigning 100 to DCOM provides +10V on the drive output, -100
corresponds to -10V and 0 to 0V.
When operating in the closed loop mode (MFLAGS.1=0), DCOM defines an offset.
Accessibility
Read-Write

Note
DCOM values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Version NT 2.20 278 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Related ACSPL+ Commands


MFLAGS
COM Library Methods
ReadVariable, Write Variable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.11.2 Servo-Loop Current Variables


The Servo-Loop Current variables are:

Name Description
SLBIASA Current phase A bias
SLBIASB Current phase B bias
SLIKI Integrator gain
SLIKP Integrator proportional gain
SLIFILT Internal current filter
SLIOFFS Offset to be added to the result of the current loop control
SLILI Used to limit the drive’s output voltage

2.11.2.1 SLBIASA
Description
SLBIASA is a real array, with one element for each axis in the system, and is used for defining
the maximum controller voltage output.
Syntax
SLBIASA(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges between -10 to 10, Default = 0.

Tag
149
Comments
SLBIASA is expressed as a percentage of the maximum controller voltage output.
1. For integrated models: SLBIASA is read-only and displays the measured value of the
current input bias.

Version NT 2.20 279 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2. For non-integrated models: SLBIASA is read-write and specifies the bias of the drive
output. The controller uses the value only for brushless motors commutated by the
controller.
Accessibility
Read-Only (integrated models)
Read-Write (nonintegrated models)

Note
SLBIASA values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.11.2.2 SLBIASB
Description
SLBIASB is a real array, with one element for each axis in the system, and is used for defining
the maximum controller current.
Syntax
SLBIASB(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges between -10 to 10, Default = 0.

Tag
150
Comments
SLBIASB is expressed as a percentage.
1. For integrated models: SLBIASB is read-only and displays the measured value of the
current input bias.
2. For nonintegrated models: SLBIASB is read-write and specifies the bias of the drive
output. The controller uses the value only for brushless motors commutated by the
controller.

Version NT 2.20 280 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Accessibility
Read-Only (integrated models)
Read-Write (nonintegrated models)

Note
SLBIASB values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.11.2.3 SLIKI
Description
SLIKI is a real array, with one element for each axis in the system, and is used for defining
integrator coefficient for the current.
Syntax
SLIKI(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges between 0 - 65000.

Tag
170
Comments
SLIKI is active only in integrated models.
Accessibility
Read-Write

Note
SLIKI values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Version NT 2.20 281 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.11.2.4 SLIKP
Description
SLIKP is a real array, with one element for each axis in the system, and is used for defining
proportional coefficient for the current.
Syntax
SLIKP(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges between 0 - 256000, Default = 1000.

Tag
171
Comments
SLIKP is active only in integrated models.
Accessibility
Read-Write

Note
SLIKP values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

Version NT 2.20 282 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2.11.2.5 SLIFILT
Description
SLIFILT is a real array, with one element for each axis in the system, and is used for defining
the UDM current filter frequency.
Syntax
SLIFILT(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges between 0-5000.

Tag
226
Accessibility
Read-Write

Note
SLIFILT values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Variables


SLIKI, SLIKP
COM Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.11.2.6 SLIOFFS
Description
SLIOFFS is a real array, with one element for each axis in the system, and is used for offset to
be added to the result of the current loop control.
Syntax
SLIOFFS(axis_index) = value

Version NT 2.20 283 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges between -50 to 50, Default = 0.

Tag
172
Comments
The variable contains value in percents of maximal drive output.
The primary goal of the variable is to compensate for an active component of the motor load.
For example, in a vertical axis the weight of the carriage can be compensated.
The variable is valid for DC brush and brushless motors.
Normally, the variable is changed in the process of adjustment (use SPiiPlus MMI
Application Studio  Toolbox  Setup  Adjuster Wizard).
Accessibility
Read-Write

Note
SLIOFFS values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.11.2.7 SLILI
Description
SLILI is a real array, with one element for each axis in the system, and is used to limit the
drive’s output voltage. If raised, a higher speed can be achieved for the given drive (higher
output voltage).
Syntax
SLILI(axis_index) = value

Version NT 2.20 284 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value is a precentage of the maximal drive output, and consequently
ranges between 0 to 100; Default: 88.

Tag
221
Comments

Model
It is recommended to set value SLILI(axis)=97 to get a higher speed only for
SPiiPlus CMnt, SPiiPlus UDMpm and SPiiPlus UDMpc.

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

Version NT 2.20 285 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2.11.3 Servo-Loop Velocity Variables


The Servo-Loop Velocity variables are:

Name Description
SLVKI Sets velocity integrator coefficient
SLVKISF Provides a Settle Factor to the SLVKI variable
SLVKP Sets the proportional velocity gain.
SLVKPIF Provides an Idle Factor to the SLVKP variable
SLVKPSF Provides a Settle Factor to the SLVKP variable
SLVLI Integrator velocity limit
SLVRAT Velocity feed forward ratio
SLVLI Determines a drive’s output limit

2.11.3.1 SLVKI
Description
SLVKI is a real array, with one element for each axis in the system, and is used for specifying
the velocity loop integrator coefficient.
Syntax
SLVKI(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges between 0 to 20000; Default = 200.

Tag
179
Accessibility
Read-Write

Note
SLVKI values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

COM Library Methods


ReadVariable, WriteVariable

Version NT 2.20 286 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

C Library Functions
acsc_ReadReal, acsc_WriteReal

2.11.3.2 SLVKIIF
Description
SLVKIIF is a real array with one element for each axis in the system. It is used for providing
an Idle Factor to the SLVKI (Integrator Gain - Velocity) variable.
Syntax
SLVKIIF axis_index = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value A real value ranging between 0.0 and 100.0.

Tag
233
Accessibility
Read-Write

Note
SLVKIIF values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.11.3.3 SLVKISF
Description
SLVKISF is a real array with one element for each axis in the system. It is used for providing
a Settle Factor to the SLVKI variable.
Syntax
SLVKISF axis_index = value

Version NT 2.20 287 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value A real value ranging between 0.0 and 100.0.

Tag
234
Accessibility
Read-Write

Note
SLVKISF values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.11.3.4 SLVKP
Description
SLVKP is a real array, with one element for each axis in the system, and is used for providing
a proportional coefficient that is applied to the velocity of the specified axis.
Syntax
SLVKP(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges between 0 to 16777215, Default = 100.

Tag
180
Accessibility
Read-Write

Version NT 2.20 288 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Note
SLVKP values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.11.3.5 SLVKPIF
Description
SLVKPIF is a real array with one element for each axis in the system. It is used for providing
an Idle Factor to the SLVKP (Proportional Gain - Velocity) variable.
Syntax
SLPKPIF axis_index = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value A real value ranging between 0.0 and 100.0.

Tag
235
Accessibility
Read-Write

Note
SLVKPIF values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

Version NT 2.20 289 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2.11.3.6 SLVKPSF
Description
SLVKPSF is a real array with one element for each axis in the system. It is used for providing
a Settle Factor to the SLVKP variable.
Syntax
SLVKPSF axis_index = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value A real value ranging between 0.0 and 100.0.

Tag
236
Accessibility
Read-Write

Note
SLVKPSF values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.11.3.7 SLVLI
Description
SLVLI is a real array, with one element for each axis in the system, and is used for providing
an integrator limit for the velocity of the specified axis.
Syntax
SLVLI(axis_index) = value

Version NT 2.20 290 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges between 0 to 100, Default = 50.

Tag
181
Comments
SLVLI is expressed as a percentage of the maximum value.
Accessibility
Read-Write

Note
SLVLI values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.11.3.8 SLVRAT
Description
SLVAT is a real array, with one element for each axis in the system, and is used for defining
velocity feed forward ratio.
Syntax
SLVAT(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges between -8.38861e+006 to 8.38861e+006, Default = 1.

Tag
187

Version NT 2.20 291 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Comments
Velocity feed forward compensates for the velocity feedback, achieving zero position error at
constant velocity.
Accessibility
Read-Write

Note
SLVRAT values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.11.4 Servo-Loop Velocity Notch Filter Variables


Notch Filter variables serve for notching the servo-loop velocity filtering. The Servo-Loop
Velocity Notch Filter variables are:

Name Description
SLVNFRQ Notch filter frequency.
SLVNWID Notch filter width.
SLVNATT Notch filter attenuation.

2.11.4.1 SLVNFRQ
Description
SLVNFRQ is a real array, with one element for each axis in the system, and is used for
providing a notch filter frequency for the velocity of the specified axis.
Syntax
SLVNFRQ(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges between 0.1 to 4000, Default = 300.

Version NT 2.20 292 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Tag
182
Comments
SLVNFRQ is expressed in Hz.
Accessibility
Read-Write

Note
SLVNFRQ values cannot be modified if protection is applied to this
variable through SPiiPlus MMI Application Studio  Toolbox 
Application Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.11.4.2 SLVNWID
Description
SLVNWID is a real array, with one element for each axis in the system, and is used for
providing a notch filter width for the velocity of the specified axis.
Syntax
SLVNWID(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges between 0.1 to 4000, Default = 700.

Tag
183
Comments
SLVNWID is expressed in Hz.
Accessibility
Read-Write

Version NT 2.20 293 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Note
SLVNWID values cannot be modified if protection is applied to this
variable through SPiiPlus MMI Application Studio  Toolbox 
Application Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.11.4.3 SLVNATT
Description
SLVNATT is a real array, with one element for each axis in the system, and is used for
providing the attenuation of the notch frequency of the specified axis.
Syntax
SLVNATT(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges between 0.05 to 20; Default = 50.

Tag
184
Accessibility
Read-Write

Note
SLVNATT values cannot be modified if protection is applied to this
variable through SPiiPlus MMI Application Studio  Toolbox 
Application Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

Version NT 2.20 294 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2.11.5 Servo-Loop Velocity Low Pass Filter Variables


Low Pass Filter variables serve for setting the velocity low pass filtering parameters. The
Servo-Loop Velocity Low Pass Filter variables are:

Name Description
SLVSOF Sets filter bandwidth
SLVSOFD Sets filter damping

2.11.5.1 SLVSOF
Description
SLVSOF is a real array, with one element for each axis in the system, and is used for providing
a second order filter bandwidth for the velocity of the specified axis.
Syntax
SLVSOF(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges between 0.1 to 4000, Default = 700.

Tag
185
Comments
SLVSOF is expressed in Hz.
Accessibility
Read-Write

Note
SLVSOF values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

Version NT 2.20 295 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2.11.5.2 SLVSOFD
Description
SLVSOFD is a real array, with one element for each axis in the system, and is used for
providing a second order filter damping factor for the velocity of the specified axis.
Syntax
SLVSOFD(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges between 0.3 to 1, Default = 0.707.

Tag
186
Accessibility
Read-Write

Note
SLVSOFD values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.11.6 Servo-Loop Velocity Bi-Quad Filter Variables


Bi-Quad Filter variables serve for setting the velocity bi-quad filtering parameters. The Servo-
Loop Velocity Bi-Quad Filter variables are:

Name Description
SLVB0DD Sets the damping ratio denominator for a Bi-Quad filter.
SLVB0DF Sets the denominator value of the Bi-Quad filter.
SLVB0ND Sets the damping ratio numerator for a Bi-Quad filter.
SLVB0NF Sets the numerator value of the Bi-Quad filter.

Version NT 2.20 296 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2.11.6.1 SLVB0DD
Description
SLVB0DD is a real array, with one element for each axis in the system, and is used for setting
the damping ratio denominator for a Bi-Quad filter to the velocity loop control in addition to
the existing 2nd order Low-pass and Notch filters for the given axis.
Syntax
SLVB0DD(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value designates denominator value of the Bi-Quad damping ratio
ranging from 0.1 to 1. See SPiiPlus ACSPL+ Programmer Guide.

Tag
208
Comments
The Bi-Quad filter is the most general 2nd order filter. It has two poles and two zeros. It can be
thought of as a high-pass filter in series with a low-pass filter.
Accessibility
Read-Write

Note
SLVB0DD values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.11.6.2 SLVB0DF
Description
SLVB0DF is a real array, with one element for each axis in the system, and is used for setting
the denominator value of the Bi-Quad filter algorithm applied to the velocity loop control in
addition to the existing 2nd order Low-pass and Notch filters for the given axis.
Syntax
SLVB0DF(axis_index) = value

Version NT 2.20 297 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value designates denominator value of the Bi-Quad filter algorithm
ranging from 0.1 to 4000 [Hz]. See SPiiPlus ACSPL+ Programmer
Guide.

Tag
209
Comments
The Bi-Quad filter is the most general 2nd order filter. It has two poles and two zeros. It can be
thought of as a high-pass filter in series with a low-pass filter.
Accessibility
Read-Write

Note
SLVB0DF values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.11.6.3 SLVB0ND
Description
SLVB0ND is a real array, with one element for each axis in the system, and is used for setting
the damping ratio numerator for a Bi-Quad filter to the velocity loop control in addition to the
existing 2nd order Low-pass and Notch filters for the given axis.
Syntax
SLVB0ND(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value designates numerator value of the Bi-Quad damping ratio ranging
from 0.1 to 1. See SPiiPlus ACSPL+ Programmer Guide.

Version NT 2.20 298 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Tag
210
Comments
The Bi-Quad filter is the most general 2nd order filter. It has two poles and two zeros. It can be
thought of as a high-pass filter in series with a low-pass filter.
Accessibility
Read-Write

Note
SLVB0ND values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.11.6.4 SLVB0NF
Description
SLVB0NF is a real array, with one element for each axis in the system, and is used for setting
the numerator value of the Bi-Quad filter algorithm applied to the velocity loop control in
addition to the existing 2nd order Low-pass and Notch filters for the given axis.
Syntax
SLVB0NF(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value designates numerator value of the Bi-Quad filter algorithm ranging
from 0.1 to 4000 [Hz]. See SPiiPlus ACSPL+ Programmer Guide.

Tag
211
Comments
The Bi-Quad filter is the most general 2nd order filter. It has two poles and two zeros. It can be
thought of as a high-pass filter in series with a low-pass filter.

Version NT 2.20 299 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Accessibility
Read-Write

Note
SLVB0NF values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.11.7 Servo-Loop Position Variables


The Servo-Loop Position variables are:

Name Description
SLDRA Defines disturbance rejection.
SLDRAIF Provides an Idle Factor to the SLDRA.
SLDRX Defines the maximum DRA correction for a given axis.
SLPKP Sets the proportional coefficient of the position for the specified axis.
SLPKPIF Provides an Idle Factor to the SLPKP variable.
SLPKPSF Provides an Settle Factor to the SLPKP variable.

2.11.7.1 SLDRA
Description
SLDRA is a real array, with one element for each axis in the system, and is used for defining
the DRA frequency for the given axis.
The ACS proprietary Disturbance Rejection Algorithm (DRA) is used to improve the
disturbance rejection response of the servo, and helps to minimize the position error during the
settling phase and shorten the settling time.
Syntax
SLDRA(axis_index) = value

Version NT 2.20 300 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value designates the DRA frequency ranging from 0 to 1500 [Hz].

Tag
206
Comments
The most common use of DRA is to improve the settling of systems mounted on passive
isolation platforms. Passive isolation is typically used to isolate systems from disturbances
transmitted from the floor. They employ a seismic mass supported on a soft spring made of
rubber, metal, or air. The spring’s damping action absorbs vibrations above the spring’s
resonance. For this reason, passive isolation manufacturers usually try to lower spring resonant
frequency to increase the effective isolation range. When a servo force is applied to generate
motion, it also acts on the isolated stationary base, causing it to vibrate. Because the frequency
is low (usually below 1 Hz, to 10 Hz) and damping is very light, the isolation system continues
vibrating long after the motion profile has ended. This vibration acts as disturbance to the servo
system, introduces position error, and extends the settling time.
The DRA is used to minimize the latter effect and improve the position error during settling.
Accessibility
Read-Write

Note
SLDRA values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.11.7.2 SLDRAIF
Description
SLDRAIF is a real array with one element for each axis in the system. It is used for providing
an Idle Factor to the SLDRA variable.
Syntax
SLDRAIF axis_index = value

Version NT 2.20 301 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value A real value ranging between 0.0 and 100.0.

Tag
230
Accessibility
Read-Write

Note
SLDRAIF values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.11.7.3 SLDRX
Description
SLDRX is a real array, with one element for each axis in the system, and is used for defining
the maximum DRA correction for the given axis.

The ACS proprietary Disturbance Rejection Algorithm (DRA) is used to improve the
disturbance rejection response of the servo, and helps to minimize the position error during the
settling phase and shorten the settling time.
Syntax
SLDRX(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value designates the DRA correction ranging from 0 to 223.

Tag
207

Version NT 2.20 302 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Comments
The most common use of DRA is to improve the settling of systems mounted on passive
isolation platforms. Passive isolation is typically used to isolate systems from disturbances
transmitted from the floor. They employ a seismic mass supported on a soft spring made of
rubber, metal, or air. The spring’s damping action absorbs vibrations above the spring’s
resonance. For this reason, passive isolation manufacturers usually try to lower spring resonant
frequency to increase the effective isolation range. When a servo force is applied to generate
motion, it also acts on the isolated stationary base, causing it to vibrate. Because the frequency
is low (usually below 1 Hz, to 10 Hz) and damping is very light, the isolation system continues
vibrating long after the motion profile has ended. This vibration acts as disturbance to the servo
system, introduces position error, and extends the settling time.
The DRA is used to minimize the latter effect and improve the position error during settling.
Accessibility
Read-Write

Note
SLDRX values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.11.7.4 SLPKP
Description
SLPKP is a real array, with one element for each axis in the system, and is used for setting the
proportional coefficient of the position for the specified axis.
Syntax
SLPKP(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges between 0 to 16777215, Default = 0.

Tag
175

Version NT 2.20 303 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Comments
Motor movement during commutation largely depends on the servo-loop parameters.
COMMUT will not operate properly if SLPKP is set to zero, or the integrator is very low.
Accessibility
Read-Write

Note
SLPKP values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Commands


COMMUT
COM Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.11.7.5 SLPKPIF
Description
SLPKPIF is a real array with one element for each axis in the system. It is used for providing
an Idle Factor to the SLPKP variable.
Syntax
SLPKPIF axis_index = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value A real value ranging between 0.0 and 100.0.

Tag
231
Accessibility
Read-Write

Version NT 2.20 304 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Note
SLPKPIF values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.11.7.6 SLPKPSF
Description
SLPKPSF is a real array with one element for each axis in the system. It is used for providing
a Settle Factor to the SLPKP variable.
Syntax
SLPKPSF axis_index = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value A real value ranging between 0.0 and 100.0.

Tag
232
Accessibility
Read-Write

Note
SLPKPSF values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

Version NT 2.20 305 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2.11.8 Servo-Loop Compensations Variables


Servo-Loop Compensations variables are used to set various parameters that provide
compensation to overcome certain motion problems. The Servo-Loop Compensation variables
are:

Name Description
SLAFF Defines acceleration feed forward for a given axis
SLFRC Compensation for static friction
SLFRCD Compensation for dynamic friction

2.11.8.1 SLAFF
Description
SLAFF is a real array, with one element for each axis in the system, and is used for specifying
the acceleration feed forward of the specified axis.
Syntax
SLAFF(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges from 0 to 16777215; Default: 0.

Tag
148
Accessibility
Read-Write

Note
SLAFF values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

Version NT 2.20 306 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2.11.8.2 SLFRC
Description
SLFRC is a real array, with one element for each axis in the system, and is used for specifying
the velocity friction.
Syntax
SLFRC(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges between 0 to 50, Default = 0.

Tag
167
Comments
SLFRC is expressed as a percentage of the maximum output.
Accessibility
Read-Write

Note
SLFRC values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.11.8.3 SLFRCD
Description
SLFRCD is a real array, with one element for each axis in the system, and is used for providing
dynamic friction compensation at the maximum velocity.
Syntax
SLFRCD(axis_index) = value

Version NT 2.20 307 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges between 0% to 5% of maximum command.

Tag
168
Comments
SLFRCD provides dynamic compensation at the maximum velocity XVEL. For lower
velocities, the compensation is reduced proportionally with the velocity. The value of
SLFRCD is given as a percentage (range is 0 to 50%) of the maximum command.
Accessibility
Read-Write

Note
SLFRCD values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

2.11.9 Servo-Loop Miscellaneous Variables


This section contains a collection of miscellaneous variables employed for specific servo-loop
purposes. The Servo-Loop Miscellaneous variables are:

Name Description
SLCROUT Commutation feedback routing , see Commutation Variables
SLPROUT Position feedback routing
SLVROUT Velocity feedback routing

2.11.9.1 SLCROUT
Description
SLCROUT is an integer array, with one element for each axis in the system, and is used for
setting the feedback routing of the velocity commutation for the specified axis.

Version NT 2.20 308 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Syntax
SLCROUT(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value The value values and the feedback sources associated with them are
given inTable 50. Default = 0.

Table 50 SLCROUT Values


SLCROUT FACC (SPonly)
0 According to E_TYPE velocity
001 From channel 0 quadrature velocity
002 From channel 0 SINCOS velocity
003 From channel 0 HSSI velocity
004 From analog input 0
005 From channel 0 resolver velocity
101 From channel 1 quadrature velocity
102 From channel 1 SINCOS velocity
103 From channel 1 HSSI velocity
104 From analog input 1
105 From channel 1 resolver velocity
201 From channel 2 quadrature velocity
202 From channel 2 SINCOS velocity
203 From channel 2 HSSI velocity
204 From analog input 2
205 From channel 2 resolver velocity
301 From channel 3 quadrature velocity
302 From channel 3 SINCOS velocity
303 From channel 3 HSSI velocity
304 From analog input 3
305 From channel 3 resolver velocity

Tag
159
Accessibility
Read-Write

Version NT 2.20 309 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Note
SLCROUT values cannot be modified if protection is applied to this
variable through SPiiPlus MMI Application Studio  Toolbox 
Application Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger

2.11.9.2 SLPROUT
Description
SLPROUT is a real array, with one element for each axis in the system, and is used for setting
the feedback routing of the position for the specified axis.
Syntax
SLPROUT(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value The value values and the feedback sources associated with them are
given inTable 51. Default = 0.

Table 51 SLPROUT Values (page 1 of 2)


SLPROUT FPOS
0 According to E_TYPE position
001 From channel 0 quadrature position
002 From channel 0 SINCOS position
003 From channel 0 HSSI position
004 From analog input 0
005 From channel 0 resolver position
101 From channel 1 quadrature position
102 From channel 1 SINCOS position
103 From channel 1 HSSI position
104 From analog input 1
105 From channel 1 resolver position
201 From channel 2 quadrature position

Version NT 2.20 310 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Table 51 SLPROUT Values (page 2 of 2)


SLPROUT FPOS
202 From channel 2 SINCOS position
203 From channel 2 HSSI position
204 From analog input 2
205 From channel 2 resolver position
301 From channel 3 quadrature position
302 From channel 3 SINCOS position
303 From channel 3 HSSI position
304 From analog input 3
305 From channel 3 resolver position

Tag
177
Comments
The controller supports a standard control loop configuration where 0 feedback position
(FPOS) is obtained from the 0 encoder, FPOS(1) from the 1 encoder, etc.
SLPROUT 0 indicates FPOS is from an alternative sensor, for example, if SLPROUT(0) is
0104, FPOS is obtained from an analog input 0 rather than from the encoder. In this case, the
feedback source could be a potentiometer or any other device that produces analog voltage
proportional to the motor position.
The meaning of the routing value depends on the axis and the controller model. For example, a
value of 1 specified for the 0 or 2 axis selects the 0 encoder, the same value for the 1 or 2 axis
selects the 1 encoder.
Accessibility
Read-Write

Note
SLPROUT values cannot be modified if protection is applied to this
variable through SPiiPlus MMI Application Studio  Toolbox 
Application Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

Version NT 2.20 311 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2.11.9.3 SLVROUT
Description
SLVROUT is a real array, with one element for each axis in the system, and is used for setting
the feedback routing of the velocity for the specified axis.
Syntax
SLVROUT(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value The value values and the feedback sources associated with them are
given inTable 52. Default = 0.

Table 52 SLVROUT Values


SLVROUT FVEL (SP only)
0 According to E_TYPE velocity
001 From channel 0 quadrature velocity
002 From channel 0 SINCOS velocity
003 From channel 0 HSSI velocity
004 From analog input 0
005 From channel 0 resolver velocity
101 From channel 1 quadrature velocity
102 From channel 1 SINCOS velocity
103 From channel 1 HSSI velocity
104 From analog input 1
105 From channel 1 resolver velocity
201 From channel 2 quadrature velocity
202 From channel 2 SINCOS velocity
203 From channel 2 HSSI velocity
204 From analog input 2
205 From channel 2 resolver velocity
301 From channel 3 quadrature velocity
302 From channel 3 SINCOS velocity
303 From channel 3 HSSI velocity
304 From analog input 3
305 From channel 3 resolver velocity

Tag
188

Version NT 2.20 312 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Accessibility
Read-Write

Note
SLVROUT values cannot be modified if protection is applied to this
variable through SPiiPlus MMI Application Studio  Toolbox 
Application Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

Version NT 2.20 313 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2.12 Commutation Variables


The Servo-Loop Commutation variables are:

Name Description
SLCHALL Hall Shift
SLCNP Number of Poles
SLCPA Phase Advance
SLCOFFS Commutation Offset
SLCORG Commutation Origin
SLCPRD Commutation Period

Note
The low-level variables in this section are normally not used by the user.
Generally, these variables are defined during the axis adjustment using
SPiiPlus MMI Application Studio  Toolbox  Setup  Adjuster or the
COMMUT command.

2.12.1 SLCHALL
Description
SLCHALL is an integer array, with one element for each axis in the system, and serves for
storing the Hall shift.
Tag
192
Comments
The Adjuster commutation program calculates this parameter and saves it.

Caution
Do not change this parameter manually.

Accessibility
Read-Write

Version NT 2.20 314 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Note
SLCHALL values cannot be modified if protection is applied to this
variable through SPiiPlus MMI Application Studio  Toolbox 
Application Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger

2.12.2 SLCNP
Description
SLCNP is an integer array, with one element for each axis in the system, and defines the
number of poles for a rotary motor.
Syntax
SLCNP(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges from 2 to 1000, Default = 4.

Tag
152
Comments
For linear motors, set SLCNP=2.
Accessibility
Read-Write

Note
SLCNP values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

COM Library Methods


ReadVariable, WriteVariable

Version NT 2.20 315 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

C Library Functions
acsc_ReadInteger, acsc_WriteInteger

2.12.3 SLCPA
Description
SLCPA is a real array, with one element for each axis in the system, and defines the servo-loop
commutation phase advance in electrical degrees at XVEL (maximum allowed velocity for the
motor).
Syntax
SLCPA(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges from 0 to 90, Default=0.

Tag
157
Comments
The actual phase advance is calculated as:
SLCPA*VEL/XVEL
where VEL is the current reference velocity.
Accessibility
Read-Write

Note
SLCPA values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Related ACSPL+ Variables


XVEL
COM Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

Version NT 2.20 316 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2.12.4 SLCOFFS
Description
SLCOFFS is a real array, with one element for each axis in the system, and defines a
commutation offset in electrical degrees to be added to the commutation phase.
Syntax
SLCOFFS(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges from -60 to 60, Default=0.

Tag
153
Comments
SLCOFFS defines SLCOFFS is valid only if a brushless motor is specified
(MFLAGS(axis_index).#BRUSHL = 1).
Assignment to SLCOFFS immediately changes the commutation phase. Use SLCOFFS to
introduce a small correction to the commutation phase.
Accessibility
Read-Write

Note
SLCOFFS values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

Version NT 2.20 317 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2.12.5 SLCORG
Description
SLCORG is a real array, with one element for each axis in the system, that defines the
commutation phase in electrical degrees at the point of origin which is usually at the index
point.
Syntax
SLCORG(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges from:
 -60 to 60, Default=0
 0 to 360, Default=0

Tag
156
Comments
SLCORG is valid only if a brushless motor has been specified, i.e.,
MFLAGS(axis_index).#BRUSHL = 1.
Accessibility
Read-Write

Note
SLCORG values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

Version NT 2.20 318 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2.12.6 SLCPRD
Description
SLCPRD is a real array, with one element for each axis in the system, that defines the servo-
loop commutation period.
Syntax
SLCPRD(axis_index) = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
value value ranges from 256 to 16777215, Default=8000.

Tag
158
Comments
SLCPRD defines the feedback counts per revolution for rotary motors and the feedback counts
per two magnetic pitches for linear motors.
Accessibility
Read-Write

Note
SLCPRD values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

Version NT 2.20 319 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2.13 System Configuration Variables


The System Configuration variables are:

Name Description
CFG Configuration Mode
CTIME Controller Cycle Time
ECHO I/O Echo Channel
IENA Interrupt Enable/Disable
IMASK Interrupt Mask
ISENA Interrupt-Specific Enable/Disable
S_FLAGS System Flags
S_SETUP Enable/Disable IOMnt Watchdog

2.13.1 CFG
Description
CFG is an integer variable that indicates the application protection configuration mode.
Syntax
CFG = value
Arguments

value value can be one of the following:


0: Controller is in protected mode
1: Controller is in normal mode

Tag
14
Comments
An attempt to assign a value to a protected variable when CFG = 0 causes an error.
Accessibility
Read-Only
COM Library Methods
ReadVariable
C Library Commands
acsc_ReadInteger

Version NT 2.20 320 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2.13.2 CTIME
CTIME is a real variable that defines the controller cycle time.
Syntax
CTIME = value
Arguments

value value can be 0.25. 0.5 or 1.0 milliseconds (depending on the controller
model).

Tag
17
Comments
Many operations in the controller are synchronized to the controller cycle. For example, profile
generation is executed each controller cycle.

Note
If CTIME is used, before running, the program has to be saved to the
controller and controller restarted.

CTIME is normally set through the SPiiPlus MMI Application Studio EtherCAT
Configurator - see SPiiPlus MMI Application Studio User Guide.

Model
The SPiiPlus NTM product line enables setting CTIME to the following
values:
 SPiiPlus NTM-16: up to 16 axes, CTIME = 0.5ms (default) or 1ms
 SPiiPlus NTM-32: up to 32 axes, CTIME = 1ms only
 SPiiPlus NTM-32H: up to 32 axes, CTIME = 0.5ms (default) or 1ms
 SPiiPlus NTM-64H: up to 64 axes, CTIME = 1ms only

Accessibility
Read-Write
COM Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal

Version NT 2.20 321 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2.13.3 IENA
Description
IENA is a 23-bit mask variable used for enabling or disabling software and hardware interrupts
from a specific source.
Syntax
IENA.bit_designator = 1|0
Arguments

bit_designator The meanings of bit_designator are given in Table 53.

Table 53 IENA Bit Description


Bit Interrupt
7 Enable MARK1 0 interrupt
8 Enable MARK2 0 interrupt
9 Enable MARK1 2 interrupt
10 Enable M2ARK2 2 interrupt
11 Enable MARK1 4 interrupt
12 Enable M2ARK2 4 interrupt
13 Enable MARK1 5 interrupt
14 Enable M2ARK2 5 interrupt
15 Enable Emergency Stop interrupt
16 Enable Physical motion end interrupt
17 Enable Logical motion end interrupt
18 Enable Motion failure (Motion interruption due to a fault) interrupt
19 Enable Motor failure (Motor disable due to a fault) interrupt
20 Enable Program termination interrupt
21 Enable Dynamic buffer interrupt
22 Enable ACSPL+ interrupt by INTERRUPT command
23 Enable Digital input interrupt
24 Enable Motion start interrupt
25 Enable Motion phase interrupt
26 Enable ACSPL+ interrupt by TRIGGER command

Tag
69
Accessibility
Read-Write

Version NT 2.20 322 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger

2.13.4 IMASK
Description
IMASK is an integer array, with one element for each axis in the system, the elements of which
contain a set of bits that define which motor index and mark signals are processed.
Syntax
IMASK(axis_index).bit_designator = value
Arguments

axis_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
bit_designator IMASK has four bit designators:
 #IND (bit 0) - Primary encoder index
 #IND2 (bit 1) - Secondary encoder index
 #MARK (bit 2) - Mark1
 #MARK2 (bit 3) - Mark2
value value ranges from -2147483648 to 2147483647, Default = 13

Tag
70
Comments
If a bit is zero, the controller neither analyzes or latches the corresponding INDEX or MARK
signal.
Every axis does not provide all INDEX and MARK signals. The secondary encoder index is
available only if a secondary encoder is used. MARK signals are only available for axes 0, 1,
4, and 5.
Accessibility
Read-Write

Note
IMASK values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

Version NT 2.20 323 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

COM Library Methods


ReadVariable, WriteVariable, GetIndexState, ResetIndexState
C Library Functions
acsc_ReadInteger, acsc_WriteInteger, acsc_GetIndexState, acsc_ResetIndexState

2.13.5 ISENA
Description
ISENA is an integer array, with one element for each axis in the system, the elements of which
contain a set of 8 bits used for enabling or disabling software interrupts within a specific
interrupt status bit for a specific axis or buffer. Each element corresponds to one software
interrupt status bit and specifies which axis, buffers or inputs are enabled to cause interrupt.
Syntax
ISENAarray_index.bit_designator = 1|0
Arguments

array_index Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the
number of axes in the system minus 1.
bit_designator The meanings of bit_designator are given in Table 54.

Table 54 ISENA Bit Description


Bit Interrupt
0 Controls Physical Motion End interrupt.
1 Controls Logical Motion End interrupt.
2 Controls Motion Failure interrupt.
3 Controls Motor Failure interrupt.
4 Controls Program Termination interrupt.
5 Controls Command Execution interrupt (dynamic buffer only).
6 Controls ACSPL+ interrupt (by INTERRUPT command).
7 Controls Digital Input interrupt.

Note
If the Physical Motion is PEG-related, then bit 0 is not supported in NT 1.0.

Tag
78

Version NT 2.20 324 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Accessibility
Read-Write
COM Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger

2.13.6 S_FLAGS
Description
S_FLAGS is an integer variable containing a set of bits that define different settings for the
controller.
Syntax
S_FLAGS.bit_designator = 1|0
Arguments

bit_designator The meanings of bit_designator are given in Table 55.

Version NT 2.20 325 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Table 55 S_FLAGS Bit Description


Bit Name No. Description Remarks
#S_FLAGS 1 S_FLAGS.1 controls whether the controller Changes to S_FLAGS.1 take
allots a controller cycle to processing non- effect only after a program is
executable lines such as comments, empty recompiled.
lines and labels.
0: Comments, empty lines, labels are
skipped during execution and not allotted
a controller cycle. (Default)
1: These lines are each allotted a controller
cycle.
#FCLEAR 2 0: Sets the controller to regular mode. In the regular mode the next
(Default) motion command simply clears
the reason for the previous
1: Sets the controller to strict mode
KILL.
In the strict mode, the next
motion command cannot
activate the motion and fails.
Motion cannot be activated as
long as the reason for the
previous KILL is non-zero for
any involved motor.
Motion can continue only after
clearing the MERR variable
with
ENABLE/ENABLEALL or
FCLEAR.
#COPYFROM 5 0: Each controller cycle, the controller The COPYFROMDPR
copies from the dual-port RAM to parameter definitions are
standard variables as defined by the last retained and copying takes
DISP command. (Default) place whenever
S_FLAGS.#COPYFROM =
1: Copying is disabled
0.
#COPYOIR 6 Determines the mode of COPYFROMDPR
operation
0: Copy-each-cycle
1: Copy only if requested.

Tag
116
Accessibility
Read-Write
COM Library Methods
ReadVariable, WriteVariable

Version NT 2.20 326 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

C Library Functions
acsc_ReadInteger, acsc_WriteInteger

2.13.7 S_SETUP
Description
An integer variable containing a bit mask for defining various settings for the system.
Syntax
S_SETUP.bit_designator = 1|0
Arguments

bit_designator Starting from version 2.20, synchronization errors of SPiiPlus IOMnt


units are detected by default, to disable SPiiPlus IOMnt units
synchronization errors detection, the bit should be set to 0.

Tag
240
Accessibility
Read-Write
COM Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger

Version NT 2.20 327 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2.14 Communication Variables


Communication variables are used for establishing various communication parameters.
The Communication variables are:

Name Description
BAUD Serial Communication Baud Rate
COMMCH Communication Channel
COMMFL Communication Flags
CONID Controller Identification
DISPCH Default Communication Channel
ECHO Echo Communication Channel
GATEWAY Contains the address of a network router that serves accessing another
network segments.
SUBNET Used to determine to what subnet an IP address belongs.
TCPIP IP Address for 1st Ethernet
TCPIP2 IP Address for 2nd Ethernet
TCPPORT TCP port identifier
UDPPORT UDP port identifier

2.14.1 BAUD
Description
BAUD is an integer variable that defines the serial communication rate, given in bits per
second.
Syntax
BAUD = value
Arguments

value value can be one of the following:


 300
 1200
 4800
 9600
 19200
 57600
 115200

Tag
8

Version NT 2.20 328 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Comments
Changes to BAUD take effect only after controller restart.
Accessibility
Read-Write

Note
BAUD values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

COM Library Methods


ReadVariable, WriteVariable, OpenComSerial
C Library Commands
acsc_ReadInteger, acsc_WriteInteger, acsc_OpenComSerial

2.14.2 COMMCH
Description
COMMCH is an integer that stores a number representing the last activated communication
channel. Table 56.

Table 56 COMMCH Values


Value Description
1 Serial port 1
2 Serial port 2
6 Ethernet network (TCP)
7 Ethernet network (TCP)
8 Ethernet network (TCP)
9 Ethernet network (TCP)
10 Ethernet Point-to-Point (UDP)
12 PCI bus
16 MODBUS Slave
36 Ethernet network (TCP)
37 Ethernet network (TCP)
38 Ethernet network (TCP)
39 Ethernet network (TCP)

Tag
15

Version NT 2.20 329 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Comments
When queried through a communication channel, COMMCH reads the number of the current
communication channel.
COMMCH can be used in SEND, or assigned to DISPCH.
Accessibility
Read-Only.
COM Library Methods
ReadVariable
C Library Functions
acsc_ReadInteger

2.14.3 COMMFL

Caution
This variable is for advanced users. Changing the default values of these
bits is not recommended!

Description
COMMFL is a scalar variable containing a set of bits that affect controller communication.
Syntax
COMMFL.bit_designator = 1|0
Arguments

bit_designator The COMMFL bits and the meanings of their values are given in
Table 57.

Table 57 COMMFL Bit Descriptions (page 1 of 2)


Bit Name Bit No. Description
#VERBOSE 0 Controls error message form.
0 = The controller provides the error number only to the C Library
function or COM method, when an error occurs.
1 = The controller provides an extended message
1 1 = Enable motor messages
2 1 = Enable Axis messages
3 1 = Enable Program messages

Version NT 2.20 330 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Table 57 COMMFL Bit Descriptions (page 2 of 2)


Bit Name Bit No. Description
#SAFEMSG 4 1 = Controller sends unsolicited messages in Safe communication
format
#CSUMMSG 6 1 = A checksum is included in unsolicited messages. Normally the user
does not need to change this bit.
#NOCOMM 7 Controls the communication in protected mode.
1 = The controller ignores any command received via communication
channels except the queries that start from '?' character. The bit is
not effective if the controller is in configuration mode. The default
value is 0.
#NOQUERY 8 Controls the communication in protected mode.
1 = The controller ignores any query received via communication
channels. The bit is not effective if the controller is in
configuration mode. The default value is 0.

Tag
16
Accessibility
Read-Write
COM Library Methods
ReadVariable, WriteVariable
C Library Commands
acsc_ReadInteger, acsc_WriteInteger

2.14.4 CONID
Description
CONID is an integer variable that contains the controller identification.
Syntax
CONID = value
Arguments

value An integer ranging between 0 and 65536.

Tag
193
Comments
The controller identification can be used for many different purposes like Modbus Slave ID,
CAN Slave ID or user-defined unique ID within the user network.

Version NT 2.20 331 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Note
According to the Modbus specification, the controller must have an
individual address from 1 to 247.
In order to specify the Modbus Slave address, CONID should be initialized
to the Modbus Slave address value.

By default, the variable has zero value.


Accessibility
Read-Write

Note
CONID values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Commands
acsc_ReadInteger, acsc_WriteInteger

2.14.5 ECHO
Description
ECHO is a 10-member mask integer variable that defines an echo communication channel.
Syntax
ECHO = channel_number
Arguments

channel_number The values of channel_number and their meanings are given in


Table 58.

Table 58 ECHO Channel Numbers (page 1 of 2)


Channel Number Channel Name
-1 Echo NOT active
-2 All channels
1 Serial port 1

Version NT 2.20 332 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Table 58 ECHO Channel Numbers (page 2 of 2)


Channel Number Channel Name
2 Serial port 2
6 Ethernet network (TCP)
7 Ethernet network (TCP)
8 Ethernet network (TCP)
9 Ethernet network (TCP)
10 Ethernet Point-to-Point (UDP)
12 PCI bus
16 MODBUS Slave
36 Ethernet network (TCP)
37 Ethernet network (TCP)
38 Ethernet network (TCP)
39 Ethernet network (TCP)

Tag
35
Comments
If ECHO specifies a valid communication channel, the controller sends an echo of each
command received from any communication channel to the specified channel. Address each
channel as follows:
The default value for ECHO is -1, in order to select an echo channel, the user needs to select a
channel number.
ECHO cannot be saved to flash. After power-up the value is set to -1.
Use DISPCH to configure the communication channels related to the controller. Use
COMMCH to retrieve the current controller channel’s physical connection (only the channel
that is connected to the terminal on which the query is sent).
Accessibility
Read-Write
COM Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger

2.14.6 DISPCH
Description
DISPCH is a scalar integer variable that defines a communication channel between the
controller and a host application, SPiiPlus MMI Application Studio or any device connected to
the controller's communication ports.

Version NT 2.20 333 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Syntax
DISPCH = channel_number
Arguments

channel_number The values of channel_number and their meanings are given in


Table 59.

Table 59 DISPCH Channel Numbers


Channel Number Description
-2 All channels
-1 No default channel is specified, the command
uses the last channel activated by the host.
1 Serial port 1
2 Serial port 2
6 Ethernet network (TCP)
7 Ethernet network (TCP)
8 Ethernet network (TCP)
9 Ethernet network (TCP)
10 Ethernet Point-to-Point (UDP)
12 PCI bus
16 MODBUS Slave
36 Ethernet network (TCP)
37 Ethernet network (TCP)
38 Ethernet network (TCP)
39 Ethernet network (TCP)

Tag
25
Comments
DISPCH is relevant only to messages sent with DISP and SEND (described also as
“Unsolicited Messages”).
In order to view unsolicited messages in the SPiiPlus MMI Application Studio
Communication Terminal window, select the check box in the lower right corner of the
Terminal window to enable Show Unsolicited Messages.
If DISPCH specifies a valid communication channel, all unsolicited messages (messages that
are sent with DISP and SEND from the program buffers) are sent to this channel irrespective
of the channel used for immediate commands.
Accessibility
Read-Write

Version NT 2.20 334 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Note
DISPCH values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger

2.14.7 GATEWAY
Description
GATEWAY is an integer variable used for setting the address of a network router that serves
for accessing another network segment.

Note
The configuration is only available for the first Ethernet port.

Syntax
GATEWAY = value
Arguments

value value an hexadecimal number - format: 0xAABBCCDD.

Tag
227
Comments
The GATEWAY address value consists of 4 individual bytes, each byte containing a decimal
number ranging from 0 to 255. The bytes, when read, include a dot between each byte, with the
least significant byte of the value representing the first decimal number. For example, the value
0x0100000A is the address: 10.0.0.1.
If controller is configured to obtain network settings from a DHCP server, GATEWAY
contains the gateway address received from DHCP server
Accessibility
Read-Write

Version NT 2.20 335 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Note
GATEWAY values cannot be modified if protection is applied to this
variable through SPiiPlus MMI Application Studio  Toolbox 
Application Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger

2.14.8 SUBNET
Description
SUBNET is an integer variable used to determine to what subnet an IP address belongs.

Note
The configuration is only available for the first Ethernet port.

Syntax
SUBNET = value
Arguments

value value an hexadecimal number - format: 0xAABBCCDD.

Tag
228
Comments
The SUBNET value consists of 4 individual bytes, each byte containing a decimal number
ranging from 0 to 255. The bytes, when read, include a dot between each byte, with the least
significant byte of the value representing the first decimal number. For example, the value
0x00FFFFFF represents mask 255.255.255.0.
If controller is configured to obtain network settings from a DHCP server, SUBNET contains
the address received from DHCP server.
Accessibility
Read-Write

Version NT 2.20 336 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Note
SUBNET values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger

2.14.9 TCPIP
Description
TCPIP is an integer variable used for setting the TCP/IP for the Ethernet port N1.
Syntax
TCPIP = value
Arguments

value value an hexadecimal number - format: 0xAABBCCDD.

Tag
133
Comments
If TCPIP has a non-zero value, the controller uses the value as its TCP/IP address. In this case,
other configuration parameters receive the following default values:
 Subnet mask - 255.255.255.0
 Gateway address - no gateway, i.e., no routing is supported
If TCPIP is zero, the controller uses the DHCP protocol to receive the network configuration
from the DHCP server. The network configuration received from the DHCP server includes the
following parameters:
 Controller’s TCP/IP address
 Subnet mask
 Gateway address
The TCPIP variable value has to be in hex, for example:
TCPIP=0x6400000a

assigns a TCP/IP address of: 10.0.0.100. Note that the address is calculated starting from the
least significant byte of the value.

Version NT 2.20 337 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

To retrieve the assigned address in an ACSPL+ program, use the GETCONF function with key
310.
Accessibility
Read-Write

Note
TCPIP values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Commands
acsc_ReadInteger, acsc_WriteInteger, acsc_GetEthernetCards (to find all SPiiPlus controllers
in the network segment)

2.14.10 TCPIP2
Description
TCPIP2 is an integer variable used for setting the TCP/IP for a second Ethernet port: N2.
Syntax
TCPIP2 = value
Arguments

value value an hexadecimal number - format: 0xAABBCCDD.

Tag
198
Comments
If TCPIP2 is zero, the address will be automatically obtained at the controller start-up through
DHCP protocol. The default address for second Ethernet port is 192.168.0.100.
The TCPIP2 variable value has to be in hex: 0xAABBCCDD, for example:
TCPIP=0x6400000a
assigns a TCP/IP address of: 10.0.0.100. Note that the address is calculated starting from the
least significant byte of the value.
To retrieve the assigned address in an ACSPL+ program, use the GETCONF function with key
310.

Version NT 2.20 338 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Accessibility
Read-Write

Note
TCPIP2 values cannot be modified if protection is applied to this variable
through SPiiPlus MMI Application Studio  Toolbox  Application
Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Commands
acsc_ReadInteger, acsc_WriteInteger, acsc_GetEthernetCards (to find all SPiiPlus controllers
in the network segment)

2.14.11 TCPPORT
Description
TCPPORT is a scalar integer that stores a number representing a TCP port.
Syntax
TCPPORT = Port_number
Arguments

Port_number An integer ranging between 0 and 65536.

Tag
200
Comments
TCPPORT defines Ethernet ports in the controller for TCP. By default, this variable is set to
701. In order to establish communication with the controller through a port different from
default port numbers, the following should be done:
1. Set TCPPORT to a value other than 701.

Note
Some of the ports are used by the controller firmware and cannot be used. It
is recommended to use ports starting from 1024.

2. Save system parameters to the flash.


3. Restart the controller.

Version NT 2.20 339 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

4. Try to establish communication using new ports by providing them in client user
application. If communication isn't established, try to set other values.

Note
This new port value is used by the client user application only. The SPiiPlus
Tools and SPiiPlus C/COM Library continue to use the default ports.

Accessibility
Read-Write

Note
TCPPORT values cannot be modified if protection is applied to this
variable through SPiiPlus MMI Application Studio  Toolbox 
Application Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger

2.14.12 UDPPORT
Description
UDPPORT is a scalar integer that stores a number representing a UDP port.
Syntax
UDPPORT = Port_number
Arguments

Port_number An integer ranging between 0 and 65536.

Tag
201
Comments

UDPPORT defines Ethernet ports in the controller for UDP. By default, it is set to 700. In order
to establish communication with the controller through different from default port numbers, the
following should be done:
1. Set UDPPORT to a value other than 700.

Version NT 2.20 340 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Note
Some of the ports are used by the controller firmware and cannot be used. It
is recommended to use ports starting from 1024.

2. Save system parameters to the flash.


3. Restart the controller.
4. Try to establish communication using new ports by providing them in client user
application. If communication isn't established, try to set other values.

Note
This new port value is used by the client user application only. The SPiiPlus
Tools and SPiiPlus C/COM Library continue to use the default ports.

Accessibility
Read-Write

Note
UDPPORT values cannot be modified if protection is applied to this
variable through SPiiPlus MMI Application Studio  Toolbox 
Application Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger

Version NT 2.20 341 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

2.15 Miscellaneous
The Miscellaneous variables are:

Name Description
FK Function Key
XARRSIZE Maximum Array Size
PLCFLG SPiiPlus PLC program flag
MAXPLCU Establishes how much (in percentage) of the SpiiPlus processing power
is allocated to SpiiPlus PLC
JITTER Elapsed time between the physical timer interrupt and the SC real-time
task starts working.
MSSYNC Time difference between the master clock and the bus clock.

2.15.1 JITTER
Description
JITTER is a real variable that contains the time, in microseconds, that elapsed from the
physical timer interrupt until the SC real-time task starts working. This parameter shows the
influence of overall hosting PC load on real-time endurance of SC.
Tag
224
Accessibility
Read-Only
COM Library Methods
ReadVariable
C Library Functions
acsc_ReadReal

2.15.2 MSSYNC
Description
MSSYNC is a real variable that contains the difference, in microseconds, between clocks of the
master and the bus.This parameter shows how close the synchronization is between the two
clocks.
Tag
225
Accessibility
Read-Only

Version NT 2.20 342 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

COM Library Methods


ReadVariable
C Library Functions
acsc_ReadReal

2.15.3 FK
Description
FK is a scalar integer and is used by the controller to store function keys in an input string
processed with the INPUT command.
Tag
50
Comments
If the controller encounters a zero character in the input string, it stores the value of the next
character in FK.
This is the usual way for loading function key codes (F1 - F12).

Note
An autoroutine can be used to respond to changes in FK.

Accessibility
Read-Only
COM Library Methods
ReadVariable
C Library Functions
acsc_ReadInteger

2.15.4 XARRSIZE
Description
XARRSIZE is a scalar integer that stores maximum size of an array.
Syntax
XARRSIZE = value
Arguments

value value ranges from 10,000 to 10,000,000 (elements); Default = 100,000

Version NT 2.20 343 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

Tag
219
Comments
By default the maximum size for a user array is 100,000 elements; if, however, an application
requires larger arrays, the user may change this value to accommodate a larger array size.
However the following should be taken into consideration:
1. Defining large arrays may use too much memory and may cause an out of memory fault.
To avoid this, the RAM size available for user data in the specific controller model should
be checked. One element in an array requires 8 bytes of RAM, 131,072 elements require
1 MB.
2. The processing time required for operations on large arrays in ACSPL+ may cause an over
usage fault. Therefore, arrays should be defined only with the size actually required for the
application.

Note
It strongly recommended that users change the XARRSIZE variable only if
necessary, and that such changes be tested under safe conditions.

Accessibility
Read-Write

Note
XARRSIZE values cannot be modified if protection is applied to this
variable through SPiiPlus MMI Application Studio  Toolbox 
Application Development  Protection

COM Library Methods


ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger

2.15.5 PLCFLG
Description
Every time when the compiled project is downloaded to the SPiiPlus PLC, it is saved in the
flash ACSPL+ variable: PLCFLG which controls the PLC program behavior. There are two
flashes that are employed:
 PLCFLG.#RESTORE - If true, SpiiPlus PLC will load the saved program upon startup.
The load process also includes CANopen network initialization, if used.

Version NT 2.20 344 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Variables

 PLCFLG.#AUTORUN - If true and the saved program was successfully loaded, SPiiPlus
PLC will automatically start the SPiiPlus PLC program upon power-up.
For details on SPiiPlus PLC see the SPiiPlus PLC User Guide.

2.15.6 MAXPLCU
Description
MAXPLCU is an integer variable that defines how much (in percentage) of the SpiiPlus
processing power is allocated to SpiiPlus PLC.
Syntax
MAXPLCU = value
Arguments

value value ranges from 10 to 80

Comments
The units of the MAXPLCU value are a percentage, e.g., MAXPLCU:=10 means the value of
MAXPLCU is 10%.

Note
If the actual SPiiPlus PLC usage violates this limit, the SPiiPlus PLC cycle
is increased.

Accessibility
Read-Write

Version NT 2.20 345 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

3 ACSPL+ Functions
ACSPL+ functions are divided into the following categories:
 Arithmetical Functions
 Array Processing Functions
 Miscellaneous Functions
 EtherCAT Functions
 CoE Functions
 Servo Processor Functions
 Signal Processing Functions
This chapter covers the ACSPL+ functions.
The ACSPL+ Functions, in alphabetical order, are:

Function Action
ABS Calculates the absolute value.
ACOS Calculates the arc cosine.
ASIN Calculates the arc sine.
ATAN Calculates the arc tangent.
ATAN2 Calculates the arc tangent of X/Y.
AVG Finds the average of all values in an array.
BCOPY Copies a given number of bytes from a source array into a target array.
CEIL Calculates the ceiling of a value.
COPY The function copies one array to another.
COEREAD Read CoE slave Object Directory entry.
COS Calculates the cosine.
COEWRITE Write into CoE slave Object Directory.
DEADZONE Implements dead-zone routine.
DSIGN Implements a dynamic version of the standard SIGN function.
DSTR Converts a string to an integer array.
ECIN Copy EtherCAT offset data into ACSPL+ variable
ECGETSLAVES Returns the number of EtherCAT slaves in the network
ECOUT Copy data of ACSPL+ variable into EtherCAT offset
ECUNMAP Undoes any results from running ECIN and ECOUT
ECUNMAPIN Undoes any results from running ECIN to a specific offset.
ECUNMAPOUT Undoes any results from running ECOUT to a specific offset.
EDGE Returns 1 on positive edge of x.
EXP Calculates the exponent.

Version NT 2.20 346 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Function Action
FLOOR Calculates the floor of a value.
GETCONF Reads hardware and firmware parameters.
GETSP Reads a value from the specified SP address.
GETSPA Retrieves address of the SP variable specified by name.
GETSPV Reads a value from the specified SP variable name.
HYPOT Calculates the hypotenuse.
INP Reads data characters from the specified channel and stores them into
integer array.
INTGR Implements an integrator with DEADZONE and SAT.
LAG Provides delayed switching on argument change (anti-bouncing effect).
LDEXP Calculates a value of x*2exp.
LOG Calculates the natural logarithm.
LOG10 Calculates the base-10 logarithm.
MAP Implements a table-defined function with constant step.
MAPB One-dimensional uniform b-spline.
MAPN One-dimensional non-uniform linear interpolation (replaces obsolete
MAPBY1 and MAPBY2).
MAPNB One-dimensional non-uniform B-spline.
MAPNS One-dimensional non-uniform Catmull-Rom spline.
MAPS One-dimensional uniform Catmull-Rom spline.
MAP2 Implements a table-defined function with two arguments and constant
step along each argument.
MAP2B Two-dimensional uniform B-spline.
MAP2N Two-dimensional non-uniform linear interpolation (replaces obsolete
MAP2FREE).
MAP2NB Two-dimensional non-uniform B-spline.
MAP2NS Two-dimensional non-uniform Catmull-Rom spline.
MAP2S Two-dimensional uniform Catmull-Rom spline.
MATCH Calculates axis position that matches current reference position of the
same axis with zero offset.
MAX Finds the maximum value in an array.
MAXI Finds the element with maximum value in an array or in a section of an
array and returns its index.
MIN Finds the minimum value in an array.
MINI Finds the element with minimum value in an array or in a section of an
array and returns its index.
MONSP Initiates monitoring of the specified SP address through analog output.
MONSPV Initiates monitoring of the specified SP variable name through analog
output.
NUMTOSTR Converts a number to an ASCII string.

Version NT 2.20 347 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Function Action
POW Calculates x raised to the power of y.
RAND Implements a random number generator.
ROLL Calculates a result rolled-over to within one pitch.
SAT Implements a saturation characteristic.
SETCONF Writes hardware and firmware parameters.
SETSP Sets a value for the specified SP address.
SETSPV Sets a value for the specified SP variable name.
SETVAR Writes a value to a system or user variable, scalar or array, that was
declared as a Tag number.
SIGN Returns -1, 0 or 1 depending on the sign of x.
SIN Calculates the sine.
SQRT Calculates the square root.
STR Converts an integer array to a string.
STRTONUM Converts an ASCII string representing a number to the number it
represents.
SYSINFO Returns certain system information based on the argument that is
specified.
TAN Calculates the tangent.

3.1 Arithmetical Functions


The Arithmetical functions are:

Function Action
ABS Calculates the absolute value
ACOS Calculates the arc cosine
ASIN Calculates the arc sine
ATAN Calculates the arc tangent
ATAN2 Calculates the arc tangent of Y/X
CEIL Calculates the ceiling of a value
COS Calculates the cosine
EXP Calculates the exponent
FLOOR Calculates the floor of a value
HYPOT Calculates the hypotenuse
LDEXP Calculates a value of x*2exp
LOG Calculates the natural logarithm
LOG10 Calculates the base 10 logarithm
POW Calculates x raised to the power of y

Version NT 2.20 348 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Function Action
SIGN Returns -1, 0 or 1 depending on the sign of x
SIN Calculates the sine
SQRT Calculates the square root
TAN Calculates the tangent

3.1.1 ABS
Description
ABS calculates the absolute value
Syntax
ABS(input)
Arguments

input input can be a real number or an expression.

Return Value
Real number - returns the absolute value of the input.
Error Conditions
None
Example

XX = ABS(-3.14)
DISP XX !Output = 3.14

3.1.2 ACOS
Description
ACOS calculates arc cosine.
Syntax
ACOS(input)
Arguments

input input can be a real number or an expression.

Return Value
Real number - returns the arc cosine of the argument in the range from 0 to radians.

Version NT 2.20 349 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Error Conditions
The value of input must be between –1 to 1, otherwise the function returns Error 3045,
Numerical Error in Standard Function.
Example

XX = ACOS(-1)
DISP XX !Output = 3.141592654

3.1.3 ASIN
Description
ASIN calculates the arc sine.
Syntax
ASIN(input)
Arguments

input input can be a real number or an expression.

Return Value
Real number - returns the arc sine of XX in the range –/2 to /2.
Error Conditions
The value of input must be between –1 to 1, otherwise the function returns Error 3045,
Numerical Error in Standard Function.
Example
XX = ASIN(-1)
DISP XX !Output = -1.570796327

3.1.4 ATAN
Description
ATAN calculates the arc tangent.
Syntax
ATAN(input)
Arguments

input input can be a real number or an expression.

Return Value
Real number - returns the arc tangent of the input in the range –/2 to /2 radians.

Version NT 2.20 350 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Error Conditions
None
Example
XX = ATAN(-1)
DISP XX !Output = –0.7853981634

Version NT 2.20 351 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

3.1.5 ATAN2
Description
ATAN2 calculates the arc tangent of X/Y.
Syntax
ATAN2(X_input,Y_input).
Arguments

X_input X_input can be a real number or an expression.


Y_input Y_input can be a real number or an expression.

Return Value
Real number - returns the arc tangent value of X_input, Y_input. ATAN2 calculates a value
in the range of  to  radians using the signs of both parameters to determine the quadrant of
the return value. If both parameters are 0, the function returns 0. ATAN2 is well defined even
if Y equals 0.
Error Conditions
None
Example
X_input = -1; Y_input = 0
XX=ATAN2(X_input,Y_input)
DISP XX !Output = -1.5708

3.1.6 CEIL
Description
CEIL calculates the ceiling of a value.
Syntax
CEIL(input)
Arguments

input input can be a real number or an expression.

Return Value
Integer number - returns a value that represents the smallest integer that is  input.
Error Conditions
None

Version NT 2.20 352 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Example
XX=CEIL(3)
YY=CEIL(-3)
ZZ=CEIL(2.1)
TT=CEIL(–2.1)
DISP XX, YY, ZZ, TT !Output = 3 -3 3 -2

3.1.7 COS
Description
COS calculates the cosine.
Syntax
COS(input)
Arguments

input input can be a real number or an expression (which is treated as radians


by the function).

Return Value
Real number - returns the cosine of X in the range of -1 to 1.
Error Conditions
None
Example
XX = COS(-3.141592654)
DISP XX !Output = -1

3.1.8 EXP
Description
EXP calculates the e^ input
Syntax
EXP(input)
Arguments

input input can be a real number or an expression.

Return Value
Real number - returns the exponential value of input. On overflow, the function returns the
largest real number.

Version NT 2.20 353 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Error Conditions
None
Example
XX = EXP(1)
DISP XX !Output = 2.718281828

3.1.9 FLOOR
Description
FLOOR calculates the floor of a value.
Syntax
FLOOR(input)
Arguments

input input can be a real number or an expression.

Return Value
Integer number - returns a value representing the largest integer that is < to input.
Error Conditions
None
Example
XX=FLOOR(3)
YY=FLOOR(-3)
ZZ=FLOOR (2.1)
TT=FLOOR(-2.1)
DISP XX,YY,ZZ,TT !Output = 3 -3 2 -3

3.1.10 HYPOT
Description
HYPOT calculates the hypotenuse of a right triangle
Syntax
HYPOT(X_input, Y_input)
Arguments

X_input X_input can be a real number or an expression.


Y_input Y_input can be a real number or an expression.

Version NT 2.20 354 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Return Value
Real number - calculates the length of the hypotenuse of a right triangle, given the length of the
two sides X_input and Y_input. HYPOT is equivalent to the square root of X2 + Y2.
Error Conditions
None
Example
XX=HPOT(3,4)
DISP XX !Output = 5

3.1.11 LDEXP
Description
LDEXP calculates the value of x*2^exp.
Syntax
LDEXP(X_input,Y_input)
Arguments

X_input X_input can be a real number or an expression.


Y_input Y_input can be a real number or an expression.

Return Value
Real number - returns the value of X_input*2Y_input. On overflow LDEXP returns the largest
real number with a sign, depending on the sign of X_input.
Error Conditions
None
Example
XX= LDEXP(1,2)
DISP XX !Output = 4

3.1.12 LOG
Description
LOG calculates the natural logarithm.
Syntax
LOG(input)
Arguments

input input can be a real number or an expression.

Version NT 2.20 355 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Return Value
Real number - returns the natural logarithm of input.
Error Conditions
input must be , otherwise the function returns Error 3045, Numerical Error in Standard
Function.
Example
XX=LOG(2.718281829)
DISP XX !Output = 1

3.1.13 LOG10
Description
LOG10 calculates the base 10 logarithm.
Syntax
LOG10(input)
Arguments

input input can be a real number or an expression.

Return Value
Real number - returns the base 10 logarithm of input.
Error Conditions
input must be , otherwise the function returns Error 3045, Numerical Error in Standard
Function.
Example
XX=LOG10(10)
DISP XX !Output = 1

3.1.14 POW
Description
POW calculates X raised to the power of Y.
Syntax
POW(X_input,Y_input)
Arguments

X_input X_input can be a real number or an expression.


Y_input Y_input can be a real number or an expression.

Version NT 2.20 356 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Return Value
Real number - returns the value of (X_input)Y_input.
Error Conditions
None
Example
XX=POW(2,3)
DISP XX !Output = 8

3.1.15 SIGN
Description
SIGN returns –1, 0 or 1 depending if the input is negative, zero or positive.
Syntax
SIGN(input)
Arguments

input input can be a real number or an expression.

Return Value
Real number - returns:
–1 if input <0;
0 if input = 0;
1 if input >0
Error Conditions
None
Example
XX=SIGN(-5), SIGN(0),SIGN(5)
DISP XX !Output = -1 0 1

3.1.16 SIN
Description
SIN calculates the sine.
Syntax
SIN(input)

Version NT 2.20 357 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Arguments

input input can be a real number or an expression (which is treated as radians


by the function).

Return Value
Real number - returns the sine value of input in the range of –1 to 1.
Error Conditions
None
Example
XX=SIN(1.570796327)
DISP XX !Output = 1

3.1.17 SQRT
Description
SQRT calculates the square root.
Syntax
SQRT(input)
Arguments

input input can be a real number or an expression.

Return Value
Real number - returns the square root of input.
Error Conditions
input must be , otherwise the function returns Error 3045, Numerical Error in Standard
Function.
Example
XX=SQRT(4)
DISP XX !Output = 2

3.1.18 TAN
Description
TAN calculates the tangent.
Syntax
TAN(input)

Version NT 2.20 358 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Arguments

input input can be a real number or an expression (which treated as radians by


the function).

Return Value
Real number - returns the tangent value of input.
Error Conditions
None
Example
REAL PI
PI = 3.141592654
DISP TAN(PI/4) !Output = 1

3.2 Array Processing Functions


The Array Processing functions are:

Function Action
AVG Finds the average of all values in an array.
COPY Copies data from one user array to another.
FILL Fills an array or a section of array with the specified value.
MAX Finds the maximal value in an array
MAXI Finds the maximal value in an array or in a section of array and returns
its index.
MIN Finds the minimal value in an array.
MINI Finds the element with minimal value in an array or in a section of an
array and returns its index.

3.2.1 AVG
Description
AVG finds the average of all values in an array.
Syntax
AVG(array_name)
Arguments

array_name The name of an array that has been declared in the program.

Version NT 2.20 359 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Return Value
Real number - returns the average of all elements in array_name.
Example
REAL Ar(3)
Ar(0) = 1; Ar(1)=0.5; Ar(2)=3;
DISP AVG(Ar) !Output = 1.5

3.2.2 COPY
Description
COPY copies data from one user array to another.
Syntax
COPY(source, destination, from_source_row, to_source_row, from_source_col,
to_source_col, from_destination_row, to_destination_row ,from_destination_col,
to_destination_col)
Arguments

source The name of an array that has been declared in the program from which
the data is to be copied.
destination The name of an array that has been declared in the program to which the
data is to be copied.
from_source_row The index of the first row of the source to begin copying.
to_source_row The index of the last row of the source to end copying.
from_source_col The index of the first column of the source to begin copying.
Used only for matrix type arrays, otherwise it can be omitted.
to_source_col The index of the last column of the source to end copying.
Used only for matrix type arrays, otherwise it can be omitted.
from_destination_row The index of the first row of the destination to begin copying into.
to_destination_row The index of the last row of the destination to end copying into.
from_destination_col The index of the first column of the destination to begin copying into.
Used only for matrix type arrays, otherwise it can be omitted.
to_destination_col The index of the last column of the destination to begin copying into.
Used only for matrix type arrays, otherwise it can be omitted.

Comments
If the matrix indexes are omitted, the entire source matrix will be copied to the destination
matrix.
If the destination matrix has different dimensions than the source matrix then the destination
matrix will use the source matrix values to fill each row completely and move to the next row.
Return Value
None

Version NT 2.20 360 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Error Conditions
Error 3034, Illegal index value - the destination matrix is smaller than the source matrix.
Example

INT GLOBAL SOURCE(3)(3), DESTINATION(3)(3) !Define source and destination


!matrices
!-------------------- Assign values to SOURCE matrix ---------------------
SOURCE(0)(0)=1;SOURCE(0)(1)=2;SOURCE(0)(2)=3;SOURCE(1)(0)=4;SOURCE(1)(1)=5;
SOURCE(1)(2)=6;SOURCE(2)(0)=7;SOURCE(2)(1)=8;SOURCE(2)(2)=9
!------------------ Assign values to DESTINATION matrix ---------------------
COPY(SOURCE,DESTINATION,0,1,0,2,1,2,0,2) !COPY command -
!The program copies the first
!two rows from the source
!matrix to the destination
!matrix second two rows. The
!matrices are as follows:
!Source:
!1 2 3
!4 5 6
!7 8 9
!Destination:
!0 0 0
!1 2 3
!4 5 6
STOP !Ends program

Figure 19 Illustration of COPY Function

Version NT 2.20 361 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

3.2.3 FILL
Description
FILL fills an array or a section of array with a specified value.
Syntax
FILL (real value, destination, from_array_row, to_array_row, from_array_column,
to_array_ column)
Arguments

real value Any real number.


destination The name of an array that has been declared in the program to which the
value is to be copied.
from_array_row The index of the first row of the destination array to begin filling.
to_array_row The index of the last row of the destination array to end filling.
from_array_column The index of the first column of the destination array to begin filling.
Used only for matrix type arrays, otherwise it can be omitted.
to_array_ column The index of the last column of the destination array to end filling.
Used only for matrix type arrays, otherwise it can be omitted.

Comments
If the matrix indexes are omitted, the entire matrix will be filled with the requested value.
Example

GLOBAL ARR(6)(3)
FILL(3,ARR,0,4,1,2)
STOP

!The program fills ARR with the value 3, from row 0 to row 4,
!and from column 1 to column 2. After executing the program,
!the resulting ARR values are:

!0 3 3
!0 3 3
!0 3 3
!0 3 3
!0 3 3
!0 0 0

Version NT 2.20 362 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

3.2.4 MAX
Description
MAX finds the maximum value in an array or in a section of an array.
Syntax
MAX(array_name)
Arguments

array_name The name of an array that has been declared in the program.

Return Value
Real number - returns the maximum element in the array.
Example

REAL AR(3)
AR(0) = 1; AR(1)=0.5; AR(2)=3;
DISP MAX(AR) !Output = 3

3.2.5 MAXI
Description
MAXI finds the maximum value in an array or in a section of array and returns its index.
Syntax
MAXI(array_name)
Arguments

array_name The name of an array that has been declared in the program.

Return Value
Integer - MAXI returns the index of maximum element in the array, or in the specified section
of the array. In case of a two-dimensional array only the column index is returned.
Error Conditions
None
Example

REAL AR(3)
AR(0)= 1; AR(1)= 0.5; AR(2)= 3
DISP MAXI(AR) !Output = 2

Version NT 2.20 363 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

3.2.6 MIN
Description
MIN finds the minimum value in an array or in a section of an array.
Syntax
MIN(array_name)
Arguments

array_name The name of an array that has been declared in the program.

Return Value
Real number - returns the minimum element in the array.
Error Conditions
None
Example
REAL Ar(3)
Ar(0) = 1; AR(1)=0.5; Ar(2)=3;
DISP MIN(Ar) !Output = 0.5

3.2.7 MINI
Description
MINI finds the element with the minimum value in an array or in a section of an array and
returns its index.
Syntax
MINI(array_name)
Arguments

array_name The name of an array that has been declared in the program.

Return Value
Integer - MINI returns the index of the minimum element in array X, or in the specified section
of array x. In case of a two-dimensional array, only the column index is returned.
Example

REAL AR(3)
AR(0)= 1; AR(1)= 0.5; AR(2)= 3;
DISP MINI(AR) !Output = 1

Version NT 2.20 364 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

3.3 Miscellaneous Functions


The Miscellaneous functions are:

Function Action
GETCONF Reads hardware and firmware parameters.
SYSINFO Returns certain system information based on the argument that is
specified.
GETVAR Reads the current value of the variable and returns it as a real number.
SETCONF Writes hardware and firmware parameters.
SETVAR Provide write access to all ACSPL+ variables and to user variables
declared with tag.
STR Converts an integer array to a string.
STRTONUM Converts an ASCII string representation of a number to the number it
represents.
NUMTOSTR Converts a number to an ASCII string.
BCOPY Copies bytes from a source array to a target array.

3.3.1 GETCONF

Advanced
GETCONF should be used only by knowledgable users

Description
GETCONF retrieves system configuration data that was configured by SETCONF.

Note
Some keys relate to data that is set by the system and not by SETCONF, for
keys set by SETCONF see Table 63.

Syntax
GETCONF(key,index)
Arguments

key Specifies the configured feature.


index Specifies the axis, buffer, or type of information requested.

Version NT 2.20 365 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Return Value
GETCONF return values are described in Table 60 according to key.

Table 60 GETCONF Return Values (page 1 of 3)


Key Value - Bit and Explanation
26 Returns the mask that determines, for each digital input, whether the leading or trailing
signal edge triggers an interrupt.
The mask contains a bit for each available input signal. The location of bits in the mask
corresponds to the location of bits in variable IN0.
For each bit:
1: The controller generates an interrupt on the falling edge of the corresponding input
signal.
0: Controller generates an interrupt on the rising edge of the corresponding input
signal.
After power-up, all bits in the mask = 0.
29 Returns 0 or 2 according to the current assignment of the specified output.
2: Brake - output supplies the brake control signal
0: Output follows the corresponding bit of OUT0
As set by SETCONF.
37 Returns the mask that determine whether a digital input triggers on a single edge, or
on both edges. If value = 0, the trigger edge is determined by key 26.
The location of bits in the mask corresponds to the location of bits in variable IN0.
1: The controller generates an interrupt on both edges.
0: The controller generates an interrupt on one edge.
After power-up the mask contains 0 in all bits.
71 Used to view the actual assignment of digital outputs to PEG states and PEG pulses
outputs.
Returns the bit code according to Table 15 or Table 16 for SPiiPlusNT/DC-
LT/HP/LD-x, or Table 17 for SPiiPlus CMnt-x-320/UDMpm-x-320, depending on
the axis.
72 Used to view the actual encoder PEG engine assignment.
Returns the bit code according to according to or Table 19 or Table 20 for
SPiiPlusNT/DC-LT/HP/LD-x, or Table 21 for SPiiPlus CMnt-x-320/UDMpm-x-320,
depending on the axis.
73 Used to view the actual output pins assignment for PEG engines.
Returns the bit code according to Table 22 or Table 23,for SPiiPlusNT/DC-
LT/HP/LD-x, or Table 24 or Table 25 for SPiiPlus CMnt-x-320/UDMpm-x-320,
depending on the axis.
99 Index = 0:
Returns number of regular ACSPL+ program buffers.
Index = 7:
Returns total number of axes to which the current is configured.
Index = 8:
Returns the maximum number of data bytes in the SAFE format message.
203 Returns the value of MFLAGS.1 (Open Loop)
1: Open loop
0: Not open loop

Version NT 2.20 366 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Table 60 GETCONF Return Values (page 2 of 3)


Key Value - Bit and Explanation
204 Returns the value of MFLAGS.9 (Commutation OK).
1: Commutation OK)
0: Commutation not OK)
214 Only valid for brushless motors (MFLAGS.8 = 1).
Returns the commutation phase (degrees) at the current point.
216 Only valid for brushless motors (MFLAGS.8 = 1).
Returns the commutation state (MFLAGS.9):
0: Commutation is not OK (not initialized)
1: Commutation is OK.
229 Returns the mechanical brake output:
1: Mechanical brake is inactive
0: Mechanical brake is active
246 Upon receipt of a Drive Alarm signal, the controller stores a general Drive Alarm code
(5019) in the MERR variable. The extended Drive Fault status code can be obtained
by executing GETCONF(246, Axis).
The following extended Drive Fault statuses are supported (the MERR code
appears in brackets) by the DDM3U Motor Drive:
 Drive Alarm (5060)
 Drive Alarm: Short circuit (5061)
 Drive Alarm: External Protection Activated (5062)
 Drive Alarm: Power Supply Too Low (5063)
 Drive Alarm: Power supply too high (5064)
 Drive Alarm: Temperature too high (5065)
 Drive Alarm: Power Supply 24VF1 (5066)
 Drive Alarm: Power Supply 24VF2 (5067)
 Drive Alarm: Emergency Stop (5068)
 Drive Alarm: Power down (5069)
 Drive Alarm: Phase lost. (5070)
 Drive Alarm: Drive not ready (5071)
 Drive Alarm: Over current (5072)
 Not in used (reserved) (5073)
 Drive Alarm: Damper is not ok (5074)
 Drive Alarm: Digital Drive Interface not Connected (5075)
Using the GETCONF function, the faults 5064, 5065, 5069, 5071 can be read before
the ENABLE command is executed.
Note The GETCONF function provides a delay until the extended
Drive Fault is received. This behavior differs from the implementation in
SPiiPlus PCI-DDM4 and SPiiPlus CM, where the extended Drive Fault
status is stored in MERR immediately upon receipt of the Drive Alarm
signal.
262 Returns the current Hall state, which can be 0, 1, 2, 3, 4, or 5, of the axis given by
axis_def (a number: 0, 1, 2, ... up to the number of axes in the system minus 1). It
returns -1 for invalid states.

Version NT 2.20 367 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Table 60 GETCONF Return Values (page 3 of 3)


Key Value - Bit and Explanation
265 When a SIN-COS encoder is used, there are rare cases in which a homing repeatability
error of 1 quadrant (quarter of a sine-period) may occur. This key is used for
supporting SIN-COS repeatability. For example:
!!!Original homing procedure here
...
TILL IST(AXIS).#IND; !Index was found
! Move to a middle of a quadrant, close to the index location
PTP(AXIS), IND(AXIS) + POW(2,(E_SCMUL(AXIS)-3))*EFAC(AXIS)
TILL ^MST(AXIS).#MOVE
WAIT 1000
! Repeatability correction
SET FPOS(AXIS) = FPOS(AXIS) - IND(AXIS) - GETCONF(265,AXIS)
PTP(AXIS), 0 ! 0 = index location
301 Returns the size of the segment queue in segmented motions (MPTP...ENDS,
MSEG...ENDS, PATH...ENDS, PVSPLINE...ENDS).
310 Returns an integer value that contains the TCP/IP address currently assigned to the
controller. The index argument has to be zero, for example,
GETCONF(310, 0)
If a TCP/IP protocol is not configured, or not supported, the return value is zero.

COM Library Methods


GetConf
C Library Functions
acsc_GetConf
Examples
Example 1:

?B/GETCONF(229,0)
Returns the following mask:
00000000,00000000,00000000,00000001
Reports the actual state of the mechanical brake for the given axis. The output is presented in
binary base (/B).
Example 2:

?X/GETCONF(229,0)
Output:
00000001
Reports the actual state of the output pins of the mechanical brake for the given axis in
hexidecimal format.
Example 3:

?X/GETCONF(310,0)
Output:
6e00000a

Version NT 2.20 368 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

The address of a controller whose TCP/IP address is 10.0.0.100

3.3.2 SYSINFO
Description
SYSINFO retrieves a value related to the SPiiPlus controller system based on the argument that
is specified.
Syntax
SYSINFO(Int)
Arguments

Int A positive integer ranging between 1 to 16.

Return Value
Returns a value based on the specified Int.
The possible values of Int and the associated return values are given in Table 61:

Table 61 SYSINFO Return Values


Int Value Returned
1 The SPiiPlus model number.
A returned value of < 0 means that the connection is to the Simulator.
2 The SPiiPlus version number.
10 Number of regular ACSPL+ program buffers.
11 D-Buffer index.
13 Total number of axes in the current configuration, whether a single
SPiiPlus controller or an EtherCAT network.
14 Number of EtherCAT nodes
15 Number of data collection channels per DSP.
16 EtherCAT support:
1 - Yes
0 - No

COM Library Methods


None
C Library Functions
acsc_SysInfo

Version NT 2.20 369 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

3.3.3 GETVAR
Description
GETVAR retrieves a value from a variable (ACSPL+ or user-defined variable, scalar or array)
that was declared as a Tag number.
Syntax
GETVAR( Tag, [Index1, Index2])
Arguments

Tag The variable Tag number (positive integer)


Index1, Index2 If the variable is an array, the indexes point to the specific location in the
array.
If the variable is scalar, omit the indexes.

Return Value
Returns the value of the variable specified by the Tag.
Example

GLOBAL REAL TAG 1001 EE(2)(2)


!Defines user variable array EE as Tag 1001.
SETVAR (15,1001,1,1) !Sets value 15 to user variable array
!described in Tag 1001 cell (1)(1).
DISP GETVAR (1001,1,1) !Display the value in user variable array
!designated by Tag 1001 cell (1)(1).
STOP !Ends program

The controller displays the return value of the GETVAR function which is = 15.

3.3.4 SETCONF

Advanced
SETCONF should be used only by knowledgable users.

Description
SETCONF defines system configuration data.
All the keys that can be set by SETCONF listed in Table 63 can also be retrieved by
GETCONF.
Syntax
SETCONF(key,index,value)

Version NT 2.20 370 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Arguments

key Specifies the configured feature.


index Specifies axis or buffer number.
value The set of bit states for the defined key. value is set up according to a
16-bit binary template, illustrated in Table 62. The controller strips all
leading zeros. The controller understands value in binary, hexidecimal,
or decimal format.
The following prefixes determine value format:
0B - binary
0H - hexidecimal
A decimal value does not require any prefix.

Table 62 16-bit Binary value Template


Bit 31 30 29 28 27 ... 6 5 4 3 2 1 0
Prefix [0B] | [0H] value 0 0 0 0 0 ... 0 0 0 0 0 0 0

SETCONF arguments are detailed in Table 63.

Table 63 SETCONF Arguments (page 1 of 7)


Key Index Value - Bit and Explanation
26 Don’t Care Sets the mask that determines, for each digital input, whether
the leading or trailing signal edge triggers an interrupt.
The mask contains a bit for each available input signal. The
location of bits in the mask corresponds to the location of bits
in variable IN0.
For each bit -
1: The controller generates an interrupt on the falling edge of
the corresponding input signal.
0: Controller generates an interrupt on the rising edge of the
corresponding input signal.
After power-up, all bits in the mask = 0.
29 A six digit number: The following decimal values assign the specified output bit to
AANNOO, where: one of the following functions according to the value
 AA - is the axis argument:
designation (00- 2: Output supplies the brake control signal
99) 0: Cancel assignment for the axis, that is, output reverts to
 NN - digital digital output
output index
(00-99)
 OO - specific
output (00-99)

Version NT 2.20 371 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Table 63 SETCONF Arguments (page 2 of 7)


Key Index Value - Bit and Explanation
37 Don’t Care Sets the mask that determine whether a digital input triggers on
a single edge, or on both edges. If value = 0, the trigger edge is
determined by key 26.
The location of bits in the mask corresponds to the location of
bits in variable IN0.
1: The controller generates an interrupt on both edges.
0: The controller generates an interrupt on one edge.
After power-up the mask contains 0 in all bits.
203 Axis: Sets the value of MFLAGS.1 (Open Loop)
0, 1, 2, ..., up to total 1: Open loop
number of axes in 0: Not open loop
system minus 1
204 Axis: Sets the value of MFLAGS.9 (Commutation OK).
0, 1, 2, ..., up to total 1: Commutation OK
number of axes in 0: Commutation not OK
system minus 1
214 Axis: Valid only for brushless motors (MFLAGS.8 = 1).
0, 1, 2, ..., up to total SETCONF with the 214 key sets the commutation offset at the
number of axes in current position to the specified value (in degrees).
system minus 1 There are, however, two cases that have to be considered when
using SETCONF:
 Motor Not Commutated (MFLAGS.9=0)
If the motor has not yet been commutated, SETCONF sets
the commutation offset at the current position to the value
specified by the value argument.
 Motor Commutated (MFLAGS.9=1)
The behavior of SETCONF for commutated motors in
SPiiPlus NT controllers is different fromthat in non-NT
SPiiPlus controllers. For NT controllers once a motor is
commutated, the commutation phase has an additional 90o.
SETCONF modifies the commutation phase prior to this
90o addition. Therefore, to change the commutation phase
of a commutated motor, it is recommended that the user
enter ?GETCONF(214,axis) in the Communication
Terminal and subtract 90 from the returned value. From
this the user can calculate what the value of the value
argument should be to get the proper phase.

Version NT 2.20 372 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Table 63 SETCONF Arguments (page 3 of 7)


Key Index Value - Bit and Explanation
216 Axis: Valid only for brushless motors (MFLAGS.8 = 1).
0, 1, 2, ..., up to total If value = 1:
number of axes in  MFLAGS.9=0 (Commutation is not OK)
system minus 1  MFLAGS bits 1, 4, 5, 6 are set to zero
 MFLAGS.8 is set to 1
 DCOM is reset to zero
 Sets RPOS = FPOS
If value = 0:
 MFLAGS.9=0 (Commutation is not OK)
 MFLAGS bits 1, 4, 5, 6 are set to zero
 MFLAGS.8 is set to 10
 Variable DCOM is reset to zero.
217 Axis: Valid only for brushless motors (MFLAGS.8 = 1) where the
0, 1, 2, ..., up to total encoder has encountered the index and IND contains a valid
number of axes in value.
system minus 1 value: Not Relevant.
 Adjusts the commutation offset so that the commutation
phase at the last index point is equal to the specified value
in degrees.
 MFLAGS.9=0 (Commutation is not OK)
 MFLAGS bits 1, 4, 5, 6 are set to zero
 MFLAGS.8 is set to 1
 DCOM is reset to zero
 Sets RPOS = FPOS
229 Axis: Mechanical brake output:
0, 1, 2, ..., up to total 1: Deactivates mechanical brake output.
number of axes in 0: Activates mechanical brake output. The motor must be
system minus 1 disabled to execute this setting.
230 Axis: Safety system configuration -
0, 1, 2, ..., up to total 1: Enable safety system configuration
number of axes in 0: Disable safety system configuration
system minus 1 After power-up, the safety system configuration is disabled.
The user must enable the safety system configuration for a
motor before executing any SETCONF function with from key
231 to key 236.
An index designation of -1 selects all axes.

Version NT 2.20 373 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Table 63 SETCONF Arguments (page 4 of 7)


Key Index Value - Bit and Explanation
231 Axis: Sets variables SAFINI and S_SAFINI that control inversion of
0, 1, 2, ..., up to total safety inputs.
number of axes in Only the following bits that correspond to safety inputs are
system minus 1 meaningful:
 0 (#LL) - Left Limit
 1 (#RL) - Right Limit
 9 (#DRIVE) - Drive Alarm
 28 (#ES) - Emergency Stop
where:
1: Defines inversion of the input signal
0: Defines no inversion of the input signal
An index designation of -1 selects all axes.
232 Axis: Sets variables FMASK and S_FMASK that enable fault
0, 1, 2, ..., up to total detection. For each fault there is a corresponding bit in value
number of axes in word. The bit value controls the fault detection as follows:
system minus 1 1: Enables the fault detection
0: Disables the fault detection
An index designation of -1 selects all axes.
233 Axis: Sets variables FDEF and S_FDEF that enable default
0, 1, 2, ..., up to total controller response to faults.
number of axes in For each fault there is a corresponding bit in value word. The
system minus 1 bit value controls the response to the corresponding fault as
follows:
1: Enable the default controller response for the fault
0: Disable the default controller response for the fault
An index designation of -1 selects all axes.
234 Axis: Sets an internal mask that determines if the axis defined by
0, 1, 2, ..., up to total index responds to a fault that occurs on any other motor.
number of axes in Only motor fault bits are meaningful in the value word since
system minus 1 the response to a system fault always involves all motors.
1: The motor responds to a fault detected for any motor.
0: The motor responds to a fault detected only for the motor
defined by index.
An index designation of -1 selects all axes.
235 Axis: Sets an internal mask for the controller response to KILL -
0, 1, 2, ..., up to total 1: Response to KILL is enabled
number of axes in 0: Response to KILL is disabled
system minus 1 If a response to both KILL and DISABLE is enabled, the
controller first performs KILL and only then disables the
motor.
An index designation of -1 selects all axes.

Version NT 2.20 374 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Table 63 SETCONF Arguments (page 5 of 7)


Key Index Value - Bit and Explanation
236 Axis: Sets an internal mask for the controller response to DISABLE -
0, 1, 2, ..., up to total 1: Response to DISABLE is enabled
number of axes in 0: Response to DISABLE is disabled
system minus 1 If a response to both KILL and DISABLE is enabled, the
controller first performs KILL and only then disables the
motor.
An index designation of -1 selects all axes.
246 Axis: SETCONF(246, Axis, 0) is used to clear the fault status on all
0, 1, 2, ..., up to total axes that relate to the DDM3U Motor Drive that handles the
number of axes in specified axis.
system minus 1 Note:
The FCLEAR command does not clear the fault status in the
MC4U, SETCONF(246, Axis, 0) has to be used instead.
249 Axis: There are situations where automatic current bias measurement
0, 1, 2, ..., up to total (in ACS control modules) can lead to problems. For example,
number of axes in when running an air bearing stage, the automatic current offset
system minus 1 measurement may be inconsistent with every enable due to air
bearing stage movement or drift during enable. Thus any small
offset can create a relatively large oscillation during constant
velocity.
SETCONF(249, Axis, 0) disables the automatic current bias
measurement for the given axis.
302 2 The following decimal values specify a communication
1 channel for special input:
3: Set the channel to Modbus Master mode.
2: Set the channel to Modbus Slave mode
1: Assigns the channel for special input.
0: Set the channel to regular command processing mode
(default channel mode).
If a channel is assigned for special input, the controller does not
process commands from this channel. Output to the channel is
provided by regular DISP and SEND commands.
index specifies the channel.
303 2 The value sets the baud rate for the specified serial channel,
1 where the baud rate is the decimal value.
115200 (default), 57600, 19200, 9600, 4800, 2400, 1200, 600,
300.
index specifies the channel.

Version NT 2.20 375 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Table 63 SETCONF Arguments (page 6 of 7)


Key Index Value - Bit and Explanation
304 2 Sets communication options:
1 Bit 2 -
1: extended stop bit
0: normal stop bit
Bit 3 -
1: check parity
0: no parity
Bit 4 -
1: even parity
0: odd parity
index specifies the channel.
308 19 When the controller acts as a Modbus Master, the function
18 establishes or closes the Modbus TCP connection with the
17 Slave device using the specified slaveIP. Up to three slaves can
be connected to the master controller (17, 18 or 19).
Value=SlaveIP.
The slaveIP value specifies the Modbus Slave device IP
address. The slaveIP address is calculated as follows: If the
Slave has the following address: 192.168.1.10, the slaveIP
parameter should be 10*2^24 + 1*2^16 + 168*2^8 + 192 =
167880896 (0x0A01A8C0).
If the specified channel is already open, the function closes the
opened channel and then opens new one.
If slaveIP is zero, the function closes the TCP connection.
309 Don’t Care Defines the sequence for the two 16-bit Modbus interface
registers -
1: Low word will be first, then high word
0: High word will be first, then low word (default
configuration)

Version NT 2.20 376 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Table 63 SETCONF Arguments (page 7 of 7)


Key Index Value - Bit and Explanation
310 0 Used for providing access to the controller TCP/IP address.
Where:
Value = TCP/IP Address, which is a 32-bit (four bytes) integer,
each byte of which contains one part of the TCP/IP address, for
example, 0x6400000a assigns address 10.0.0.100 (the number
is read from right to left and fills in the address left to right).
If value is zero, SETCONF activates a new execution of the
DHCP protocol and obtains a new TCP/IP address from the
host (the host may configure the same address as before).
SETCONF does not change the TCPIP variable. After power-
up, the controller is initialized with the TCP/IP address set in
the TCPIP variable.
There are several limitations when using SETCONF(310):
 If the TCPIP variable stored in the flash is zero,
SETCONF(310) must be used only with zero address
argument. In other words, if the controller is configured for
dynamic addressing, assigning static addresses is not
allowed.
 If the TCPIP variable stored in the flash is not zero,
SETCONF(310) must be used only with non-zero address
arguments. In other words, if the controller is configured
for static addressing, switching to a dynamic address is not
allowed.
 SETCONF(310) has a long execution time. During this
time, communication with the controller is impossible
using any communication channel. Use SETCONF(310)
only within the controller initialization sequence. Avoid
attempts to communicate with the controller and the motor
ENABLE command or motion commands while
SETCONF(310) is in progress.

Return Value
None
COM Library Methods
SetConf
C Library Functions
acsc_SetConf
Example
The following example illustrates setting the mechanical brake of axis 4 as digital output 1 bit 1:

SETCONF(29, 040101,2)

Version NT 2.20 377 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

3.3.5 SETVAR
Description
SETVAR writes a value to an ACSPL+ or user variable, scalar or array, that was declared as a
Tag number.
Syntax
SETVAR(value, Tag, [Index1, Index2])
Arguments

value A real or integer value assigned to the variable.


Tag The variable Tag number (positive integer).
Index1, Index2 If the variable is an array, the indexes point to the specific location in the
array.
If the variable is scalar, omit the indexes.

Return Value
None
Error Conditions
None
Example

GLOBAL REAL TAG 1001 EE(2)(2) !Defines user variable array EE as Tag 1001
SETVAR (15,1001,1,1) !Sets value 15 to user variable array
!described in Tag 1001 cell (1)(1).
DISP GETVAR (1001,1,1) !Retrieves the value in user variable array
!described in Tag 1001 cell (1)(1).
STOP !Ends program

The controller displays the GETVAR return value which is = 15.

3.3.6 STR
Description
STR converts an integer array to a string. Each element of the array is interpreted as an ASCII
character.
Syntax
string STR(array_name,[start_index,] [number])

Version NT 2.20 378 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Arguments

array_name Name of user-defined integer array.


start_index Index in the array from which to start converting.
number Number of characters to convert.

Comments
If an element value is in the range from 0 to 255, it is directly converted to the corresponding
ASCII character. Otherwise, the value will be cyclic, based on 256.
If start_index is omitted, the assignment starts from the first element of the array.
If neither start_index nor number is specified, the conversion takes all elements of the array.
If only start_index is specified, the conversion takes all characters from the specified index
until the end of the array. number limits the number of characters in the resulting string.
Return Value
String composed of the array elements interpreted as characters.
Example

GLOBAL INT BIBI(3)


BIBI(0)=65
BIBI(1)=67
BIBI(2)=83
DISP STR(BIBI)
STOP

The function transforms each of the array members of BIBI to ASCII code characters. When
DISP is applied, the displayed value will be: “ACS”

3.3.7 STRTONUM
Description
This function converts ASCII encoded element string to a number.
Syntax
double STRTONUM(Source, Type, From, N)
Arguments

Source An integer array

Type Designates the format of the converted number, it can be:


 0 - decimal
 1- hex
 2 - floating point

Version NT 2.20 379 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

From Index of the first element in the array that may contain the number

N The number of elements in source that may be used

Return Value
The number converted from the ASCII string
Example

real number
int string(4);
number = 0
string(0) = 49; !1
string(1) = 50; !2
string(2) = 46; !.
string(3) = 50; !2
number = strtonum(string, 0, 0, 4);
disp"number = %f", number;
number = strtonum(string, 1, 0, 4);
disp"number = %f", number;
number = strtonum(string, 2, 0, 4);
disp"number = %f", number;
stop
! output:
! number = 12.000000
! number = 18.000000
! number = 12.200000

3.3.8 NUMTOSTR
Description
This function converts a number to a string of elements where each element is an ASCII
encoded value.
Syntax
int NUMTOSTR(Number, Target, Type, From, N)
Arguments

Number The number to be converted

Target An integer array used in which to put the results

Type Designates the format of the number to be converted, it can be:


 0 - decimal
 1- hex
 2 - floating point

From Index of the first element in the array that may contain the number

N The number of elements in target that may be used

Version NT 2.20 380 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Return Value
The number of elements used.
Example

real number
int target(12);
int i;
int j;
number = 12.2
i=0; loop 12 target(i) = 0; i = i+1; end;
j = numtostr(number,target,0,0,12)
disp "target = %X,%X,%X,%X,%X num elements = %d",
target(0),target(1),target(2),target(3),target(4), j
i=0; loop 12 target(i) = 0; i = i+1; end;
j = numtostr(number,target,1,0,12)
disp "target = %X,%X,%X,%X,%X num elements = %d",
target(0),target(1),target(2),target(3),target(4), j
i=0; loop 12 target(i) = 0; i = i+1; end;
j = numtostr(number,target,2,0,12)
disp "target = %X,%X,%X,%X,%X num elements = %d",
target(0),target(1),target(2),target(3),target(4), j
stop
! output:
! target = 31,32,0,0,0 num elements = 2
! target = 63,0,0,0,0 num elements = 1
! target = 31,32,2E,32,30 num elements = 9

3.3.9 BCOPY
Description
This function can be used to copy bytes from the source array to the target array.
Syntax
int BCOPY(Source_array, Target_array, CopyBytes, S_SkipBytes, T_SkipBytes, From, N)
Arguments

Source_array Array containing input data


Target_array Array containing output data
CopyBytes Number specifying how many bytes will each copy operation
S_SkipBytes Number specifying how many bytes will be skipped in the source array
following each copy operation
T_SkipBytes Number specifying how many bytes will be skipped in the target array
following each copy operation
From Index of the first element in the source array that may be used
N The number of elements in the source that may be used

Version NT 2.20 381 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Return Value
The number of elements (in the source) used.
Comments
The function copies CopyBytes from the source array to the target array, skip S_SkipBytes in
the source and skip T_SkipBytes in the target, and then copy CopyBytes again. The operation
starts from the From element in source and is applied to a maximum of N elements. This means
no bytes from any element other than the specified N elements will be affected. Elements less
than N can be affected if the target array is too short to complete the whole operation.
The difference between elements and bytes throughout this function should be noted.
Examples
In the examples that follow use is made of:
bcopy(source,target,1,3,0) - Copy every 4 byte element from source to a 1 byte element in target
bcopy(source,target,2,2,0) - Copy every 4 byte element from source to a 2 byte element in target
bcopy(source,target,1,0,3) - Copy every 1 byte element from source to a 4 byte element in target
bcopy(source,target,2,0,2) - Copy every 2 byte element from source to a 4 byte element in target
1. Unpacking a single element in source to 1, 2, or 4 elements in target

int source(1)
int target(4)
int j
source(0) = 0x01020304;
j = bcopy(source,target,4,0,0,0,1) => target = 1020304,0,0,0 num elements = 1
j = bcopy(source,target,2,0,2,0,1) => target = 304,102,0,0 num elements = 1
j = bcopy(source,target,1,0,3,0,1) => target = 4,3,2,1 num elements = 1

stop

2. Packing multiple elements in source to 1 element in target.

int source(4)
int target(1)
int i
int j
target(0) = 0;
i = 0
loop 4
source(i) = 1;
i=i+1;
end
j = bcopy(source,target,4,0,0,0,4) => target(0) = 1 j = 1
j = bcopy(source,target,2,2,0,0,4) => target(0) = 10001 j = 2
j = bcopy(source,target,1,3,0,0,4) => target(0) = 1010101 j = 4
stop

Version NT 2.20 382 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

3.4 EtherCAT Functions


EtherCAT functions include:

ECCLRREG Clears the contents of error counters registers.


ECGETREG Gets the contents of ESCs error counters registers.
ECIN Copies the EtherCAT network input variable to an ACSPL+ variable.
ECOUT Copies ACSPL+ variable to EtherCAT network output variable.
ECGETSLAVES Returns the number of slaves in an EtherCAT network.
ECUNMAP Resets mapping of ECIN and ECOUT.
ECUNMAPIN Resets mapping of ECIN of a specified offset.
ECUNMAPOUT Resets mapping of ECOUT of a specified offset.

3.4.1 ECCLRREG
Description
ESC Error Counters Registers Clear. The ECCLRREG function clears the contents of the error
counters registers.
Syntax
void ECCLRREG(index,offset)
Arguments

Index EtherCAT slave index.


Offset Register offset in the Beckhoff memory.

Return Value
None
Comments
When the Offset value is -1, all error counters in all slaves are cleared. Otherwise, only the
specific register at the specified Offset is cleared.
After executing the ECCLRRG function, we recommend to execute the FCLEAR function
without parameters before running ECGETREG.
Example
Run the following code example in a Program Buffer.
ECCLRREG(0,0x310)
FCLEAR
STOP
You can also enter this code in the SPiiPlus MMI Application Studio Connection Terminal:
ECCLRREG(0,-1).

Version NT 2.20 383 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

3.4.2 ECGETREG
Description
ESC Error Counters Registers (Beckhoff Memory). The ESCs have numerous error counters
that help you detect and locate errors. The ECGETREG function enables you to view the
contents of these registers.
Syntax
int ECGETREG(index,offset)
Arguments

Index EtherCAT slave index.


Offset Register offset in the Beckhoff memory.

Return Value
None
Comments
The following table lists supported error counter registers.

Table 64 Supported Error Counter Registers


Offset Name Description
0x300 Port Error Counter (CRC A) Error Counted at the Auto-Forwarded (per port).
Each register contains two counters:
 Invalid Frame Counter: 0x300/2/4/6
 RX Error Counter: 0x301/3/5/7
0x302 Port Error Counter (CRC B)
0x304 Port Error Counter (CRC C)
0x306 Port Error Counter (CRC D)
0x308 Forwarded RX Error Counter Invalid frame with marking from previous ESC
(CRC A/B) detected (per port).
0x309 Forwarded RX Error Counter
0x30A Forwarded RX Error Counter
(CRC C/D)
0x30B Forwarded RX Error Counter
0x30C ECAT Processing Unit Error Invalid frame passing the EtherCAT Processing
Counter Unit (additional checks by processing unit).
0x30D PDI Error Counter Physical Errors detected by the PDI.
0x310 Lost Link Counter, Port A (IN) Link Lost events (per port).
0x311 Lost Link Counter, Port B
(OUT)

Version NT 2.20 384 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Table 64 Supported Error Counter Registers


Offset Name Description
0x312 Lost Link Counter, Port C
0x313 Lost Link Counter, Port D

Note If a cable is unplugged, we recommend using the FCLEAR command before


using ECGETREG.
The mapping is allowed only when stack is operational.

Example
Run the following code example in a Program Buffer.
I0=ECGETREG(0,0x310)
STOP
You can also enter this code in the SPiiPlus MMI Application Studio Connection Terminal:
?ECGETREG(0,0x310).

3.4.3 ECIN
Description
This function is used to copy the EtherCAT network input variable at the corresponding
EtherCAT offset into the specified ACSPL+ variable.
Syntax
ECIN(int offset, Varname)
Arguments

offset Internal EtherCAT offset of network variable derived from the SPiiPlus MMI
Application Studio Communication Terminal ETHERCAT command.
Varname Valid name of ACSPL+ variable, global or standard.

Return Value
None
Comments
Once the function is called successfully, the Firmware copies the value of the network input
variable at the corresponding EtherCAT offset into the specified ACSPL+ variable, every
controller cycle.
There is no restriction on number of mapped network variables.

Version NT 2.20 385 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Note
The mapping is allowed only when stack is operational.

In the event of wrong parameters or stack state, the function will produce a corresponding
runtime error.
COM Library Methods
None
C Library Functions
acsc_MapEtherCATInput
Example
ECIN(26,V0)

This maps the network variable at offset 26 to the global real variable: V0.

3.4.4 ECOUT
Description
This function is used to copy the value of ACSPL+ variable into the network output variable at
the corresponding EtherCAT offset.
Syntax
ECOUT(int offset, Varname)
Arguments

offset Internal EtherCAT offset of network variable derived from the SPiiPlus MMI
Application Studio Communication Terminal ETHERCAT command.
Varname Valid name of ACSPL+ variable, global or standard.

Return Value
None
Comments
Once the function is called successfully, the Firmware copies the value of the specified
ACSPL+ variable network input variable into the given EtherCAT offset, every controller
cycle.
There is no restriction on number of mapped network variables.

Version NT 2.20 386 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Note
The mapping is allowed only when stack is operational.

In the event of wrong parameters or stack state, the function will produce corresponding
runtime error.
COM Library Methods
None
C Library Functions
acsc_MapEtherCATOutput
Example
ECOUT(98,V1)

This maps the network variable at offset 98 to the global real variable: V1.

3.4.5 ECGETSLAVES
Description
This function is used to retrieve the number of slaves in an EtherCAT network.
Syntax
ECGETSLAVES
Arguments
None
Return Value
Number of EtherCAT slaves in the network.
Comments
If a slave was added or removed, the ECRESCAN command should be used before using
ECGETSLAVES again.

3.4.6 ECUNMAP
Description
This function is used to reset all previous mapping defined by ECIN and ECOUT.
Syntax
ECUNMAP
Arguments
None

Version NT 2.20 387 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Return Value
None
Comments
The mapping is allowed only when stack is operational.
COM Library Methods
None
C Library Functions
acsc_UnmapEtherCATInputsOutputs

3.4.7 ECUNMAPIN
Description
This function is used to reset all previous mapping defined by ECIN to a specfic offset.
Syntax
ECUNMAPIN(ECOffset)
Arguments

ECOffset An integer providing the offset to which a variable was mapped using ECIN.

Return Value
None
Comments
The mapping is allowed only when stack is operational.
Example
Given the previous execution of ECIN(48,I0), ECUNMAPIN(48) will unmap only I0.

3.4.8 ECUNMAPOUT
Description
This function is used to reset all previous mapping defined by ECOUT to a specfic offset.
Syntax
ECUNMAPOUT(ECOffset)
Arguments

ECOffset An integer providing the offset to which a variable has been mapped by
ECOUT.

Return Value
None

Version NT 2.20 388 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Example
Assuming previous execution of ECOUT(48,I0) and ECOUT(50,I1), executing
ECUNMAPOUT(48) will unmap only I0.

Version NT 2.20 389 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

3.5 CoE Functions


CoE functions are required for SDO transfers in CoE. SDO are part of the cyclic EtherCAT data
transfer. It is impossible to define a generic function for any kind of mailbox transfer, as
protocols like EoE, FoE and VoE have their own definitions. So CoE is supported first.

Note
The SPiiPlus MMI Application Studio Communication Terminal
ETHERCAT command reports for every slave if it has Mailbox support.

The CoE functions are:

Function Action
COEREAD Read CoE slave Object Directory entry.
COEWRITE Write into CoE slave Object Directory.

3.5.1 COEREAD
Description
This function is used to read Object Dictionary entry from CoE slave.
Syntax
COEREAD[/size] (int slave,int Index,int Subindex)
Arguments

size 1/2/4 number of bytes in the Object Dictionary or /f for floating.


slave Slave number (which can be obtained by running the SPiiPlus MMI
Application Studio Communication Terminal ETHERCAT command).
Index Index in the Object Dictionary.
Subindex Sub-index in the Object Dictionary.

Return Value
Returns the value stored in the variable in the specified Index of the Object Dictionary.
Comments
In case of wrong parameters, the corresponding runtime error will be generated. The function
cannot be used in the Communication Terminal. The function delays the buffer execution on
its line until it is successful or fails the whole buffer with timeout or other error.
COM Library Methods
None
C Library Functions

Version NT 2.20 390 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

None
Example
COEREAD/4 (0,0x6040,0)

This reads 4 bytes from slave 0, at Index 0x6040, Subindex 0 and returns the value that is
stored in the variable at this Index.

3.5.2 COEWRITE
Description
This function is used to write a value into the CoE slave Object Dictionary.
Syntax
COEWRITE[/size] (int slave,int Index,int Subindex,double Value)
Arguments

size 1, 2 or 4 - the number of bytes in the Object Dictionary or /f for floating.


slave Slave number (which can be obtained by running the SPiiPlus MMI
Application Studio Communication Terminal ETHERCAT command)
Index Index in the Object Dictionary.
Subindex Sub-index in the Object Dictionary.
Value The value to be written.

Return Value
None
Comments
In case of wrong parameters, the corresponding runtime error will be generated. The function
cannot be used in the Communication Terminal. The function delays the buffer execution on
its line until it is successful or fails the whole buffer with timeout or other error.
COM Library Methods
None
C Library Functions
None
Example
COEWRITE/4 (0,0x6041,0,0x0)

This writes the Value 0 (4 bytes) into slave 0, at Index 0x6041, Subindex 0.

Version NT 2.20 391 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

3.6 Servo Processor Functions


SPiiPlus™, a proprietary ACS Motion Control Servo Processor (SP), executes the real-time
tasks such as implementation of the real time control algorithms. Each SPiiPlus can control
from two to eight axes (depending on the product). The SPiiPlus includes all the necessary
peripherals that are needed for a high performance axis control, such as encoder counters,
Digital-to-Analog interface, smart inputs and outputs.
Servo Processor functions are used to read and monitor SP values.

Model
The number of Servo Processors is model-dependent. Check the controller
Hardware Guide for the specific SPiiPlus model.

The Servo Processor functions are:

Function Action
GETSP Reads a value from the specified SP address
GETSPA Retrieves address of the SP variable specified by name.
GETSPV Reads a value from the specified SP variable name
MONSP Initiates monitoring of the specified SP address through analog output
MONSPV Initiates monitoring of the specified SP variable name through analog
output
SETSP Sets a value for the specified SP address
SETSPV Sets a value for the specified SP variable name

Version NT 2.20 392 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

3.6.1 GETSP
Description
GETSP reads a value from the specified SP address.
The read value is treated as a signed integer number.
The function returns immediately if the address lies in an area accessible directly from MPU,
otherwise the function is delayed by one MPU cycle.
Syntax
int GETSP(int SP, int Address)
Arguments

SP The SP number in the controller. Legal values range from zero to 3,


depending on the controller model.
Address Address within the SP.
Look up addresses by entering the command: #SI in the SPiiPlus MMI
Application Studio Communication Terminal.

Note
For Address it is recommended using the memory address as obtained by
GETSPA.

Return Value
Integer - The current value read from the specified SP address.
Error Conditions
The function causes an error if an SP number is specified other than 0–3, or if an illegal address
is specified.
Example

REAL PAR_ADDRESS
PAR_ADDRESS=GETSPA(0,"PE(0)") ! Get the memory address of PE(0) in SP#0
GETSP(0, PAR_ADDRESS) ! The return value is the PE(0) in SP#0

Version NT 2.20 393 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

3.6.2 GETSPA
Description
GETSPA retrieves the SP address of the specified SP variable.
Syntax
int GETSPA(SP_number, “SP_variable”)
Arguments

SP_number The SP number in the controller, an integer number from 0 to 3.


SP_variable String representing the name of an SP variable. In order to avoid
unexpected results, place SP_variable in quotes.

Return Value
Address of the variable in the SP memory, or -1 if the variable does not exist. The return value
can be used in GETSP, SETSP and MONSP.
Example

XX= GETSPA(0,”0_V_FF”) !Retrieve the address from SP 0 (axes 0 and 2)


!of SP variable X_V_FF, velocity feed forward,
!of axis 0.
!XX=2

3.6.3 GETSPV

Note
This function is obsolete and is replaced by GETSP.

3.6.4 MONSP
Description
MONSP presents the value of an SP variable, specified by its address. The value is presented
through AOUT, and can be observed with an external device such as a scope.
The SP variable can be observed as a voltage level on an external scope. The value can be the
ratio between the maximum voltage level and SP variable voltage level. Where the maximum
voltage level number is 16 bit (215=32768)
The digital value of AOUT is a special monitoring code that doesn't fall between the limits of
±32768 (16 bits). The next assignment to the corresponding AOUT element overwrites the
monitoring code and the analog output returns to displaying the AOUT value.

Version NT 2.20 394 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Syntax
MONSP(int AOUT, int SP_number, int Address, int Shift)
Arguments

AOUT The analog output to which the SP variable content specified by its
address, will be sent.
For each SP there are dedicated analog outputs as follows:
AOUT SP
1, 3 0
5, 7 1
9, 11 2
13, 15 3
SP_number The SP number in the controller, an integer number from 0 to 3.
Address Address within the SP.
Look up addresses by entering the command: #SI in the SPiiPlus MMI
Application Studio Communication Terminal.
Shift Scaling shift of the monitored value. A positive number specifies left
shift, a negative number specifies right shift. See Figure 20, Illustration
of Shift..

Figure 20 Illustration of Shift


Comments
An address from a specific SP can be monitored only through an analog output belonging to the
same SP. This rule applies limitations to possible values of arguments AOUT and SP. Two
addresses from one SP can be monitored simultaneously.
The function overwrites the value stored in the corresponding ACSPL+ AOUT variable with a
special monitoring code. Once SP receives the monitoring code, it starts transferring the value

Version NT 2.20 395 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

from the specified address to the analog output. SP also provides the required scaling shift of
the monitored variable.
The next assignment to the corresponding AOUT element overwrites the monitoring code and
the analog output returns to displaying the AOUT value.
Error Conditions
3149 - Illegal SP address
3126 - Illegal SP number.
3138 - Incompatible SP and analog output
Example

MONSP(1,0,3,0) !The function sends the contents of the SP variable


!that exists in address 3 in SP number 0 to AOUT1.
!There are no cell shifts required. The output of
!AOUT1 on an external scope will be 3.1V.
!The SP variable in address 3 is A_V_FF, and its
!value is 19,660. The maximum AOUT voltage is 5V
!(between AOUT1 and ground) and the resolution is
!16 bit, hence 32768. To obtain the SP A_V_FF value
!from the voltage level - 32768*(3/5)= 19660.

3.6.5 MONSPV
Description
MONSPV presents the value of an SP variable, specified by its name. The value is presented
through AOUT, and can be observed with an external device such as a scope.
The SP argument can be observed as a voltage level on an external scope. The value can be the
ratio between the maximum voltage level and SP variable voltage level. Where the maximum
voltage level number is 16 bit (215=32768)
The digital value of AOUT is a special monitoring code that doesn't fall between the limits of
±32768 (16 Bit). The next assignment to the corresponding AOUT element overwrites the
monitoring code and the analog output returns to displaying the AOUT value.
Syntax
MONSPV(int AOUT, SP_number, int Shift)

Version NT 2.20 396 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Arguments

AOUT The analog output to which the SP variable content specified by its
address, will be sent.
For each SP there are dedicated analog outputs as follows:
AOUT SP
1, 3 0
5, 7 1
9, 11 2
13, 15 3
SP_number The SP number in the controller, an integer number from 0 to 3.
Shift Scaling shift of the monitored value. A positive number specifies left
shift, a negative number specifies right shift. See Figure 20, Illustration
of Shift..

Error Conditions
3149 - Illegal SP address
3126 - Illegal SP number.
3138 - Incompatible SP and analog output
Example

MONSPV(3,SP0:A_V_FF,0) !The function sends the contents of the SP variable


!X_V_FF that exists in SP number 0 to AOUT1.
!There are no cell shifts required. The output of
!AOUT1 on an external scope will be 3.1V.
!The SP variable SP0:A_V_FF value is 19,660. The
!maximum AOUT voltage is 5V (between AOUT1 and
!ground) and the resolution is 16 bit, hence 32768.
!To obtain the SP A_V_FF value from the voltage
!level - 32768*(3/5)= 19660.

Version NT 2.20 397 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

3.6.6 SETSP

Caution
The SETSP function is for advanced users only. Misuse of this function
may damage the controller.

Description
SETSP writes a value to the specified SP address.
Syntax
real SETSP(int SP_number, int Address, int value)
Arguments

SP_number The SP number in the controller, an integer number from 0 to 3.


Address Address within the SP.
Look up addresses by entering the command: #SI in the SPiiPlus MMI
Application Studio Communication Terminal.
value The value to write to the address.

Error Conditions
Error 3126, Illegal SP number.
Example

REAL PAR_ADDRESS
PAR_ADDRESS=GETSPA(0,"X_DZ_MIN") !Gets the memory address of PE(0) in SP #0
SETSP(0, PAR_ADDRESS, 1000) !Changes the value of the DZ_MIN(0) in
!SPii#0 to 1000.

3.6.7 SETSPV

Note
This function is obsolete and is replaced by SETSP.

Version NT 2.20 398 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

3.7 Signal Processing Functions


The Signal Processing functions are:

Function Action
COPY The function copies one array to another.
DEADZONE Implements dead-zone routine
DSIGN Implements a dynamic version of the standard SIGN function.
DSTR Converts a string to an integer array.
EDGE Returns 1 on positive edge of x
INP Reads data characters from the specified channel and stores them into
integer array
INTGR Implements an integrator with DEADZONE and SAT.
LAG Provides delayed switching on argument change (anti-bouncing effect)
MAP Implements a table-defined function with constant step
MAPB Implements a one-dimensional uniform B-spline interpolation
MAPN One-dimensional non-uniform linear interpolation (replaces the
obsolete MAPBY1 and MAPBY2 functions)
MAPS One-dimensional non-uniform linear interpolation (replaces the
obsolete MAPBY1 and MAPBY2 functions)
MAPNB One-dimensional non-uniform b-spline
MAPNS One-dimensional non-uniform Catmull-Rom spline
MAPS One-dimensional uniform Catmull-Rom spline
MAP2 Implements a table-defined function with two arguments and constant
step along each argument.
MAP2B Two-dimensional uniform b-spline
MAP2N Two-dimensional non-uniform linear interpolation (replaces the
obsolete MAP2FREE function)
MAP2NB Two-dimensional non-uniform b-spline
MAP2NS Two-dimensional non-uniform Catmull-Rom spline
MAP2S Two-dimensional uniform Catmull-Rom spline
MATCH Calculates axis position that matches current reference position of the
same axis with zero offset.
RAND Implements a random number generator.
ROLL Calculates a result rolled-over to within one pitch.
SAT Implements a saturation characteristic

Version NT 2.20 399 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

3.7.1 DEADZONE
Description
DEADZONE returns values based on a defined analog or other input signal with a defined
symmetrical or asymmetrical dead zone around zero.

DEADZONE is useful for anti-bouncing effect.


Syntax
DEADZONE (input_signal, zone1[,zone2])
Arguments

input_signal Any real number or integer expression


zone1 Any real number or integer expression for a symmetrical deadzone. See
example.
zone2 Any real number or integer expression, required for an asymmetrical
deadzone requires two values. See example.

Return Value
DEADZONE returns a real number as follows:
If - zone < input_signal < zone, return value = 0
If input_signal < -zone, return value = input_signal + zone
If: input_signal > zone, return value = input_signal - zone
Error Conditions
A negative zone range returns Error 3045, Numerical Error in Standard Function.
Examples
Example 1:
Symmetrical Dead Zone
In this example, illustrated in Figure 21, input_signal ranges from -20: +20, and creates a
symmetrical dead zone from -10: +10.

return_value = DEADZONE(input_signal,10)

Version NT 2.20 400 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Figure 21 Symmetrical Dead Zone Example


Example 2:
Asymmetrical Dead Zone
In this example, illustrated in Figure 22, input_signal ranges from -20: +20, and creates an
asymmetrical dead zone from -5 – +15.

return_value = DEADZONE(input_signal,-5,10)

Version NT 2.20 401 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Figure 22 Asymmetrical Dead Zone Example

3.7.2 DSIGN
Description
DSIGN returns values between -1 to 1 based on a defined input variable with defined delay time
and ramp time.
Syntax
real DSIGN(X, Delay_Time, Ramp_Time)
Arguments

X Input variable name declared as real or real expression.


Delay_Time Real number that determines on zero crossing of X, continues the
previous return value for defined delay time in msec.
Ramp_Time Real number that controls the rate of the returned value change between
-1 to 1 (and vice versa), defined in msec.

Return Values
0: when the input variable is < zero while Ramp Time = 0.
1: when the input variable is > zero while Ramp Time= 0.
-1 to 1: when the input variable changes between positive to negative (or vice versa), while
Ramp_Time is > 0.

Version NT 2.20 402 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Error Conditions
Delay time and ramp time should be positive. If any of them becomes negative, Error 3045,
Numerical Error in Standard Function appears.
Example

REAL XX,YY
YY = DSIGN(XX,50,100)
STOP

Figure 23 illustrates the DSIGN function.

Figure 23 DSIGN Function Example

3.7.3 DSTR
Description
DSTR converts a string to an integer array based on an ASCII transformation code. The
function decomposes a string to characters and assigns the characters to the sequential elements
of the variable array.
Each ASCII character is represented as its numerical value and stored in a separate element of
the array.
Syntax
int DSTR(string, array_name, [start_index,] [number])

Version NT 2.20 403 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Arguments

string String of characters enclosed in double quotation marks.


array_name User-defined integer array.
start_index Index in the array from where the transformed numbers will be placed.
If start_index is omitted, the assignment starts from the first element of
the array.
number Number of characters from the string to be transformed.
If number is omitted, the function assigns all characters of the string. If
number is specified, the function assigns the specified number of
characters. In both cases the assignment stops when the last array element
is reached.

Return Value
The number of actually transformed characters.
Example
In the example below DSTR transforms each of "ACS-Motion_Control" characters to its
corresponding numeric value and assigns then to a user defined array "BIBI" (each character to
a separate array member. BIBI content is as follows:
65 67 83 45 84 69 67 72 56 48

GLOBAL INT BIBI(10)


DSTR("ACS-Motion_Control",BIBI)
STOP

Version NT 2.20 404 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

3.7.4 EDGE
Description
EDGE returns 0 or 1, based on a defined input variable. EDGE is mainly useful in PLC
implementation when an action must be taken once a condition becomes true.
Syntax
real EDGE(X)
Arguments

X Input real variable name or real expression.

Return Value
EDGE returns 1 when the input variable changes from 0 to (+1) or from 0 to (-1) until the input
variable changes to other values. The function returns 0 in all other cases.
Error Conditions
None
Example

GLOBAL REAL XX,XI,YY !Declares three local variables


XX=-5 ; XI=1 !Assigns values to the variables XX and XI.
WHILE 1 !Run the following routine forever
XX=XX+XI
YY = EDGE(XX)
IF (XX>5) | (XX<-5) XI=-XI !Keeps XX between -5 to 5.
END !Ends IF
END !Ends WHILE
STOP !Ends program

Figure 24 illustrates the EDGE function.

Version NT 2.20 405 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Figure 24 EDGE Function Example

3.7.5 INP
Description
INP reads data values from a specified channel and stores them to an integer array. This
function is useful for creating an interface between the controller and special input devices such
as a track-ball, mouse or various sensors. INP is also used when the controller acts as a master
with the MODBUS protocol communication.
Before using INP, configure the relevant communication channel as a special communication
channel using SETCONF function, key 302.
See also OUTP.
Syntax
int INP(channel, [array,] [start_index,] [number,] [timeout])

Version NT 2.20 406 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Arguments

channel Communication channel index:


 1 - serial communication channel COM1
 2 - serial communication channel COM2
 6 - Ethernet network (TCP)
 7 - Ethernet network (TCP)
 8 - Ethernet network (TCP)
 9 - Ethernet network (TCP)
 10 - Ethernet Point-to-Point (UDP)
 12 - PCI bus
 16 - communication channel with Modbus slave
 36 - Ethernet network (TCP)
 37 - Ethernet network (TCP)
 38 - Ethernet network (TCP)
 39 - Ethernet network (TCP)
array User-defined integer array to which the data will be stored.
If array is omitted, the function purges formerly received characters in
the channel.
start_index The first received character is assigned to the array element with the
specified index.
If start_index is omitted, the assignment starts from the first element of
the array.
number The number of characters to be collected to the variable array.
If number is omitted, the function continues receiving characters until
the last element of the array is assigned, or the carriage return character
is received.
timeout The function waits for input not more than the specified number of
milliseconds.
If timeout is omitted, the waiting time is not limited.

Return Value
The number of entities that have been stored into the variable.
Error Conditions
None
Example

GLOBAL INT MMM(10) !Defines global user array MMM with ten elements.
SETCONF(302,2,1) !Assigns COM2 as special input.
INP(2) !Purges the input buffer from old values
INP(2,MMM,0,10,1000) !INP(2)- purge the input buffer from old values
!INP(2,MMM,0,10,1000) - store values from COM2 port
!to MMM user variable, from array index 0, total of
!10 values. The data collection process will end

Version NT 2.20 407 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

!within 1000 msec or when the 10 values have been


!collected.
STOP !Ends program

3.7.6 INTGR
Description
INTGR returns an integrator with optional deadzone and saturation limits.
Syntax
real INTGR(X, Deadzone, Min, Max[,Initial_Value])
Arguments

X Real variable name or real expression.


Deadzone A real number. When the Deadzone value falls into the range of -
Deadzone to +Deadzone, INTGR retains its previous value as if X = 0.
Min A real number representing the low integrator saturation limit.
Max A real number representing the high integrator saturation limit.
Initial_Value A real number setting the initial value of the return value. (optional)

Return Value
INTGR returns a value in the range from Min to Max.
Error Conditions
None
Example
Input variable XX is changing between -20 to +20.

GLOBAL REAL YY, XX !Defines global real variables.


REAL ZZ !Defines increment variable as real
MARK: !Set GOTO line
ZZ=0.1; XX=-20 !Set variable values
WHILE XX<=20 !Set upper limit for XX
XX=XX+ZZ !Set increment for XX
YY=INTGR(XX,5,-10,10,20)
END !End WHILE
WHILE XX>=-20 !Set lower limit for XX
XX=XX-ZZ !Set increment for XX
YY=INTGR(XX,5,-10,10,20)
END !End WHILE
GOTO MARK !GOTO MARK to create a program loop
STOP !End program

Version NT 2.20 408 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Figure 25 illustrates the INTGR function.

Figure 25 INTGR Function Example

3.7.7 LAG
Description
LAG returns values based on a defined input signal with defined up delay or down delay. This
function is useful for an anti-bouncing effect.
Syntax
LAG(X, up_delay, down_delay)
Arguments

X Real variable name or real expression.


Although LAG accepts any real or integer argument for X, the typical use
implies a logical X argument, for example, an integer variable or
expression that supplies only 0 or 1. If X supplies values other than 0 or
1, LAG treats any non-zero value as 1.
up_delay A real number representing the delay on the positive edge in msec.
down_delay A real number representing the delay on the negative edge in msec.

Return Value
1: when X remains non-zero for at least up_delay msec.
0: when X remains zero for at least down_delay msec.

Version NT 2.20 409 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Error Conditions
None
Example
The example here demonstrates LAG by generating a reference signal XX that changes from 0
to 1 every 100 msec, and based on XX and YY, implements a lag of 50msec and 20msec.

INT XX,YY,XT !Define three integers


XT=TIME; XX=0 !XT equals the time elapsed from
!startup. XX equal zero.
WHILE 1 !Run an infinite routine
IF TIME-XT>100; XX=^XX; XT=TIME; END !Switch the value of XX - from ON to
!OFF
YY=LAG(XX,20,50) !YY is a returned value that is delayed
!20msec after the transfer of XX from
!0 to 1 and delayed 50msec after the
!transfer of XX from 1 to 0
END !Ends WHILE
STOP !Ends program

Figure 26 illustrates the LAG function.

Figure 26 LAG Function Example

Version NT 2.20 410 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

3.7.8 MAP
Description
MAP returns a value from an array of points per input variable value, base value of the variable
and fixed defined intervals of the variable. The return values between the array points are
linearly interpolated. MAP is useful for creating a correction table for mechanical error
compensation.
Syntax
MAP(X, array, base, step)
Arguments

X Real variable name or real expression.


array The name of a real one-dimensional array that specifies points
base A real number representing the value of XX that corresponds to the first
point in array.
step A real number representing the value of XX that defines fixed intervals
between the array points.

Return Value
MAP returns a linearly interpolated value from the array for each value of XX.
Error Conditions
The function detects the following error conditions:
 Error 2044, Index is out of range, when the defined array size is less than the defined
number of array points.
 Error 3113, The step in the table is zero or negative, when the step argument is zero or
negative.

Example

REAL ARRAY(5);REAL XX; REAL YY; REAL XI


!Defines array ARRAY, and variables XX, YY,and XI.
!-------------------- Assign values to ARRAY array ---------------------
ARRAY(0)= -10; ARRAY(1)=3; ARRAY(2)=5; ARRAY(3)=14; ARRAY(4)=12
!Assign values to ARRAY
XX=-20; XI=0.1 !Assign values to XX and XI
WHILE XX<20 !Set conditions
XX=XX+XI
YY=MAP(XX,ARRAY,-10,5) !MAP command where:
!XX is a variable name
!ARRAY is a one-dimensional point array
!-10 is the value of XX that corresponds to base

Version NT 2.20 411 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

!point
!5 is the value of XX that defines fixed intervals
!between the ARRAY points.
END !Ends mapping
STOP !Ends program

Table 65 shows the XX and YY values.

Table 65 MAP Array


XX -20 -10 -7 -5 0 5 10 15 20
ARRAY N/A -10 N/A 3 5 14 12 N/A N/A
YY -10 -10 -2.2 3 5 14 12 12 12

Figure 27 illustrates this MAP example on the Scope.

Figure 27 MAP Example on the Scope

Version NT 2.20 412 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

3.7.9 MAPB
Description
MAPB returns a value from an array of points according to an input variable value, base value
of the variable and fixed defined intervals of the variable. The return values between the array
points are interpolated by a third order B-spline. MAPB is useful for creating a correction table
for mechanical error compensation.
Syntax
MAPB(XX, array, base, step)
Arguments

XX Real variable name or real expression.


array The name of a real one-dimensional array that specifies points
base A real number representing the value of XX that corresponds to the first
point in array.
step A real number representing the value of XX that defines fixed intervals
between the array points.

Return Value
MAPB returns the third order B spline interpolated value from the array according to the value
of variable XX.
Error Conditions
The function detects the following error conditions:
 Error 2044, Index is out of range, when the defined array size is less than the defined
number of array points.
 Error 3113, The step in the table is zero or negative, when the step argument is zero or
negative.

Example

REAL ARRAY(5);REAL XX; REAL YY; REAL XI


!Defines array ARRAY, and variables XX,YY, and XI
!------------------ Assign point values to ARRAY array ---------------------
ARRAY(0)= -10; ARRAY(1)=3; ARRAY(2)=5; ARRAY(3)=14; ARRAY(4)=12
XX=-20; XI=0.1 !Assign values to XX and XI
WHILE XX<20 !Set conditions
XX=XX+XI
YY=MAPB(XX,ARRAY,-10,5) !MAPB command where:
!XX is a variable name
!ARRAY is a one-dimensional point array
!-10 is the value of XX that corresponds to base

Version NT 2.20 413 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

!point
!5 is the value of XX that defines fixed intervals
!between the ARRAY points.
END !Ends mapping
STOP !Ends program

Table 66 shows the XX and YY values.

Table 66 MAPB Array


XX -20 -10 -7 -5 0 5 10 15 20
ARRAY N/A -10 N/A 3 5 14 12 N/A N/A
YY -10 -7.83 -2.45 1.16 6.16 12.33 12.33 12 12

Figure 28 illustrates this MAPB example on the Scope.

Figure 28 MAPB Example on the Scope

Version NT 2.20 414 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

3.7.10 MAPN
Description
MAPN returns a value from an array of points according to the value of an input variable, and
a look-up array. The return values between the array points are linearly interpolated. MAPN is
useful for creating a correction table for mechanical error compensation.
Syntax
MAPN(XX, X_table, Y_table)
Arguments

XX Real variable name or real expression.


X_table The name of a real one-dimensional array that specifies the values of XX
that correspond to the point array.
Y_table The name of a real one-dimensional array that specifies points.

Return Value
MAPN returns a linearly interpolated value from the array according to the value variable XX.
Error Conditions
The function detects the following error conditions:
 The Xtable or Ytable argument has the wrong dimension
 The arguments in Xtable are not arranged in ascending order.

Example

REAL Xtable(5);REAL Ytable(5);REAL XX; REAL YY; REAL XI


!Defines arrays Xtable, Ytable, and variables XX,
!YY, and XI.
!-------------------- Assign values to Xtable array ---------------------
Xtable(0)= -10;Xtable(1)=-3;Xtable(2)=6;Xtable(3)=12;Xtable(4)=14
!-------------------- Assign values to Ytable array ---------------------
Ytable(0)= -10;Ytable(1)=3;Ytable(2)=5;Ytable(3)=14;Ytable(4)=4
XX=-20; XI=0.1 !Assigns values to XX and XI.
WHILE XX<20 !Set conditions.
XX=XX+XI
YY=MAPN(XX,Xtable,Ytable) !MAPN where:
!XX is the defined variable.
!Xtable is a one-dimensional point array that
!specifies the values of XX corresponding to the
!point array.
!Ytable is a one-dimensional array that specifies

Version NT 2.20 415 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

!points.
END !Ends mapping
STOP !Ends program

Table 67 shows the XX and YY values.

Table 67 MAPN Array


XX -20 -10 -7 -3 6 12 14 15 20
ARRAY N/A -10 N/A -3 6 12 12 N/A N/A
YY -10 -10 -4.42 -3 6 12 14 14 14

Figure 29 illustrates this MAPN example on the Scope.

Figure 29 MAPN Example on the Scope

Version NT 2.20 416 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

3.7.11 MAPNB
Description
MAPNB returns a value from a pre-defined control point array based on a defined variable and
a look-up table. The return values between the table intervals are interpolated according to a
third order B-spline. MAPNB is useful for creating a correction table for mechanical error
compensation.
Syntax
MAPNB(XX, X_table, Y_table)
Arguments

XX Real variable name or real expression.


X_table The name of a real one-dimensional array that specifies the values of XX
that correspond to the point array.
Y_table The name of a real one-dimensional array that specifies points.

Return Value
MAPNB returns the third order B spline interpolated value from the Y_table per variable XX
value
Error Conditions
The function detects the following error conditions:
 The X_table or Y_table argument has the wrong dimension
 The arguments in X_table are not arranged in ascending order sequence.

Example

REAL Xtable(5);REAL Ytable(5);REAL XX; REAL YY; REAL XI


!Defines arrays Xtable, Ytable, and variables XX,
!YY, and XI.
!-------------------- Assign values to Xtable array ---------------------
Xtable(0)= -10; Xtable(1)=-3; Xtable(2)=6; Xtable(3)=12; Xtable(4)=14
!-------------------- Assign values to Ytable array ---------------------
Ytable(0)= -10; Ytable(1)=3; Ytable(2)=5; Ytable(3)=14; Ytable(4)=4
XX=-20; XI=0.1 !Assigns values to XX and XI.
WHILE XX<20 !Set conditions.
XX=XX+XI
YY=MAPNB(XX,Xtable,Ytable) !MAPNB where:
!XX is the defined variable.
!Xtable is a point array that specifies the values
!of XX corresponding to the point array.
!Ytable is an array that specifies Y points.

Version NT 2.20 417 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

END !Ends mapping


STOP !Ends program

Table 68 shows the XX and YY values.

Table 68 MAPNB Array


XX -20 -10 -7 -3 6 12 14 15 20
ARRAY N/A -10 N/A -3 6 12 12 N/A N/A
YY -10 -8.02 -4.65 -0.41 7.64 9.23 5 4.124 4

Figure 30 illustrates this MAPNB example on the Scope.

Figure 30 MAPNB Example on the Scope

3.7.12 MAPNS
Description
MAPNS returns a value from an array of points according to the value of an input variable, and
a look-up array. The return values between the array points are interpolated according to a third
order Catmull-Rom spline. MAPNS is useful for creating a correction table for mechanical
error compensation.
Syntax
MAPNS(XX, X_table, Y_table)

Version NT 2.20 418 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Arguments

XX Real variable name or real expression.


X_table The name of a real one-dimensional array that specifies the values of XX
that correspond to the point array.
Y_table The name of a real one-dimensional array that specifies points.

Return Value
MAPNS returns the third order Catmull-Rom spline interpolated value from the X_table per variable
XX value.
Error Conditions
The function detects the following error conditions:
 The X_table or Y_table argument has the wrong dimension
 The arguments in X_table are not arranged in ascending order sequence.

Example

REAL Xtable(5);REAL Ytable(5);REAL XX; REAL YY; REAL XI


!Defines arrays Xtable, Ytable, and variables XX,
!YY, and XI
!-------------------- Assign values to Xtable array ---------------------
Xtable(0)= -10; Xtable(1)=-3; Xtable(2)=6; Xtable(3)=12; Xtable(4)=14
!-------------------- Assign values to Ytable array ---------------------
Ytable(0)= -10; Ytable(1)=3; Ytable(2)=5; Ytable(3)=14; Ytable(4)=4
XX=-20; XI=0.1 !Assigns values to XX and XI.
WHILE XX<20 !Set conditions.
XX=XX+XI
YY=MAPNS(XX,Xtable,Ytable) !MAPNS command where:
!XX is the defined variable.
!Xtable is a one-dimensional point array that
!specifies the values of XX corresponding to the
!point array.
!Ytable is a one-dimensional array that specifies
!points.
END !Ends mapping
STOP !Ends program

Table 69 shows the XX and YY values.

Version NT 2.20 419 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Table 69 MAPNS Array


XX -20 -10 -7 -3 6 12 14 15 20
ARRAY N/A -10 N/A -3 6 12 12 N/A N/A
YY -10 -10 -4.42 -3 6 12 14 14 14

Figure 31 illustrates this MAPNS example on the Scope.

Figure 31 MAPNS Example on the Scope

3.7.13 MAPS
Description
MAPS returns a value from an array of points according to the value of an input variable, the
base value of the variable, and the fixed defined intervals. The return values between the array-
points are interpolated according to a third order Catmull-Rom spline. MAPS is useful for
creating a correction table for mechanical error compensation.
Syntax
MAPS(XX, array, base, step)

Version NT 2.20 420 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Arguments

XX Real variable name or real expression.


array The name of a real one-dimensional array that specifies points
base A real number representing the value of XX that corresponds to the first
point in array.
step A real number representing the value of XX that defines fixed intervals
between the array points.

Return Value
MAPS returns the third order Catmull-Rom spline interpolated value from the array according
to the value of XX.
Error Conditions
The function detects the following error conditions:
 Error 2044, Index is out of range, when the defined array size is less than the defined
number of array points.
 Error 3113, The step in the table is zero or negative, when the step argument is zero or
negative.

Example

REAL ARRAY(5);REAL XX; REAL YY; REAL XI


!Defines ARRAY a 5 element array, XX, YY, and XI
!-------------------- Assign values to ARRAY array ---------------------
ARRAY(0)= -10; ARRAY(1)=3; ARRAY(2)=5; ARRAY(3)=14; ARRAY(4)=12
XX=-20; XI=0.1 !Assigns values to XX and XI.
WHILE XX<20 !Set conditions.
XX=XX+XI
YY=MAPS(XX,ARRAY,-10,5) !MAPS command where:
!XX is the defined variable.
!ARRAY is a one-dimensional point array.
!-10 is the value of XX that corresponds to
!base point.
!5 is the value of XX that defines fixed
!intervals between the ARRAY points.
END !Ends mapping
STOP !Ends program

Table 70 shows the XX and YY values.

Version NT 2.20 421 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Table 70 MAPS Array


XX -20 -10 -7 -5 0 5 10 15 20
ARRAY N/A -10 N/A 3 5 14 12 N/A N/A
YY -10 -10 -2.65 3 5 14 12 12 12

Figure 32 illustrates this MAPS example on the Scope.

Figure 32 MAPS Example on the Scope

3.7.14 MAP2
Description
MAP2 returns a value from a two dimensional point array for each set of two input variable
values, the base values of the input variables, and a fixed, defined interval for the variables. The
return values between the array-points are linearly interpolated. MAP2 is useful for dynamic
error compensation.
Syntax
MAP2(XX, ZZ, table, baseX, stepX, baseY, stepY)
Arguments

XX Real variable name or real expression.


ZZ Real variable name or real expression.
table The name of a real two-dimensional array that specifies points
baseX A real number representing the value of XX that corresponds to the first
point in the array.

Version NT 2.20 422 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

stepX A real number representing the value of XX that defines fixed intervals
between the array points.
baseY A real number representing the value of ZZ that corresponds to the first
point in the array.
stepY A real number representing the value of ZZ that defines fixed intervals
between the array points.

Return Value
MAP2 returns a linearly interpolated value from the array according to the value of variables
XX and ZZ.
Error Conditions
The function detects the following error conditions:
 Error 3072, Wrong array size, if table has only one dimension.
 Error 3113, The step in the table is zero or negative, when the stepX or stepY arguments
are zero or negative.

Example

GLOBAL REAL XI,XX,YY,ZZ,TABLE(5)(5)


!Defines real variables and 5x5 matrix.
XX=-20;ZZ=10;XI=0.1 !Assigns values to the variable.
!-------------------- Assign values to TABLE matrix ---------------------
TABLE(0)(0)=2; TABLE(0)(1)=22; TABLE(0)(2)=6; TABLE(0)(3)=8; TABLE(0)(4)=10;
TABLE(1)(0)=12; TABLE(1)(1)=-44; TABLE(1)(2)=16; TABLE(1)(3)=18;
TABLE(1)(4)=20; TABLE(2)(0)=22; TABLE(2)(1)=24; TABLE(2)(2)=26;
TABLE(2)(3)=68; TABLE(2)(4)=30; TABLE(3)(0)=12; TABLE(3)(1)=34;
TABLE(3)(2)=59; TABLE(3)(3)=-38; TABLE(3)(4)=40; TABLE(4)(0)=92;
TABLE(4)(1)=44; TABLE(4)(2)=46; TABLE(4)(3)=10; TABLE(4)(4)=90
WHILE ZZ<70
XX=XX+XI !Set conditions
ZZ=ZZ+XI
YY=MAP2(XX,ZZ,TABLE,-10,5,20,10)
!MAP2 command where:
!XX and ZZ are variables.
!TABLE is a 2x2 matrix that specifies points.
!-10 is the first XX point in the matrix.
!5 defines the fixed intervals between the XX points.
!20 is the first ZZ point in the matrix.
!10 defines the fixed intervals between the ZZ
!points.
DISP XX,ZZ,YY !Displays values of XX, ZZ and YY.

Version NT 2.20 423 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

END !Ends MAP2.


STOP !Ends program

Table 71 shows the YY values as a function of XX and ZZ arguments.

Table 71 MAP2 Table


XX
ZZ -30 -10 -5 0 5 10 50
1 2 2 22 6 8 10 10
20 2 2 22 6 8 10 10
30 12 12 -44 16 18 20 20
40 22 22 24 26 68 30 30
50 12 12 34 59 -38 40 40
60 92 92 44 46 10 90 90
100 92 92 44 46 10 90 90

Key: XX and ZZ values


Interpolated YY values outside the
boundaries of array “Table”
“Table” array values

Figure 33 illustrates this MAP2 example on the Scope.

Figure 33 MAP2 Example on the Scope

Version NT 2.20 424 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

3.7.15 MAP2B
Description
MAP2B returns a value from a two dimensional array of points according to the value of two
input variables, where the base values of the input variables are fixed and the intervals of the
input variables are defined. The return values between the array-points are interpolated
according to a third order B-spline. MAP2B is useful for dynamic error compensation.
Syntax
MAP2B(XX,ZZ, table, baseX, stepX, baseY, stepY)
Arguments

XX Real variable name or real expression.


ZZ Real variable name or real expression.
table The name of a real two-dimensional array that specifies points
baseX A real number representing the value of XX that corresponds to the first
point in the array.
stepX A real number representing the value of XX that defines fixed intervals
between the array points.
baseY A real number representing the value of ZZ that corresponds to the first
point in the array.
stepY A real number representing the value of ZZ that defines fixed intervals
between the array points.

Return Value
MAP2B returns the third order B-spline interpolated value from the array according to the
value of variables XX and ZZ.
The function detects the following error conditions:
 Error 3072, Wrong array size, if table has only one dimension.
 Error 3113, The step in the table is zero or negative, when the stepX or stepY arguments
are zero or negative.
Example

GLOBAL REAL XI,XX,YY,ZZ,T(5)(5)


!Defines real variables and 5x5 matrix.
XX=-20;ZZ=10;XI=0.1 !Assigns values to the variables.
!---------------------- Assign values to T matrix ---------------------
T(0)(0)=2;T(0)(1)=22;T(0)(2)=6;T(0)(3)=8;T(0)(4)=10; T(1)(0)=12;
T(1)(1)=-44;T(1)(2)=16;T(1)(3)=18; T(1)(4)=20;T(2)(0)=22;T(2)(1)=24;
T(2)(2)=26; T(2)(3)=68;T(2)(4)=30;T(3)(0)=12;T(3)(1)=34; T(3)(2)=59;
T(3)(3)=-38;T(3)(4)=40;T(4)(0)=92; T(4)(1)=44;T(4)(2)=46;T(4)(3)=10;
T(4)(4)=90

Version NT 2.20 425 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

WHILE ZZ<70
XX=XX+XI !Set conditions
ZZ=ZZ+XI
YY=MAP2B(XX,ZZ,T,-10,5,20,10
!MAP2B command where:
!XX and ZZ are variables.
!T is a 2x2 matrix that specifies points.
!-10 is the first XX point in the matrix.
!5 defines the fixed intervals between the XX points.
!20 is the first ZZ point in the matrix.
!10 defines the fixed intervals between the ZZ
!points.
DISP XX,ZZ,YY !Displays values of XX, ZZ and YY.
END !Ends MAP2B.
STOP !Ends program

Table 72 shows the YY values as a function of XX and ZZ arguments.

Table 72 MAP2B Table


XX
ZZ -30 -10 -5 0 5 10 50
1 2 2 22 6 8 10 10
20 2 2 22 6 8 10 10
30 12 12 -44 16 18 20 20
40 22 22 24 26 68 30 30
50 12 12 34 59 -38 40 40
60 92 92 44 46 10 90 90
100 92 92 44 46 10 90 90

Key: XX and ZZ values


Interpolated YY values outside the
boundaries of array “Table”
“Table” array values

Figure 34 illustrates this MAP2B example on the Scope.

Version NT 2.20 426 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Figure 34 MAP2B Example on the Scope

3.7.16 MAP2N
Description
MAP2N returns a value from a two dimensional array of points according to the value of two
input variables, with look-up arrays for each of the variables. The return values between the
array-points are linearly interpolated. MAP2N is useful for dynamic error compensation.
Syntax
MAP2N(XX,ZZ, table, X_table, Y_table)
Arguments

XX Real variable name or real expression.


ZZ Real variable name or real expression.
table The name of a real two-dimensional array that specifies points
X_table A one-dimensional real array that specifies the values of XX that
corresponds the point array.
Y_table A one-dimensional real array that specifies the values of ZZ that
corresponds the point array.

Return Value
MAP2N returns the linearly interpolated value from the array according to the value of the
variables XX and ZZ.
Error Conditions
The function detects the following error conditions:
 Error 3072, Wrong array size, when table has only one dimension or X_table or Y_table
have the wrong dimension. X_table must contain M elements and Y_table must contain
N elements.
 The values in X_table or Y_table are not sequenced in ascending order.

Version NT 2.20 427 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Example

GLOBAL REAL XI,XX,YY,ZZ,XTABLE(5),YTABLE(5),TABLE(5)(5)


!Defines real variables, two arrays and a 5x5 matrix.
XX=-90;ZZ=0;XI=0.1 !Assigns values to the variables.
!---------------------- Assign values to XTABLE array ---------------------
XTABLE(0)=13; XTABLE(1)=-8; XTABLE(2)=0; XTABLE(3)=12; XTABLE(4)=51
!---------------------- Assign values to YTABLE array ---------------------
YTABLE(0)=16; YTABLE(1)=21; YTABLE(2)=80; YTABLE(3)=82; YTABLE(4)=113
!---------------------- Assign values to TABLE matrix ---------------------
TABLE(0)(0)=2; TABLE(0)(1)=22; TABLE(0)(2)=6; TABLE(0)(3)=8; TABLE(0)(4)=10
TABLE(1)(0)=12; TABLE(1)(1)=-44; TABLE(1)(2)=16; TABLE(1)(3)=18;
TABLE(1)(4)=20; TABLE(2)(0)=22; TABLE(2)(1)=24; TABLE(2)(2)=26;
TABLE(2)(3)=68; TABLE(2)(4)=30; TABLE(3)(0)=12; TABLE(3)(1)=34;
TABLE(3)(2)=59; TABLE(3)(3)=-38; TABLE(3)(4)=40; TABLE(4)(0)=92;
TABLE(4)(1)=44; TABLE(4)(2)=46; TABLE(4)(3)=10; TABLE(4)(4)=90
WHILE ZZ<200
XX=XX+XI !Set conditions
ZZ=ZZ+XI
YY=MAP2N(XX,ZZ,TABLE,XTABLE,YTABLE)
!MAP2N command where:
!XX and ZZ are variables.
!TABLE is a 5x5 matrix specifying mapping points.
!XTABLE is an array specifying XX points.
!YTABLE is an array specifying ZZ points.
DISP XX,ZZ,YY !Displays values of XX, ZZ and YY.
END !Ends MAP2N.
STOP !Ends program

Table 73 shows the YY values as a function of XX and ZZ arguments.

Version NT 2.20 428 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Table 73 MAP2N Table


XX
ZZ -90 -13 -8 0 12 51 100
0 2 2 22 6 8 10 10
16 2 2 22 6 8 10 10
21 12 12 -44 16 18 20 20
80 22 22 24 26 68 30 30
82 12 12 34 59 -38 40 40
113 92 92 44 46 10 90 90
150 92 92 44 46 10 90 90

Key: XX and ZZ values


Interpolated YY values outside the
boundaries of array “Table”
“Table” array values

Figure 34 illustrates this MAP2N example on the Scope.

Figure 35 MAP2N Example on the Scope

Version NT 2.20 429 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

3.7.17 MAP2NB
Description
MAP2NB returns a value from a two-dimensional array of points based on the input values of
two variables, with a separate look-up array for one variable, and a separate look-up array for
the other variable. The return values between the array-points are interpolated according to a
third-order B-spline. MAP2NB is useful for dynamic error compensation.
Syntax
MAP2NB(XX,ZZ, Table, X_Table, Y_Table)
Arguments

XX Real variable name or real expression.


ZZ Real variable name or real expression.
table The name of a real two-dimensional array that specifies points
X_table A one-dimensional real array that specifies the values of XX that
corresponds the point array.
Y_table A one-dimensional real array that specifies the values of ZZ that
corresponds the point array.

Return Value
MAP2NB returns the third-order B-spline interpolated value from the array according to the
value of the variables XX and ZZ.
Error Conditions
The function detects the following error conditions:
 Error 3072, Wrong array size, when table has only one dimension or X_table or Y_table
have the wrong dimension. X_table must contain M elements and Y_table must contain
N elements.
 The values in X_table or Y_table are not sequenced in ascending order.
Example

GLOBAL REAL XI,XX,YY,ZZ,XTABLE(5),YTABLE(5),TABLE(5)(5)


!Defines real variables, two arrays and a 5x5 matrix.
XX=-90;ZZ=0;XI=0.1 !Assigns values to the variables.
!---------------------- Assign values to XTABLE array ---------------------
XTABLE(0)=-13; XTABLE(1)=-8; XTABLE(2)=0; XTABLE(3)=12; XTABLE(4)=51
!---------------------- Assign values to YTABLE array ---------------------
YTABLE(0)=16; YTABLE(1)=21; YTABLE(2)=80; YTABLE(3)=82; YTABLE(4)=113
!---------------------- Assign values to TABLE matrix ---------------------
TABLE(0)(0)=2; TABLE(0)(1)=22; TABLE(0)(2)=6; TABLE(0)(3)=8; TABLE(0)(4)=10;
TABLE(1)(0)=12; TABLE(1)(1)=-44; TABLE(1)(2)=16; TABLE(1)(3)=18;

Version NT 2.20 430 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

TABLE(1)(4)=20; TABLE(2)(0)=22; TABLE(2)(1)=24; TABLE(2)(2)=26;


TABLE(2)(3)=68; TABLE(2)(4)=30; TABLE(3)(0)=12; TABLE(3)(1)=34;
TABLE(3)(2)=59; TABLE(3)(3)=-38; TABLE(3)(4)=40; TABLE(4)(0)=92;
TABLE(4)(1)=44; TABLE(4)(2)=46; TABLE(4)(3)=10; TABLE(4)(4)=90
WHILE ZZ<200
XX=XX+XI !Set conditions
ZZ=ZZ+XI
YY=MAP2NB(XX,ZZ,TABLE,XTABLE,YTABLE)
!MAP2NB command where:
!XX and ZZ are variables.
!TABLE is a 5x5 matrix specifying mapping points.
!XTABLE is an array specifying XX points.
!YTABLE is an array specifying ZZ points.
DISP XX,ZZ,YY !Displays values of XX, ZZ and YY.
END !Ends MAP2N.
STOP !Ends program

Table 74 shows the YY values as a function of XX and ZZ arguments.

Table 74 MAP2NB Table


XX
ZZ -90 -13 -8 0 12 51 100
0 2 2 22 6 8 10 10
16 2 2 22 6 8 10 10
21 12 12 -44 16 18 20 20
80 22 22 24 26 68 30 30
82 12 12 34 59 -38 40 40
113 92 92 44 46 10 90 90
150 92 92 44 46 10 90 90

Key: XX and ZZ values


Interpolated YY values outside the
boundaries of array “Table”
“Table” array values

Figure 34 illustrates this MAP2NB example on the Scope.

Version NT 2.20 431 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Figure 36 MAP2NB Example on the Scope

3.7.18 MAP2NS
Description
MAP2NS returns a value from a two-dimensional array of points based on the input values of
two variables, with a separate look-up array for one variable, and a separate look-up array for
the other variable. The return values between the array-points are interpolated according to a
third-order Catmull-Rom spline. The MAP2NS function is useful for dynamic error
compensation
Syntax
MAP2NS(XX,ZZ, table, X_table, Y_table)
Arguments

XX Real variable name or real expression.


ZZ Real variable name or real expression.
table The name of a real two-dimensional array that specifies points
X_table A one-dimensional real array that specifies the values of XX that
corresponds the point array.
Y_table A one-dimensional real array that specifies the values of ZZ that
corresponds the point array.

Return Value
MAP2NS returns the third-order Catmull-Rom interpolated value from the array according to
the value of the variables XX and ZZ.

Version NT 2.20 432 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Error Conditions
The function detects the following error conditions:
 Error 3072, Wrong array size, when table has only one dimension or X_table or Y_table
have the wrong dimension. X_table must contain M elements and Y_table must contain
N elements.
 The values in X_table or Y_table are not sequenced in ascending order.
Example

GLOBAL REAL XI,XX,YY,ZZ,XTABLE(5),YTABLE(5),TABLE(5)(5)


!Defines real variables, two arrays and a 5x5 matrix.
XX=-90;ZZ=0;XI=0.1 !Assigns values to the variables.
!---------------------- Assign values to XTABLE array ---------------------
XTABLE(0)=13; XTABLE(1)=-8; XTABLE(2)=0; XTABLE(3)=12; XTABLE(4)=51
!---------------------- Assign values to YTABLE array ---------------------
YTABLE(0)=16; YTABLE(1)=21; YTABLE(2)=80; YTABLE(3)=82; YTABLE(4)=113
!---------------------- Assign values to TABLE matrix ---------------------
TABLE(0)(0)=2; TABLE(0)(1)=22; TABLE(0)(2)=6; TABLE(0)(3)=8; TABLE(0)(4)=10;
TABLE(1)(0)=12; TABLE(1)(1)=-44; TABLE(1)(2)=16; TABLE(1)(3)=18;
TABLE(1)(4)=20; TABLE(2)(0)=22; TABLE(2)(1)=24; TABLE(2)(2)=26;
TABLE(2)(3)=68; TABLE(2)(4)=30; TABLE(3)(0)=12; TABLE(3)(1)=34;
TABLE(3)(2)=59; TABLE(3)(3)=-38; TABLE(3)(4)=40; TABLE(4)(0)=92;
TABLE(4)(1)=44; TABLE(4)(2)=46; TABLE(4)(3)=10; TABLE(4)(4)=90
WHILE ZZ<200
XX=XX+XI !Set conditions
ZZ=ZZ+XI
YY=MAP2NS(XX,ZZ,TABLE,XTABLE,YTABLE)
!MAP2NS command where:
!XX and ZZ are variables.
!TABLE is a 5x5 matrix specifying mapping points.
!XTABLE is an array specifying XX points.
!YTABLE is an array specifying ZZ points.
DISP XX,ZZ,YY !Displays values of XX, ZZ and YY.
END !Ends MAP2N.
STOP !Ends program

Table 75 shows the YY values as a function of XX and ZZ arguments.

Version NT 2.20 433 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Table 75 MAP2NS Table


XX
ZZ -90 -13 -8 0 12 51 100
0 2 2 22 6 8 10 10
16 2 2 22 6 8 10 10
21 12 12 -44 16 18 20 20
80 22 22 24 26 68 30 30
82 12 12 34 59 -38 40 40
113 92 92 44 46 10 90 90
150 92 92 44 46 10 90 90

Key: XX and ZZ values


Interpolated YY values outside the
boundaries of array “Table”
“Table” array values

Figure 34 illustrates this MAP2NS example on the Scope.

Figure 37 MAP2NS Example on the Scope

Version NT 2.20 434 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

3.7.19 MAP2S
Description
MAP2S returns a value from a two-dimensional array of points based on the input values of
two variables, the base values of the two variables, and the fixed defined intervals of the two
variables. The return values between the array-points are interpolated according to a third order
Catmull-Rom spline. The MAP2S function is useful for dynamic error compensation.
Syntax
MAP2S(XX,ZZ, table, baseX, stepX, baseY, stepY)
Arguments

XX Real variable name or real expression.


ZZ Real variable name or real expression.
table The name of a real two-dimensional array that specifies points
baseX A real number representing the value of XX that corresponds to the first
point in the array.
stepX A real number representing the value of XX that defines the fixed
intervals between the array points.
baseY A real number representing the value of ZZ that corresponds to the first
point in the array.
stepY A real number representing the value of ZZ that defines the fixed
intervals between the array points.

Return Value
MAP2S returns the third order Catmull-Rom spline interpolated value from the array according
to the value of variables XX and ZZ.
Error Conditions
The function detects the following error conditions:
 Error 3072, Wrong array size, when table has only one dimension.
 Error 3113, The step in the table is zero or negative, when the stepX or stepY arguments
are zero or negative.
Example

GLOBAL REAL XI,XX,YY,ZZ,TABLE(5)(5)


!Defines real variables and 5x5 matrix.
XX=-20;ZZ=10;XI=0.1 !Assigns values to the variable.
!-------------------- Assign values to TABLE matrix ---------------------
TABLE(0)(0)=2; TABLE(0)(1)=22; TABLE(0)(2)=6; TABLE(0)(3)=8; TABLE(0)(4)=10;
TABLE(1)(0)=12; TABLE(1)(1)=-44; TABLE(1)(2)=16; TABLE(1)(3)=18;
TABLE(1)(4)=20; TABLE(2)(0)=22; TABLE(2)(1)=24; TABLE(2)(2)=26;
TABLE(2)(3)=68; TABLE(2)(4)=30; TABLE(3)(0)=12; TABLE(3)(1)=34;

Version NT 2.20 435 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

TABLE(3)(2)=59; TABLE(3)(3)=-38; TABLE(3)(4)=40; TABLE(4)(0)=92;


TABLE(4)(1)=44; TABLE(4)(2)=46; TABLE(4)(3)=10; TABLE(4)(4)=90
WHILE ZZ<70
XX=XX+XI !Set conditions
ZZ=ZZ+XI
YY=MAP2S(XX,ZZ,TABLE,-10,5,20,10)
!MAP2S where:
!XX and ZZ are variables.
!TABLE is a 2x2 matrix that specifies points.
!-10 is the first XX point in the matrix.
!5 defines the fixed intervals between the XX points.
!20 is the first ZZ point in the matrix.
!10 defines the fixed intervals between the ZZ
!points.
DISP XX,ZZ,YY !Displays values of XX, ZZ and YY.
END !Ends MAP2S.
STOP !Ends program

Table 70 shows the YY values as a function of XX and ZZ arguments.

Table 76 MAP2S Table


XX
ZZ -30 -10 -5 0 5 10 50
1 2 2 22 6 8 10 10
20 2 2 22 6 8 10 10
30 12 12 -44 16 18 20 20
40 22 22 24 26 68 30 30
50 12 12 34 59 -38 40 40
60 92 92 44 46 10 90 90
100 92 92 44 46 10 90 90

Key: XX and ZZ values


Interpolated YY values outside the
boundaries of array “Table”
“Table” array values

Figure 34 illustrates this MAP2S example on the Scope.

Version NT 2.20 436 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Figure 38 MAP2S Example on the Scope

3.7.20 MATCH
Description
MATCH calculates axis position (APOS) that matches the current reference position (RPOS),
based on CONNECT between APOS and RPOS of the same axis. If there is no CONNECT
command, the function returns the value of RPOS.
Syntax
real MATCH (axis, from, to)
Arguments

axis The axis upon which to apply the MATCH function.


from The start point to begin searching for matching values of APOS.
to The end point to stop searching for matching values of APOS.

Comments
The function is useful only in the case of non-default connections.
The connection must be on the same axis.
The function succeeds if the unique root exists in the specified range. If there are several roots
in the range, the function returns one of them. If the root does not exist, the function results an
error.
Return Value
APOS that matches the current RPOS of the same axis.

Version NT 2.20 437 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Error Conditions
Error 3158 - The function cannot find a matching value. The CONNECT formula has no root
or the root is not single.
Example

GLOBAL REAL ARRAY(6), XX


!-------------------- Assign values to ARRAY array ---------------------
ARRAY(0)= 60; ARRAY(1)=40; ARRAY(2)=90; ARRAY(3)=-40; ARRAY(4)=60;
ARRAY(5)=10
VEL(0)=800 !Set VEL(0)
MFLAGS(0).17=1
CONNECT RPOS(0)=APOS(0)+MAP(APOS(0),ARRAY,100,200)
!The program executes a CONNECT between RPOS and APOS
!for axis X. Where RPOS(0) receives the value of
!APOS(0) added to the value of a MAP function.
DEPENDS X,X
SET APOS(0)=0
SET RPOS(0)=MAP(APOS(0),ARRAY,100,200)
PTP X, 1300 !A PTP command sends the motor to 1300 counts,
!while the motor is in motion a MATCH function is
!calculated and displayed along with RPOS(0) and
!APOS(0).
WHILE MST(0).#MOVE
WAIT 300
XX=MATCH(X,0,1300) !The MATCH function calculates the root of the
!current RPOS(0) based on the CONNECT formula.
DISP RPOS(0), APOS(0), XX
END
STOP !Ends program

The output of the program displays the following RPOS(0), APOS(0) values, and the value of
MATCH. Notice that MATCH values are very close to APOS(0) values:
RPOS(0) APOS(0) MATCH
273.76 228 226.4
554 472.8 471.2
684 717.6 716
1005.6 962.4 960.8
1215.6 1207.2 1205.6
1310 1300 1300

Version NT 2.20 438 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

3.7.21 OUTP
Description
OUTP sends data values from an integer array to a specified channel. This function is useful to
create an interface between the controller and special input devices such as a track-ball, mouse
and various sensors. OUTP is also used when the controller acts as a master with the MODBUS
protocol communication.
Before using OUTP, configure the relevant communication channel as a special
communication channel using SETCONF function, key 302.
Each ASCII character is represented by its numerical value and is stored in a separate element
of the array.
The user might have to define communication parameters for the special communication
channel with SETCONF function keys 302, 303, 304, 309.
See also INP.
Syntax
int OUTP(channel, variable, [start_index,] number, [timeout])
Arguments

channel Communication channel index:


 1 - serial communication channel COM1.
 2 - serial communication channel COM2.
 6 - Ethernet network (TCP)
 7 - Ethernet network (TCP)
 8 - Ethernet network (TCP)
 9 - Ethernet network (TCP)
 10 - Ethernet Point-to-Point (UDP)
 12 - PCI bus
 16 - communication channel with MODBUS slave
 36 - Ethernet network (TCP)
 37 - Ethernet network (TCP)
 38 - Ethernet network (TCP)
 39 - Ethernet network (TCP)
variable User-defined integer array to which the data will be sent.
start_index The index in the array from which to start.
If start_index is omitted, the assignment starts from the first element of
the array.The first received character is assigned to the array element with
the specified index.
number The number of characters to be transmitted to the variable array.
timeout The function waits for output not more than the specified number of
milliseconds.
If timeout is omitted, the waiting time is not limited.

Return Value
The number of entities that have been transmitted.

Version NT 2.20 439 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Error Conditions
If the function fails, an error is generated.

3.7.22 RAND
Description
RAND generates a random number
Syntax
real RAND(min, max[,seed])
Arguments

min Lower boundary of the interval from which randomized number will be
selected.
max Upper boundary of the interval from which randomized number will be
selected.
seed Sets the random sequence generator. The number range is limited
only by the controller register size - 32bit.
If omitted, the controller uses ACSPL+ TIME variable as the seed.

Comments
RAND can generate only one random number per seed number (per interval). For generating a
series of random numbers use TIME as the seed. In this case the series of random numbers will
be in ascending order.
Return Value
The randomized generated number.
Error Conditions
None
Example

RAND (-45,45,TIME)

Version NT 2.20 440 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

3.7.23 ROLL
Description
The ROLL function returns a result rolled-over to within a defined Pitch (range), as illustrated
below.

(-) (+)
-8 8 18
Input variable
0 10 value
Defined pitch

Syntax
ROLL(X, Pitch)
Arguments

X Variable name declared as real or a real expression.


Pitch A range from 0 to Pitch (positive real value) where the return value will
be rolled-over.

Return Value
X - if X falls within the range from 0 to Pitch.
or
|X|/Pitch - FLOOR(|X|/Pitch)*Pitch, if X is less than or greater than Pitch.
Error Conditions
None
Example:
YY=ROLL(XX,10) !Input variable XX is changing between -
!20 to 20.

Figure 39 illustrates this ROLL example on the Scope.

Version NT 2.20 441 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Figure 39 ROLL Example on the Scope

3.7.24 SAT
Description
SAT returns a result of defined saturation range
Syntax
real SAT(X, Min, Max)
Arguments

X Variable name declared as real or a real expression.


Min Low saturation value. Must be a real number.
Max High saturation value. Must be a real number.

Return Value
X - if the X value falls inside the SAT range.
Min - if X value is less than the SAT range.
Max - if X value is greater than SAT range.
Error Conditions
None

Version NT 2.20 442 Reference Guide


SPiiPlus Command & Variable Reference ACSPL+ Functions

Example

GLOBAL REAL YY,ZZ,XX


EYAL:
ZZ=-20;XX=0.1
WHILE ZZ<=20
ZZ=ZZ+XX
YY=SAT(ZZ,-5,15)
END
ZZ=20;XX=0.1
WHILE ZZ>=-20
ZZ=ZZ-XX
YY=SAT(ZZ,-5,15)
END
GOTO EYAL
STOP

Figure 40 illustrates this SAT example on the Scope.

Figure 40 SAT Example on the Scope

Version NT 2.20 443 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

4 Terminal Commands
Terminal commands are those commands that are specific to the SPiiPlus MMI Application
Studio Communication Terminal utility and are not part of the ACSPL+, nor can they be
incorporated into ASCPL+ programming. As soon as the command is received through one of
the communication channels, it is executed.
This chapter covers all of the available Terminal commands.

4.1 Entering Terminal Commands


Terminal commands are entered in the Communication Terminal (the general structure of
which is shown in Figure 41).

Figure 41 Communication Terminal Window


The Communication Terminal window is described in the SPiiPlus MMI Application Studio
User Guide.

Note
Terminal commands are case sensitive.

Terminal commands are divided into:


 Query Commands
 Program Management Commands
 System Commands

Version NT 2.20 444 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

4.2 Query Commands


Query commands are designated by the question mark (?) and are entered through the
Communication Terminal.

Command & Syntax Description Example


?[ACSPL+ variable] Returns the current value of a ?TCPIP – Returns the TCP/IP for
standard variable the Ethernet port N1.
?[ACSPL+ variable], Returns the current value of listed ?TCPIP, TCPPORT – Returns
[ACSPL+ variable]... standard variables. the TCP/IP for the Ethernet port
N1 and the TCP port number.
?[buffer number]: [local user- Returns the current values of a ?1:MY_VAR – Returns the
defined variable] local user variable or array values of a local user-defined
defined in a program buffer. variable named MY_VAR.
?[array_variable(index)] Returns the current value of a ?FPOS(0) – Returns the feedback
specific element in the given position of 0 axis.
array. The brackets enclosing the ?FPOS0: Returns the feedback
index are optional. position of 0 axis.
?[global user Returns the current values of a ?ARRAY1 – Returns the values
array_variable[(index)]] global user variable or array. of a global user-defined array
Or the value of an element in the variable named ARRAY1.
array if index is included. ?ARRAY1(3) – Returns the value
of the fourth element of a global
user-defined array variable named
ARRAY1.
?[matrix_variable (row_index) Returns the current value(s) of an ?MATRIX – Returns all of the
(col_index)] element in a two dimensional values (in tabular format) of the
matrix. two-dimensional array named
The indices may be entered as a MATRIX.
range, e.g., (0,4) is the first ?MATRIX(1)(0) – Returns the
through fifth, inclusively. value of the second element in the
first column of MATRIX.
?MATRIX(0) – Returns all the
values of the first row of
MATRIX.
?MATRIX(0,2)(0,1) – Returns a
range of values, those of the first
through third rows in the first and
second columns of MATRIX.
?[buffer number] Returns the current status and ?0 – Returns the current status and
information about a program information about program buffer
buffer 0.
?# Returns the current status of all
program buffers.
?$[axis number] Returns the current status of the ?$16 – Returns the current status
motor for the specified axis. of the axis 16 motor.

Version NT 2.20 445 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

Command & Syntax Description Example


?$ Returns the current status of all
motors.
?VR Returns the firmware version
?SN Returns the controller serial
number and hardware version -
indicated by a letter.
??[error_code] Returns the error code number. If ??3260: Returns “Motor cannot
the error code is included in the start because the motor is
query, returns error description. disabled”
??[variable_name] Returns a brief description of the ??CERRA - Returns “Critical
variable. Position Error In Accelerating”

4.2.1 Default Query Formats


All the queries described above produce a variable report in a default format depending on the
queried variable. In some cases the default format produces unsatisfactory results. For very
large or small real values the output may appear misleading because very large or small values
may require more positions than allocated by the default.
The default format for all real variables is similar to the C “%10G” format, where each real
value is represented by 10 digits. The controller automatically chooses the position of decimal
point and the number of digits right to the decimal point. If required, the controller uses an
exponential format, like 3.14E-13.
The default format for all user integer variables and for all standard integer variables, except
State flags, and I/O variables, is similar to the C “%10i” format that specifies 10 digits for each
integer number.
State and Flag variables are reported in special format. Each State and Flag variable is a
collection of bits. Each bit within the variable has its own function. The variable is reported in
a format that displays the state of each bit with a short explanation.
The standard I/O arrays IN and OUT are reported in binary format.

Version NT 2.20 446 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

4.2.2 Predefined Query Output Formats


The controller provides several predefined formats that can be used instead of the default format
for querying variables:

Format Description
?D/ Decimal format.
This format is identical to the default format for integer variables. When applied to a state
variable, the format displays the decimal presentation of the variable.
C-equivalent: %10i.
?X/ Hexadecimal format.
When applied to an integer variable, this format displays the hexadecimal presentation of
the variable.
C-equivalent: %08X
?B/ Binary format.
This format is identical to the default format for the IN and OUT variables. When applied
to an integer variable, the format displays the binary presentation of the variable.
?E/ Extended format.
This format is useful for very large or small real values, when the default format produces
ambiguous results because the default does not provide enough positions to display very
large or very small numbers. When applied to a real variable, the format displays each value
in 20 positions.
C-equivalent: %20G

Examples
Display the motor state in decimal format:

?D/ MST
3 15 15 3 0 0 0 0
?X/Y_MST
0 0 0 0 0 0 0 0
Display the state of motor x in binary format

?B/ MST
00000000,00000000,00000000,00000011
Display the status of variable UserReal in extended format

?E/UserReal
1.00000000000001

Version NT 2.20 447 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

4.2.3 User-Defined Query Output Format


If the default format or any other predefined format is not suitable for the user needs, the user
may specify a format using C notation. The specification is placed just before the variable name
in curled brackets. The specification applies only to the value of the name that is specified in
the command. If an array is queried, the specification applies to each element of the array.
C notation provides an unlimited number of possible formats.
Examples

Format Description
?{%12.3f}FPOS The motor feedback values for all axes are displayed in 12 digits,
fixed decimal point, 3 digits after the point. The same format
applies to all 8 values.
?{%8.0f}X_FPOS 8 digits, no decimal point, no fraction digits.
?{XFPOS = %8.0f}X_FPOS The response will look like XFPOS = 1234.
?{%08X} X_MST 8 digits, hexadecimal format with leading zeros

4.3 Program Management Commands


Program Management commands are used for:
 Controlling program execution
 Viewing and editing program content
The Program Management commands are designated by the pound (#) character.

4.3.1 Program Management Command Arguments


Program Management commands can take two types of arguments:
Buffer Designation
Buffer designation can be specified in two forms:
 An integer number, between 0 and 16, that addresses a specific buffer (16 addresses the D-
buffer)
 The pound character, #, that addresses all program buffers in one command
Only the following commands can address all buffers:
• L – List
• C – Compile
• S, SR – Stop, Stop and Reset
• P – Pause
• F, FI – Find
• BR – Reset Breakpoints
All other commands operate with one buffer only, and must specify the buffer number.

Version NT 2.20 448 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

Line Designation
A line designation can appear in one of three forms, as shown in the following table:
Table 77 Line Designation
Line Qualifier Type Description
Single number Specifies only one line.
Two numbers separated Specifies a range of lines. If the second number is larger than a total
by comma number of lines in the program, the list range spans the last program line.
Label preceded by a slash Specifies the line by a designated label (the text following the slash).
(/) character
Label preceded by a slash Specifies a range of lines starting from the line with a designated label.
(/) character, then a
comma and number

Examples
The following are examples of using the L command.
List line 4 in buffer 3.

#3L4
4: till ^MST(0).#MOVE

List lines from 1 to 3 inclusively in buffer 5.

#5L1,3
1: movePTP:
2: VEL(0) = 20000
3: ptp 0, 4000

List the line that contains the label MovePTP in buffer 5.

#5L/MovePTP
1: movePTP:

List 3 lines, starting from the label movePTP in buffer 5.

#5L/MovePTP, 3
1: movePTP:
2: VEL(0) = 20000
3: ptp 0, 4000

Version NT 2.20 449 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

4.3.2 Program Buffer Commands

4.3.2.1 Open/Close Buffer (#)


Description
The # (Open/Close Buffer) command is used to open and close a buffer for the purpose of
entering code.
Syntax
#buffer_number[I][line_number]
Arguments
buffer_number buffer_number qualifier in the command specifies the buffer, a number
between 0 and 16.
I Optional, if included, opens the buffer for insertion of code.
line_number Optional, if included, the command opens the buffer specified by
buffer_number and sets the insert line before the line specified by
line_number. line_number can be specified in any of the three forms
listed in Table 77.

Comments
The # command opens the buffer and sets the insert line as follows:
 If the buffer is empty, the insert line is 1.
 If the buffer already contains a program, the insert line is set after the last line of the
program.
Only one buffer can be opened at a time.
To close the buffer, # is entered without the buffer number (since only one buffer is open, the
controller knows which buffer to close.
Examples
The following are examples of opening and closing buffers.

#0 Open buffer 0
0:00001> Buffer 0 is empty
#3 Open buffer 3
3:00006> This indicates that buffer 3 contains 5 lines. The insert
line is set to 6.
#3I Open buffer 3 for insertion
3:00006> The command does not specifies a line qualifier. It is
identical to the command #3.
#3I2 Open buffer 3 and set insertion point prior to line 2.
3:00002> Insert line is set before line 2

Version NT 2.20 450 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

# Close the buffer


: The prompt indicates that all buffers are closed

When a program buffer is open, ACSPL+ commands are stored in the buffer (and are not
executed immediately). The controller checks the syntax of inserted ACSPL+ lines and
immediately reports any errors detected.
The following is an example of an editing session:
#0 Open buffer 0
0:00001> Buffer 0 is empty
VEL(0) = 20000 Enter the program lines sequentially. After each
line, the insert line number is increased by 1.
0:00002>
ptp X, 4000
0:00003>
till ^MST(0).#MOVE
0:00004>
stop
0:00005>
#0L List the program
1: VEL(0) = 20000
2: ptp 0, 4000
3: till ^MST(0).#MOVE
4: stop
0:0005> The buffer remains open
#0I1 Change the insert line number to 1
0:0001> Insert line is set before the first line
MovePTP: Insert label
0:0002>
#0L List the program
1: MovePTP:
2: VEL(0) = 20000
3: ptp 0, 4000
4: till ^MST(0).#MOVE
5: stop
0:0002> The buffer remains open
# Close the buffer

Version NT 2.20 451 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

4.3.2.2 D
Description
The D (Delete) command deletes the specified lines in the buffer.
Syntax
#buffer_numberDline_number[,line_number]
Arguments
buffer_number buffer_number qualifier in the command specifies the buffer, a number
between 0 and 16.
line_number line_number in the D command is obligatory. line_number can be:
 A single number, specifying one specific line, or
 Two numbers separated by comma that specify a range of lines. If
the second number is larger than a total number of lines in the
program, the delete range includes the last program line.

Comments
If a buffer is open, the D command that addresses the buffer shifts the insert line to before the
first undeleted line.
Example

#0L Open buffer 0


0:00001> Buffer 0 is empty
#3 Open buffer 3
3:00006> Buffer 3 contains 5 lines. The insert line is set to 6.
#3I
3:00006> The command does not specifies a line qualifier. It is
identical to the command #3
#3I2
3:00002> Insert line is set before line 2
#0D3 Delete line 3 in buffer 0
# Close the buffer
: The prompt indicates that all buffers are closed

Version NT 2.20 452 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

4.3.2.3 F/FI
Description
The F/FI (Find/Find Case-sensitive) commands are used to search for a specific text in a
specified buffer or in all buffers.
Syntax
#buffer_number{F|FI}/search_string [,line_number]
Arguments
buffer_number buffer_number qualifier in the command specifies the buffer, a number
between 0 and 16.
search_string The text being sought.
line_number Optional, if included, line_number defines the start line for the search.
Otherwise, the search starts from the first line.

Comments
search_string must be specified as a label, that is, it must be preceded by a slash (/), or as a
label and number separated by comma. search_string can be any text, such as, a variable name,
ACSPL+ command, constant, label or keyword.
The search terminates when the first entry of the specified text is found, or the buffer end is
reached. The command reports the line that contains the text, or an error message if the text was
not found.
To find the next entry, the user must execute the command again, specifying the new start line
number of the reported line plus one.
If the # character is specified instead of the buffer number, the search command addresses all
buffers. In this case the command finds the first entry in each buffer.
Examples
The following are examples of using the F command.

#0F/X Find “X” in buffer 0


0002 Response: found entry in line 2
#0F/X,3 Find the next entry, starting from line 3
0003 Response: found entry in line 3
#0F/X,5 Find the next entry, starting from line 5
?1078 Response: No more entries

Version NT 2.20 453 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

##F/stop Find stop in all buffers


Buffer #0: no matches 
Buffer #1: 4: stop Entry is found in line 4 of Buffer 1

Buffer #2: no matches
Entry is found in line 4 of Buffer 3
Buffer #3: 4: stop Entry is found in line 1 of Buffer 4
Buffer #4: 1: stop 
Buffer #5: no matches 

Buffer #6: no matches

Buffer #7: no matches Entry is found in line 238 of Buffer 8
Buffer #8: 238: stop
Buffer #9: no matches
Buffer #10: no matches

4.3.2.4 L
Description
The L (List) command is used for displaying a program listing.
Syntax
#buffer_numberL[line_number]
Arguments

buffer_number buffer_number specifies the buffer, a number between 0 and 16; or you
can use the pound (#) to designate all buffers.
line_number Optional, if included, line_number defines a specific line to be listed.
Otherwise, the search starts from the first line. line_number can be
specified in any of the three forms listed in Table 77.

Comments
The listing contains all program lines preceded by line numbers. Each line appears exactly as it
was inserted. No automatic formatting is provided.
To address all buffers the # character is used instead of the buffer number, for example, the
command ##L provides a listing of all programs in all buffers. If line_number is included and
a buffer does not contain the specified line number, only the buffer number is listed.
If the buffer is empty, the list includes the buffer designation followed by the first line (0) which
is blank.

Note
It is recommended that you place a remark with a short program description
in the first line of each program. This enables using the command ##L1 to
get quick information about all loaded programs

Version NT 2.20 454 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

Examples
The following are examples of the L command.
Example 1:
Provide a program listing for buffer #3:

#3L
1: MovePTP:
2: VEL(0) = 20000
3: ptp X, 4000
4: till ^MST(0).#MOVE
5: stop

Example 2:
Provide a program listing for the first line in all buffers:

##L1 List the contents of line 1 in all buffers.


Buffer 0 Response
0: 
Buffer 1 
1: ! Homing of all axes 
Buffer 2

1: ! Registration motion

Buffer 3
1: MovePTP: 
Buffer 4 
1: ! PLC program 
Buffer 5 
0: 
Buffer 6 
0: 
Buffer 7 
0: Buffer 5 is empty
Buffer 8

0:

Buffer 9
0: Buffer 6 is empty

Buffer 7 is empty


Buffer 8 is empty

Buffer 9 is empty

Version NT 2.20 455 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

4.3.2.5 PROTECT
Description
The PROTECT command is used to activate standard configuration variables protection, that
is, once issued, no changes can be made to the values of the configuration variables.
Syntax
#PROTECT [“password”]
Comments
PROTECT can be specified with a password. A password can be any sequence of alpha-
numeric characters enclosed in quotes (“”). The sequence can contain any printable or non-
printable character, except the quotes.
If the controller was protected with a password, it accepts the UNPROTECT command only
with the same password. Therefore, the application cannot be opened without knowing
password.
PROTECT can also be specified without a password. In this case UNPROTECT does not
require password either.

4.3.2.6 UNPROTECT
Description
The UNPROTECT command disables application protection (returns the controller to
configuration mode).
Syntax
#UNPROTECT [“password”]
Comments
If #PROTECT was applied with a password, the same password must accompany the
corresponding #UNPROTECT command. If a password was not included in the PROTECT
command, the #UNPROTECT command does not need a password.
If the controller is in protected mode, RESET can be applied to delete a password-protected
application if the password is unknown. In this case, the application cannot be viewed or saved,
but the controller will be reset to the factory-defaults.

Version NT 2.20 456 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

4.3.3 RESET
Description
The RESET command is used to reset the controller to factory default state.
Syntax
#RESET
Comments
The RESET command can be issued even if the application is in the Protected mode (see
PROTECT), in which case the password, if included, is not needed.

4.3.4 Listing Program Variables


There are three types of variables:
 ACSPL+ Variables – variables contained in the ACSPL+ language set
 SP Variables – variables incorporated in the controller
 User-Defined Variables – variables that have been declared by the user
For each type of variable there is a Communication Terminal command for listing them.

4.3.4.1 VGR
Description
The VGR command lists the categories within which the ACSPL+ variables are grouped. The
categories of the ASCPL+ variables are:
 Axis_State
 Monitoring
 Motion
 Safety_Control
 Inputs_Outputs
 Program_Execution_Control
 System_Configuration
 Axis_Configuration
 Communication
 Commutation
 Data_Collection
 Servo_Loop
 Miscellaneous
 Obsolete
Syntax
#VGR [group_name]

Version NT 2.20 457 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

Arguments
group_name One of the ACSPL+ variable categories.

Comments
If group_name is omitted, the command lists only the categories. If group_name is included,
the command lists the ACSPL+ variables within the category.

Note
The category must be entered in exactly the same format as given in the list
above.

4.3.4.2 VSD
Description
The VSD command lists all ACSPL+ variables with a short description.
Syntax
#VSD [group_name]
Arguments
group_name One of the ACSPL+ variable categories (see VGR).

Comments
When group_name is included in the VSD command, the ACSPL+ variables within the
specified category and a brief description of each variable is listed.

4.3.4.3 VS/VSG
Description
The VS/VSG commands are used to list the variables that are incorporated in the ACSPL+
language set.
Syntax
#VS
#VSG [group_name]
Arguments
group_name One of the ACSPL+ variable categories (see VGR).

Comments
When group_name is included in the VSG command, the names of the ACSPL+ variables
within the specified category are listed.

Version NT 2.20 458 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

Example
The following is an example of the VS command.

#VS List ACSPL+ variable names


Response
ACC
AERR
AFLAGS
AIN
AOUT
APOS
AST
BAUD
BOFFTIME
BONTIME
MASK
FPOS
FVEL
FVFIL
GACC
GETIME
GJERK
GMOT
GMQU
GMTYPE

Note
For brevity, only a portion of the response is shown here.

Version NT 2.20 459 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

4.3.4.4 VSF/VSGF
Description
Both the VSF and VSGF commands, in addition to the global variable names, display the
variable type, the number of elements (for arrays only), address of the variable in the controller
memory and the step between array elements (for arrays only).
Syntax
#VSF
#VSGF [group_name]
Arguments
group_name One of the ACSPL+ variable categories (see VGR).

Comments
When group_name is included in the VSGF command, the names of the ACSPL+ standard
variables within the specified category and their details are listed.

4.3.4.5 VG/VGF
Description
The VG command lists all global variable names in the system.
The VGF command, in addition to the global variable names, lists the variable type, the number
of elements (for arrays only), address of the variable in the controller memory and the step
between array elements (for arrays only).
Syntax
#[buffer_no]VG
#[buffer_no]VGF [variable_name]
Arguments
buffer_no A number ranging from 0 to 16, representing a specific buffer.
variable_name A specific ACSPL+ variable.

Comments
If buffer_no is included, VG and VGF list all the global variables in the specified buffer.
If variable_name specifying an ACSPL+ variable is included, VGF lists the details just for the
specified variable

Version NT 2.20 460 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

4.3.4.6 VL/VLF
Description
The VL command lists all local variable names in the system.
The VLF command, in addition to the local variable names, lists the variable type, the number
of elements (for arrays only), address of the variable in the controller memory and the step
between array elements (for arrays only).
Syntax
#[buffer_no]VL
#[buffer_no]VLF [variable_name]
Arguments
buffer_no A number ranging from 0 to 16, representing a specific buffer.
variable_name A specific ACSPL+ variable.

Comments
If buffer_no is included, VL and VLF list all the local variables in the specified buffer.
If variable_name specifying an ACSPL+ variable is included, VGF lists the details just for the
specified variable.

4.3.4.7 V/VF
Description
The V/VF (List User-Defined Variable Names only/List User-Defined Variables with
Description) commands are used to list the user-defined variables that are found in compiled
programs.
Syntax
#[buffer_number]V
#[buffer_number]VF
Arguments
buffer_no A number ranging from 0 to 16, representing a specific buffer.

Comments
If buffer_no is not specified, the list includes the user-defined variables in all compiled buffers.
The V command only displays the names of the user-defined variables. The VF, on the other
hand, in addition to the variable names, it displays the variable type, the number of elements
(for arrays only), address of the variable in the controller memory and the step between array
elements (for arrays only).
The list can be saved to a file by clicking Save in the Communication Terminal window.

Version NT 2.20 461 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

Examples
The following are examples of the V and VF commands.

#9V Provide a list of user variables in buffer 9


Response
ITIME Global
TS_AMP1Local
TS_AMP0Global
#9VF Provide a list of user variables in buffer 9 with
additional information
Response
ITIME Globalreal@00DA0C50
TS_AMP1Localint@00DA1A30
TS_AMP0 Globalint@00DA0C80

4.3.4.8 VSP
Description
The VSP (List Servo Processor Variables) command provides a list of the SP variables that are
defined in the program in the specified SP.
Syntax
#VSPservo_number
Arguments
servo_number servo_number is number of the Servo Processor.

Comments
Each variable name in the list is accompanied by an SP address of the variable.
The list can be saved to a file by clicking Save in the Terminal window.
Example:

#VSP0 List the variables in SP 0


Response
_RMS_SUM @088
A_RMS_SUM @089
X_NOTCH_OUT_PR_H @08A
X_NOTCH_OUT_PR2_H @08B
X_NOTCH_IN_PR @08C
X_NOTCH_IN_PR2 @08D
X_NOTCH_FRC @08E
X_NOTCH_FRC_L @08F
A_NOTCH_OUT_PR_H @091
A_NOTCH_IN_PR @092

Version NT 2.20 462 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

4.3.4.9 VST/VSGT
Description
Both the VST and VSGT commands display a list of ACSPL+ variables to which PROTECT
can be applied.
Syntax
#VST
#VSGT [group_name]
Arguments
group_name One of the ACSPL+ variable categories (see VGR).

Comments
When group_name is included with the VSGT command, the ACSPL+ variables within the
specified category are listed.

4.3.4.10 VSTF/VSGTF/VSDT
Description
The VSTF, VSGTF, and VSDT commands all list the variable names, the variable type, the
number of elements (for arrays only), address of the variable in the controller memory and the
step between array elements (for arrays only) of those ACSPL+ variables to which PROTECT
can be applied
Syntax
#VSTF
#VSGTF [group_name]
#VSDT [group_name]
Arguments
group_name One of the ACSPL+ variable categories (see VGR).

Comments
When group_name is included with the VSGTF or VSDT command, the ACSPL+ variables
within the specified category are listed.

Version NT 2.20 463 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

4.3.4.11 VGV
Description
The VGV command is used to remove global variables that have been set via Communication
Terminal.
Syntax
#VGV [global_var]
Arguments
global_var Name of a global variable

Comments
If global_var is included, VGV removes only this variable; otherwise it removes all of them.

4.3.5 Program Handling Commands


These commands are used for compiling, executing, pausing and halting the program.
The commands in this set are:
 C - Compile Program
 X - Execute Program
 S/SR - Stop/Stop & Reset Program
 P - Pause Program
The following diagram shows the program buffer states and the Communication Terminal
commands that affect the buffer states:

#P

#X
Run Suspended

#S

#X
#X #S
#SR

#SR

Not Compiled
#C
compiled

#SR

Figure 42 Interaction of Program Buffer States

Version NT 2.20 464 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

The program buffer enters the Not Compiled state:


 After any change in the program text.
 Following execution of the #S (Stop) or #R (Reset) command.
The program buffer enters the Compiled state:
 Following execution of the #C (Compile) command the program buffer is transferred from
the Not Compiled to the Compiled state.
 The #S (Stop) command transfers the program buffer from the Run or Suspended state to
Compiled state.
 Following program termination with an ACSPL+ STOP command (or RET if an
autoroutine was executed).
 When the program fails due to an error.
The program buffer enters the Run state:
 When the #X (Execute) command is issued.
 When another program executes a STOP command, or autoroutine condition is satisfied.

4.3.5.1 C
Description
The C (Compile) command compiles a program in the buffer or all programs in all buffers,
depending on the buffer qualifier.
The C command must not include a line qualifier and is prohibited when the buffer is in the Run
or Suspended states.
Syntax
#buffer_numberC
Arguments
buffer_number buffer_number specifies the buffer, a number between 0 and 16; or you
can use the pound (#) to designate all buffers.

Comments
The C command is not obligatory in order to execute a program. When the X (Execute)
command is issued, the controller automatically compiles the program if it was not previously
compiled. However, a separate compilation step is required in the following cases:
 To check the program correctness without executing it.
 The program is not intended for direct starting, but contains autoroutines. The autoroutines
are ready for execution only after compilation.
 The program is intended for starting from another program by the START command. The
program started by the START command must be compiled before the START command
can be executed.
If the program is successfully compiled, the controller prints a short report of how many lines
were compiled. If an error was encountered, the controller reports the error code and the line
number in which the error was found.

Version NT 2.20 465 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

Examples
The following are examples of the C command.

#0C Compile the program in buffer 0


5 lines compiled Response, the program was compiled
successfully
#9C Compile the program in buffer 9
?2026 in line 16 Response, Error 2026 was found in line 16
??2026 Explain error 2026.
Undefined variable name Response
##C Compile the programs in all buffers
Response:
Buffer 0: 5 lines compiled The program was compiled successfully
Buffer 1: 18 lines compiled The program was compiled successfully
Buffer 2: empty The buffer is empty
Buffer 3: 5 lines compiled The program was compiled successfully
Buffer 4: empty The buffer is empty
Buffer 5: empty The buffer is empty
Buffer 6: empty The buffer is empty
Buffer 7: empty The buffer is empty
Buffer 8: empty The buffer is empty
Buffer 9: ?2026 in line 16 Error 2026 was found in line 16

4.3.5.2 X
Description
The X (Execute) command starts a program in a specific buffer, and can be executed in any
program state except the Run state.
Syntax
#buffer_numberX[line_number]

Version NT 2.20 466 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

Arguments
buffer_number buffer_number qualifier in the command specifies the buffer, a number
between 0 and 16.
line_number Optional, line_number can be a line number or a label. Execution starts
from the specified line. If line_number is omitted, the program starts
from the first line.

Comments
buffer_number must specify one buffer only.
If the state of the program is Not Compiled, the controller first compiles the program and then
starts it. If an error is encountered during compilation, the program does not start.
If the state of the program is Suspended, the X command resumes the program execution. In
this case the command must not contain line_number because upon execution the program
resumes from the point where the it was suspended.
Example

#1X Execute the program in buffer 1


?1 Query status of buffer 1
Buffer 1: 18 lines, running at line 7 Response

4.3.5.3 S/SR
Description
The S/SR Commands are used for terminating program execution:
 S - Stop
The S command terminates program execution in a buffer or the execution of all programs
in all buffers.
 SR - Stop and Reset
The SR (Stop and Reset) command terminates program execution in a buffer or the
execution of all programs in all buffers, and resets the buffer or all buffers to the Not
Compiled state. The command provides the de-compile function, which is useful if the
program contains autoroutines that are ready to start when the buffer is in the Compiled
state.
Syntax
#buffer_number{S|SR}

Version NT 2.20 467 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

Arguments
buffer_number buffer_number specifies the buffer, a number between 0 and 16; or you
can use the pound (#) to designate all buffers.

Comments
If buffer_number is omitted, this will stop, or stop and reset all programs in all buffers, or you
can use the # character as the buffer_number, for example, ##S, which will do the same.
Program termination commands must not include line_numbers.
The S command can be issued in any program state.

Note
The issuance of the SR command effectively prevents the activation of
autoroutines.

Example

#1S Terminate the program in buffer 1


?1 Query status of buffer 1
Buffer 1: 18 lines, terminated in line 7 Response
#1SR Reset the program in buffer 1
?1 Query status of buffer 1
Buffer 1: 18 lines, not compiled Response
##SR Reset all programs in all buffers

4.3.5.4 P
Description
The P (Pause) command suspends program execution in a buffer.
Syntax
#buffer_numberP
Arguments

buffer_number buffer_number specifies the buffer, a number between 0 and 16; or you
can use the pound character, #, to designate all buffers.

Comments
Generally buffer_number refers to one buffer only. The # character may be used instead of a
buffer number, for example, ##P, in which case the execution of all programs in all buffers is
suspended.

Version NT 2.20 468 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

Pause commands must not include line_numbers.


Pause commands are allowed in any program state, but in all states other than Run the
command has no effect.
If the program is in the Suspended state, the X command resumes execution. The S - Stop
command transfers the buffer to the Compiled state. The SR - Stop and Reset command
transfers the buffer to the Not Compiled state.
Example

#1P Suspend the program in buffer 1


?1 Query status of buffer 1
Buffer 1: 18 lines, suspended in line 7 Response
#1SR Reset the program in buffer 1
?1 Query status of buffer 1
Buffer 1: 18 lines, not compiled Response
##P Suspend all programs in all buffers

4.3.6 Debug Commands


The following debug commands are supported:
 XS - Execute one program line
 XD - Execute program in debug mode
 BS - Set breakpoint at specified line
 BR - Reset breakpoint

4.3.6.1 XS
Description
The XS (Execute one step) command executes one program line.
Syntax
#buffer_numberXSline_number
Arguments
buffer_number buffer_number specifies the buffer, a number between 0 and 16.
line_number line_number gives the line to be executed, it can be a line number or a
label.

Comments
The buffer_number qualifier in the command must specify one buffer only.
After executing the specified line_number, the buffer automatically enters the Suspended
state.

Version NT 2.20 469 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

4.3.6.2 XD
Description
The XD (Execute in Debug mode) command executes the program up to the next breakpoint
(see BS).
Syntax
#buffer_numberXD
Arguments
buffer_number buffer_number specifies the buffer, a number between 0 and 16.

Comments
The buffer_number qualifier in the command must specify one buffer only.
The command is similar to the X command. The difference is that the X command ignores
breakpoints in the program. If the program is started by the XD command, it will stop when it
reaches a breakpoint. At the breakpoint the program transfers to the Suspended state and can
be started again by the X, XS, or XD commands.

4.3.6.3 BS
Description
The BS (Set Breakpoint) command sets a breakpoint at the specified line.
Syntax
#buffer_numberBSline_number
Arguments
buffer_number buffer_number specifies the buffer, a number between 0 and 16.
line_number line_number specifies the line at which to set the breakpoint, it can be a
line number or a label.

Comments
The buffer_number qualifier in the command must specify one buffer only.
Any number of breakpoints can be set in a program. For breakpoints to be active, the program
must be started with the XD command.

Note
In a program listing, the lines with breakpoints are indicated by an asterisk.

Version NT 2.20 470 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

4.3.6.4 BR
Description
The BR (Reset Breakpoint) command resets the breakpoint at the specified line or all
breakpoints.
Syntax
#buffer_numberBR[line_number]
Arguments
buffer_number buffer_number specifies the buffer, a number between 0 and 16; or you
can use the pound (#) to designate all buffers.
line_number Optional, if included, the command resets one breakpoint at this line.
line_number can be a line number or a label.

Comments
The buffer_number qualifier in the command must specify one buffer only.
If line_number is omitted, the command resets all breakpoints in the buffer.
If the buffer qualifier is specified as #, for example, ##BR, and line_number is omitted, the
command resets all breakpoints in all buffers.
Example

#0L List buffer 0


1: MovePTP: Response
2: VEL(0) = 20000
3: ptp X, 4000
4: till ^MST(0).#MOVE
5: stop
#0BS3 Set breakpoint at line 3
#0L List buffer 0 (note the asterisk indicating the
breakpoint)
1: MovePTP: Response
2: VEL(0) = 20000
3: *ptp X, 4000
4: till ^MST(0).#MOVE
5: stop
#0XD Execute the program in debug mode in
buffer 0
?0 Query buffer 0 state
Buffer 0: 5 lines, suspended in line 3 Response
#0XS Execute line 3 of buffer 0
?0 Query buffer 0 state
Buffer 0: 5 lines, suspended in line 4 Response
#0XD Execute the rest of the program in buffer 0

Version NT 2.20 471 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

?0 Query buffer 0 state


Buffer 0: 5 lines, terminated in line 5 Response

4.4 System Commands


System commands provide you with information contained in the system.

4.4.1 SI
Description
The SI (System Information) command returns System Information about the SPiiPlus
controller including serial number, firmware version, configuration, name and SP programs.
Syntax
#SI
Arguments
None
Example
#SI
Network System Name: 140
Controller Firmware Version: 1.95.00.00
Controller Serial Number: NTM00000A
Controller Part Number: SP+NTM-08000001NNN

Hardware:
MPU board: Nexcom EBC220 500MHz
MPU board ID: 5
MPU number: DOM4F00010462
EtherCAT Master: N/A
Master Shift: Enabled
Ethernet Adapter: RealTek RTL8139
ID: 3
IP Address: 10.0.0.140
MAC Address: 00 10 F3 0D B2 23
EtherCAT Adapter: RealTek RTL8139
ID: 3
MAC Address: 00 50 C2 88 91 4A

Axes:
Dummy: none
DC Brush: 0,1,2,3,4,5,6,7
DC Brushless: 0,1,2,3,4,5,6,7
P/D Stepper: 8,9,10,11,12,13,14,15
Linear drives: none
PWM drives: 4,5,6,7
Digital Current Loop: 4,5,6,7
Integrated drives: 4,5,6,7
Axis (4): 4.0A continuous/5.0A peak
Axis (5): 4.0A continuous/5.0A peak
Axis (6): 4.0A continuous/5.0A peak
Axis (7): 4.0A continuous/5.0A peak

Version NT 2.20 472 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

Remote HSSI drives: 0,1,2,3,4,5,6,7


Dual loop: 0,1,2,3,4,5,6,7
Position Event Generation (PEG):
PEG pulse: 0,1,2,4,5,6
PEG states: 0,1,2,4,5,6

Options:
Total Number of Axes: 0
SIN-COS Encoders: 0
Input Shaping: No
SPiiPlus PLC: No
Axes with Customized Servo Algorithms: 0
Customized Servo Algorithms Mask: 0x0000
Non-ACS Servo Axes: 0
Non-ACS Stepper Axes: 0
Non-ACS I/O Nodes: 0

Network Unit 0:
ID: 0
DIP: 0
Part Number: NT-LT-8
Vendor ID: 0x00000540
Product ID: 0x01020000
Revision: 1
Serial Number: 16
HW ID: 0x00000064
FPGA version: 0x0000001A

Options:
SIN-COS Encoders: 0
Motor Type Limitations: None

Axes Assignment: 0,1,2,3,4,5,6,7

Inputs/Outputs Assignment:
Digital inputs (IN): 0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7
Digital outputs (OUT): 0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7
Analog inputs (AIN): 0,1,2,3
Analog outputs (AOUT): 0,1,2,3
HSSI channels: 4
Ext. inputs (EXTIN): 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
Ext. outputs (EXTOUT): 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15

Integrated Component “SPiiPlus DC-LT-8”:


Type: Controller (11)
Address: 0x007
Subsystems: 2
Production date: 04/04/11
HW revision: A
S/N: 3N000016

Version NT 2.20 473 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

Integrated Component “PSM3U-48V-0.7kW”:


Type: Power supply (7)
Address: 0x005
Subsystems: 1
Voltage: 48V - 48V
Power: 700W
Production date: 08/12/10
HW revision: 6
S/N: 66

Integrated Component “DDM3U-4-60V-4/5A”:


Type: PWM drive (5)
Address: 0x002
Subsystems: 4
Axes: 4,5,6,7
Drive 0: Axis 4
Drive 2: Axis 5
Drive 1: Axis 6
Drive 3: Axis 7
Voltage: 60V - 60V
Nominal current: 4.000000A
Peak current: 5.000000A
RMS protection Time: 3476.000000
Production date: 27/10/10
HW revision: 10
S/N: 27

Network Unit 1:
ID: 2
DIP: 63
Part Number: PDMnt-4-08-08-00-00
Vendor ID: 0x00000540
Product ID: 0x02040000
Revision: 0
Serial Number: 0

Options:
SIN-COS Encoders: 0
Motor Type Limitations: None

Axes Assignment: 8,9,10,11

Inputs/Outputs Assignment:
Digital inputs (IN): 1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7
Digital outputs (OUT): 1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7
Analog inputs (AIN): none
Analog outputs (AOUT): none

Version NT 2.20 474 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

Integrated Component “PDM-4-8-8”:


Type: Single-Slot Unit (14)
Address: 0x207
Subsystems: 1
Axes: 8,9,10,11
Drive 0: Axis 8
Drive 1: Axis 9
Drive 2: Axis 10
Drive 3: Axis 11
Production date: 01/01/10
HW revision: 0
S/N: 0

Network Unit 2:
ID: 3
DIP: 7
Vendor ID: 0x00000540
Product ID: 0x02040000
Revision: 0
Serial Number: 0

Options:
SIN-COS Encoders: 0
Motor Type Limitations: None

Axes Assignment: 12,13,14,15

Inputs/Outputs Assignment:
Digital inputs (IN): 2.0,2.1,2.2,2.3,2.4,2.5,2.6,2.7
Digital outputs (OUT): 2.0,2.1,2.2,2.3,2.4,2.5,2.6,2.7
Analog inputs (AIN): none
Analog outputs (AOUT): none

Integrated Component “PDM-4-8-8”:


Type: Single-Slot Unit (14)
Address: 0x307
Subsystems: 1
Axes: 12,13,14,15
Drive 0: Axis 12
Drive 1: Axis 13
Drive 2: Axis 14
Drive 3: Axis 15
Production date: 01/01/10
HW revision: 0
S/N: 0

SP0 Program Info:


Monitor version:1
Creation Date: Sun Apr 03 08:26:19 2011
Saving Tool: SPiiPlus NT Servo Application File Generator v.6.83.07.00
SPiiPlus NT Servo Processor Program.

Version NT 2.20 475 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

Date= June 14th 2010


Version= 1.0
Firmware= 1.0

ACS Motion Control Ltd.,


Control and Applications Development,
Copyright (c) 2010. All Rights Reserved.

SP1 Program Info:


Monitor version:1
Creation Date: Sun Apr 03 08:26:19 2011
Saving Tool: SPiiPlus NT Servo Application File Generator v.6.83.07.00
SPiiPlus NT Servo Processor Program.

Date= June 14th 2010


Version= 1.0
Firmware= 1.0

ACS Motion Control Ltd.,


Control and Applications Development,
Copyright (c) 2010. All Rights Reserved.

SP2 Program Info:


Monitor version:ffffffff
Default Servo Processor Info.

SP3 Program Info:


Monitor version:ffffffff
Default Servo Processor Info.

4.4.2 SIR
Description
The SIR (System Information Report) command provides information about the controller.
Syntax
#SIR/Section|ALL/Key|ALL/
Arguments
There are, as a minimum, six Sections:
 Hardware
This section contains information about the controller’s hardware. It has the following
keys:
• Model
The Model ID for the controller card (hardware prefix). It is a three digit number that
can be:
000 SPiiPlus PCI
001 SPiiPlus DDM-4
020 SPiiPlus CM
030 SPiiPlus SA

Version NT 2.20 476 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

040 SPiiPlus 3U-4


041 SPiiPlus 3U-8
042 SPiiPlus 3U-DDM
043 SPiiPlus M
044 SPiiPlus M(A)
050 SPiiPlus-LF
060 SPiiPlus NT
• FM
The Firmware version number.
• Platform
The controller card type ID, (first two numbers of hardware prefix).
• SN
The controller serial number.
• PN
The controller part number.
• MPU
A number identifying the controller MPU, which can be:
0 Unknown
1 RTD 686GX-233MHz
2 Sensoray 301-133MHz
3 Netcom CM589/CM585-300MHz
4 Kontron MOPS6-266MHz
5 Nexcom EBC220-500MHz
• MPUN
The MPU serial number.
• PAL
The controller PAL version.
• Controller_Version
Card version for the controller.
• SP
Number of Servo-Processor units in the controller.
• Master_Shift
Enabled - master shift is disabled
Disabled - master shift is enabled
 Options
This section contains information about the controller’s options. It has the following keys:
• TotalNumberOfAxes
Maximum number of allowed axes.

Version NT 2.20 477 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

• SinCosEncoders
Maximum number of allowed SIN-COS encoders.
• InputShaping
Indicates if Input Shaping is allowed or not:
Yes - Input Shaping is allowed
No - Input Shaping is not allowed
• SPiiPlusPLC
Indicates if SPiiPlus PLC is allowed or not:
Yes - SPiiPlus PLC is allowed
No - SPiiPlus PLC is not allowed
• SinCosEncoders
Maximum number of allowed SIN-COS encoders.
• AxesWithCustomizedServoAlgorithms
Maximum number of allowed axes to be used with customized servo algorithms.
• CustomizedServoAlgorithmsMask
A 4 hexadecimal digits (starts with 0x) that serves as a mask of allowed customized
servo algorithms.
• NonACSServoAxes
Maximum number of allowed Non-ACS Servo axes that can be used.
• NonACSStepperAxes
Maximum number of allowed Non-ACS Stepper axes that can be used.
• NonACSIONodes
Maximum number of allowed Non-ACS I/O Nodes that can be used.
 Network
This section contains information about the controller’s Ethernet channels. It contains the
following keys:
• NIC1
Code for the type of the first network adapter (the same codes are used for the second
NIC if one exists, see NIC2 below) which can be:
000 Not present
001 NE2000 compatible Ethernet card
002 Intel 82559 PCI Ethernet card
003 RealTek RTL8139 PCI Ethernet card
• NIC1_IP
Number for the first NIC IP address.
• NIC1_MAC
12 hexadecimal digits providing the MAC address for the first NIC

Version NT 2.20 478 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

Note
This number is fictitious in the Simulator.

• NIC2
Code for the type of the second network adapter if it exists. Values are the same as those
for NIC1, otherwise it is zero.
• NIC2_IP
Number for the second NIC IP address, if the second network adapter exists, otherwise
it is zero.
• NIC2_MAC
12 hexadecimal digits providing the MAC address for the second NIC if it exists,
otherwise it is zero. As for NIC1_MAC, this information is fictitious in Simulator.
 Axes_support
This section contains information about the features that each axis has. It has the following
keys:
• Dummy
A list of dummy axes numbers, separated by commas.
• DC_Brush
All axes that support DC brush motors.
• DC_ Brushless
All axes that support DC Brushless motors.
• PD_Stepper
All axes that support P/D Stepper motors.
• LDM3U
All axes that are controlled by an internal LDM3U drive.
• Digital_Current_Loop
All axes that support a drive with digital current loop.
• PWM
All axes controlled by an internal PWM drive.
• Integrated
All axes controlled by an Integrated drive (PWM or LDM).
• HSSI_Drive
All axes that support an HSSI drive.
• Dual_Loop
All axes that support Dual Loop control.
• PEG_Pulse
All axes that support the PEG Pulse feature.

Version NT 2.20 479 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

• PEG_State
All axes that support the PEG State feature.
 UNIT#
There is a UNIT section for each unit in the system, they are numbered from 0 up to the
number of units minus 1, for example, UNIT0 is the first unit in the system. Each UNIT
section contains information about the unit. The keys are as follows:
• ID
The ID of the unit.
• DIP
The DIP switch of the unit.
• NetworkAxes
The axes indices, separated by commas, of all axes allocated to the unit.
• DigitalInputs
All digital input variable indices, separated by commas, that are allocated to the unit.
• DigitalOutputs
All digital output variable indices, separated by commas, that are allocated to the unit.
• AnalogInputs
All analog input variable indices, separated by commas, that are allocated to the unit.
• AnalogOutputs
All analog output variable indices, separated by commas, that are allocated to the unit.
• HSSIVariables
All HSSI variable indices (input/output pairs), separated by commas, that are allocated
to the unit.
• HSSIChannels
All HSSI channel indices, separated by commas, for the HSSI variables that are
allocated for the unit.

Note
Element N in this list corresponds to element N in the HSSIRegisters list

• HSSIRegisters
List of HSSI registers for the HSSI variables, separated by commas, that are allocated
for the unit.

Version NT 2.20 480 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

 AXIS#
There is an AXIS section for each axis in the system, they are numbered from 0 up to the
total number of axes in the system minus 1, for example, AXIS0 is the first axis in the
system. Each AXIS section contains information about the axis. The keys are as follows:
• CurrentNominal
The nominal current, in amperes, of the axis.
• CurrentPeak
The peak current, in amperes, of the axis.
• XRMSmax
Maximum nominal current, in % of peak, of the axis.
• XRMSTmax
Maximum time constant for RMS protection.
• DriveInterface.
Interface numbers for the drive are:
1 PWM
2 External +10
3 LDM3U
4 ED2
5 Network
6 Digital LDM3U
• MaxCommandCurrent
Maximum command for the drive.
• SerialNumber
Serial number for the axis drive. If the drive has no serial number, nothing is displayed.
Comments
All section and key names are case sensitive. For example, if only the Firmware version number
is needed, the command would be entered as:
#SIR/Hardware/FW/

Example
#SIR/ALL/ALL/
[Hardware]
Model = 60
FW = 1.95.03.00
SN = 3N000021A
PN = SP+NT
MPU = 5
MPUN = DOMA400088768
SP = 3
Master_Shift = Disabled
[Network]
NIC1 = 3
NIC1_IP = -2097151990
NIC1_MAC = 0010F31A09E3
NIC2 = 0

Version NT 2.20 481 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

NIC2_IP = 0
NIC2_MAC = 000000000000
[Options]
TotalNumberOfAxes = 32
SinCosEncoders = 32
InputShaping = Yes
SPiiPlusPLC = No
AxesWithCustomizedServoAlgorithms = 0
CustomizedServoAlgorithmsMask = 0x0000
NonACSServoAxes = 32
NonACSStepperAxes = 32
NonACSIONodes = 32
[Axes_support]
Dummy = 0
DC_Brush = 18446744069414584575
DC_Brushless = 18446744069414584575
PD_Stepper = 18446744069414584320
LDM3U = 0
Digital_Current_Loop = 0
PWM = 0
Integrated = 0
HSSI_Drive = 18446744069414584575
Dual_Loop = 18446744069414584575
PEG_Pulse = 18446744069414584439
PEG_State = 18446744069414584439
[UNIT0]
ID = 0
DIP = 0
NetworkAxes = 0,1,2,3,4,5,6,7
DigitalInputs = 0
DigitalOutputs = 0
AnalogInputs = 0,1,2,3
AnalogOutputs = 0,1,2,3
HSSIVariables = 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
HSSIChannels = 0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3
HSSIRegisters = 0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3
[UNIT1]
ID = 2
DIP = 0
NetworkAxes = none
DigitalInputs = none
DigitalOutputs = none
AnalogInputs = none
AnalogOutputs = none
HSSIVariables = none
HSSIChannels = none
HSSIRegisters = none
[AXIS0]
CurrentNominal = 0.000000
CurrentPeak = 0.000000
XRMSmax = 50.000000
XRMSTmax = 3230.000000
Voltage = 0
DriveInterface = 2
MaxCommandCurrent = 5242
SerialNumber =

Version NT 2.20 482 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

[AXIS1]
CurrentNominal = 0.000000
CurrentPeak = 0.000000
XRMSmax = 50.000000
XRMSTmax = 3230.000000
Voltage = 0
DriveInterface = 2
MaxCommandCurrent = 5242
SerialNumber =
[AXIS2]
CurrentNominal = 0.000000
CurrentPeak = 0.000000
XRMSmax = 50.000000
XRMSTmax = 3230.000000
Voltage = 0
DriveInterface = 2
MaxCommandCurrent = 5242
SerialNumber =
[AXIS3]
CurrentNominal = 0.000000
CurrentPeak = 0.000000
XRMSmax = 50.000000
XRMSTmax = 3230.000000
Voltage = 0
DriveInterface = 2
MaxCommandCurrent = 5242
SerialNumber =
[AXIS4]
CurrentNominal = 0.000000
CurrentPeak = 0.000000
XRMSmax = 50.000000
XRMSTmax = 3230.000000
Voltage = 0
DriveInterface = 2
MaxCommandCurrent = 5242
SerialNumber =
[AXIS5]
CurrentNominal = 0.000000
CurrentPeak = 0.000000
XRMSmax = 50.000000
XRMSTmax = 3230.000000
Voltage = 0
DriveInterface = 2
MaxCommandCurrent = 5242
SerialNumber =
[AXIS6]
CurrentNominal = 0.000000
CurrentPeak = 0.000000
XRMSmax = 50.000000
XRMSTmax = 3230.000000
Voltage = 0
DriveInterface = 2
MaxCommandCurrent = 5242
SerialNumber =
[AXIS7]
CurrentNominal = 0.000000

Version NT 2.20 483 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

CurrentPeak = 0.000000
XRMSmax = 50.000000
XRMSTmax = 3230.000000
Voltage = 0
DriveInterface = 2
MaxCommandCurrent = 5242
SerialNumber =
[AXIS8]
CurrentNominal = 0.000000
CurrentPeak = 0.000000
XRMSmax = 50.000000
XRMSTmax = 3230.000000
Voltage = 0
DriveInterface = 2
MaxCommandCurrent = 5242
SerialNumber =
[AXIS9]
CurrentNominal = 0.000000
CurrentPeak = 0.000000
XRMSmax = 50.000000
XRMSTmax = 3230.000000
Voltage = 0
DriveInterface = 2
MaxCommandCurrent = 5242
SerialNumber =
[AXIS10]
CurrentNominal = 0.000000
CurrentPeak = 0.000000
XRMSmax = 50.000000
XRMSTmax = 3230.000000
Voltage = 0
DriveInterface = 2
MaxCommandCurrent = 5242
SerialNumber =
[AXIS11]
CurrentNominal = 0.000000
CurrentPeak = 0.000000
XRMSmax = 50.000000
XRMSTmax = 3230.000000
Voltage = 0
DriveInterface = 2
MaxCommandCurrent = 5242
SerialNumber =
[AXIS12]
CurrentNominal = 0.000000
CurrentPeak = 0.000000
XRMSmax = 50.000000
XRMSTmax = 3230.000000
Voltage = 0
DriveInterface = 2
MaxCommandCurrent = 5242
SerialNumber =
[AXIS13]
CurrentNominal = 0.000000
CurrentPeak = 0.000000
XRMSmax = 50.000000

Version NT 2.20 484 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

XRMSTmax = 3230.000000
Voltage = 0
DriveInterface = 2
MaxCommandCurrent = 5242
SerialNumber =
[AXIS14]
CurrentNominal = 0.000000
CurrentPeak = 0.000000
XRMSmax = 50.000000
XRMSTmax = 3230.000000
Voltage = 0
DriveInterface = 2
MaxCommandCurrent = 5242
SerialNumber =
[AXIS15]
CurrentNominal = 0.000000
CurrentPeak = 0.000000
XRMSmax = 50.000000
XRMSTmax = 3230.000000
Voltage = 0
DriveInterface = 2
MaxCommandCurrent = 5242
SerialNumber =
[AXIS16]
CurrentNominal = 0.000000
CurrentPeak = 0.000000
XRMSmax = 50.000000
XRMSTmax = 3230.000000
Voltage = 0
DriveInterface = 2
MaxCommandCurrent = 5242
SerialNumber =
[AXIS17]
CurrentNominal = 0.000000
CurrentPeak = 0.000000
XRMSmax = 50.000000
XRMSTmax = 3230.000000
Voltage = 0
DriveInterface = 2
MaxCommandCurrent = 5242
SerialNumber =
[AXIS18]
CurrentNominal = 0.000000
CurrentPeak = 0.000000
XRMSmax = 50.000000
XRMSTmax = 3230.000000
Voltage = 0
DriveInterface = 2
MaxCommandCurrent = 5242
SerialNumber =
[AXIS19]
CurrentNominal = 0.000000
CurrentPeak = 0.000000
XRMSmax = 50.000000
XRMSTmax = 3230.000000
Voltage = 0

Version NT 2.20 485 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

DriveInterface = 2
MaxCommandCurrent = 5242
SerialNumber =
[AXIS20]
CurrentNominal = 0.000000
CurrentPeak = 0.000000
XRMSmax = 50.000000
XRMSTmax = 3230.000000
Voltage = 0
DriveInterface = 2
MaxCommandCurrent = 5242
SerialNumber =
[AXIS21]
CurrentNominal = 0.000000
CurrentPeak = 0.000000
XRMSmax = 50.000000
XRMSTmax = 3230.000000
Voltage = 0
DriveInterface = 2
MaxCommandCurrent = 5242
SerialNumber =
[AXIS22]
CurrentNominal = 0.000000
CurrentPeak = 0.000000
XRMSmax = 50.000000
XRMSTmax = 3230.000000
Voltage = 0
DriveInterface = 2
MaxCommandCurrent = 5242
SerialNumber =
[AXIS23]
CurrentNominal = 0.000000
CurrentPeak = 0.000000
XRMSmax = 50.000000
XRMSTmax = 3230.000000
Voltage = 0
DriveInterface = 2
MaxCommandCurrent = 5242
SerialNumber =
[AXIS24]
CurrentNominal = 0.000000
CurrentPeak = 0.000000
XRMSmax = 50.000000
XRMSTmax = 3230.000000
Voltage = 0
DriveInterface = 2
MaxCommandCurrent = 5242
SerialNumber =
[AXIS25]
CurrentNominal = 0.000000
CurrentPeak = 0.000000
XRMSmax = 50.000000
XRMSTmax = 3230.000000
Voltage = 0
DriveInterface = 2
MaxCommandCurrent = 5242

Version NT 2.20 486 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

SerialNumber =
[AXIS26]
CurrentNominal = 0.000000
CurrentPeak = 0.000000
XRMSmax = 50.000000
XRMSTmax = 3230.000000
Voltage = 0
DriveInterface = 2
MaxCommandCurrent = 5242
SerialNumber =
[AXIS27]
CurrentNominal = 0.000000
CurrentPeak = 0.000000
XRMSmax = 50.000000
XRMSTmax = 3230.000000
Voltage = 0
DriveInterface = 2
MaxCommandCurrent = 5242
SerialNumber =
[AXIS28]
CurrentNominal = 0.000000
CurrentPeak = 0.000000
XRMSmax = 50.000000
XRMSTmax = 3230.000000
Voltage = 0
DriveInterface = 2
MaxCommandCurrent = 5242
SerialNumber =
[AXIS29]
CurrentNominal = 0.000000
CurrentPeak = 0.000000
XRMSmax = 50.000000
XRMSTmax = 3230.000000
Voltage = 0
DriveInterface = 2
MaxCommandCurrent = 5242
SerialNumber =
[AXIS30]
CurrentNominal = 0.000000
CurrentPeak = 0.000000
XRMSmax = 50.000000
XRMSTmax = 3230.000000
Voltage = 0
DriveInterface = 2
MaxCommandCurrent = 5242
SerialNumber =
[AXIS31]
CurrentNominal = 0.000000
CurrentPeak = 0.000000
XRMSmax = 50.000000
XRMSTmax = 3230.000000
Voltage = 0
DriveInterface = 2
MaxCommandCurrent = 5242
SerialNumber =
:

Version NT 2.20 487 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

4.4.3 IR
Description
The IR (Integrity Report) command activates integrity validation and provides a report of
current integrity state. The report displays a list of files. Each list entry displays a file name,
expected file size and checksum of the file and actual file size and checksum.

Note
It takes some time to compile the Integrity Report, in order to avoid a
Timeout error:
1. Right-click the controller in the Workspace Tree and select Properties.
2. Increase the Connection Timeout to 10,000 ms.
3. Click Connect.

Syntax
#IR
Arguments
None
Comments
If any integrity problem is detected, the command raises fault bit S_FAULT.#INTGR.
Example
#IR
Size Checksum
Registered Actual Registered Actual
c:\
SB1218PC.frm 001E2870 001E2870 03672ED6 03672ED6
SB1218PC.bin 0000812A 0000812A DDC2E529 DDC2E529
c:\sb4\dsp\
dsp.### 0004FF18 0004FF18 61F6BA11 61F6BA11
dsp.##1 0003E11B 0003E11B 783AE65B 783AE65B
adj0.$$$ 0000122B 0000122B 69003B3B 69003B3B
adj1.$$$ 00001A99 00001A99 055D4E11 055D4E11
adj2.$$$ 000019DA 000019DA BC928A33 BC928A33
adj3.$$$ 00001A9B 00001A9B 4403628F 4403628F
adj4.$$$ 0000197E 0000197E DE12BDD7 DE12BDD7
adj5.$$$ 00001229 00001229 A974E209 A974E209
adj6.$$$ 00001229 00001229 A977E20C A977E20C
adj7.$$$ 0000122B 0000122B 61EE382F 61EE382F
c:\sb4\startup\
par.$$$ 000001C9 000001C9 D8A0220A D8A0220A
par0.$$$ 00000A16 00000A16 B2783961 B2783961
par1.$$$ 00000A13 00000A13 5E2EAD92 5E2EAD92
par2.$$$ 00000A14 00000A14 5A972E6D 5A972E6D
par3.$$$ 00000A13 00000A13 B25EDAD0 B25EDAD0
par4.$$$ 00000A13 00000A13 CD6E01E2 CD6E01E2
par5.$$$ 00000A13 00000A13 F6873205 F6873205
par6.$$$ 00000A15 00000A15 39E27520 39E27520
par7.$$$ 00000A15 00000A15 77CA503D 77CA503D

Version NT 2.20 488 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

par8.$$$ 00000A13 00000A13 43A67043 43A67043


par9.$$$ 00000A13 00000A13 67BC915E 67BC915E
par10.$$$ 00000A89 00000A89 454F04F9 454F04F9
par11.$$$ 00000A89 00000A89 5A67281F 5A67281F
par12.$$$ 00000A89 00000A89 6F7F4B45 6F7F4B45
par13.$$$ 00000A89 00000A89 84976E6B 84976E6B
par14.$$$ 00000A89 00000A89 99AF9191 99AF9191
par15.$$$ 00000A89 00000A89 AEC7B4B7 AEC7B4B7
par16.$$$ 00000A89 00000A89 C3DFD7DD C3DFD7DD
par17.$$$ 00000A89 00000A89 D8F7FB03 D8F7FB03
par18.$$$ 00000A89 00000A89 EE101E29 EE101E29
par19.$$$ 00000A89 00000A89 0328414F 0328414F
par20.$$$ 00000A89 00000A89 6B641D1C 6B641D1C
par21.$$$ 00000A89 00000A89 807C4042 807C4042
par22.$$$ 00000A89 00000A89 95946368 95946368
par23.$$$ 00000A89 00000A89 AAAC868E AAAC868E
par24.$$$ 00000DF1 00000DF1 26E26061 26E26061
par25.$$$ 00000DF1 00000DF1 4B01777C 4B01777C
par26.$$$ 00000DF1 00000DF1 6F208E97 6F208E97
par27.$$$ 00000DF1 00000DF1 933FA5B2 933FA5B2
par28.$$$ 00000DF1 00000DF1 B75EBCCD B75EBCCD
par29.$$$ 00000DF1 00000DF1 DB7DD3E8 DB7DD3E8
par30.$$$ 00000DF1 00000DF1 B18A230C B18A230C
par31.$$$ 00000DF1 00000DF1 D5A93A27 D5A93A27
c:\sb4\user\
I 000001A0 000001A0 414453BB 414453BB
V 00000330 00000330 414453BC 414453BC
X_FILE 00000070 00000070 82665362 82665362
PMAP 00000340 00000340 F29BADD0 F29BADD0
ONE 00000FC0 00000FC0 4144573F 4144573F
TWO 00002F00 00002F00 414453A7 414453A7
X_ERR 00000040 00000040 42A2135C 42A2135C
System Integrity is OK

4.4.4 U
Description
The U (Usage) command is used for monitoring MPU usage. It returns the maximum, average,
and minimum values as a percent.
Syntax
#U
Arguments
None
Comments
The controller continuously measures the time taken by real-time tasks. When the U command
is received, the controller analyzes the measured times during the last 50 controller cycles and
calculates minimal, maximal and average time. The results are reported in percents.

Version NT 2.20 489 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

4.4.5 TD
Description
The TD command returns the names of all user-defined variables and arrays that are in the
controller flash memory.
Syntax
#TD
Arguments
None

4.4.6 SC
Description
The SC (Safety Control) command reports the current safety system configuration.
The controller response includes the following:
 active safety groups
 the configuration of each fault for each motor
Syntax
#SC
Arguments
None
Example
#SC
Bit Name Fault Description 0 1 2 4 5 6 8 9 10 11 12 13 14 15
0 #RL Hardware Right Limit K K K K K K K K K K K K K K
1 #LL Hardware Left Limit K K K K K K K K K K K K K K
2 #NT Network Error D D D - D D D D D D D D D D
4 #HOT Motor Overheat - - - - - - - - - - - - - -
5 #SRL Software Right Limit K K K K K K K K K K K K K K
6 #SLL Software Left Limit K K K K K K K K K K K K K K
7 #ENCNC Encoder Not Connected D D D D D D D D D D D D D D
8 #ENC2NC Encoder 2 Not Connected - - - - - - - - - - - - - -
9 #DRIVE Drive Fault D D D D D D D D D D D D D D
10 #ENC Encoder Error D D D D D D D D D D D D D D
11 #ENC2 Encoder 2 Error - - - - - - - - - - - - - -
12 #PE Position Error
13 #CPE Critical Position Error D D D D D D D D D D D D D D
14 #VL Velocity Limit K K K K K K K K K K K K K K
15 #AL Acceleration Limit - - - - - - - - - - - - - -
16 #CL Overcurrent D D D D D D D D D D D D D D
17 #SP Servo Processor Alarm D D D D D D D D D D D D D D
20 #HSSINC HSSI Not Connected - - - - - - - - - - - - - -
25 #PROG Program Error K K K K K K K K K K K K K K
26 #MEM Memory Overflow K K K K K K K K K K K K K K
27 #TIME MPU Overuse -
28 #ES Hardware Emergency Stop D D D - D D D D D D D D D D
29 #INT Servo Interrupt D D D D D D D D D D D D D D
30 #INTGR File Integrity
31 #FAILURE Component Failure D D D D D D D D D D D D D D
Legend:
- Fault Detection Disabled
Blank No Default Response
K Kill Motion Response
D Disable Axis Response
KD Kill Motion Followed by Disable Axis Response
+ Generalized Fault

Version NT 2.20 490 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

Bit Name Fault Description 16 17 18 19 20 21 22 23 24 25 26 27 28


29 30 31
0 #RL Hardware Right Limit K K K K K K K K K K K K K K K K
1 #LL Hardware Left Limit K K K K K K K K K K K K K K K K
2 #NT Network Error D D D D D D D D D D D D D D D D
4 #HOT Motor Overheat - - - - - - - - - - - - - - - -
5 #SRL Software Right Limit K K K K K K K K K K K K K K K K
6 #SLL Software Left Limit K K K K K K K K K K K K K K K K
7 #ENCNC Encoder Not Connected D D D D D D D D D D D D D D D D
8 #ENC2NC Encoder 2 Not Connected - - - - - - - - - - - - - - - -
9 #DRIVE Drive Fault D D D D D D D D D D D D D D D D
10 #ENC Encoder Error D D D D D D D D D D D D D D D D
11 #ENC2 Encoder 2 Error - - - - - - - - - - - - - - - -
12 #PE Position Error
13 #CPE Critical Position Error D D D D D D D D D D D D D D D D
14 #VL Velocity Limit K K K K K K K K K K K K K K K K
15 #AL Acceleration Limit - - - - - - - - - - - - - - - -
16 #CL Overcurrent D D D D D D D D D D D D D D D D
17 #SP Servo Processor Alarm D D D D D D D D D D D D D D D D
20 #HSSINC HSSI Not Connected - - - - - - - - - - - - - - - -
25 #PROG Program Error K K K K K K K K K K K K K K K K
26 #MEM Memory Overflow K K K K K K K K K K K K K K K K
27 #TIME MPU Overuse
28 #ES Hardware Emergency Stop D D D D D D D D D D D D D D D D
29 #INT Servo Interrupt D D D D D D D D D D D D D D D D
30 #INTGR File Integrity
31 #FAILURE Component Failure D D D D D D D D D D D D D D D D
Legend:
- Fault Detection Disabled
Blank No Default Response
K Kill Motion Response
D Disable Axis Response
KD Kill Motion Followed by Disable Axis Response
+ Generalized Fault
Bit Name Fault Description 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
0 #RL Hardware Right Limit K K K K K K K K K K K K K K K K
1 #LL Hardware Left Limit K K K K K K K K K K K K K K K K
2 #NT Network Error D D D D D D D D D D D D D D D D
4 #HOT Motor Overheat - - - - - - - - - - - - - - - -
5 #SRL Software Right Limit K K K K K K K K K K K K K K K K
6 #SLL Software Left Limit K K K K K K K K K K K K K K K K
7 #ENCNC Encoder Not Connected D D D D D D D D D D D D D D D D
8 #ENC2NC Encoder 2 Not Connected - - - - - - - - - - - - - - - -
9 #DRIVE Drive Fault D D D D D D D D D D D D D D D D
10 #ENC Encoder Error D D D D D D D D D D D D D D D D
11 #ENC2 Encoder 2 Error - - - - - - - - - - - - - - - -
12 #PE Position Error
13 #CPE Critical Position Error D D D D D D D D D D D D D D D D
14 #VL Velocity Limit K K K K K K K K K K K K K K K K
15 #AL Acceleration Limit - - - - - - - - - - - - - - - -
16 #CL Overcurrent D D D D D D D D D D D D D D D D
17 #SP Servo Processor Alarm D D D D D D D D D D D D D D D D
20 #HSSINC HSSI Not Connected - - - - - - - - - - - - - - - -
25 #PROG Program Error K K K K K K K K K K K K K K K K
26 #MEM Memory Overflow K K K K K K K K K K K K K K K K
27 #TIME MPU Overuse
28 #ES Hardware Emergency Stop D D D D D D D D D D D D D D D D
29 #INT Servo Interrupt D D D D D D D D D D D D D D D D
30 #INTGR File Integrity
31 #FAILURE Component Failure D D D D D D D D D D D D D D D D
Legend:
- Fault Detection Disabled
Blank No Default Response
K Kill Motion Response
D Disable Axis Response
KD Kill Motion Followed by Disable Axis Response
+ Generalized Fault
Bit Name Fault Description 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
0 #RL Hardware Right Limit K K K K K K K K K K K K K K K K
1 #LL Hardware Left Limit K K K K K K K K K K K K K K K K
2 #NT Network Error D D D D D D D D D D D D D D D D
4 #HOT Motor Overheat - - - - - - - - - - - - - - - -
5 #SRL Software Right Limit K K K K K K K K K K K K K K K K
6 #SLL Software Left Limit K K K K K K K K K K K K K K K K
7 #ENCNC Encoder Not Connected D D D D D D D D D D D D D D D D
8 #ENC2NC Encoder 2 Not Connected - - - - - - - - - - - - - - - -
9 #DRIVE Drive Fault D D D D D D D D D D D D D D D D

Version NT 2.20 491 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

10 #ENC Encoder Error D D D D D D D D D D D D D D D D


11 #ENC2 Encoder 2 Error - - - - - - - - - - - - - - - -
12 #PE Position Error
13 #CPE Critical Position Error D D D D D D D D D D D D D D D D
14 #VL Velocity Limit K K K K K K K K K K K K K K K K
15 #AL Acceleration Limit - - - - - - - - - - - - - - - -
16 #CL Overcurrent D D D D D D D D D D D D D D D D
17 #SP Servo Processor Alarm D D D D D D D D D D D D D D D D
20 #HSSINC HSSI Not Connected - - - - - - - - - - - - - - - -
25 #PROG Program Error K K K K K K K K K K K K K K K K
26 #MEM Memory Overflow K K K K K K K K K K K K K K K K
27 #TIME MPU Overuse
28 #ES Hardware Emergency Stop D D D D D D D D D D D D D D D D
29 #INT Servo Interrupt D D D D D D D D D D D D D D D D
30 #INTGR File Integrity
31 #FAILURE Component Failure D D D D D D D D D D D D D D D D
Legend:
- Fault Detection Disabled
Blank No Default Response
K Kill Motion Response
D Disable Axis Response
KD Kill Motion Followed by Disable Axis Response
+ Generalized Fault

4.4.7 ETHERCAT
Description
The ETHERCAT command is used for obtaining complete information about the connected
EtherCAT slaves.
The information it displays is:
 Slave number
 Vendor ID
 Product ID
 Revision
 Serial number
 EtherCAT physical address
 DC support
 Mailbox support
Afterwards the list of network variables is listed. Each variable is described with:
 Name (as in XML)
 Offset inside the telegram (magic number that is used for mapping)
 IN or OUT description
 Data size
Syntax
#ETHERCAT
Arguments
None

Version NT 2.20 492 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

Example
#ETHERCAT
EtherCAT bus scan found 4 nodes:
Node 0:
========
Name: Device 1 (SPiiPlus NT-LT-8-New)
Vendor ID: 0x00000540 Product ID: 0x01020000
PHYS ADDR: 0x03E9 Alias: 0x0000
PD IN: Offset 26.0 Size 118
PD OUT: Offset 26.0 Size 136
STATE: OP
Node 1:
========
Name: Device 2 (SPiiPlus NT-LT-8-New)
Vendor ID: 0x00000540 Product ID: 0x01020000
PHYS ADDR: 0x03EA Alias: 0x0000
PD IN: Offset 162.0 Size 118
PD OUT: Offset 162.0 Size 136
STATE: OP
Node 2:
========
Name: Device 3 (SPiiPlus PDMnt-4-08-08-00-00-0)
Vendor ID: 0x00000540 Product ID: 0x02040000
PHYS ADDR: 0x03EB Alias: 0x0000
PD IN: Offset 298.0 Size 5
PD OUT: Offset 298.0 Size 56
STATE: OP
Node 3:
========
Name: Device 4 (SPiiPlus PDMnt-4-08-08-00-00-0)
Vendor ID: 0x00000540 Product ID: 0x02040000
PHYS ADDR: 0x03EC Alias: 0x0000
PD IN: Offset 354.0 Size 5
PD OUT: Offset 354.0 Size 56
STATE: OP

Network variables:
==================
Offset Size Dir Name
26 32 In Command response1
30 32 In Command response2
34 32 In Command response3
38 32 In Command response4
42 32 In Command response5
46 32 In Command response6
50 32 In Command response7
54 32 In Command response8
58 32 In Feedback Position1
62 32 In Reference Position1
66 32 In Drive status1
70 32 In GP data 1
74 32 In Feedback Position2
78 32 In Reference Position2
82 32 In Drive status2
86 32 In GP data 2
90 32 In Feedback Position3

Version NT 2.20 493 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

94 32 In Reference Position3
98 32 In Drive status3
102 32 In GP data 3
106 32 In Feedback Position4
110 32 In Reference Position4
114 32 In Drive status4
118 32 In GP data 4
122 16 In Digital inputs
124 16 In FPGA status
126 16 In HSSI 1
128 16 In HSSI 2
130 16 In HSSI 3
132 16 In HSSI 4
134 16 In HSSI 5
136 16 In HSSI 6
138 16 In HSSI 7
140 16 In HSSI 8
142 16 In Sync Counter
162 32 In Command response1
166 32 In Command response2
170 32 In Command response3
174 32 In Command response4
178 32 In Command response5
182 32 In Command response6
186 32 In Command response7
190 32 In Command response8
194 32 In Feedback Position1
198 32 In Reference Position1
202 32 In Drive status1
206 32 In GP data 1
210 32 In Feedback Position2
214 32 In Reference Position2
218 32 In Drive status2
222 32 In GP data 2
226 32 In Feedback Position3
230 32 In Reference Position3
234 32 In Drive status3
238 32 In GP data 3
242 32 In Feedback Position4
246 32 In Reference Position4
250 32 In Drive status4
254 32 In GP data 4
258 16 In Digital inputs
260 16 In FPGA status
262 16 In HSSI 1
264 16 In HSSI 2
266 16 In HSSI 3
268 16 In HSSI 4
270 16 In HSSI 5
272 16 In HSSI 6
274 16 In HSSI 7
276 16 In HSSI 8
278 16 In Sync Counter
298 8 In LIMITS
299 8 In DIGITAL_INPUTS
300 8 In FAULTS

Version NT 2.20 494 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

301 8 In NODE_NUM
302 8 In WD_COUNTER
354 8 In LIMITS
355 8 In DIGITAL_INPUTS
356 8 In FAULTS
357 8 In NODE_NUM
358 8 In WD_COUNTER
422 32 In DC1
426 32 In DC2
430 32 In DC3
434 32 In DC4
438 32 In DC5
442 32 In DC6
446 32 In DC7
450 32 In DC8
454 32 In DC9
458 32 In DC10
462 32 In DC11
466 32 In DC12
470 32 In DC13
474 32 In DC14
478 32 In DC15
482 32 In DC16
486 32 In DC17
490 32 In DC18
494 32 In DC19
498 32 In DC20
502 32 In DC21
506 32 In DC22
510 32 In DC23
514 32 In DC24
518 32 In DC25
522 32 In DC26
526 32 In DC27
530 32 In DC28
534 32 In DC29
538 32 In DC30
542 32 In DC31
546 32 In DC32
550 32 In DC33
554 32 In DC34
558 32 In DC35
562 32 In DC36
566 32 In DC37
570 32 In DC38
574 32 In DC39
578 32 In DC40
594 32 In DC1
598 32 In DC2
602 32 In DC3
606 32 In DC4
610 32 In DC5
614 32 In DC6
618 32 In DC7
622 32 In DC8
626 32 In DC9

Version NT 2.20 495 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

630 32 In DC10
634 32 In DC11
638 32 In DC12
642 32 In DC13
646 32 In DC14
650 32 In DC15
654 32 In DC16
658 32 In DC17
662 32 In DC18
666 32 In DC19
670 32 In DC20
674 32 In DC21
678 32 In DC22
682 32 In DC23
686 32 In DC24
690 32 In DC25
694 32 In DC26
698 32 In DC27
702 32 In DC28
706 32 In DC29
710 32 In DC30
714 32 In DC31
718 32 In DC32
722 32 In DC33
726 32 In DC34
730 32 In DC35
734 32 In DC36
738 32 In DC37
742 32 In DC38
746 32 In DC39
750 32 In DC40
26 16 Out Command1
28 16 Out Command2
30 16 Out Command3
32 16 Out Command4
34 16 Out Command5
36 16 Out Command6
38 16 Out Command7
40 16 Out Command8
42 32 Out Command Arg1
46 32 Out Command Arg2
50 32 Out Command Arg3
54 32 Out Command Arg4
58 32 Out Command Arg5
62 32 Out Command Arg6
66 32 Out Command Arg7
70 32 Out Command Arg8
74 32 Out Direct Command1
78 32 Out Reference Acceleration1
82 32 Out Reference Velocity1
86 32 Out Reference Position1
90 32 Out Controller status1
94 32 Out Direct Command2
98 32 Out Reference Acceleration2
102 32 Out Reference Velocity2
106 32 Out Reference Position2

Version NT 2.20 496 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

110 32 Out Controller status2


114 32 Out Direct Command3
118 32 Out Reference Acceleration3
122 32 Out Reference Velocity3
126 32 Out Reference Position3
130 32 Out Controller status3
134 32 Out Direct Command4
138 32 Out Reference Acceleration4
142 32 Out Reference Velocity4
146 32 Out Reference Position4
150 32 Out Controller status4
154 16 Out analog output1
156 16 Out analog output2
158 16 Out digital output
160 16 Out Sync Counter
162 16 Out Command1
164 16 Out Command2
166 16 Out Command3
168 16 Out Command4
170 16 Out Command5
172 16 Out Command6
174 16 Out Command7
176 16 Out Command8
178 32 Out Command Arg1
182 32 Out Command Arg2
186 32 Out Command Arg3
190 32 Out Command Arg4
194 32 Out Command Arg5
198 32 Out Command Arg6
202 32 Out Command Arg7
206 32 Out Command Arg8
210 32 Out Direct Command1
214 32 Out Reference Acceleration1
218 32 Out Reference Velocity1
222 32 Out Reference Position1
226 32 Out Controller status1
230 32 Out Direct Command2
234 32 Out Reference Acceleration2
238 32 Out Reference Velocity2
242 32 Out Reference Position2
246 32 Out Controller status2
250 32 Out Direct Command3
254 32 Out Reference Acceleration3
258 32 Out Reference Velocity3
262 32 Out Reference Position3
266 32 Out Controller status3
270 32 Out Direct Command4
274 32 Out Reference Acceleration4
278 32 Out Reference Velocity4
282 32 Out Reference Position4
286 32 Out Controller status4
290 16 Out analog output1
292 16 Out analog output2
294 16 Out digital output
296 16 Out Sync Counter
298 16 Out PULSE_WIDTH

Version NT 2.20 497 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

300 16 Out INTERVAL1_1


302 16 Out INTERVAL1_2
304 16 Out INTERVAL1_3
306 16 Out INTERVAL2_1
308 16 Out INTERVAL2_2
310 16 Out INTERVAL2_3
312 16 Out INTERVAL3_1
314 16 Out INTERVAL3_2
316 16 Out INTERVAL3_3
318 16 Out INTERVAL4_1
320 16 Out INTERVAL4_2
322 16 Out INTERVAL4_3
324 16 Out PULSE_QTY1_1
326 16 Out PULSE_QTY1_2
328 16 Out PULSE_QTY1_3
330 16 Out PULSE_QTY2_1
332 16 Out PULSE_QTY2_2
334 16 Out PULSE_QTY2_3
336 16 Out PULSE_QTY3_1
338 16 Out PULSE_QTY3_2
340 16 Out PULSE_QTY3_3
342 16 Out PULSE_QTY4_1
344 16 Out PULSE_QTY4_2
346 16 Out PULSE_QTY4_3
348 8 Out ENABLE
349 8 Out DIGITAL_OUTPUT
350 8 Out WD_COUNTER
351 16 Out SEVEN_SEG
353 8 Out SPARE
354 16 Out PULSE_WIDTH
356 16 Out INTERVAL1_1
358 16 Out INTERVAL1_2
360 16 Out INTERVAL1_3
362 16 Out INTERVAL2_1
364 16 Out INTERVAL2_2
366 16 Out INTERVAL2_3
368 16 Out INTERVAL3_1
370 16 Out INTERVAL3_2
372 16 Out INTERVAL3_3
374 16 Out INTERVAL4_1
376 16 Out INTERVAL4_2
378 16 Out INTERVAL4_3
380 16 Out PULSE_QTY1_1
382 16 Out PULSE_QTY1_2
384 16 Out PULSE_QTY1_3
386 16 Out PULSE_QTY2_1
388 16 Out PULSE_QTY2_2
390 16 Out PULSE_QTY2_3
392 16 Out PULSE_QTY3_1
394 16 Out PULSE_QTY3_2
396 16 Out PULSE_QTY3_3
398 16 Out PULSE_QTY4_1
400 16 Out PULSE_QTY4_2
402 16 Out PULSE_QTY4_3
404 8 Out ENABLE
405 8 Out DIGITAL_OUTPUT

Version NT 2.20 498 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

406 8 Out WD_COUNTER


407 16 Out SEVEN_SEG
409 8 Out SPARE
422 32 Out REV_DC1
426 32 Out REV_DC2
430 32 Out REV_DC4
434 32 Out REV_DC4
438 32 Out REV_DC5
442 32 Out REV_DC6
446 32 Out REV_DC7
450 32 Out REV_DC8
454 32 Out REV_DC9
458 32 Out REV_DC10
462 32 Out REV_DC11
466 32 Out REV_DC12
470 32 Out REV_DC13
474 32 Out REV_DC14
478 32 Out REV_DC15
482 32 Out REV_DC16
486 32 Out REV_DC17
490 32 Out REV_DC18
494 32 Out REV_DC19
498 32 Out REV_DC20
502 32 Out REV_DC21
506 32 Out REV_DC22
510 32 Out REV_DC23
514 32 Out REV_DC24
518 32 Out REV_DC25
522 32 Out REV_DC26
526 32 Out REV_DC27
530 32 Out REV_DC28
534 32 Out REV_DC29
538 32 Out REV_DC30
542 32 Out REV_DC31
546 32 Out REV_DC32
550 32 Out REV_DC33
554 32 Out REV_DC34
558 32 Out REV_DC35
562 32 Out REV_DC36
566 32 Out REV_DC37
570 32 Out REV_DC38
574 32 Out REV_DC39
578 32 Out REV_DC40
594 32 Out REV_DC1
598 32 Out REV_DC2
602 32 Out REV_DC4
606 32 Out REV_DC4
610 32 Out REV_DC5
614 32 Out REV_DC6
618 32 Out REV_DC7
622 32 Out REV_DC8
626 32 Out REV_DC9
630 32 Out REV_DC10
634 32 Out REV_DC11
638 32 Out REV_DC12
642 32 Out REV_DC13

Version NT 2.20 499 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

646 32 Out REV_DC14


650 32 Out REV_DC15
654 32 Out REV_DC16
658 32 Out REV_DC17
662 32 Out REV_DC18
666 32 Out REV_DC19
670 32 Out REV_DC20
674 32 Out REV_DC21
678 32 Out REV_DC22
682 32 Out REV_DC23
686 32 Out REV_DC24
690 32 Out REV_DC25
694 32 Out REV_DC26
698 32 Out REV_DC27
702 32 Out REV_DC28
706 32 Out REV_DC29
710 32 Out REV_DC30
714 32 Out REV_DC31
718 32 Out REV_DC32
722 32 Out REV_DC33
726 32 Out REV_DC34
730 32 Out REV_DC35
734 32 Out REV_DC36
738 32 Out REV_DC37
742 32 Out REV_DC38
746 32 Out REV_DC39
750 32 Out REV_DC40

4.4.8 ECMAPREP
Description
The ECMAPREP command displays a report of all variables mapped using the ECIN
function.
Syntax
#ECMAPREP
Example
#ECMAPREP
Input 1:
========
Variable I2, at 0x40620334 (integer)
Array Length 0
Data Length 1
EC Offset 22
Limits 0

Input 2:
========
Variable I0, at 0x40620354 (integer)
Array Length 0
Data Length 1
EC Offset 16
Limits 0

Version NT 2.20 500 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

Output 1:
========
Variable I1, at 0x40620344 (integer)
Array Length 0
Data Length 2
EC Offset 16
Limits 0

4.4.9 CC
Description
The CC command returns data on the existing communication channels.
Syntax
#CC
Example
#CC
Channel Type Mode
1 Serial Command Rate:115200 0N 1
2 Serial Command Rate:115200 0N 1
6 TCP/IP ( 701) Peer:None
7 TCP/IP ( 701) Peer:10.0.0.52
8 TCP/IP ( 701) Peer:10.0.0.65
9 TCP/IP ( 701) Peer:10.0.0.58
10 UDP ( 700) Peer:N/A
36 TCP/IP ( 701) Peer:None
37 TCP/IP ( 701) Peer:None
38 TCP/IP ( 701) Peer:None
39 TCP/IP ( 701) Peer:None
12 PCI bus Command
16 TCP/IP MODBUS Slave Connection:network Peer:None

4.4.10 PLC
Description

Note
This command is valid only if SPiiPlus PLC is running in the system.

The PLC command provides some very important information about the SpiiPlus PLC co-
existence inside the SpiiPlus firmware.

Version NT 2.20 501 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

The information it displays is:


 PLC cycle (in ms):
PLC cycle means what is the frequency that PLC program is executed is. If Maximum is
equal to CTIME, the PLC cycle is always identical to Motion Controller realtime tick. The
data that is shown is:
• Avg:
• Min:
• Max:
 PLC Usage consumption (when active):
How much of the controller usage does the PLC execution take when it is running arranged
by:
• Avg:
• Min:
• Max:
Where the values shown are percentages.
 PLC program: (Program status)
The status can be:
• Running
• Stopped
• Not valid
Syntax
#PLC

4.4.11 LOG
Description
The controller supplies a log of important events to the user.
 The log can keep the last 500 events in memory.
 There is a command to set the time stamp for the log (setting current time).
 There is a command to display the log entries (similar to the Communication Terminal #SI
command), the user can use a host program to save these.
Initially the log includes:
 Motor errors
 Change in an axis FAULT variable
 System Errors.
 Program errors (ACSPL+ buffer termination error).
 Reported I2C drive errors.
 Reported I2C component errors.

Version NT 2.20 502 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

 EtherCAT errors
The LOG report has the following format

Error Type Format


Motor Errors TIME axis error, MERR(AXIS) = ERROR,
Change in an axis FAULT TIME FAULTS(AXIS): PREVIOUS_VALUE -->
variable CURRENT_VALUE
System Errors TIME system error, S_ERR = ERROR
Program errors (ACSPL+ buffer TIME program error, PERR(BUFFER) = ERROR,
termination error) PERL(BUFFER) = LINE

Reported I2C drive errors TIME driver alarm extended error,


address:ADDRESS, axis:AXIS, error:ERROR
Reported I2C component errors TIME component fault extended error,
address:ADDRESS, error:ERROR
EtherCAT errors TIME network error, ECERR = ERROR

Syntax
#LOG
Example
[2011/03/28] [11:15:17.140] FAULTS(57): 0x0 --> 0x20000
[2011/03/28] [11:15:17.140] FAULTS(58): 0x0 --> 0x20000
[2011/03/28] [11:15:17.140] FAULTS(59): 0x0 --> 0x20000
[2011/03/28] [11:15:17.140] FAULTS(60): 0x0 --> 0x20000
[2011/03/28] [11:15:17.140] FAULTS(61): 0x0 --> 0x20000
[2011/03/28] [11:15:17.140] FAULTS(62): 0x0 --> 0x20000
[2011/03/28] [11:15:17.140] FAULTS(63): 0x0 --> 0x20000
[2011/03/28] [11:15:17.403] system error, S_ERR = 5151
[2011/03/28] [11:15:25.502] FAULTS(0): 0x20000 --> 0x20080
[2011/03/28] [11:15:26.526] FAULTS(1): 0x20000 --> 0x20080
[2011/03/28] [11:15:26.527] FAULTS(2): 0x20000 --> 0x20080
[2011/03/28] [11:15:26.527] FAULTS(3): 0x20000 --> 0x20080
[2011/03/28] [11:15:26.527] FAULTS(4): 0x20000 --> 0x20080
[2011/03/28] [11:15:26.527] FAULTS(5): 0x20000 --> 0x20080
[2011/03/28] [11:15:26.527] FAULTS(6): 0x20000 --> 0x20080
[2011/03/28] [11:15:26.527] FAULTS(7): 0x20000 --> 0x20080
[2011/03/28] [11:15:34.352] FAULTS(0): 0x20080 --> 0x80
[2011/03/28] [11:15:34.352] FAULTS(1): 0x20080 --> 0x80
[2011/03/28] [11:15:34.352] FAULTS(2): 0x20080 --> 0x80
[2011/03/28] [11:15:34.352] FAULTS(3): 0x20080 --> 0x80
[2011/03/28] [11:15:34.352] FAULTS(4): 0x20080 --> 0x80

Version NT 2.20 503 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

[2011/03/28] [11:15:34.352] FAULTS(5): 0x20080 --> 0x80


[2011/03/28] [11:15:34.352] FAULTS(6): 0x20080 --> 0x80
[2011/03/28] [11:15:34.352] FAULTS(7): 0x20080 --> 0x80
[2011/03/28] [11:17:09.270] program error, PERR(33) = 3232, PERL(33) = 0
[2011/03/28] [11:17:48.000] program error, PERR(33) = 3232, PERL(33) = 0
[2011/03/28] [11:17:57.958] axis error, MERR(3) = 5017

4.4.12 LOG HOST_TICKS


Description
LOG HOST_TICKS adds a time offset to the controller’s system time when reporting events,
so that the time of reported events will match the host millisecond counter.
The controller adds the difference between HOST_TICKS (in milliseconds) and controller’s
time to event time when reporting events. The controller considers its own power-up time as:
1970/1/1 00:00:00.
If the HOST_TICKS supplied is the correct number of milliseconds since that date, the
controller displays the correct date and time for the GMT time-zone. A time before 1970/1/1
00:00:00 (controller power-up) is displayed as negative milliseconds before this date.
Syntax
#LOG HOST_TICKS
Example
const unsigned __int64 SEC_IN_MIN = 60;
const unsigned __int64 MSEC_IN_SEC = 1000;
char SETLOGTIME[100] = "#LOG ";
int SETLOGTIMELENGTH = (int)strlen(SETLOGTIME);
struct __timeb64 timebuffer;
double CurrentTime;
// Set time zone from TZ environment variable. If TZ is not set,
// the operating system is queried to obtain the default value
// for the variable.
_tzset();
// GET CURRENT LOCAL TIME
_ftime64_s(&timebuffer);
CurrentTime = (((double)timebuffer.time)
- (((double)timebuffer.timezone) * SEC_IN_MIN)) * MSEC_IN_SEC
+ timebuffer.millitm;

SETLOGTIMELENGTH = sprintf_s(SETLOGTIME, 100, "#LOG %f\r", CurrentTime);

Version NT 2.20 504 Reference Guide


SPiiPlus Command & Variable Reference Terminal Commands

if (!acsc_Command(( Handle, // communication handle


SETLOGTIME, // pointer to the buffer that contains
// executed controller’s command
SETLOGTIMELENGTH, // size of this buffer
NULL// waiting call
))
{
printf("transaction error: %d\n", acsc_GetLastError());
}

Version NT 2.20 505 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

5 SPiiPlus Error Codes


This chapter contains explanations of the Error Codes that may appear.
The chapter contains only those Error Codes returned by the controller and does not include
errors associated with the C Library. Errors that are detected by the C Library are never returned
by the controller. A host application that calls a C Library function can receive these codes if a
function call failed. For explanations of the C Library errors see the SPiiPlus C Library
Reference Guide.
The ACSPL+ Error Codes range 1000 to 6011 and are broken down as follows:
ACSPL+ Syntax Errors – numbers 1000 to 1999
ACSPL+ Compilation Errors – numbers 2000 to 2999
ACSPL+ Runtime Errors – numbers 3000 to 3999
Motion Termination Errors – numbers 5000 to 5150
System Errors - numbers 5151 to 5999
EtherCAT Errors - numbers 6000 to 6999

Note
Error code values of 7000 through 8999 are reserved for future use and are
currently not used.
Error code values of 9000 and above are reserved for user-defined error
codes.

5.1 ACSPL+ Syntax Errors


These appear in response to syntax errors that the controller detects when a program is entered
into the buffer and are reported immediately in the prompt that is displayed in response to the
command.
The error code values range between 1000 and 1999.

Table 78 ACSPL+ Syntax Errors (page 1 of 17)


Error Code Error Message Remarks

1001 The program is suspended The program is being run in the Step mode,
and has been suspended at the current step.

1002 The program was terminated by user The program has reached a user-set
breakpoint.

1020 Illegal subcommand A subroutine command that is not


recognized has been entered.

Version NT 2.20 506 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

Table 78 ACSPL+ Syntax Errors (page 2 of 17)


Error Code Error Message Remarks

1021 SP command requires axis The required axis designation is missing.


specification

1022 Illegal command A program command that is not recognized


has been entered.

1023 Read-only variable cannot be The command specifies assignment to a


assigned read-only variable.

1024 Set variable cannot be reported

1025 Time interval between two The compiler recognizes that a follow-on
characters in command is more than command has not arrived within 2 seconds.
2 seconds The error is relevant when an application is
using a call to a SPiiPlus C Library routine,
and usually indicates a communication
problem.

1026 Serial Number, Part Number, or An attempt was made to respecify the
Software Options were already controller’s serial number, part number, or
specified software options.

1027 Variable requires axis specification An ACSPL+ variable missing the required
axis specification was used.

1028 Scalar variable cannot accept axis A scalar variable was used with an axis
specification specification.

1029 Extra characters after the command A command has been entered with
extraneous characters or parameters that are
not recognized.

1030 Too many parameters The entry contains too many parameters.

1031 Illegal array in the array command The array in the command either does not
exist, or its size does not match the
requirements of the command.

1032 Illegal data in array The array contains data in a format that does
not match requirements.

1033 Illegal edit command The edit command that has been entered
cannot be executed.

1034 Illegal index value The command includes numerical index


specification, but the specified index is not
a number.

Version NT 2.20 507 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

Table 78 ACSPL+ Syntax Errors (page 3 of 17)


Error Code Error Message Remarks

1035 Index is out of range The error is caused by one the following:
 The specified index value is more than
the number of elements in the array
 The specified index value is negative
 The specified index values are
incompatible (first value in the range
greater than last).

1036 Internal error An internal error has been detected..

1037 Illegal variable name The command requires specification of an


ACSPL+ variable name, but the specified
name is not that of an ACSPL+ variable.

1038 Wrong checksum in the command The command contains checksum, and the
checksum value is wrong. The error is
relevant when an application includes
SPiiPlus C Library routines, and indicates
communication problems.

1039 Only one motion per axis can be An attempt was made to setup more than
planned in advance one motion for a specified axis.

1040 Unable to open file The command specifies an internal file in


the flash memory that does not exist.

1041 Assigned value is out of range The command attempts to assign an


ACSPL+ variable with a value that is out of
the range allowed for this variable.

1042 Operation failed because of


exception

1043 Program cannot start because the The command attempts to start an un-
buffer was not compiled compiled ACSPL+ program. To compile a
program, in the SPiiPlus MMI Application
Studio:
 In the Program Manager, right-click
the buffer and select Compile Buffer,
or
 Use the #nC command in the
Communication Terminal, where n is
the buffer number.

Version NT 2.20 508 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

Table 78 ACSPL+ Syntax Errors (page 4 of 17)


Error Code Error Message Remarks

1044 Command cannot be executed while The command attempts to affect a running
the program is running ACSPL+ program. Stop the program before
executing the command. To stop a program,
in the SPiiPlus MMI Application Studio:
 In the Program Manager, right-click
the buffer and select Stop Buffer, or
 Use the #nS command in the
Communication Terminal, where n is
the buffer number.

1045 Numerical error in standard function The command includes an ACSPL+


function that caused a numerical error.
Check if the arguments of the function fall
into the allowed range.

1046 Write file error The command has caused writing to the
flash memory that failed. Possible reason is
a flash memory overflow because of too
many stored user files.

1047 Read file error The command has caused reading from the
flash memory that failed. A reoccurring
error points to a serious problem in the
controller hardware or firmware.

1048 More axes than were defined in the The POINTcommand specifies more axes
motion than were specified in the motion that the
command refers to.

1049 Axis already belongs to a group An attempt was made to assign an axis to a
group when it has already been assigned to
another group.

1050 Conflict with user-defined axis group The command is incompatible with a user-
defined axis group that was defined before.
The axes specified in the command must
either all belong to one user-defined axis
group, or not to intersect with any user-
defined axis group.

1051 Line number is out of range The command specifies a line number that
does not exist in the specified program
buffer.

1052 Buffer number is out of range The command specifies illegal buffer
number. The controller contains 16
program buffers numbered from 0 to 15,
plus the D buffer.

Version NT 2.20 509 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

Table 78 ACSPL+ Syntax Errors (page 5 of 17)


Error Code Error Message Remarks

1053 Wrong type The command addresses an ACSPL+


variable and the type of the variable is
different from the type specified in the
command. The error is relevant when an
application includes a SPiiPlus C Library
routine. The error indicates problems in
communication.

1054 This type of motion is valid for single An attempt was made to send a single-axis
axis only motion to more than one axis.

1055 Command requires line number The command is missing a required line
specification number specification.

1056 Parameter MA defines illegal master The parameter specifying the master has an
value illegal value (see MASTER).

1057 Previous superimposed motion is in


progress

1058 Slave is not synchronized to master The slave controller has not been
synchronized with the master controller.

1059 Command PTPV must specify The PTP/v command was issued without a
velocity value value for velocity.

1060 Illegal memory command The memory management command is


improperly formatted.

1061 ')' wasn't found The command contains a non-paired left


bracket.

1063 Variable is not defined in the buffer The command addresses a variable that is
not declared in the specified buffer, or the
specified buffer is not compiled.

1064 Undefined global variable The command addresses a global variable


that is not declared in any buffer, or the
buffer that contains the declaration is not
compiled.
Variable name must be in upper case.

1065 Command cannot be executed while The command is in conflict with one or
the current motion is in progress more of the currently executed motions. To
kill a motion use KILL or KILLALL.

1067 GO command failed The controller has no motions waiting for


the GO command.

Version NT 2.20 510 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

Table 78 ACSPL+ Syntax Errors (page 6 of 17)


Error Code Error Message Remarks

1068 Referenced axis does not execute a The command refers to a motion, but the
motion (motion was terminated?) specified axis is not involved in any motion.

1069 This command can be used only with Commands POINTand MPOINTare
MPTP, PATH or PVSPLINE motion compatible only with the MPTP...ENDS,
PATH...ENDS, or PVSPLINE...ENDS
motions.

1070 Attempt to add segment after ENDS The command attempts to add a segment or
command a point to the motion that was closed before
with an ENDS of the MPTP...ENDS,
PATH...ENDS, or PVSPLINE...ENDS
commands.

1071 File name was expected The command must specify a name of
internal file in the flash memory.

1072 Wrong array size The command specifies an array, but the
motion to which the command refers, or
other command arguments require an array
of another size.

1073 Text for search is not specified The command must specify a text for search
operation.

1074 Only standard or SP variable is The command requires an ASCPL+ or SP


allowed in the command variable name to be specified.

1075 Name is not a standard or user The specified variable name is not an
variable ACSPL+ or user-defined variable name.

1076 Undefined label The command requires a label


specification. The program that contains the
label specified in the command must be
compiled in a buffer.

1077 Protection violation The command attempts to assign a


protected variable when the controller is in
Protected mode. The controller must be put
in the Not Protected mode before protected
variables can be assigned. To do this, use
the SPiiPlus MMI Application Studio
Protection Wizard in Development
Tools.

Version NT 2.20 511 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

Table 78 ACSPL+ Syntax Errors (page 7 of 17)


Error Code Error Message Remarks

1078 Variable can be changed only while The command attempts to assign a value to
the motor is disabled a variable that can be changed only if the
motor is disabled. A DISABLE command
must be put in before the value can be
assigned to the variable.

1079 Motion cannot start because one or Motor(s) are in motion and have to be
more motors are disabled disabled before the motion can be initiated.
A DISABLE command must be put in prior
to initiating motion.

1080 Default Connection flag is set for the


motor

1081 Incompatible suffixes The command includes command options


that cannot be used together.

1082 Commands BEGIN, END, KILL, A GO or KILL command has been entered
GO require axis specification without an axis specification.

1083 Array requires axis specification An array requiring an axis specification has
been entered without an axis specification.

1084 Illegal array command Either the array does not exist, or it is not in
a compiled buffer.

1085 Extra number after the command The command specifies a superfluous
numerical argument.

1086 Variable name must be specified The command requires a variable name
specification.

1087 Command cannot be executed while The command specifies one or more axes
the axis is moving that are involved in a motion. The command
can be executed only after the motion
finishes.

1088 Variable can be queried only in The command attempts to query a variable
compiled buffer in a buffer that was not compiled.

1089 Label can be referenced only in The command attempts to reference a label
compiled buffer in a buffer that was not compiled.

1090 This type of motion is not allowed for The slave or track command specifies an
grouped axis axis that was included in a user-defined
group.
Only a single axis can be specified in the
slave or track command.

Version NT 2.20 512 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

Table 78 ACSPL+ Syntax Errors (page 8 of 17)


Error Code Error Message Remarks

1091 Less arguments than required The motion command specifies fewer
coordinate values than required by the axis
specification.

1092 More arguments than required The motion command specifies more
coordinate values than required by the axis
specification.

1093 Bit selector value is greater than 31 The expression specified in the bit selector
or less than 0 yields a value greater than 31 or less than 0.

1094 Empty line range is specified The range of lines specified refers to empty
lines.

1095 No master-slave motion is in The command addresses master-slave


progress motion that has not yet started.

1096 '}' was not found The command includes a non-paired left
curly bracket.

1097 Previous data collection is in The command attempts to start a data


progress collection while the previous data collection
for the same axis is still in progress.

1098 Stalled motion requires limits The motion command, which includes a
specification command option of stalled motion, requires
specification of the motion limits.

1099 Extra numbers after the command The motion command includes superfluous
numerical arguments.

1100 Received command has no message The command does not contain the ID of
ID the message to which it refers.

1101 The program is suspended, the start The command attempts to start a program
line number is not allowed from a specified line when the program is in
suspended state.
A program in suspended state can be only
resumed from the next line. The line
specification is not allowed.
The only way to start a suspended program
from arbitrary line is to stop the program,
and to start it again from the desired line.

1102 Zero divide The an illegal divide by zero is attempted by


the command.

1103 Invalid reference The command contains an invalid


reference.

Version NT 2.20 513 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

Table 78 ACSPL+ Syntax Errors (page 9 of 17)


Error Code Error Message Remarks

1104 No ACSPL program is waiting for The command is attempting to send input,
input but no program is open for receipt.

1105 Format error The command is incorrectly formatted.

1106 SP function failed The function that accesses SP memory


cannot be executed.
Check the address specified in the function
call. The address must fall into the range of
0 to 511.

1107 Current empty space in the dynamic The D-Buffer is full and no further items
buffer is not enough for the can be entered.
command

1108 Invalid real number The command includes specification of a


real number that cannot be interpreted as a
valid real.

1109 The command is not allowed in Safe communication mode is a host


SAFE mode communication format based on block-by-
block transfer of data with delivery
confirmation.

1110 At least one variable must be Data collection was attempted without
specified for data collection specifying at least one variable.

1111 Too long reply requested The time of the reply request parameter is
too long.

1112 No matches were found The search command did not find any
match.

1113 The step in the table is zero or The command reference to a table element
negative is either zero or negative.

1114 The program finished without STOP The program that runs in a buffer executed
command the last command and this was not a STOP
command.

1115 Stack underflow (RET without The program that runs in a buffer caused
CALL) stack underflow.
This occurs if the program executes the
RET command that without the paired
CALL command.

Version NT 2.20 514 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

Table 78 ACSPL+ Syntax Errors (page 10 of 17)


Error Code Error Message Remarks

1116 Stack overflow (too many nested The program that runs in a buffer caused
CALLs) stack overflow.
This occurs if the program executes too
many nested CALL commands. Check that
the program does not specify infinite
recursion (subroutine calls itself infinitely).

1117 Attempt to enter autoroutine directly The program that runs in a buffer comes to
the ON command (see ON...RET).
ON must never be executed in the normal
program flow.

1118 Illegal axis number The command specifies an axis by number


or expression, and the resulting value is not
a legal axis number.
Valid axis numbers range between 0 and the
number of axes in the system minus one.

1119 Integer overflow The integer value is too large.

1120 The motion must involve the first The segmented motion must always involve
two axes from the group two axes. If a user-defined group contains
more than two axes, the segmented motion
must involve the first two axes in the group.

1121 Unknown #-constant The command specifies an unknown


symbolic constant.

1122 Bit selection is not applicable Bit selector cannot be applied to real value.

1123 Illegal bit selector Value of bit selector must fall in the range
of 0 to 31.

1124 Attempt to enable motor failed The enable command failed.


Additional information can be obtained
from the corresponding element of the
MERR variable (motor disable code).

1125 Error in SP program The command caused unsuccessful loading


of an SP program. The file with the SP
program contains an error.

1126 Illegal SP number The command specifies an illegal SP


number. Valid SP numbers are 0, 1, 2, and
3.

Version NT 2.20 515 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

Table 78 ACSPL+ Syntax Errors (page 11 of 17)


Error Code Error Message Remarks

1127 Editing of this buffer is disabled The command attempts to open the buffer
for editing or to change the program in a
Protected buffer.
Editing a buffer is disabled if the controller
is in the Protected mode and bit 1 of the
corresponding element of PFLAGS is set to
1.

1128 Configuration changed. The program has changed the


Commands SAVE and HWRES configuration. The configuration has to be
must be executed. saved to the controller flash and the
controller restarted.
Select the controller in the Workspace Tree
and click the Save to Flash button. Then
right-click the controller and select Reboot.

1129 In binary command the name The command syntax requires a name to be
specification must end with / followed by the / (slash) character.

1130 Segment sequence for the previous Commands MPTP...ENDS,


motion were not terminated with MSEG...ENDS, PATH...ENDS,
ends command. PVSPLINE...ENDS are followed by a
sequence of points or segments. The
sequence must terminate with ENDS.

1131 SP program with unknown interface: SP program interface is unrecognized.


NORMAL is assumed

1132 The file is not a legal user data file The file designator is not valid.

1133 Discrepancy in types of the saved Error detected in array types when
and restored arrays comparing the saved and restored versions.

1134 Discrepancy in sizes of the saved and Error detected in array size when
restored arrays comparing the saved and restored versions.

1135 Operation failed because of Error occurs when there is either a fault in
communication overload the communication, or too much
communication is being conducted.

1136 Wrong relation between first point, Usually caused by the first point being
last point and interval greater than the last point.

1137 Illegal analog output number The command contains an illegal analog
output number.

1138 Incompatible SP and analog output Conflict between analog output value in the
command and that contained in the SP.

Version NT 2.20 516 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

Table 78 ACSPL+ Syntax Errors (page 12 of 17)


Error Code Error Message Remarks

1139 Illegal input The controller tries to interpret the inserted


string as a response to the executed input
command, but the string does not follow the
required format.

1140 The function is not supported An attempt was made to use a function that
is not supported in SPiiPlus NT.

1141 Timeout Communication timeout has occurred. This


can be corrected by right-clicking the
controller in the Workspace Tree, selecting
Properties, and increasing the Connection
Timeout value.

1142 Arguments are inconsistent Conflict with the command arguments and
their values.

1143 Memory overflow Usually caused by infinite loops.

1144 Simulator does not support this The command cannot be executed by
command Simulator.

1145 The specified DPR address is less SPiiPlus NT does not contain a dual-port
than 128 or exceeds the DPR size RAM; therefore this is not relevant.

1146 Collision with other variable in DPR SPiiPlus NT does not contain a dual-port
RAM; therefore this is not relevant.

1147 Incomplete command (intrusion of The command is not correctly formulated.


other process?)

1148 Requested more SINCOS encoder The user tried to select more Sin-Cos
multipliers than installed multipliers than allowed.

1149 Illegal SP address Valid SP numbers are 0, 1, 2, and 3.

1150 Only even numbers are allowed as SPiiPlus NT does not contain a dual-port
DPR address RAM. If the program has been imported
from an older non-NT version and this error
appears, delete any DPR command (such as
COPYFROMDPR or COPYTODPR).

1151 This is a DEMO version of The demo version of the Simulator has a
Simulator. 5 minutes of work limited session length. The Simulator is
remains. going to stop after 5 minutes.

1152 The DEMO version of Simulator has The demo version of the Simulator has a
terminated limited session length. The session time has
elapsed.

Version NT 2.20 517 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

Table 78 ACSPL+ Syntax Errors (page 13 of 17)


Error Code Error Message Remarks

1153 Illegal query command The controller cannot recognize the query
command.

1154 This command can be used only with The command was incorrectly used - it can
MSEG motion only be used with MSEG...ENDS.

1155 Motion cannot start because the To start the motion enter the FCLEAR
previous motion failed. Use command.
FCLEAR command.

1156 Profile key must be specified as


/SECTION/KEY/

1157 Illegal configuration string. Use only Illegal characters were used in the
characters K,D,+,-. configuration string.

1158 Cannot find matching value. The


formula has no root or the root is not
single.

1159 Axis number is specified more than The axis designation parameter is repeated
once in the command.

1160 The axis cannot be used in a group The specified axis has been flagged as not
(see AFLAGS) to be grouped using AFLAGS.

1161 Illegal communication channel An invalid communication channel has


been specified.

1162 Illegal tag value The command Tag parameter does not
match the intended command.

1163 Illegal configuration parameters Invalid system configuration parameters


have been entered.

1164 Illegal password The password that has been entered does
not match the required password.

1165 Attempt to execute optional function


which is not installed

1166 Flash file operation failed


(overlapped file operations?)

1167 Wrong start position is specified

1168 File not opened

Version NT 2.20 518 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

Table 78 ACSPL+ Syntax Errors (page 14 of 17)


Error Code Error Message Remarks

1169 D-Buffer cannot be changed while An attempt was made to make changes to
any other buffer is compiled the D-Buffer while other buffers were being
compiled.

1171 The number of axes in coordinated


motion is restricted to 4

1172 Illegal category name

1173 EtherCAT offset is out of range

1174 Can't find EtherCAT network


variable

1175 EtherCAT Master is not ready

1176 Data size should be specified

1177 This slave has no mailbox support

1178 Invalid CoE SDO parameter

1179 EtherCAT slave is in invalid state for


this operation

1180 General EtherCAT error

1181 EtherCAT Timeout error

1182 Can't split non-existing axes group An axes group that was not previously
defined was specified for splitting.

1183 Attempt to split group with active Cannot split an axis group while in motion.
motion on

1201 End-of-Sequence is illegal for this


motion

1211 Too many segments See MSEG...ENDS.

1212 ARC arguments are inconsistent See MSEG...ENDS, ARC1 and ARC2.

1213 Stopper is prohibited for master- See STOPPER.


slave motion

1214 Adjacent stoppers are prohibited See STOPPER.

1215 In cyclic path the first and the last


points must coincide

Version NT 2.20 519 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

Table 78 ACSPL+ Syntax Errors (page 15 of 17)


Error Code Error Message Remarks

1216 Velocity is specified, but the motion Velocity argument can be specified in
command had no V suffix POINT, LINE, ARC1 or ARC2 only if the
corresponding motion command specifies
/v.

1217 Segment of zero length

1221 End-of-Sequence is illegal for this


motion

1231 Illegal key An invalid Key argument has been entered


in either the GETCONF or SETCONF
function.

1232 Invalid index An invalid Index argument has been


entered in either the GETCONF or
SETCONF function.

1233 Invalid value The Value argument of the SETCONF


command specifies a value that is not
compatible with the Key argument.

1234 Value in SETCONF must be 0 or 1 See SETCONF.

1235 SETCONF function is disabled

1236 SETCONF cannot be executed while


the motor is enabled

1238 The operation can be executed only


when the HSSI channel is in
command mode

1239 HSSI channel cannot switch to See MFLAGS.


command mode because it affects
one or more remote drivers. Reset
corresponding MFLAGS.#HSSI bits
before.

1240 Operation is temporarily disabled

1241 Operation failed

1251 Operation is temporarily disabled

1252 Motor cannot be enabled while a


motion is in termination process

Version NT 2.20 520 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

Table 78 ACSPL+ Syntax Errors (page 16 of 17)


Error Code Error Message Remarks

1253 Unable to work with dummy motor The command cannot be executed for a
dummy motor.
Check flag MFLAGS.#DUMMY (see
MFLAGS).

1254 The operation requires the motor to The ENABLE/ENABLEALL command


be enabled has to be run.

1255 The operation requires the motor to The DISABLE command has to be run.
be disabled

1256 The operation is valid only for


brushless motor without Hall sensor

1257 The operation failed because the Refer to the chapter on the Adjuster
brushless motor is not commutated Wizard in the SPiiPlus MMI Application
Studio User Guide for details on
commutation.

1258 The operation failed because the


motor is in open-loop mode

1259 Motion cannot start because the


motor is defined as dummy

1260 Motion cannot start because the The ENABLE/ENABLEALL command


motor is disabled has to be run.

1261 Motion cannot start because the Refer to the chapter on the Adjuster
brushless motor is not commutated Wizard in the SPiiPlus MMI Application
Studio User Guide for details on
commutation.

1262 Motion cannot start because the


motor is in open-loop mode

1263 Motion cannot start because the To start the motion enter the FCLEAR
previous motion failed. Use command.
FCLEAR command.

1265 SP program does not support this


operation

1266 Invalid PEG pulse width Pulse width set in PEG_I or PEG_R is
incorrect.

1267 Maximal number of time-based PEG Not relevant to SPiiPlus NT PEG


pulses is 127 operations.

Version NT 2.20 521 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

Table 78 ACSPL+ Syntax Errors (page 17 of 17)


Error Code Error Message Remarks

1268 Maximal period of time-based PEG Not relevant to SPiiPlus NT PEG


pulses is 0.012 millisecond operations.

1269 PEG pulse width must be less than Not relevant to SPiiPlus NT PEG
time-based pulse period operations.

1270 PEG is not supported for the See ASSIGNPEG.


specified axis

1271 Step does not agree with start/end


points

1272 Incremental PEG step must be The PEG step in encoder counts must be in
specified in encoder counts within the range of -231 to 231-1.
the (-2^31, 2^31-1) range, zero is
excluded.

1273 The specified axis does not exist in Refers to controllers that support 4 axes
this controller model only, and the specified axis is above this.

1274 The specified axis is defined as


dummy only

1275 Only stepper motor is supported for


the specified axis

1276 The brushless motor is not supported


for the specified axis

1277 Dual loop control is not supported for


the specified axis

1278 Remote HSSI driver is not supported


for the specified axis

1279 PEG states are not supported for the


specified axis

1280 The stepper motor is not supported


for the specified axis

1281 No Hall support for 2-Phase motors

1282 Value out of range

1283 Random PEG is limited to 256 points See PEG_R.


per axis at a time

1284 Axis is not connected to PEG engine See ASSIGNPEG.

Version NT 2.20 522 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

5.2 ACSPL+ Compilation Errors


The error codes in ACSPL+ compilation errors range between 2000 and 2999.
ACSPL+ compilation errors are reported either immediately when the erroneous line is
inserted, or subsequently, when the controller attempts to compile an ACSPL+ program. If a
program in a buffer undergoes compilation and an error is detected, the error code is stored in
the corresponding element of the PERL array and the erroneous line number is stored in the
corresponding element of the PERL array.

Table 79 ACSPL+ Compilation Errors (page 1 of 9)


Error Code Error Message Remarks

2002 Unrecognized command The program line contains a sequence that is


not recognized as a legal command.
If the line starts from a standard variable
name, check the following:
 All letters are uppercase
 Spelling is correct
If the line starts from a user variable name,
check the following:
 The variable is defined before use
 The letter case matches the definition
 Spelling is correct
2003 Unexpected delimiter, incomplete A command contained in the line is
command incomplete.

2006 Unexpected END The END command is specified without a


paired IF, LOOP or WHILE command.

2007 Two adjacent operators Two binary operator are specified in the
expression without an operand between.

2008 Left bracket was expected Left bracket was not found in a position
where it is expected.
Possible reasons for this error are array
name without index or function call without
arguments.

2009 Right bracket was expected The expression or sub-expression has an


unpaired left bracket.

2010 Comma was expected Comma character was not found in a


position where it is expected.
Possible reasons for this error are:
 Missing comma between the
arguments of the command or function
 The command or function call has less
arguments than required.

Version NT 2.20 523 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

Table 79 ACSPL+ Compilation Errors (page 2 of 9)


Error Code Error Message Remarks

2011 Equals sign was expected Equal sign in assignment is missing.

2012 Direct command was expected

2013 DO or LOOP without END

2015 Integer positive constant is expected The declaration of array contains a size
definition other than positive integer
constant.

2016 Only label or line number is allowed The start command can contain the start line
as start point definition. The start line definition can
appear only as a label or a positive line
number.

2018 Scalar variable cannot be indexed or The command contains a scalar variable
used with axis specification followed by index specification or prefixed
by axis specification.

2019 Write-only variable cannot be read

2020 Read-only variable cannot be The command attempts to assign a read-


assigned only variable.

2021 Label was expected GOTO or CALL must specify a label


name.

2022 Array name was expected The command or function requires an array
name as one of its arguments. The array
name must not be indexed.

2023 Variable name was expected The declaration specifies an illegal variable
name.
A variable name must begin with a letter or
underscore and can include letters, digits
and underscores.
A variable name must not include any of the
following:
 Keywords (IF, WAIT, SIN, etc.) or
standard variable names (FPOS, MST,
etc.)
 Standard label (AUTOEXEC).

2024 Undefined label GOTO or CALL specify a label name that


was not defined in the program.

2025 Duplicated label The program contains two identical labels.

2026 Undefined variable name The command contains a variable name that
was not declared in the program.

Version NT 2.20 524 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

Table 79 ACSPL+ Compilation Errors (page 3 of 9)


Error Code Error Message Remarks

2027 Duplicated variable name The program declares two variables with
identical names.

2030 Number user array elements can not The value of the XARRSIZE parameter is
exceed the XARRSIZE parameter limited to a maximum of 30,000 elements.
The limitation applies also to two-
dimensional arrays. The total number of
elements in a two-dimensional array is
equal to the product of its sizes by each
dimension. The total number of elements
must not exceed 30,000.

2031 Global of different type/dimension The program declares a global variable with
was defined in other buffer the name that was already declared in other
buffer with different type or dimension.

2033 Mandatory argument is omitted The command or function call contains


fewer arguments than required.

2034 More arguments than required The command or function call contains
more arguments than required.

2035 Wrong argument type The command or function call contains an


argument of incorrect type.

2036 Function that not returns value The expression cannot include a function
cannot be used in expression that has no return value.

2037 Axis specification was expected This error refers to a logical check.
The command must specify an axis.
Axis specification can appear: as an integer
designation, like 0, 1, 32, or as an
expression that evaluates to an integer
within the range of 0 and the number of axes
in the system minus 1.

2038 Axis specification was expected This error refers to a physical check.
The command must specify an axis that
physically exists.
Axis specification can appear: as an integer
designation, like 0, 1, 32, or as an
expression that evaluates to an integer
within the range of 0 and the number of axes
in the system minus 1.

2043 Internal error

2044 Index is out of range The constant index value is greater than the
array size minus one, or is negative.

Version NT 2.20 525 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

Table 79 ACSPL+ Compilation Errors (page 4 of 9)


Error Code Error Message Remarks

2045 Illegal axis value The axis value specified by a numerical


constant is greater than the number of axes
in system minus one, or is negative.

2048 Argument must be specified as + or - The command requires a direction


sign specification that must be presented by
character + or -.

2049 Illegal suffix for this command The command specifies a command option,
which is illegal for this command.

2050 Name of standard variable was The command requires an argument that
expected specifies one of the ACSPL+ variables.

2051 Only APOS, RPOS, FPOS and The SET command must specify
F2POS are allowed in SET command assignment to one element of one of the
following variables: APOS, RPOS, FPOS,
F2POS.
The variables must be in upper case.

2052 Variable name was expected The command requires an argument that
specifies a scalar variable or an element of
array.
A general expression or a constant is not
allowed for this argument.

2053 Constant argument was expected The command requires an argument that
specifies a numerical constant.

2054 Illegal buffer number The command must specify a constant


buffer number. The constant must fall in the
range of from 0 to 15.

2055 Assigned value is out of range The command attempts to assign a variable
with a value that falls out of the range
allowed for the variable.

2056 Zero divide The command attempts to divide by zero.

2057 Only VEL, ACC, DEC, JERK, IMM must specify assignment to one
KDEC are allowed in IMM element of one of the following variables:
command VEL, ACC, DEC, JERK, KDEC.

2058 Bit selection cannot be applied to real The bit selector is specified for a real
variable variable.

2059 ELSE without IF ELSE is specified without corresponding


IF (see IF, ELSEIF, ELSE...END).

Version NT 2.20 526 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

Table 79 ACSPL+ Compilation Errors (page 5 of 9)


Error Code Error Message Remarks

2060 ELSEIF without IF ELSEIF is specified without corresponding


IF (see IF, ELSEIF, ELSE...END).

2061 LOOP without END LOOP has no corresponding END (see


LOOP...END).

2063 IF without END IF has no corresponding END (see IF,


ELSEIF, ELSE...END).

2064 Memory overflow The application requires too much memory.


Reduce the number and size of the local and
global variables used in the application, or
use a more powerful model of the
controller.

2065 Axis constant or axis expression in The command must include an axis
brackets expected specification in parentheses, for example:
FMASK(4).16, where 4 is the axis
specification.

2066 Too many axis specifiers The axis specification includes too many
axis specifiers.

2067 An axis is specified more than once The axis specification includes two
identical axis specifiers.

2068 Sign constant or sign expression in The command must include a sign
brackets expected specification. Each sign in the specification
defines a direction of one involved axis.
Sign specification can appear:
 As a sequence of sign characters, like
+, +-+, -+-+
 As a list of expressions enclosed in
brackets where (0, 1, 0) is equivalent to
+-+.

2069 Too many sign specifiers The sign specification includes too many
sign specifiers.

2070 Unknown #-constant The command includes an unknown


symbolic constant.

2071 Local variable is not allowed in this The command does not allow the use of
command local variables. Only ACSPL+ variables
and user global variables that have been
declared can be used.

2072 WHILE without END WHILE has no corresponding END (see


WHILE...END).

Version NT 2.20 527 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

Table 79 ACSPL+ Compilation Errors (page 6 of 9)


Error Code Error Message Remarks

2073 WAIT, TILL, GOTO, CALL, The specified commands cannot be entered
LOOP..END, WHILE..END, INPUT through the SPiiPlus MMI Application
are not allowed in immediate Studio Communication Terminal.
command

2074 Only RPOS is allowed after CONNECT must specify assignment to


CONNECT one element of one of the RPOS variables.

2075 Only MPOS variable is allowed after MASTER must specify assignment to one
MASTER element of one of the MPOS variables.

2076 Constant bit selector is greater than The command includes a constant bit
31 or less than 0 selector. The value of bit selector must fall
into the range from 0 to 31.

2077 Array name requires indexing The array name must be followed by an
index specification.
For a two-dimensional array, two index
specifiers are required.

2078 Current empty space in the dynamic The dynamic buffer contains too many
buffer is not enough for the commands queued for execution.
command The application must wait for the controller
to execute and remove one or more
commands from the buffer.

2079 GOTO,CALL,RET,LOOP, Commands GOTO, CALL, LOOP...END,


WHILE,IF,ON are not allowed in WAIT, IF, ELSEIF, ELSE...END,
dynamic buffer ON...RET cannot be used in the dynamic
buffer.

2080 Local variable declaration is not Local variables cannot be used in a SPiiPlus
allowed in a immediate command. MMI Application Studio Communication
Terminal command.

2081 Variable declaration is not allowed in Variable declaration cannot be executed in


dynamic buffer dynamic buffer.

2082 Illegal file name The command requires file name


specification.

2083 Integer overflow The result of constant integer expression is


more than 2147483647 or less than -
2147483648.
Consider using real constants instead of
integer. To change constant type to real, add
decimal point to the end of the constant.

Version NT 2.20 528 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

Table 79 ACSPL+ Compilation Errors (page 7 of 9)


Error Code Error Message Remarks

2084 Integer constants are allowed in the Consider using real constants instead of
range from -2147483648 to integer. To change constant type to real, add
+2147483647 decimal point to the end of the constant.

2085 Protection violation The controller is in the Protected mode and


the command violates one of the protection
rules (see PROTECT).

2086 Protection attribute cannot be SETPROTECTION cannot be executed


changed for this parameter for this ACSPL+ variable.

2087 Only constant 0 or 1 is allowed at the The command allows only 0 or 1 to the right
right side of the equals sign.

2088 No dual-port RAM in this controller SPiiPlus NT does not contain a dual-port
RAM. If the program has been imported
from an older non-NT version and this error
appears, delete any DPR command (such as
COPYFROMDPR or COPYTODPR).

2089 Bit selection is not available for DPR SPiiPlus NT does not contain a dual-port
variable RAM. If the program has been imported
from an older non-NT version and this error
appears, delete any DPR command (such as
COPYFROMDPR or COPYTODPR).

2090 Only global variables can be defined SPiiPlus NT does not contain a dual-port
in DPR RAM. If the program has been imported
from an older non-NT version and this error
appears, delete any DPR command (such as
COPYFROMDPR or COPYTODPR).

2091 DPR address must be specified SPiiPlus NT does not contain a dual-port
RAM. If the program has been imported
from an older non-NT version and this error
appears, delete any DPR command (such as
COPYFROMDPR or COPYTODPR).

2092 Only even numbers from 128 to 504 SPiiPlus NT does not contain a dual-port
are allowed as DPR address RAM. If the program has been imported
from an older non-NT version and this error
appears, delete any DPR command (such as
COPYFROMDPR or COPYTODPR).

2093 Collision with other variable in DPR SPiiPlus NT does not contain a dual-port
RAM. If the program has been imported
from an older non-NT version and this error
appears, delete any DPR command (such as
COPYFROMDPR or COPYTODPR).

Version NT 2.20 529 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

Table 79 ACSPL+ Compilation Errors (page 8 of 9)


Error Code Error Message Remarks

2094 DPR variable is not allowed in this SPiiPlus NT does not contain a dual-port
command RAM. If the program has been imported
from an older non-NT version and this error
appears, delete any DPR command (such as
COPYFROMDPR or COPYTODPR).

2095 Illegal line number The specified line number must be a


positive non-zero integer.

2096 Only even numbers from 128 to 1016 SPiiPlus NT does not contain a dual-port
are allowed as DPR address RAM. If the program has been imported
from an older non-NT version and this error
appears, delete any DPR command (such as
COPYFROMDPR or COPYTODPR).

2097 Illegal SP number Valid SP numbers are 0, 1, 2, and 3.

2098 Illegal SP variable specification Invalid SP variable was entered.

2099 Undefined SP variable Non-SP variable was entered.

2100 User-defined array was expected

2101 Illegal character constant

2102 Illegal tag

2103 Tag can be specified only for global


variables

2104 BLOCK cannot be nested See BLOCK...END.

2105 BLOCK without END See BLOCK...END.

2106 Illegal declaration

2107 Axis redefinition

2108 Assignment to constant Value has to be assigned to a variable.

2109 ALL cannot be used in this command

2110 Ambiguous axis specification

2111 Illegal format of real constant

2112 This function cannot be used as See CONNECT, TRIGGER or ON...RET


argument of CONNECT, TRIGGER (for the autoroutine structure).
or in autoroutine condition

Version NT 2.20 530 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

Table 79 ACSPL+ Compilation Errors (page 9 of 9)


Error Code Error Message Remarks

2113 Shared memory variables must be


global

2114 Shared memory variables can be


declared only in the D-Buffer

5.3 ACSPL+ Runtime Errors


The ACSPL+ runtime error code values range between 3000 and 3999.

Note
Codes from 3000 to 3019, however, do not indicate an error. For example,
code 3002 reports that the user has terminated the program.
Codes from 3020 to 3999 indicate run-time errors.

If an error occurs in immediate execution of ACSPL+ command, the error is indicated


immediately in the prompt. If an error occurs when an ACSPL+ program is executed in a buffer,
no immediate indication is provided. Instead, the error code and the line number are stored in
the corresponding elements of the PERL and PERL arrays.

Table 80 ACSPL+ Runtime Errors (page 1 of 12)


Error Code Error Message Remarks

3023 Read-only variable cannot be A command specifies an assignment to a


assigned read-only variable.

3028 Scalar variable cannot accept axis A scalar variable cannot be prefixed with an
specification axis specification.

3034 Illegal index value The command specifies an assignment to a


read-only variable.

3035 Index is out of range The reason of the error is one the following:
 The specified index value is more or
equal to the number of elements in the
array
 The specified index value is negative
 The specified index values are
incompatible (first value in the range
greater than last).

Version NT 2.20 531 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

Table 80 ACSPL+ Runtime Errors (page 2 of 12)


Error Code Error Message Remarks

3037 Illegal variable name The command requires specification of a


standard variable name, but the specified
name is not a name of an ACSPL+ variable.

3040 Unable to open file The command specifies a file in the flash
memory that does not exist.

3041 Assigned value is out of range The command attempts to assign the
standard variable with a value that is out of
the range allowed for this variable.

3043 Program cannot start because the The command attempts to start an ACSPL+
buffer was not compiled program that has not been compiled. To
compile a program, in the SPiiPlus MMI
Application Studio:
 In the Program Manager, right-click
the buffer and select Compile Buffer,
or
 Use the #nC command in the
Communication Terminal, where n is
the buffer number.

3044 Command cannot be executed while The command attempts to affect a running
the program is running ACSPL+ program. Stop the program before
executing the command. To stop a program,
in the SPiiPlus MMI Application Studio:
 In the Program Manager, right-click
the buffer and select Stop Buffer, or
 Use the #nS command in the
Communication Terminal, where n is
the buffer number.

3045 Numerical error in standard function The command includes an ACSPL+


function that caused a numerical error.
Check if the arguments of the function fall
into the allowed range.

3046 Write file error The command caused a failed write to flash
memory. A re-occurring error of this type
indicates a serious problem in the controller
hardware or firmware.

3047 Read file error The command caused a failed read from
flash memory. A re-occurring error of this
type points to a serious problem in the
controller hardware or firmware.

Version NT 2.20 532 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

Table 80 ACSPL+ Runtime Errors (page 3 of 12)


Error Code Error Message Remarks

3048 More axes than were defined in the The POINTcommand specifies more axes
motion than were specified in the motion that the
command refers to.

3050 Conflict with user-defined axis group The command is incompatible with a
previously defined user-defined axis group.
The axes specified in the command may
either belong to one user-defined axis
group, or may not intersect with a user-
defined axis group.

3051 Line number is out of range The command specifies a line number that
does not exist in the specified program
buffer.

3052 Buffer number is out of range The command specifies an illegal buffer
number. The controller has program buffers
numbered 0 to 15, where 15 is the D Buffer..

3053 Wrong type The command addresses a standard variable


of a different type from the variable
specified in the command.
This error never occurs when the user
communicates with the controller through a
communication terminal.
The error occurs only when an application
communicates with the controller using the
SPiiPlus C Library. The error indicates a
communication problem.

3055 Command requires line number The command must contain a line number
specification specification.

3060 Illegal memory command The memory management command is


improperly formatted.

3061 ')' wasn't found The command contains a non-paired left


bracket.

3063 Variable is not defined in the buffer The command addresses a variable that is
not declared in the specified buffer, or the
specified buffer is not compiled.

3064 Undefined global variable The command addresses a global variable


that is not declared in any buffer, or the
buffer that contains the declaration is not
compiled.

Version NT 2.20 533 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

Table 80 ACSPL+ Runtime Errors (page 4 of 12)


Error Code Error Message Remarks

3065 Command cannot be executed while The command is in conflict with one or
the current motion is in progress more of the currently executed motions. To
kill a motion use KILL.

3067 GO command failed The controller has no motions waiting for


GO.

3068 Referenced axis does not execute a The command specifies an axis, but no
motion (motion was terminated?) motion was specified for this axis.

3069 This command can be used only with The command specifies an axis, but the
MPTP, PATH, or PVSPLINE motion specified for the axis is
motion incompatible with the command.

3070 Attempt to add segment after ENDS The command attempts to add a segment or
command a point to the motion that has already been
closed by ENDS.

3071 File name was expected The command must specify the name of an
internal file in the flash memory.

3072 Wrong array size The command specifies an array, but the
motion that the command refers to, or other
command arguments require an array of
another size.

3073 Text for search is not specified The command must specify a text for search
operation.

3074 Only standard or SP variable is The command requires an ACSPL+ or SP


allowed in the command variable name to be specified.

3076 Undefined label The command requires a label


specification. The program that contains the
label specified in the command must be
compiled in a buffer.

3077 Protection violation The command attempts to assign a


protected variable when the controller is in
protected mode. The controller must be in
configuration mode before protected
variables can be assigned (see PROTECT).

Version NT 2.20 534 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

Table 80 ACSPL+ Runtime Errors (page 5 of 12)


Error Code Error Message Remarks

3078 Variable can be changed only while The command attempts to assign a variable
the motor is disabled that can be changed only if the motor is
disabled.
 If the variable is axis-related, disable
the corresponding motor before
assigning the variable.
 If the variable is not axis-related,
disable all motors before assigning the
variable.

3079 Motion cannot start because one or The motion command involves one or more
more motors are disabled motors that are disabled.

3080 Default Connection flag is set for the The command cannot be executed because
motor the default connection flag is set for the
motor.
The default connection flag is bit 17, i.e.,
#DEFCON, of the MFLAGS variable (see
MFLAGS).

3081 Incompatible suffixes The command includes command options


that cannot be used together.

3085 Extra number after the command The command specifies a superfluous
numerical argument.

3086 Variable name must be specified The command requires a variable name
specification.

3087 Command cannot be executed while The command specifies one or more axes
the axis is moving that are involved in a motion. The command
can be executed only after the motion
finishes.

3088 Variable can be queried only in The command attempts to query a variable
compiled buffer in a buffer that was not compiled.

3089 Label can be referenced only in The command attempts to reference a label
compiled buffer in a buffer that was not compiled.

3090 This type of motion is not allowed for The slave or track command specifies an
grouped axis axis that is included in a user-defined group.
Only a single axis can be specified by
SLAVE or TRACK.

3091 Less arguments than required The motion command specifies less
coordinate values than required by the axis
specification.

Version NT 2.20 535 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

Table 80 ACSPL+ Runtime Errors (page 6 of 12)


Error Code Error Message Remarks

3092 More arguments than required The motion command specifies more
coordinate values than required by the axis
specification.

3093 Bit selector value is greater than 31 The expression specified in the bit selector
or less than 0 yields a value greater than 31 or less than 0.

3096 '}' was not found The command includes a non-paired left
curly bracket.

3097 Previous data collection is in The command attempts to start a data


progress collection while the previous data collection
for the same axis is still in progress.

3098 Stalled motion requires limits The motion command, which includes a
specification command option of stalled motion, requires
specification of the motion limits.

3099 Extra numbers after the command The motion command includes superfluous
numerical arguments.

3101 The program is suspended, the start The command attempts to start a program
line number is not allowed from a specified line when the program is in
suspended state.
A program in suspended state can be only
resumed from the next line. The line
specification is not allowed.
The only way to start a suspended program
from a specific line is to stop the program,
and to start it again from the desired line.

3105 Format error The command is incorrectly formatted.

3106 SP function failed The function that accesses SP memory


cannot be executed.
Check the address specified in the function
call. The address must fall in the range of 0
to 511.

3108 Invalid real number The command includes specification of a


real number that cannot be interpreted as a
valid real number.

3112 No matches were found The search command did not find any
matches.

3114 The program finished without a The program that is running in a buffer
STOP command executed the last command, and it was not a
STOP command.

Version NT 2.20 536 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

Table 80 ACSPL+ Runtime Errors (page 7 of 12)


Error Code Error Message Remarks

3115 Stack underflow (RET without The program that runs in a buffer caused a
CALL) stack underflow.
Program execution requires CALL.

3116 Stack overflow (too many nested The program that is running in a buffer
CALLs) caused stack overflow.
This occurs if the program executes two
many nested calls. Check that the program
does not specify infinite recursion
(subroutine is in an infinite loop).

3117 Attempt to enter autoroutine directly The program that is running in a buffer
comes to the ON command (see
ON...RET).
ON must never be executed in the normal
program flow.

3118 Illegal axis number The command specifies an axis by number


or expression, and the resulting value is not
a legal axis number.
Valid axis numbers range between 0 to the
number of axes in the system minus one.

3120 The motion must involve the first The segmented motion must always involve
two axes from the group two axes. If a user-defined group contains
more than two axes, the segmented motion
must involve the first two axes in the group.

3121 Unknown #-constant The command specifies an unknown


symbolic constant.

3122 Bit selection is not applicable Bit selector cannot be applied to a real
value.

3123 Illegal bit selector Value of bit selector must fall into the range
0..32.

3124 Attempt to enable motor failed ENABLE/ENABLEALL failed.


Additional information can be obtained
from the corresponding element of the
MERR variable (motor disable code).

3125 Error in SP program The command caused unsuccessful loading


of an SP program. The file with the SP
program contains an error.

3126 Illegal SP number The command specifies an illegal SP


number. Legal SP numbers are from 0 to 3.

Version NT 2.20 537 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

Table 80 ACSPL+ Runtime Errors (page 8 of 12)


Error Code Error Message Remarks

3127 Editing of this buffer is disabled The command attempts to open the buffer
for editing or to change the program in the
buffer.
Editing of a buffer is disabled if bit 1 of the
corresponding element of PFLAGS = 1.

3129 In binary command the name The command syntax requires a name to be
specification must end with / followed by the / (slash) character.

3130 Segment sequence for the previous MPTP, MSEG, PATH are followed by a
motion was not terminated with number of the point or segment commands
ENDS - segment definition sequence. The segment
definition sequence must be closed with
ENDS. See MPTP...ENDS,
MSEG...ENDS, and PATH...ENDS.

3132 The file is not a legal user data file READ specifies a file in the flash memory
that is not a legal user data file.
Only files created with WRITE are legal
user data files.

3133 Discrepancy in types of the saved The array and the user data file specified by
and restored arrays READ contain data of different types.
READ must specify an array of the same
type and dimension as the array that was
specified by the WRITE command that
created the file.
For example, the error occurs if a real array
was saved in the file by WRITE, but
READ tries to load the file into an integer
array.

3134 Discrepancy in sizes of the saved and The array and the user data file specified by
restored arrays READ are different sizes.
READ must specify an array of the same
type and dimension as the array that was
specified by the WRITE command that
created the file.

3136 Wrong relation between first point, The interval value specified by PEG_I or
last point and interval PEG_R does not correspond to the start and
final points.
For example, the error occurs if the final
point is less than the start point, but the step
is positive.

3137 Illegal analog output number The command specifies a number of analog
outputs which is not available in the
controller.

Version NT 2.20 538 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

Table 80 ACSPL+ Runtime Errors (page 9 of 12)


Error Code Error Message Remarks

3138 Incompatible SP and analog output The command specifies an analog output
number that cannot be accessed in the
specified SP.

3139 Illegal input The controller tries to interpret the string as


a response to the executed input command
but the string does not follow the required
format.

3142 Arguments are inconsistent Check arguments against the specifications


for the PEG_I or PEG_R commands.

3144 Simulator does not support this The command cannot be executed by the
command simulator.

3145 The specified DPR address is less SPiiPlus NT does not contain a dual-port
than 128 or exceeds the DPR size RAM. If the program has been imported
from an older non-NT version and this error
appears, delete any DPR command (such as
COPYFROMDPR or COPYTODPR).

3146 Collision with other variable in DPR SPiiPlus NT does not contain a dual-port
RAM. If the program has been imported
from an older non-NT version and this error
appears, delete any DPR command (such as
COPYFROMDPR or COPYTODPR).

3149 Illegal SP address The SP address must fall in the range of


from 0 to 512.

3150 Only even numbers are allowed as SPiiPlus NT does not contain a dual-port
DPR address RAM. If the program has been imported
from an older non-NT version and this error
appears, delete any DPR command (such as
COPYFROMDPR or COPYTODPR).

3151 This is a DEMO version of The demo version of the Simulator has a
Simulator. 5 minutes of work limited session time. The simulator is going
remains. to stop after five minutes.

3152 The DEMO version of Simulator has The demo version of the Simulator has a
terminated limited session time. The session time has
elapsed.

3154 This command can be used only with Only PROJECTION, LINE, ARC1,
MSEG motion ARC2, and STOPPER commands apply to
MSEG...ENDS.

Version NT 2.20 539 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

Table 80 ACSPL+ Runtime Errors (page 10 of 12)


Error Code Error Message Remarks

3155 Motion cannot start because the In the Strict mode (S_FLAGS.#FCLEAR
previous motion failed. Use = 1) the motion cannot start after a fault has
FCLEAR command. occurred.
Use the command FCLEAR to clear the
result of the fault.

3201 End-of-Sequence is illegal for this The ends command cannot be specified for
motion this type of motion.

3212 ARC arguments are inconsistent ARC1 or ARC2 specify inconsistent


arguments. The desired arc cannot be
calculated.

3213 Stopper is prohibited for master- STOPPER cannot be used with segmented
slave motion MASTER-SLAVE motion.

3214 Adjacent stoppers are prohibited Two adjacent STOPPER commands are
not allowed.

3215 In cyclic path the first and the last In a cyclic segmented motion, the first point
points must coincide of the first segment must coincide with the
last point of the last segment.

3216 Velocity is specified, but the motion Velocity argument can be specified in
command had no V command option POINT, LINE, ARC1 or ARC2 only if the
corresponding motion command specifies
/v.

3217 Segment of zero length Segments of zero length are not allowed.

3231 Illegal key The Key argument of the GETCONF or


SETCONF command specifies a value that
is not supported in this controller.

3232 Illegal index The Index argument of the GETCONF or


SETCONF command specifies a value that
is not supported in this controller.

3233 Illegal value The Value argument of the SETCONF


command specifies a value that is not
compatible with the Key argument.

3234 Value in SETCONF must be 0 or 1 For the specified Key only 0 or 1 are legal
in the Value argument. of SETCONF

3235 SETCONF function is disabled The specified SETCONF function is


disabled in the current controller mode.

3236 SETCONF cannot be executed while The specified SETCONF function cannot
the motor is enabled be executed while the motor is enabled.

Version NT 2.20 540 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

Table 80 ACSPL+ Runtime Errors (page 11 of 12)


Error Code Error Message Remarks

3253 Unable to work with Dummy motor The command cannot be executed for a
dummy motor.
The addressed motor is configured as a
dummy, (see the #DUMMY bit of
MFLAGS).

3254 The operation requires the motor to The command can be executed only while
be enabled the motor is enabled.

3255 The operation requires the motor to The command can be executed only while
be disabled the motor is disabled.

3256 The operation is valid only for The command cannot be executed for any
brushless motor without Hall sensor motor type other than brushless, and only
for brushless motors that do not have a Hall
sensor.

3257 The operation failed because the The command cannot be executed because
brushless motor is not commutated the defined brushless motor is not
commutated.
The #BRUSHOK bit of MFLAGS. reflects
the state of the brushless commutation.
To commutate the motor, execute
COMMUT or a specific initialization
program.

3258 The operation failed because the The command cannot be executed because
motor is in open-loop mode the motor is in open-loop state.
The open-loop mode may be set using the
#OPEN bit of MFLAGS.

3259 Motion cannot start because the The motion command cannot be executed
motor is defined as dummy because one or more of the motors involved
are dummy.
Motor dummy state is defined by the
#DUMMY bit of MFLAGS..

3260 Motion cannot start because the The motion command cannot be executed
motor is disabled because one or more of the motors involved
are disabled.

3261 Motion cannot start because the The command cannot be executed because
brushless motor is not commutated the defined brushless motor is not
commutated.
The #BRUSHOK bit of MFLAGS. reflects
the state of the brushless commutation.
To commutate the motor, execute
COMMUT or a specific initialization
program.

Version NT 2.20 541 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

Table 80 ACSPL+ Runtime Errors (page 12 of 12)


Error Code Error Message Remarks

3262 Motion cannot start because the The motion command cannot be executed
motor is in open-loop mode because one or more of the motors involved
are in open-loop state.
Open-loop state is defined by bit
MST.#OPEN.
The open-loop mode may be set using the
#OPEN bit of MFLAGS.

3263 Motion cannot start because the The motion command cannot execute
previous motion failed. Use because the previous motion for one or
FCLEAR command. more motors failed and the controller is set
to the Strict mode.
The Strict mode is defined by bit
S_FLAGS.#FCLEAR.
Use FCLEAR to clear the result of the
fault.

3265 SP program does not support this The command is not supported by the
operation current version of the controller.
Specifically, the SP program does not
support the operation. Check if the SP
program has been changed.

Version NT 2.20 542 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

5.4 Motion Termination Errors


Motion Termination error code values range between 5000 and 5150.

Note
Codes from 5000 to 5008, however, do not indicate an error. They report
normal motion termination.
Codes from 5009 and higher appear when a motion is terminated or a motor
is disabled due to a fault detected by the controller.

When a motion terminates abnormally, or a motor is disabled, the error code is stored in the
MERR variable. If there is an initialization fault during startup, the error code is stored in the
S_ERR variable.

Table 81 ACSPL+ Motion Termination Errors (page 1 of 6)


Error Code Error Message Remarks

5000 Motion has not finished Motion was terminated before reaching
final point.

5001 Motion generation finished The motion came to the final point and was
successfully completed.

5003 Motion was terminated by user The motion was terminated by HALT
before the final point was reached

5004 Motor was disabled by user The motion was disabled by DISABLE.

5005 Motion was terminated because a The motion was disabled by DISABLE.
motor was disabled

5006 Motion was killed The motion was terminated by KILL


before the final point was reached

5007 Motor was disabled due to another If a fault occurs in an axis disabling the
motor becoming disabled motor thereby disabling other motors, code
5007 is stored in the MERR variable for all
affected axes.

5008 Motion was killed due to another If a fault occurs in an axis killing the motion
motion being killed of a motor thereby killing the motion other
motors, code 5008 is stored in the MERR
variable for all affected axes.

5010 Right Limit The motion was killed because of a right


limit fault.

Version NT 2.20 543 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

Table 81 ACSPL+ Motion Termination Errors (page 2 of 6)


Error Code Error Message Remarks

5011 Left Limit The motion was killed because of a left


limit fault.

5014 Overheat The motor was disabled or the motion failed


because of an overheat fault.

5015 Software Right Limit The motion is killed because of a software


right limit fault.

5016 Software Left Limit The motion is killed because of a software


left limit fault..

5017 Encoder Not Connected The motor was disabled because of an


encoder not connected fault.

5018 Encoder 2 Not Connected The motor was disabled because of an


encoder 2 not connected fault.

5019 Drive Alarm The motor was disabled because of a drive


alarm fault.

5020 Encoder Error The motor was disabled or the motion failed
because of an encoder error fault.

5021 Encoder 2 Error The motor was disabled or the motion failed
because of an encoder 2 error fault.

5022 Position Error The motor was disabled or the motion failed
because of a position error fault.

5023 Critical Position Error The motor was disabled or the motion failed
because of a critical position error fault.

5024 Velocity Limit The motor was disabled or the motion failed
because of a velocity limit fault.

5025 Acceleration Limit The motor was disabled or the motion failed
because of an acceleration limit fault.

5026 Overcurrent The motor was disabled or the motion failed


because of an overcurrent fault.

5027 Servo Processor Alarm The motor was disabled or the motion failed
because of a servo processor alarm fault.

5032 Attempt of motion while a fault is


active

Version NT 2.20 544 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

Table 81 ACSPL+ Motion Termination Errors (page 3 of 6)


Error Code Error Message Remarks

5033 Attempt of Motion in Disabled The motion is killed because of an attempt


Direction to move to left direction when of Left Limit
or Left Software Limit fault is On, or move
to right direction when the Right Limit or
Right Software Limit fault is On.

5035 Program Error The motor was disabled or the motion failed
because of a program error fault.

5036 Memory Overuse The motor was disabled or the motion failed
because of a memory overuse fault.

5037 Time Overuse The motor was disabled or the motion failed
because of a time overuse fault.

5038 Emergency Stop The motor was disabled because of an


emergency stop fault.

5039 Servo Interrupt The motor was disabled or the motion failed
because of a servo interrupt fault.

5060 Driver Alarm Drive alarm: No fault

5061 Drive Alarm: Short Circuit The motor was disabled or the motion failed
because of a short circuit condition in the
drive.

5062 Drive Alarm: External Protection The motor was disabled or the motion failed
Activated because of an external protection condition
in the drive.

5063 Drive Alarm: Power Supply Too The motor was disabled or the motion failed
Low because of a power supply too low
condition in the drive.

5064 Drive Alarm: Power Supply Too The motor was disabled or the motion failed
High because of a power supply too high
condition in the drive.

5065 Drive Alarm: Temperature Too High The motor was disabled or the motion failed
because of a power supply too high
condition in the drive.

5066 Drive Alarm: Power Supply 24VF1 The motor was disabled or the motion failed
because of a power supply 24VF1 condition
in the drive.

5067 Drive Alarm: Power Supply 24VF2 The motor was disabled or the motion failed
because of a power supply 24VF2 condition
in the drive.

Version NT 2.20 545 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

Table 81 ACSPL+ Motion Termination Errors (page 4 of 6)


Error Code Error Message Remarks

5068 Drive Alarm: Emergency Stop The motor was disabled or the motion failed
because of an emergency stop condition in
the drive.

5069 Drive alarm: Power-down The motor was disabled or the motion failed
because of a power-down condition in the
drive.

5070 Phase lost.

5071 Driver not ready (power up).

5072 Over-current.

5073 Not in used (reserved).

5074 Damper is not ok.

5075 Drive Alarm: Digital Drive Interface The motor was disabled or the motion failed
not Connected because of a Digital Drive Interface Not
Connected condition in the drive. Check the
cable connections to the drive.

5080 Component Failure

5081 Component Failure: Unknown error

5082 Component Failure: Unknown error

5083 Component Failure: Unknown error

5084 Component Failure: Power supply The motor was disabled due to excessive
too high high voltage of the Power Supply. To
correct this, either reduce the motor speed.
Or, in the case of PSM3U 8 Kw or 10 Kw
being installed, connect an External
Regeneration (see MC4U Hardware
Guide).

5085 Component Failure: Temperature too The motor was disabled, the Power Supply
high temperature is too high. Check that the unit
cooling fans are working, if not, replace the
cooling fans. Make sure that the air flow
around the unit is clear of any obstructions.

5086 Component Failure: Unknown error

5087 Component Failure: Unknown error

5088 Component Failure: Unknown error

Version NT 2.20 546 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

Table 81 ACSPL+ Motion Termination Errors (page 5 of 6)


Error Code Error Message Remarks

5089 Component Failure: Power down Indicates missing 3 phase 230Vac servo
supply voltage. Check that the AC input
voltage is connected correctly.

5090 Component Failure: Drive supply This applies only to 3-phase AC input
phase lost power. In the event that one of the AC input
supply phases is lost or one of the AC input
fuses is blown all axis drivers which are
supplied by this power supply are disabled.

Make sure that the JP6 jumper is installed in


thePSM3U-320V-XXkW board if a three-
phase input supply is used.

5091 Component Failure: Power supply This is caused by the inrush power
not ready. Try to enable axis again protection detector. It temporarily suspends
within 10 seconds the power input. Wait for a few seconds for
the power to normalize before starting.

5092 Component Failure: Unknown error

5093 Component Failure: Unknown error

5094 Component Failure: Power supply There is a failure in the damper circuit in the
damper not OK Power Supply. There may be a short in the
External Regeneration, or Internal
Regeneration.

5095 Component Failure: Unknown error

5100 Current bias measured is out of range At the beginning of the enable process the
controller measures the current and
calculates an average bias (offset). If the
result is greater than the predefined
maximum value (2% of maximum output),
the controller generates the error and axis
remains disabled.

5101 Autocommutation failure (phase Error occurs if COMMUT fails. The error
error) indicates wrong phase sequencing, or
incorrect commutation parameters. To
avoid this error it is recommended that the
initial commutation be performed from the
Adjuster. The Adjuster commutation
program verifies the phase sequence and
commutation parameters. This must be
done before COMMUT is executed.

Version NT 2.20 547 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

Table 81 ACSPL+ Motion Termination Errors (page 6 of 6)


Error Code Error Message Remarks

5102 Autocommutation failure (position Error occurs if COMMUT fails. The error
error) indicates bad or marginal servo tuning, or
incorrect commutation parameters. To
prevent this error make sure that the axis is
properly tuned - use the Adjuster Wizard
or FRF Analyzer.

5103 ENABLE is prohibited while


Constant Current is ON

5104 ENABLE failed because the motor is ENABLE cannot be executed whenever the
moving motor is in motion (see
ENABLE/ENABLEALL).

5105 E_TYPE does not match HSSI-HES Check the HSSI-HES DIP switch settings.
DIP switch settings

5106 EtherCAT node failure

Version NT 2.20 548 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

5.5 System Errors


System Errors error code values range between 5151 and 5999. They are generally caused by
problems with the firmware of the servo processor (SP) program.

Table 82 ACSPL+ System Errors (page 1 of 4)


Error Code Error Message Remarks

5151 Integrity of the firmware or user


application is broken

5152 Initialization problem: Main


Interrupt is not detected

5154 Initialization problem: Main


Interrupt period is wrong

5156 Initialization problem: Main


Interrupt Event cannot be created

5158 Initialization problem: SP


initialization failed

5160 Initialization problem: SP program


activation failed

5162 Initialization problem: SP and MP


are not synchronous

5164 Initialization problem: Improper


controller card is detected

5165 Initialization problem: Improper


configuration file is detected

5166 Initialization problem: SP is not


detected by hardware

5167 Initialization problem: Number of


drive modules does not meet the
configuration

5168 Initialization problem: Drive


Interface is not connected

5169 Initialization problem: One or more


parameters are out of range for the
current controller configuration.
Default values are assigned

Version NT 2.20 549 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

Table 82 ACSPL+ System Errors (page 2 of 4)


Error Code Error Message Remarks

5170 Initialization problem: One or more


EEPROM parameters are different
from the current controller
configuration. Values from
EEPROM are assigned

5171 Initialization problem: One axis


attached to two drives in
configuration file

5172 Initialization problem: Nominal


current parameter in configuration
file is different from the current
controller configuration. Value from
EEPROM is assigned

5173 Initialization problem: Peak current


parameter in configuration file is
different from the current controller
configuration. Value from EEPROM
is assigned

5174 Initialization problem: Power


parameter in configuration file is
different from the current controller
configuration. Value from EEPROM
is assigned

5175 Initialization problem: Voltage (min


or max) parameter in configuration
file is different from the current
controller configuration. Value from
EEPROM is assigned

5176 Initialization problem: Type


parameter in configuration file is
different from the current controller
configuration. Value from EEPROM
is assigned

5177 Initialization problem: Number of


subsystems parameter in
configuration file is different from
the current controller configuration.
Value from EEPROM is assigned

5178 Initialization problem: Component


was detected by I2C but was not
found in configuration file

Version NT 2.20 550 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

Table 82 ACSPL+ System Errors (page 3 of 4)


Error Code Error Message Remarks

5179 Initialization problem: Slave address


parameter in configuration file is
different from the current controller
configuration. Value from EEPROM
is assigned

5180 Initialization problem: Drive number


parameter in configuration file is
different from the current controller
configuration. Value from EEPROM
is assigned

5181 Initialization problem: RMS


protection time constant parameter in
configuration file is different from
the current controller configuration.
Value from EEPROM is assigned

5183 Initialization problem: Number of


axes parameter in configuration file
is different from the current
controller configuration. Value from
EEPROM is assigned

5184 Initialization problem: One of digital


inputs parameters in configuration
file is different from the current
controller configuration. Value from
EEPROM is assigned

5185 Initialization problem: One of digital


outputs parameters in configuration
file is different from the current
controller configuration. Value from
EEPROM is assigned

5186 Initialization problem: One of analog


inputs parameters in configuration
file is different from the current
controller configuration. Value from
EEPROM is assigned

5187 Initialization problem: One of analog


outputs parameters in configuration
file is different from the current
controller configuration. Value from
EEPROM is assigned

Version NT 2.20 551 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

Table 82 ACSPL+ System Errors (page 4 of 4)


Error Code Error Message Remarks

5188 Initialization problem: Number of


HSSI channels parameter in
configuration file is different from
the current controller configuration.
Value from EEPROM is assigned

5189 Initialization problem: Unit ID is


wrong. The unit definition is ignored

5190 Initialization problem: Number of


nodes does not meet the
configuration

5191 Initialization problem: Number of


axes does not meet the configuration

5201 Initialization problem: Wrong range


of input parameters. Servo Processor
program activation failed

5202 Initialization problem: File not


found. Servo Processor program
activation failed

5203 Initialization problem: Read file


error. Servo Processor program
activation failed

5204 Initialization problem: Memory


allocation error. Servo Processor
program activation failed

5205 Initialization problem: Checksum


error. Servo Processor program
activation failed

5206 Initialization problem: EtherCAT


error. Servo Processor program
activation failed

5207 Initialization problem: EtherCAT


timeout. Servo Processor program
activation failed

Version NT 2.20 552 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

5.6 EtherCAT Errors


EtherCAT errors range from 6000 to 6999 and are latched in the ECERR variable.

Table 83 ACSPL+ EtherCAT Errors (page 1 of 2)


Error Code Error Message Remarks

6000 General EtherCAT Error Appears for any unspecified EtherCAT


error. In general, it rarely appears.

6001 EtherCAT cable not connected Check that the EtherCAT connections are
firmly seated.

6002 EtherCAT master is in incorrect state On start up all slaves did not succeed to
initialize to full OP state. Can be caused by
wrong configuration or a problem in a Slave

6003 Not all EtherCAT frames can be The Master has detected that at least one
processed frame that was sent has not returned. This
implies a hardware problem in the cables or
Slaves.

6004 EtherCAT Slave error Slave did not behave according to


EtherCAT state machine – internal Slave
failure.

6005 EtherCAT initialization failure The EtherCAT-related hardware in the


Master could not be initialized. Check the
EtherCAT hardware.

6006 EtherCAT cannot complete the The bus scan could not be completed. This
operation implies hardware level problems in the
EtherCAT network.

6007 EtherCAT work count error Every Slave increments the working
counter in the telegram. If this error is
triggered, it means that a Slave has failed.
Possible root cause: cable interruption,
Slave reset, Slave hardware failure,

6008 Not all EtherCAT slaves are One or more of the Slaves has changed its
operational state to other than OP, or it may be due to a
Slave restart or internal fault that internally
forces the Slave to go to PREOP or
SAFEOP.

6009 EtherCAT protocol timeout The Master has detected that the Slave does
not behave as expected for too long, and
reports timeout. Implies a Slave hardware
problem. Try power down, and system
restart.

Version NT 2.20 553 Reference Guide


SPiiPlus Command & Variable Reference SPiiPlus Error Codes

Table 83 ACSPL+ EtherCAT Errors (page 2 of 2)


Error Code Error Message Remarks

6010 Slave initialization failed The Master cannot initialize a Slave by the
configuration file. It can be caused by either
wrong configuration, or a hardware
problem in the Slave.

6011 Bus configuration mismatch The bus topology differs from that in
configuration file.

6012 CoE emrgency A Slave with CoE support has reported an


emergency message.

6013 EtherCAT Slave won't enter INIT Hardware fault, for example DHD with
state broken (logic) supply.

Version NT 2.20 554 Reference Guide

You might also like