ACSPL Commands Variables Reference Guide
ACSPL Commands Variables Reference Guide
Reference Guide
December 2024
Document Revision: 4.00
ACSPL+ Commands & Variables Reference Guide
COPYRIGHT
Changes are periodically made to the information in this document. Changes are published as release notes and later
incorporated into revisions of this document.
No part of this document may be reproduced in any form without prior written permission from ACS Motion Control.
TRADEMARKS
EtherCAT® is registered trademark and patented technology, licensed by Beckhoff Automation GmbH, Germany.
Any other companies and product names mentioned herein may be the trademarks of their respective owners.
PATENTS
[Link]
support@[Link]
sales@[Link]
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 is not responsible for incidental, consequential, or special damages
of any kind in connection with using this document.
Revision History
Date Revision Description
Breakpoints in autoroutines
Jul 2024 3.14.01b
Updated description of ECGETSLAVE
AIN range
FVFIL formula correction
Mar 2024 3.14a Cross-reference STR/DSTR
MBRKROUT Corrections
Other changes
Nov 2022 3.13 New Release, correct struct type variable definition
Jun 2022 3.12.01 Added /e switch description to PEG_I, more details in DOUT
May 2022 3.12 New Release, Error mapping, FOE, Modulo, other functions
Remove AERR
Dec 2021 [Link]
peg_engine instead of axis in PEG_I, PEG_R, etc.
Sep 2021 3.11 New and updated functions with ADK Release
GCODE Errors
Apr 2019 2.70 Many new functions, commands, and variables for new
features. See version 2.70 release notes.
Conventions
The following conventions are used in the document.
Text Formats
Format Description
Blue Hyperlink
Flagged Text
Related Documents
Documents listed in the following table provide additional information related to this document.
The most updated version of the documents can be downloaded by authorized users from ACS
Motion Control Resources under "Downloads".
Online versions for all ACS software manuals are available to authorized users at ACS Motion Control
Knowledge Center.
Document Description
SPiiPlus C Library C++ and Visual Basic® libraries for host PC applications. This guide is
Reference applicable for all the SPiiPlus motion control products.
SPiiPlus COM Library COM Methods, Properties, and Events for Communication with the
Reference C Controller.
SPiiPlus .NET Library .NET Methods, Properties, and Events for Communication with the
Reference Controller.
SPiiPlusMMI
A complete guide for using the SPiiPlus MMI Application Studio and
Application Studio User
associated monitoring tools.
Guide
SPiiPlus Utilities User A guide for using the SPiiPlus User Mode Driver (UMD) for settingup
Guide communication with the SPiiPlus motion controller.
SPiiPlus NT/DC
Technical description of the SPiiPlus NT/DC product line.
Hardware Guide
SPiiPlus PDMnt
Hardware Technical description of the SPiiPlus PDMnt Network Interface.
Guide
SPiiPlus SDMnt Technical description of the SPiiPlus SDMnt Step Motor Drive
Hardware Guide Module.
SPiiPlus UDMnt
Hardware Technical description of the SPiiPlus UDMnt Universal Drive Module.
Guide
MC4U-CS Control
Technical description of the MC4U Control Module integrated
Module Hardware
motion control product line.
Guide
Table of Contents
Revision History ii
Conventions viii
Related Documents ix
1. Introduction 1
2. ACSPL+ Commands 2
2.1 Axis Management Commands 6
2.1.1 BREAK 7
2.1.2 COMMUT 8
2.1.3 CONNECT 9
2.1.4 CSCREATE 12
2.1.5 CSDESTROY 15
2.1.6 DEPENDS 16
2.1.7 DISABLE/DISABLEALL 17
2.1.8 ENABLE/ENABLE ALL 18
2.1.9 ENCINIT 19
2.1.10 ENCREAD 21
2.1.11 ERRORDEF 22
2.1.12 FCLEAR 23
2.1.13 FOLLOW 24
2.1.14 GO 24
2.1.15 GROUP 25
2.1.16 HALT 25
2.1.17 HOME 26
2.1.18 IMM 29
2.1.19 KILL/KILLALL 30
2.1.20 SAFETYCONF 31
2.1.21 SAFETYGROUP 33
2.1.22 SET 33
2.1.23 SPLIT 34
2.1.24 UNFOLLOW 35
2.2 Predefined Homing Methods 35
2.2.1 Homing Method 1: Homing on the negative limit switch and index pulse 35
2.2.2 Homing Method 2: Homing on positive limit switch and index pulse 35
2.2.3 Homing Method 17: Homing on Negative Limit Switch 36
2.2.4 Homing Method 18: Homing on Positive Limit Switch 36
2.2.5 Homing Method 33 and 34: Homing on the index pulse 36
2.2.6 Homing Method 37: Homing on current position 36
2.2.7 Homing Method 50: Negative Hard Stop and index pulse (ACS Specific) 36
2.2.8 Homing Method 51: Positive Hard Stop and index pulse (ACS Specific) 37
2.2.9 Homing Method 52: Negative Hard Stop (ACS Specific) 37
2.2.10 Homing Method 53: Positive Hard Stop (ACS Specific) 37
2.3 Interactive Commands 37
2.3.1 DISP 37
2.3.2 INP 42
2.3.3 INTERRUPT 45
2.3.4 INTERRUPTEX 46
2.3.5 SEND 48
2.3.6 TRIGGER 50
2.3.7 OUTP 51
2.4 PEG and MARK Commands 53
2.4.1 ASSIGNMARK 54
2.4.2 ASSIGNPEG 55
2.4.3 ASSIGNPOUTS 57
2.4.4 GETPEGCOUNT 59
2.4.5 PEG_I 60
2.4.6 PEG_R 62
2.4.7 STARTPEG 67
2.4.8 STOPPEG 68
2.4.9 SETPEGDELAY 69
2.5 Miscellaneous Commands 69
2.5.1 AXISDEF 70
2.5.2 DC 72
2.5.3 STOPDC 75
2.5.4 READ 76
2.5.5 SPDC 77
2.5.6 STARTSPDC 80
2.5.7 STOPSPDC 81
2.5.8 WRITE 82
2.5.9 SPINJECT 83
2.5.10 STARTINJECT 84
2.5.11 STOPINJECT 85
2.5.12 SPICFG 85
[Link] SPIWRITE 87
2.5.13 SPIWRITE 87
2.5.14 SPRT 88
2.5.15 SPRTSTOP 92
2.5.16 USAGESP 92
2.6 Motion Commands 92
2.6.1 ARC1 94
2.6.2 ARC1 95
2.6.3 ARC1 98
2.6.4 ARC2 99
2.6.5 ARC2 100
2.6.6 ARC2 103
2.6.7 BPTP 103
2.6.8 BPTPCalc 106
2.6.9 BSEG...ENDS 107
2.6.10 JOG 108
2.6.11 LINE 109
2.6.12 LINE 110
2.6.13 LINE 113
2.6.14 MASTER 114
2.6.15 MPOINT 115
2.6.16 MPTP...ENDS 120
2.6.17 MSEG...ENDS 123
2.6.18 PATH...ENDS 125
2.6.19 POINT 127
2.6.20 PROJECTION 130
2.6.21 PTP 132
2.6.22 PVSPLINE...ENDS 134
[Link] XD 871
[Link] BS 871
[Link] BR 872
6.4 System Commands 873
6.4.1 SI 873
6.4.2 SIR 877
6.4.3 MEMORY 889
6.4.4 IR 889
6.4.5 U 891
6.4.6 TD 892
6.4.7 SC 892
6.4.8 ETHERCAT 893
6.4.9 #ETHERCAT2 902
6.4.10 ECMAPREP 903
6.4.11 CC 904
6.4.12 PLC 905
6.4.13 LOG 905
6.4.14 LOG HOST_TICKS 907
6.4.15 LOGP 908
7. SPiiPlus Error Codes 909
7.1 ACSPL+ Syntax Errors 909
7.2 ACSPL+ Compilation Errors 945
7.3 ACSPL+ Runtime Errors 962
7.4 Errors 997
7.5 Encoder Errors 1008
7.6 System Errors 1010
7.7 EtherCAT Errors 1013
7.8 EtherCAT Slave Errors 1015
7.9 MODBUS Errors 1022
8. G-Code Error Codes 1024
8.1 G-Code Syntax Errors 1024
8.2 G-Code Compilation Errors 1028
8.3 G-Code Runtime Errors 1029
Appendix A. PEG And MARK Mapping Tables 1033
List of Figures
Figure 4-1. CONNECT Using MAP Function 12
Figure 4-2. DISABLE and Mechanical Brake Output Process- Positive BONTIME 18
Figure 4-3. DISABLE and Mechanical Brake Output Process - Negative BONTIME 18
Figure 4-4. ENABLE and Mechanical Brake Output Process - Positive BOFFTIME 19
Figure 4-5. ARC1 Coordinate Specification 94
Figure 4-6. ARC2 Center Point and Rotation Angle Specification 99
Figure 4-7. SLAVE /pt Illustration 115
Figure 4-8. Single-Axis Motion Using MPTP 122
Figure 4-9. Two-Axis Group Motion Using MPTP/v 123
Figure 4-10. Results of Example MSEG 125
Figure 4-11. PATH...ENDS Diagram 127
Figure 4-12. PROJECTION of the XA Plane 131
Figure 4-13. FPOS - PROJECTION Example 131
Figure 4-14. PROJECTION Example - Final Result 132
Figure 4-15. PVSPLINE Motion Diagram 136
Figure 4-16. Use of STOPPER 139
Figure 4-17. Corner Processing - Exact Path Option 147
Figure 4-18. Corner Processing - Permitted Deviation, Permitted Radius and Corner
Smoothing Options 147
Figure 5-1. FRF measurement of a flexible system 366
Figure 5-2. SPTP motion where SLSFF=0 (no snap feed-forward) 367
Figure 5-3. SPTP motion where SLSFF=70 (snap feed-forward is tuned) 368
Figure 6-1. Illustration of COPY Function 595
Figure 6-2. Example Mapping 641
Figure 6-3. Example Mapping 644
Figure 6-4. Example Mapping 648
Figure 6-5. Example Mapping 651
Figure 6-6. Example Mapping 654
Figure 6-7. Symmetrical Dead Zone Example 667
Figure 6-8. Asymmetrical Dead Zone Example 667
Figure 6-9. DSIGN Function Example 669
Figure 6-10. EDGE Function Example 670
List of Tables
Table 4-1. The ACSPL+ command set 2
Table 4-2. Homing Methods 28
Table 4-3. DISP Command Option Escape Sequences 38
Table 4-4. Type Characters 39
Table 4-5. Channel Designation for TRIGGER 51
Table 4-6. PEG Output Signal Configuration 64
Table 4-7. Mode Values 65
Table 4-8. Commonly Monitored SPDC Variables 79
Table 4-9. Matrix Values 131
Table 4-10. IF Control Structures 167
Table 5-1. Alphabetical Listing of All ACSPL+ Variables 187
Table 5-2. AFLAG Bit Description 201
Table 5-3. MFLAGS Bit Designators 207
Table 5-4. E_FLAGS Bit Description 236
Table 5-5. Multi-Channel Feedback Support 248
Table 5-6. Homing Methods 255
Table 5-7. AST Bit Descriptions 271
Table 5-8. MST Bit Descriptions. 278
Table 5-9. NST Bit Description 281
Table 5-10. PFLAGS Bit Description 1 380
Table 5-11. PST Bit Description 383
Table 5-12. ECST Bits 390
Table 5-13. EC2ST Bits 391
Table 5-14. Axis Fault Bits 396
Table 5-15. FDEF Bit Description 404
Table 5-16. FMASK Bit Description 409
Table 5-17. SAFINI Valid Bits 418
Table 5-18. S_FAULT Fault Bits 420
Table 5-19. S_FDEF Bit Description 424
Table 5-20. S_FMASK Bit Description 426
Table 5-21. SLCROUT Values 479
Table 5-22. SLPROUT Values 482
1. Introduction
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 Application Studio
Communication Terminal for use in a SPiiPlus system.
This document is intended for the use of software engineers.
2. 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
Table 4-1. The ACSPL+ command set
Command Description
Command Description
Command Description
Command Description
Activates the fault response for all axes in the axis_list when
SAFETYGROUP any axis triggers the fault, and manages the axes as a block in
response to KILL/KILLALL and DISABLE/DISABLEALL.
Restarts PEG at the current position if has been issued and the
last_point has not been reached.
STOPINJECT Stops the transfer of MPU real-time data to the Servo Processor.
Axis Management
Halts the PEG engine for the specified axis.
Commands
Command Description
Command Description
Command Description
Creates a safety axis group. When any axis in the group triggers
SAFETYGROUP
a fault, the fault affects all axes in the group.
2.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
Arguments
Axis or list of axes, valid numbers are: 0, 1, 2, ... up to the number of axes in the
axis_list
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 and .NET Library Methods
Break
C Library Functions
acsc_Break
Example
2.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
Versions 2.60 and higher supports COMMUT in GANTRY mode. Commutation of the
primary axis will automatically trigger commutation of the secondary axis.
Syntax
COMMUT axis [,excitation_current][,settle_time][,slope][,gantry_commut_delay]
Arguments
The affected axis, valid numbers are: 0, 1, 2, ... up to the number of axes in
axis
the system minus 1.
excitation_ Optional - Given as a percentage of the full current command. The default
current value is set to 98% of XRMS.
Optional - The slope parameter is optional, and used only in special cases.
If a value is assigned to this parameter then the excitation current
slope 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.
Optional – can be used only in Gantry mode. It defines the delay time in
gantry_ milliseconds after the commutation of the primary axis is completed and
commut_delay before the commutation of the complimentary axis begins. The default
value is 500 msec.
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 and .NET Library Methods
Commut, WaitMotorCommutated
C Library Functions
acsc_Commut, acsc_WaitMotorCommutated
2.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
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 following 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/ENABLE ALL, DISABLE/DISABLEALL and KILL/KILLALL 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
This illustrates the results of the example on the SPiiPlus MMI Application Studio Scope.
2.1.4 CSCREATE
Description
The CSCREATE command creates the new Local Coordinate System (LCS) relative to the Machine
Coordinate System or the previous LCS, depending on the applied switches.
Syntax
For 2D coordinate system:
Arguments
The group of 2 or 3 axes. Valid values are: 0, 1, 2 ... up to the number of axes in
axis_list
the system minus 1.
The Z position of the LCS in user units. This parameter is included when axis_list
z_trans
includes 3 axes.
(Optional)
rot_axis
The rotation axis: 0 – X, 1 – Y, 2 – Z
(optional)
rot_angle
Rotation angle value: (-3.14159 : +3.14159) in radians
Switches
The new LCS is relative (additive) to the existing LCS (otherwise the new LCS is
/r
relative to the Machine Coordinate System).
Comments
> In function calls which include rotation parameters, the translation parameters are applied
to the system first, and then the rotation parameters.
> The enumeration of axes for the rot_axis parameter is a numbered list of axes in the newly
created coordinate system. This enumeration relates to the virtual axes, not the physical
axes of the system.
> This command is supported in version 3.10 and higher.
Example 1
This example demonstrates rectangular motion in PTP mode.
Example 2
This example demonstrates rectangular motion in MPTP mode.
Example 3
This example demonstrates round rectangular motion in XSEG mode.
XSEG/z (X,Y), 0, 0
LINE (X,Y), 100, 0
ARC2 (X,Y), 100, -30, -3.14159
LINE (X,Y), 0, -60
ARC2 (X,Y), 0, -30, -3.14159
ENDS(X,Y)
TILL GSEG(X) = -1 !Wait until motion complete
CSDESTROY (X,Y,Z) !restore machine coordinate system
2.1.5 CSDESTROY
Description
The CSDESTROY command cancels the active Local Coordinate System and sets the Machine
Coordinate System or previous Local Coordinate System.
Syntax
Arguments
The group of 3 axes. Valid values are: 0, 1, 2 ... up to the number of axes in the
axis_list
system minus 1.
(Optional)
restore_flag Set to 1 to restore the previous LCS, set to 2 to total destroy of LCS and
remove it from memory; 0 or omitted value restores the MCS
Comments
This command is supported in version 3.10 and higher.
Examples
See CSCREATE.
2.1.6 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
Axis or list of axes, valid numbers are: 0, 1, 2, ... up to the number of axes in
axis_list
the system minus 1.
Comments
> Once a CONNECT command is executed, the controller resets the motor dependence
information to the default-the motor depends only on the corresponding axis.
> 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.
2.1.7 DISABLE/DISABLEALL
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, or list of axes, valid numbers are: 0, 1, 2, ... up to the number of axes in the
axis_list
system minus 1.
Example 2:
Example 3:
Figure 4-2. DISABLE and Mechanical Brake Output Process- Positive BONTIME
Figure 4-3. DISABLE and Mechanical Brake Output Process - Negative BONTIME
Axis or list of axes, valid numbers are: 0, 1, 2, ... up to the number of axes in the
axis_list
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/DISABLEALL
Related ACSPL+ Variables
ENTIME, MFLAGS<axis>.#ENMOD
COM Library Methods and .NET Library Methods
Enable, EnableM, Wait Motor Enabled
C Library Functions
acsc_Enable, acsc_EnableM, acsc_WaitMotorEnabled
Example1:
Example 2:
Figure 4-4. ENABLE and Mechanical Brake Output Process - Positive BOFFTIME
2.1.9 ENCINIT
Description
The ENCINIT function is used for encoder configuration. The ENCINIT function, if executed in a buffer,
will wait until initialization is finished.
Syntax
Arguments
The affected axis, valid number are: 0,1,2.. up to the number of axis in
Axis
the system minus 1.
(Optional, Integer) Used for setting the encoder data control CRC
E_par_b
code. According to ACSPL+ E_PAR_B definition.
(Optional, integer) Used for setting the single turn resolution (number
ESTBITS
of bits).
(Optional, integer) Used for setting the multi turn resolution (number
EMTBITS
of bits).
Return Value
None
Comments
If an optional parameter is specified, the relevant ACSPL+ variable is modified as well. Otherwise, the
initialization of the encoder will use the existing value of the variable.
If the Primary parameter is set to 0, secondary feedback variables are affected or used during
initialization, according to the following table.
If one of the parameters is out of range, error 3041 “Assigned value is out of range” given. Not
allowed E_TYPE value will trigger error 3194 “Not allowed Encoder Type”.
If ESTBITS or EMTBITS are not 0 and SLABITS is not equal to ESTBITS+EMTBITS, an error is triggered.
This function is supported in version 3.00 and higher.
SLABITS S2LABITS
E_PAR_A E2_PAR_A
E_PAR_B E2_PAR_B
E_PAR_C E2_PAR_C
E_AOFFS E2_AOFFS
E_FREQ E2_FREQ
E_SCMUL E2_SCMUL
ESTBITS E2STBITS
EMTBITS E2MTBITS
Example
STOP
2.1.10 ENCREAD
Description
The ENCREAD function is used for reading encoder parameters. The function should be executed in
a buffer, and it will wait till the execution is completed.
Syntax
Arguments
The affected axis, valid number are: 0,1,2.. up to the number of axes in the
Axis
system minus 1
Return Value
Parameter value according to the requested ParamType.
Comments
Only Endat encoders are supported. For any other E_TYPE, the functions returns error 3196
“Requested Absolute Encoder is not supported”.
E_TYPE value is changed to 10 (Endat) after the function is called.
The function can be called only if the axis is disabled.
The function can be called only from a buffer; if called from the terminal, error 2073 is returned.
This variable is supported in version 3.10 and higher.
Example
2.1.11 ERRORDEF
Description
The ERRORDEF command enables the user to define user errors. Once defined, the user can see the
string in the error message instead “Unknown error”.
Syntax
Arguments
Switches
N/A
Error Conditions
???
Comments
ERRORDEF commands must be defined in D-Buffer.
Error Number redefinition is forbidden.
2.1.12 FCLEAR
Description
FCLEAR clears the FAULT variable and the results of the previous fault stored in MERR.
Syntax
FCLEAR axis_list
Arguments
Axis or list of axes, valid numbers are: 0, 1, 2, ... up to the number of axes in the
axis_list
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.
> 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.
> 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 and .NET Library Methods
FaultClear, FalutClearM
C Library Functions
acsc_FaultClear, acsc_FaultClearM
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
2.1.13 FOLLOW
Description
FOLLOW switches an axis into slave mode. The specified axis will follow the profile generated by the
RTC6.
Syntax
FOLLOW(axis)
Arguement
axis Axis, valid numbers are: 0, 1, 2, ... up to the number of axes in the system minus 1.
2.1.14 GO
Description
GO starts a motion that has been created using the /w (wait) switch.
Syntax
GO axis_list
Arguments
Axis or list of axes, valid numbers are: 0, 1, 2, ... up to the number of axes in the
axis_list
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.
> 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.
> 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 and .NET 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
2.1.15 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 or list of axes, valid numbers are: 0, 1, 2, ... up to the number of axes in the
axis_list
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 and .NET Library Methods
Group
C Library Functions
acsc_Group
Example
2.1.16 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
Switches
Comments
HALT ALL terminates the motion of all axes.
Related ACSPL+ Commands and .NET Library Methods
KILL/KILLALL
COM Library Methods
Halt, HaltM
C Library Functions
acsc_Halt, acsc_HaltM
Example 1:
Example 2:
Example 3:
2.1.17 HOME
Description
The predefined HOME command may receive the following parameters: Axis, HomingMethod
(optional), HomingVel (optional), MaxDistance (optional), HomingOffset (optional), HomeCurrLimit
(optional), HardStopThreshold (optional), SetYawToOpen (optional), SkewValue (optional),
LookForTwoLS (optional), LookForTwoIndexes (optional).
If the "/e" switch is used, the optional "Timeout" parameter is also used.
Syntax
Without the "/e" switch
Arguments
For Gantry mode only. Optional. Used for setting positing for the
SkewValue complementary axis after the homing process is finished. If not
specified, the value is 0.
Optional parameter.
Timeout The parameter specifies the Timeout for the HOME command, in
milliseconds. By default, there is no limitation.
1 Homing Method 1: Homing on the negative limit switch and index pulse
50 Homing Method 50: Negative Hard Stop and index pulse (ACS Specific)
51 Homing Method 51: Positive Hard Stop and index pulse (ACS Specific)
Comments
> The HOME command is non-blocking, unless the "/e" switch is used.
> MFLAGS.#HOME bit will be set to 1 after the homing is completed.
> AST.#INHOMING bit is 1 during the homing process • E_TYPE and other encoder initialization
processes will reset the #HOME bit.
> The predefined homing methods are defined according to the DS402 standard, except
methods 50, 51, 52, 53 .
> If the homing method is not supported, the error 3314 “Requested Homing
Method is not supported” is given.
> The axis is required to be enabled, commutated, and not in motion.
> Disable axis during homing process will cancel the homing process.
> Other motions cannot be executed while the axis is in home process
> The following homing methods are supported in Gantry mode: 1, 2, 50, and 51.
Example
ENABLE 0
COMMUT 0
HOME 0,34 !homing on Positive Index Pulse
TILL MFLAGS0.#HOME=1
STOP
2.1.18 IMM
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 The motion parameter with the specified axis (valid numbers are: 0, 1, 2, ...
parameter up to the number of axes in the system minus 1).
value or
User specified value or formula.
formula
C Library Functions
acsc_SetAccelerationImm, acsc_SetDecelerationImm, acsc_SetJerkImm, acsc_
SetKillDecelerationImm, acsc_SetVelocityImm
Example
2.1.19 KILL/KILLALL
Description
Use KILL after a safety event to decelerate and stop an axis faster than during normal deceleration
and stop. KILLALL stops all axes.
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.
In group motion, KILL terminates currently executed motion only for the specified axes, and clears
all other motions waiting in the axis/axes motion [Link] deceleration profile uses a second-
order deceleration profile and the KDEC (kill deceleration) variable of each axis.
Syntax
KILL axis_list[,reason]
Arguments
List of axes to be killed, valid numbers are: 0, 1, 2, ... up to the number of axes in
axis_list
the system minus 1, or ALL for all axes.
Switches
For systems having more than 15 axes, the use of KILL ALLmay 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/ENABLE ALL.
Example 2:
Example 3:
Example 4:
KILL ALL, 6100 !Kills all axes, and stores the cause in MERR.
!(6100 is the code for a user-defined cause.)
2.1.20 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 or list of axes, valid numbers are: 0, 1, 2, ... up to the number of axes in the
axis_list
system minus 1.
fault_
Any axis fault name like #LL for left limit.
name
A string enclosed in double quotation marks with one or more of the following
characters determines the action of SAFETYCONF:
> K (KILL/KILLALL)
> D (DISABLE/DISABLEALL)
conf_
string > KD (KILL/KILLALL-DISABLE/DISABLEALL)
> + 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
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.
In devices implementing STO, the user may not use SAFETYCONF to change the default response to
an STO fault, which is KILL<axis> + DISABLE<axis>.
Related ACSPL+ Commands
The #SC Communication Terminal command shows the current fault response configuration for all
axes.
Example 1:
Example 2:
Example 3:
Example 4:
2.1.21 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/KILLALL and DISABLE/DISABLEALL.
To cancel the defined SAFETYGROUP, send the command again with only the first axis as the axis_
list.
Syntax
SAFETYGROUP axis_list
Arguments
List of axes, valid numbers are: 0, 1, 2, ... up to the number of axes in the system
axis_list
minus 1.
Example 2:
2.1.22 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
The reference position of the specified axis, valid numbers are: 0, 1, 2, ... up to
axis_RPOS
the number of axes in the system minus 1.
value or
User-defined value or formula
formula
2.1.23 SPLIT
Description
SPLIT breaks down a group created using GROUP by designating any axis in the axis list. SPLIT ALL
breaks down all groups.
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 or list of axes, valid numbers are: 0, 1, 2, ... up to the number of axes in the
axis_list
system minus 1.
Example 2:
2.1.24 UNFOLLOW
Description
UNFOLLOW switches an axis into regular mode. The specified axis will follow the profile generated
by the ACS controller.
Syntax
UNFOLLOW(axis)
Arguement
axis Axis, valid numbers are: 0, 1, 2, ... up to the number of axes in the system minus 1.
2.2.2 Homing Method 2: Homing on positive limit switch and index pulse
With this homing method the initial direction movement is rightward if the positive limit switch is
inactive (shown as low in the figure above). The home position is at the first index pulse left of the
position where the negative limit switch becomes active.
SET FPOS(<axis>)=HomeOffset.
2.2.7 Homing Method 50: Negative Hard Stop and index pulse (ACS Specific)
With this homing method the initial direction movement is negative, till Hard Stop is found (by using
the Position Error indication). The home position is at the first index pulse right of the position where
the Hard Stop is found.
Position Error is considered as Hard Stop only if the HardStopThreshold condition is met.
2.2.8 Homing Method 51: Positive Hard Stop and index pulse (ACS Specific)
With this homing method the initial direction movement positive, till Hard Stop is found (by using the
Position Error indication). The home position is at the first index pulse left of the position where the
Hard Stop is found.
Command Description
2.3.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.
The DISP command has been extended to receive an entire array or a specific row from the array,
depending on the expression argument provided. To display all items in a dimension, the user can
either omit the index or use an index value of -1.
Syntax
DISP argument [, argument. . .]
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.
> Formatting Specification - determines how the results of an expression that follows the
input string is formatted in the output string.
Table 4-3. DISP Command Option Escape Sequences
\xHH Any ASCII character where HH represents the ASCII code of the character.
The output format specification syntax adheres to a restricted version of the C language
syntax.
where:
Signed value having the form [ - ][Link] e [sign]ddd where d is a single decimal
e 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.
Signed value having the form [ - ][Link], where dddd is one or more decimal
digits. The number of digits before the decimal point depends on the magnitude
f
of the number, and the number of digits after the decimal point depends on the
requested precision.
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
g
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.
Identical to the g format, except that E, rather than e, introduces the exponent
G
(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:
> 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.
> 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 and .NET Library Methods
OpenMessageBuffer, GetSingleMessage, CloseMessageBuffer
C Library Functions
acsc_OpenMessageBuffer, acsc_GetMessage, acsc_CloseMessageBuffer
Example 1:
Example 2:
Example 3:
Example 4:
Example 5:
Example 6:
DISP "Elapsed time is: ", TIME !Output: Elapsed time is: 4.93258E+006
STOP
Example 7:
Example 8:
Example 9:
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:
Example 12:
2.3.2 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[/switches](channel, [array,] [start_index,] [number,] [timeout])
Arguments
Optional
The first received character is assigned to the array element with the
start_index specified index.
If start_index is omitted, the assignment starts from the first element of the
array.
Optional
The function waits for input not more than the specified number of
timeout
milliseconds.
If timeout is omitted, the waiting time is not limited.
Switches
Switch
Description
Name
Interpret the data as big-endian (most significant byte is first in the data
/b
stream)
Comments
> When no command options are specified, the data is interpreted as chars (8 bits).
> Up to one type can be specified. Using more causes runtime error 3384 - The specified
suffix combination is invalid.
> When /b is not specified, the data is interpreted as little-endian (least significant byte is first
in the data stream).
> When the array’s type does not match the data type, data is rounded towards zero.
> When there is not enough data to completely interpret the requested type, the partial data
is lost, and the array is not modified.
Return Value
The number of entities that have been stored into the variable, if input successfully read. If a
timeout occurs, the function returns zero.
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
!within 1000 msec or when the 10 values have been
!collected.
STOP !Ends program
2.3.3 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
Example 1:
INTERRUPT used in an ACSPL+ program:
Example 2:
INTERRUPT used in a Host COM Lib application:
Example 3:
INTERRUPT used in a Host C Lib application:
2.3.4 INTERRUPTEX
Description
The INTERRUPTEX command operates in a manner similar to INTERRUPT but has the following
differences:
> It triggers the dedicated callback ACSC_INTR_ACSPL_PROGRAM_EX (21)
> It accepts two mandatory integer parameters and two optional 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.
> Adjacent (“glued”) interrupts are processed differently (because parameters are not OR’ed):
> There is an internal queue of 256
> The next interrupt value will be triggered only after C Library delivers the previous one
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).
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
Example 1:
Example 2:
Example 3:
2.3.5 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
[, 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
2.3.6 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.
Full application of the TRIGGER command to channels greater than 7 is not currently
supported.
Syntax
TRIGGER channel, expression[, timeout]
Arguments
0 AST0.11 0x00000001
1 AST1.11 0x00000002
2 AST2.11 0x00000004
3 AST3.11 0x00000008
4 AST4.11 0x00000010
5 AST5.11 0x00000020
6 AST6.11 0x00000040
7 AST7.11 0x00000080
2.3.7 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[/switches] (channel, variable[, start_index, number, timeout])
Arguments
variable User-defined integer or real array from which the data will be sent.
Optional
The index in the array from which to start.
start_index
If start_index and number are omitted, all members of the array are
transmitted.
Optional
number The number of characters to be transmitted from the variable array.
If omitted, all members of the array starting from start_index are transmitted.
Optional
The function waits for input not more than the specified number of
timeout
milliseconds.
If timeout is omitted, the waiting time is not limited.
Switches
Switch
Description
Name
Interpret the data as big-endian (most significant byte is first in the data
/b
stream)
Comments
> When no command options are specified, the data is interpreted as chars (8 bits).
> Up to one type can be specified. Using more causes runtime error 3384 - The specified
suffix combination is invalid.
> When /b is not specified, the data is interpreted as little-endian (least significant byte is first
in the data stream).
> When the array’s type does not match the data type, data is rounded towards zero.
> When there is not enough data to completely interpret the requested type, the partial data
is lost, and the array is not modified.
Return Value
The number of entities that have been transmitted.
Error Conditions
If the function fails, an error is generated.
Command Description
SETPEGDELAY Defines the PEG signal's delay for a specific PEG engine
2.4.1 ASSIGNMARK
Description
The ASSIGNMARK function allows assignment of Mark inputs to encoder. It allows a mapping of
encoder latching to be triggered by using different physical input pins.
Syntax
ASSIGNMARK[/i] axis, mark_type, inputs_to_encoder_bit_code
Arguments
The axis index, valid numbers are: 0, 1, 2, ... up to the number of axes in the
system minus 1.
Axis
The axis parameter determines which node unit is used. Axis parameter can
be any axis number of the same unit.
inputs_to_ Bit code for inputs-to-encoders mapping according to the following tables.
encoder_bit_ The bit code determines which physical input pin leads to each encoder
code MARK latching.
Mark-1 Inputs to Encoder mapping for
Mark-1 Inputs to Encoders Mapping for SPiiPlusNT / DC-LT / HP / LD
IDMxx/ECMxx/UDMxx Encoder Mapping
Mark-1 Inputs to Encoders Mapping for with SPiiPlus CMnt / UDMpm-x /
UDMpc / CMba / CMxa / UDMba / UDMhp / UDMxa / CMhv / UDMhv
Mark-2 Inputs to Encoder mapping for
Mark-2 Inputs to Encoders Mapping for SPiiPlusNT / DC-LT / HP / LD
Mark-2 Inputs to Encoders Mapping for with SPiiPlus
CMnt/UDMpm/UDMpc/CMba/CMxa/UDMba/UDMhp/UDMxa/CMhv/UDMhv
Comments
Devices not indicated in the tables linked to the inputs_to_encoder_bit_code parameter have
a MARK output for each encoder. There is no need to configure those devices with the ASSIGNMARK
command.
Latching of Encoder <index> means IST(<index>).#MARK=1, and the MARK(<index>) variable value
stores the feedback position of encoder <index> (FPOS(<index>)).
The Bit Code shown in the tables affects all of the connectors in the row.
If the switch: /i is included, the MARK input signal is inverted.
In IDMxx/ECMxx products, the latching for all encoders happens simultaneously.
2.4.2 ASSIGNPEG
Description
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. It allows mapping of PEG engines to be
triggered by the feedback of a specific encoder.
Syntax
ASSIGNPEG[/f] axis, engines_to_encoders_code, gp_out_assign_code
Arguments
The axis index, valid numbers are: 0, 1, 2, ... up to the number of axes in the
system minus 1.
axis
Axis parameter can be any axis number of the same unit.
The axis parameter determines the Servo Processor used.
The axis parameter actually serves to determine the Servo Processor used.
Comments
> ASSIGNPEG is a blocking command - the ACSPL+ program moves to the next line or
command only after this command has been fully executed or an error is generated.
> The axis parameter can be any of the axes controlled by the same servo processor, the
result will be the same.
> If the "/f" switch is included, fast loading of Random PEG arrays is activated. This feature
allows definition of state-arrays with more than 1024-members by using Random PEG. The
PEG_R command must be called with the "/d" switch.
> The Bit Code shown in the Mapping PEG Engines to Encoders tables affects all of the
connectors in the row.
SPRT and SPINJECT commands cannot be used for the same Servo Processor when fast
loading of Random PEG arrays is activated.
2.4.3 ASSIGNPOUTS
Description
The ASSIGNPOUTS function is used for assigning PEG engine output signals to physical output pins.
In addition, the function allows assigning Fast General Purpose output pins and mapping between
FGP_OUT signals to the bits of the ACSPL+ OUT(x) variable, where x is the index that has been
assigned to the controller in the network during System Configuration.
The assignments 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:
OUT is an integer array that can be used for reading or writing the current state of the General
Purpose outputs - see SPiiPlus ACSPL+ Command & Variable Reference Guide.
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.
The tables in Appendix A.2 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, and 3 PEG state signals. Note that some of the signals
cannot be routed to physical pins.
Bit Code: 111 is used for switching the physical output pins to Fast General Purpose
Outputs, see ASSIGNPOUTS.
Syntax
Arguments
The axis index, valid numbers are: 0, 1, 2, ... up to the number of axes in the
system minus 1.
axis
For controllers with firmware version 2.15 or higher, the axis parameter can be
any axis number of the unit.
peg_ The peg output number according to the Mapping of Engine Outputs to
output Physical Output tables below
Bit code for engine outputs to physical outputs mapping according to:
SPiiPlusNT/DC-LT/HP/LD SP 0
SPiiPlusNT/DC-LT/HP/LD SP 1
CMnt/UDMpm/UDMpc/CMhv/UDMhv
CMba/CMxa/UDMba/UDMhp/UDMxa (OUT0-4)
CMba/CMxa/UDMba/UDMhp/UDMxa (OUT5-9)
UDMnt/UDMpa/UDMcb
UDMlc/UDMmc/UDIlt/UDIhp/PDIcl
NPMpm/NPMpc
Comments
ASSIGNPOUTS is a blocking command, meaning that the ACSPL+ program moves to the next line or
command only after this command has been fully executed or an error is generated.
A separate ASSIGNPOUTS command should be called for every GP output or PEG output.
Examples
The following examples illustrate the use of the ASSIGNPOUTS command to use PEG outputs as GP
outputs
Example 1:
ASSIGNPOUTS 0, 2, 0b111
This defines the Z_PEG output as FGP_OUT2 and maps it to the bit 18 of the ACSPL+ OUT variable (see
ASSIGNPOUTS).
If you run, for example:
OUT(x).18=1
Where x is the index assigned to the controller during System Configuration, FGP_OUT2 output will
be activated.
Then if you run:
OUT(x).18=0
ASSIGNPOUTS 4, 7, 0b111
This defines the X_STATE2 output as FGP_OUT6 and maps it to the bit 22 of the ACSPL+ OUT variable
(see ASSIGNPOUTS).
Related ACSPL+ Commands
ASSIGNPEG, PEG_I, PEG_R, STARTPEG, STOPPEG
COM Library Methods
None
C Library Functions
acsc_AssignPegOutputsNT
2.4.4 GETPEGCOUNT
Description
The function returns the pulse counter of the specified PEG engine.
Syntax
GetPEGCount(PEG_engine)
Support
> GETPEGCOUNT is supported on firmware versions 3.12 and later
2.4.5 PEG_I
Description
The PEG_I command is used for setting the parameters for the Incremental PEG mode.
Syntax
PEG_I[/awiecyzo] (peg_engine, width, first_point, interval,last_point [, err_map_static_axis1, static_
axis_coord1, [ err_map_static_axis2, static_axis_coord2], [stable_dir_dist,]] [time_based_pulses, time_
based_period])
Arguments
width Width of the pulse in milliseconds. Valid range is 26.6 ns to 1.745 ms.
A real scalar value in user units indicating the first point for the PEG
first_point
generation.
interval A real scalar value in user units indicating the distance between PEG events.
A real scalar value in user units indicating the last point for PEG generation.
last_point
Optional if the /e switch is used.
err_map_ The index of the first static axis when error mapping is used with PEG. Use
static_axis1 with the /y or /yz switches.
static_axis_ The predefined location value of the first static axis when error map correction
coord1 compensation is used with PEG. Use with the /y or /yz switches.
err_map_ The index of the second static axis when error mapping is used with PEG. Use
static_axis2 with the /yz switch.
static_axis_ The predefined location value of the second static axis when error map
coord2 correction compensation is used with PEG. Use with the /yz switch.
(Optional) Limit defining actual motion as opposed to jitter. If motion along the
stable_dir_
axis is greater than this value, that motion is used to determine the direction
dist
of motion.
time_ Optional parameter - a real scalar value indicating the number of time-based
based_ pulses generated after each encoder-based pulse, the range is from 0 to
pulses 65,535.
PEG is generated only after the first pre-defined start point is reached. If the current
encoder position exceeds pre-defined start point no PEG pulses are fired. It is
recommended to activate the PEG engine before the maximum current position for
movement in the positive direction and the minimum current position for movement in
the negative direction.
Comments
> If the switch: /w is included, the execution of the command is delayed until the execution of
the STARTPEG command.
> If the switch: /i is included, the PEG pulse output signal is inverted.
> If the switch: /a is included, error accumulation is prevented by taking into account the
rounding of the distance between incremental PEG events.
You must use this switch if interval does not match the whole number of encoder counts.
Using this switch is recommended for any application that uses the PEG_I command,
regardless if interval matches the whole number of encoder counts.
> Valid numbers of the peg_engine parameter can be found in the #SI report. In case of
multiple network units, the first axis number of each node indicates the first PEG engine of
the node.
> If the switch /e is included, the last_point parameter is optional and ignored, and the
PEG process continues until the STOPPEG command is issued.
> The /c switch supports 1D dynamic error compensation for Incremental PEG. 1D error
compensation can be defined by the ERRORMAP1D or ERRORMAP1ND functions.
> The /y switch supports 2D dynamic error compensation for Incremental PEG. 2D error
compensation can be defined by ERRORMAP2D, ERRORMAP2ND functions. This switch
requires 2 additional function arguments: static axes index, static axes
coordinates.
> The /z switch supports 3D dynamic error compensation for Incremental PEG. 3D error
compensation can be defined by ERRORMAP3DX functions. This switch must be used in
combination with switch /y (/yz) and requires 4 additional function arguments: static
axes 1 index, static axis 1 coordinate, static axes 2 index, static
axis 2 coordinate.
> The /o switch is used with the stable_dir_dist parameter. The PEG process does not
count motions smaller than this value as motion, for the purpose of determining the next
PEG firing. Only motion greater than this value will be used to determine the direction of
axis motion.
Product Support
The /c, /e, /y, /yz, and /o switches are supported in the following products:
> IDM/ECM/UDMsm
> IDM/ECM/UDMsa
> IDM/ECM/UDMma
> IDM/ECM/UDMdx
Example
See the Incremental PEG example in the PEG and MARK Operations Application Note.
Error Mapping Example
2.4.6 PEG_R
Description
The PEG_R command is used for setting the parameters for the Random PEG mode.
Syntax
PEG_R[/wdyzmo] (peg_engine, width, mode, first_index, last_index,POS_ARRAY, [STATE_ARRAY,] [,
err_map_static_axis1, static_axis_coord1, [ err_map_static_axis2, static_axis_coord2], [err_map_max_
size,]] [time_based_pulses, time_based_period])
Arguments
width Width of the pulse in milliseconds. Valid range is 26.6 ns to 1.745 ms.
Optional parameter - the Outputs States array defining the four PEG output
STATE_
states, maximum of 256/1024 members. If a longer array is required, use both
ARRAY
PEG_R/d and ASSIGNPEG/f switches.
err_map_ The index of the first static axis when error mapping is used with PEG. Use with
static_axis1 the /y or /yz switches.
static_axis_ The predefined location value of the first static axis when error map correction
coord1 compensation is used with PEG. Use with the /y or /yz switches.
err_map_ The index of the second static axis when error mapping is used with PEG. Use
static_axis2 with the /yz switch.
static_axis_ The predefined location value of the second static axis when error map
coord2 correction compensation is used with PEG. Use with the /yz switch.
(Optional) Limit defining actual motion as opposed to jitter. If motion along the
stable_dir_
axis is greater than this value, that motion is used to determine the direction
dist
of motion.
Default
Bit Signal Description
value
Default
Bit Signal Description
value
Enable Initial
16 1 – Enable
State
> The /z switch supports 3D dynamic error compensation for Random PEG. 3D error
compensation can be defined by ERRORMAP3DX functions. This switch must be ised in
combination with switch /y (/yz) and requires 4 optional function arguments: static
axes 1 index, static axis 1 coordinate, static axes 2 index, static
axis 2 coordinate.
> The parameters that can be set by the command differ from those that could be set for
SPiiPlusCM/SPiiPlusSA/SPiiPlus3U controllers with the addition of the new first_index and
last_index parameters.
> 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.
> 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.
> The last three arguments are optional. If STATE_ARRAY 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.
> The dynamic loading feature is limited by the loading frequency. If a high loading frequency
is required, the loading capacity may not suffice to keep the FIFO loaded.
> If the FIFO is emptied before all data arrays have been loaded, a memory overflow fault will
be thrown.
> Valid numbers of the peg_engine parameter can be found in the #SI report. In case of
multiple network units, the first axis number of each node indicates the first peg engine of
the node.
> The /m switch supports random PEG on a modulo axis. The POS_ARRAY is loaded once and
provides pulses every Modulo cycle. The Position values should be inside the
SLPMIN...SLPMAX range. The PEG engine must be assigned to a Modulo axis by the
ASSIGNPEG command.
> The /o switch allows the definition of a minimum distance for which motion is considered
actual motion as opposed to jitter. The name of the optional parameter is stable_dir_
dist; motion greater than the value of this parameter is used to calculate motion direction.
Product Support
The /m and /o switches and bit 17 in the mode parameter to enable PEG and initialize the states are
supported in the following products:
> IDM/ECM/UDMsm
> IDM/ECM/UDMsa
> IDM/ECM/UDMma
> IDM/ECM/UDMdx
1 200
0.5 400
0.25 800
0.2 1000
*For the XXMsm/sa/ma/dx products the maximum loading frequency is 16 kHz. There is no relation
to the CTIME value.
Example
See the Random PEG example in the PEG and MARK Operations Application Note.
Related ACSPL+ Commands
PEG_I, ASSIGNPEG, ASSIGNPOUTS, STARTPEG, STOPPEG
Related ACSPL+ Variables
AST
COM Library Methods
None
C Library Functions
acsc_PegRandomNT, acsc_WaitPegReady
2.4.7 STARTPEG
Description
The STARTPEG command initiates the PEG process on the specified engine. The command is used in
both the Incremental and Random PEG modes by using /w switch in PEG_I or PEG_R command. If
this switch is included, the execution of the PEG_I and PEG_R commands is delayed until the
execution of the STARTPEG command.
Syntax
STARTPEG peg_engine
Arguments
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.
Valid numbers of the peg_engine parameter can be found in the #SI report. In case of multiple
network units, the first axis number of each node indicates the first peg engine of the node.
Example
2.4.8 STOPPEG
Description
The STOPPEG command terminates the PEG process immediately on the specified engine. The
command is used in both the Incremental and Random PEG modes.
Syntax
STOPPEG peg_engine
Arguments
Comments
STOPPEG 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.
Valid values of the peg_engine parameter can be found in the #SI report. In case of multiple network
units, the first axis number of each node indicates the first peg engine of the node.
Example
2.4.9 SETPEGDELAY
Description
The SETPEGDELAY command defines the PEG signal's delay for a specific PEG engine.
The delay can be set for every available PEG signal:
> PEG pulse
> PEG State raising
> PEG State falling.
Syntax
Arguments
state_on_delay (optional) Random PEG State signal raising delay in msec. The default is 0
state_off_delay (optional) Random PEG State signal failing delay in msec. The default is 0
Comments
The SETPEGDELAY command should be called after PEG definition functions PEG_I or PEG_R.
The PEG_I and PEG_R functions initialize the PEG and set PEG delays to 0. The delay time is specified
in msec.
Support
> SETPEGDELAY is supported on firmware versions 3.13 and later
> SETPEGDELAY is supported on the following devices:
> ECMsm, ECMsa, ECMma, and ECMdx
> IDMsm, IDMsa, IDMma, and IDMdx
> UDMsm, UDMsa, UDMma, and UMDdx
Command Description
Returns the system back to the operational state if one or more slaves
SPINJECT
underwent a reset or power cycle.
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.
Issues the SPI transaction with the number of SPI words to be sent and
SPIWRITE
received in a single transaction
Starts a real-time data transfer process from the MPU to a given Servo
SPRT
Processor.
Stops an active real-time data transfer process on the given SP (for cyclic
SPRTSTOP
command only).
2.5.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
Arguments
The axis number, valid numbers are: 0, 1, 2, ... up to the number of axes in
the system minus 1.
axis
Adding (R) to the axis parameter means G-Code run on the axis will ignore the
modality entry of G20.
Comments
The AXISDEF command can be repeated many times to define all required aliases.
The axis name must be defined in the D-Buffer. 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
Example 1
An axis name can be used in expressions as a symbolic constant. For example, given the program
includes the declaration:
AXISDEF Q=3
VEL(Q)=1000;
Example 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:
Example 3
Adding (R) to the axis parameter means G-Code run on the axis will ignore the modality entry of G20
in order to support axes driving a rotational motion with G-Code commands.
In this example axis 5 and axis 6 will ignore the modality entry of G20.
2.5.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
number of
Define the number of samples
points
Switches
/switch can be one of the following:
Triggers DC with the execution of the next motion command following the call to
/s DC/s. Motions queued before the call to DC/s will not be recorded. DC synchronized
with motion is called Axis Data Collection (See in ACSPL+ Programmer's Guide).
Create the synchronous data collection, but do not start until GO. Command option
/w
/w can only be used with the /s.
Comments
DC can include up to 24 sampled variables.
Only one DC (system data collection) process can run at the same time.
Up to eight DC/s (axis data collection) processes can be simultaneously executed where each
process fills a separate array.
DC/c does not self-terminate. STOPDC terminates cyclic data collection.
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.
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.
Variable S_ST.#DC = 1 when non-synchronized DC is active.
Variable AST<axis>.#DC = 1 when synchronized DC is active.
To achieve full synchronization the DC/S command should come one line before the motion
command (see the screenshot below).
!samples in ARRAY.
!finished).
STOP
2.5.3 STOPDC
Description
Immediately terminates DC and SPDC.
Syntax
STOPDC[/switch]
Switch
/switch can be:
Comments
> STOPDC with an argument delays termination of DC.
> STOPDC/s terminates synchronous DC initiated by DC/s.
> 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 and .NET Library Methods
DataCollection, StopCollect, WaitCollectEnd
C Library Functions
acsc_DataCollectionExt, acsc_StopCollect, acsc_WaitCollectEnd
Example 1
Example 2
2.5.4 READ
Description
Reads a file from the controller’s nonvolatile (flash) memory to a user defined array, variable, or
struct. The file must exist in the nonvolatile memory by previously writing it using the WRITE
command.
Syntax
READ array[,filename]
READ/s user-variable[, filename]
READ/O user-variable[, filename]
READ/R string[, filename]
READ/SR string[, filename]
Switch
Reads a file from the controller’s nonvolatile (flash) memory to a user defined
/R string array.
The string size must be >= the write string size.
Reads a file from the controller’s nonvolatile (flash) memory to a user defined
/SR string.
The string size must be >= the write string size.
Arguments
user-variable A scalar variable for use with the /s switch, can be either REAL or INT
Comments
1. The filename must not include a file name extension.
2. The filename maximum lenth is 100 chars.
3. The user-array name must be declared in the buffer where the command is executed.
4. The variable name may be declared in the buffer where the command is executed, or it
may be declared in the D-buffer.
5. If READ is executed from the Communication Terminal as a command, array must specify
the name of a global array.
6. If READ/s is executed from the Communication Terminal as a command, variable must
specify the name of a global variable.
7. If the optional file name is not supplied, the variable name will be used as the file name.
The following error is supported:
> Error 3333 “File name MAX length is 100 chars”
Related ACSPL+ Commands
WRITE
COM Library Methods
Transaction
C Library Functions
acsc_Transaction
Examples
2.5.5 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 a 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.
Memory addresses may vary between SPiiPlus products and revisions, so definition of a
variable to represent SP_Address as the return value of GETSPA is highly
recommended. SPDC can then use this variable in any SPiiPlus product or revision.
Switches
Comments
Only one SPDC command per Servo Processor can run at a given time.
Several SPDC commands may be defined with the /w switch.
If the /w switch is specified, the NST.#SPDC bit is not set till data collection actually starts.
If SDPC/w is redefined for a specific node – no error is given, only the parameters are changed.
If data collection is defined for several dsp units with the same array – error 3400 “The Array is
already used by another DC command” is thrown.
The maximum number of data collection commands with suffix /w depend on the number of DSPs
in the configuration
SPDC/w sets NST.#SPDCWAIT to 1 until data collection starts
Table 4-8. Commonly Monitored SPDC Variables
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
Example with /w
STOP
SP_number may be set to 2 at most for most ACS products. The following products support sampling
of up to 4 variables:
> IMDsm
> ECMsm
> UDMsm
> IDMsa
> ECMsa
> UDMsa
Related ACSPL+ Commands
STOPDC
2.5.6 STARTSPDC
Description
The STARTSPDC function starts the SP Data Collection of the nodes that are waiting, having been
called by SPDC/w.
Syntax
STARTSPDC (node0,node1,…node127)
Arguments
Comments
The function initiates SP Data collection for the nodes that are waiting
Sets NST.#SPDC to 1 for all specified nodes
Sets NST.#SPDCWAIT to 0 for all specified nodes
If a node doesn’t have Data Collection waiting, no error is given (this node is ignored).
Example
2.5.7 STOPSPDC
Description
The STOPSPDC function Immediately terminates the data collection of SPDC (Servo processor data
collection) for the specified servo processor.
Syntax
STOPSPDC SP_number
Arguments
Return Value
None
Comments
The following errors are supported:
> 3034 - "Illegal index value"
NST.#SPDC bit is set to off (for the relevant server processor)
This variable is supported in version 3.10 and higher.
Related ACSPL+ Commands
SPDC
Related ACSPL+ Variables
NST.#SPDC
Example
2.5.8 WRITE
Description
Writes an array, scalar or struct (any system or user-defined variable) to a file in the controller’s
nonvolatile (flash) memory.
Syntax
WRITE user-array[, filename]
WRITE/s user-array[, filename]
WRITE/O VarName [,fileName] [,NumOfElements]
WRITE/R user-string[, filename]
WRITE/SR user-string[, filename]
Switch
Arguments
user-array User defined array from which the data will be imported
Comments
1. The nonvolatile memory filename must not include an extension.
2. The user-array or user-variable name must be declared in the buffer where the command
is executed or it may be declared in a D buffer.
2.5.9 SPINJECT
Description
SPINJECT initiates the transfer of MPU real-time data to the Servo Processor.
Syntax
SPINJECT([/switch] Array,Nsamples,Node,Addr1,[Addr2])
Arguments
Switches
/switch can be one of the following:
Cyclic: For each MPU cycle the FW fills CTIME*20 values from the source Array. Once
/c
the end is reached, the process continues from the start.
Comments
Several SPINJECT commands may be defined with the /w switch.
If /w switch is specified, the NST.#SPRT bit is not set until the actual data collection starts.
If SPINJECT/w is redefined for a specific node – no error is thrown, only the parameters are changed.
The maximum number of injection commands with the /w suffix depends on the number of DSPs in
the configuration.
SPINJECT/w sets NST.#SPRTWAIT to 1 until data injection starts
Example
STOP
2.5.10 STARTINJECT
Description
STARTINJECT starts the SP Data Injection of the nodes that are waiting (were called by SPDC/w).
Syntax
STARTINJECT (node0,node1,…node127)
Syntax
STARTINJECT (node0,node1,…node127)
Arguments
Comments
> The function starts SP data injection of the nodes that are waiting
> Sets NST.#SPRT to 1 for all specified nodes
> Sets NST.#SPRTWAIT to 0 for all specified nodes
> If a node doesn’t have Data Injection waiting, no error is given (this node is ignored)
Example
2.5.11 STOPINJECT
Description
STOPINJECT stops active injection process on the given Servo Processor.
Syntax
STOPINJECT Servo_Processor
Arguments
Servo_ Identifies the Servo Processor upon which the injection process is
Processor operating.
Example
STOPINJECT 1
!Stops the injection process on Servo Processor1
2.5.12 SPICFG
Description
SPICFG configures and initializes the SPI interface.
Syntax
SPICFG[/0][/1](SlaveIndex, Mode, NumberOfWords, Polarity,Size,Frequency
Switch
Arguments
The mode of the SPI interface. The following modes are supported:
> 0 - Slave
> 1 - Master
Mode
> 2 - SlaveListenOnly
> 3 - Disable
> 4 - Master Single Transaction (Used by ACSPL+ SPIWRITE)
Clock Polarity.
Four types are available:
> Rising Edge – 0
Polarity
> Rising Edge with Delay – 1
> Falling Edge – 2
> Falling Edge with Delay - 3
2 800
3 1000
4 1500
5 2000
6 2500
7 3000
8 3500
9 4000
10 5000
Return Value
None
Comments
When the SPI interface is not required anymore, SPICFG should be called with Mode=3 (disable)
parameter.
Example
[Link] SPIWRITE
2.5.13 SPIWRITE
Description
SPIWRITE is a function that issues the SPI transaction with the number of SPI words to be sent and
received in a single transaction.
The function may be used in two modes: Slave and Single Master Transaction
Syntax
int SPIWRITE[/0][/1](SlaveIndex, NumberOfWords,SPIDataWrite,SPIDataRead,TimeOut )
Switch
Arguments
Return Value
STATUS value, OK (0) or error.
Comments
Master mode behavior:
The data in the SPIDataWrite arraywritten to the SPI interface.
The SPIDataRead array contains the reply data.
The function blocks until the reply is ready (when number of received words is equal to the
NumberOfWords parameter.
Slave mode behavior:
The data in the SPIDataWrite array is written to the EXTOUT variable (and copied to the SPI
interface). The SPIDataRead array contains the reply data. The function will wait until one of the
following conditions is true:
1. SPIRXN equals to NumberOfWords parameter
2. Timeout is reached
3. Error state is returned The function returns
Example
int SPIDataWrite(8)
int SPIDataRead(8)
int i=0
loop 8
SPIDataWrite(i)=i+1
i=i+1
end
SPIWRITE(0,8,SPIDataWrite,SPIDataRead)
STOP
2.5.14 SPRT
Description
This function starts a real-time data transfer process from the MPU to a given Servo Processor.
Syntax
SPRT[/c] SP, Value_Array, Addr_Array
Switches
/c [Link] each MPU cycle, the firmware fills values from the source arrays.
Arguments
Array of addresses inside that Servo Processor. It must correspond to the float
Addr_Array or integer variable in the Servo Processor's program, as well as to the Value_
Array values order and size.
Comments
The SPRT command cannot be used in parallel with the SPINJECT command for the
same Servo Processor.
The SPRT command can be used for simultaneous and deterministic update of 12-20 Servo
Processor variables at the controller cycle rate.
It is superior to the SETSP command that can only update one Servo Processor variable in each
controller cycle and cannot be used for continuous update (every controller cycle).
For example, assume that the PIV gains (SLPKP, SLVKP, SLIKI) need to be updated simultaneously
and frequently for gain scheduling. Even if the variables are set in the same program line, or with a
block command, the controller still updates one Servo Processor variable every controller cycle. Each
of the parameters SLVKP, SLPKP, SLVKI has three values according to the motion phase (0=motion,
1=idle, 2= settling) and the corresponding idle and settling gains.
If this is not needed, you could simply set the three values equal for each parameter. The update is
completed within several controller cycles, that can influence the system performance.
However, using SPRT, the internal Servo Processor variables can be updated simultaneously within
one cycle.
Note that SPRT affects only Servo Processor variables i.e. corresponding ACSPL+ variables don’t
change.
Example 1
Axis = 0
! Finding the relevant addresses can be done as one time operation
! (No need to re-use GETSPA prior to each update).
BLOCK
! SLPKP=SLPK_value, SLVKP=SLVKP_Value, SLVKI=SLVKI_value must be set
! simultaneously.
! The following lines calculate the corresponding dsp variables:
Example 2
SP = 0;
i = 0;
Value(0) = 0; Value(1) = 19;
Address(0) = GETSPA(SP, "dummy_double[1]");
Address(1) = GETSPA(SP, "dummy_double[2]");
while 1
BLOCK
Value(0) = i
Value(1) = (20 - i)
i = i + 1
IF (i = 20)
i = 0
END
END
END
STOP
Example 3
while 1
BLOCK
Value(0) = i
Value(1) = (20 - i)
i = i + 1
IF (i = 20)
i = 0
END
SPRT SP, Value, Address
END
END
STOP
2.5.15 SPRTSTOP
Description
SPRTSTOP stops an active real-time data transfer process on the given SP (for cyclic command only).
Syntax
SPRTSTOP SP
Arguments
2.5.16 USAGESP
Description
USAGESP is an array of type REAL, for each node in the EtherCAT network. The variable is used for
storing the maximum servo processor usage as a percentage during the preceding controller cycle.
Syntax
usage = USAGESP(axis)
Return Value
Maximum usage, up to 100%
Tag
383
Accessibility
Read-only
Comments
USAGESP stores the maximum DSP USAGE value during one MPU cycle.
This variable is supported by the UDMxx, IDMxx and ECMxx products only.
Command Description
Command Description
Command Description
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
2.6.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.
Syntax
ARC1 axis_list, center-point, final-point, direction[,user-specified velocity]
Arguments
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.
axis_list
A minimum of two axes must be specified.
user-
If MSEG command option /v is used, the user-specified velocity must be the
specified
last parameter in the ARC1 syntax.
velocity
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 in radians. Each command produces the same result, so
selection of either ARC1 or ARC2 depends on the available data.
> 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.
2.6.2 ARC1
Description
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. When ARC1 is used for Extended Motion, it must be
initialized with XSEG...ENDS.
Syntax
ARC1 [/switches] (axis_list), center_point_axis1, center_point_axis2, destination_point_axis1,
destination_point_axis2, [destination_point_axis3, … destination_point_axis6,] direction[, velocity]
[,end_velocity][,time][,values, variables[,index [,masks]]][, lci_segment_active]
Arguments
Argument Description
center_point_
Center point position for the first axis
axis1
center_point_
Center point position for the second axis
axis2
destination_
Destination position of the first axis
point_axis1
destination_
Destination position of the second axis
point_axis2
destination_
point_axis3 Mandatory only if AXIS_LIST contains more than 2 axes.
… Destination position of the rest of axes. Number of destination positions
destination_ must correspond to the number of axes in the AXIS_LIST.
point_axis6
Argument Description
index 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).
For information on optional switches for this command, see Using ARC1, ARC2 and LINE
Switches.
2.6.3 ARC1
This format of ARC1 is used for blended segment motion and in this form must be initialized with
BSEG...ENDS. The command adds to the motion path an arc segment that starts in the current point
and ends in the destination point with the specified center point.
Syntax
ARC1[/switches] (axis_list),
center_point_axis1,center_point_axis2,
destination_point_axis1,destination_point_axis2, direction
[,segment_time [,acceleration_time [,jerk_time [,dwell_time]]]]
Arguments
Argument Commments
2.6.4 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.
Syntax
ARC2 axis_list, center-point, rotation-angle and direction [,user-specified velocity]
Arguments
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.
axis_list
rotation
Rotation is in radians. Use + for motion in the direction of increasing encoder
angle and
counts, or - for motion in the direction decreasing encoder counts
direction
user-
If MSEG command option /v is used, the user-specified velocity must be the
specified
last parameter in the ARC2 syntax.
velocity
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.
See Using ARC1, ARC2 and LINE Switches for details about function switches.
2.6.5 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, [,destination_
point_axis3, …
destination_point_axis6][,velocity][,end_velocity][,time][,values, variables[,index[,masks]]]
[,external_loop_type, external_loop_type, maximum_allowed_deviation][, lci_segment_active]
Arguments
axis_list
A minimum of two axes must be specified.
center_point_
Center point position for the first axis
axis1
center_point_
Center point position for the second axis
axis2
destination_
point_axis3
Mandatory only if axis_list contains more than 2 axes.
… Destination position of the rest of axes. Number of destination positions
must correspond to the number of axes in the axis_list.
destination_
point_axis6
index 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).
minimum_ If the lengths of both segments are more than this value, the skywriting
segment_length algorithm will be applied.
maximum_
The parameter limits the external loop deviation from the defined
allowed_
profile. If the value is negative – no limitation.
deviation
Switches
The following optional /switches may be used singularly or in combination with the ARC2 command:
Synchronize user variables with segment execution. The switch requires additional
/o two or three parameters that specify values, user variable and mask. See details in
Arguments for explanation.
Use external loops at corners. The switch requires additional parameters that
/b specify the external loop type, the minimum segment length, and the maximul
allowed deviation from profile.
2.6.6 ARC2
This format of ARC2 is used for blended segment motion and in this form must be initialized with
BSEG...ENDS. The command adds to the motion path an arc segment that starts in the current point
and specified as the center point and rotation angle.
Syntax
ARC2[/switches] (axis_list),
center_point_axis1,center_point_axis2,
rotation_angle
[,segment_time [,acceleration_time [,jerk_time [,dwell_time]]]]
Arguments
Arguments Comments
2.6.7 BPTP
Description
BPTP defines a motion profile using the MotionBoost Feature.
Syntax
BPTP[/switch] axis_list, destination_point, [value of Vf, value of Tf, motor_motion_delay]
Switches
Arguments Comments
Minimum travel time in seconds, The calculated travel time will be at least
/t
the specified value. Incompatible with the /d switch.
Travel Time – specifies the exact travel time for the motion in seconds.
All other considerations are ignored, which could cause a safety fault
/d
during motion execution.
Incompatible with the /t switch.
User will enter final, nonzero velocity. In single axis motion the sign of the
/f final velocity parameter has no effect, only the absolute value is
considered.
/r Relative motion
/w Create the motion, but to not start until the GO command is issued.
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
/m
motion VEL, ACC, DEC, JERK values. Not compatible with /2 switch. Range
is 0-25 ms.
Use of the /d switch to specify minimum travel time overrides all other parameters
which might limit velocity and requires careful attention to safety considerations.
The BPTP/2 command is limited to at most 2 axes per Servo Processor and at most 4
axes per system.
Arguments
axis_list
destination-point
Value of Tf
Value of Vf
Motion Delay
motor_ (Optional, used only with /q switch) Delay, in milliseconds, before motor
movement_delay motion actually starts.
GPHASE
Two options are available.
> Four phases (For motion in positive direction; for motion in negative direction reverse the
inequality signs)
1. Acceleration buildup
> RJERK>0, RACC>0
2. Acceleration finishing
> RJERK<0, RACC>0
3. Deceleration buildup
> RJERK<0, RACC<0
4. Deceleration finishing
> RJERK>0, RACC<0
Comments
This command is supported in ADK versions 2.70 and higher.
Examples
BPTP 0, 100
BPTP/2 (0,1),1,1
2.6.8 BPTPCalc
Description
The BPTPCALC function calculates and allows the user to set the motion variables according to a
desired motion time. When the travel time and distance are known in advance, the BPTPCALC
should be used to generate new VEL, ACC and JERK values.
Syntax
Arguments
1 - Velocity
Index 2 - Acceleration
3 - Jerk
Comments
This command is supported in ADK versions 2.70 and higher.
Example
enable(0)
STOP
2.6.9 BSEG...ENDS
Syntax
BSEG[/switches] (axis_list), initial_position_axis1, initial_position_axis2, [motor_motion_delay,]
segment_time, acceleration_time, jerk_time[, dwell_time]
Arguments
Arguments Comments
Initial jerk time (Tj) in milliseconds. The specified jerk time will be
jerk_time used for all segments until jerk_time argument is specified in LINE,
ARC1 or ARC2 command.
Switches
Switch Comments
Set the initial axis position as origin. Segment commands positions should be
/r
declared relative to the new origin.
2.6.10 JOG
Description
JOG creates a motion with constant velocity and no defined end point.
JOG motion terminates by:
> HALT, KILL/KILLALL, BREAK, DISABLE/DISABLEALL
> Execution of any other motion command for the same axis
> Limit switch activation
> Any fault activation that disables the drive or kills the motion
Syntax
JOG[/switch] axis_list [,user-specified-velocity][,user-specified-direction]
Arguments
List of axes, valid numbers are: 0, 1, 2, ... up to the number of axes in the
axis_list
system minus 1.
user-
specified- Optional parameter used if the /v command option is specified
velocity
user- Optional parameter. Motion direction is designated by a plus sign (+) for
specified- increasing feedback counts or (–) or decreasing feedback counts. If no
direction operator is used, motion is in the direction of increasing encoder counts.
Switches
/switch can be:
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.
2.6.11 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
List of axes, valid numbers are: 0, 1, 2, ... up to the number of axes in the
system minus 1.
axis_list
A minimum of two axes must be specified.
user specified
Optional user-specified velocity if LINE was initiated by MSEG/v.
velocity
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 Methods" in SPiiPlus COM Library Programmer's Guide.
C Library Functions
See "Points and Segments Manipulation Methods" in SPiiPlus C Library Reference Programmer's
Guide.
Example
See MSEG...ENDS.
2.6.12 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
[,destination_point_axis3 … ,destination_point_axis6][,velocity][,end_velocity][,time][,values,
variables[,index[,masks]]] [,external_loop_type, external_loop_type, maximum_allowed_deviation][
,lci_segment_active]
Arguments
destination_
Destination position of the first axis
point_axis1
destination_
Destination position of the second axis
point_axis2
destination_
point_axis3
Mandatory if axis_list contains more than 2 axes.
… Destination position of the rest of axes. Number of destination positions
must correspond to the number of axes in axis_list.
destination_
point_axis6
index 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).
minimum_ If the lengths of both segments are more than this value, the skywriting
segment_length algorithm will be applied.
maximum_
The parameter limits the external loop deviation from the defined
allowed_
profile. If the value is negative – no limitation.
deviation
Switches
The following optional /switches may be used singularly or in combination with the LINE command:
Synchronize user variables with segment execution. The switch requires additional
/o two or three parameters that specify values, user variable and mask. See details in
Arguments for explanation.
Use external loops at corners. The switch requires additional parameters that
/b specify the external loop type, the minimum segment length, and the maximul
allowed deviation from profile.
2.6.13 LINE
This format of LINE is used for blended segment motion and in this form must be initialized with
BSEG...ENDS. The command adds to the motion path a linear segment that starts in the current point
and ends in the destination point.
Syntax
LINE[/switches] (axis_list),destination_point_axis1,destination_point_axis2
[,segment_time [,acceleration_time [,jerk_time [,dwell_time]]]]
Arguments
Arguments Comments
destination_
Destination position of the first axis
point_axis1
destination_
Destination position of the second axis
point_axis2
Only if the /d switch is specified: Dwell time at the final point of the
dwell_time segment in milliseconds.
With this switch no blending will be done at the segment final point.
2.6.14 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.
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
Arguments
= Assignment operator
MASTER MPOS(0)=5*RVEL(1)
!Creates a master-slave dependency where
!the 0 axis velocity is slaved to five times
Example 2:
Figure 4-7 illustrates SLAVE/pt used in the following syntax example.
In Figure 4-7, 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.
2.6.15 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
ARRAY (3)(5)
See Example 1, illustrating sample code based on the ARRAY (3)(5) structure.
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)
See Example 2, illustrating sample code based on the ARRAY (4)(5) structure.
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)
ARRAY (6)(5)
ARRAY (6)(5)
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)
See Example 3, illustrating sample code based on the ARRAY (7)(5) structure.
6. If MPTP/r enables MPOINT, the array points are relative.
Examples
Example 1
Illustrating sample code based on the ARRAY (3)(5) structure.
Example 2
Illustrating sample code based on the ARRAY (4)(5) structure.
Example 3
Illustrating sample code based on the ARRAY (7)(5) structure.
2.6.16 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.
Transition to the next motion in the motion queue, if it exists, will not occur until ENDS executes.
MPTP terminates with:
> HALT, KILL/KILLALL, or BREAK
> Any fault activation that disables the drive or kills the motion
> DISABLE/DISABLEALL by the user
Syntax
MPTP[/switch] axis_list[,dwell][,motor_motion_delay]
Arguments
List of axes, valid numbers are: 0, 1, 2, ... up to the number of axes in the
axis_list
system minus 1.
motor_motion_ (Optional, used only with /q switch) Delay, in milliseconds, before motor
delay motion actually starts.
Switches
/switch can be:
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/KILLALL, or BREAKto stop cyclic motion.
Related ACSPL+ Commands
GO, HALT, KILL/KILLALL, BREAK, IMM, MPOINT, POINT
Related ACSPL+ Variables
ACC, DEC, JERK, VEL
COM Library Methods and .NET Library Methods
ToPoint, ToPointM, ExtToPoint, ExtToPointM
C Library Functions
acsc_ToPoint, acscToPointM, acsc_ExtToPoint, acsc_ExtToPointM
Examples
Example 1:
In the following example, dwell is not required, therefore the comma and the second argument
following 1000 are omitted.
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 4-8 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.
Example 3:
Figure 4-9 illustrates the above code for two-axis group motion initiated by MPTP/v.
2.6.17 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
> 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.
Arguments
Axes list, valid numbers are: 0, 1, 2, ... up to the number of axes in the
axis_list
system minus 1.
initial-position
Start coordinate for the first axis
axis1
initial-position-
Start coordinate for the second axis
axis2
Switches
/switch can be:
Comments
> 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/KILLALL, or BREAK to end cyclic motion.
> If command option /v is used, specify the user-defined velocity in each instance of LINE,
ARC1, or ARC2.
> The MSEG command uses a motion que buffer of up to 50 segments.
Related ACSPL+ Commands
GO, HALT, KILL/KILLALL, 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: acsc_FinalPoint
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 -p 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
2.6.18 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
Axes list, valid numbers are: 0, 1, 2, ... up to the number of axes in the system
axis_list
minus 1.
motor_
(Optional, used only with /q switch) Delay, in milliseconds, before motor
motion_
motion actually starts.
delay
Switches
Use the point sequence as a cyclic array. After arriving at the last point, continue
/c
from the first point.
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 and .NET 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.
2.6.19 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, orPVSPLINE...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
Example 2
Example 3
Example 4
Example 5
2.6.20 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
Transformation
Defines the new plane
Matrix
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 and .NET 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 4-
12.
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.
X 1 0
A 0 1
B 0 2.74
Figure 4-13 illustrates the reference position of axes 0, 4, and 5 (corresponding to the XAB
coordinates illustrated in Figure 4-12).
Figure 4-14 illustrates the circle's trajectory viewed from the XA plane.
2.6.21 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:
> Any fault activation that disables the drive or kills the motion
> User termination by HALT, KILL/KILLALL, or BREAK.
Syntax
PTP[switches]axis_list, destination-point[,value for v, value for f, motor_movement_delay]
Arguments
Single axis or axis group, valid numbers are: 0, 1, 2, ... up to the number of
axis_list
axes in the system minus 1.
destination
Final destination.
point
motor_
(Optional, used only with /q switch) Delay, in milliseconds, before motor
movement_
motion actually starts.
delay
Switches
Specify non-zero velocity at each destination point (or points) in a series of PTP
/f
motions
Use the motion profile values of the axis group as a whole, rather than those of
/m the leading axis, without exceeding any of the defined axes motion VEL, ACC, DEC,
JERK values.
Comments
> Axes destination points, and relative velocity in the PTP command can also be an
expression.
> 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.
> In single axis PTP motion, the final velocity (indicated by the /f switch) may be negative. In
this case, the motion terminates at the specified coordinate with a velocity opposite to the
motion direction.
> In single axis PTP motion, if the motion is in the negative direction, GVEL can be negative.
Related ACSPL+ Commands
MPTP...ENDS, POINT
COM Library Methods and .NET 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, 2000 !PTP axes 0 and 1 where the 0 target point is
!1000 and the 1 target point is 2000.
!The target points are relative to the start
!point. Motion will not commence until GO
!command is issued.
Example 3:
2.6.22 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
Single axis or axis group, valid numbers are: 0, 1, 2, ... up to the number of
axis_list
axes in the system minus 1.
motor_ (Optional, used only with /q switch) Delay, in milliseconds, before motor
motion_delay motion actually starts.
Switches
Non-uniform time interval: time interval is specified for each point along with the
/t
point coordinates
Perform the point sequence as a cyclic array-after the last point, start the motion
/c
again from the first point.
Comments
> Since the time interval and the destination point are defined, variables VEL, ACC, DEC, and
JERK have no effect on PVSPLINE.
> If PVSPLINE motion is ended with HALT, the controller does not follow the motion trajectory
during deceleration.
> 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, see Example 5.
Related ACSPL+ Commands
POINT, MPOINT
COM Library Methods and .NET Library Methods
Spline, SplineM, AddPVPoint, AddPVPointM, AddPVTPoint, AddPVTPointM
C Library Functions
acsc_Spline, acsc_SplineM, acsc_AddPVPoint, acsc_AddPVPointM, acsc_AddPVTPoint, acsc_
AddPVTPointM
Example
2.6.23 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/KILLALL, BREAK
> DISABLE/DISABLEALL to the SLAVE axis.
> Setting the logical dependence between master and slave axes to zero. For example
MASTER MPOS(0)=0
Syntax
SLAVE[/switches] axis[,lower boundary, upper boundary]
Arguments
lower Optional argument used for setting the lower boundary of master-
boundary dependent SLAVE motion.
upper Optional argument used for setting the upper boundary of master-
boundary dependent SLAVE motion.
Switches
Comments
> When /p is used, the controller first initiates velocity lock. Only after the achieving velocity
lock the controller will engage position lock.
> If no command option is specified, the default mode is velocity lock.
Related ACSPL+ Commands
MASTER, GO, HALT, KILL/KILLALL, DISABLE/DISABLEALL
Related ACSPL+ Variables
XSACC, MFF, JERK, ACC, VEL APOS
2.6.24 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
Single axis or axis group, valid numbers are: 0, 1, 2, ... up to the number of axes in
axis_list
the system minus 1.
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.
2.6.25 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) for the motion axis involved in a track
motion, except the case when the next motion is a group motion.
> Any fault activation that disables the drive or kills the motion.
> User termination by HALT, KILL/KILLALL, or DISABLE/DISABLEALL
Syntax
TRACK [/switch] axis, [motor_motion_delay]
Arguments
motor_motion_ (Optional, used only with /q switch) Delay, in milliseconds, before motor
delay motion actually starts.
Switch
/switch can be:
Comments
> 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.
> TRACK is for single axis motion only.
> TPOS is updated every controller cycle.
Related ACSPL+ Commands
PTP
COM Library Methods and .NET Library Methods
Track
C Library Functions
acsc_Track
Example
2.6.26 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 segments where required velocity violates axis velocity,
acceleration and jerk limits
> Building a velocity profile using multi-segment look-ahead algorithm
> Corner rounding using different criteria
> Support of up to 6 axes
> Support for "Skywriting" - external loops at corners
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[,initial_position_axis3...,initial_
position_aixs6],
[,velocity][,end_velocity][,junction_velocity][,angle][,curvature_velocity][,deviation][,radius]
[,maximal_length]
[,motor_movement_delay]
[,external_loop_type, minimum_segment_length, maximum_allowed_deviation]
[ ,output_index] [ , bit_number] [ ,polarity] [, starvation_margin] [ ,segments_buffer]
Segment commands (ARC1, ARC2, LINE)
ENDS
Arguments
initial_position_
Initial position of the first axis.
axis1
initial_position_
Initial position of the second axis.
axis2
initial_position_
axis3... Mandatory only if axis_list contains more than 2 axes. Number of initial
initial_position_ positions must correspond to the number of axes in axis_list.
axis6
curvature_ [Optional, only used with switch /d] Defines required velocity at
velocity curvature discontinuity points. See Switches explanation for details.
[Optional, only used with /h switch] Defines the maximal length of the
segment for smoothing processing. If the length of a segment that
maximal_length
formed a corner exceeds the specified maximal length, the corner will
not be smoothed.
motor_
(Optional, used only with /q switch) Delay, in milliseconds, before motor
movement_
motion actually starts.
delay
Switches
There are three types of optional switches:
> General
> Velocity look-ahead
> Geometry look-ahead
The controller processes the specified switches in the following order:
1. The controller checks and applies geometry look-ahead options.
2. The controller checks and applies velocity look-ahead options.
Switches from different groups can be applied together. For example, it's possible to specify a
velocity at curvature discontinuity points (switch /d) together with permitted deviation (switch /g).
In this case, the controller first applies corner rounding for the trajectory and then calculates velocity
profile for already processed trajectory.
Optional switches are for use only with the XSEG command:
General
Velocity look-ahead
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
/j 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, a, d, and y are not specified, the controller provides
automatic calculation of the corner processing.
Geometry look-ahead
Use a corner rounding option with the specified permitted deviation The
switch requires additional parameter that specifies maximal allowed
/g
deviation of motion trajectory from the corner point. The switch cannot
be specified together with switches /u and /h
Use a corner rounding option with the specified permitted curvature The
switch requires additional parameter that specifies maximal allowed
/u
rounding radius of the additional segment The switch cannot be
specified together with switches /g and /h
XSEG without switches does not require any additional parameters except the initial
point coordinates, for example, XSEG (0,1),0,0 creates segmented motion for axes 0 and
1 with initial point (0,0) with required velocity derived from the axis 0.
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.
The following options are supported:
Exact path: 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 4-
17).
Permitted deviation: the user specifies the motion trajectory maximum permitted deviation from
the corner point. The controller inserts an additional segment in the corner so that the resulting path
is smooth and complies with the maximum deviation.
Permitted radius: the user specifies the additional segment maximum permitted rounding radius.
The controller inserts an additional segment in the corner so that the resulting path is smooth and
complies with the maximum permitted radius.
Corner smoothing: the user specifies the smoothing maximum segment length. The controller
applies smoothing if the length of both segments in the pair is less than the maximum segment
length.
Figure 4-18 illustrates the permitted deviation, permitted radius and corner smoothing options.
Figure 4-18. Corner Processing - Permitted Deviation, Permitted Radius and Corner Smoothing
Options
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.
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 750 bytes, so if it is necessary to
allocate a buffer for 200 segments, it should be at least 750 * 200 = 150,000 bytes. The following
declaration defines a 150,000 bytes buffer:
real buf(18750)
See XARRSIZE for details of how to declare a buffer with more than 100000 elements
Examples
Example 1:
Example 2:
The XSEG command creates the segment motion. The motion does not start when processing
reaches the XSEG command. Actual motion starts once the previous motion ends and one or more
segments are added. The four segment commands in example 2 specify the following path:
Example 3:
iXaxis = 0
iYaxis = 1
XSEG (iXaxis,iYaxis),0,0,,buf
LINE (iXaxis,iYaxis),1000,1000
LINE (iXaxis,iYaxis),1001,1001
LINE (iXaxis,iYaxis),1002,1002
!..... Add more segments .....
ENDS (iXaxis,iYaxis)
STOP
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.
2.6.27 NURBS
Description
Creates NURBS motion.
Syntax
NURBS[/switches] (axis_list)[,velocity][,exc_angle][,exc_length][,segments_buffer][ ,motor_motion_
delay]
Arguments
motor_motion_ (Optional, used only with /q switch) Delay, in milliseconds, before motor
delay motion actually starts.
Switches
Comments
At least 4 points must be declared for a NURBS command to work.
The first NPOINT command must define the starting point of the
NURBS motion.
Return Value
None
Example 1
NURBS/V(0,1), 100
NPOINT (0,1), 4.0, -6.0 ! the first point must be the motion
! starting position
NPOINT (0,1), -4.0, 1.0
NPOINT (0,1), -1.5, 5.0
NPOINT (0,1), 0.0, 2.0
NPOINT (0,1), 1.5, 5.0
NPOINT (0,1), 4.0, 1.0
NPOINT (0,1), -4.0, -6.0
ENDS (0,1)
Example 2
ENDS(0,1)
STOP
2.6.28 NPOINT
Description
Add next control point and knot
Syntax
NPOINT[/switches](axis_list),coordinates,[,velocity][,knot][,weight][,segment_velocity][, lci_
segment_active]
Arguments
The list of coordinate values separated by commas. The list must specify
coordinates one value for each axis in axis_list. The list defines coordinates of one
control point of the spline.
Optional, only used with switch /v. The value changes the required
velocity velocity. The new value is valid for all spline segments after the
corresponding control point.
Switches
This switch works like /p for LINE/ARC1/ARC2 inside the XSEG block. Namely, it
/p changes the LCI gating state at the beginning of segment. This switch is applicable
starting from third segment till third segment from the end.
Return Value
None
The first NPOINT command must define the starting point of the
NURBS motion.
2.6.29 SPATH
Description
Initiate a path smoothing motion.
Syntax
SPATH [/switches] (axis_list) ), starting_coordinates[,velocity][,exc_angle][,exc_length][,segments_
buffer][ ,motor_motion_delay]
Arguments
motor_motion_ (Optional, used only with /q switch) Delay, in milliseconds, before motor
delay motion actually starts.
Switches
Acceleration consideration.
G Allow the motion generator to deviate from the specified axes acceleration
parameter during velocity profile generation.
Return Value
None
Comments
This command is supported in version 3.10 and higher.
At least 4 segments must be declared for an SPATH command to work.
Example
ENDS(0,1)
STOP
2.6.30 SEGMENT
Description
Add a new control point to the SPATH motion generator
Syntax
SEGMENT[/switches](axis_list),coordinates[,velocity][,segment_velocity][, lci_segment_active]
Arguments
velocity The value changes required velocity from this point forward. The new
value is valid for all spline segments after the corresponding control
point.
Switches
This switch works like /p for LINE/ARC1/ARC2 inside the XSEG block. Namely, it
/p changes the LCI gating state at the beginning of segment. This switch is applicable
starting from third segment till third segment from the end.
Return Value
None
Comments
This command is supported in version 3.10 and higher.
2.6.31 SMOVE
The SMOVE command provides for positioning to specific target. SMOVE commands work in
sequence and the next SMOVE command changes the previous target and provide a smooth
transition from one motion direction to another, based on ACC, DEC and JERK values. The motion
profile is optimized to pass on a rounded path near the breaking point, minimizing changes in speed
and direction that would cause unwanted vibrations in the system.
Syntax
Arguments
All SMOVE commands in the sequence must have the same axis_list parameter.
Switches
Example
Arguments
Switches
/w Create the motion, but do not start until the GO command is issued
Comments
SPTP looks like the PTP command. Unlike PTP, SPTP uses a 4th order motion profile.
The SPTP command can take either a single axis or an axis group as a parameter.
Example
Synchronize user variables with segment execution. The switch requires additional
/o
two or three parameters that specify values, user variable and mask.
Specify segment processing time The switch requires an additional parameter that
specifies the segment processing time in milliseconds. Unlike the required velocity
/t specification, the segment processing time defines velocity at the current segment
only, and has no effect on the subsequent segments. The switch cannot be
specified together with /V.
Use external loops at corners. The switch requires additional parameters that
specify the external loop type, the minimum segment length, and the maximum
allowed deviation from profile.
/b The /b switch may be defined with other corner processing options (/u, /g, etc.) .
If the Skywriting algorithm is applied, other corner processing options are skipped.
If Skywriting is skipped, other defined corner options will be applied.
This switched is used for Extended Motion only ( initialized with XSEG...ENDS)
For ARC1, ARC2, and LINE some switches require an additional parameter to be specified. If more
than one parameter is required, the parameters should be separated by a comma, and the order of
parameters is fixed in the following order:
1. Required velocity (used with /V)
2. Final velocity (used with /F)
3. Segment processing time (used with /T)
4. /O requires specification of the values, variables, and mask parameters
5. /B requires specification of the External Loop Type, Minimum Segment Length, and
Maximum Allowed Deviation parameters
6. /P requires specification of the lci_segment_active parameter
Examples:
LINE/v (1,0), 1000, - Add line segment with end point (1000, -1000) and segment velocity
1000, 500 500.
arc1/vf (0,1), 0, 0,
Add arc segment with center (0,0), end point (100,100), clockwise
100, 100, +, 500,
direction, segment velocity 500 and end velocity 100
100
int Value(1)
int Mask(1)
Value(0) = 1; Mask Add arc segment with center (0,0) and 180 degree (π) angle. At the
(0) = 5 beginning of the segment execution, sets bit 0 and reset bit 2 of digital
outputs OUT(2).
ARC2/o (0,1), 0, 0,
3.141529, Value,
OUT, 2, Mask
Assignment
Assigns values
Command
IF, ELSEIF,
IF command structure.
ELSE...END
SWITCH
SWITCH statement controlling program flow depending on value
Statement
Arguments
Can be:
> Name of ACSPL+ standard or user-defined variable
variable_ > An element of an ACSPL+ or user array
name
> One bit of integer variable or integer array element (applicable only
to those variables having specifically named bits, for example,
IMASK)
Can be of integer or real type. The value argument can either be:
value > 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
Examples
!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
2.7.2 BLOCK...END
Description
Commands specified within the BLOCK...END structure are executed in one MPU cycle.
Syntax
BLOCK
command-list
END
Arguments
Comments
> 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.
> 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.
> The BLOCK ... END code executes in the cycle tick of the previous command
Example
2.7.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
2.7.4 GOTO
Description
GOTO transfers program execution to a particular point in the program specified by a unique label.
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
Comments
> A label specified by GOTO must be defined somewhere in the same program buffer.
> The next executed command is located after the label.
Related ACSPL+ Commands
CALL
Example
Syntax IF Structure
Syntax IF Structure
Comments
> 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.
> The IF-ELSEIF-END, and IF-ELSEIF- ELSE -END forms provide validation of a sequence of
conditions.
> 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:
> Condition after IF
> Condition after first ELSEIF
> 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.
Example 2:
The following program fragment implements a saturation effect by limiting variable V0 to a range
from -256 to +256.
2.7.6 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.
Comments
> If the expression result is zero or negative, the command list is not executed and the
program continues from the next line after END.
> If the expression result is not an integer the command rounds-off the number to the closest
integer.
Examples
Example 1:
Example 2:
Example 3:
2.7.7 FASTLOOP...END
Description
This command block defines a loop that to be executed in a single cycle. Exceptions to this behavior
that may occur in a BLOCK...END structure may also occur in a FASTLOOP.
The FASTLOOP...END syntax is the same as that of BLOCK...END.
Comments
Example
index=index+1;
END
time=TIME-time; !Time difference
DISP ("Time of normal LOOP:"), time;
index=index+1;
END
time=TIME-time; !Time difference
DISP ("Time of FASTLOOP:"), time;
STOP
2.7.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.
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/STOPALL.
Syntax
ON condition
auto_routine body
RET
Comments
> Once the buffer in which an autoroutine is compiled, that autoroutine is enabled.
> 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.
> 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.
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.
2.7.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
Example 2:
Example 3
2.7.10 WAIT
Description
WAIT delays program execution for the specified number of milliseconds.
Syntax
WAIT wait_time
Arguments
Defines how long to delay the program execution. wait_time can also be
wait_time
defined by an expression.
Example 2:
2.7.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
Example 2:
Example 3:
SWITCH (intVar - 2)
CASE 20 :
DISP "CASE 20"
END;
CASE 21: !comment
DISP "CASE 21";
! No break
DEFAULT:
DISP "DEFAULT";
END
END
STOP
Command Description
Command Description
2.8.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
2.8.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
2.8.3 PAUSE
Description
PAUSE suspends program execution in a specific buffer.
Syntax
PAUSE buffer-number
Arguments
buffer- A number between 0 and 63 specifying the buffer in which the program is to
number be suspended.
2.8.4 RESUME
Description
RESUME resumes the program execution in a specific buffer after the execution was paused.
Syntax
RESUME buffer-number
Arguments
buffer- A number between 0 and 63 specifying the buffer in which the program
number execution that was suspended by the PAUSE command is to resumed.
2.8.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[/s] buffer-number, line-number | label
Arguments
buffer-
A number between 0 and 63 specifying the buffer.
number
line-number The line number of the program within the buffer where execution is to
| label begin, or a label identifying the line number.
Switches
Switch Comments
The "/s" switch causes the program to execute from the beginning in
simulation mode up to the indicated line or label, after which execution
/s continues normally. No motion is executed up to that point, but G-Code
modality changes are registered. Execution continues normally from the
indicated line or label, including motion commands.
Comments
> 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.
> 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.
> The program activated by START executes concurrently with the program containing the
START command, and other active programs.
> If the whole program needs to be run in simulation mode, for early run-time problem
detection for example, the START/s command can be used without specifying a line
number or label argument.
> Simulation mode does not affect ACSPL+ lines, which will run normally.
Related ACSPL+ Commands
STOP/STOPALL, BREAK
Examples
Example 1:
Example 2:
1 !Buffer 0
2 ENABLE(X,Y)
3 N20 G00 X0
4 N30 G01 X20 F2000
5 N40 G01 X10
6 N50 G01 X20
7 !Radius compensation
8 N10 G42 D10
9 RC:
10 N60 G01 X0
2.8.6 STOP/STOPALL
Description
STOP terminates program execution in the specified buffer. STOPALL terminates program execution
in all buffers.
Syntax
STOP buffer-number
Arguments
buffer- A number between 0 and 63 specifying the buffer in which the program
number execution is to be halted.
2.9.1 EIPGETATTR
Description
EIPGETATTR returns value of a specific attribute. It can be a class attribute or an instance attribute.
Syntax
int eipgetattr(int class, int instance, int attr)
Arguments
0x01 Identity
0x04 Assembly
For the class attribute, this parameter should 0. Otherwise, the specific
instance should be specified as follows
0x01 1
0x02 1
0x06 1
0xF5 1
0xF6 1
0x04
0x64
0x65
Attributes Attributes
0x01 1 1,2,3,4,5,6
0x02 1 2
0x06 1 1..8
Attr
0xF4 1,2,3 1
0xF5 1 1,2
0xF6 1 1,7,8
0x04 1
0x64 1,100
0x65 1
Return Value
Returns value of a specific attribute.
-1 is returned in case of illegal parameters.
2.9.2 EIPGETIND1
Description
EIPGETIND1returns the first index of the requested ACSPL+ standard or user-defined variable in a
one-dimensional array. The indexes start from 0.
Syntax
int eipgetind1(int instance, int element )
Arguments
Return Value
0 is returned in case of scalar variable.
-1 is returned in case of illegal index parameter.
2.9.3 EIPGETIND2
Description
EIPGETIND2 returns the first index of the requested ACSPL+ standard or user-defined variable in a
two-dimensional array. The indexes start from 0.
Syntax
int eipgetind2(int instance, int element)
Arguments
Return Value
0 is returned in case of scalar variable or one-dimensional array.
-1 is returned in case of illegal index parameter.
2.9.4 EIPGETTAG
Description
EIPGETTAG returns the tag number of requested ACSPL+ standard or user-friendly variable. User-
friendly variables tags start from index 1000.
Syntax
int eipgettag(int instance, int element)
Arguments
Return Value
-1 is returned in case of illegal index parameter.
2.9.5 EIPSETASM
Description
EIPSETASM sets the assembly configuration.
Syntax
eipsetasm(int instance, int element,int tag, int first, int second )
Arguments
Command Description
2.10.1 INSHAPEON
Description
The INSHAPEON function starts Input Shape algorithm for specified axis. The result is a dynamic
output signal equal to the convolution of the input signal and the convolution pulses.
Syntax
INSHAPEON Axis_Index, T_array, A_array
Arguments
Return Value
None
Comments
Vectors T_array and A_array define characteristics of the convolution pulses. The array sizes should
be identical.
Vector T_array contains real numbers, so fractional numbers may be specified. However, the
position of each pulse is rounded to a multiple of the controller cycle. If the controller cycle is one
millisecond, the numbers in T_array are rounded to integers. The elements of T_array must be
arranged in ascending order.
The sum of A_array entries must equal 1.
See Using the Convolve Web Site in the ACSPL+ Programmers Guide for an explanation of how to
calculate the T_array and A_array parameters.
This function is supported in version 3.00 and higher.
Examples
enable 0
InShapeOn 0, CnvT, CnvA
ptp/e 0,0
ptp/e 0,50
till ^MST(0).#MOVE
InShapeOff 0
stop
!In this case we need to multiply CnvT array by CTIME. Here CTIME = 0.5
global real CnvT(5), CnvA(5), CnvB(420)
CnvT(0)=0*CTIME; CnvT(1)=1*CTIME ; CnvT(2)=214*CTIME ;CnvT(3)=253*CTIME;
CnvT(4)=501*CTIME
CnvA(0)=22960/1e5; CnvA(1)=10361/1e5; CnvA(2)=3186/1e5; CnvA
(3)=45767/1e5;
CnvA(4)=17726/1e5
enable 0
InShapeOn 0, CnvT, CnvA
ptp/e 0,0
ptp/e 0,30
till ^MST(0).#MOVE
!InShapeOff 0
stop
2.10.2 INSHAPEOFF
Description
The INSHAPEOFF function stops the Input Shape algorithm for the specified axis.
Syntax
INSHAPEOFF Axis_Index
Arguments
Comments
This variable is supported in version 3.00 and higher.
Return Value
None
3. ACSPL+ Variables
ACSPL+ supports data types of integer, real, and matrix. Matrix variables are a two-dimensional
array of real values.
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
> 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
Axis Configuration -
BOFFTIME Brake Deactivation Time
Brake
Axis Configuration -
BONTIME Brake Activation Time
Brake
Axis Configuration -
CERRA Critical Position Error in Accelerating
Safety Limits
Axis Configuration -
CERRI Critical Position Error in Idle
Safety Limits
Axis Configuration -
CERRV Critical Position Error in Moving
Safety Limits
System
CFG Configuration Mode
Configuration
System
CTIME Controller Cycle Time
Configuration
Axis Configuration -
DELI Delay on Transition to Idle State
Safety Limits
Axis Configuration -
DELV Delay on Transition to Velocity State
Safety Limits
Axis Configuration -
E_AOFFS Sets user-defined offset for absolute encoder.
Feedback
Axis Configuration -
E_FREQ Primary Encoder Frequency
Feedback
Axis Configuration -
E_SCMUL Primary Encoder Sin-Cos Multiplier
Feedback
Axis Configuration -
E_TYPE Primary Encoder Type
Feedback
Axis Configuration -
E2FAC Secondary Encoder Factor
Feedback
Axis Configuration -
E2OFFS Secondary Encoder Offset
Feedback
Axis Configuration -
E2_PAR_A Sets the encoder data transmission frequency
Feedback
Axis Configuration -
E2_PAR_B Sets the encoder data control CRC code
Feedback
Axis Configuration -
E2_PAR_E Defines a mask for setting error bits
Feedback
Axis Configuration -
EFAC Primary Encoder Factor
Feedback
Axis Configuration -
EOFFS Primary Encoder Offset
Feedback
Axis Configuration -
ERRA Position Error in Accelerating
Safety Limits
Axis Configuration -
ERRI Position Error in Idle
Safety Limits
Safe
FAULT Faults
ty Control
Axis Configuration -
FVFIL Primary Feedback Velocity Filter
Feedback
System
GPEXL Indicates the GSP program executed block
Configuration
System
IENA Interrupt Enable/Disable
Configuration
System
IMASK Interrupt Mask
Configuration
System
ISENA Specific Interrupt Enable/Disable
Configuration
Program Execution
ONRATE Autoroutine Rate
Control
Program Execution
PCHARS Program Size in Characters
Control
Program Execution
PERL Program Error Line
Control
Program Execution
PERR Program Error
Control
Program Execution
PEXL Program Executed Line
Control
Program Execution
PFLAGS Program Flags
Control
Program Execution
PLINES Program Size in Lines
Control
Program Execution
PRATE Program Rate
Control
Program Execution
PST Program State
Control
Axis Configuration -
RVFIL Reference Velocity Filter
Feedback
System
S_FLAGS System Flags
Configuration
System
S_SETUP Bit mask defining various system settings
Configuration
Axis Configuration -
SCCOFFS Sin-Cos Offset (Cosine)
Feedback
Axis Configuration -
SCGAIN Cosine gain compensation
Feedback
Axis Configuration -
SCPHASE Cosine phase compensation
Feedback
Axis Configuration -
SCSOFFS Sin-Cos Offset (Sine)
Feedback
Axis Configuration -
SLABITS Absolute Position Bits
Feedback
Servo-Loop -
SLAFF Acceleration Feed Forward
Compensations
Servo-Loop -
SLBIASA Current Phase A Bias
Current
Servo-Loop -
SLBIASB Current Phase B Bias
Current
Servo-Loop -
SLCROUT Commutation Feedback
Miscellaneous
Servo-Loop -
SLDRAIF DRA frequency
Position
Servo-Loop -
SLDRAIF Provides an Idle Factor to the SLDRA variable.
Position
Servo-Loop -
SLDRX Maximum DRA correction
Position
Servo-Loop -
SLDZMAX Maximum Dead Zone position
Nanomotion
Servo-Loop -
SLDZMIN Minimum Dead Zone position
Nanomotion
Axis Configuration -
SLEBIASA Defines encoder hardware Sine offset
Feedback
Axis Configuration -
SLEBIASB Defines encoder hardware Cosine offset
Feedback
Servo-Loop -
SLFRC Static Friction
Compensations
Servo-Loop -
SLFRCD Dynamic Friction
Compensations
Servo-Loop -
SLIFILT Internal Current filter
Current
Servo-Loop -
SLIKI Integrator Gain
Current
Servo-Loop -
SLIKP Integrator Proportional Gain
Current
Servo-Loop -
SLIFILT Internal Current filter
Current
Servo-Loop -
SLILI Determines output voltage
Current
Servo-Loop -
SLIOFFS Current Command Offset
Current
SLLROUT Sets the HW limits routing for the specified axis Commutation
Servo-Loop -
SLPKITF Increases position loop integrator coefficient
Position
Servo-Loop -
SLPKP Proportional Position Gain
Position
Servo-Loop -
SLPKPIF Provides an Idle Factor to the SLPKP variable
Position
Servo-Loop -
SLPKPSF Provides a Settling Factor to the SLPKP variable
Position
Servo-Loop -
SLPKPTF Increases position loop proportional coefficient
Position
Servo-Loop -
SLPROUT Position Feedback Routing
Miscellaneous
Servo-Loop -
SLVKI Velocity Integrator Coefficient
Velocity
Servo-Loop -
SLVKIIF Provides an Idle Factor to SLVKI variable
Velocity
Servo-Loop -
SLVKISF Provides a Settle Factor to the SLVKI variable
Velocity
Servo-Loop -
SLVKITF Increases velocity loop integrator coefficient
Velocity
Servo-Loop -
SLVKP Proportional Velocity Gain
Velocity
Servo-Loop -
SLVKPIF Provides an Idle Factor to the SLVKP variable
Velocity
Servo-Loop -
SLVKPSF Provides a Settle Factor to the SLVKP variable
Velocity
Servo-Loop -
SLVLI Integrator Velocity Limit
Velocity
Servo-Loop -
SLVRAT Velocity Feed Forward Ratio
Velocity
Servo-Loop -
SLZFF Defines zero velocity feed forward position
Nanomotion
Axis Configuration -
VELBRK Brake Velocity
Brake
Axis Configuration -
XACC Maximum Acceleration
Safety Limits
Axis Configuration -
XCURI Maximum Current in Idle
Safety Limits
Axis Configuration -
XCURCDB Threshold of the current vector peak
Safety Limits
Axis Configuration -
XCURV Maximum Current in Moving
Safety Limits
Axis Configuration -
XRMS RMS Current Limit
Safety Limits
Axis Configuration -
XRMST RMS Current Time Constant
Safety Limits
Axis Configuration -
XSACC Maximum Slave Acceleration
Safety Limits
Axis Configuration -
XVEL Maximum Velocity
Safety Limits
Name Description
Name Description
3.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
Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number
axis_index
of axes in the system minus 1.
#NOS 0 No S-Profile
#SEMIS 1 Semi-S-Profile
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
3.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/ENABLE ALL.
Syntax
ENTIME(axis_index) = value
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
37
Comments
Since the drive enable process is relatively long, (50 - 100msec) ENTIME defines a time duration in
msec between ENABLE/ENABLE ALL 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
3.1.3 ESTBITS
Description
ESTBITS is an integer array with one element for each axis. It represents the single turn resolution
(number of bits) of the absolute encoder.
Syntax
ESTBITS(axis_index)
Arguments
Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index
axes in the system minus 1.
Tag
387
Comments
The ESTBITS variable can only be set by the ENCINIT() function.
Related ACSPL+ Variables
EMTBITS, SLABITS
Accessibility
Read-only
3.1.4 E2STBITS
Description
E2STBITS is an integer array with one element for each axis. It represents the single turn resolution
(number of bits) of the absolute encoder for the secondary feedback.
Syntax
E2STBITS(axis_index)
Arguments
Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index
axes in the system minus 1.
Tag
389
Comments
The E2STBITS variable can only be set by the ENCINIT() function.
Related ACSPL+ Variables
E2MTBITS, SLABITS
Accessibility
Read-only
3.1.5 EMTBITS
Description
EMTBITS is an integer array with one element for each axis. It represents the multi-turn resolution
(number of bits) of the absolute encoder.
Syntax
EMTBITS(axis_index)
Arguments
Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index
axes in the system minus 1.
Tag
388
Comments
The EMTBITS variable can only be set by the ENCINIT() function.
Related ACSPL+ Variables
ESTBITS, SLABITS
Accessibility
Read-only
3.1.6 E2MTBITS
Description
E2MTBITS is an integer array with one element for each axis. It represents the multi-turn resolution
(number of bits) of the absolute encoder for the secondary feedback.
Syntax
E2MTBITS(axis_index)
Arguments
Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index
axes in the system minus 1.
Tag
390
Comments
The E2MTBITS variable can only be set by the ENCINIT() function.
Related ACSPL+ Variables
E2STBITS, SLABITS
Accessibility
Read-only
3.1.7 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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
87
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
MFF values cannot be modified if protection is applied to this variable through SPiiPlus
MMI Application Studio g Toolbox g Application Development g Protection
3.1.8 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
Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number
axis_index
of axes in the system minus 1.
bit_designator The MFLAGS bit designators are given in MFLAGS Bit Designators.
#FASTSC 18
Bit must be set to 1 in the middle of
quadrant.
24 N/A
Tag
88
Comments
MFLAGS is typically configured using the SPiiPlus MMI Application Studio g Toolbox g Setup g
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
C Library Functions
acsc_ReadInteger, acsc_WriteInteger
3.1.9 MFLAGSX
Description
MFLAGSX 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. It is an extension of the MFLAGS variable.
Syntax
MFLAGSX(Axis_Index).bit_designator = 0|1
Arguments
Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number
Axis_Index
of axes in the system minus 1.
Tag
357
Comments
When saturation protection (MFLAGSX.#SATPROT=1) is currently available for the following
products: NPMpm, UDMxx, IDMxx.
This variable is supported in ADK versions 2.70 and higher.
Related ACSPL+ Variables
SLSKI, SLSKP, SLSDZ
Accessibility
Read-Write
3.1.10 MODULOMD
Description
MODULOMD is an integer array, with one element for each axis in the system, the elements of which
are used for storing the mode of a modulo axis.
Syntax
MODULOMD(axis_index) = mode
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
mode Internal calculations will determine that the target position is (30 + 570)
% 360 = 240, motion will be in positive direction passing through 180
point to 240.
> 2 (Positive motion only) - Every Motion Command (excluding Jog) will
cause the Axis to move in the positive Direction to the modulo of the
Target Position. This also applies to motion commands that exceed the
range set by SLPMAX(axis_index) and SLPMIN(axis_index).
Example 1:
Assume SLPMIN(axis_index)=0 and SLPMAX(axis_index)=360, FPOS
(axis_index) is reported as 30, and a relative point to point command is
issued:
Example 2:
Assume SLPMIN(axis_index)=0 and SLPMAX(axis_index)=360, FPOS
(axis_index) is reported as 30, and a point-to-point command is issued:
PTP axis_index, 20
> 3 (Negative motion only) - Every Motion Command (excluding Jog) will
cause the Axis to move in the negative direction to the modulo of the
target position. This also applies to motion commands that exceed the
Modulo range as set by SLPMAX(axis_index) and SLPMIN(axis_index).
Example:
Assume SLPMIN(axis_index)=0 and SLPMAX(axis_index)=360, FPOS
(axis_index) is reported as 30, and a Relative point-to-point command
is issued:
Example 2:
Assume SLPMIN(axis_index)=0 and SLPMAX(axis_index)=360, FPOS
(axis_index) is reported as 30, and a point-to-point command is issued:
PTP axis_index, 0
Tag
417
Comments
The MFLAGS(axis).#MODULO bit needs to be set(1) for the axis to operate as a modulo axis.
All motion commands are calculated such that the resulting motion spans less than the Modulo
range (SLPMAX(axis) – SLPMIN(axis)).
Axis modulo mode will not change the EPOS value as it does for RPOS and FPOS.
If an axis modulo mode has been turned off (MFLAGS(axis).#MODULO=0), then, EPOS is updated
with the current FPOS value (by definition, EPOS = FPOS in a non-modulo mode).
Related ACSPL+ Variables
SLPMIN, SLPMAX, MFLAGS.#MODULO
Accessibility
Read-Write
COM Library Methods and .NET Library Methods
ReadVariable(), WriteVariable()
C Library Function
acsc_ReadInteger(), acsc_WriteInteger()
3.1.11 PEGQUE
Description
PEGQUE is an integer array with one element for each PEG engine in the system, the elements of
which store the current state of PEG FIFO for that engine (the items count in the FIFO) . The
parameter is updated as long as its value is different from 0.
Syntax
PEGQUE
Arguments
Tag
371
Comments
This variable is supported in version 3.00 and higher.
Accessibility
Read-Only
COM Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger
3.1.12 SETTLE
Description
SETTLE is a real array, with one element for each axis in the system, and is used for setting the
Settling Time. SETTLE and TARGRAD affect the state of MST(axis_index).#INPOS.
Syntax
SETTLE(axis_index) = value
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
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
3.1.13 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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
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
3.1.14 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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
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
3.1.15 STEPF
Description
STEPF is a real array, with one element for each axis in the system, and is used for defining the ratio
between user units and one stepper pulse. See the SPiiPlus Setup Guide , Stepper Drive section for
more information.
Syntax
STEPF(axis_index) = value
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 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
STEPF values cannot be modified if protection is applied to this variable through SPiiPlus
MMI Application Studio g Toolbox g Application Development g Protection
3.1.16 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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
130
Comments
The value defines the width of the pulses generated on the pulse output for stepper control.
Accessibility
Read-Write
3.1.17 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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 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.
Name Description
Set the supplier for the mechanical break output signal of an axis as a
MBRKROUT
specified digital output bit
3.2.1 BOFFTIME
Description
BOFFTIME is a real array, with one element for each axis in the system, and is used for specifying the
brake release time in milliseconds.
Syntax
BOFFTIME(axis_index) = value
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
9
Accessibility
Read-Write
Comments
See the ACSPL+ Programmer's Guide for information about using a mechanical brake on system
startup.
Related ACSPL+ Commands
ENABLE/ENABLE ALL - The brake is deactivated automatically when the ENABLE command is
executed.
Related ACSPL+ Variables
MFLAGS
COM Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal
3.2.2 BONTIME
Description
BONTIME is a real array, with one element for each axis in the system, and is used for specifying the
brake engagement time in milliseconds.
Syntax
BONTIME(axis_index) = value
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
10
Accessibility
Read-Write
Comments
See the ACSPL+ Programmer's Guide for information about using a mechanical brake on system
startup.
Related ACSPL+ Commands
DISABLE/DISABLEALL, FCLEAR, DISABLEALL
3.2.3 MBRKROUT
Description
MBRKROUT is an integer array, with one element for each axis in the system, and is used for setting
the supplier for the mechanical brake output signal of an axis as a specified digital output bit(ACSPL+
OUT).
Syntax
MBRKROUT(Axis_Index) = value
Arguments
Designates the specific axis. Valid numbers are: 0, 1, 2, ... up to the number of
Axis
axes in the system minus 1.
Tag
381
Comments
This variable can be saved to flash memory. In other words, the mapping of a mechanical brake
output using this variable will automatically occur on controller boot without the need to
reconfigure it .
The following errors are supported:
> Error 3330: “Invalid value, digital output index should range between 0-99 and bit index
should range between 0-31”
> Error 3332: “This output is already mapped as a mechanical brake to a different axis”
> The ACSPL+ variable bit MFLAGS(Axis_Index). #BRAKE should be set to 1 in order to enable
the mechanical brake for the specified axis.
If a mechanical brake is already defined for a specific axis (meaning that MBRKROUT(axis) is not -1 or
-2), and the user wants to set a different brake for the axis (meaning to change MBRKROUT(axis)
value): the user must first revert the output to standard digital output (MBRKROUT(axis)=-2), and
then define the new brake routing (MBRKROUT(axis)=output_value).
This variable is supported in V3.03 and higher.
Examples
Suppose the UDMmc driver is used as Node 0 on the network. There are 4 brakes in this driver.
Accessibility
Read-Write
COM Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal
3.2.4 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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
140
Comments
If MFLAGS(axis_index).#DBRAKE 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
Name Description
Name Description
Name Description
3.3.1 E_AOFFS
Description
E_AOFFS is an integer array, with one element for each axis in the system, and is used for setting
user-defined offset for absolute encoder.
Comments
Modifying E_AOFFS causes absolute encoder initialization.
The EOFFS variable is being modified according to E_AOFFS’ value:
EOFFS=EOFFS-E_AOFFS.
Tag
300
Accessibility
Read-Write
Com Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger
3.3.2 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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
27
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
3.3.3 E2_AOFFS
Description
E2_AOFFS is an integer array, with one element for each axis in the system, and is used for setting
user-defined offset for absolute encoders for the secondary feedback.
Comments
Modifying E2_AOFFS causes absolute encoder initialization.
The E2OFFS variable is modified according to E2_AOFFS’ value:
E2OFFS=EOFFS-E2_AOFFS.
Tag
377
Accessibility
Read-Write
Com Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger
3.3.4 E2_FREQ
Description
E2_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) for secondary feedback.
Syntax
E2_FREQ(axis_index)=value
Arguments
axis_ Designates the specific axis, valid numbers are: 0,1,2,… up to the number of
index axes in the system minus 1.
Tag
303
Comments
The encoder is represented in the controller as a synchronous machine that is activated by a clock,
with programmable frequency in the SPiiPlus processor.
E2_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 E2_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 E2_FREQ that does not generate an Encoder Error FAULT.
In case of an Encoder Error, FCLEAR(axis_index) command should be executed and a higher E2_FREQ
value should be set.
For more information, see the "Encoder Input Clock" section in the SPiiPlus Setup Guide.
Accessibility
Read-Write
Com Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger
3.3.5 E_FLAGS
Description
E_FLAGS is an integer array, with one element for each axis in the system. Each element contains
different configuration bits for absolute encoder.
Syntax
E_FLAGS(axis_index) = value Arguments
Arguments
Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number
axis_index
of axes in the system minus 1.
Comments
#ERRLOGIC defines the status bits logic (0 or 1). The default value is 0. The Encoder 1 Error (#ENC) bit
of the ACSPL+ FAULTS variable is triggered if the error is latched (based on the error bit logics).
If E_PAR_E is not set (0), #ERRLOGIC’s value has no meaning.
#UNSIGNED defines the Absolute Encoder Position mode. It can be unsigned (1) or signed (0). The
default mode is signed for backward compatibility.
#INVERSE
When the bit is ON, the DSP is being notified and sends the position inverted. FW inverts the EOFFS
variable as well.
The bits applies for all types of encoders.
The bit change event causes the FW to reinitialize the absolute encoder.
The bit cannot be changed if the axis is enabled.
Changing this bit may require changing the drive polarity (MFLAGS bit 13) or repeat commutation.
In case of a brushless motor, after the bit is changed the commutation will no longer be correct and
the user should repeat the Adjuster commutation.
In case of a brush motor, the user should re-verify the drive polarity in the Adjuster by running Open
Loop Verification.
Failure to repeat the Adjuster Commutation and Open Loop Verification may result
critical position error, over current faults and in certain cases motor run away.
Tag
268
Accessibility
Read-Write
COM Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteg
3.3.6 E2_FLAGS
Description
E2_FLAGS is an integer array, with one element for each axis in the system. Used for the secondary
feedback. Each element contains different configuration bits for absolute encoder, in current version
it includes 3 bits.
#ERRLOGIC defines the logics of the status bits – can be 0 or 1. If E2_PAR_E is not set (value equals to
0), ERRLOGIC value has no meaning. The default value is 0. Encoder 1 Error (#ENC) bit of the ACSPL+
FAULTS variable is triggered if error is latched (based on the error bit logics).
#UNSIGNED defines the Absolute Encoder Position mode – can be unsigned (1) or signed (0). The
default mode is signed for backwards compatibility.
#INVERSE defines if the position is inverted on the DSP level. If the bit is set, the DSP sends the
position inverted. FW inverts EOFFS variable.
Arguments
The specific axis index. Valid numbers are: 0,1… up to the number of axes
axis
in the system, minus 1.
Tag
309
Comments
The bits applies for all types of encoders.
The bit change event causes the FW to reinitialize the absolute encoder.
Accessibility
Read-Write
Com Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger
3.3.7 E_PAR_A
Description
E_PAR_A is used for setting the encoder data transmission actual frequency in MHz. It is a double
array, with one element for each axis in the system.
Syntax
E_PAR_A(axis) = value
Arguments
The specific axis index. Valid numbers are: 0, 1... up to the number of axes in the
axis
system, minus 1.
value The encoder data transmission actual frequency in MHz ranging from 1.25 to 10.
For the IDMsm/ECMsm/UDMsm products using the EnDAT encoder, only the following
values are allowed for the value parameter: 0.1, 0.2, 1, 2, 4, 8, 16.
This variable is supported only for BiSS encoders (in all products) and EnDAT encoders
(IDMsm/ECMsm/UDMsm products only).
Tag
248
Accessibility
Read-Write
COM Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal
3.3.8 E2_PAR_A
Description
E2_PAR_A is used for setting the encoder data transmission actual frequency in MHz. it is a double
array, with one element for each axis in the system. Used for Secondary Feedback.
Syntax
E2_PAR_A (axis_index)=value
Arguments
Designates the specific axis, valid numbers are: 0,1,2,… up to the number of
axis
axes in the system minus 1.
value The encoder data transmission actual frequency in MHz ranging from 1.25 to 10.
For the IDMsm/ECMsm/UDMsm products using the EnDAT encoder, only the following
values are allowed for the value parameter: 0.1, 0.2, 1, 2, 4, 8, 16.
This variable is supported only for BiSS encoders (in all products) and EnDAT encoders
(IDMsm/ECMsm/UDMsm products only).
Tag
304
Accessibility
Read-Write
Com Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger
3.3.9 E_PAR_B
Description
E_PAR_B is used for setting the encoder data control CRC code. It is an integer array, with one
element for each axis in the system.
Syntax
E_PAR_B(axis) = value
Arguments
The specific axis index. Valid numbers are: 0, 1... up to the number of axes in the
axis
system, minus 1.
value The encoder data control CRC code ranging from 0 to 255.
Tag
267
Accessibility
Read-Write
COM Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger
3.3.10 E2_PAR_B
Description
E2_PAR_B is used for setting the encoder data control CRC code. it is an integer array, with one
element for each axis in the system. Used for Secondary Feedback.
Syntax
E2_PAR_B (axis_index)=value
Arguments
Designates the specific axis, valid numbers are: 0,1,2,… up to the number of
axis
axes in the system minus 1.
Tag
305
Accessibility
Read-Write
Com Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger
3.3.11 E_PAR_C
Description
E_PAR_C is used for setting the interval (in microseconds) of encoder position reading. It is an
integer array, with one element for each axis in the system. The default value is 0 which means 50
microseconds.
Syntax
E_PAR_C(axis) = value
Arguments
The specific axis index. Valid numbers are: 0, 1... up to the number of axes in the
axis
system, minus 1.
value The interval of encoder position reading in microseconds, valid range [0,..3]
Valid Values
0 50 microseconds
1 100 microseconds
2 200 microseconds
3 400 microseconds
Tag
258
Accessibility
Read-Write
COM Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger
3.3.12 E2_PAR_C
Description
E2_PAR_C is used for setting the interval (in microseconds) of encoder position reading. it is an
integer array, with one element for each axis in the system. Used for Secondary Feedback. The
default value is 0 which means 50 microseconds.
Syntax
E2_PAR_C (axis_index)=value
Arguments
Designates the specific axis, valid numbers are: 0,1,2,… up to the number of
axis
axes in the system minus 1.
value The interval of encoder position reading in microseconds valid range [0,..3]
Valid Values
0 50 microseconds (default)
1 100 microseconds
2 200 microseconds
3 400 microseconds
Tag
306
Accessibility
Read-Write
Com Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger
3.3.13 E_PAR_D
Description
E_PAR_D defines number of status bits (LSB) in the real-time position data (SLABITS). The status bits
include warning and error bits. These bits are not part of the real-time position.
E_PAR_D is represented as an integer array with the size of maximum axes; each element for each
axis in the system. The default value is 0 which means no status bits at all. Maximum value is 16.
Syntax
E_PAR_D(axis) = value
Arguments
The specific axis index. Valid numbers are: 0, 1... up to the number of axes in the
axis
system, minus 1.
Tag
266
Accessibility
Read-Write
COM Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger
3.3.14 E2_PAR_D
Description
E2_PAR_D defines number of status bits (LSB) in the real-time position data. The status bits include
warning and error bits. These bits are not part of the real-time position. it is an integer array, with
one element for each axis in the system. Used for Secondary Feedback. The default value is 0 which
means no status bits at all. Maximum value is 16.
Syntax
E2_PAR_D (axis_index)=value
Arguments
Designates the specific axis, valid numbers are: 0,1,2,… up to the number of
axis
axes in the system minus 1.
Tag
307
Accessibility
Read-Write
Com Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger
3.3.15 E_PAR_E
Description
E_PAR_E defines a mask for setting error bits. It is an integer array, with one element for each axis in
the system. The default value is 0, which means no error bit is set. All bits that are not defined in the
mask but covered by E_PAR_D are considered as warning bits.
Syntax
E_PAR_E(axis) = value
Arguments
The specific axis index. Valid numbers are: 0, 1... up to the number of axes in the
axis
system, minus 1.
Error bits MASK; minimum value is 0 (default – no error bits). The range is [0,2E_
value PAE_D-1]
Tag
267
Accessibility
Read-Write
COM Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger
3.3.16 E2_PAR_E
Description
E2_PAR_E defines a mask for setting error bits. It is an integer array, with one element for each axis
in the system. Used for the secondary [Link] default value is 0, which means no encoder
error will be triggered. All bits that are not set in the mask but covered by E2_PAR_D are defined as
warning bits.
Syntax
E2_PAR_E (axis_index)=value
Arguments
Designates the specific axis, valid numbers are: 0,1,2,… up to the number of
axis
axes in the system minus 1.
Error bits MASK; minimum value is 0 (default – no error bits). The range is
value
[0,2E2_PAR_D-1]
Tag
308
Accessibility
Read-Write
Com Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger
3.3.17 E_SCMUL
Description
E_SCMUL is an integer array, with one element for each axis in the system, and is used for specifying
the SinCos multiplication factor for the encoder. The value specifies the multiplication factor as a
power of 2. The maximum value of 16 indicates a multiplication factor of 65536 = 216; the minimum
value of 2 indicates a multiplication factor of 4 = 22.
Syntax
E_SCMUL(axis_index) = value
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
28
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
3.3.18 E2_SCMUL
Description
E2_SCMUL is an integer array, with one element for each axis in the system, and is used for
specifying the SinCos multiplication factor for the encoder. Used for secondary feedback. The value
specifies the multiplication factor as a power of 2. The maximum value of 16 indicates a
multiplication of 65536 = 216; the minimum value of 2 indicates a multiplication factor of 4 = 22.
Syntax
E2_SCMUL (axis_index)=value
Arguments
axis_ Designates the specific axis, valid numbers are: 0,1,2,… up to the number of
index axes in the system minus 1.
Tag
30
Comments
E2_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
Com Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger
3.3.19 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
Designates the specific axis, valid numbers are: 0,1,2,… up to the number of
axis
axes in the system minus 1.
Tag
29
Comments
The most common encoder type is quadrature, which corresponds to the default value 3.
A value of 2 is supported by the following products:
> UDMlc-x-048 (where x is either 2 or 4)
> UDIlt-x / UDIhp-x (where x is either 2 or 4)
A value of 9 is supported only by the following products:
> SPiiPlus CMnt-x-320 (where x is either 1 or 2)
> UDMpm-x-320 (where x is either 1 or 2)
A value of 18 is supported by the following products:
> UDMnt-x (where x is either 1 or 2)
> UDIhp-x (where x is either 2 or 4)
As a configuration variable, the variable can be changed only if the controller is in configuration
mode.
The following table summarizes various combinations of E_TYPE and E2_TYPE values and whether
they are compatible with Mult-Channel Feedback support
3 - Quadrature 4 - SinCos ✓
4 - SinCos 3 - Quadrature ✓
3 - Quadrature 3 - Quadrature ✓1
4 - SinCos 4 - SinCos X
1This is a dummy configuration. It may not be applied to a driver but it is an allowed state during
transition between allowable multi-channel configurations.
C Library Functions
acsc_ReadInteger, acsc_WriteInteger
3.3.20 E2_TYPE
Description
E2_TYPE is an integer array, with one element for each axis in the system, and is used for defining
the encoder type for the secondary feedback on multi-channel connections.
Syntax
E2_TYPE(axis_index)=value
Arguments
Designates the specific axis, valid numbers are: 0,1,2,… up to the number of
axis
axes in the system minus 1.
Tag
31
Comments
See E_TYPE for Multi-channel feedback support details.
Accessibility
Read-Write
Com Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger
3.3.21 EFAC
Description
EFAC is a real array, with one element for each axis in the system, and is the factor used to convert
the raw primary feedback in encoder counts to user units.
The value ranges between 1-15 to 1+15 (the default value is 1).
Syntax
EFAC(axis_index) = value
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 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 g
Toolbox g Setup g Adjuster during the setup procedure of the system.
Accessibility
Read-Write
EFAC values cannot be modified if protection is applied to this variable through SPiiPlus
MMI Application Studio g Toolbox g Application Development g Protection
3.3.22 E2FAC
Description
E2FAC is a real array, with one element for each axis in the system, and is the factor used to convert
the raw secondary feedback in encoder counts to user units.
The value ranges between 1-15 to 1+15 (the default value is 1).
Syntax
E2FAC(axis_index) = value
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 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
g Toolbox g Setup g Adjuster during the setup procedure of the system.
Accessibility
Read-Write
E2FAC values cannot be modified if protection is applied to this variable through SPiiPlus
MMI Application Studio g Toolbox g Application Development g Protection
3.3.23 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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
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 and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadReal
3.3.24 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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
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 and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadReal
3.3.25 EPOS
Description
EPOS is a real array, one element for each feedback, and is used for showing the encoder feedback.
Not affected by Gantry mode.
Comments
EPOS value is affected by ACSPL+ SET command only when applied to FPOS variable with the same
index (a relevant offset is being added to EPOS value).
EPOS variable can be useful for displaying the encoder position in Gantry mode.
Tag
299
Accessibility
Read only
Com Library Methods and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadInteger
3.3.26 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.
Syntax
FVFIL(axis_index) = value
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
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 = ∆*((100 - FVFIL)/100) + FVELn-1*(FVFIL/100)
Accessibility
Read-Write
FVFIL values cannot be modified if protection is applied to this variable through SPiiPlus
MMI Application Studio g Toolbox g Application Development g Protection
3.3.27 F2ACC
Description
F2ACC 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. Used for secondary feedback.
Tag
317
Accessibility
Read-Only
Com Library Methods and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadReal
3.3.28 HOMEDEF
Description
HOMEDEF is an integer array with one element for each axis in the system, and defines the default
homing method for an axis used by the ACPSL+ HOME command.
Default value is 0, and should be set to a valid homing method number.
Syntax
HOMEDEF(Axis_Index) = Value
Arguments
Axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
Index axes in the system minus 1.
1 Homing Method 1: Homing on the negative limit switch and index pulse
50 Homing Method 50: Negative Hard Stop and index pulse (ACS Specific)
51 Homing Method 51: Positive Hard Stop and index pulse (ACS Specific)
TAG
358
Comments
HOMEDEF should be used with the HOME command. HOME(<axis>) will use the homing method
based on HOMEDEF variable.\
Related ACSPL+ Commands
HOME
Accessibility
Read-Write
.NET Library Method
ReadVariable(), WriteVariable()
C Library Function
acsc_ReadInteger(), acsc_WriteInteger()
3.3.29 HOMEVELI
Description
HOMEVELI is a double array with one element for each axis in the system, and defines the default
homing velocity used for index search during ACPSL+ HOME command.
Default value is 0. If the value is 0, the velocity is calculated based on the HomingVel parameter.
Syntax
HOMEVELI(Axis_Index) = Value
Arguments
Axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
Index axes in the system minus 1.
Tag
360
Comments
HOMEVELL should be used with the HOME command. The following homing methods are affected
by this parameter: 17,18,33,34,50,51
This variable is supported in version 3.00 and higher.
Related ACSPL+ Commands and Variables
HOME, HOMEDEF, HOMEVELL
Accessibility
Read-Write
.NET Library Method
ReadVariable(), WriteVariable()
C Library Function
acsc_ReadInteger(), acsc_WriteInteger()
3.3.30 HOMEVELL
Description
HOMEVELL is a double array with one element for each axis in the system, and defines the default
homing velocity used for limit search during ACPSL+ HOME command. Default value is 0.
If the value is 0, the velocity is calculated based on the HomingVel parameter.
Syntax
HOMEVELL(Axis_Index) = Value
Arguments
Axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
Index axes in the system minus 1.
Tag
366
Comments
HOMEVELL should be used with the HOME command. The following homing methods are affected
by this parameter: 1,2,17,18
This variable is supported in version 3.00 and higher.
Related ACSPL+ Commands and Variables
HOME, HOMEDEF, HOMEVELI
Accessibility
Read-Write
.NET Library Method
ReadVariable(), WriteVariable()
C Library Function
acsc_ReadInteger(), acsc_WriteInteger()
3.3.31 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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
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
RVFIL values cannot be modified if protection is applied to this variable through SPiiPlus
MMI Application Studio g Toolbox g Application Development g Protection
3.3.32 SCSOFFS
Description
SCSOFFS is a real array, with one element for each axis in the system, and is used for defining a Sin-
Cos encoder’s software compensation for the Sine offset.
Syntax
SCSOFFS(axis_index) = value
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
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
3.3.33 SCCOFFS
Description
SCCSOFFSis a real array, with one element for each axis in the system, and is used for defining a Sin-
Cos encoder’s software compensation for the Cosine offset.
Syntax
SCCOFFS(axis_index) = value
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
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
3.3.34 SC2COFFS
Description
SC2COFFS is a real array, with one element for each axis in the system, and is used for defining the
Sin-Cos Cosine offset. Used for secondary feedback.
Syntax
SC2COFFS (axis_index)=value
Arguments
axis_ Designates the specific axis, valid numbers are: 0,1,2,… up to the number of
index axes in the system minus 1.
Tag
311
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
Com Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal
3.3.35 SC2GAIN
Description
SC2GAIN 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. Used for secondary feedback.
Syntax
SC2GAIN (axis_index)=value
Arguments
axis_ Designates the specific axis, valid numbers are: 0,1,2,… up to the number of
index axes in the system minus 1.
Tag
312
Accessibility
Read-Write
Com Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal
3.3.36 SC2PHASE
Description
SC2PHASE 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. Used for Secondary Feedback.
Syntax
SC2PHASE (axis_index)=value
Arguments
axis_ Designates the specific axis, valid numbers are: 0,1,2,… up to the number of
index axes in the system minus 1.
value value in degrees, the value ranges between -15 and 15; default is 0.
Tag
313
Accessibility
Read-Write
Com Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal
3.3.37 SC2SOFFS
Description
SC2SOFFS is a real array, with one element for each axis in the system, and is used for defining the
Sin-Cos Sine offset. Used for secondary feedback.
Syntax
SC2SOFFS (axis_index)=value
Arguments
axis_ Designates the specific axis, valid numbers are: 0,1,2,… up to the number of
index axes in the system minus 1.
Tag
314
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
Com Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal
3.3.38 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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
value value designates the offset ranging from -50 to 50; Default: 0.
Tag
164
Comments
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
Analyzer 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. Then during verification phase new value for SCSOFFS is found and
stored along with previously found SLEBIASA.
Accessibility
Read-Write
COM Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal
3.3.39 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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
value value designates the offset ranging from -50 to 50; Default: 0.
Tag
165
Comments
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
analyzer 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. Then during verification phase new value for SCCOFFS is found and
stored along with previously found SLEBIASB.
Accessibility
Read-Write
COM Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal
3.3.40 SLEBIASC
Description
SLEBIASC is a real array, with one element for each axis in the system, and is used for defining the
Sin-Cos encoder’s hardware compensation for the Sine offset. Used for secondary feedback.
Syntax
SLEBIASC (axis_index)=value
Arguments
axis_ Designates the specific axis, valid numbers are: 0,1,2,… up to the number of
index axes in the system minus 1.
value value designates the offset ranging from -50 to 50; default: 0.
Tag
315
Accessibility
Read-Write
Com Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal
3.3.41 SLEBIASD
Description
SLEBIASD is a real array, with one element for each axis in the system, and is used for defining the
Sin-Cos encoder’s hardware compensation for the Cosine offset. Used for secondary feedback.
Syntax
SLEBIASD (axis_index)=value
Arguments
axis_ Designates the specific axis, valid numbers are: 0,1,2,… up to the number of
index axes in the system minus 1.
value value designates the offset ranging from -50 to 50; default: 0.
Tag
316
Accessibility
Read-Write
Com Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal
3.3.42 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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
220
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, the turn resolution bits, and the number of status bits.
Absolute encoders typically include two status bits (Warning and Error), which should be taken into
account.
Examples:
Rotary encoder with 17 bits turn resolution and 16 bits multi-turn resolution:
SLABITS = 17+16 = 33
Rotary encoder with 17 bits turn resolution, 16 bits multi-turn resolution, and 2 status bits:
SLABITS = 17+16+2 = 35
Linear Encoder with 32 bits absolute resolution and 2 status bits:
SLABITS = 32+2 = 34
The number of status bits may vary for different encoders, so the user should take care to add the
correct number of status bits for the specific encoder in use.
Accessibility
Read-Write
3.3.43 S2LABITS
Description
S2LABITS 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 connected to a secondary
feedback.
Syntax
S2LABITS(axis_index)=value
Comments
S2LABITS 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, the turn resolution bits, and the number of status bits.
Absolute encoders typically include two status bits (Warning and Error), which should be taken into
account.
Examples:
Rotary encoder with 17 bits turn resolution and 16 bits multi-turn resolution:
S2LABITS = 17+16 = 33
Rotary encoder with 17 bits turn resolution, 16 bits multi-turn resolution, and 2 status bits:
S2LABITS = 17+16+2 = 35
Linear Encoder with 32 bits absolute resolution and 2 status bits:
S2LABITS = 32+2 = 34
The number of status bits may vary for different encoders, so the user should take care to add the
correct number of status bits for the specific encoder in use.
Tag
310
Accessibility
Read-Write
Com Library Methods and .NET Library Methods
ReadVariable, Write Variable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger
3.3.44 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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
204
Comments
The value of SCGAIN is normally set by the SPiiPlus MMI Application Studio Sin Cos Encoder Analyzer
tool routine when calculating the optimum encoder compensation.
Accessibility
Read-Write
COM Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger
3.3.45 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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index 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
Analyzer tool routine when calculating the optimum encoder compensation.
Accessibility
Read-Write
COM Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger
Name Description
NST Status of EtherCAT Sync and GPRT errors for each axis in the system.
RMS current
ROFFS Reads the offset calculated by the controller in the connect formula.
3.4.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
Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number
of axes in the system minus 1.
axis_index
In the case of bit 2 (#PEGREADY) this parameter designates the PEG
engine, not the axis.
0: modulation is off
#LCMODUL 22
1: modulation is active
0: hold is off
#HOLD 24
1: hold is in progress
Tag
7
Accessibility
Read-Only
Related ACSPL+ Commands
MASTER, SLAVE
Related ACSPL+ Variables
MST
COM Library Methods and .NET Library Methods
ReadVariable, GetAxisState
C Library Functions
acsc_ReadInteger, acsc_GetAxisState
3.4.2 ASTX
Description
ASTX is an extension of the AST variable. It 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]ASTX(axis_index).bit_designator
Tag
437
Accessibility
Read-only
3.4.3 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 [Link] variable operates in
connection with IST(axis_index).#IND.
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
IND values cannot be modified if protection is applied to this variable through SPiiPlus
MMI Application Studio g Toolbox g Application Development g Protection
3.4.4 E2IND
Description
E2IND is a real array, with one element for each axis in the system, the elements of which store the
position of the last encountered secondary encoder index in user-defined units. The variable
operates in connection with IST(axis_index).#IND2.
Tag
72
Comments
After power-up, IST(axis_index).#IND2 is reset and the value of E2IND is undefined because an
index capture has not yet occurred. When the motor encounters an encoder index, IST(axis_
index).#IND2 is raised and the current FPOS position is latched to E2IND.
Subsequent index values are ignored as long as #IND2 remains raised.
To resume the latching logic IST(axis_index).#IND2 must be explicitly cleared by the command IST
(axis_index).#IND=0.
Accessibility
Read-Only
E2IND values cannot be modified if protection is applied to this variable through SPiiPlus
MMI Application Studio g Toolbox g Application Development g Protection
3.4.5 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
Arguments
Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number
axis_index
of axes in the system minus 1.
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.
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 and .NET Library Methods
ReadVariable, WriteVariable, GetIndexState, ResetIndexState
C Library Functions
acsc_ReadInteger, acsc_WriteInteger, acsc_GetIndexState, acsc_ResetIndexState
3.4.6 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
Comments
After power-up IST(axis_index).#MARK2 is reset and the value of M2ARK is undefined. When the
motor encounters a MARK2 signal, the bit is raised and the current F2POS 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 IST(axis_index). #MARK2 = 1.
To resume the latching logic, IST(axis_index). #MARK2 must be explicitly cleared with the command
IST(axis_index). #MARK2=0.
Example
Accessibility
Read-Only
Related ACSPL+ Variables
IST, FPOS,F2POS, MARK
IST, FPOS, F2POS, MARK
COM Library Methods and .NET Library Methods
ReadVariable, GetIndexState,
C Library Functions
acsc_ReadReal, acsc_GetIndexState
3.4.7 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 IST(axis_index).#MARK= 1.
To resume the latching logic, IST(axis_index).#MARK must be explicitly cleared with the command
IST(axis_index).#MARK=0.
MARK values cannot be modified if protection is applied to this variable through SPiiPlus
MMI Application Studio g Toolbox g Application Development g Protection.
Example
Accessibility
Read-Only
Related ACSPL+ Variables
IST, FPOS, F2POS, IND, M2ARK, IENA
COM Library Methods and .NET Library Methods
ReadVariable, GetIndexState
C Library Functions
acsc_ReadReal, acsc_GetIndexState
3.4.8 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 5-8, for the given axis.
Syntax
MST(node_index).bit_designator = 1|0
Arguments
Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number
axis_index
of axes in the system minus 1.
0: motor is disabled
#ENABLED 0
1: motor is enabled.
Tag
90
Accessibility
Read-Only
Related ACSPL+ Commands
All motion commands.
Related ACSPL+ Variables
FPOS, F2POS, APOS, RPOS
COM Library Methods and .NET Library Methods
ReadVariable, GetMotorState
C Library Functions
acsc_ReadInteger, acsc_GetMotorState
Example
WHILE MST(0).#MOVE
WAIT 300
3.4.9 RMSM
Description
RMSM is a real array with one element for each axis in the system, the elements of which store the
motor RMS current for an axis (in % of drive peak). The value ranges between 0 and 100.
Tag
363
Comments
This variable is supported in ADK versions 2.70 and higher.
Accessibility
Read-Only
ACSPL+ Variables
XRMSM, XRMSTM
COM Library Methods and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadReal
3.4.10 RMSD
Description
RMSD is a real array, with one element for each axis in the system, the elements of which store the
drive RMS current for an axis (in % of drive peak). The value ranges between 0 and 100.
Tag
362
Comments
This variable is supported in ADK versions 2.70 and higher.
Accessibility
Read-Only
Related ACSPL+ Variables
XRMSD, XRMSTD
COM Library Methods and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadReal
3.4.11 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.
An axis not associated to a physical drive will have a high Servo Processor Alarm fault.
Syntax
NST(node_index).bit_designator = 1|0
Arguments
Designates the specific node, valid numbers are: 0, 1, 2, ... up to the number
node_index
of nodes in the system minus 1.
Tag
229
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.
The following commands will cause the NST.#SPRT bit to be 1:
> SPINJECT
> SPRT
> ASSIGNPEG/f
> BPTP/2 (20 kHz motion profile)
> FOLLOW (in case of customized servo algorithm for 20 kHz motion profile)
SPINJECT, SPRT, ASSIGNPEG/f, BPTP/2 and FOLLOW are mutually exclusive, meaning only one of the
features can be active at the given time. So the NST.#SPRT bit should be checked before using any
of these commands.
FCLEAR for any axis associated with the node axis will reset all bits of the NST variable of that node.
#SPDCWAIT is set to 1 if SPDC/w command for relevant node is sent.
#SPDCWAIT is set back to 0 when STARTSPDC for the relevant node is sent, or if STOPDC for relevant
node is sent.
#SPRTWAIT is set to 1 if SPINJECT/w command for relevant node is sent.
#SPRTWAIT is set back to 0 when STARTINJECT for the relevant node is sent, or if STOPINJECT for
relevant node is sent.
Accessibility
Read-Only
COM Library Methods and .NET Library Methods
ReadInteger
C Library Functions
acsc_ReadInteger
3.4.12 AMEST
Description
AMEST is an integer array with an element for each axis in the system. It is updated after each
READ or WRITE to an AME device, and contains the device status word.
If the READ/WRITE operation is successful, the status word should contain the value 0x2 (POWER bit
on).
Status Word
Tag
386
Accessibility
Read-Only
Name Description
Name Description
3.5.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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
11
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
g Toolbox g Setup g Adjuster during the setup procedure of the system.
Accessibility
Read-Write
3.5.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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
12
Comments
As a configuration variable, the CERRI value is normally defined by SPiiPlus MMI Application Studio
g Toolbox g Setup g Adjuster during the setup procedure of the system.
Accessibility
Read-Write
CERRI values cannot be modified if protection is applied to this variable through SPiiPlus
MMI Application Studio g Toolbox g Application Development g Protection
3.5.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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
13
Comments
As a configuration variable, the CERRV value is normally defined by SPiiPlus MMI Application Studio
g Toolbox g Setup g Adjuster during the setup procedure of the system.
Accessibility
Read-Write
3.5.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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
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).
DELV affects the following faults:
> FAULT(axis_index).#PE
> FAULT(axis_index).#CPE
Accessibility
Read-Write
DELV values cannot be modified if protection is applied to this variable through SPiiPlus
MMI Application Studio g Toolbox g Application Development g Protection
3.5.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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
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:
> FAULT(axis_index).#PE
> FAULT(axis_index).#CPE
> XCURI(axis_index)
> XCURV(axis_index)
Accessibility
Read-Write
DELI values cannot be modified if protection is applied to this variable through SPiiPlus
MMI Application Studio g Toolbox g Application Development g Protection
3.5.6 E_ERR
Description
E_ERR is an integer array for each axis. It contains the encoder error code that was identified during
the encoder initialization process.
The encoder errors range from 5121 to 5128 and are latched in the E_ERR variable. The error codes
are specified in Table 9-5 in the Error Codes section.
Comments
This variable is supported in version 3.00 and higher.
Accessibility
Read-Only
.NET Library Method
ReadVariable()
C Library Function
acsc_ReadInteger()
3.5.7 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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
39
Comments
ERRA defines the maximum tolerable position error (FAULT(axis_index).#PE) when the motor is
moving with acceleration.
As a configuration variable, the ERRA value is normally defined by SPiiPlus MMI Application Studio g
Toolbox g Setup g Adjuster during the setup procedure of the system.
Accessibility
Read-Write
ERRA values cannot be modified if protection is applied to this variable through SPiiPlus
MMI Application Studio g Toolbox g Application Development g Protection
C Library Functions
acsc_ReadReal, acsc_WriteReal
3.5.8 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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
40
Comments
As a configuration variable, the ERRI value is normally defined by SPiiPlus MMI Application Studio g
Toolbox g Setup g Adjuster during the setup procedure of the system.
Accessibility
Read-Write
ERRI values cannot be modified if protection is applied to this variable through SPiiPlus
MMI Application Studio g Toolbox g Application Development g Protection
3.5.9 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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
41
Comments
As a configuration variable, the ERRV value is normally defined by SPiiPlus MMI Application Studio g
Toolbox g Setup g Adjuster during the setup procedure of the system.
Accessibility
Read-Write
ERRV values cannot be modified if protection is applied to this variable through SPiiPlus
MMI Application Studio g Toolbox g Application Development g Protection
3.5.10 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
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
3.5.11 SLLROUT
HW Limits Routing is available using ACSPL+ variable: SLLROUT
Description
SLLROUT is an integer array, with one element for each axis in the system, and is used for setting
the HW limits routing for the specified axis.
Syntax
SLLROUT(<axis>)=value
Arguments
Value HW Limits
0 According to SLPROUT
Comments
If SLLROUT(<axis>)=0, the routing is being done according to SLPROUT. In particular, if SLPROUT
(<axis>)=0, the HW limits are being taken from the axis itself.
Tag
318
Accessibility
Read-Write
Com Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger
3.5.12 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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
128
Comments
If reference position RPOS is greater than this value, a software Right Limit fault results and FAULT
(axis_index).#SRL is = 1.
Accessibility
Read-Write
3.5.13 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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
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
XACC values cannot be modified if protection is applied to this variable through SPiiPlus
MMI Application Studio g Toolbox g Application Development g Protection
3.5.14 XCURCDB
Description
XCURCDB is a real array, the size of which is determined by the total number of axes in the system. It
is used for defining the threshold of the current vector peak.
Syntax
XCURCDB(index) = value
Arguments
Comments
The parameter is relevant only if the Controlled Current Dynamic Brake Mode is active.
This variable is supported in version 3.10 and higher.
Accessibility
Read-Write
COM Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal
3.5.15 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. XCURI is defined as a percentage of the
maximum peak output. For products that incorporate the Drive Power Electronics (UDMnt, etc…),
this value directly limits the Output Current. For products that output Voltage Signals to external
Amplifiers (universal analog drive controllers such as the UDI), this value limits the Output Signal to
percentage of ±10V.
Syntax
XCURI(axis_index) = value
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
142
Comments
XCURI is defined as a percentage of the maximum peak output. For drive command products, the
command scales the voltage output range. For example, in the UDMnt-10/20, the maximum output
voltage is ±20V. Setting XCURI to 50 will limit the drive output to ±10V when the motor is idle. For
other products setting XCURI will scale the peak current output.
Accessibility
Read-Write
XCURI values cannot be modified if protection is applied to this variable through SPiiPlus
MMI Application Studio g Toolbox g Application Development g Protection
3.5.16 XCURK
Description
XCURK is a double array with one element for each axis in the system. It sets the current limit (in
percentage) for the axis to be applied during a KILL MOTION operation.
Syntax
XCURK(Axis_Index) = Value
Arguments
Axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number
Index of axes in the system minus 1.
Tag
375
Comments
The value transferred to the DSP is:
3.5.17 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. XCURV is defined as a percentage of the maximum peak output.
For products that incorporate the Drive Power Electronics (UDMnt, etc…), this value directly limits the
Output Current. For products that output Voltage Signals to external Amplifiers (universal analog
drive controllers such as the UDI), this value limits the Output Signal to percentage of ±10V.
Syntax
XCURV(axis_index) = value
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
143
Comments
XCURV is defined as a percentage of the maximum peak output. For drive command products, the
command scales the voltage output range. For example, in the UDMnt-10/20, the maximum output
voltage is ±20V. Setting XCURV to 50 will limit the drive output to ±10V when the motor is idle. For
other products setting XCURV will scale the peak current output.
Accessibility
Read-Write
3.5.18 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 for the motor. XRMS is defined as a percentage of the maximum
peak output. For products that incorporate the Drive Power Electronics (UDMnt, etc…), this value
directly limits the Output Current. For products that output Voltage Signals to external Amplifiers
(universal analog drive controllers such as the UDI), this value limits the Output Signal to percentage
of ±10V.
Syntax
XRMS(axis_index) = value
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
144
Comments
The SP program calculates RMS of the corresponding motor. 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
XRMS values cannot be modified if protection is applied to this variable through SPiiPlus
MMI Application Studio g Toolbox g Application Development g Protection
3.5.19 XRMSD
Description
XRMSD is a real array, with one element for each axis in the system, and is used for setting the
maximum allowable RMS current on the drive, as opposed to XRMSM which sets the maximum
allowed RMS current for the motor. XRMSD is defined as a percentage of the maximum peak output.
For products that incorporate the Drive Power Electronics (UDMnt, etc…), this value directly limits the
Output Current. For products that output Voltage Signals to external Amplifiers (universal analog
drive controllers such as the UDI), this value limits the Output Signal to percentage of ±10V.
Syntax
XRMSD(Axis_Index) = Value
Arguments
Axes_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
Index axes in the system minus 1.
Tag
345
Comments
XRMSD is used to define the desired maximum current for the drive.
The SP program calculates RMS of the corresponding controller drive output. If the calculated value
exceeds the XRMSD value, an overcurrent fault occurs. XRMSD is defined as a percentage of the
maximum output current.
Related ACSPL+ Variables
XRMSTD, FAULT(Axis_Index).#CL, XCURI, XCURV
Accessibility
Read-Write
3.5.20 XRMSM
Description
XRMSM is a real array, with one element for each axis in the system, and is used for setting the
maximum allowable RMS current on the motor, as opposed to XRMSD which sets the maximum
allowed RMS current for the drive. XRMSM is defined as a percentage of the maximum peak output.
For products that incorporate the Drive Power Electronics (UDMnt, etc…), this value directly limits the
Output Current. For products that output Voltage Signals to external Amplifiers (universal analog
drive controllers such as the UDI), this value limits the Output Signal to percentage of ±10V.
Syntax
XRMSM(Axis_Index) = Value
Arguments
Axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
Index axes in the system minus 1.
Tag
351
Comments
The SP program calculates RMS of the corresponding controller drive output. If the calculated value
exceeds the XRMSM value, an overcurrent fault occurs. XRMSM is defined as a percentage of the
maximum output current.
XRMSM is used to define the desired maximum current for the motor.
Related ACSPL+ Variables
XRMSTM, FAULT(Axis_Index).#CL, XCURI, XCURV
Accessibility
Read-Write
3.5.21 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
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
145
Accessibility
Read-Write
3.5.22 XRMSTD
Description
XRMSTD is a real array, with one element for each axis in the system, and is used for setting the time
constant in milliseconds for XRMSD to activate the overcurrent protection for the drive. For
calculation of XRMSD activation time, see SPiiPlus Setup Guide .
Syntax
XRMSTD(Axis_Index) = Value
Arguments
Axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
Index axes in the system minus 1.
Tag
346
Related ACSPL+ Variables
XRMSD, FAULT(Axis_Index).#CL, XCURI, XCURV
Accessibility
Read-Write
If Drive XRMS protection is triggered, the error 5049 “Drive Overcurrent” is given.
3.5.23 XRMSTM
Description
XRMSTM is a real array, with one element for each axis in the system, and is used for setting the
time constant in milliseconds for XRMSM to activate the overcurrent protection for the motor. For
calculation of XRMSM activation time, see SPiiPlus Setup Guide.
Syntax
XRMSTM(Axis_Index) = Value
Arguments
Axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
Index axes in the system minus 1.
Tag
352
Related ACSPL+ Variables
XRMSM, FAULT(Axis_Index).#CL, XCURI, XCURV
Accessibility
Read-Write
If Motor XRMS protection is triggered, the error 5048 “Motor Overcurrent” is given.
3.5.24 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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
146
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
3.5.25 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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
147
Comments
If RVEL reference velocity exceeds XVEL, FAULT(axis_index).#VL = 1.
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
XVEL values cannot be modified if protection is applied to this variable through SPiiPlus
MMI Application Studio g Toolbox g Application Development g Protection
Name Description
3.6.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
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 and .NET Library Methods
ReadVariable, DataCollection, StopCollect, WaitCollectEnd
C Library Functions
acsc_ReadInteger, acsc_DataCollectionExt, acsc_StopCollect, acsc_WaitCollectEnd
3.6.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
Related ACSPL+ Commands
DC, STOPDC
Related ACSPL+ Variables
AST, DCN
COM Library Methods and .NET Library Methods
ReadVariable, DataCollection, StopCollect, WaitCollectEnd
C Library Functions
acsc_ReadReal, acsc_DataCollectionExt, acsc_StopCollect, acsc_WaitCollectEnd
3.6.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 and .NET Library Methods
ReadVariable, DataCollection, StopCollect, WaitCollectEnd
C Library Functions
acsc_ReadInteger, acsc_DataCollectionExt, acsc_StopCollect, acsc_WaitCollectEnd
3.6.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.
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 and .NET Library Methods
ReadVariable, DataCollection, StopCollect, WaitCollectEnd
C Library Functions
acsc_ReadReal, acsc_DataCollectionExt, acsc_StopCollect, acsc_WaitCollectEnd
3.6.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.
Accessibility
Read-Only
Related ACSPL+ Commands
DC, STOPDC
Name Description
Integer array with one element for each EtherCAT node in the system. It
SPIST
shows the current state of the SPI communication channel.
3.7.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
value = AIN(index)
Arguments
value is the scaling, by percent, of the signal and ranges from -200 to +200,
value
Default = 0.
Tag
4
Comments
AIN represents a percentage of the sensor input range and assumes that the range is ± 10V. Some
sensors have different ranges; for example, if a sensor with a range of ± 5V detects its maximum
input, AIN would return ±50% by default. AINSCALE is used to normalize the value returned by AIN.
In this example, setting AINSCALE to 2 would cause AIN to return 100%.
Accessibility
Read-Only
COM Library Methods and .NET Library Methods
ReadVariable, GetAnalogInput
C Library Functions
acsc_ReadReal, acsc_GetAnalogInput
3.7.2 AINOFFS
Description
AINOFFS 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 percent offset of an analog signal from an external source
such as a sensor or a potentiometer.
Syntax
AINOFFS(index) = value
value Value is the offset, by percent, ranges from -100 to +100, Default = 0.
Tag
378
Comments
> If used in combination with the analog input scaling feature(AINSCALE) then, the order of
operations will be first offset and then scaling.
> The AIN variable range is now between -200 to +200.
This variable is supported in version 3.10 and higher.
Related ACSPL+ Variables
AIN, AINSCALE
Accessibility
Read-Write
COM Library Methods and .NET Library Methods
ReadVariable(), WriteVariable()
C Library Functions
acsc_ReadReal(), acsc_WriteReal()
3.7.3 AINSCALE
Description
AINSCALE 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 scaling of an analog signal from an external source such
as a sensor or a potentiometer.
Syntax
AINSCALE(index) = value
Arguments
Tag
391
Comments
If combined with the analog input offset feature(AINOFFS) then the order of operations will be
offset and then scaling.
The AIN variable range is between -200 to +200.
AIN represents a percentage of the sensor input range and assumes that the range is ± 10V. Some
sensors have different ranges; for example, if a sensor with a range of ± 5V detects its maximum
input, AIN would return ±50% by default. AINSCALE is used to normalize the value returned by AIN.
In this example, setting AINSCALE to 2 would cause AIN to return 100%.
This variable is supported in version 3.10 and higher.
3.7.4 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
value is the scaling, by percent, of the signal and ranges from -100 to +100,
value
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.
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
COM Library Methods and .NET Library Methods
ReadVariable, WriteVariable, GetAnalogOutput, SetAnalogOutput
C Library Functions
acsc_ReadReal, acsc_WriteReal, acsc_GetAnalogOutput, acsc_SetAnalogOutput
3.7.5 DOUT
Description
DOUT is an integer array that stores the drive command (velocity loop output) for each axis.
Tag
26
Comments
DOUT values range from -32767 to 32767, which corresponds to the range of +/-100% command.
In open loop loop mode (MFLAGS.1=1), DOUT is determined by the DCOM variable.
In closed loop mode (MFLAGS.1=0), DOUT is determined by DCOM plus the velocity loop output.
In gantry mode (MFLAGS.25=1) DOUT of the primary axis indicates the longitudinal (force) command
and DOUT of the secondary axis indicates the rotational (torque) command.
DOUT is updated at the MPU rate (CTIME) in most products, see note below.
The following ACS products only support lower rate update (once per 100msec) of DOUT:
> UDMpc
> CMnt
> UDMpm
> MC4U with SPiiPlus NT-HP/LT/LD
> MC4U with SPiiPlus DC-HP/LT/LD
> SPiiPus SAnt
Accessibility
Read-Only, ReadVariable
COM Library Methods and .NET Library Methods
ReadVariable, C Library Functions, acsc_ReadInteger
3.7.6 EXTIN
Description
EXTIN is an integer array, the size of which is determined by the total number of SPI input signals in
the system, and reads the current state of the inputs. The number of inputs depends on the number
of SPI modules in the system.
Comments
The SPIRXN variable is updated every cycle with the number of active elements.
Tag
42
Accessibility
Read-Only
3.7.7 EXTOUT
Description
EXTOUT is an integer array, the size of which is determined by the total number of SPI output signals
in the system, which can be used for reading or setting the current state of the outputs. The number
of outputs depends on the number of SPI inputs in the system.
Syntax
EXTOUT(index) = value
Arguments
Comments
When used with an SPI interface in master mode, the EXOUT function should be used.
The SPICFG function sets the number of elements which contain data.
Tag
43
Accessibility
Read-Write
Related ACSPL+ Variables
EXTIN, OUT
COM Library Methods and .NET Library Methods
ReadVariable, WriteVariable, GetExtOutput, SetExtOutput, GetExtOutputPort, SetExtOutputPort
C Library Functions
acsc_ReadInteger, acsc_WriteInteger, acsc_GetExtOutput, acsc_SetExtOutput, acsc_
GetExtOutputPort, acsc_SetExtOutputPort
3.7.8 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.
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.
In some SPiiPlus controllers and drives, the digital input pins can also be used as MARK.
Accessibility
Read-Only
Related ACSPL+ Variables
OUT, EXTOUT
COM Library Methods and .NET Library Methods
ReadVariable, GetInput, GetInputPort
C Library Functions
acsc_ReadInteger, acsc_GetInput, acsc_GetInputPort
3.7.9 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.
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.
In some SPiiPlus controllers the digital output pins can also be used as PEG - see .
Accessibility
Read-Write
Related ACSPL+ Variables
IN, EXTIN
COM Library Methods and .NET Library Methods
ReadVariable, WriteVariable, SetOutput, GetOutput, SetOutputPort, GetOutputPort
C Library Functions
acsc_ReadInteger, acsc_WriteInteger, acsc_SetOutput, acsc_GetOutput, acsc_SetOutputPort, acsc_
GetOutputPort
3.7.10 SPIRXN
Description
SPIRXN is a variable that shows the number of actual words that contain data transmitted from the
SPI external interface. The range is from 0 to 8.
Accessibility
Read-only
Tag
384
Comments
SPIRXN value is 0 if the SPI is disabled. This variable is supported by the UDMxx, IDMxx and ECMxx
products only.
3.7.11 SPIST
Description
SPIST is an integer array with one element for each EtherCAT node in the system. It shows the
current state of the SPI communication channel.
Bit Field
The contents of each entry are interpreted according to the following table
2-15 Reserved
Comments
If a specific element has the value 0, then there are no errors in that node
TAG
385
Accessibility
Read-only
Name Description
An integer array, with one element for each buffer in the system. It shows
BCODEUSG
the actual memory allocated by a program code in KB, for each buffer.
An integer array, with one element for each buffer in the system. It is used
BCODECFG for configuration of the amount of memory in KB that is pre-allocated for
program code for each buffer.
A scalar that shows the amount of memory used by the global variables
BGLOBUSG
defined in the D-Buffer.
An integer array with one element for each buffer in the system. It is used
BSRCCFG for configuration of the amount of memory in KB that is pre-allocated for a
program source for each buffer.
An integer array, with one element for each buffer in the system. It shows,
BSRCUSG
in KB, the actual memory allocated by a program source for each buffer.
Name Description
An integer array with one element for each buffer in the system. It shows,
BVARUSG in KB, the actual memory allocated by a program local variables for each
buffer.
An integer array with one element for each buffer in the system. It is used
BVARCFG for configuration of the amount of memory that is pre-allocated for local
variables in KB, for each buffer.
Elapsed time between the physical timer interrupt and the SC real-time
JITTER
task starts working.
MSSYNC Time difference between the master clock and the bus clock.
3.8.1 BCODECFG
Description
BCODECFG is an integer array, with one element for each buffer in the system. It is used for
configuration of the amount of memory in KB that is pre-allocated for program code for each buffer.
Syntax
BCODECFG(Buffer_Index) = value
Arguments
Tag
409
Comments
The values are in KB.
The default value is 128KB.
BCODEUSG can be useful for setting the value of the BCODECFG variable.
3.8.2 BCODEUSG
Description
BCODEUSG is an integer array, with one element for each buffer in the system. It shows the actual
memory allocated by a program code in KB, for each buffer.
Syntax
[command]BCODEUSG(Buffer_Index)
Arguments
Tag
410
Comments
> The values are in KB.
> For empty buffer, the value is 0.
> BCODEUSG can be useful for setting the value of the BCODECFG variable.
Related ACSPL+ Variables
BCODECFG
Accessibility
Read-Only
COM Library Methods and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadInteger
3.8.3 BGLOBCFG
Description
BGLOBCFG is a scalar. It sets the amount of memory pre-allocated for global variables in the D-
Buffer.
Syntax
BGLOBCFG = value
Arguments
NONE
Tag
413
Comments
> The value is in KB.
> The default value is 1024KB.
> BGLOBUSG can be useful for setting the value of the BGLOBCFG variable.
> Setting the BGLOBCFG variable changes the value of BGLOBCFG only if the S_
SETUP.#VRMEMVAR bit is ON
> The BGLOBCFG variable applies only for global variables defined in the D-Buffer.
> A new value takes effect only after controller reboot.
Related ACSPL+ Variables
BGLOBUSG
Accessibility
Read-Write
COM Library Methods and .NET Library Methods
ReadVariable, Write Variable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger
3.8.4 BGLOBUSG
Description
BGLOBUSG is a scalar that shows the amount of memory used by all ACSPL+ global variables.
Syntax
value = BGLOBUSG
Arguments
NONE
Tag
414
Comments
> The value is in KB.
> BGLOBUSG can be useful for setting the value of the BGLOBCFG variable.
> The BGLOBUSG variable has a valid value only if S_SETUP.#VRMEMVAR bit is ON
> The BGLOBUSG variable applies only for global variables
Related ACSPL+ Variables
BGLOBCFG
Accessibility
Read-only
COM Library Methods and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadInteger
3.8.5 BSRCUSG
Description
BSRCUSG is an integer array, with one element for each buffer in the system. It shows, in KB, the
actual memory allocated by a program source for each buffer.
Syntax
value = BSRCUSG(Buffer_Index)
Arguments
Tag
412
Comments
> The values are in KB
> For empty buffers the value is 0
> BSRCUSG can be useful for setting the value of the BSRCCFG variable
> The value should equal the size of the source code
Related ACSPL+ Variables
BSRCCFG
Accessibility
Read-only
COM Library Methods and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadInteger
3.8.6 BSRCCFG
Description
BSRCCFG is an integer array with one element for each buffer in the system. It is used for
configuration of the amount of memory in KB that is pre-allocated for a program source for each
buffer.
Syntax
BSRCCFG(Buffer_Index) = value
Arguments
Tag
411
Comments
> The values are in KB.
> The default value is 64KB.
> BSRCUSG can be useful for setting the value of the BSRCCFG variable.
> A new value takes effect only after controller reboot.
Related ACSPL+ Variables
BSRCUSG
Accessibility
Read-Write
COM Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger
3.8.7 BVARUSG
Description
BVARUSG is an integer array with one element for each buffer in the system. It shows, in KB, the
actual memory allocated by a program local variables for each buffer.
Syntax
value = BVARUSG(Buffer_Index)
Arguments
Tag
416
Comments
> The values are in KB.
> For an empty buffer, the value is 0.
> BVARUSG can be useful for setting the value of the BVARCFG variable.
> The BVARUSG variable has a valid value only if S_SETUP.#VRMEMVAR bit is ON
Related ACSPL+ Variables
BVARCFG
Accessibility
Read-only
COM Library Methods and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadInteger
3.8.8 BVARCFG
Description
BVARCFG is an integer array with one element for each buffer in the system. It is used for
configuration of the amount of memory that is pre-allocated for local variables in KB, for each buffer.
Syntax
BVARCFG(Buffer_Index) = value
Arguments
Tag
415
Comments
> The values are in KB.
> The default value is 10KB.
> BVARUSG can be useful for setting the value of the BVARCFG variable.
> The BVARCFG variable takes effect only if S_SETUP.#VRMEMVAR bit is ON.
> A new value takes effect only after controller rebooted.
Related ACSPL+ Variables
BVARCFG
Accessibility
Read-Write
COM Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger
3.8.9 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 and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadReal
3.8.10 MSSYNC
Description
MSSYNC is a real variable that contains the difference, in microseconds, between clocks of the
master and the [Link] parameter shows how close the synchronization is between the two clocks.
Tag
225
Accessibility
Read-Only
COM Library Methods and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadReal
3.8.11 USGBUF
Description
USGBUF array stores the amount of MPU usage as a percentage of the specific ACSPL+ buffer in the
controller cycle during the execution of real-time tasks.
USGBUF is a real array with one element for each ACSPL+ buffer as follows:
> USGBUF(0) - Buffer 0
> USGBUF(63) - Buffer 63
> USGBUF(64) - D-Buffer
> USGBUF(65) - Buffer for immediate commands execution (C / COM libraries, communication
terminal, etc.)
> USGBUF(66) - Buffer for MACRO execution
Tag
246
Comments
The real-time tasks always have the greatest priority. If the usage reaches 80% or more, the
response time of the controller deteriorates. In addition, it is dangerous and may cause jerks in the
motion profile.
The USGBUF variable should be used for debugging purposes only and should not be used in real
production applications. In order to use a tracing mechanism, bit 1 of S_SETUP variable should be set
to 1.
3.8.12 USGCORE
Description
USGCORE is a real array of four that shows the amount of CPU usage as a percentage of the real-
time tasks in the controller cycle of the relevant CPU during the execution of real-time tasks.
Tag
439
Comments
USGCORE(0) should be equal to ACSPL+ USAGE.
3.8.13 USGTRACE
Description
USGTRACE array is used for storing the amount of MPU usage as a percentage of the specific real-
time task in the controller cycle during the execution of real-time tasks.
USGTRACE is a real array with one element for each real-time task according to the following list,
with 10 elements reserved for each EtherCAT instance:
> EtherCAT instance 0:
> USGTRACE(0) - EtherCAT instance 0 communication (including communication jitter)
> USGTRACE(1) - reading inputs, prerequisite operations for motion generator
> USGTRACE(2) - motion generator and real-time objects
> USGTRACE(3) - operations on axes and Servo Processor interfaces
> USGTRACE(4) - execution of ACSPL+ buffers
> USGTRACE(5) - writing outputs, house keeping operations
> USGTRACE(6..9) - not used and reserved for future needs
> EtherCAT instance 1:
> USGTRACE(10) - EtherCAT instance 1 communication (including communication jitter)
> USGTRACE(11) - reading inputs, prerequisite operations for motion generator
> USGTRACE(12) - motion generator and real-time objects
> USGTRACE(13) - operations on axes and Servo Processor interfaces
> USGTRACE(14) - execution of ACSPL+ buffers
> USGTRACE(15) - writing outputs, house keeping operations
> USGTRACE(16..19) - not used and reserved for future needs
Tag
245
Comments
The real-time tasks always have the greatest priority. If the usage reaches 80% or more, the
response time of the controller deteriorates. In addition, it is dangerous and may cause jerks in the
motion profile.
The USGTRACE variable should be used for debugging purposes only and should not be used in real
production applications. In order to use a tracing mechanism, bit 1 of S_SETUP variable should be set
to 1.
3.8.14 SOFTIME
Description
SOFTIME is a read-only real array, with one element for each EtherCAT node in the system, which
specifies the EtherCAT frame delivery time in microseconds.
Tag
255
Accessibility
Read Only
COM Library Methods and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadReal
Comments
A Bit 2 (#SOFTIME) setting enables measuring the EtherCAT frame delivery time. Currently this
feature is supported by the following products only:
> "IOMnt (rev.B2 and higher)
> "PDMnt (rev. B3 and higher)
> "SDMnt (rev. B2 and higher)
3.8.15 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 and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadReal
3.8.16 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 80% 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.
Values may be any positive number up to 100.
Accessibility
Read-Only
COM Library Methods and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadReal
3.8.17 USAGESIM
Description
USAGESIM is a real variable used for storing MPU usage as a percentage of the real-time tasks in the
controller cycle during the execution of real-time tasks in the simulator.
Tag
376
Comments
The USAGESIM variable should be used for debugging purposes only and should not be used in real
production applications.
Since the simulator runs in a non-real-time OS, USAGESIM can frequently be above 100% .
This variable is supported in version 3.00 and higher.
Accessibility
Read-only
Related ACSPL+ Variables
USAGE
COM Library Methods and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadReal
Name Description
Name Description
Integer array storing the current desired motor position, including the
APOSFILT
filtering operation result
Defines the time delay after a kill process when CERRK is used to indicate
DELK
a critical position error.
Name Description
A real array, with one element for each axis in the system, and is used for
GSNAP
defining the current calculated snap vector snap of group motion.
SETTLEA Sets the time to wait inside the target radius before triggering
SETTLEB Sets the time to wait inside the target radius before triggering
SETTLEC Sets the time to wait inside the target radius before triggering
A real array with one element for each axis in the system, and is used for
SNAP defining the snap (jerk derivative) of the motion profile in user-defined
units.
STLTIMEA Last settling time of axis, according to SETTLEA and TARGRADA criteria
STLTIMEB Last settling time of axis, according to SETTLEB and TARGRADB criteria
STLTIMEC Last settling time of axis, according to SETTLEC and TARGRADC criteria
SETTLEC Sets the time to wait inside the target radius before triggering
TARGRADA Sets the target radius around which you wish the motion to settle.
TARGRADB Sets the target radius around which you wish the motion to settle.
TARGRADC Sets the target radius around which you wish the motion to settle.
PE Position Error
Name Description
Holds the time(In milliseconds) passed from the moment that the move
PRFLTIME
starts until the motion profile ends
A real array, with one element for each axis in the system, and is used for
RSNAP defining the current calculated reference snap (jerk derivation) in user-
defined units.
VEL Velocity
3.9.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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
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.
Accessibility
Read-Write
ACC values cannot be modified if protection is applied to this variable through SPiiPlus
MMI Application Studio g Toolbox g Application Development g Protection
3.9.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
COM Library Methods and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadReal
3.9.3 APOSFILT
Description
APOSFILT is real array with one element for each axis in the system. The array elements store the
current desired motor position, including the filtering operation result, such as input shaping.
APOSFILT updates on every controller cycle according to the filtering algorithm. When
the filtering algorithm is not configured, APOSFILT = APOS.
TAG
368
Comments
This variable is supported in version 3.00 and higher.
ACCESSIBILITY
Read-Only
RELATED ACSPL+ COMMANDS
All motion commands
RELATED ACSPL+ VARIABLES
FPOS, RPOS, APOS,
.NET LIBRARY METHODS
ReadVariable(), WriteVariable()
C LIBRARY FUNCTIONS
acsc_ReadReal(), acsc_WriteReal()
3.9.4 CERRK
Description
CERRK is a real array, with one element for each axis in the system, and is used for defining the
Critical Position Error criterion for the KILL state.
Syntax
CERRK(Axis_Index) = Value
Arguments
Tag
347
Comments
CERRK defines the maximum tolerable critical position error (FAULT(axis_index).#PE) during the kill
operation.
The value of CERRK is always equal or higher than that of CERRA.
If CERRK is assigned a new value which is lower than CERRA, CERRK is set to CERRA automatically.
If CERRA is assigned a new value which is higher than CERRK, CERRK is set to CERRA automatically.
Related ACSPL+ Variables
FAULT(Axis_Index).#PE, FDEF
Accessibility
Read-Write
3.9.5 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
3.9.6 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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
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
DEC values cannot be modified if protection is applied to this variable through SPiiPlus
MMI Application Studio g Toolbox g Application Development g Protection
3.9.7 DECOMP
Description
DECOMP is a real array, with one element for each axis in the system, and is used for displaying the
error correction for the mechanical error compensation that was applied to the axis. DECOMP
displays the difference between RPOS and RPOSCOMP.
Tag
344
Accessibility
Read-Only
Related ACSPL+ Commands
All motion commands
Related ACSPL+ Variables
FPOS, RPOS, RPOSCOMP, APOS, PE .
NET Library Method
ReadVariable(), WriteVariable()
C Library Function
acsc_ReadReal(), acsc_WriteReal()
3.9.8 DELK
Description
DELK is a real array, with one element for each axis in the system, and is used for defining the time
delay after a kill process in which we still use CERRK to indicate a critical position error.
Syntax
DELK(Axis_Index) = Value
Arguments
Tag
350
Comments
CERRK defines the maximum tolerable critical position error (FAULT(axis_index).#CPE) during the kill
operation. After the kill operation in order to ensure a smooth transition, we still use CERRK to
define the maximal tolerable position error, for DELK time.
Related ACSPL+ Variables
FAULT(Axis_Index).#CPE, CERRK
Accessibility
Read-Write
DELK values cannot be modified if protection is applied to this variable through SPiiPlus
MMI Application Studio > Toolbox > Application Development > Protection.
3.9.9 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 and .NET Library Methods
ReadVariable, GetAcceleration
C Library Functions
acsc_ReadReal, acsc_GetAcceleration
3.9.10 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, SLPROUT
COM Library Methods and .NET Library Methods
ReadVariable, GetFPosition, SetFPosition
C Library Functions
acsc_ReadReal, acsc_GetFPosition, acsc_SetFPosition
3.9.11 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, SLP2ROUT
Related ACSPL+ Variables
IST
COM Library Methods and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadReal
3.9.12 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 and .NET Library Methods
ReadVariable, GetFVelocity
C Library Functions
acsc_ReadReal, acsc_GetFVelocity
3.9.13 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 and .NET Library Methods
ReadVariable, GetFVelocity
C Library Functions
acsc_ReadReal, acsc_GetFVelocity
3.9.14 FEEDRF
Description
FEEDRF is real array, with one element for each axis in the system, the elements of which store the
feedrate factor. The feedrate factor modifies the calculation of motion velocity for all relevant
motion profiles.
Examples
FEEDRF(2) = 1.23
Tag
362
Comments
This variable may be updated immediately using the “IMM” qualifier.
The allowed range is 0.1 to 2.0.
Acceleration and Jerk are NOT affected, which actually changes the trajectory characteristics (may
result in Triangular instead of Trapezoidal Trajectory).
It takes effect on the next Trajectory calculation, according to the specified velocity of that trajectory;
situation varies according to PTP Switches.
In case of group motion, the FEEDRF of the leading Axis will be in effect.
Motion Modes in which FEEDRF is supported: PTP, JOG, TRACK, MPTP, XSEG
Accessibility
Read-Write
Related ACSPL+ Commands
IMM, PTP, JOG, TRACK, MPTP, XSEG
Related ACSPL+ Variables
VEL
3.9.15 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:
GPATH, GVEL, GACC, GPHASE, GJERK, and GRTIME Variables are updated while the
motion is in progress.
Tag
55
Accessibility
Read-Only
Related ACSPL+ Commands
GROUP
3.9.16 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:
GPATH, GVEL, GACC, GJERK, GPHASE, and GRTIME variables are updated while the
motion is in progress.
Tag
57
Accessibility
Read-Only
COM Library Methods and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadReal
3.9.17 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.
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 and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadInteger
3.9.18 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
COM Library Methods and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadInteger
3.9.19 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
11 - BPTP motion
12 - BSEG...ENDS motion
43 - BPTP/2 motion using 20 kHz control
Accessibility
Read-Only
COM Library Methods and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadInteger
3.9.20 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.
GPATH, GVEL, GACC, GJERK, GPHASE, and GRTIME variables are updated while the
motion is in progress.
Accessibility
Read-Only
COM Library Methods and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadReal
3.9.21 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
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
GPATH, GVEL, GACC, GJERK, GPHASE, and GRTIME variables are updated while the
motion is in progress.
Accessibility
Read-Only
COM Library Methods and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadInteger
3.9.22 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.
GPATH, GVEL, GACC, GJERK, GPHASE, and GRTIME variables are updated while the
motion is in progress.
Accessibility
Read-Only
COM Library Methods and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadReal
3.9.23 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
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
3.9.24 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
COM Library Methods and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadInteger
3.9.25 GSNAP
Description
GSNAP is a real array, with one element for each axis in the system, and is used for defining the
current calculated snap vector snap of group motion.
Tag
407
Accessibility
Read-write
3.9.26 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 and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadReal
3.9.27 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:
GPATH, GVEL, GACC, GJERK, GPHASE, and GRTIME variables are updated while the
motion is in progress
Tag
67
Accessibility
Read-Only
COM Library Methods and .NET Library Methods
ReadVariable
C Lisbrary Functions
acsc_ReadReal
3.9.28 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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
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
JERK values cannot be modified if protection is applied to this variable through SPiiPlus
MMI Application Studio g Toolbox g Application Development g Protection
3.9.29 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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
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
KDEC values cannot be modified if protection is applied to this variable through SPiiPlus
MMI Application Studio g Toolbox g Application Development g Protection
3.9.30 LPOS
Description
LPOS is a real array, with one element for each axis in the system, the elements of which store the
axis position in the Local Coordinate System.
Syntax
LPOS(axis_index) = value
Arguments
axis_ Designates the specific axis, valid values are: 0, 1, 2, ... up to the number of axes
index in the system minus 1.
Tag
372
Accessibility
Read-Only
Related ACSPL+ Variables
FPOS, RPOS, APOS
3.9.31 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 and .NET Library Methods
ReadVariable, SetMaster, Slave
C Library Functions
acsc_ReadReal, acsc_SetMaster, acsc_Slave
3.9.32 MSTIMEA
Description
MSTIMEA returns the time elapsed from start of motion up to first entering the settled zone, using
SETTLEA and TARGRADA to determine the time and radius required for settling.
Syntax
Value = MSTIMEA(Axis_Index)
Arguments
Axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
Index axes in the system minus 1.
Tag
341
Comments
We compare the distance between current position and target position to the given target radii,
represented by TARGRADA. This indicates if we the motor is in the target zone, if it stays in the
target zone for at least SETTLEA time - bit MST.#INTARGA is raised, respectively, and depending on
the operating mode – further inspection will be stopped or continued.
The time from the beginning of motion until first entering the settled zone is represented by
MSTIMEA and is only valid when the #INTARGA bit is on.
Related ACSPL+ Variables
TARGRADA, SETTLEA, MST(axis_index).#INTARGA
Accessibility
Read-only
MSTIMEA is only updated if the Move & Settle feature is enabled by using SETCONF(318
to enable either single mode or auto mode.
3.9.33 MSTIMEB
Description
MSTIMEB returns the time elapsed from start of motion up to first entering the settled zone, using
SETTLEB and TARGRADB to determine the time and radius required for settling.
Syntax
Value = MSTIMEB(Axis_Index)
Arguments
Axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
Index axes in the system minus 1.
Tag
342
Comments
We compare the distance between current position and target position to the given target radii,
represented by TARGRADB. This indicates if we the motor is in the target zone, if it stays in the
target zone for at least SETTLEB time - bit MST.#INTARGB is raised, respectively, and depending on
the operating mode – further inspection will be stopped or continued.
The time from the beginning of motion until first entering the settled zone is represented by
MSTIME_B and is only valid when the #INTARGB bit is on.
Related ACSPL+ Variables
TARGRADB, SETTLEB, MST(axis_index).#INTARGB
Accessibility
Read-only
MSTIMEB is only updated if the Move & Settle feature is enabled by using SETCONF(318
to enable either single mode or auto mode.
3.9.34 MSTIMEC
Description
MSTIMEC returns the time elapsed from start of motion up to first entering the settled zone, using
SETTLEC and TARGRADC to determine the time and radius required for settling.
Syntax
Value = MSTIMEC(Axis_Index)
Arguments
Axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
Index axes in the system minus 1.
Tag
343
Comments
We compare the distance between current position and target position to the given target radii,
represented by TARGRADC. This indicates if we the motor is in the target zone, if it stays in the target
zone for at least SETTLEC time - bit MST.#INTARGC is raised, respectively, and depending on the
operating mode – further inspection will be stopped or continued.
The time from the beginning of motion until first entering the settled zone is represented by
MSTIMEC and is only valid when the #INTARGC bit is on.
Related ACSPL+ Variables
TARGRADC, SETTLEC, MST(axis_index).#INTARGC
Accessibility
Read-only
MSTIMEC is only updated if the Move & Settle feature is enabled by using SETCONF(318
to enable either single mode or auto mode.
3.9.35 NVEL
Description
NVEL is a real array, with one element for each axis in the system, and is used for specifying the start
and the end velocities for an axis in stepper motor applications.
Syntax
NVEL(axis_index) = value
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
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/KILLALL and HALT slow the velocity to the value specified
in NVEL, and then the velocity drops to zero.
Accessibility
Read-Write
NVEL values cannot be modified if protection is applied to this variable through SPiiPlus
MMI Application Studio g Toolbox g Application Development g Protection.
3.9.36 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.
Tag
98
Accessibility
Read-Only
Related ACSPL+ Commands
All motion commands.
3.9.37 PPOS
Description
PPOS is real array, with one element for each axis in the system, the elements of which store the
current desired motor reference position. Unlike RPOS, this holds the current value, rather than a
value taking into account the delay for reading the actual current position from the encoder.
Tag
364
Comments
When the motor is disabled, RPOS = FPOS.
This variable is supported in ADK versions 2.70 and higher.
Accessibility
Read-Only
Related ACSPL+ Commands
SET, CONNECT, and all motion commands.
Related ACSPL+ Variables
FPOS, RVEL, RACC
COM Library Methods and .NET Library Methods
ReadVariable, GetRPosition, SetRPosition
C Library Functions
acsc_ReadReal, acsc_GetRPosition, acsc_SetRPosition
3.9.38 PPOSCOMP
Description
PPOSCOMP is real array, with one element for each axis in the system, the elements of which store
the current desired motor reference position including dynamic error compensation. Unlike
RPOSCOMP, this holds the current value, rather than a value taking into account the delay for
reading the actual current position from the encoder.
Tag
365
Comments
This variable is supported in ADK versions 2.70 and higher.
Accessibility
Read-Only
Related ACSPL+ Commands
All motion commands.
Related ACSPL+ Variables
PPOS, FPOS, RPOS, APOS, PE, DECOMP
.NET Library Method
ReadVariable(), WriteVariable()
C Library Function
acsc_ReadReal(), acsc_WriteReal()
3.9.39 PRFLTIME
Description
PRFLTIME is a real array, the size of which is determined by the total number of axes in the system.
It holds the time(In milliseconds) passed from the moment that the move starts until the motion
profile ends.
Syntax
value = PRFLTIME(index)
Arguments
Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index
axes in the system minus 1.
Tag
405
Comments
> The PRFLTIME variable is updated with the latest profile time for the relevant axes.
> If we have multi-axes move, the profile time for all the involved axes is the same and will
be updated once the profile has ended for all the axes.
> A kill/error event is regarded as profile end.
> If the profile starts and ends in the same cycle (for example, move from the current axis
position to the same position), the profile time will be 0.
Related ACSPL+ Variables
Accessibility
Read-Only
COM Library Methods and .NET Library Methods
ReadVariable()
C Library Functions
acsc_ReadReal()
3.9.40 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
Related ACSPL+ Commands
All motion related commands.
Related ACSPL+ Variables
RVEL, RPOS
COM Library Methods and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadReal
Real
3.9.41 RJERK
Description
RJERK is a real array, with one element for each axis in the system, and defines the current
calculated reference jerk value for the motor in user-defined units.
RJERK is updated each controller cycle and is calculated as digital differentiation of RACC.
Tag
259
Accessibility
Read-Only
3.9.42 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:
Watching the ROFFS value facilitates development and debugging of applications with
complex kinematics.
Accessibility
Read-Only
Related ACSPL+ Commands
CONNECT, SET, ENABLE/ENABLE ALL, DISABLE/DISABLEALL, KILL/KILLALL
Related ACSPL+ Variables
MFLAGS(axis_index).#DEFCON (bit 17 = Default Connection)
COM Library Methods and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadReal
3.9.43 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 and .NET Library Methods
ReadVariable, GetRPosition, SetRPosition
C Library Functions
acsc_ReadReal, acsc_GetRPosition, acsc_SetRPosition
3.9.44 RPOSCOMP
Description
RPOSCOMP is real array, with one element for each axis in the system, the elements of which store
the current desired motor reference position including dynamic error compensation.
RPOSCOMP updates every controller cycle according to the configured dynamic error
compensation, see ERRORMAP1D, ERRORMAPN1D, ERRORMAP2D, ERRORMAPN2D.
When the dynamic error compensation is not configured, RPOSCOMP = RPOS.
Tag
348
Accessibility
Read-Only
Related ACSPL+ Commands
All motion commands.
Related ACSPL+ Variables
FPOS, RPOS, APOS, PE, DECOMP
.NET Library Method
ReadVariable(), WriteVariable()
C Library Function
acsc_ReadReal(), acsc_WriteReal()
3.9.45 RPOSDEL
Description
RPOSDEL shows the actual delay time that is currently set. The delay value is rounded (ceiling
function) to 50 µsec. At the beginning of the motion, which is delayed, the parameter indicates the
specified delay. At the end of the motion, the delay is gradually reduced to zero.
Syntax
Tag
329
Accessibility
Read-Only
.NET Library Method
ReadVariable()
C Library Function
acsc_ReadInteger()
3.9.46 RSNAP
Description
RSNAP is a real array, with one element for each axis in the system, and is used for defining the
current calculated reference snap (jerk derivation) in user-defined units.
Tag
408
3.9.47 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
Related ACSPL+ Commands
All motion commands.
Related ACSPL+ Variables
RPOS, RACC, FVEL
COM Library Methods and .NET Library Methods
ReadVariable, GetRVelocity
C Library Functions
acsc_ReadReal, acsc_GetRVelocity
3.9.48 SETTLEA
Description
SETTLEA allows you to set the time to wait inside the TARGRADA before triggering MST.#INTARGA.
Syntax
SETTLEA(Axis_Index) = Value
Arguments
Axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number
Index of axes in the system minus 1.
Tag
338
Comments
We compare the distance between current position and target position to the given target radii,
represented by TARGRADA. This indicates if we the motor is in the target zone, if it stays in the
target zone for at least SETTLEA time - bit MST.#INTARGA is raised, respectively, and depending on
the operating mode – further inspection will be stopped or continued.
The time from the beginning of motion until first entering the settled zone is represented by
MSTIMEA and is only valid when the #INTARGA bit is on.
Related ACSPL+ Variables
TARGRADA, MST(axis_index).#INTARGA, MSTIMEA
Accessibility
Read-Write
3.9.49 SETTLEB
Description
SETTLEB allows you to set the time to wait inside the TARGRADB before triggering MST.#INTARGB.
Syntax
SETTLEB(Axis_Index) = Value
Arguments
Axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number
Index of axes in the system minus 1.
Tag
339
Comments
We compare the distance between current position and target position to the given target radii,
represented by TARGRADB. This indicates if we the motor is in the target zone, if it stays in the
target zone for at least SETTLEB time - bit MST.#INTARGB is raised, respectively, and depending on
the operating mode – further inspection will be stopped or continued.
The time from the beginning of motion until first entering the settled zone is represented by
MSTIMEB and is only valid when the #INTARGB bit is on.
Related ACSPL+ Variables
TARGRADB, MST(axis_index).#INTARGB, MSTIMEB
Accessibility
Read-Write
3.9.50 SETTLEC
Description
SETTLEC allows you to set the time to wait inside the TARGRADC before triggering MST.#INTARGC.
Syntax
SETTLEC(Axis_Index) = Value
Arguments
Axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number
Index of axes in the system minus 1.
Tag
340
Comments
We compare the distance between current position and target position to the given target radii,
represented by TARGRADC. This indicates if we the motor is in the target zone, if it stays in the target
zone for at least SETTLEC time - bit MST.#INTARGC is raised, respectively, and depending on the
operating mode – further inspection will be stopped or continued.
The time from the beginning of motion until first entering the settled zone is represented by
MSTIMEC and is only valid when the #INTARGC bit is on.
Related ACSPL+ Variables
TARGRADC, MST(axis_index).#INTARGC, MSTIMEC
Accessibility
Read-Write
3.9.51 SLSFF
Description
SLSFF is a snap feed forward parameter.
Syntax
SLAFF(Axis_index) = Value
Arguments
Axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
418
Comments
Flexible systems consist of a non-collocated feedback sensor, which is mounted away from the
motor or the load. Those systems can suffer from vibration and dynamic performance due to
mechanical resonance, which is caused by compliance between two or more components in the
mechanical transmission, mostly between motor and load. The snap feed-forward reduces the
resonance frequency oscillations and improves the high-speed and large acceleration of jerk
profiles.
The SLSFF value is the resonance frequency in Hz.
The SLAFF (acceleration feedforward) must be tuned before activating the SLSFF.
SLSFF can be used with SPTP or BPTP motions.
SLSFF is not supported in the 20KHz motion mode (BPTP/2).
Example
Figure 5-1 shows an FRF measurement of the velocity and position loop of a flexible system,
including a motor and encoder on opposite sides. The resonance frequency of the system is 70 Hz.
The resonance frequency is excited during a short and aggressive movement. Figure 5-2 describes a
short SPTP motion without snap feed-forward (SLSFF=0).
Snap feedforward is a form of control that accounts for the flexibility of a system and significantly
improves performance and reduces resonance vibrations.
Figure 5-3 shows the same SPTP motion where setting the SLSFF motion as the resonance
frequency of the system (SLSFF=70):
3.9.52 SNAP
Description
SNAP is a real array with one element for each axis in the system, and is used for defining the snap
(jerk derivative) of the motion profile in user-defined units.
Syntax
SNAP(axis_index) = value
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
406
Accessibility
Read-write
3.9.53 STLTIMEA
Description
STLTIMEA is a real array, with one element for each axis in the system. Each element holds the last
settling time of the axis, i.e., the time passed since the profile generation has been completed up to
first entering the settled zone, using SETTLEA and TARGRADA to determine the time and radius
required for settling.
Syntax
value = STLTIMEA(axis_index)
Arguments
Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
axis_index
axes in the system minus 1.
Tag
392
Comments
> In cases where the motion settled within the specified radius before the profile has
finished, STLTIME = 0. Otherwise, STLTIME [axis_index] = MSTIME[axis_index] - PRFLTIME
[axis_index].
> This feature has two operating modes, which are controlled through SETCONF with key 318,
where index indicates the axis number and the value the mode, value of 0 is the default
and deactivates the feature. See SETCONF documentation for more details.
> Only motions which support TPOS may be used to measure the settle time. These motions
are: PTP, MPTP, and TRACK.
> Once the MST(axis_index).#INTARGA bit is set(1), the STLTIMEA variable holds an updated
value of the axis settling time.
Related ACSPL+ Variables
MSTIMEA, TARGRADA, SETTLEA, MST(axis_index).#INTARGA
Accessibility
Read-Only
COM Library Methods and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadReal
3.9.54 STLTIMEB
Description
STLTIMEB is a real array, with one element for each axis in the system. Each element holds the last
settling time of the axis, i.e., the time passed since the profile generation has been completed up to
first entering the settled zone, using SETTLEB and TARGRADB to determine the time and radius
required for settling.
Syntax
value = STLTIMEB(axis_index)
Arguments
Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
axis_index
axes in the system minus 1.
Tag
393
Comments
> In cases where the motion settled within the specified radius before the profile has
finished, STLTIME = 0. Otherwise, STLTIME [axis_index] = MSTIME[axis_index] - PRFLTIME
[axis_index].
> This feature has two operating modes, which are controlled through SETCONF with key 318,
where index indicates the axis number and the value the mode, value of 0 is the default
and deactivates the feature. See SETCONF documentation for more details.
> Only motions which support TPOS may be used to measure the settle time. These motions
are: PTP, MPTP, and TRACK.
> Once the MST(axis_index).#INTARGB bit is set(1), the STLTIMEB variable holds an updated
value of the axis settling time.
Related ACSPL+ Variables
MSTIMEB, TARGRADB, SETTLEB, MST(axis_index).#INTARGB
Accessibility
Read-Only
COM Library Methods and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadReal
3.9.55 STLTIMEC
Description
STLTIMEC is a real array, with one element for each axis in the system. Each element holds the last
settling time of the axis, i.e., the time passed since the profile generation has been completed up to
first entering the settled zone, using SETTLEC and TARGRADC to determine the time and radius
required for settling.
Syntax
value = STLTIMEC(axis_index)
Arguments
Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
axis_index
axes in the system minus 1.
Tag
392
Comments
> In cases where the motion settled within the specified radius before the profile has
finished, STLTIME = 0. Otherwise, STLTIME [axis_index] = MSTIME[axis_index] - PRFLTIME
[axis_index].
> This feature has two operating modes, which are controlled through SETCONF with key 318,
where index indicates the axis number and the value the mode, value of 0 is the default
and deactivates the feature. See SETCONF documentation for more details.
> Only motions which support TPOS may be used to measure the settle time. These motions
are: PTP, MPTP, and TRACK.
> Once the MST(axis_index).#INTARGC bit is set(1), the STLTIMEC variable holds an updated
value of the axis settling time.
Related ACSPL+ Variables
MSTIMEC, TARGRADC, SETTLEC, MST(axis_index).#INTARGC
Accessibility
Read-Only
COM Library Methods and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadReal
3.9.56 TARGRADA
Description
TARGRADA is a variable designed to define the target radius around which you wish the motion to
settle.
Syntax
TARGRADA(Axis_Index) = Value
Arguments
Axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
Index axes in the system minus 1.
Tag
335
Comments
We compare the distance between current position and target position to the given target radii,
represented by TARGRADA. This indicates if the motor is in the target zone, if it stays in the target
zone for at least SETTLEA time - bit MST.#INTARGA is raised, respectively, and depending on the
operating mode – further inspection will be stopped or continued.
The time from the beginning of motion until first entering the settled zone is represented by
MSTIMEA and is only valid when the #INTARGA bit is on.
Related ACSPL+ Variables
SETTLEA, MST(axis_index).#INTARGA, MSTIMEA
Accessibility
Read-Write
3.9.57 TARGRADB
Description
TARGRADB is a variable designed to define the target radius around which you wish the motion to
settle.
Syntax
TARGRADB(Axis_Index) = Value
Arguments
Axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
Index axes in the system minus 1.
Tag
336
Comments
We compare the distance between current position and target position to the given target radii,
represented by TARGRADB. This indicates if we the motor is in the target zone, if it stays in the
target zone for at least SETTLEB time - bit MST.#INTARGB is raised, respectively, and depending on
the operating mode – further inspection will be stopped or continued.
The time from the beginning of motion until first entering the settled zone is represented by
MSTIMEB and is only valid when the #INTARGB bit is on.
Related ACSPL+ Variables
SETTLEB, MST(axis_index).#INTARGB, MSTIMEB
Accessibility
Read-Write
3.9.58 TARGRADC
Description
TARGRADC is a variable designed to define the target radius around which you wish the motion to
settle.
Syntax
TARGRADC(Axis_Index) = Value
Arguments
Axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
Index axes in the system minus 1.
Tag
337
Comments
We compare the distance between current position and target position to the given target radii,
represented by TARGRADC. This indicates if we the motor is in the target zone, if it stays in the target
zone for at least SETTLEC time - bit MST.#INTARGC is raised, respectively, and depending on the
operating mode – further inspection will be stopped or continued.
The time from the beginning of motion until first entering the settled zone is represented by
MSTIMEC and is only valid when the #INTARGC bit is on.
Related ACSPL+ Variables
SETTLE_C, MST(axis_index).#INTARGC, MSTIMEC
Accessibility
Read-Write
3.9.59 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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
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
TPOS values cannot be modified if protection is applied to this variable through SPiiPlus
MMI Application Studio g Toolbox g Application Development g Protection
3.9.60 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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
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
VEL values cannot be modified if protection is applied to this variable through SPiiPlus
MMI Application Studio g Toolbox g Application Development g Protection
Name Description
3.10.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
Arguments
Tag
93
Comments
ONRATE is set through SPiiPlus MMI Application Studio g Toolbox g Application Development g
Program Manager g 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
3.10.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 and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadInteger
3.10.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 and .NET Library Methods
ReadVariable, GetProgramError
C Library Functions
acsc_ReadInteger, acsc_GetProgramError
3.10.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.
Error codes are found in Table 9-2 and Table 9-3.
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
3.10.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 and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadInteger
3.10.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.
When the #JIT(Just In Time) bit is ON the controller waits for a file loading operation (via MMI or host
application program) and can start executing the commands in the buffer immediately after the
loading process is completed.
The Just in Time buffer acts as a FIFO for the ACSPL+ commands which are read from the file. After
the file is loaded, the buffer can be executed any number of times.
The #JIT bit can be set to ON only if the buffer is empty. Error 3204 “JIT and Dynamic
modes require the buffer to be empty” is returned if the buffer is not empty.
Syntax
PFLAGS(buffer_index).(bit) = 0|1
Arguments
buffer_index buffer index - a number between 0 and 64 (64 being the D-Buffer).
#NOVIEW 6
Supported after applying protection, see
Protection Wizard in the MMI Application Studio
User Guide.
Comments
The bit cannot be applied for the D-Buffer. Attempt to setting the bit for the D-Buffer will result in
error 3200 “JIT is not allowed for D-Buffer”.
Tag
102
Accessibility
Read-Write
PFLAGS(0) #JIT=1
3.10.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.
Tag
103
Accessibility
Read-Only
Related ACSPL+ Variables
PCHARS
COM Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger
3.10.8 PRATE
Description
PRATE is an integer array with one element for each program buffer, each element of which is used
for defining the program execution rate for that buffer.
Syntax
PRATE(buffer_index) = value
Arguments
buffer_ buffer index - a number between 0 and N, N being the number of buffers in
index the product or system.
Tag
104
Comments
PRATE is set through SPiiPlus MMI Application Studio g Toolbox g Application Development g
Program Manager g 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.
Accessibility
Read-Write
3.10.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 5-11.
Table 5-11. PST Bit Description
Tag
105
Accessibility
Read-Only
COM Library Methods and .NET Library Methods
ReadVariable, GetProgramState
C Library Functions
acsc_ReadInteger, acsc_GetProgramState
Name Description
An integer array for each axis containing the encoder error code identified
E_ERR
during the encoder initialization process
ECEXTERR SPiiPlusES EtherCAT error code (based on Application Level Error Code).
FAULT Faults
Name Description
Integer array used for mapping between an axis hardware left limit to a
HLLROUT
specified digital input bit
Store SS1-t channel A time between emergency stop request and drive
SS11TIME
switching to torque off mode
Store SS1-t channel B time between emergency stop request and drive
SS12TIME
switching to torque off mode
Configures the delay time between the STO fault indication and the default
STODELAY
response (disable) to the fault
3.11.1 E_ERR
Description
E_ERR is an integer array for each axis. It contains the encoder error code that was identified during
the encoder initialization process.
The encoder errors range from 5121 to 5128 and are latched in the E_ERR variable. The error codes
are specified in Table 9-5 in the Error Codes section.
Comments
This variable is supported in version 3.00 and higher.
Accessibility
Read-Only
.NET Library Method
ReadVariable()
C Library Function
acsc_ReadInteger()
3.11.2 EC2ERR
Description
EC2ERR is a scalar variable containing an EtherCAT error code referring to the second
EtherCAT network in a Dual EtherCAT system. The EtherCAT error codes are given in Table 9-7.
Syntax
EC2ERR
Arguments
None
Tag
420
Comments
Any EtherCAT error sets EC2ST.#OP to false and the error code is latched in EC2ERR.
Accessibility
Read-Only
COM Library Methods and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadInteger
3.11.3 ECALERR
Description
ECALERR is an integer array for each EtherCAT slave in the configuration (ENI file). It contains the AL
Status Code error of the slave, when the value “0” indicates no error.
Tag
328
Accessibility
Read-Only
.NET Library Method
ReadVariable()
C Library Function
acsc_ReadInteger()
The error codes are defined according to AL Status Code (ETG 1020).
The error codes are listed in Table 9-8.
3.11.4 EC2ALERR
Description
EC2ALERR is an integer array for each EtherCAT slave in the configuration (ENI file) of the second
EtherCAT network in a Dual EtherCAT configuration. It contains the AL Status Code error of the slave,
when the value “0” indicates no error.
Tag
421
Accessibility
Read-Only
.NET Library Method
ReadVariable()
C Library Function
acsc_ReadInteger()
The error codes are defined according to AL Status Code (ETG 1020).
The error codes are listed in Table 9-8.
3.11.5 ECERR
Description
ECERR is a scalar variable containing an EtherCAT error code. The EtherCAT error codes are given in
Table 9-7.
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
COM Library Methods and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadInteger
3.11.6 ECEXTERR
Description
ECEXTER is a scalar (INT) variable representing the EtherCAT error code of the SPiiPlusES (based on
Application Level Error Code). The error code range is 7000-7999. The error codes are specified in
Table 9-8.
Syntax
ECEXTERR
Arguments
None
Comments
If the controller is not SPiiPlusES, the value is always 0.
Tag
323
Accessibility
Read-Only
Com Library Methods and .NET Library Methods
ReadVariable
C Library Functions
Acsc_ReadInteger
3.11.7 ECEXTST
Description
ECEXTST is a scalar (INT) variable representing the EtherCAT state of the slave. The state is reflected
in the relevant bits.
Syntax
ECEXTST
Arguments
None
Comments
Comments
If the controller is not SPiiPlusES, , MP4U, or an IDM device, all bits are 0. If external EtherCAT master
is not connected, the slave is in the INIT state.
Bit 9 #EXTSYNC is relevant for IDMsm only.
Tag
322
Accessibility
Read-Only
Com Library Methods and .NET Library Methods
ReadVariable
C Library Functions
Acsc_ReadInteger
3.11.8 ECST
Description
ECST is a scalar variable affecting the EtherCAT state. The EtherCAT state is reflected in the first six
bits , as shown in Table 5-12.
Table 5-12. ECST Bits
All bus devices are successfully set to INIT state. The Master
2 #INITOK
started all devices to the initial state.
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
COM Library Methods and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadInteger
3.11.9 EC2ST
Description
EC2ST is a scalar variable reflecting the EtherCAT state of the second EtherCAT network in a Dual
EtherCAT configuration. The EtherCAT state is reflected in the first six bits , as shown in Table 5-13.
Table 5-13. EC2ST Bits
All bus devices are successfully set to INIT state. The Master
2 #INITOK
started all devices to the initial state.
Syntax
EC2ST.bit_designator = 1|0
Arguments
None
Tag
419
Comments
EC2ST reflects the EtherCAT state of the second EtherCAT network, if it’s not supported all bits are
OFF.
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
COM Library Methods and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadInteger
3.11.10 ECSYNC
Description
ECSYNC is an integer array with an element for each ACS EtherCAT node in the first EtherCAT
network. The value represents synchronization between the controller and the node.
Syntax
ECSYNC(index)
Arguments
EtherCAT node index
Tag
429
Comments
ECSYNC’s values depend on CTIME and on the product type.
Accessibility
Read-only
.NET Library Methods
ReadVariable
C Library Functions
acsc_ReadInteger
3.11.11 EC2SYNC
EC2SYNC is an integer array with an element for each ACS EtherCAT node in the second EtherCAT
network in a Dual EtherCAT setup. The value represents synchronization between the controller and
the node.
Syntax
EC2SYNC(index)
Arguments
EtherCAT node index
Tag
422
Comments
EC2SYNC values depend on CTIME and on the product type.
Accessibility
Read-only
.NET Library Methods
ReadVariable
C Library Functions
acsc_ReadInteger
3.11.12 ECNST
Description
ECNST is an integer array, each element for ACS EtherCAT node in the first EtherCAT network. The
variable provides information regarding different processes such as GPRT, Data collection and fault
indication.
Syntax
ECNST(index).bit_designator=1|0
Arguments
EtherCAT node index
Tag
430
Comments
If the #SYNC or #GPRT error bit is set in ECNST, there will be a network error in all axes in the first
EtherCAT network, and servo processor alarm in all the axes controlled by the node. These faults
indicate a problem in the interface between the firmware and the node.
The setting of the #SYNC error bit means that the node is out of synchronization with the master.
The setting of the #GPRT error bit means the queue (which has the size of 400) for the GPRT
commands (which are being sent by request) was full and some commands were lost.
The following commands will set the ECNST.#SPRT bit to 1:
> SPINJECT
> SPRT
> ASSIGNPEG/f
> BPTP/2 (20 kHz motion profile)
> FOLLOW (in case of customized servo algorithm for 20 kHz motion profile)
SPINJECT, SPRT, ASSIGNPEG/f, BPTP/2 and FOLLOW are mutually exclusive, meaning only one of
those features can be active at a given time. So the NST.#SPRT bit should be checked before using
any of these commands. FCLEAR for any axis associated with the node will reset all bits of the NST
variable of that node.
Accessibility
Read-only
3.11.13 EC2NST
Description
EC2NST is an integer array, with an element for each ACS EtherCAT node in the second EtherCAT
network.
The variable provides information regarding different processes such as GPRT, data collection and
fault indication.
Syntax
EC2NST(index).bit_designator=1|0
Arguments
EtherCAT node index
Tag
423
Comments
If the #SYNC or #GPRT error bit is set in EC2NST, there will be a network error in all axes in the second
EtherCAT network, and servo processor alarm in all the axes controlled by the node. These faults
indicate a problem in the interface between the firmware and the node.
The setting of the #SYNC error bit means that the node is out of synchronization with the master.
The setting of the #GPRT error bit means the queue (which has the size of 400) for the GPRT
commands (which are being sent by request) was full and some commands were lost.
The following commands will set the EC2NST.#SPRT bit to 1:
> SPINJECT
> SPRT
> ASSIGNPEG/f
> BPTP/2 (20 kHz motion profile)
> FOLLOW (in case of customized servo algorithm for 20 kHz motion profile)
SPINJECT, SPRT, ASSIGNPEG/f, BPTP/2 and FOLLOW are mutually exclusive, meaning only one of the
features can be active at the given time. So the NST/#SPRT bit should be checked before using any
of these commands.
FCLEAR for any axis associated with the node will reset all bits of the NST variable of that node.
Accessibility
Read-only
.NET Library Methods
ReadVariable
C Library Functions
acsc_ReadInteger
3.11.14 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 5-14.
Table 5-14. Axis Fault Bits
Network Error.
2 #NT
1 = EtherCAT network error is activated.
Motor Overheat.
4 #HOT
1 = Motor's temperature sensor indicates overheat.
Drive Alarm.
9 #DRIVE
1 = Signal from the drive reports a failure.
Encoder Error.
10 #ENC
1 = Primary encoder miscounts.
Encoder 2 Error.
11 #ENC2
1 = Secondary encoder miscounts.
Position Error.
1 = Position error (PE) has occurred.
Velocity Limit.
14 #VL 1 = Absolute value of the reference velocity (RVEL) exceeds the
limit defined by the XVEL parameter.
20 N/A
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.
> 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 S_FAULT Fault Bits
Accessibility
Read-Only
3.11.15 FAULTSIM
Description
FAULTSIM is an integer array, with one element for each axis in the system. Each such element
consists of bits representing the errors in the axis or the system itself. This variable is used to
simulate these faults and raising a certain bit will trigger the fault the axis/system thereby raising
FAULT and S_FAULT.
The fault bits are indicated in the following table:
Axis Faults
Network Error
2 #NT
1 = EtherCAT network error is activated
Motor Overheat
4 #HOT
1 = Motor's temperature sensore indicates overheating
Axis Faults
Drive Fault
9 #DRIVE
1 = Signal from the drive reports a failure
Encoder Error
10 #ENC
1 = Primary encoder miscounts.
Encoder 2 Error
11 #ENC2
1 = Secondary encoder miscounts.
Axis Faults
Velocity Limit
14 #VL 1 = Absolute value of the reference velocity (RVEL) exceeds
the limit defined by the XVEL parameter.
Acceleration Limit
15 #AL 1 = Absolute value of the reference acceleration (RACC)
exceeds the limit defined by the XACC parameter.
Current Limit
16 #CL 1 = RMS current calculated in the Servo Processor exceeds
the limit value defined by the XRMS parameter.
Servo Processor
17 #SP 1 = Axis Servo Processor loses its synchronization with the
MPU. The fault indicates a fatal problem in the controller.
System Faults
Program Fault
25 #PROG 1 = Run time error occurs in one of the executing ACSPL+
programs.
Memory Overflow
26 #MEM
1 = User application requires too much memory.
MPU Overuse
27 #TIME 1 = User application consumes too much time in the
controller cycle.
System Faults
Servo Interrupt
File Integrity
1 = The integrity of the user application in controller RAM is
30 #INTGR checked by the controller at power-up and whenever an
#IR
Terminal command is issued.
Component Failure
Axis Faults
When the bus voltage is not supplied to the MC4U, a component failure
fault is reported. The fault is system wide and prevents all axes from
operating unless the fault is masked or bus voltage is supplied to the
power supply.
When a component failure is reported, the affected power supply is
identified by its address. To determine the faulty unit, use the MMI
System Viewer and Diagnostics
Tag
332
Comments
This variable allows you to simulate Axis & System faults, by raising a certain bit on a given axis –
you effectively set the fault and the appropriate response will be triggered.
In order to reset some faults you must use FCLEAR command, setting the FAULTSIM bit
to 0 might not be enough.
FAULTSIM variable is not saved to flash and will be reset upon controller restart.
FAULTSIM variable does not interact with SAFINI/SAFIN variables and therefore does not affect the
variables.
Accessibility
Read/Write
Related ACSPL+ Variables
FAULT, S_FAULT, SAFINI, S_SAFINI, FMASK, S_FMASK
3.11.16 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
Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number
axis_index
of axes in the system minus 1.
bit_designator The FDEF bit designators are given in FDEF Bit Description.
>Motor Overheat
Encoder 2 Error
11 #ENC2 1 = Secondary encoder Same as #ENC.
miscounts.
Position Error.
1 = Position error (PE) has
occurred.
PE is defined by the
following variables:
> ERRI - Maximum
position error
while the axis is
idle
12 #PE > ERRB - None.
Maximum
position error
while the axis is
moving with
constant velocity
> DELI - Delay on
transition from
ERRA to ERRI
> DELV - Delay on
transition from
ERRA to ERRV
>Velocity Limit
1 = Absolute value of the The controller kills the violating
14 #VL reference velocity (RVEL) axis.
exceeds the limit defined
by the XVEL parameter.
>Acceleration Limit
1 = Absolute value of the
reference acceleration The controller kills the violating
15 #AL
(RACC) exceeds the limit axis.
defined by the XACC
parameter.
Current Limit
1 = RMS current
calculated in the Servo The controller disables the
16 #CL
Processor exceeds the violating axis.
limit value defined by the
XRMS XpRarameter.
20 N/A
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
FDEF values cannot be modified if protection is applied to this variable through SPiiPlus
MMI Application Studio g Toolbox g Application Development g Protection
3.11.17 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
Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number
axis_index
of axes in the system minus 1.
bit_designator The FDEF bit designators are given in FMASK Bit Description.
Network Error
2 #NT
1 = EtherCAT network error detected.
Motor Overheat
4 #HOT
1 = Motor's temperature sensor indicates overheat.
Drive Fault
9 #DRIVE
1 = Signal from the drive reports a failure.
Encoder Error
10 #ENC
1 = Primary encoder miscounts.
Encoder 2 Error
11 #ENC2
1 = Secondary encoder miscounts.
Position Error
1 = Position error (PE) has occurred.
Velocity Limit
14 #VL 1 = Absolute value of the reference velocity (RVEL) exceeds the
limit defined by the XVEL parameter.
Current Limit
16 #CL 1 = RMS current calculated in the Servo Processor exceeds the
limit value defined by the XRMS parameter.
20 N/A
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.
Accessibility
Read-Write
3.11.18 HLLROUT
Description
HLLROUT is an integer array with one element for each axis in the system, and it is used for mapping
the hardware left limit of an axis to a specified digital input bit (ACSPL+ IN).
Syntax
HLLROUT(Axis_Index) = value
Arguments
Designates the specific axis. Valid numbers are: 0, 1, 2, ... up to the number of
Axis
axes in the system minus 1.
Tag
379
Comments
A value of -1 disables the mapping of the digital input to the hardware limit and restores the default
behavior.
The following errors are supported:
> Error 3329: “Invalid value, digital input index should range between 0-99 and bit index
should range between 0-31”
> Error 3332: “Hardware limit swapping(MFLAGSX.#HLIMSWAP) and limit routing are mutually
exclusive”
The following diagram illustrates the behavior of the firmware when the left limit signal is set:
Accessibility
Read-Write
COM Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal
3.11.19 HRLROUT
Description
HRLROUT is an integer array with one element for each axis in the system, and it is used for
mapping the hardware right limit of an axis to a specified digital input bit (ACSPL+ IN).
Syntax
HRLROUT(Axis_Index) = value
Arguments
Designates the specific axis. Valid numbers are: 0, 1, 2, ... up to the number of
Axis
axes in the system minus 1.
Tag
379
Comments
A value of -1 disables the mapping of the digital input to the hardware limit and restores the default
behavior.
The following errors are supported:
> Error 3329: “Invalid value, digital input index should range between 0-99 and bit index
should range between 0-31”
> Error 3332: “Hardware limit swapping(MFLAGSX.#HLIMSWAP) and limit routing are mutually
exclusive”
The following diagram illustrates the behavior of the firmware when the left limit signal is set:
Accessibility
Read-Write
COM Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal
3.11.20 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.
An error code= 5027, "Motor Failed: Servo Processor Alarm" fault is activated when an
axes does not have a physical drive associated to it.
3.11.21 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.
SAFIN(<axis>).17 (#STO1) and SAFIN(<axis>).18 (#STO2) present the status of the emergency stop
request (24V switched off).
#SS11 19 Status of switching in the torque off mode (5V switched off)
#SS12 20 Status of switching in the torque off mode (5V switched off)
Accessibility
Read-Only
3.11.22 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
Tag
122
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.
Accessibility
Read-Write
3.11.23 S_ERR
Description
S_ERR is a scalar integer that contains the code of the initialization error set during powerup.
The error codes are specified in Table 9-6.
Tag
113
Accessibility
Read-Only
Related ACSPL+ Variables
None
COM Library Methods and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadInteger
3.11.24 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 5-18.
Axis Faults
Network Error.
2 #NT
1 = EtherCAT network error is activated.
Motor Overheat
4 #HOT
1 = Motor's temperature sensor indicates overheat.
Drive Fault
9 #DRIVE
1 = Signal from the drive reports a failure.
Encoder Error
10 #ENC
1 = Primary encoder miscounts.
Encoder 2 Error
11 #ENC2
1 = Secondary encoder miscounts.
Position Error
1 = Position error (PE) has occurred.
Velocity Limit.
14 #VL 1 = Absolute value of the reference velocity (RVEL) exceeds the
limit defined by the XVEL parameter.
Acceleration Limit
15 #AL 1 = Absolute value of the reference acceleration (RACC)
exceeds the limit defined by the XACC parameter.
Current Limit
16 #CL 1 = RMS current calculated in the Servo Processor exceeds the
limit value defined by the XRMS parameter.
System Faults
Program Fault
25 #PROG 1 = Run time error occurs in one of the executing ACSPL+
programs.
Memory Overflow
26 #MEM
1 = User application requires too much memory.
MPU Overuse
27 #TIME 1 = User application consumes too much time in the controller
cycle.
Servo Interrupt
29 #INT 1 = The servo interrupt that defines the controller cycle is not
generated. The fault indicates a fatal controller problem.
File Integrity
Component Failure
1 = An MC4U hardware component other than the drive, such
as the Power Supply, I/O card, or encoder card, has failed.
When the bus voltage is not supplied to the MC4U, a
31 #FAILURE component failure fault is reported. The fault is system wide
and prevents all axes from operating unless the fault is
masked or bus voltage is supplied to the power supply.
When a component failure is reported, the affected power
supply is identified by its address. To determine the faulty unit,
use the MMI System Viewer and Diagnostics
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
3.11.25 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 5-19.
S_SETUP.#USGTEMP = 0: No
response
24 #TEMP MPU Overheat
S_SETUP.#USGTEMP=1: Default
response is to disable all axes
Program Fault
25 #PROG 1 = Run time error occurs The controller kills all axes.
in one of the executing
ACSPL+ programs.
Memory Overflow
MPU Overuse
1 = User application
27 #TIME consumes too much No default response.
time in the controller
cycle.
Servo Interrupt
1 = The servo interrupt
that defines the
29 #INT controller cycle is not The controller disables all axes.
generated. The fault
indicates a fatal
controller problem.
File Integrity
1 = The integrity of the
user application in
controller RAM is
30 #INTGR checked by the No default response
controller at power-up
and whenever an #IR
Terminal command is
issued.
Component Failure
1 = An MC4U hardware
No default response
component other than
31 #FAILURE the drive, such as the The user has to supply a user-
Power Supply, I/O card, defined fault response.
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
C Library Functions
acsc_ReadInteger, acsc_WriteInteger, acsc_GetResponseMask, acsc_SetResponseMask, acsc_
GetFaultMask, acsc_SetFaultMask
3.11.26 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 5-20.
Program Fault
25 #PROG 1 = Run time error occurs in one of the executing ACSPL+
programs.
Memory Overflow
26 #MEM
1 = User application requires too much memory.
MPU Overuse
27 #TIME 1 = User application consumes too much time in the controller
cycle.
Servo Interrupt
29 #INT 1 = The servo interrupt that defines the controller cycle is not
generated. The fault indicates a fatal controller problem.
File Integrity
Component Failure
31 #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
3.11.27 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 and indicates the #FAILURE bit (system fault) stored in the S_FAULT
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.
Accessibility
Read-Only
Related ACSPL+ Variables
FAULT, S_FAULT, FDEF, S_FDEF, FMASK, S_FMASK, SAFIN, SAFINI, S_SAFINI
COM Library Methods and .NET Library Methods
ReadVariable, GetSafetyInputPort
C Library Functions
acsc_ReadInteger, acsc_GetSafetyInputPort
3.11.28 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.
Accessibility
Read-Write
C Library Functions
acsc_ReadInteger, acsc_WriteInteger, acsc_SetSafetyInputPortInv, acsc_GetSafetyInputPortInv
3.11.29 SS11TIME
Description
SS11TIME is a integer array with one element for each EtherCAT node in the system, the elements of
which store the last SS1-t channel A time between the emergency stop request (24V switched off)
and the point in time when the drive in fact switched the torque off mode (5V switched off). The
value ranges between 0 and 500. The user can read this value in order to determine whether the
system stops motion within the time required by the system functional safety requirements.
Tag
373
Comments
This variable is supported in version 3.00 and higher
Accessibility
Read-Only
Related ACSPL+ Variables
SS12TIME
COM Library Methods and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadReal
3.11.30 SS12TIME
Description
SS12TIME is a integer array with one element for each EtherCAT node in the system, the elements of
which store the last SS1-t channel B time between the emergency stop request (24V switched off)
and the point in time when the drive in fact switched the torque off mode (5V switched off). The
value ranges between 0 and 500. The user can read this value in order to determine whether the
system stops motion within the time required by the system functional safety requirements.
Tag
374
Comments
This variable is supported in version 3.00 and higher
Accessibility
Read-Only
Related ACSPL+ Variables
SS11TIME
COM Library Methods and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadReal
3.11.31 STODELAY
Description
STODELAY is a real array, with one element for each axis in the system. It is used to configure the
delay time between the STO fault indication and the default response (disable) to the fault. During
this time the user can activate his own response (auto-routine) to kill the motion.
Syntax
STODELAY(axis) = value
Arguments
Tag
319
Comments
In devices supporting STO, but not SS1-t, the bridges are cut off after STODELAY has elapsed. During
that interval KILL or DECEL commands may be sent.
Accessibility
Read-Write
COM Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal
3.11.32 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 and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadInteger
AB2 amplifiers are not supported by SPiiPlus ADK Suite 2.40 or later. If AB2 amplifiers are
used and there is not a need to upgrade the FW, it is recommended to continue using
FW 2.30.03.
If an upgrade is needed, consult ACS Applications and the relevant DSP will be provided.
To activate the Nanomotion algorithm set the seventh bit of MFLAGS variable to 1
> MFLAGS(<axis>).7= 1, or alternatively MFLAGS(<axis>).#NANO = 1
The following variables should be used in support of Nanomotion piezo-ceramic motor motion:
Name Description
Parameter which specifies the minimum position of the Dead Zone (when
SLDZMIN
the servo is turned off)
Parameter which specifies the maximum position of the Dead Zone (when
SLDZMAX
the servo is turned on).
Parameter which specifies the duration (in msec) required for settling after
SLDZTIME
entering the SLDZMIN.
Parameter which specifies the distance from target to stop the velocity
SLZFF
Feed Forward.
Name Description
SLHRS Parameter which specifies the modulation ratio of the drive command.
Parameter which specifies the multiplication factor of the velocity loop gain
SLVKPDCF
(SLVKP) in DC mode.
Parameter which specifies the multiplication factor of the position loop gain
SLPKPDCF
(SLPKP) in DC mode.
3.12.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 (when Servo is turned off).
Syntax
SLDZMIN(axis_index) = value
Arguments
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 (with an equivilant value in user units).
Accessibility
Read-Write
3.12.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
Arguments
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 (with an equivilant value in user units).
Accessibility
Read-Write
3.12.3 SLDZTIME
Description
SLDZTIME is a real array, with one element for each axis in the system, which defines the duration
(in msec) required for settling after entering the SLDZMIN. Only after this duration the controller
starts monitoring the position error and returns the servo if |PE| exceeds SLDZMAX.
Syntax
SLDZTIME(axis_index) = value
Arguments
Tag
251
Accessibility
Read-Write
3.12.4 SLZFF
Description
SLZFF is a real array, with one element for each axis in the system, and is used for defining the
distance from target to stop the velocity Feed Forward.
Syntax
SLZFF(axis_index) = value
Arguments
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 [Link]:
> For an HR1 motor with encoder resolution of 0.1µM, set SLZFF to 100 - 300 counts (with an
equivilant value in user units).
> For an HR8 motor with encoder resolution of 0.1µM, set SLZFF to 300 - 400 counts (with an
equivilant value in user units).
Accessibility
Read-Write
SLZFF values cannot be modified if protection is applied to this variable through SPiiPlus
MMI Application Studio g Toolbox g Application Development g Protection
3.12.5 SLFRC
Description
SLFRC is a real array, with one element for each axis in the system, which defines initial non-zero
command to overcome the static friction in a positive direction.
Syntax
SLFRC(axis_index) = value
Arguments
Tag
167
Comments
SLFRC is expressed as a percentage of the maximum output.
Accessibility
Read-Write
SLFRC values cannot be modified if protection is applied to this variable through SPiiPlus
MMI Application Studio g Toolbox g Application Development g Protection
3.12.6 SLFRCN
Description
SLFRCN is a real array, with one element for each axis in the system, which defines initial non-zero
command to overcome the static friction in a negative direction.
Syntax
SLFRCN(axis_index) = value
Arguments
Tag
250
Comments
SLFRCN is expressed as a percentage of the maximum output.
Accessibility
Read-Write
3.12.7 SLHRS
Description:
SLHRS is a real array, with one element for each axis in the system, which defines the modulation
ratio of the drive command.
Syntax:
SLHRS(axis_index) = value
Arguments
Tag:
169
Accessibility
Read-Write
DCOM values cannot be modified if protection is applied to this variable through SPiiPlus
MMI Application Studio g Toolbox g Application Development g Protection
3.12.8 SLVKPDCF
Description
SLVKPDCF is a real array, with one element for each axis in the system, which defines multiplication
factor of the velocity loop gain (SLVKP) in DC mode. The normal gain is increased by setting a
SLVKPDCF value larger than 1.
Syntax
SLPKPDCF axis_index = value
Arguments
Tag
252
Accessibility
Read-Write
3.12.9 SLPKPDCF
Description
SLPKPDCF is a real array, with one element for each axis in the system, which defines multiplication
factor of the position loop gain (SLPKP) in DC mode. The normal gain is increased by setting the
SLPKPDCF to a value larger than 1.
Syntax
SLPKPDCF axis_index = value
Arguments
Tag
253
Accessibility
Read-Write
3.12.10 SLVKIDCF
Description
SLVKIDCF is a real array, with one element for each axis in the system, which defines multiplication
factor of the velocity loop integrator (SLVKI) in DC mode. The normal gain is increased by setting the
SLVKIDCF to a value larger than 1.
Syntax
SLVKIDCF axis_index = value
Arguments
Tag
254
Accessibility
Read-Write
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 g Setup g Adjuster.
The Servo-Loop variable is:
Name Description
3.13.1 DCOM
Description
DCOM is a real array, with one element for each axis in the system. It is used for defining the
commanded current as a percentage of the maximum drive command..
Syntax
DCOM(axis_index) = value
Arguments
Tag
20
Comments
When operating in the open loop mode (MFLAGS.1=1), DCOM supplies this current directly to the
motor windings.
DCOM defines a percentage of the maximum drive command, for example, the UDI 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 offsets the normal commanded
output current from the drive..
Accessibility
Read-Write
DCOM values cannot be modified if protection is applied to this variable through SPiiPlus
MMI Application Studio g Toolbox g Application Development g Protection
Name Description
[Link] SLBIASA
Description
SLBIASA is a real array, with one element for each axis in the system, and is used for defining offset
of the current in phase "S" or offset in command of phase "S".
Syntax
SLBIASA(axis_index) = value
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
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.
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)
[Link] SLBIASB
Description
SLBIASB is a real array, with one element for each axis in the system, and is used for defining offset
of the current in phase "T" or offset in command of phase "T".
Syntax
SLBIASB(axis_index) = value
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
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.
Accessibility
Read-Only (integrated models)
Read-Write (nonintegrated models)
C Library Functions
acsc_ReadReal, acsc_WriteReal
[Link] SLBIASC
Description
SLBIASC is a real array, with one element for each axis in the system, and is used for defining offset
of the current in phase "R" or offset in command of phase "R".
Syntax
SLBIASC(axis_index)=value
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
404
Comments
SLBIASC is expressed as a percentage of the maximum controller voltage output.
1. For integrated models: SLBIASC is read-only and displays the measured value of the current
input bias.
2. For non-integrated models: SLBIASC is read-write and specifies the bias of the drive output.
The controller uses the value only for brushless motors commutated by the controller.
Related ACSPL+ Variables
SLBIASA, SLBIASB
Accessibility
Read-Only (integrated models)
Read-Write (nonintegrated models)
[Link] SLIKI
Description
SLIKI is a real array, with one element for each axis in the system, and is used for specifying the
current loop.
Syntax
SLIKI(axis_index) = value
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
170
Comments
SLIKI is active only in integrated models.
Accessibility
Read-Write
SLIKI values cannot be modified if protection is applied to this variable through SPiiPlus
MMI Application Studio g Toolbox g Application Development g Protection
[Link] SLIKP
Description
SLIKP is a real array, with one element for each axis in the system, and is used for specifying the
current loop proportional coefficient.
Syntax
SLIKP(axis_index) = value
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
171
Comments
SLIKP is active only in integrated models.
Accessibility
Read-Write
SLIKP values cannot be modified if protection is applied to this variable through SPiiPlus
MMI Application Studio g Toolbox g Application Development g Protection
[Link] 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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
226
Accessibility
Read-Write
[Link] 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
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
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
g Toolbox g Setup g Adjuster Wizard).
Accessibility
Read-Write
[Link] 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
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
221
Comments
It is recommended to set value SLILI(axis)=97 to get a higher speed only for SPiiPlus
CMnt, SPiiPlus UDMpm and SPiiPlus UDMpc
Name Description
Name Description
[Link] SLCRAT
Description
SLCRAT is a real array, with one element for each axis in the system defining the ratio between the
velocity feedback resolution and the commutation feedback resolution. It is used during the
commutation phase.
Syntax
SLCRAT(axis_index)
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
154
Accessibility
Read-Write
[Link] 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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
179
Accessibility
Read-Write
SLVKI values cannot be modified if protection is applied to this variable through SPiiPlus
MMI Application Studio g Toolbox g Application Development g Protection
[Link] 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 theSLVKI (Integrator Gain - Velocity) variable.
Syntax
SLVKIIF axis_index = value
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
233
Accessibility
Read-Write
[Link] 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
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
234
Accessibility
Read-Write
[Link] SLVKITF
Description
SLVKITF increases the velocity loop integrator coefficient when the axis is close to the target
position. It is a real array with one element for each axis in the system.
Syntax
SLVKITF axis_index = value
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
271
Accessibility
Read-Write
COM Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal
[Link] SLVKP
Description
SLVKP is a real array, with one element for each axis in the system, and is used for specifying the
velocity loop proportional coefficient.
Syntax
SLVKP(axis_index) = value
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
180
Accessibility
Read-Write
[Link] 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
SLVKPIF axis_index = value
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
235
Accessibility
Read-Write
[Link] 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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
236
Accessibility
Read-Write
[Link] SLVKPTF
Description
SLVKPTF increases the velocity loop proportional coefficient when the axis is close to the target
position. It is a real array with one element for each axis in the system.
Syntax
SLVKPTF axis_index = value
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
272
Accessibility
Read-Write
COM Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal
[Link] 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
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
181
Comments
SLVLI is expressed as a percentage of the maximum value.
Accessibility
Read-Write
SLVLI values cannot be modified if protection is applied to this variable through SPiiPlus
MMI Application Studio g Toolbox g Application Development g Protection
[Link] SLVRAT
Description
SLVRAT is a real array, with one element for each axis in the system. SLVRAT is used for defining the
velocity feed forward ratio. In the Servo Processor Stepper Algorithm it is used to define the ratio
between the encoder pulses and the number of motor steps,
In dual loop systems it is used for the ratio between the position resolution and the velocity
resolution.
Syntax
SLVRAT(axis_index)
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
187
Comments
Velocity feed forward compensates for the velocity feedback, achieving zero position error at
constant velocity.
Accessibility
Read-Write
Name Description
[Link] 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.
Syntax
SLVNFRQ(axis_index) = value
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
182
Comments
SLVNFRQ is expressed in Hz.
Accessibility
Read-Write
[Link] 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.
Syntax
SLVNWID(axis_index) = value
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
183
Comments
SLVNWID is expressed in Hz.
Accessibility
Read-Write
[Link] 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 at frequency specified by SLVNFRQ.
Syntax
SLVNATT(axis_index) = value
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
184
Accessibility
Read-Write
Name Description
[Link] 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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
185
Comments
SLVSOF is expressed in Hz.
Accessibility
Read-Write
[Link] 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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
186
Accessibility
Read-Write
Name Description
[Link] 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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
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
[Link] SLVB0DF
Description
SLVB0DF is a real array, with one element for each axis in the system, and is used for setting the
denominator natural frequency 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
Arguments
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
[Link] 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
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
[Link] SLVB0NF
Description
SLVB0NF is a real array, with one element for each axis in the system, and is used for setting the
numerator natural frequency 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
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.
Accessibility
Read-Write
Name Description
SLPKIIF Provides the Idle Factor to the SLPKI (Integrator Gain - Position) variable
SLPKISF Provides the Settle Factor to the SLPKI (Integrator Gain - Position) variable
SLPLI Defines the limit for the position of the specified axis
SLPKP Sets the proportional coefficient of the position for the specified axis.
[Link] 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
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index 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
[Link] 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
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
230
Accessibility
Read-Write
[Link] 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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
207
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
[Link] SLPKI
Description
SLPKI is a real array, with one element for each axis in the system, and is used for specifying the
position loop integrator coefficient.
Syntax
SLPKI(axis_index) = value
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
174
Accessibility
Read-Write
COM Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal
[Link] SLPKIIF
Description
SLPKIIF is a real array with one element for each axis in the system. It is used for providing an Idle
Factor to the SLPKI (Integrator Gain - Position) variable.
Syntax
SLPKIIF(axis_index) = value
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
260
Accessibility
Read-Write
COM Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal
acsc_ReadReal, acsc_WriteReal
[Link] SLPKISF
Description
SLPKISF is a real array with one element for each axis in the system. It is used for providing a Settle
Factor to the SLPKI (Integrator Gain - Position) variable.
Syntax
SLPKISF(axis_index) = value
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
261
Accessibility
Read-Write
COM Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal
[Link] SLPKITF
Description
SLPKITF increases the velocity loop proportional coefficient when the axis is close to the target
position. It is a real array with one element for each axis in the system.
Syntax
SLPKITF(axis_index) = value
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
269
Accessibility
Read-Write
COM Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal
[Link] SLPLI
Description
SLPLI is a real array, with one element for each axis in the system, and is used for providing an
integrator limit for the position of the specified axis.
Syntax
SLPLI(axis_index) = value
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
176
Accessibility
Read-Write
COM Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal
[Link] 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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
175
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
[Link] 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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
231
Accessibility
Read-Write
[Link] 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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
232
Accessibility
Read-Write
[Link] SLPKPTF
Description
SLPKPTF increases the position loop proportional coefficient when the axis is close to the target
position. It is a real array with one element for each axis in the system.
Syntax
SLPKPTF axis_index = value
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
270
Accessibility
Read-Write
COM Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal
Name Description
[Link] 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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
148
Accessibility
Read-Write
SLAFF values cannot be modified if protection is applied to this variable through SPiiPlus
MMI Application Studio g Toolbox g Application Development g Protection
[Link] 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
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
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
Name Description
[Link] SLSDZ
Description
SLSDZ is a real array with one element for each axis in the system, used for the closed loop
operation of steppers and representing the dead zone of the position correction. This value takes
effect only if MFLAGSX bits 0 or 1 are set to 1.
Syntax
SLSDZ(Axis_Index) = Value
Arguments
Axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
Index axes in the system minus 1.
Tag
356
Comments
Dead zone [user units]. Inside this zone (|PE| < SLSDZ) algorithm is inactive.
This variable is supported in ADK versions 2.70 and higher.
Related ACSPL+ Variables
SLSKI, SLSKP, SLSRL, MFLAGSX
Accessibility
Read-Write
SLSDZ values cannot be modified if protection is applied to this variable through SPiiPlus
MMI Application Studio→Toolbox→Application Development→ Protection
[Link] SLSKI
Description
SLSKI is a real array with one element for each axis in the system, it is used for the closed loop
operation of steppers and represents the integral gain[rad/sec] of the position correction. This value
takes effect only if MFLAGSX bits 0 or 1 are set to 1.
Syntax
SLSKI(Axis_Index) = Value
Arguments
Axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
Index axes in the system minus 1.
Tag
353
Comments
This variable is supported in ADK versions 2.70 and higher.
Related ACSPL+ Variables
SLSKP, SLSRL, SLSDZ
Accessibility
Read-Write
SLSKI values cannot be modified if protection is applied to this variable through SPiiPlus
MMI Application Studio→Toolbox→Application Development→ Protection
[Link] SLSKP
Description
SLSKP is a real array with one element for each axis in the system, it is used for the closed loop
operation of steppers and represents proportional gain of the position [Link] value takes
effect only if MFLAGSX bits 0 or 1 are set to 1.
Syntax
SLSKP(Axis_Index) = Value
Arguments
Axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
Index axes in the system minus 1.
Tag
354
Comments
Proportional gain is unitless.
This variable is supported in ADK versions 2.70 and higher.
SLSKP values cannot be modified if protection is applied to this variable through SPiiPlus
MMI Application Studio→Toolbox→Application Development→ Protection
[Link] SLSMC
Description
SLSMC is a real array with one element for each axis in the system, it is used for the closed loop
operation of steppers and represents the maximum allowed stepper correction. This value takes
effect only if MFLAGSX bits 0 or 1 are set to 1.
Syntax
SLSMC(Axis_Index) = Value
Arguments
Axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
Index axes in the system minus 1.
Tag
360
Comments
Maximum correction value [user units]. If this value is reached FAULT.#PE is set.
This variable is supported in ADK versions 2.70 and higher.
Related ACSPL+ Variables
SLSKI, SLSKP, SLSRL, SLSOUT, MFLAGSX
Accessibility
Read-Write
[Link] SLSOUT
Description
SLSOUT is a real array with one element for each axis in the system, it is used for the closed loop
operation of steppers and represents the calculated stepper correction. This value takes effect only
if MFLAGSX bits 0 or 1 are set to 1.
Syntax
SLSOUT(Axis_Index)
Arguments
Axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
Index axes in the system minus 1.
Tag
359
Comments
Output of the PI loop [user units].
This variable is supported in ADK versions 2.70 and higher.
SLSOUT is reset upon disabling of an axis, or upon setting RPOS using the set command.
Related ACSPL+ Variables
SLSKI, SLSKP, SLSRL, MFLAGSX
Accessibility
Read only
.NET Library Method
ReadVariable()
C Library Function
acsc_ReadInteger()
[Link] SLSRL
Description
SLSRL is a real array with one element for each axis in the system, it is used for the closed loop
operation of steppers and represents the rate limiter of the position correction. This value takes
effect only if MFLAGSX bits 0, 1 or 2 are set to 1.
Syntax
SLSRL(Axis_Index) = Value
Arguments
Axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
Index axes in the system minus 1.
Tag
355
Comments
Rate limiter of the PI output [user unit/sec].
This variable is supported in ADK versions 2.70 and higher.
Related ACSPL+ Variables
SLSKI, SLSKP, SLSDZ
Accessibility
Read-Write
SLSRL values cannot be modified if protection is applied to this variable through SPiiPlus
MMI Application Studio→Toolbox→Application Development→ Protection
Name Description
Name Description
[Link] 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.
Syntax
SLCROUT(axis_index) = value
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
The value values and the feedback sources associated with them are given in
value
Table 5-21. Default = 0.
003 N/A
103 N/A
203 N/A
303 N/A
Tag
159
Accessibility
Read-Write
Comments
The values [n06] are available only for products that support disabling of velocity commutation.
COM Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger
[Link] SLGCAXN
Description
SLGCAXN is a read-only integer array, with one element for each axis in the system, which specifies
the complementary gantry axis. The value can be viewed SPiiPlus MMI Application Studio
Communication Terminal window or its value can be assigned to another variable, for example:
Var = SLGCAXN(axis_index).
Syntax
SLGCAXN(axis_index)
Arguments
Tag
256
Accessibility
Read Only
COM Library Methods and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadInteger
[Link] 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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
The value values and the feedback sources associated with them are given in
value
Table 5-22. Default = 0.
SLPROUT FPOS
003 N/A
103 N/A
203 N/A
303 N/A
SLPROUT FPOS
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.
The values [n06] are available only for products that support disabling of position feedback.
Accessibility
Read-Write
[Link] 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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
The value values and the feedback sources associated with them are given in
value
Table 5-23. Default = 0.
003 N/A
103 N/A
203 N/A
303 N/A
Tag
188
Accessibility
Read-Write
Comments
The values [n06] are available only for products that support disabling of velocity feedback.
COM Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal
[Link] 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.
Syntax
SLCROUT(axis_index) = value
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
The value values and the feedback sources associated with them are given in
value
Table 5-24. Default = 0.
003 N/A
103 N/A
203 N/A
303 N/A
Tag
159
Accessibility
Read-Write
Comments
The values [n06] are available only for products that support disabling of velocity commutation.
COM Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger
[Link] SLP2ROUT
SPL2ROUT is variable for setting the feedback routing of the secondary feedback position, which can
be monitored using F2POS.
Description
SLP2ROUT is an integer array, one element for each axis in the system, and is used for setting the
feedback routing of the secondary feedback position for the specified axis.
Syntax
SLP2ROUT(<axis>)=value
Arguments
The value values and the feedback sources associated with them are given below. The default value
is 0.
Value F2POS
Value F2POS
003 N/A
103 N/A
203 N/A
303 N/A
Comments
SLP2ROUT variable can be used for routing when applied on secondary feedback only.
In a system configured for Multi-Channel Feedback, SLP2ROUT is used in a different way.
Example
E_TYPE(0)=3 ! AqB
E2_TYPE(0) = 4 ! SinCos
SLP2ROUT(0) = 002 ! Routed to match the secondary encoder
Tag
301
Accessibility
Read-Write
Com Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger
[Link] SLTFWID
Description
SLTFWID determines the distance to the target at which the position and velocity loops gains will be
increased by 50%. It is a real array with one element for each axis in the system.
Syntax
SLTFWID(axis_index) = value
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
273
Accessibility
Read-Write
COM Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal
Name Description
SLPAP Holds the exponent (α) of the Position-Loop Proportional Non-Linear Control
SLPDP The Linear Range (δ) of the Position-Loop Proportional Non-Linear Control
SLPDI The Linear Range (δ) of the Position-Loop Integral Non-Linear Control
SLVDP The Linear Range (δ) of the Velocity-Loop Proportional Non-Linear Control
[Link] SLPAP
Description
SLPAP is a real array, the size of which is determined by the total number of axes in the system.
SLPAP holds the exponent (α) of the Position-Loop Proportional Non-Linear Control.
Syntax
SLPAP(index) = value
Tag
395
Comments
This variable is supported in version 3.10 and higher.
Accessibility
Read-Write
COM Library Methods and .NET Library Methods
ReadVariable(), WriteVariable()
C Library Functions
acsc_ReadReal(), acsc_WriteReal()
[Link] SLPDP
Description
SLPDP is a real array, the size of which is determined by the total number of axes in the system. This
is the Linear Range (δ) of the Position-Loop Proportional Non-Linear Control.
Syntax
SLPDP(index) = value
Arguments
Tag
Comments
A value of 1 sets the Linear range of the Non-Linear Gain curve to the Position-Error Limit.
If the value is not default and the required license for this feature is missing, error 3300 “Non Linear
Control License is required” is given.
This variable is supported in version 3.10 and higher.
Related ACSPL+ Variables
SLPAP, SLPAI, SLPDI, SLVAP, SLVDP, SLVAI, SLVDI
Accessibility
Read-Write
COM Library Methods and .NET Library Methods
ReadVariable(), WriteVariable()
C Library Functions
acsc_ReadReal(), acsc_WriteReal()
[Link] SLPAI
Description
SLPAI is a real array, the size of which is determined by the total number of axes in the system. This
is the exponent (α) of the Position-Loop Integral Non-Linear Control.
Syntax
SLPAI(index) = value
Arguments
Axis:
index
0, 1, 2, ..., up to total number of axes in system minus 1
Tag
Comments
A value of 1 sets the Linear Range of the Non-Linear Gain curve to the Position-Error Limit.
If the value is not default and the required license for this feature is missing, error 3300 “Non Linear
Control License is required” is given.
This variable is supported in version 3.10 and higher.
[Link] SLPDI
Description
SLPDI is a real array, the size of which is determined by the total number of axes in the system. This
is the Linear Range (δ) of the Position-Loop Integral Non-Linear Control.
Syntax
SLPDI(index) = value
Arguments
Axis:
index
0, 1, 2, ..., up to total number of axes in system minus 1
Tag
398
Comments
A value of 1 sets the Linear Range of the Non-Linear Gain curve to the Position-Error Limit.
If the value is not default and the required license for this feature is missing, error 3300 “Non Linear
Control License is required” is given.
This variable is supported in version 3.10 and higher.
Related ACSPL+ Variables
SLPAP, SLPDP, SLPAI, SLVAP, SLVDP, SLVAI, SLVDI
Accessibility
Read-Write
COM Library Methods and .NET Library Methods
ReadVariable(), WriteVariable()
C Library Functions
acsc_ReadReal(), acsc_WriteReal()
[Link] SLVAP
Description
SLVAP is a real array, the size of which is determined by the total number of axes in the system. This
is the exponent (α) of the Velocity-Loop Proportional Non-Linear Control.
Syntax
SLVAP(index) = value
Arguments
Axis:
index
0, 1, 2, ..., up to total number of axes in system minus 1
Tag
Comments
A value of 1 sets the Velocity-Loop Proportional Gain to Linear.
If the value is not default and the required license for this feature is missing, error 3300 “Non Linear
Control License is required” is given.
This variable is supported in version 3.10 and higher.
Related ACSPL+ Variables
SLPAP, SLPDP, SLPAI, SLPDI, SLVDP, SLVAI, SLVDI
Accessibility
Read-Write
COM Library Methods and .NET Library Methods
ReadVariable(), WriteVariable()
C Library Functions
acsc_ReadReal(), acsc_WriteReal()
[Link] SLVDP
Description
SLVDP is a real array, the size of which is determined by the total number of axes in the system. This
is the Linear Range (δ) of the Velocity-Loop Proportional Non-Linear Control.
Syntax
SLVDP(index) = value
Arguments
Axis:
index
0, 1, 2, ..., up to total number of axes in system minus 1
value
Switches
Return Value
None
Tag
400
Comments
This variable is supported in version 3.10 and higher.
Example
[Link] SLVAI
Description
SLVAI is a real array, the size of which is determined by the total number of axes in the system. This
is the exponent (α) of the Velocity-Loop Integral Non-Linear Control.
Syntax
SLVAI(index) = value
Arguments
Axis:
index
0, 1, 2, ..., up to total number of axes in system minus 1
Tag
401
Comments
A value of 1 sets the Velocity-Loop Integral Gain to Linear.
If the value is not default and the required license for this feature is missing, error 3300 “Non Linear
Control License is required” is given.
This variable is supported in version 3.10 and higher.
Related ACSPL+ Variables
SLPAP, SLPDP, SLPAI, SLPDI, SLVDP, SLVAI, SLVDI
Accessibility
Read-Write
COM Library Methods and .NET Library Methods
ReadVariable(), WriteVariable()
C Library Functions
acsc_ReadReal(), acsc_WriteReal()
[Link] SLVDI
Description
SLVDI is a real array, the size of which is determined by the total number of axes in the system. This
is the Linear Range (δ) of the Velocity-Loop Integral Non-Linear Control.
Syntax
SLVDI(index) = value
Arguments
Axis:
index
0, 1, 2, ..., up to total number of axes in system minus 1
Tag
402
Comments
A value of 1 sets the Linear Range of the Non-Linear Gain curve to the Maximum Current Command.
If the value is not default and the required license for this feature is missing, error 3300 “Non Linear
Control License is required” is given.
This variable is supported in version 3.10 and higher.
Related ACSPL+ Variables
SLPAP, SLPDP, SLPAI, SLPDI, SLVDP, SLVAI, SLVDI
Accessibility
Read-Write
COM Library Methods and .NET Library Methods
ReadVariable(), WriteVariable()
C Library Functions
acsc_ReadReal(), acsc_WriteReal()
Name Description
Name Description
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 g Toolbox g Setup g Adjuster or the COMMUT command.
3.14.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.
Accessibility
Read-Write
3.14.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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
152
Comments
For linear motors, set SLCNP=2.
Accessibility
Read-Write
3.14.3 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_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
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
3.14.4 SLCORG
Description
SLCORG is a real array, with one element for each axis in the system, that defines the commutation
phase of absolute encoders in electrical degrees at the point of origin which is usually at the index
point.
Syntax
SLCORG(axis_index) = value
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
156
Comments
SLCORG is valid only if a brushless motor has been specified, i.e., MFLAGS(axis_index).#BRUSHL = 1.
Accessibility
Read-Write
3.14.5 SLCPRD
Description
SLCPRD is a real array, with one element for each axis in the system, that defines the servo-loop
commutation period. In stepper motor algorithms its value defines the number of microsteps.
Syntax
SLCPRD(axis_index) = value
Arguments
axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
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
3.14.6 SLHROUT
Hall Routing is available using ACSPL+ variable: SLHROUT
Description
SLHROUT is an integer array, with one element for each axis in the system, and is used for setting
the Hall state routing for the specified axis.
Syntax
SLHROUT(<axis>)=value
Value SLSTHALL
0 Default
Comments
Hall state is an integer number within the range [0,5]. Getconf(262,<index>) returns Hall state of axis
with index <index>. If SLHROUT(<index>) is not 0, Getconf(262,<index>) returns the hall state of the
channel based on the table defined above.
Tag
302
Accessibility
Read-Write
Com Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger
3.14.7 SLSTHALL
Description
SLSTHALL is an integer array, with one element for each axis in the system, and is used for getting
the Hall state of each axis.
The value is an integer number, in range of {-1,5}. -1 means invalid Hall state.
Comments
The SLSTHALL variable’s value is being updated every cycle.
Tag
196
Accessibility
Read only
Com Library Methods and .NET Library Methods
ReadVariable
Name Description
Name Description
Interrupt-Specific
ISENA
Enable/Disable
3.15.1 CFG
Description
CFG is an integer variable that indicates the application protection configuration mode.
Syntax
CFG = value
Arguments
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 and .NET Library Methods
ReadVariable
C Library Commands
acsc_ReadInteger
3.15.2 CTIME
CTIME is a real variable that defines the controller cycle time.
Syntax
CTIME = value
Arguments
value can be 0.1, 0.2, 0.25, 0.5, or 1.0 milliseconds (depending on the controller
value
model).
Tag
17
Comments
Many operations in the controller are synchronized to the controller cycle. For example, profile
generation is executed each controller cycle.
After setting CTIME to a new value, the configuration should be saved to flash memory.
Then run the MMI System Setup procedure.
For more information about valid CTIME values, see the EtherCAT Cycle Rate section in the
Installation Guide for the relevant controller.
Accessibility
Read-Write
COM Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal
3.15.3 C2TIME
C2TIME is a real variable that defines the controller cycle time for the second network in a dual
EtherCAT configuration.
C2TIME must adhere to the following restrictions:
The following table shows the possible values for both CTIME and C2TIME.
Syntax
C2TIME = value
Arguments
value Can be 0.2, 0.25, 0.5, or 1.0 milliseconds (depending on the controller model).
Tag
438
Comments
Many operations in the controller are synchronized to the controller cycle. For example, profile
generation is executed each controller cycle.
After setting C2TIME to a new value, the configuration should be saved to flash
memory. Then run the MMI System Setup procedure.
For more information about valid C2TIME values, see the EtherCAT Cycle Rate section in the
Installation Guide for the relevant controller.
Accessibility
Read-Write
COM Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal
3.15.4 EXTFAC
Description
EXTFAC is a real array, with one element for each axis in the system. It is used as a conversion factor
between the SL2-100 protocol transferred units (microns [μm] ) and ACS user units.
Syntax
EXTFAC(axis)
Argument
axis Axis, valid numbers are: 0, 1, 2, ... up to the number of axes in the system minus 1.
Tag
326
3.15.5 FOLLOWCH
Description
FOLLOWCH is an integer array, with one element for each axis in the system, the elements of which
maps an axis to a data channel of a SLEC EtherCAT node.
Syntax
FOLLOWCH(axis)xbit
Arguement
axis Axis, valid numbers are: 0, 1, 2, ... up to the number of axes in the system minus 1.
bit Description
Tag
237
Example 1
For an EtherCAT system that includes the following devices:
> SPiiPlusEC motion controller and EtherCAT master
> SPiiPlusCMHV EtherCAT control module
> SLEC. EtherCAT node
SLEC node number 1:
> Axis 0 will follow channel 0
> Axis 2 will follow channel 1
FOLLOWCH(0) = 0x00010000
FOLLOWCH(2) = 0x00010001
Example 2
For an EtherCAT system that includes the following devices:
> SpiiPlusEC motion controller and EtherCAT master
> SLEC EtherCAT node
> MC4U(8 axes)
> MC4U(8 axes)
> [Link] node
Each MC4U includes 2 drives with 4 axes each for a total of 16 total axes..
FOLLOWCH(0) = 0x00000000
FOLLOWCH(1) = 0x00000001
FOLLOWCH(8) = 0x00050000
FOLLOWCH(9) = 0x00050001
3.15.6 G_01WCS...G_12WCS
Description
G_01WCS to G_012WCS are each a real array, with one element for each axis in the system (up to 9
axes). Each is used for defining one of the 12 work-piece coordinate systems a user can set as part of
the CNC setup/configuration. During the execution of a GSP program, a user can select one of them
to work. If user choses going back to work in the Machine Coordinate System, he can then chose to
clear it.
Syntax
N/A
Arguments
N/A
Tag
284…295
Accessibility
Read Only
COM Library Methods and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadReal
3.15.7 GPEXL
Description
GPEXL is an integer array, with one element for each program buffer in the system. It indicates the
GSP program executed block. If block executes motion then GPEXL will indicate this line till this
motion completion.
If a buffer is not running, GPEXL equals 0.
Syntax
N/A
Arguments
N/A
Tag
296
Accessibility
Read Only
COM Library Methods and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadInteger
3.15.8 GSPEXL
Description
GSPEXL is an integer array, with one element for each program buffer in the system. It indicates the
line in a running buffer that called a subroutine.
If a buffer is not running, GSPEXL equals 0.
Syntax
N/A
Arguments
N/A
Tag
347
Accessibility
Read Only
COM Library Methods and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadInteger
3.15.9 GUFAC
Description
GUFAC is a real array, with one element for each program buffer in the system. Each entry in the
array holds the value a conversion factor, from 'Common Physical Units' in [mm] to 'Controller Units'
(In the world of ACSPL+, those 'Controller Units' are sometimes related to as 'User Units'). As part of
GSP modality data, default value of GUFAC is 1.0 for all buffers.
Syntax
N/A
Arguments
N/A
Tag
298
Accessibility
Read-Write
COM Library Methods and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadReal
3.15.10 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 Interrupt
Tag
69
Accessibility
Read-Write
3.15.11 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
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
3.15.12 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
Bit Interrupt
Tag
78
Accessibility
Read-Write
COM Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger
3.15.13 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
S_FLAGS.1 controls
whether the controller
allots a controller cycle
to processing non-
executable lines such
as comments, empty
lines and labels.
Changes to S_FLAGS.1 take effect
#S_FLAGS 1 only after a program is
0: Comments, empty
recompiled.
lines, labels are skipped
during execution and
not allotted a controller
cycle. (Default)
1: These lines are each
allotted a controller
cycle.
Tag
116
Accessibility
Read-Write
COM Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger
3.15.14 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
#FRMLOSS 3
A single EtherCAT frame loss mode can affect
the performance of ACS units, if this mode is in
use, then the ACS units MUST be connected
before non-ACS units in the network.
*Starting from version 2.60, after changing the RMSLEG bit, the system should be
reconfigured using the System Setup component
Tag
240
Accessibility
Read-Write
COM Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger
3.15.15 XSEGAMAX
Description
A real variable that defines the maximal angle required when configuring look-ahead processing
angles.
Syntax
XSEGAMAX= value
Tag
262
Accessibility
Read-Write
COM Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger
3.15.16 XSEGAMIN
Description
A real variable that defines the minimal angle required when configuring look-ahead processing
angles.
Syntax
XSEGAMIN= value
Tag
263
Accessibility
Read-Write
3.15.17 XSEGRMAX
Description
A real variable that defines the maximal radius difference required when configuring arcs.
Syntax
XSEGRMAX= value
Tag
264
Accessibility
Read-Write
COM Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger
3.15.18 XSEGRMIN
Description
A real variable that defines the minimal arc radius required when configuring arcs.
Syntax
XSEGRMIN= value
Tag
265
Accessibility
Read-Write
COM Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger
Name Description
3.16.1 BAUD
Description
BAUD is an integer variable that defines the serial communication rate, given in bits per second.
Syntax
BAUD = value
Arguments
Tag
8
Comments
Changes to BAUD take effect only after controller restart.
Accessibility
Read-Write
BAUD values cannot be modified if protection is applied to this variable through SPiiPlus
MMI Application Studio g Toolbox g Application Development g Protection
3.16.2 COMMCH
Description
COMMCH is an integer that stores a number representing the last activated communication channel.
Table 5-30. COMMCH Values
Value Description
1 Serial port 1
2 Serial port 2
12 PCI bus
16 MODBUS Slave
Value Description
Tag
15
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 and .NET Library Methods
ReadVariable
C Library Functions
acsc_ReadInteger
3.16.3 COMMFL
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 5-31.
Tag
16
Accessibility
Read-Write
COM Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Commands
acsc_ReadInteger, acsc_WriteInteger
3.16.4 CONID
Description
CONID is an integer variable that contains the controller identification.
Syntax
CONID = value
Arguments
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.
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.
3.16.5 ECHO
Description
ECHO is a 10-member mask integer variable that defines an echo communication channel.
Syntax
ECHO = channel_number
Arguments
channel_ The values of channel_number and their meanings are given in Table 5-
number 32.
-2 All channels
1 Serial port 1
2 Serial port 2
12 PCI bus
16 MODBUS Slave
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 and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger
3.16.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.
Syntax
DISPCH = channel_number
Arguments
channel_ The values of channel_number and their meanings are given in Table 5-
number 33.
Channel
Description
Number
-2 All channels
1 Serial port 1
2 Serial port 2
12 PCI bus
Channel
Description
Number
16 MODBUS Slave
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
COM Library Methods and .NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadInteger, acsc_WriteInteger
3.16.7 GATEWAY
Description
GATEWAY is an integer variable used for setting the address of a network router that serves for
accessing another network segment.
Syntax
GATEWAY = value
Arguments
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: [Link].
Accessibility
Read-Write
3.16.8 SUBNET
Description
SUBNET is an integer variable used to determine to what subnet an IP address belongs.
Syntax
SUBNET = value
Arguments
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 [Link].
Accessibility
Read-Write
3.16.9 TCPIP
Description
TCPIP is an integer variable used for setting the TCP/IP for the Ethernet port N1.
Syntax
TCPIP = value
Arguments
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 - [Link]
> Gateway address - no gateway, i.e., no routing is supported
The TCPIP variable value must be written in hexadecimal format, for example:
TCPIP=0x6400000a
assigns a TCP/IP address of: [Link]. 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.
Accessibility
Read-Write
TCPIP values cannot be modified if protection is applied to this variable through SPiiPlus
MMI Application Studio g Toolbox g Application Development g Protection
3.16.10 TCPIP2
Description
TCPIP2 is an integer variable used for setting the TCP/IP for a second Ethernet port: N2.
Syntax
TCPIP2 = value
Arguments
Tag
198
Comments
The default address for second Ethernet port is [Link].
The TCPIP2 variable value has to be in hex: 0xAABBCCDD, for example:
TCPIP=0x6400000a
assigns a TCP/IP address of: [Link]. 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.
Accessibility
Read-Write
C Library Commands
acsc_ReadInteger, acsc_WriteInteger, acsc_GetEthernetCards (to find all SPiiPlus controllers in the
network segment)
3.16.11 TCPPORT
Description
TCPPORT is a scalar integer that stores a number representing a TCP port.
Syntax
TCPPORT = Port_number
Arguments
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.
Some of the ports are used by the controller firmware and cannot be used. It is
recommended to use ports starting from 1024.
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
C Library Functions
acsc_ReadInteger, acsc_WriteInteger
3.16.12 UDPPORT
Description
UDPPORT is a scalar integer that stores a number representing a UDP port.
Syntax
UDPPORT = Port_number
Arguments
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.
Some of the ports are used by the controller firmware and cannot be used. It is
recommended to use ports starting from 1024.
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
C Library Functions
acsc_ReadInteger, acsc_WriteInteger
3.17 Miscellaneous
The Miscellaneous variables are:
Name Description
VR Controller FW version
3.17.1 AUNITS
Description
AUNITS is an array of strings, with one string for each axis in the system. Each string may be at most
19 characters in length.
AUNITS is read-only, but the value can be set during the adjusting process in the MMI.
The value of the string will be saved as part of the Par<Axis>.$$$ file, and may be restored from that
file.
Syntax
DISP AUNITS(1)
Arguments
None
Tag
431
Comments
Units' names can only be assigned during the adjusting process in the MMI.
3.17.2 A2UNITS
Description
A2UNITS is an array of strings, with one string for each axis in the system. Each string may be at
most 19 characters in length.
A2UNITS is read-only, but the value can be set during the adjusting process in the MMI.
The value of the string will be saved as part of the Par<Axis>.$$$ file, and may be restored from that
file.
Syntax
DISP
A2UNITS(1)
Arguments
None
Tag
432
Comments
Units' names can only be assigned during the adjusting process in the MMI.
Related ACSPL+ Variables
E2FAC
Accessibility
Read-Only
3.17.3 PDESC
Description
PDESC is a string type array holding the description given to buffer programs by the user. The
maximum length of each string is 249. The variables will be part of the system information variables
and should be saved to flash (and later retrieved) upon command.
Syntax
Arguments
None
Tag
425
Related ACSPL+ Variables
PNAME
Accessibility
Read-Write
3.17.4 PN
Description
PN is a string variable containing the controller part number.
Syntax
DISP PN
Arguments
None
Tag
427
Accessibility
Read-only
3.17.5 PNAME
Description
PNAME is a string type array that holds the names given to buffer programs by the user. The
maximum length of each string is 49 characters. The variables will be part of the system information
variables and should be saved to flash (and later retrieved) upon command.
Syntax
Arguments
None
Tag
424
Related ACSPL+ Variables
PDESC
Accessibility
Read-Write
3.17.6 SN
Description
SN is a string type variable that contains the controller serial number.
Example
DISP SN
Tag
426
Accessibility
Read-only
3.17.7 STATIC
Description
A new tag can be used to define a global variable as STATIC.
STATIC variables can only be defined in the D-buffer and once defined can only be freed using the
#VGV command, that is: removing the definition from the D-buffer does not remove the variable.
Use the #VGS/#VGSF command to list all static variables in the system.
Syntax
3.17.8 VR
Description
VR String type variable that contains the controller FW version.
Syntax
DISP VR
Tag
428
Accessibility
Read-only
3.17.9 XARRSIZE
Description
XARRSIZE is a scalar integer that stores maximum size of an array.
Syntax
XARRSIZE = value
Arguments
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.
It strongly recommended that users change the XARRSIZE variable only if necessary,
and that such changes be tested under safe conditions.
Accessibility
Read-Write
4. ACSPL+ Functions
ACSPL+ functions are divided into the following categories:
> Arithmetical Functions
> Matrix Functions
> Miscellaneous Functions
> EtherCAT Functions
> CoE Functions
> Modbus Functions
> Servo Processor Functions
> Signal Processing Functions
> Dynamic Error Compensation
This chapter covers the ACSPL+ functions.
The ACSPL+ Functions, in alphabetical order, are:
Function Description
Function Description
Returns an array that contains optional groups’ indexes that are part
ECGETGRPIND
of the current configuration.
Returns array that contains optional groups’ indexes that are part of
ECSAVEDCNF
the last saved configuration.
Function Description
Reads data characters from the specified channel and stores them
INP
into integer array.
Function Description
Function Description
Function Description
Function Description
4.1.1 ABS
Description
ABS calculates the absolute value
Syntax
ABS(input)
Arguments
Return Value
Real number - returns the absolute value of the input.
Error Conditions
None
Comments
This function may be called inside a FASTCALL function.
Example
XX = ABS(-3.14)
DISP XX !Output = 3.14
4.1.2 ACOS
Description
ACOS calculates arc cosine.
Syntax
ACOS(input)
Arguments
Return Value
Real number - returns the arc cosine of the argument in the range from 0 toπradians.
Error Conditions
The value of input must be between –1 to 1, otherwise the function returns Error 3045, Numerical
Error in Standard Function.
Comments
This function may be called inside a FASTCALL function.
Example
XX = ACOS(-1)
DISP XX !Output = 3.141592654
4.1.3 ASIN
Description
ASIN calculates the arc sine.
Syntax
ASIN(input)
Arguments
Return Value
Real number - returns the arc sine of XX in the range –p/2 to p/2.
Error Conditions
The value of inputmust be between –1 to 1, otherwise the function returns Error 3045, Numerical
Error in Standard Function.
Comments
This function may be called inside a FASTCALL function.
Example
XX = ASIN(-1)
DISP XX !Output = -1.570796327
4.1.4 ATAN
Description
ATAN calculates the arctangent.
Syntax
ATAN(input)
Arguments
Return Value
Real number - returns the arctangent of the input in the range –p/2 to p/2 radians.
Error Conditions
None
Comments
This function may be called inside a FASTCALL function.
Example
XX = ATAN(-1)
DISP XX !Output = –0.7853981634
4.1.5 ATAN2
Description
ATAN2 calculates the arctangent of X/Y.
Syntax
ATAN2(X_input,Y_input).
Arguments
Return Value
Real number - returns the arctangent value of X_input, Y_input. ATAN2 calculates a value in the
range of -p to p 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
Comments
This function may be called inside a FASTCALL function.
Example
4.1.6 CEIL
Description
CEIL calculates the ceiling of a value.
Syntax
CEIL(input)
Arguments
Return Value
Integer number - returns a value that represents the smallest integer that is ³ input.
Error Conditions
None
Comments
This function may be called inside a FASTCALL function.
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
4.1.7 COS
Description
COS calculates the cosine.
Syntax
COS(input)
Arguments
Return Value
Real number - returns the cosine of X in the range of -1 to 1.
Error Conditions
None
Comments
This function may be called inside a FASTCALL function.
Example
XX = COS(-3.141592654)
DISP XX !Output = -1
4.1.8 EXP
Description
EXP calculates the e^ input
Syntax
EXP(input)
Arguments
Return Value
Real number - returns the exponential value of input. On overflow, the function returns the largest
real number.
Error Conditions
None
Comments
This function may be called inside a FASTCALL function.
Example
XX = EXP(1)
DISP XX !Output = 2.718281828
4.1.9 FLOOR
Description
FLOOR calculates the floor of a value.
Syntax
FLOOR(input)
Arguments
Return Value
Integer number - returns a value representing the largest integer that is < to input.
Error Conditions
None
Comments
This function may be called inside a FASTCALL function.
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
4.1.10 HYPOT
Description
HYPOT calculates the hypotenuse of a right triangle
Syntax
HYPOT(X_input, Y_input)
Arguments
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
Comments
This function may be called inside a FASTCALL function.
Example
XX=HYPOT(3,4)
DISP XX !Output = 5
4.1.11 LDEXP
Description
LDEXP calculates the value of x*2^exp.
Syntax
LDEXP(X_input, Y_input)
Arguments
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
Comments
This function may be called inside a FASTCALL function.
Example
XX= LDEXP(1,2)
DISP XX !Output = 4
4.1.12 LOG
Description
LOG calculates the natural logarithm.
Syntax
LOG(input)
Arguments
Return Value
Real number - returns the natural logarithm of input.
Error Conditions
input must be > 0, otherwise the function returns Error 3045, Numerical Error in Standard Function.
Comments
This function may be called inside a FASTCALL function.
Example
XX=LOG(2.718281829)
DISP XX !Output = 1
4.1.13 LOG10
Description
LOG10 calculates the base 10 logarithm.
Syntax
LOG10(input)
Arguments
Return Value
Real number - returns the base 10 logarithm of input.
Error Conditions
input must be >0, otherwise the function returns Error 3045, Numerical Error in Standard Function.
Comments
This function may be called inside a FASTCALL function.
Example
XX=LOG10(10)
DISP XX !Output = 1
4.1.14 POW
Description
POW calculates X raised to the power of Y.
Syntax
POW(X_input, Y_input)
Arguments
Return Value
Real number - returns the value of (X_input)Y_input.
Error Conditions
None
Comments
This function may be called inside a FASTCALL function.
Example
XX=POW(2,3)
DISP XX !Output = 8
4.1.15 SIGN
Description
SIGN returns –1, 0 or 1 depending if the input is negative, zero or positive.
Syntax
SIGN(input)
Arguments
Return Value
Real number - returns:
–1 if input <0;
0 if input = 0;
1 if input >0
Error Conditions
None
Comments
This function may be called inside a FASTCALL function.
Example
XX=SIGN(-5), SIGN(0),SIGN(5)
DISP XX !Output = -1 0 1
4.1.16 SIN
Description
SIN calculates the sine.
Syntax
SIN(input)
Arguments
Return Value
Real number - returns the sine value of input in the range of –1 to 1.
Error Conditions
None
Comments
This function may be called inside a FASTCALL function.
Example
XX=SIN(1.570796327)
DISP XX !Output = 1
4.1.17 SQRT
Description
SQRT calculates the square root.
Syntax
SQRT(input)
Arguments
Return Value
Real number - returns the square root of input.
Error Conditions
input must be ≥0, otherwise the function returns Error 3045, Numerical Error in Standard Function.
Comments
This function may be called inside a FASTCALL function.
Example
XX=SQRT(4)
DISP XX !Output = 2
4.1.18 TAN
Description
TAN calculates the tangent.
Syntax
TAN(input)
Arguments
Return Value
Real number - returns the tangent value of input.
Error Conditions
None
Comments
This function may be called inside a FASTCALL function.
Example
REAL PI
PI = 3.141592654
DISP TAN(PI/4) !Output = 1
4.1.19 ROUND
Description
Round a REAL number to closest integer value
Syntax
ROUND(input)
Arguments
Input - Arbitrary real number
Return Value
Closest integer value
Comments
ROUND calculates the closest integer number according to arithmetical rules.
This command is supported in ADK versions 2.70 and higher.
Examples:
DISP(ROUND(1.5)) !Output = 2
DISP(ROUND(1.4)) !Output = 1
DISP(ROUND(-1.5)) !Output = -2
DISP(ROUND(-1.4)) !Output = -1
For details about programming considerations in ACSPL+ using MATRIX type variables, see the
MATRIX Type chapter in the ACSPL+ Programmer's Guide.
a. Preconditions:
i. Number of rows of initialization values = matrix first dimension
ii. Number of columns of initialization values = matrix second dimension
b. Error conditions:
i. If preconditions are violated, then a compilation error will occur.
c. Example:
!///Compilation-time initializations///!
MATRIX A(2)(2)=((1,2),(3,4)) !Regular initialization of a 2x2 matrix
2. Default Initialization:
A matrix which not initialized by the user on definition is automatically initialized with zeros.
Example:
!///Compile-time initializations///!
MATRIX C(2)(2) !Default initialization, filled by zeros
For details about MATRIX type functions and operators see Matrix Functions in the ACSPL+
Commands & Variables Reference Guide.
4.2.2 MATRIXADD
Description
Add two matrices.
Syntax
Arguments
Return Value
None
Comments
1. All argument matrices must be of the same size.
2. If preconditions are violated, then a compilation error will occur.
3. This function is supported in versions 3.11 and higher
Example
MATRIX A(2)(2)=((1,2),(3,4))
MATRIX B(2)(2)=((5,6),(7,8))
MATRIX C(2)(2)
MATRIXADD(A,B,C)
MATRIX A(2)(2)=((1,2),(3,4))
MATRIX B(2)(2)=((5,6),(7,8))
MATRIX C(2)(2)
C=A+B
STOP
4.2.3 MATRIXSUB
Description
Subtract two matrices.
Syntax
MATRIXSUB([in] MATRIX A, [in] MATRIX B, [out] MATRIX C)
Arguments
Return Value
None
Comments
1. All argument matrices must be of the same size.
2. If preconditions are violated, then a compilation error will occur.
3. This function is supported in versions 3.11 and higher
Example
MATRIX A(2)(2)=((1,2),(3,4))
MATRIX B(2)(2)=((5,6),(7,8))
MATRIX C(2)(2)
MATRIXSUB(B,A,C)
MATRIX A(2)(2)=((1,2),(3,4))
MATRIX B(2)(2)=((5,6),(7,8))
MATRIX C(2)(2)
C=B-A
STOP
4.2.4 MATRIXMUL
Description
Multiply matrices
Syntax
MATRIXMUL([in] MATRIX A, [in] MATRIX B, [out] MATRIX C)
Arguments
Return Value
None
Comments
1. Matrix A's column dimension must equal Matrix B's row dimension.
2. The dimension of Matrix C's rows are equal to the row dimension of Matrix A
3. The dimension of Matrix C's columns are equal to the column dimension of Matrix B
4. If preconditions are violated, then a compilation error will occur.
5. This function is supported in versions 3.11 and higher
Example
MATRIX A(3)(2)=((1,2),(3,4),(5,6))
MATRIX B(2)(2)=((7,8),(9,10))
MATRIX C(3)(2)
MATRIXMUL(A,B,C)
MATRIX A(3)(2)=((1,2),(3,4),(5,6))
MATRIX B(2)(2)=((7,8),(9,10))
MATRIX C(3)(2)
C=A*B
4.2.5 MATRIXMULSC
Description
Multiply matrix by scalar value.
Syntax
MATRIXMULSC([in] MATRIX A, [in] REAL S, [out] MATRIX C)
Arguments
Return Value
None
Comments
1. The result matrix is of the same size as operand matrix.
2. If preconditions are violated, then a compilation error will occur.
3. This function is supported in versions 3.11 and higher
Example
MATRIX A(3)(2)=((1,2),(3,4),(5,6))
REAL r=7
MATRIX C(3)(2)
MATRIXMULSC(A,r,C)
MATRIXMULSC(A,5.5,C)
STOP
4.2.6 MATRIXMULEW
Description
Element-wise matrix multiplication
Syntax
MATRIXMULEW([in] MATRIX A, [in] REAL S, [out] MATRIX C)
Arguments
Return Value
None
Comments
1. All parameter matrices must be of the same size.
2. If preconditions are violated, then a compilation error will occur.
3. This function is supported in versions 3.11 and higher
Example
MATRIX A(2)(2)=((1,2),(3,4))
MATRIX B(2)(2)=((5,6),(7,8))
MATRIX C(2)(2)
MATRIXMULEW(A,B,C)
MATRIX A(2)(2)=((1,2),(3,4))
MATRIX B(2)(2)=((5,6),(7,8))
MATRIX C(2)(2)
C=A.*B
STOP
4.2.7 MATRIXDIV
Description
Matrix division
Syntax
MATRIXDIV([in] MATRIX A, [in] MATRIX B, [out] MATRIX C)
Arguments
Return Value
None
Comments
1. Matrix B is a square matrix.
2. The dimension of Matrix A's columns are equal to the order of Matrix A
3. C dimension = (A’s rows, B’s order) = A dimension
MATRIX A(2)(3)=((1,2,3),(4,5,6))
MATRIX B(3)(3)=((1,2,3),(4,5,6),(7,8,1))
MATRIX C(2)(3)
MATRIXDIV(A,B,C)
MATRIX A(2)(3)=((1,2,3),(4,5,6))
MATRIX B(3)(3)=((1,2,3),(4,5,6),(7,8,1))
MATRIX C(2)(3)
C=A/B
4.2.8 MATRIXIDENT
Description
Generate identity matrix, a matrix filled with values of 1 on the main diagonal and all other elements
are 0.
Syntax
MATRIXIDENT([in out] MATRIX A)
Arguments
Return Value
Identity matrix of dimension matching the input matrix.
Comments
1. The result matrix must be square.
2. If preconditions are violated, then a compilation error will occur.
3. This function is supported in versions 3.11 and higher
Example
MATRIX A(3)(3)
MATRIXIDENT(A)
4.2.9 MATRIXTRANS
Description
Transpose a matrix.
Syntax
MATRIXTRANS([in]MATRIX A, [out] MATRIX B)
Arguments
Return Value
None
Comments
1. The target matrix should be defined so that its row number is equal to the target matrix
column number, and its column number is equal to target matrix row number.
2. If preconditions are violated, then a compilation error will occur.
3. This function is supported in versions 3.11 and higher
Example
MATRIX A(2)(3)=((1,2,3),(4,5,6))
MATRIX B(3)(2)
MATRIXTRANS (A,B)
4.2.10 MATRIXINV
Description
Invert a matrix.
Syntax
MATRIXINV([in] MATRIX A, [out] MATRIX B)
Arguments
Return Value
None
Comments
1. The argument matrix must be square.
2. The result matrix should be of the same size as the argument matrix.
3. If preconditions are violated, then a compilation error will occur.
4. This function is supported in versions 3.11 and higher
Example
MATRIX A(3)(3)=((1,2,3),(4,5,6),(7,8,1))
MATRIX B(3)(3)
MATRIXINV(A,B)
Function Description
GETVAR Reads the current value of the variable and returns it as a real number.
SS1RESET Resets the values of the last SS1-t channel A and channel B times.
4.3.1 AxListAsMask
In some functions an argument requires a mask to define the axes. The mask specification is
defined with AxListAsMask.
Syntax
AxListAsMask (axis_list)
Arguements
Arguments Comments
Return value
The function returns the integer value that represents the axis list as a mask.
Example
int AxisMask
AxisMask = AxListAsMask(0,2,4) ! AxisMask gets value 0x15 (0b00010101)
scription in the manual.
4.3.2 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
CopyBytes Number specifying how many bytes will each copy operation
Number specifying how many bytes will be skipped in the source array
S_SkipBytes
following each copy operation
Number specifying how many bytes will be skipped in the target array
T_SkipBytes
following each copy operation
From Index of the first element in the source array that may be used
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
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
4.3.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. If the string has more characters than the target array, the extra characters are
silently discarded.
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])
Arguments
Index in the array from where the transformed numbers will be placed.
start_index If start_index is omitted, the assignment starts from the first element of the
array.
number 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.
Comments
See also STR.
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
4.3.4 STR
Description
STR converts an integer array to a characters. Each element of the array is interpreted as an ASCII
character.
Syntax
string STR(array_name,[start_index,] [number])
Arguments
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.
See also DSTR.
Return Value
An integer representing the number of characters the function converted.
Example
The function transforms each of the array members of BIBI to ASCII code characters. When DISP is
applied, the displayed value will be: “ACS”
4.3.5 GETCONF
Description
GETCONF retrieves system configuration data that was configured byGETCONF.
Some keys relate to data that is set by the system and not by SETCONF, for keys set by
SETCONF see SETCONF Arguments.
Syntax
GETCONF(key,index)
Arguments
Return Value
GETCONF return values are described in Table 6-1 according to key.
Table 6-1. GETCONF Return Values
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.
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.
37
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.
Used to view the actual assignment of digital outputs to PEG states and PEG
pulses outputs.
71
Returns the bit code according to or for SPiiPlusNT/DC-LT/HP/LD-x, or for SPiiPlus
CMnt-x-320/UDMpm-x-320, depending on the axis.
Used to view the actual output pins assignment for PEG engines.
73 Returns the bit code according to or ,for SPiiPlusNT/DC-LT/HP/LD-x, or or for
SPiiPlus CMnt-x-320/UDMpm-x-320, depending on the axis.
Returns the status if fast loading of Random PEG arrays for the relevant Servo
Processor is activated or deactivated:
0: fast loading of Random PEG arrays is deactivated
1: fast loading of Random PEG arrays is activated.
78
Returns the maximum USAGE value since power-up or since last call to the
79
SETCONF(79) command.
Returns the UnitID of the network unit that the specified digital input is assigned
80 to.
Index = 0, 1, 2... up to total number of digital inputs in the system minus 1.
Returns the UnitID of the network unit that the specified digital output is assigned
81 to.
Index = 0, 1, 2... up to total number of digital outputs in the system minus 1.
Returns the UnitID of the network unit that the specified analog input is assigned
82 to.
Index = 0, 1, 2... up to total number of analog inputs in the system minus 1.
Returns the UnitID of the network unit that the specified analog output is
83 assigned to.
Index = 0, 1, 2... up to total number of analog outputs in the system minus 1.
86 Returns the number of allowed single EtherCAT frames that were actually lost.
Index = 0:
Returns number of regular ACSPL+ program buffers.
Index = 7:
99
Returns total number of axes to which the controller is configured.
Index = 8:Key
Returns the maximum number of data bytes in the SAFE format message.
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)
246
> Drive Alarm: Power down (5069)
> Drive Alarm: Phase lost. (5070)
> Drive Alarm: Drive not ready (5071)
> Drive Alarm: Over current (5072)
> Not in use (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.
Returns the state of the STO signals for the axis selected by index
253 bit 0: STO1
bit 1: STO2
Read "Servo Processor Number" (range 0-127) in the network, based on the axis
260
number in the Firmware (range 0-127)
Read "Axis Number in the Servo Processor Axes List" (range 0-3) based on the
261
axis number in the Firmware (range 0-127)
Returns the current Hall state, which can be 0, 1, 2, 3, 4, or 5, of the axis given by
262 axis_def (a number: 0, 1, 2, ... up to the number of axes in the system minus 1). It
returns -1 for invalid states.
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:
If an axis is enabled while moving, the motor back-EMF may generate high
currents during the ENABLE process which can potentially damage the drive or
the motor.
To avoid such damage the controller should check the motor velocity during the
ENABLE process and triggers a fault (error 5104 – “motor is moving”) if it is above
a threshold. The threshold is proportional to SLCPRD (commutation period) for a
brushless motor(MFLAGS().8=1). It is proportional to XVEL(maximal velocity) for a
DC-brush motor (MFLAGS().8=0)
Usually the user should not modify the factor, but in special specific cases it may
need to be increased. A typical example where modification might be needed is a
dual loop system with high resolution encoder on the load and low resolution
270 encoder at the motor (used for commutation). The threshold may be multiplied by
a factor using a special SETCONF command.
> SETCONF(270, <axis>, <value>) The value is – 1.0 by default.
> GETCONF(270, <axis>) returns the current value of the factor.
The SETCONF command should be executed after each controller powerup.
Returns the value of the Modbus slave IP address, as calculated when using
308
SETCONF(308)
Returns an integer value that contains the TCP/IP address currently assigned to
the controller. The index argument has to be zero, for example,
310
GETCONF(310, 0)
If a TCP/IP protocol is not configured, or not supported, the return value is zero.
Returns the RAM load in percentage, the amount of total physical memory, or the
amount of free physical memory as:
Comments
The IDMxx and EDMxx devices do not support GETCONF(76,0) and GETCONF(76,1).
COM Library Methods
GetConf
C Library Functions
acsc_GetConf
Examples
Example 1:
?B/GETCONF(229,0)
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
The address of a controller whose TCP/IP address is [Link]
4.3.6 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
If the variable is an array, the indexes point to the specific location in the
Index1, array.
Index2
If the variable is scalar, omit the indexes.
Return Value
Returns the value of the variable specified by the Tag.
Example
The controller displays the return value of the GETVAR function which is = 15.
4.3.7 MDURATION
Description
The MDURATION function calculates time of certain motion profile phase. The function can be
executed in buffer or terminal, and it will wait till the execution is completed.
Syntax
Arguments
Return Value
Returns motion profile time according to phaseNumber.
Comments
Assume that the motion will start and complete when velocity and acceleration are 0.
Input Shaping is not supported
phaseNumber options corresponds to a third order point-to-point profile:
Assume that the motion will start and complete when velocity and acceleration are 0.
Input Shaping is not supported.
Error Conditions
The function detects the following error conditions.
> 3207 - phaseNumber parameter is not between 0 to 7
> 3412 - The MotionType parameter is intended to be one of supported motion types.
Currently only PTP motion is supported.
> 3045 - At least one of struct members is infinite.
> 3041 - Vel, Acc, Dec, Jerk, or EncoderFactor is out of range.
Examples
! Example 1
! MotionType = 0 – PTP
! Distance = 20000, Vel= 10000, Acc = 100000, Dec = 100000, Jerk =
20000000
! Example 2
! MotionType = 0 – PTP
! Distance = 20000, Vel= 10000, Acc = 100000, Dec = 100000, Jerk =
20000000
! phaseNumber = 4 - Constant velocity
! EncoderFactor = default = 1
V0 = MDURATION(0, 20000, 10000, 100000, 100000, 20000000, 4)
! Return value: Constant velocity V0 = 1.895[sec]
STOP
! Example 3
! MotionType = 0 – PTP
! Distance = 20000, Vel= 10000, Acc = 100000, Dec = 100000, Jerk =
20000000
! phaseNumber = 4 - Constant velocity
! EncoderFactor = 2
V0 = MDURATION(0, 20000, 10000, 100000, 100000, 20000000, 4, 2)
! Return value: Constant velocity V0 = 1.895[sec]
STOP
4.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
From Index of the first element in the array that may contain the number
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
4.3.9 SETCONF
Description
SETCONF defines system configuration data.
All the keys that can be set by SETCONF listed in SETCONF Arguments can also be retrieved by
GETCONF.
Syntax
SETCONF(key,index,value)
Arguments
The set of bit states for the defined key. value is set up according to a 16-bit
binary template, illustrated in 16-bit Binary value Template. The controller strips
all leading zeros. The controller understands value in binary, hexidecimal, or
decimal format.
value The following prefixes determine value format:
0B - binary
0H - hexidecimal
A decimal value does not require any prefix.
3 3 2 2 2 ..
Bit 6 5 4 3 2 1 0
1 0 9 8 7 .
Pre
fix
[0
B] | ..
0 0 0 0 0 0 0 0 0 0 0 0
[0 .
H]
val
ue
For example:
4 axes MC4U system
Command for setting pairs (0,1) and (2,3) -
SETCONF(267,0,0)
Command for setting pairs (0,2) and (1,3) -
SETCONF(267,0,1)
The value sets the baud rate for the specified serial
channel, where the baud rate is the decimal value.
2
303 115200 (default), 57600, 19200, 9600, 4800, 2400,
1 1200, 600, 300.
index specifies the channel.
> TCP Server Opens TCP client socket for a case when the
Communication controller should serve as a TCP Client.
Port
The value is the TCP Server IP Address.
> Communication
The IP address is calculated as follows: If the TCP
Channel
Server has the following address: [Link], the IP
(channels 26-29
parameter should be 10*2^24 + 1*2^16 + 168*2^8 +
are reserved for
322 192 = 167880896 (0x0A01A8C0).
this task, no
other channels If the specified channel is already open, the function
may be used) closes the opened channel and then opens new
one.
Index value calculated as
follows: If an IP is zero, the function closes the TCP
connection.
Index =
Port*100+Channel
Return Value
None
COM Library Methods
SetConf
C Library Functions
acsc_SetConf
Example
The following example illustrates setting the value of MFLAGS.1 to 1, configuring axis 2 to open loop
control:
SETCONF(203, 1, 1)
4.3.10 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
If the variable is an array, the indexes point to the specific location in the
Index1, array.
Index2
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
4.3.11 SS1RESET
Description
Resets the values of the last SS1-t channel A and channel B times.
Syntax
SS1RESET [/f] axis
Arguments
The axis index, valid numbers are: 0, 1, 2, ... up to the number of axes in the
axis system minus 1.
Axis parameter can be any axis number of the same unit.
Comments
This variable is supported in version 3.00 and higher
Return Value
None
4.3.12 STRTONUM
Description
This function converts ASCII encoded element string to a number.
Syntax
double STRTONUM(Source, Type, From, N)
Arguments
From Index of the first element in the array that may contain the number
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
4.3.13 SYSINFO
Description
SYSINFO retrieves a value related to the SPiiPlus controller system based on the argument that is
specified.
Syntax
SYSINFO(Int)
Arguments
Return Value
11 D-Buffer index
EtherCAT support:
16 1 - Yes
0 - No
Function Description
DSHIFT Shifts all of the elements of the array to one position left.
Finds the maximum value in an array or in a section of array and returns its
MAXI
index.
Function Description
4.4.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.
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
4.4.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
The name of an array that has been declared in the program from which
source
the data is to be copied.
The name of an array that has been declared in the program to which
destination
the data is to be copied.
from_source_
The index of the first row of the source to begin copying.
row
to_source_row The index of the last row of the source to end copying.
from_
The index of the first row of the destination to begin copying into.
destination_row
to_destination_
The index of the last row of the destination to end copying into.
row
from_ The index of the first column of the destination to begin copying into.
destination_col Used only for matrix type arrays, otherwise it can be omitted.
to_destination_ The index of the last column of the destination to begin copying into.
col 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
Error Conditions
Error 3034, Illegal index value - the destination matrix is smaller than the source matrix.
Example
!4 5 6
!7 8 9
!Destination:
!0 0 0
!1 2 3
!4 5 6
STOP !Ends program
4.4.3 DSHIFT
Description
DSHIFT shifts all elements of the array to one position left.
Syntax
real DSHIFT(array, value, index)
Arguments
Return Value
The first element (element with index 0) of the array.
Comments
Each time the function is called the first element of the array (element with the index 0) is returned.
All of the other elements of the array shift one position to the left (element with index 1 to 0,
element with index 2 to 1, etc.). The Value parameter is inserted to the element with the index Index.
4.4.4 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
The name of an array that has been declared in the program to which the
destination
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_ The index of the first column of the destination array to begin filling.
column Used only for matrix type arrays, otherwise it can be omitted.
to_array_ The index of the last column of the destination array to end filling.
column 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
4.4.5 MAX
Description
MAX finds the maximum value in an array or in a section of an array.
Syntax
MAX(array_name, From1, To1, From2, To2)
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
4.4.6 MAXI
Description
MAXI finds the maximum value in an array or in a section of array and returns its index.
Syntax
MAXI(array_name, From1, To1, From2, To2)
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
4.4.7 MIN
Description
MIN finds the minimum value in an array or in a section of an array.
Syntax
MIN(array_name, From1, To1, From2, To2)
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
4.4.8 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, From1, To1, From2, To2)
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
4.4.9 SIZEOF
Description
The function returns number of columns or number or rows of the given array (can be user-defined
or ACSPL+). If the array is one-dimension, number of rows is always one and the number of columns
represents the number of elements.
Syntax
sizeof(Array, index(optional) )
Arguments
Return Value
> No index is specified: total number of elements in the array
> Index parameter equals to 1: number of columns for two-dimensional array, or number of
elements for one-dimensional array
> Index parameter equals to 2: number of rows for two-dimensional array, or 1 for one-
dimensional array.
Comments
In case of wrong parameters, the corresponding runtime error will be generated. The function is
intended to be used for arrays only, meaning that an error is generated if a scalar is given as a
parameter.
Example
I0=sizeof(NST)
ECCLOSEPORT The function closes the specified port of specified EtherCAT node.
The function fills array with nodes’ indexes which are members of a
ECGRPINFO given optional group. In addition, it returns the number of members
in the group.
Triggers the system to rescan the EtherCAT network after a slave has
ECRESCAN been removed or been added in order to refresh the network
composition data.
The function returns array that contains optional groups’ indexes that
ECSAVEDCNF are part of the last saved configuration (including mandatory group,
which is 0).
FOEDOWNLOAD Downloads a file over EtherCAT from the controller’s flash to slave
4.5.1 ECCLOSEPORT
Description
The function closes the specified port of specified EtherCAT node.
Syntax
Int ECCLOSEPORT(name, index)
Arguments
Return Value
None
Comments
This function can only be used if ring topology is configured and ring communication is active. In
case there is a cable / port failure on a specific EtherCAT node, it is recommended (as long as the
erroneous situation exists) that the machine should start up directly in the line topology mode. This
is very useful, because it prevent a manual stop of the machine with a suspicious communication
link / device).
Example
In this example of the AUTOEXEC program that should run on power-up in this case:
The first parameter is the slave index in the network and the second parameter is the port index of
the slave that should be closed.
After “fclear All”, two Lines Are Stored Into The Controller's Non-volatile Memory.
4.5.2 ECCLRREG
Description
ESC Error Counters Registers Clear. The ECCLRREG function clears the contents of the error counters
registers.
Syntax
Arguments
Switches
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).
4.5.3 ECEXTIN
Description
The ECEXTIN function is used for mapping input variables (TxPDO) to non-ACS EtherCAT network.
Syntax
Arguments
Return Value
None
Comments
Once the function is called successfully, the Firmware copies the value of the network input variable
into the ACSPL+ variable every controller cycle. The input is from the external EtherCAT master (e.g.
TwinCAT) point of view (a value provided by SPiiPlusES to the external master).
There is no restriction on number of the mapped network variables.
The mapping is allowed only when the SPiiPlusES is in OP state.
All types supported by the SPiiPlusES are also supported by the ECEXTIN function.
D-Buffer:
GLOBAL INT ActualPositionTwinCAT
Regular Buffer:
ecextin (0x1A01,0x6064,0, ActualPositionTwinCAT)
STOP
4.5.4 ECEXTOUT
Description
The ECEXTOUT function is used for mapping output variables (RxPDO) from non-ACS EtherCAT
network to the SPiiPlusES.
Syntax
Arguments
Return Value
None
Comments
Once the function is called successfully, the Firmware copies the value of the network output
variable into the ACSPL+ variable every controller cycle. The output is from the external EtherCAT
master (e.g. TwinCAT) point of view (a value provided to SPiiPlusES by the external master).
There is no restriction on number of the mapped network variables.
Error 3309 “Function is supported only by SPiiPlusES” is returned when called on a controller which is
not SPiiPlusES.
If SPiiPlusES is not in OP state, error 3310 “SPiiPlusES is not in OP state. PDO is not enabled” error is
given.
C Library Functions
None
Example
D-Buffer:
GLOBAL INT TargetPositionTwinCAT
Regular Buffer:
ecextout (0x1601,0x607A,0, TargetPositionTwinCAT)
STOP
4.5.5 ECGETGRPIND
Description
The function returns an array that contains optional groups’ indexes that are part of the current
configuration (including mandatory group, which is 0). The array ends with {-1}.
Syntax
ECGETGRPIND[/0][/1](groups_array)
Arguments
groups_array Array of type INT, filled with groups’ indexes. {-1} marks the end.
Switches
Return Value
None.
Example:
int groups(5)
ecgetgrpind(groups) ! groups array is filled with: {0,1,-1,0,0},
!meaning that there is one optional group (with index 1) defined in the
actual system.
4.5.6 ECGETPID
Description
ECGETPID returns product ID of the node.
Syntax
Arguments
Switches
Return Value
Product ID of the node.
4.5.7 ECGETMAIN
Description
The function returns the number of EtherCAT slaves connected to the main EtherCAT line.
Syntax
ECGETMAIN()
Return Value
The number of EtherCAT slaves connected to the main EtherCAT line
4.5.8 ECGETOFFSET
Description
The function returns offset of the specified variable of the specific EtherCAT node. The "/b" switch is
used to retrieve the offset on the variable in bits.
Syntax
Int ECGETOFFSET[/b /0 /1]](name, index, InOut(optional), occurrence(optional))
Arguments
InOut Can be Output (=0) or Input (=1). By default, the variable is being searched
(optional) in Inputs and, if not found, in Outputs.
Occurence
By default the value is 0.
(optional)
Switches
Comments
The offset in bits can be calculated by following method:
Offset in Bytes as provided by #ETHERCAT report.
The return value of the ECGETOFFSET/B will be equal to:
<Offset in Bytes>*8+<Offset in Bits>
Return Value
Offset of the specified variable.
Example
Example
WAGO_Offset_Bit, WAGO_Offset_Byte
WAGO_Offset_Bit =ECGETOFFSET/b (“Input(s).Channel 2, Word 1”,0)
WAGO_Offset_Byte = ECGETOFFSET (“Input(s).Channel 2, Word 1”,0)
Example
STOP
4.5.9 ECGETOPTGRP
Description
The function returns number of actually connected optional groups, not including the mandatory
group.
Syntax
ECGETOPTGRP [/0][/1] ()
Arguments
None.
Switches
Return Value
Returns number of actually connected optional groups, not including the mandatory group.
Example:
?ecgetoptgrp()
2
4.5.10 ECGETRED
Description
The function returns the number of EtherCAT slaves connected to the redundant EtherCAT line.
Syntax
ECGETRED()
Return Value
The number of EtherCAT slaves connected to the redundant EtherCAT line.
4.5.11 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[/0/1](index,offset)
Arguments
Switches
Return Value
None
Comments
The following table lists supported error counter registers.
Table 6-5. Supported Error Counter Registers
Forwarded RX Error
0x309
Counter
Forwarded RX Error
0x30A
Counter (CRC C/D)
Forwarded RX Error
0x30B
Counter
ECAT Processing Unit Invalid frame passing the EtherCAT Processing Unit
0x30C
Error Counter (additional checks by processing unit).
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)
4.5.12 ECGETREV
Description
The function returns EtherCAT Revision ID of the node.
Syntax
ECGETREV()
Arguments
Switches
Return Value
The EtherCAT Revision ID of the node
4.5.13 ECGETSLAVE
Description
This function returns the location of the Nth occurrence of an EtherCAT node identified by VendorID
and ProductID.
Syntax
Arguments
Switches
Example
Given the following System Information:
Using the command in the MMI terminal gives the following results.
?ECGETSLAVE(0x000000540, 0x02030000, 0)
1
:
?ECGETSLAVE(0x000000540, 0x02050000, 0)
-1
:
4.5.14 ECGETSLAVES
Description
This function is used to retrieve the number of slaves in an EtherCAT network.
Syntax
ECGETSLAVES [/0][/1]()
Arguments
None
Switches
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.
4.5.15 ECGETSN
Description
ECGETSN returns the EtherCAT Serial Number of the node.
Syntax
ECGETSN[/0/1](index)
Arguments
Switches
Return Value
Serial Number of the node.
4.5.16 ECGETSTATE
Description
ECGETSTATE returns the state of the node.
Syntax
ECGETSTATE[/0/1](index)
Arguments
Switches
Return Value
The State of the node.
INIT 1
PREOP 2
SAFEOP 4
OP 8
4.5.17 ECGETVID
Description
ECGETVID returns the vendor ID of the node.
Syntax
Arguments
Switches
Return Value
The ACS vendor ID of the node.
4.5.18 ECGRPINFO
Description
The function fills array with nodes’ indexes which are members of a given optional group. In
addition, it returns the number of members in the group.
Syntax
ECGRPINFO[/0][/1](group_index, nodes_array)
Arguments
nodes_array Array of type INT, filled with nodes’ indexes. {-1} marks the end.
Switches
Return Value
Returns the number of the members in the specified optional group.
Example:
int nodes(5)
I0=ecgrpinfo(1,nodes) ! returns number of nodes in optional group 1
! nodes array is filled with: {0,-1,0,0,0}
4.5.19 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[/b /0 /1](int offset, Varname)
Arguments
Internal EtherCAT offset (in bytes or in bits) of network variable derived from
the SPiiPlus MMI Application Studio Communication Terminal ETHERCAT
command.
offset
> No switch: EtherCAT offset in bytes
> "/b" switch: the offset is in bits
Switches
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.
In the event of wrong parameters or stack state, the function will produce a corresponding runtime
error.
D-Buffer:
GLOBAL INT IOMNT_IN(4)
GLOBAL INT IOMNT_OUT(4)
Regular Buffer:
AUTOEXEC:
INT IN0_OFFSET
INT IN1_OFFSET
INT IN2_OFFSET
INT IN3_OFFSET
INT OUT0_OFFSET
INT OUT1_OFFSET
INT OUT2_OFFSET
INT OUT3_OFFSET
ECIN(IN0_OFFSET, IOMNT_IN(0))
ECIN(IN1_OFFSET, IOMNT_IN(1))
ECIN(IN2_OFFSET, IOMNT_IN(2))
ECIN(IN3_OFFSET, IOMNT_IN(3))
ECOUT(OUT0_OFFSET, IOMNT_OUT(0))
ECOUT(OUT1_OFFSET, IOMNT_OUT(1))
ECOUT(OUT2_OFFSET, IOMNT_OUT(2))
ECOUT(OUT3_OFFSET, IOMNT_OUT(3))
STOP
4.5.20 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[/b /0 /1][/r] (int offset, Varname)
Arguments
Internal EtherCAT offset (in bytes or in bits) of network variable derived from
the SPiiPlus MMI Application Studio Communication Terminal ETHERCAT
command.
offset
> No switch: EtherCAT offset in bytes
> "/b" switch: the offset is in bits
Switches
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.
Mapping is allowed only when stack is operational. ACS recommends retrieving the
offset using ACSPL+ ECGETOFFSET().
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 1
D-Buffer:
GLOBAL INT IOMNT_IN(4)
GLOBAL INT IOMNT_OUT(4)
Regular Buffer:
AUTOEXEC:
INT IN0_OFFSET
INT IN1_OFFSET
INT IN2_OFFSET
INT IN3_OFFSET
INT OUT0_OFFSET
INT OUT1_OFFSET
INT OUT2_OFFSET
INT OUT3_OFFSET
! Assuming that IOMnt is the first EtherCAT node in the network
IN0_OFFSET = ECGETOFFSET("Digital Inputs 0", 0)
IN1_OFFSET = ECGETOFFSET("Digital Inputs 1", 0)
IN2_OFFSET = ECGETOFFSET("Digital Inputs 2", 0)
IN3_OFFSET = ECGETOFFSET("Digital Inputs 3", 0)
OUT0_OFFSET = ECGETOFFSET("Digital Outputs 0", 0)
OUT1_OFFSET = ECGETOFFSET("Digital Outputs 1", 0)
OUT2_OFFSET = ECGETOFFSET("Digital Outputs 2", 0)
OUT3_OFFSET = ECGETOFFSET("Digital Outputs 3", 0)
ECIN(IN0_OFFSET, IOMNT_IN(0))
ECIN(IN1_OFFSET, IOMNT_IN(1))
ECIN(IN2_OFFSET, IOMNT_IN(2))
ECIN(IN3_OFFSET, IOMNT_IN(3))
ECOUT(OUT0_OFFSET, IOMNT_OUT(0))
ECOUT(OUT1_OFFSET, IOMNT_OUT(1))
ECOUT(OUT2_OFFSET, IOMNT_OUT(2))
ECOUT(OUT3_OFFSET, IOMNT_OUT(3))
STOP
Example 2
D-Buffer:
GLOBAL INT TargetPosition
Regular Buffer:
!Assuming the first EtherCAT node in the network has "Target Position"
network variable
ecout/r ( ECGETOFFSET("Target Position",0),TargetPosition)
STOP
4.5.21 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[/0][/1]
Switches
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.
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.
EtherCAT slaves that were operational before ECREPAIR activation will keep their feedback and
commutation valid.
4.5.22 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[/0][/1]
Arguments
None
Switches
Comments
The command can be entered either through a Program Buffer or via the SPiiPlus MMI Application
Studio Communication Terminal.
During controller power-up, the controller automatically detects the EtherCAT network change and
informs the user, making a call to ERESCAN unnecessary.
4.5.23 ECRESCUE
Description
ECRESCUE triggers execution of a rescue scan of the EtherCAT network. The scan will detect the
failure location preventing return of EtherCAT frames to the EtherCAT master.
Syntax
ECRESCUE[/0 /1]
Arguments
None
Switches
Comments
The command can be entered through a Program Buffer in the SPiiPlus MMI Application Studio.
Procedure when using an application developed by the user:
1. Issue the ECRESCUE command to execute EtherCAT network rescue scan
2. Check ECERR value
3. In case of ECERR = 6024, Issue the ?ECGETMAIN() and ?ECGETRED() commands to identify
the location of the failure
4. The controller must be rebooted after running the command ECREPAIR
In most cases the ECRESCUE command shouldn't be explicitly executed by the user. During the
controller power up, the controller automatically detects the EtherCAT network failure and informs
the user.
4.5.24 ECSAVECFG
Description
The command saves to flash an array of optional groups based on current configuration, based on
ecgetgrpind() function. For example, actual configuration that contains 1 optional group will be
represented as: {0,1,-1}. This array will be read upon power-up of the controller. Actual configuration
will be checked against the approved configuration. If not identical, error 6016, “The actual network
configuration doesn’t match the last approved configuration.”, is displayed.
Syntax
ECSAVECFG
Arguments
None
Return Value
None.
Comments
Example:
ecsavecfg
4.5.25 ECSAVEDCNF
Description
The function returns array that contains optional groups’ indexes that are part of the last saved
configuration (including mandatory group, which is 0). The array ends with {-1}.
Syntax
ECSAVEDCNF[/0][/1](groups_array)
Arguments
groups_array Array of type INT, filled with groups’ indexes. {-1} marks the end.
Switches
Return Value
None.
Example:
int groups(5)
ecsavedcnf(groups) ! groups array is filled with: {0,1,-1,0,0},
>!meaning that there is one optional group (with index 1) in the last
saved configuration.
4.5.26 ECUNMAP
Description
This function is used to reset all previous mapping defined by ECIN and ECOUT.
Syntax
ECUNMAP [/0 /1]
Arguments
None
Switches
Return Value
None
Comments
The mapping is allowed only when stack is operational.
COM Library Methods
None
C Library Functions
acsc_UnmapEtherCATInputsOutputs
4.5.27 ECUNMAPIN
Description
This function is used to reset all previous mapping defined by ECIN to a specfic offset.
Syntax
ECUNMAPIN [/0 /1](ECOffset)
Arguments
ECOffset An integer providing the offset to which a variable was mapped using ECIN.
Return Value
None
Switches
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.
4.5.28 ECUNMAPOUT
Description
This function is used to reset all previous mapping defined by ECOUT to a specfic offset.
Syntax
ECUNMAPOUT [/0 /1] (ECOffset)
Arguments
Return Value
None
Switches
Example
Assuming previous execution of ECOUT(48,I0) and ECOUT(50,I1), executing ECUNMAPOUT(48) will
unmap only I0.
4.5.29 FOEDOWNLOAD
Description
The function downloads a file over EtherCAT from the controller’s flash memory to a slave device.
Syntax
Arguments
Switches
With switch “b”, the FW will attempt to set the slave to BOOTSTRAP mode before
/b
the FoE transfer operation.
Comments
Switch /b: even if the slave doesn’t support BOOTSTRAP, the firmware will attempt to set it back to
OP state without executing the FoE operation.
The function blocks the ACSPL+ buffer until completion.
It cannot be called from the terminal.
The following errors are supported in case of a failure:
> Error 3317 “FoE Error: Access Denied”
> Error 3308 “The disk is full or the file is too big”
> Error 3307 “FoE Protocol is not support by Slave”
> Error 3040 “Unable to open file”
This function is supported in version 3.00 and higher.
This function is intended for use with EtherCAT slaves that support the FoE protocol.
Example
FOEDOWNLOAD/b (“C:\[Link]”,”Test”,0)
4.5.30 FOEUPLOAD
Description
The function reads a file over EtherCAT from a slave and saves it to the controller’s flash memory.
Syntax
Arguments
The path of the file as it will be saved to the ACS controller’s flash
LocalPath
memory
Switches
Comments
> The function blocks the ACSPL+ buffer processing until completion. It cannot be called from
the terminal. For complete list of errors, see the FoE Errors table.
> The function is intended for use with EtherCAT slaves that support the FoE protocol.
Example
4.5.31 PDOEXT
The PDOEXT command may be used with ACS DS402 products. The command prints the PDO
configuration defined by the master that controls the device.
Example
CoE functions cannot be used with ACS EtherCAT slaves since the CoE protocol is not
supported.
Function Description
COE2READ Read CoE slave Object Directory entry in second EtherCAT network.
COE2WRITE Write into CoE slave Object Directory in second EtherCAT network.
4.6.1 COEREAD
Description
This function is used to read Object Dictionary entry from CoE slave.
This function with the “/d” switch provides the capability of reading a double type (64 bit).
In addition, parameter slave with the “-1” value means SPiiPlusES’ Object Dictionary. The following
objects can be read from the SPiiPlusES’ Object Dictionary:
> CiA402 objects, range: 0x6000-0x9FFF
This function with the “/l” (non-capital L) switch is an extension to the existing COEREAD function,
and enables reading of objects bigger than 64 bits, e.g. strings.
Syntax
COEREAD/d[/size] (int slave,int Index,int Subindex)
COEREAD/l (int Slave, int Index, int Subindex, int Len, int Array[])
Arguments
Len Number of bytes to read if “l” switch is used. The maximum value is 100.
Return Value
COEREAD/d returns the value stored in the variable in the specified Index of the Object Dictionary.
COEREAD/l has no return value, the result is found in the Array parameter
Comments
If the object doesn’t exist, error 3303 “Error SDO: Object doesn’t exist in the Object Dictionary” is
returned. 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 1
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.
Example 2
V0=Coeread/d (0,0x2801,1)
STOP
In the example above, 8 bytes are read from slave 0, index 0x2801, subindex 1. The returned value is
being stored in the V0 global REAL variable.
Example 3
4.6.2 COE2READ
Description
This function is used to read an Object Dictionary entry from a slave via the CoE protocol, in the
second EtherCAT network of a Dual EtherCAT configuration. It is equivalent in meaning and syntax to
the COEREAD command, which reads data from the first network.
Syntax
Arguments
1/2/4 number of bytes in the Object Dictionary, /f for floating (32 bit), /d for
Size suffix
double (64 bit) and /l for an array
Len Number of bytes to read if “l” suffix is used. The maximum value is 100.
Return Value
COE2READ/[/size] returns the value stored in the specified entry in the Object Dictionary of the
slave.
COE2READ/l has no return value, the result is stored in the Array parameter.
Comments
If the object doesn’t exist, error 3303 “Error SDO: Object doesn’t exist in the Object Dictionary” is
returned. In case of wrong parameters, the corresponding runtime error will be generated. The
function should not be used in the Communication Terminal. The function delays the buffer
execution on its line until it’s successful or fails. In case of failure, buffer execution will stop with a
timeout or other error.
Com Library Methods
None
C Library Functions
None
Example
int arr(20)
coe2read/l (0,0x1008,0,20,arr) !object 0x1008 is the Device Name
STOP
4.6.3 COEWRITE
Description
This function is used to write a value into the CoE slave Object Dictionary.
This function with the “/d” switch is an extension to the existing coeread function, and provides the
capability of reading a double type (64 bit).
This function with the “/l” (non-capital L) switch is an extension to the existing COEREAD function,
and enables reading of objects bigger than 64 bits, e.g. strings.
Syntax
COEWRITE/d[/size] (int slave,int Index,int Subindex,double Value)
COEREAD/l (int Slave, int Index, int Subindex, int Len, int Array[])
Arguments
Len Number of bytes to read if “l” switch is used. The maximum value is 100.
Return Value
None
Comments
If the object doesn’t exist, error 3303 “Error SDO: Object doesn’t exist in the Object Dictionary” is
returned. 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 1
COEWRITE/4 (0,0x6041,0,0x0)
This writes the Value 0 (4 bytes) into slave 0, at Index 0x6041, Subindex 0.
Example 2
Coewrite/d (0,0x2801,1,555.666)
STOP
In the example above, the value “555.666” is being written to slave 0, index 0x2801, subindex 1.
Example 3
4.6.4 COE2WRITE
Description
The COE2WRITE function writes a value to an Object Dictionary entry of a slave via the CoE protocol,
in the second EtherCAT network of a Dual EtherCAT configuration. It is equivalent in meaning and
syntax to the COEWRITE command, which writes data to the first network.
Syntax
Arguments
1/2/4 number of bytes in the Object Dictionary, /f for floating (32 bit), /d for
Size suffix
double (64 bit) and /l for an array
Len Number of bytes to write if “l” suffix is used. The maximum value is 100.
Return Value
None.
Comments
If the object doesn’t exist, error 3303 “Error SDO: Object doesn’t exist in the Object Dictionary” is
returned. In case of wrong parameters, the corresponding runtime error will be generated. The
function should not be used in the Communication Terminal. The function delays the buffer
execution on its line until it’s successful or fails. In case of failure, buffer execution will stop with a
timeout or other error.
Com Library Methods
None
C Library Functions
None
Example
int arr(5)
arr(0)=0; arr(1)=1; arr(2)=2; arr(3)=3;arr(4)=4;
coe2write/l (0,0x2022,0,5,arr) !writing to object 0x2022:0
STOP
4.6.5 COEGETSIZE
Description
COEGETSIZE returns the size, in bits, of a specific entry in the object dictionary of a specific slave.
Syntax
int COEGETSIZE [/0 /1](Slave, Index, Subindex)
Arguments
Return Value
Size in bits of the entry in the object dictionary.
Switches
Example
I0=coegetsize(0,0x1000,0)
!Return value: 32 bits. Object 0x1000 usually means the device type.
Comments:
The function returns the received value or fails with runtime error. The function cannot be used in
the SPiiPlus MMI Application Studio Communication Terminal. The function delays the buffer
execution on its line until it's successful of fails the whole buffer with timeout or other error.
Function Description
Clears the error codes from the Modbus requests error array (MBERR)
MBCLEAR
and reactivates the requests that experienced the error condition
Holds the most recent Modbus error code that occurred for the
MBERR
request during the communication process
4.7.1 MBOPEN
Description
MBOPEN establishes a Modbus TCP connection with a Modbus server device using the server's
IP address.
Syntax
int MBOPEN[/switches] (server_ip[, server_id, word_order])
Arguments
(Optional)
server_id
Modbus server ID (1 to 247), the default value is 1
(Optional)
Specifies the order or sequence in which words (registers) are received or
sent. To transfer 32-bit (4 byte) or 64-bit (8 byte) values using the Modbus
protocol, you must define the order in which the registers are received. (Most
word_order vendors choose to map the least significant word onto the lower address of
the register pair).
> big-endian (0)
> little-endian (1) (default)
Return Value
On success: A positive integer value that is used as a communication handle for the server
On failure: A runtime error will occur
Comments
> Up to three servers can be connected to the client controller at any given time.
> A runtime error will occur if the client fails to open a connection with the server.
> If a connection with the specified IP address is already open, the function will return the
communication handle for the server.
> To communicate with an ACS server device, a valid server_id must be specified (the ACS
server device has a CONID variable that specifies the server’s ID).
> Some I/O devices might have a Modbus connection timeout; after a period of inactivity in
the channel, the connection is closed (this behavior and the timeout period are usually
user-defined).
See Section 7.3, ACSPL+ Runtime Errors for supported error codes
Example 1
This example demonstrates how to open a connection to a Modbus server on controller power-up
by using the AUTOEXEC label.
AUTOEXEC:
GLOBAL INT server_handle
!Opens a Modbus TCP connection with a server device
server_handle = MBOPEN(“[Link]”)
STOP
Example 2
This example demonstrates how to open a connection to a Modbus server by specifying the server_
id and word_order optional arguments.
4.7.2 MBGETHANDLE
Description
MBGETHANDLE returns the server's communication handle if a connection has been established
using the specified IP address.
Syntax
int MBGETHANDLE(IP_address)
Arguments
Return Value
On success: Server’s communication handle
On failure: -1
Example
This example shows how to verify the existence of a connection to a Modbus server device.
4.7.3 MBCLOSE
Description
Closes an open Modbus TCP connection using the server's communication handle or IP address.
Syntax
int MBCLOSE[/switches ](server_communication_handle|server_ip_address)
Arguments
Switches
Using the function with the /s switch specifies that the server IP address is
/s
provided, rather than the handle
Return Value
On success: 0
On failure: A runtime error will occur
Comments
Closing a connection will stop all the active Modbus mapping requests.
See Section 7.3, ACSPL+ Runtime Errors for supported error codes
Example 1
This example demonstrates how to open and close a connection to a Modbus server device using
the device handle.
Example 2
This example demonstrates how to open and close a connection to a Modbus server device using
the IP address.
4.7.4 MBREADHREG
Description
The MBREADHREG function maps a Modbus server's holding register to a specified ACSPL+ variable.
The value in the register is then read to the variable, either once or at a specified interval.
Syntax
For Scalar variables
MBREADHREG[/switches] server_handle, mapped_scalar, starting_address[, request_frequency]
For Arrays
MBREADHREG/a server_handle, mapped_array, array_index, starting_address[, number_of_
elements, request_frequency]
Arguments
mapped_
A valid ACSPL+ variable name (can be either static or standard, and
scalar/mapped_
scalar or array)
array
array_index (if /a
Starting index for the mapping
switch is used)
(Optional)
The number of elements that will be mapped (sequentially from the
number_of_ starting address). Element type depends on the switch that has been
elements used. For example, the /f switch specifies that each element is
regarded as a single-precision floating-point number (32 bits, 2
registers).
(Optional)
Specifies the Modbus request frequency (in milliseconds). The
request is sent every “request_frequency” period.
request_frequency
Default value: 10 milliseconds
Minimum value: 5 milliseconds
Switches
Switch
Description
Name
Indicates a one-time read (as opposed to reading the value from the client at
/s the requested frequency). The function copies the value from the server’s
register to the mapped variable.
Return Value
On success: A unique request ID
On failure: A runtime error will occur
Comments
> If the mapping request tries to read a location that does not exist on the server, a runtime
error will occur (the user will know if they tried to access an invalid address), and the
request will not be created.
> If an error occurs during the Modbus mapping process, the mapping will stop, and the
MBERR(request_id) will hold the error code. Also, the request will become inactive. To
remove or restore a Modbus request, see the MBUNMAP and MBCLEAR functions.
> The request ID can be used to check if an error has occurred for the request using the
MBERR(request_id). Also, it can be used to unmap a specific request. (The request ID is
unique per request).
> If no switch is specified, the data to be mapped is regarded as 32-bit (2 registers) integer
value.
> Each element is converted to the format of the user’s mapped variable type. For example, if
the user mapped an Integer variable using the /f suffix (each element from the server
device is regarded as a single-precision floating-point value), the value of the element is
converted into a two’s-complement integer representation before it is stored.
> Loss of precision can occur when converting different data types. For example, reading a
real (floating point) value to an integer element will result in truncation, which may cause a
loss of precision.
> A runtime error will occur if the specified mapped_variable length is incompatible with the
specified number_of_elements.
> The maximum number of registers that can be mapped is 32. (32 shorts, 16 integers, 16
floats, or 8 doubles).
> The maximum number of mapping requests is 32 per server device.
> If repeated timeout errors occur during the mapping process, it is recommended to use a
single-time mapping. Such errors may indicate that the server device is having problems
keeping up with the request rate. (This might be required for Festo AG & Co. KG and
Beckhoff I/O devices.)
See Section 7.3, ACSPL+ Runtime Errors for supported error codes
Example 1
This example demonstrates the mapping of 2 holding registers to the client’s ACSPL+ global scalar
variable, where the value read is treated as an integer number.
D-Buffer:
GLOBAL STATIC INT mapped_scalar
Buffer 1:
INT server_handle, starting_address, request_id
starting_address = 0 !First holding register address
Example 2
This example demonstrates the mapping of 2 holding registers to the client’s ACSPL+ global scalar
variable, where the value read is treated as a single-precision floating-point number.
D-Buffer:
GLOBAL STATIC REAL mapped_scalar
Buffer 1:
INT server_handle, starting address, request_id
starting_address = 0 !First holding register address
server_handle = MBOPEN(“[Link]”) !Opens a Modbus connection
request_id = MBREADHREG/f server_handle, mapped_scalar, starting_
address
STOP
Example 3
This example demonstrates the mapping of 10 holding registers to the client’s ACSPL+ global array,
where each element, is treated as a single-precision floating-point number (2 registers).
D-Buffer:
GLOBAL STATIC REAL mapped_array(20)
Buffer 1:
INT server_handle, starting_address, starting_index, number_of_
elements, request_id
starting_index = 10
starting_address = 0 !First holding register address
number_of_elements = 5
server_handle = MBOPEN(“[Link]”) !Opens a Modbus connection
request_id = MBREADHREG/fa server_handle, mapped_array, starting_
index, starting_address, number_of_elements
STOP
Example 4
This example demonstrates a one-time mapping of 2 holding registers to the client’s ACSPL+ global
scalar variable, where the value read is treated as a single-precision floating-point number.
D-Buffer:
GLOBAL STATIC REAL mapped_scalarBuffer 1:
INT server_handle, starting_address, request_id
starting_address = 0 !First holding register address
server_handle = MBOPEN(“[Link]”) !Opens a Modbus connection
request_id = MBREADHREG/fs server_handle, mapped_scalar, starting_
address
STOP
Figure 6-2 illustrates the mapping of two Modbus device registers to a 32-bit little-endian variable.
4.7.5 MBREADIREG
Description
The MBREADIREG function is used to map a Modbus server’s input register to a specified ACSPL+
variable. The value in the register is then read to the variable, either once or at a specified interval.
Syntax
MBREADIREG[/switches] server_handle, mapped_scalar, starting_address[, request_frequency]
MBREADIREG/a server_handle, mapped_array, array_index, starting_address[, number_of_
elements, request_frequency]
Arguments
server_handle The server’s communication handle (received from the MBOPEN function)
mapped_
A valid ACSPL+ variable name (can be either static or standard, and scalar
scalar /
or array)
mapped_array
array_index (if
the /a switch is Starting index for the mapping
used)
starting_ The starting address of the register to be mapped to the specified ACSPL+
address variable.
(Optional)
The number of elements that will be mapped (sequentially from the
number_of_
starting address). The element type depends on the switch that is used. For
elements
example, the /f switch specifies that each element is regarded as a single-
precision floating-point number (32 bits, 2 registers).
(Optional)
The Modbus request frequency (in milliseconds). The request is sent every
request_ “request_frequency” period.
frequency
Default value: 10 milliseconds
Minimum value: 5 milliseconds
Switches
Name Description
Indicates a one-time read. The function copies the value from the server’s
/s
register to the mapped variable.
Return Value
On success: A unique request ID
On failure: A runtime error will occur
Comments
> If the mapping request tries to read a location that does not exist on the server, a runtime
error will occur (the user will know if they tried to access an invalid address), and the
request will not be created.
> If an error occurs during the Modbus mapping process, the mapping will stop, and the
MBERR(request_id) will hold the error code. Also, the request will become inactive. To
remove or restore a Modbus request, see the MBUNMAP and MBCLEAR functions.
> The request ID can be used to check if an error has occurred for the request using the
MBERR(request_id). Also, it can be used to unmap a specific request. (The request ID is
unique per request).
> If no switch is specified, the data to be mapped is regarded as 32-bit (2 registers) integer
value.
> Each element is converted to the format of the user’s mapped variable type. For example, if
the user mapped an Integer variable using the /f suffix (each element from the server
D-Buffer:
GLOBAL STATIC INT mapped_scalar
Buffer 1:
INT server_handle, starting_address
starting_address = 0 !First input register address
server_handle = MBOPEN(“[Link]”) !Opens a Modbus connection
request_id = MBREADIREG server_handle, mapped_scalar, starting_address
STOP
Example 2
This example demonstrates the mapping of 2 input registers to the client’s ACSPL+ global scalar
variable, where the value read is interpreted as a single-precision floating-point number.
D-Buffer:
GLOBAL STATIC REAL mapped_scalar
Buffer 1:
INT server_handle, starting_address, request_id
starting_address = 0 !First input register address
server_handle = MBOPEN(“[Link]”) !Opens a Modbus connection
request_id = MBREADIREG/f server_handle, mapped_scalar, starting_
address
STOP
Example 3
This example demonstrates the mapping of 10 input registers to the client’s ACSPL+ global array,
where each element is interpreted as a single-precision floating-point number (2 registers).
D-Buffer:
GLOBAL STATIC REAL mapped_array(20)
Buffer 1:
INT server_handle, starting_address, starting_index, number_of_
elements, request_id
starting_index = 10
starting_address = 0 !First input register address
number_of_elements = 5
server_handle = MBOPEN(“[Link]”) !Opens a Modbus connection
request_id = MBREADIREG/fa server_handle, mapped_array, starting_
index, starting_address, number_of_elements
STOP
Example 4
This example demonstrates a one-time mapping of 2 input registers to the client’s ACSPL+ global
scalar variable, where the value read is interpreted as a single-precision floating-point number.
D-Buffer:
GLOBAL STATIC REAL mapped_scalar
Buffer 1:
INT server_handle, starting_address, request_id
starting_address = 0 !First input register address
server_handle = MBOPEN(“[Link]”) !Opens a Modbus connection
request_id = MBREADIREG/fs server_handle, mapped_scalar, starting_
address
STOP
Figure 6-3 illustrates the mapping of two Modbus device registers to a 32-bit little-endian variable.
4.7.6 MBWRITEHREG
Description
The MBREADIREG function is used to map a client's ACSPL+ variable to a Modbus server's register.
The value in the client variable is then written to the server's register, either once or at a defined
interval.
Syntax
MBWRITEHREG[/switches] server_handle, mapped_scalar, starting_address[, request_frequency]
MBWRITEHREG/a server_handle, mapped_array, array_index, starting_address[, number_of_
elements, request_frequency]
Arguments
server_handle The server’s communication handle (received from the MBOPEN function).
mapped_
A valid ACSPL+ variable name (may be either static or standard, and scalar
scalar /
or array).
mapped_array
array_index(if
the /a switch is The array index from which mapping will begin.
used)
starting_ The starting address of the register to be mapped to the specified ACSPL+
address variable.
(Optional)
The number of elements to be mapped (sequentially from the starting
number_of_
address). The element type depends on the switch used. For example, the
elements
/f suffix specifies that each element is interpreted as a single-precision
floating-point number (32 bits, 2 registers).
The Modbus request frequency (in milliseconds). The request is sent every
"request_frequency" period.
request_
frequency Default value: 10 milliseconds
Minimum value: 5 milliseconds
Switches
Return Value
On success: A unique request ID
On failure: A runtime error will occur
Comments
> If the mapping request tries to write a location that does not exist on the server, a runtime
error will occur (the user will know if they tried to access an invalid address), and the
request will not be created.
> If an error occurs during the Modbus mapping process, the mapping will stop, and the
MBERR(request_id) will hold the error code. Also, the request will become inactive. To
remove or restore a Modbus request, see the MBUNMAP and MBCLEAR functions.
> The request ID can be used to check if an error has occurred for the request using the
MBERR(request_id). Also, it can be used to unmap a specific request. (The request ID is
unique per request).
> If no switch is specified, the data to be mapped is regarded as 32-bit (2 registers) integer
value.
> Each element is converted to the format of the user’s mapped variable type. For example, if
the user mapped an Integer variable using the /f suffix (each element from the server
device is regarded as a single-precision floating-point value), the value of the element is
converted into a two’s-complement integer representation before it is stored.
> Loss of precision can occur when converting different data types. For example, reading a
real (floating point) value to an integer element will result in truncation, which may cause a
loss of precision.
> A runtime error will occur if the specified mapped_variable length is incompatible with the
specified number_of_elements.
> The maximum number of registers that can be mapped is 32. (32 shorts, 16 integers, 16
floats, or 8 doubles).
> The maximum number of mapping requests is 32 per server device.
> If repeated timeout errors occur during the mapping process, it is recommended to use a
single-time mapping. Such errors may indicate that the server device is having problems
keeping up with the request rate. (This might be required for Festo AG & Co. KG and
Beckhoff I/O devices.)
See Section 7.3, ACSPL+ Runtime Errors for supported error codes
Example 1
This example demonstrates the mapping of 2 input registers to the client’s ACSPL+ global scalar
variable, where the mapped variable value is interpreted as an integer value.
D-Buffer:
GLOBAL STATIC INT mapped_scalar
Buffer 1:
INT server_handle, starting_address, request_id
mapped_scalar = 100
Example 2
This example demonstrates the mapping of 2 input registers to the client’s ACSPL+ global scalar
variable, where the mapped variable value is interpreted as a single-precision floating-point
number.
D-Buffer:
GLOBAL STATIC REAL mapped_scalar
Buffer 1:
INT server_handle, starting_address, request_id
mapped_scalar = 100.25
starting_address = 0 !First input register address
server_handle = MBOPEN(“[Link]”) !Opens a Modbus connection
request_id = MBWRITEHREG/f server_handle, mapped_scalar, starting_
address
STOP
Example 3
This example demonstrates the mapping of 10 input registers to the client’s ACSPL+ global array,
where each element is interpreted as a single-precision floating-point number (2 registers).
D-Buffer:
GLOBAL STATIC REAL mapped_array(20)
Buffer 1:
INT server_handle, starting_address, starting_index, number_of_
elements, request_id
starting_index = 10
starting_address = 0 !First input register address
number_of_elements = 5
server_handle = MBOPEN(“[Link]”) !Opens a Modbus connection
request_id = MBWRITEHREG/fa server_handle, mapped_array, starting_
index, starting_address, number_of_elements
STOP
Example 4
This example demonstrates a one-time mapping of 2 input registers to the client’s ACSPL+ global
scalar variable, where the mapped variable value is interpreted as a single-precision floating-point
number.
D-Buffer:
GLOBAL STATIC REAL mapped_scalar
Buffer 1:
Figure 6-4 illustrates the mapping of a 32-bit little-endian variable to two Modbus device registers.
4.7.7 MBREADCOIL
Description
The MBREADCOIL function is used to map a Modbus server coil to a specified ACSPL+ variable and
read the state of the coil.
Syntax
MBREADCOIL[/switches] server_handle, mapped_scalar, starting_address[, number_of_coils,
request_frequency]
MBREADCOIL/a server_handle, mapped_array, array_index, starting_address[, number_of_coils,
request_frequency]
Arguments
mapped_scalar / A valid ACSPL+ variable name (may be either static or standard, and
mapped_array scalar or array)
(Optional)
number_of_coils
The number of coils to map (sequentially from starting_address)
(Optional)
The Modbus request frequency (in milliseconds). The request is
sent every “request_frequency” period.
request_frequency
Default value: 10 milliseconds
Minimum value: 5 milliseconds
Switches
Bitwise mapping. Coils are mapped to bits of the specified variable rather than to
/b
successive elements of an array.
Return Value
On success: A unique request ID
On failure: A runtime error will occur
Comments
> If the mapping request tries to read to or write from a location that does not exist on the
server, a runtime error will occur (the user will know if they tried to access an invalid
address), and the request will not be created.
> If an error occurs during the Modbus mapping process, the mapping will stop and MBERR
(request_id) will hold the error code. Also, the request will become inactive. To remove or
restore a Modbus request, see the MBUNMAP and MBCLEAR functions.
> The request ID can be used to check if an error has occurred for the request using MBERR
(request_id). The request ID can also be used for unmapping a specific request. (The request
ID is unique per request.)
> A runtime error will occur if the specified mapped_scalar length is incompatible with the
specified number_of_coils.
> The maximum number of coils that can be mapped is 32.
> The maximum number of mapping requests is 32 per server device.
> If repeated timeout errors occur during the mapping process, it is recommended to use a
single-time mapping. Such errors may indicate that the Server device is having problems
keeping up with the request rate. (This might be required for Festo AG & Co. KG and
Beckhoff I/O devices.)
See Section 7.3, ACSPL+ Runtime Errors for supported error codes
Example 1
This example demonstrates mapping a server coil to the client’s ACSPL+ global variable.
D-Buffer:
GLOBAL STATIC INT mapped_scalar
Buffer 1:
INT server_handle, starting_address, request_id
starting_address = 1 !First Coil address
server_handle = MBOPEN(“[Link]”) !Opens a Modbus connection
request_id = MBREADCOIL server_handle, mapped_scalar, starting_address
STOP
Example 2
This example demonstrates mapping three server coils to the client’s ACSPL+ global array.
D-Buffer:
GLOBAL STATIC INT mapped_array(5)
Buffer 1:
INT server_handle, starting_address, number_of_coils
INT array_index, request_id
array_index = 2
number_of_coils = 3
starting_address = 1 !First Coil address
server_handle = MBOPEN(“[Link]”) !Opens a Modbus connection
request_id = MBREADCOIL/a server_handle, mapped_array, array_index,
starting_address, number_of_coils
STOP
Example 3
This example demonstrates bitwise mapping of 20 server coils to the client’s ACSPL+ global variable.
D-Buffer:
GLOBAL STATIC INT mapped_scalar
Buffer 1:
INT server_handle, starting_address, number_of_coils, request_id
number_of_coils = 20
starting_address = 1 !First Coil address
server_handle = MBOPEN(“[Link]”) !Opens a Modbus connection
request_id = MBREADCOIL/b server_handle, mapped_scalar, starting_
address, number_of_coils
STOP
Example 4
This example demonstrates a one-time mapping from a server coil to the client’s ACSPL+ global
variable.
D-Buffer:
GLOBAL STATIC INT mapped_scalar
Buffer 1:
INT server_handle, starting_address, request_id
starting_address = 1 !First Coil address
server_handle = MBOPEN(“[Link]”) !Opens a Modbus connection
request_id = MBREADCOIL/s server_handle, mapped_scalar, starting_
address
STOP
4.7.8 MBWRITECOIL
Description
The MBWRITECOIL function is used to map a Modbus server coil to a specified ACSPL+ variable and
write the variable's value to the coil.
Syntax
MBWRITECOIL[/switches] server_handle, mapped_scalar, starting_address[, number_of_coils,
request_frequency]
MBWRITECOIL/a server_handle, mapped_array, array_index, starting_address[, number_of_coils,
request_frequency]
Arguments
mapped_scalar / A valid ACSPL+ variable name (can be either static or standard, and
mapped_array scalar or array)
array_index(if the /a
The array index from which mapping will begin.
switch is used)
(Optional)
number_of_coils
The number of coils to map (sequentially from starting_address)
(Optional)
The Modbus request frequency (in milliseconds). The request is sent
every “request_frequency” period.
request_frequency
Default value: 10 milliseconds
Minimum value: 5 milliseconds
Switches
Bitwise mapping. Coils are mapped to bits of the specified variable rather than to
/b
successive elements of an array.
Return Value
On success: A unique request ID
On failure: A runtime error will occur
Comments
> If the mapping request tries to read from or write to a location that does not exist on the
server, a runtime error will occur (the user will know if they tried to access an invalid
address), and the request will not be created.
> If an error has occurred during the mapping process, the mapping for the request will stop
and MBERR(request_id) will hold the error code that occurred. Also, the request will become
inactive. To remove or restore a Modbus request, see the MBUNMAP and MBCLEAR
functions.
> The request ID can be used to check if an error has occurred for the request using MBERR
(request_id). Also, it can be used for unmapping a specific request. (The request ID is unique
per request.)
> A runtime error will occur if the specified mapped_scalar length is incompatible with the
specified number_of_coils.
> The maximum number of coils that can be mapped is 32.
> The maximum number of mapping requests is 32 per server device.
> If repeated timeout errors occur during the mapping process, it is recommended to use a
single-time mapping. Such errors may indicate that the Server device is having problems
keeping up with the request rate. (This might be required for Festo AG & Co. KG and
Beckhoff I/O devices.)
See Section 7.3, ACSPL+ Runtime Errors for supported error codes
Example 1
This example demonstrates mapping a server coil to the client’s ACSPL+ global variable.
D-Buffer:
GLOBAL STATIC INT mapped_scalar
Buffer 1:
INT server_handle, starting_address, request_id
mapped_scalar = 1
starting_address = 1 !First Coil address
server_handle = MBOPEN(“[Link]”) !Opens a Modbus connection
request_id = MBWRITECOIL server_handle, mapped_scalar, starting_
address
STOP
Example 2
This example demonstrates mapping three server coils to the client’s ACSPL+ global array.
D-Buffer:
GLOBAL STATIC INT mapped_array(5)
Buffer 1:
INT server_handle, starting_address, number_of_coils
INT array_index, request_id
number_of_coils = 3
array_index = 2
starting_address = 1 !First Coil address
server_handle = MBOPEN(“[Link]”) !Opens a Modbus connection
request_id = MBWRITECOIL/a server_handle, mapped_array, array_index,
starting_address, number_of_coils
STOP
Example 3
This example demonstrates bitwise mapping of 20 server coils to the client’s ACSPL+ global variable.
D-Buffer:
GLOBAL STATIC INT mapped_scalar
Buffer 1:
Example 4
This example demonstrates a one-time mapping from a server coil to the client’s ACSPL+ global
variable.
D-Buffer:
GLOBAL STATIC INT mapped_scalar
Buffer 1:
INT server_handle, starting_address, request_id
starting_address = 1 !First Coil address
server_handle = MBOPEN(“[Link]”) !Opens a Modbus connection
request_id = MBWRITECOIL/s server_handle, mapped_scalar, starting_
address
STOP
4.7.9 MBREADDIN
Description
The MBREADDIN function maps a Modbus server discrete input to an ACSPL+ variable.
Syntax
MBREADDIN[/switches] server_handle, mapped_scalar, starting_address[, number_of_discrete_
inputs, request_frequency]
MBREADDIN/a server_handle, mapped_array, array_index, starting_address[, number_of_discrete_
inputs, request_frequency]
Arguments
mapped_scalar / A valid ACSPL+ variable name (can be either static or standard, and
mapped_array scalar or array)
(Optional)
number_of_discrete_
The number of discrete inputs to map (sequentially from starting_
inputs
address)
(Optional)
The Modbus request frequency (in milliseconds). The request is
sent every “request_frequency” period.
request_frequency
Default value: 10 milliseconds
Minimum value: 5 milliseconds
Switches
A one-time read. Copies the value from the specified discrete input to mapped_
/s
scalar.
Bitwise mapping. Discrete inputs are mapped to bits of the specified variable rather
/b
than to successive elements of an array.
Return Value
On success: A unique request ID
On failure: A runtime error will occur
Comments
> If the mapping request tries to read to or write from a location that does not exist on the
server, a runtime error will occur (the user will know if they tried to access an invalid
address), and the request will not be created.
> If an error has occurred during the mapping process, the mapping for the request will stop,
and MBERR(request_id) will hold the error code that occurred. Also, the request will become
inactive. To remove or restore a Modbus request, see the MBUNMAP and MBCLEAR
functions.
> The request ID can be used to check if an error has occurred for the request using MBERR
(request_id). Also, it can be used for unmapping a specific request. (The request ID is unique
per request.)
> A runtime error will occur if the specified mapped_scalar length is incompatible with the
specified number_of_discrete_inputs.
> The maximum number of discrete inputs that can be mapped is 32.
> The maximum number of mapping requests is 32 per server device.
> If repeated timeout errors occur during the mapping process, it is recommended to use a
single-time mapping. Such errors may indicate that the Server device is having problems
keeping up with the request rate. (This might be required for Festo AG & Co. KG and
Beckhoff I/O devices.)
See Section 7.3, ACSPL+ Runtime Errors for supported error codes
Example 1
This example demonstrates mapping a server’s discrete input to the client’s ACSPL+ global variable.
D-Buffer:
GLOBAL STATIC INT mapped_scalar
Buffer 1:
INT server_handle, starting_address, request_id
starting_address = 1 !First discrete input address
server_handle = MBOPEN(“[Link]”) !Opens a Modbus connection
request_id = MBREADDIN server_handle, mapped_scalar, starting_address
STOP
Example 2
This example demonstrates mapping three of the server’s discrete inputs to the client’s ACSPL+
global array.
D-Buffer:
GLOBAL STATIC INT mapped_array(5)
Buffer 1:
INT server_handle, starting_address, number_of_coils
INT array_index, request_id
array_index = 2
number_of_discrete_inputs = 3
starting_address = 1 !First discrete input address
server_handle = MBOPEN(“[Link]”) !Opens a Modbus connection
request_id = MBREADDIN/a server_handle, mapped_array, array_index,
starting_address, number_of_discrete_inputs
STOP
Example 3:
This example demonstrates bitwise mapping of 20 of the server’s discrete inputs to the client’s
ACSPL+ global variable.
D-Buffer:
GLOBAL STATIC INT mapped_scalar
Buffer 1:
INT server_handle, starting_address, number_of_discrete_inputs,
request_id
number_of_discrete_inputs = 20
starting_address = 1 !First discrete input address
server_handle = MBOPEN(“[Link]”) !Opens a Modbus connection
request_id = MBREADDIN/b server_handle, mapped_scalar, starting_
address, number_of_discrete_inputs
STOP
Example 4
This example demonstrates a one-time mapping from a server’s discrete input to the client’s
ACSPL+ global variable.
D-Buffer:
GLOBAL STATIC INT mapped_scalar
Buffer 1:
INT server_handle, starting_address, request_id
starting_address = 1 !First discrete input address
server_handle = MBOPEN(“[Link]”) !Opens a Modbus connection
request_id = MBREADDIN/s server_handle, mapped_scalar, starting_
address
STOP
4.7.10 MBUNMAP
Description
The MBUNMAP function unmaps a specific request using the request ID.
Syntax
MBUNMAP [request_id]
Arguments
(Optional)
request_id
A request ID received from the MBREAD or MBWRITE function
Return Value
The number of requests that have been unmapped (0 or 1).
Comments
> Unmapping a request will also clear its error code(if such exists) from the MBERR array.
> If no request ID is specified, all active Modbus requests will be removed.
See Section 7.3, ACSPL+ Runtime Errors for supported error codes
Example 1
This example demonstrates the unmapping of a specific Modbus request using the request ID.
MBUNMAP request_id
STOP
Example 2
This example demonstrates the unmapping of all active Modbus requests.
MBUNMAP
STOP
4.7.11 MBCLEAR
Description
The MBCLEAR function clears the error codes from the Modbus requests error array (MBERR) and
reactivates the requests that experienced the error condition.
Syntax
MBCLEAR [request_id]
Arguments
(Optional)
request_id
A request ID received from the MBREAD or MBWRITE function.
Return Value
None
Comments
If request_id is not specified, the entire Modbus requests error array(MBERR) will be cleared (set to
0) and all request that experienced errors will be reactivated.
See Section 7.3, ACSPL+ Runtime Errors for supported error codes
Example 1
This example demonstrates how to clear a Modbus error and reactivate the relevant request.
MBCLEAR request_id
STOP
Example 2
This example demonstrates how to clear all Modbus errors and reactivate all Modbus requests.
MBCLEAR
STOP
4.7.12 MBERR
Description
MBERR is an integer array with one element for each possible Modbus request ID (between 0 - 95).
It holds the most recent Modbus error code that occurred for the request during the communication
process.
Table 6-6. Modbus Error Codes
Error
Description
Code
0 No Error
Illegal Data Address - Data addresses of some or all the required entities are not
8002
allowed or do not exist in the server.
Illegal Data Value - A value contained in the query data field is not an allowable
8003
value for the server.
Server Device Failure - An unrecoverable error occurred while the server was
8004
attempting to perform the requested action.
Acknowledge - Server has accepted the request and is processing it, but a long
8005 duration of time is required. This response is returned to prevent a timeout
error from occurring in the client.
Response Length Mismatch - The received response length did not match the
8013
expected length.
Response Out of Bounds – The received response value is invalid. This may be
8014 due to the value being out of the allowed range, an attempt to write to a
protected variable, etc.
Timeout – No response has been received from the server device for the
8015 timeout period(5 seconds). The connection with the server device has been
terminated.
8016 Connection Closed - The connection with the server device has been closed.
Comments
MBERR can be cleared by unmapping the erroneous request using the MBUNMAP function or by
activating the erroneous request using the MBCLEAR function.
Example
This example demonstrates monitoring the error state of a Modbus mapping request.
D-buffer:
GLOBAL INT request_id
Buffer 1:
request_id = MBWRITEHREG server_handle, mapped_scalar, starting_
address
ON MBERR(request_id)
DISP “An error has occurred for the request, request ID=”,request_id
!Here we decide how we would like to handle this error, un-mapping
!the request, closing the communication channel, or clearing the
!fault and restore the request to an active state
.
.
.
MBCLEAR request_id !For example, clearing the error of the request,
!and restoring it to an active state
RET
STOP
Tag
403
Accessibility
Read-Only
4.7.13 #MBMAPREP
Description
The #MBMAPREP command displays a report of all the active Modbus connections and mapped
variables.
Syntax
#MBMAPREP
Example
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.
Function Description
4.8.1 GETSP
Description
GETSP reads a value from the specified SP address.
It is a non-real-time function with a minimum response time of 3 controller cycles. The response
time may be increased depending on controller tasks and the drive model.
Syntax
GETSP [/0][/1] (int SP, int Address)
Arguments
The SP number in the system. Use getconf(260, axis), where axis is axis in the
SP
system to get the SP number.
Switches
Return Value
Value read from the specified SP address.
Error Conditions
The function causes an error if an SP number is specified other than 0–127, 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
4.8.2 GETSPA
Description
GETSPA reads a value from the address of the variable in the SP memory range.
It is a non-real-time function with a minimum response time of 3 controller cycles. The response
time may be increased depending on controller tasks and the drive model.
Syntax
Arguments
Switches
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 and SETSP.
Example
4.8.3 SETSP
The SETSP function is for advanced users only. Misuse of this function may damage the
drive.
Description
SETSP writes a value to the specified SP address.
Syntax
SETSP [/0][/1] (int SP_number, int Address, int|float value)
Arguments
Switches
Error Conditions
Error 3126, Illegal SP number.
Example
INT PAR_ADDRESS
PAR_ADDRESS=GETSPA(0,"axes[0].user_custom_parameter1") !Gets the memory
address of axes[0].user_custom_parameter1
SETSP(0, PAR_ADDRESS, 1.5) !Changes the value of the axes[0].user_custom_
parameter1 in SP 0 to 1.5.
Function Description
Reads data characters from the specified channel and stores them into
INP
integer array
Function Description
4.9.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.
input_
Any real number or integer expression
signal
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.
Comments
This function may be called inside a FASTCALL function.
Examples
Example 1
Symmetrical Dead Zone
In this example, illustrated in Figure 6-7, input_signal ranges from -20: +20, and creates a
symmetrical dead zone from -10: +10.
return_value = DEADZONE(input_signal,10)
Example 2
Asymmetrical Dead Zone
In this example, illustrated in Figure 6-8, input_signal ranges from -20: +20, and creates an
asymmetrical dead zone from -5 – +15.
return_value = DEADZONE(input_signal,-5,10)
4.9.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
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.
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
4.9.3 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
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
4.9.4 INTGR
Description
INTGR returns an integrator with optional deadzone and saturation limits.
Syntax
real INTGR[switches](X, Deadzone, Min, Max[,Initial_Value])
Switch
/r Resets the integrator value for each buffer run without needing to recompile.
Arguments
A real number. When the Deadzone value falls into the range of -
Deadzone
Deadzone to +Deadzone, INTGR retains its previous value as if X = 0.
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.
4.9.5 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
p_delay A real number representing the delay on the positive edge in msec.
down_
A real number representing the delay on the negative edge in msec.
delay
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.
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.
Commande
d position 100 200 300 400 500 600 700 …
(x)
Actual
103 199 294 402 500 598 705 …
position (p)
The table defines a functional dependence p=f(x) that cannot be expressed analytically.
The argument values for x in the definition table are knots, and the function values for p are control
points.
A 3rd order polynomial spline provides an approximation of the table-driven function that can
provide the function value not only in the knots, but at any point. Between each two knots the
spline is expressed as:
where coefficients a0, a1, a2, a3 have different values at different intervals.
The SPiiPlus controller also supports two-dimensional splines. In this case, the definition table is a
two-dimensional matrix. Knot points are defined for two arguments x and y, and the matrix
contains corresponding p values. Knot values divide the XY plane into rectangular cells. The matrix
defines the function values in the cell vertices. Within each cell, the interpolating spline is expressed
as:
Many different spline approximations can be provided for one definition table. The SPiiPlus
controller supports two kinds of splines: Catmull-Rom and B-Splines (see description below).
If the distance between the knots in the table is constant, the spline is called uniform. On the
contrary, a non-uniform spline corresponds to a table that contains function values in arbitrary
points. However, the definition table always arranges the knot values in ascending order, so that xi
< xi+1.
All knot points constitute the definition range of the spline. Figure 6-13 illustrates definition range of
a function defined with six non-uniform knots:
> The spline yields constant value equal to pN-1 on the interval from xN-1 to + .
One-Dimensional B-spline
Assume a definition table provides N control points p0, p1, p2… pN-1 in knots x0, x1, x2… xN-1.
Unlike the Catmull-Rom spline, a B-Spline does not go through the control points. Actually, it
approximates the control points as illustrated in Figure 6-16.
Compared to a Catmull-Rom spline, a B-Spline generates a smoother curve. Used in the controller, a
B-spline provides continuous velocity and acceleration; where Catmull-Rom spline provides
continuous velocity only, and acceleration may change by jumping at the control points.
Features of the B-Spline:
> The spline is C2-continuous, meaning the curve, its first and second derivatives are all
continuous functions.
> The curve approximates the control points; and does not go through each control point.
> The spline yields changing value in the interval from x0 – (x1 – x0) to xN-1+(xN-1 – xN-2).
> The spline yields constant value equal to p0 in the interval from- to x0 – (x1 – x0).
> The spline yields constant value equal to pN-1 in the interval from xN-1+ (xN-1 – xN-2) to + .
Not-passing the control points is not always a drawback. If values p0, p1, p2… pN-1 are obtained from
some measuring process, the values include measuring error that has a stochastic component.
B-Spline tends to filter out the stochastic error, thereby improving overall accuracy.
Two-Dimensional Splines
The SPiiPlus NT controllers support two-dimensional Catmull-Rom and B-Splines.
A two-dimensional spline approximates a definition table that provides NxM control points p00, p01,
…p0,M-1, p10, p11,… pN-1,M-1 on the grid defined by knots x0, x1, x2… xM-1 and y0, y1, y2… yN-1.
A two-dimensional spline is defined as tensor product of two one-dimensional splines. Two-
dimensional splines share many features with the corresponding one-dimensional splines, for
example:
C1-continuous C2-continuous
A section of a two-dimensional spline surface along any direction provides a curve, which is a
corresponding one-dimensional file. For example, a two-dimensional Catmull-Rom spline is cut on
the grid line that corresponds to knot y2. The section is a one-dimensional Catmull-Rom spline built
upon control points p20, p21, p22, … p2,M-1.
The behavior of a two-dimensional spline beyond the definition range is more complex than in the
case of a one-dimensional spline. Figure 6-17 illustrates the Catmull-Rom spline beyond the
definition range:
[Link] 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
A real number representing the value of XX that corresponds to the first point in
base
array.
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
XX -20 -10 -7 -5 0 5 10 15 20
[Link] 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
A real number representing the value of XX that corresponds to the first point in
base
array.
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
XX -20 -10 -7 -5 0 5 10 15 20
ARRA
N/A -10 N/A 3 5 14 12 N/A N/A
Y
- -
YY -10 1.16 6.16 12.33 12.33 12 12
7.83 2.45
[Link] 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
The name of a real one-dimensional array that specifies the values of XX that
X_table
correspond to the point array.
Return Value
MAPN returns a linearly interpolated value from the array according to the value variable XX.
> To obtain a valid return value from the MAPN function after the Y_table array is
changed, the buffer must be recompiled before calling the MAPN function.
> If a MAPN function is called without recompiling the buffer, then the return
value is calculated according to the values from the Y_table array that was
provided to the function after the last compilation.
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
XX -20 -10 -7 -3 6 12 14 15 20
[Link] 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
The name of a real one-dimensional array that specifies the values of XX that
X_table
correspond to the point array.
Return Value
MAPNB returns the third order B spline interpolated value from the Y_table per variable XXvalue.
> To obtain a valid return value from the MAPNB function after the Y_table array
is changed, the buffer must be recompiled before calling the MAPNB function.
> If a MAPNB function is called without recompiling the buffer, then the return
value is calculated according to the values from the Y_table array that was
provided to the function after the last compilation.
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
XX -20 -10 -7 -3 6 12 14 15 20
ARRA
N/A -10 N/A -3 6 12 12 N/A N/A
Y
- - -
YY -10 7.64 9.23 5 4.124 4
8.02 4.65 0.41
[Link] 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)
Arguments
The name of a real one-dimensional array that specifies the values of XX that
X_table
correspond to the point array.
Return Value
MAPNS returns the third order Catmull-Rom spline interpolated value from the X_table per variable
XX value.
> To obtain a valid return value from the MAPNS function after the Y_table array
is changed, the buffer must be recompiled before calling the MAPNS function.
> If a MAPNS function is called without recompiling the buffer, then the return
value is calculated according to the values from the Y_table array that was
provided to the function after the last compilation.
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
XX -20 -10 -7 -3 6 12 14 15 20
[Link] 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)
Arguments
A real number representing the value of XX that corresponds to the first point in
base
array.
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
XX -20 -10 -7 -5 0 5 10 15 20
[Link] 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
A real number representing the value of XX that corresponds to the first point
baseX
in the array.
A real number representing the value of ZZ that corresponds to the first point
baseY
in the array.
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
[Link] 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
A real number representing the value of XX that corresponds to the first point
baseX
in the array.
A real number representing the value of ZZ that corresponds to the first point
baseY
in the array.
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
!points.
DISP XX,ZZ,YY !Displays values of XX, ZZ and YY.
END !Ends MAP2B.
STOP !Ends program
[Link] 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
Return Value
MAP2N returns the linearly interpolated value from the array according to the value of the variables
XX and ZZ.
> To obtain a valid return value from the MAP2N function after the Y_table array
is changed, the buffer must be recompiled before calling the MAP2N function.
> If a MAP2N function is called without recompiling the buffer, then the return
value is calculated according to the values from the Y_table array that was
provided to the function after the last compilation.
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
[Link] 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
Return Value
MAP2NB returns the third-order B-spline interpolated value from the array according to the value of
the variables XX and ZZ.
> To obtain a valid return value from the MAP2NB function after the Y_table array
is changed, the buffer must be recompiled before calling the MAP2NB function.
> If a MAP2NB function is called without recompiling the buffer, then the return
value is calculated according to the values from the Y_table array that was
provided to the function after the last compilation.
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
[Link] 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
Return Value
MAP2NS returns the third-order Catmull-Rom interpolated value from the array according to the
value of the variables XX and ZZ.
> To obtain a valid return value from the MAP2NS function after the Y_table array
is changed, the buffer must be recompiled before calling the MAP2NS function.
> If a MAP2NS function is called without recompiling the buffer, then the return
value is calculated according to the values from the Y_table array that was
provided to the function after the last compilation.
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
[Link] 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
A real number representing the value of XX that corresponds to the first point
baseX
in the array.
A real number representing the value of XX that defines the fixed intervals
stepX
between the array points.
A real number representing the value of ZZ that corresponds to the first point
baseY
in the array.
A real number representing the value of ZZ that defines the fixed intervals
stepY
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
[Link] 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
from The start point to begin 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.
Error Conditions
Error 3158 - The function cannot find a matching value. The CONNECT formula has no root or the root
is not single.
Example
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:
[Link] RAND
Description
RAND generates a random number
Syntax
real RAND([min, max,seed])
Arguments
(optional) Lower boundary of the interval from which randomized number will
min
be selected. Default value is 0.
(optional) Upper boundary of the interval from which randomized number will
max
be selected. Default value is 0x7fff.
(optional) Sets the random sequence generator. The number range is limited
seed 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
Comments
This function may be called inside a FASTCALL function.
Example
RAND (-45,45,TIME)
[Link] ROLL
Description
The ROLL function returns a result rolled-over to within a defined Pitch (range), as illustrated below.
Syntax
ROLL(X, Pitch)
Arguments
A range from 0 to Pitch (positive real value) where the return value will be
Pitch
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:
[Link] SAT
Description
SAT returns a result of defined saturation range
Syntax
real SAT(X, Min, Max)
Arguments
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
Comments
This function may be called inside a FASTCALL function.
Example
Function Description
Function Description
Function Description
4.10.1 ERRORMAP1D
Description
The ERRORMAP1D function configures and activates 1D error correction for the mechanical error
compensation for the specified zone, so that the compensated reference position will be calculated
by subtracting the linearly (by default) interpolated error from the desired position so that the actual
value will be closer to the desired value.
The calculation assumes fixed Intervals between points inside the zone.
Syntax
Arguments
The index of the axis that the mechanical error compensation will be
axis applied to, valid numbers are: 0, 1, 2, ... up to the number of axes in the
system minus 1.
A real number representing the fixed interval distance between the two
step
adjacent axis commands.
referenced_
[Optional] The index of the axis, or the index of the analog input that the
axis_or_analog_
mechanical error compensation will be calculated based on its feedback.
input
Switches
/p Prevent applying dynamic error compensation on INDEX, MARK, and PEG values
Specifies that the mechanical error compensation will be calculated based on the
/a
feedback from the axis specified by the optional parameter.
Specifies that the mechanical error compensation will be calculated based on the
/i
feedback from the analog input indicated by the optional parameter.
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.
Comments
If erroneous parameters are passed to the function, the corresponding runtime error will be
generated. The function is intended to be used with arrays only, meaning that an error is generated
if a scalar is passed as a parameter.
4.10.2 ERRORMAPN1D
Description
The ERRORMAPN1D function configures and activates 1D error correction for the mechanical error
compensation for the specified zone, so that the compensated reference position will be calculated
by subtracting the linearly (by default) interpolated error from the desired position so that the actual
value will be closer to the desired value.
The calculation is based on an arbitrary network of points inside the zone.
Syntax
Arguments
The index of the axis that the mechanical error compensation will be
axis applied to, valid numbers are: 0, 1, 2, ... up to the number of axes in the
system minus 1.
referenced_
[Optional] The index of the axis or the index of the analog input to be
axis_or_analog_
used for the calculation of the mechanical error compensation.
input
Switches
/p Prevent applying dynamic error compensation on INDEX, MARK, and PEG values
Specifies that the mechanical error compensation will be calculated based on the
/a
feedback from the axis specified by the optional parameter.
Specifies that the mechanical error compensation will be calculated based on the
/i
feedback from the analog input indicated by the optional parameter.
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.
Comments
In case of erroneous parameters, the relevant runtime error will be generated. The function is
intended for use with arrays, meaning that an error is generated if a scalar is given as a parameter.
4.10.3 ERRORMAPA1D
Description
The ERRORMAPA1D function configures and activates 1D error correction for the mechanical error
compensation for the specified zone, so that the compensated reference position will be calculated
by multiplying the scaling factor by the desired position so that the actual value will be closer to the
desired value.
Syntax
Arguments
The index of the axis that the mechanical error compensation will be applied
axis to, valid numbers are: 0, 1, 2, ... up to the number of axes in the system minus
1.
The zone index of the mechanical error compensation, valid numbers are: 0,
zone
1, 2, ... up to the maximum number of zones minus 1.
scaling_ The scaling factor for the linear alignment that will be used for mechanical
factor error compensation. The allowed range for the scaling factor is (0, 2.0).
The offset for the linear alignment that will be used for mechanical error
offset compensation. The offset is actually the mechanical error compensation for
the 0-point location.
Switches
/p Prevent applying dynamic error compensation on INDEX, MARK, and PEG values
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.
Comments
In case of erroneous parameters, the corresponding runtime error will be generated. The function is
intended to be used for arrays only, meaning that an error is generated if a scalar is given as a
parameter.
This command is supported in ADK versions 2.70 and higher.
4.10.4 ERRORMAP2D
Description
The ERRORMAP2D function configures and activates 2D error correction for the mechanical error
compensation of the ‘axis0’ or 'axis1' command (depending on the switch used) for the specified
zone, so that the compensated reference position will be calculated by subtracting the linearly (by
default) interpolated error from the desired position so that the actual value will be closer to the
desired value.
Syntax
Arguments
The index of the first axis that the mechanical error compensation
axis0 will be applied to. Valid numbers are: 0, 1, 2, ... up to the number of
axes in the system minus 1.
[Optional] The index of the first axis, or the index of the first analog
referenced_axis_or_
input whose feedback will be used to calculate the mechanical error
analog_input0
compensation.
[Optional] The index of the second axis, or the index of the second
referenced_axis_or_
analog input whose feedback will be used to calculate the
analog_input1
mechanical error compensation.
Switches
Specifies that the first optional parameter will be treated as an analog input
/aj
index.
Specifies that the second optional parameter will be treated as an analog input
/ak
index.
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.
Comments
If incorrect parameters are passed to the function the corresponding error will be generated. The
function is intended to be used for arrays only, meaning that an error is generated if a scalar is given
as a parameter.
4.10.5 ERRORMAPN2D
Description
The ERRORMAPN2D function configures and activates 2D error correction for the mechanical error
compensation of the ‘axis0’ or 'axis1' command (depending on the switch used) for the specified
zone, so that the compensated reference position will be calculated by subtracting the linearly (by
default) interpolated error from the desired position so that the actual value will be closer to the
desired value.
Syntax
Arguments
The index of the axis that the mechanical error compensation will be
axis0 applied to, valid numbers are: 0, 1, 2, ... up to the number of axes in the
system minus 1.
referenced_ [Optional] The index of the first axis or the index of the first analog input
axis_or_analog_ providing the feedback used for calculation of the mechanical error
input0 compensation.
referenced_ [Optional] The index of the second axis or the index of the second analog
axis_or_analog_ input providing the feedback used for calculation of the mechanical error
input1 compensation.
Switches
Specifies that the mechanical error compensation will be calculated based on the
/a
feedback from the axis specified by the optional parameter.
Specifies that the mechanical error compensation will be calculated based on the
/i
feedback from the analog input indicated by the optional parameter.
/aj Specifies that the first optional parameter will be treated as an analog input index.
Specifies that the second optional parameter will be treated as an analog input
/ak
index.
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.
Comments
If incorrect parameters are passed to the function the relevant error will be generated. The function
is intended to be used for arrays only, meaning that an error is generated if a scalar is given as a
parameter.
4.10.6 ERRORMAPA2D
Description
The ERRORMAPA2D function configures and activates 2D error correction for the mechanical error
compensation of the specified axis for the specified zone. The compensated reference position will
be calculated by taking into account the angle for the orthogonality correction so that the actual
value will be closer to the desired value.
Syntax
Arguments
The index of the axis that the mechanical error compensation will be applied to,
axis0
valid numbers are: 0, 1, 2, ... up to the number of axes in the system minus 1.
The zone index of the mechanical error compensation, valid numbers are: 0, 1,
zone
2, ... up to the number of axes in the system minus 1.
The angle for the orthogonality correction that will be used for mechanical error
angle compensation. The value is specified in radians. The allowed range for the angle
is [-π/4, π/4].
Switches
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 angle_rad = 1
ERRORMAPA2D/0 (X,Y),ZONE,angle_rad
ERRORMAPA2D/1 (X,Y),ZONE,angle_rad
ERRORMAPON X,ZONE
ERRORMAPON Y,ZONE
Comments
In case of wrong parameters, the corresponding runtime error will be generated. The function is
intended to be used for arrays only, meaning that an error is generated if a scalar is given as a
parameter.
The correction is applied as follows:
Orthogonal Alignment: For the two stages to travel precisely along the X and Y axes, the line of
travel for the Y-axis must be orthogonal to the line of travel of the X-axis. If the two travel lines are
not orthogonal, Y-axis travel creates a position error in the X direction. The maximum value of this
error can be determined by multiplying the travel length of the stage by the sine of the angular
error.
For example:
Orthogonality Error = 5 arc sec (0.0014°)
Travel Length (L) = 400 mm (16 in)
Error = L∙sin α = 400 mm∙sin (0.0014°) = 9.8 μm
This command is supported in ADK versions 2.70 and higher.
4.10.7 ERRORMAP3DA
Description
The ERRORMAP3DA function configures and activates 3D error correction for the mechanical error
compensation of ‘axis0’, ‘axis1’, and 'axis2' for the specified zone, so that the compensated
reference position will be calculated by adding the interpolated error from the desired position so
that the actual value will be closer to the desired value. Interpolation is linear by default, other
options are available.
The ERRORMAP3DA function receives the indices of three axes, the zone index, the base value of
the ‘axis0’ command, the fixed defined interval of the ‘axis0’ command, the base value of the ‘axis1’
command, a fixed defined interval for the ‘axis1’ command, the base value of the 'axis2' command,
the fixed defined interval of the 'axis2' command, and 10 2D correction tables correlated to the
specified 'axis2' coordinates for mechanical error compensation.
Syntax
Arguments
The index of the axis that the mechanical error compensation will be
axis0 applied to, valid numbers are: 0, 1, 2, ... up to the number of axes in the
system minus 1.
A real number representing the fixed interval distance between the two
step0
adjacent ‘axis0’ commands.
A real number representing the fixed interval distance between the two
step1
adjacent ‘axis1’ commands.
A real number representing the fixed interval distance between the two
step2
adjacent ‘axis2’ commands.
referenced_ [Optional] The index of the first axis, or the index of the first analog input
axis_or_analog_ whose feedback will be used to calculate the mechanical error
input0 compensation.
referenced_ [Optional] The index of the second axis, or the index of the second analog
axis_or_analog_ input whose feedback will be used to calculate the mechanical error
input1 compensation.
referenced_ [Optional] The index of the second axis, or the index of the third analog
axis_or_analog_ input whose feedback will be used to calculate the mechanical error
input2 compensation.
Switches
/aj Specifies that the first optional parameter to be treated as an analog input index.
/al Specifies that the third optional parameter to be treated as an analog input index.
Error Conditions
The function detects the following error conditions.
> 2044 - Index is out of range, when the defined array size is less than the defined number of
array points.
> 3113 - The step in the table is zero or negative, when the step argument is zero or negative.
> 3384 - The specified suffix combination is invalid. Please see the documentation for more
details.
> 3413 - The supplied correction maps (2-dimensional arrays or MATRIX types) should have
the same dimensions. Please see the documentation for more details.
> 3414 - The Specified referenced axes/analog inputs are invalid. Please see the
documentation for more details.
Comments
If incorrect parameters are passed to the function the corresponding runtime error is generated. The
function is intended to be used only with arrays; thus, an error is generated if a scalar is given as a
parameter.
4.10.8 ERRORMAP3D2
Description
The ERRORMAP3D2 function configures and activates 3D error correction for the mechanical error
compensation of the ‘axis0’ command, ‘axis1’ command, and 'axis2' command for the specified
zone, so that the compensated reference position will be calculated by adding the interpolated error
from the desired position so that the actual value will be closer to the desired value. Interpolation is
linear by default; other options are available.
The ERRORMAP3D2 function receives indexes of three axes, zone index, base value of the ‘axis0’
command, fixed defined interval of the ‘axis0’ command, base value of the ‘axis1’ command, fixed
defined interval of the ‘axis1’ command, base value of the ‘axis2’ command, fixed defined interval of
the ‘axis2’ command, and two 2D correction tables (in correlation to the specified ‘axis2’ coordinates)
for mechanical error compensation.
Syntax
Arguments
The index of the axis that the mechanical error compensation will be
axis0 applied to, valid numbers are: 0, 1, 2, ... up to the number of axes in the
system minus 1.
A real number representing the fixed interval distance between the two
step0
adjacent ‘axis0’ commands.
A real number representing the fixed interval distance between the two
step1
adjacent ‘axis1’ commands.
A real number representing the fixed interval distance between the two
step2
adjacent ‘axis2’ commands.
referenced_ [Optional] The index of the first axis, or the index of the first analog input
axis_or_analog_ whose feedback will be used to calculate the mechanical error
input0 compensation.
referenced_ [Optional] The index of the second axis, or the index of the second analog
axis_or_analog_ input whose feedback will be used to calculate the mechanical error
input1 compensation.
referenced_ [Optional] The index of the second axis, or the index of the third analog
axis_or_analog_ input whose feedback will be used to calculate the mechanical error
input2 compensation.
Switches
Specifies that the first optional parameter will be regarded as an analog input
/aj
index.
Specifies that the second optional parameter will be regarded as an analog input
/ak
index.
Specifies that the third optional parameter will be regarded as an analog input
/al
index.
Specifies that the extrapolation will be used for Z values that are beyond the
original observation range. That is, we are assuming that existing trends will
/e continue (by using the nearest correction table to estimate the correction). This
method is subject to greater uncertainty and a higher risk of producing
meaningless results than interpolation.
Comments
> When incorrect parameters are specified, the relevant compile-time or run-time error is
generated. See ACSPL+ Runtime Errors for explanation of error 2044 and ACSPL+
Compilation Errors for explanations of errors 3113, 3384, 3413, 3414. The function is intended
for use with arrays only; an error is generated if a scalar is given as a parameter.
Examples
Example 1
This example uses two 2-dimensional arrays to create 2-dimensional correction maps that are used
for the 3D Dynamic error compensation. Each map represents a different value (height) of the Z axis.
An XYZ cuboid (rectangular prism) zone starts at coordinate -100 for X, 30 for Y, and 30 for Z. It has a
fixed interval of 10 mm for each axis. The user units are represented in mm.
D-Buffer:
global real static X_Correction1(3)(10)
global real static X_Correction2(3)(10)
Buffer:
local int X_axis
local int Y_axis
local int Z_axis
local int zone
local int X_base
local int X_step
local int Y_base
local int Y_step
Example 2
This example uses two 2-dimensional arrays to create 2-dimensional correction maps, that are used
for the 3D Dynamic error compensation. Each map represents a different analog input value. An XYZ
cuboid (rectangular prism) zone starts at coordinate -100 for X, 30 for Y, and 30% for the Z specified
analog input. It has a fixed interval of 10 mm for each axis, and 10 percent for the Z analog input. The
user units are represented in mm.
D-Buffer:
global real static X_Correction1(3)(10)
global real static X_Correction2(3)(10)
Buffer:
local int X_axis
local int Y_axis
local int Z_axis
local int zone
local int X_base
local int X_step
local int Y_base
local int Y_step
4.10.9 ERRORMAP3D3
Description
The ERRORMAP3D3 function configures and activates 3D error correction for the mechanical error
compensation of the ‘axis0’ command, ‘axis1’ command, and 'axis2' command for the specified
zone, so that the compensated reference position will be calculated by adding the interpolated error
from the desired position so that the actual value will be closer to the desired value. Interpolation is
linear by default; other options are available.
ERRORMAP3D3 function receives indexes of three axes, zone index, base value of the ‘axis0’
command, fixed defined interval of the ‘axis0’ command, base value of the ‘axis1’ command, fixed
defined interval of the ‘axis1’ command, base value of the ‘axis2’ command, fixed defined interval of
the ‘axis2’ command, and three 2D correction tables (in correlation to the specified ‘axis2’
coordinates) for mechanical error compensation.
Syntax
Arguments
The index of the axis that the mechanical error compensation will be
axis0 applied to, valid numbers are: 0, 1, 2, ... up to the number of axes in the
system minus 1.
A real number representing the fixed interval distance between the two
step0
adjacent ‘axis0’ commands.
A real number representing the fixed interval distance between the two
step1
adjacent ‘axis1’ commands.
A real number representing the fixed interval distance between the two
step2
adjacent ‘axis2’ commands.
referenced_ [Optional] The index of the first axis, or the index of the first analog input
axis_or_analog_ whose feedback will be used to calculate the mechanical error
input0 compensation.
referenced_ [Optional] The index of the second axis, or the index of the second analog
axis_or_analog_ input whose feedback will be used to calculate the mechanical error
input1 compensation.
referenced_ [Optional] The index of the second axis, or the index of the third analog
axis_or_analog_ input whose feedback will be used to calculate the mechanical error
input2 compensation.
Switches
Specifies that the first optional parameter will be regarded as an analog input
/aj
index.
Specifies that the second optional parameter will be regarded as an analog input
/ak
index.
Specifies that the third optional parameter will be regarded as an analog input
/al
index.
Specifies that the extrapolation will be used for Z values that are beyond the
original observation range. That is, we are assuming that existing trends will
/e continue (by using the nearest correction table to estimate the correction). This
method is subject to greater uncertainty and a higher risk of producing
meaningless results than interpolation.
Comments
> When incorrect parameters are specified, the relevant compile-time or run-time error is
generated. See ACSPL+ Runtime Errors for explanation of error 2044 and ACSPL+
Compilation Errors for explanations of errors 3113, 3384, 3413, 3414. The function is intended
for use with arrays only; an error is generated if a scalar is given as a parameter.
Example
This example uses three 2-dimensional arrays to create 2-dimensional correction maps, that are
used for the 3D Dynamic error compensation. Each map represents a different value(height) of the Z
axis. The zone starts at coordinate -100 for X, 30 for Y, and 30 for Z. It has a fixed interval of 10 mm
for each axis. The user units are represented in mm.
D-Buffer:
global real static X_Correction1(3)(10)
global real static X_Correction2(3)(10)
global real static X_Correction3(3)(10)
Buffer:
local int X_axis
local int Y_axis
local int Z_axis
local int zone
local int X_base
local int X_step
local int Y_base
local int Y_step
X_Correction3(0)(4)=-0.2
X_Correction3(0)(5)=0.26; X_Correction3(0)(6)=0.15;
X_Correction3(0)(7)=0.02; X_Correction3(0)(8)=-0.15;
X_Correction3(0)(9)=0
X_Correction3(1)(0)=0; X_Correction3(1)(1)=0.24;
X_Correction3(1)(2)=-0.14; X_Correction3(1)(3)=-0.34;
X_Correction3(1)(4)=-0.2
X_Correction3(1)(5)=0.14; X_Correction3(1)(6)=-0.23;
X_Correction3(1)(7)=-0.32; X_Correction3(1)(8)=-0.13;
X_Correction3(1)(9)=0
X_Correction3(2)(0)=0; X_Correction3(2)(1)=-0.1;
X_Correction3(2)(2)=-0.32; X_Correction3(2)(3)=-0.4;
X_Correction3(2)(4)=0.15
X_Correction3(2)(5)=0.36; X_Correction3(2)(6)=0.44;
X_Correction3(2)(7)=0.23; X_Correction3(2)(8)=-0.11;
X_Correction3(2)(9)=0
4.10.10 ERRORMAPN3D2
Description
The ERRORMAPN3D2 function configures and activates 3D error correction for the mechanical error
compensation of the ‘axis0’ command, ‘axis1’ command, and 'axis2' command for the specified
zone, so that the compensated reference position will be calculated by adding the linearly (by
default) interpolated error from the desired position so that the actual value will be closer to the
desired value.
ERRORMAPN3D2 function receives indexes of three axes, zone index, ‘axis0’ command table, ‘axis1’
command table, ‘axis2’ command table, and two 2D correction tables (in correlation to the specified
‘axis2’ coordinates) for mechanical error compensation.
Syntax
Arguments
The index of the axis that the mechanical error compensation will be
axis0 applied to, valid numbers are: 0, 1, 2, ... up to the number of axes in the
system minus 1.
axis0_ The name of a real one-dimensional array that specifies ‘axis0’ command
values used for correction table of mechanical error compensation. The
command array type should be GLOBAL REAL STATIC (defined in D-Buffer).
axis1_ The name of a real one-dimensional array that specifies ‘axis1’ command
values used for correction table of mechanical error compensation. The
command array type should be GLOBAL REAL STATIC (defined in D-Buffer).
axis2_ The name of a real one-dimensional array that specifies ‘axis2’ command
values used for correction table of mechanical error compensation. The
command array type should be GLOBAL REAL STATIC (defined in D-Buffer).
referenced_ [Optional] The index of the first axis, or the index of the first analog input
axis_or_analog_ whose feedback will be used to calculate the mechanical error
input0 compensation.
referenced_ [Optional] The index of the second axis, or the index of the second analog
axis_or_analog_ input whose feedback will be used to calculate the mechanical error
input1 compensation.
referenced_ [Optional] The index of the second axis, or the index of the third analog
axis_or_analog_ input whose feedback will be used to calculate the mechanical error
input2 compensation.
Switches
Specifies that the first optional parameter will be regarded as an analog input
/aj
index.
Specifies that the second optional parameter will be regarded as an analog input
/ak
index.
Specifies that the third optional parameter will be regarded as an analog input
/al
index.
Specifies that the extrapolation will be used for Z values that are beyond the
original observation range. That is, we are assuming that existing trends will
/e continue (by using the nearest correction table to estimate the correction). This
method is subject to greater uncertainty and a higher risk of producing
meaningless results than interpolation.
Comments
> When incorrect parameters are specified, the relevant compile-time or run-time error is
generated. See ACSPL+ Runtime Errors for explanation of error 2044 and ACSPL+
Compilation Errors for explanations of errors 3113, 3384, 3413, 3414. The function is intended
for use with arrays only; an error is generated if a scalar is given as a parameter.
Example
D-Buffer:
global real static X_Correction1(3)(10)
global real static X_Correction2(3)(10)
global real static X_Axis_Coordinates(10)
global real static Y_Axis_Coordinates(3)
global real static Z_Axis_Coordinates(3)
Buffer:
local int X_axis
local int Y_axis
local int Z_axis
int Zone
X_Correction2(2)(4)=0.15; X_Correction2(2)(5)=0.36;
X_Correction2(2)(6)=0.44; X_Correction2(2)(7)=0.23;
X_Correction2(2)(8)=-0.11; X_Correction2(2)(9)=0
4.10.11 ERRORMAPN3D3
Description
The ERRORMAPN3D3 function configures and activates 3D error correction for the mechanical error
compensation of the ‘axis0’ command, ‘axis1’ command, and 'axis2' command for the specified
zone, so that the compensated reference position will be calculated by adding the linearly (by
default) interpolated error from the desired position so that the actual value will be closer to the
desired value.
ERRORMAPN3D3 function receives indexes of three axes, zone index, ‘axis0’ command table, ‘axis1’
command table, ‘axis2’ command table, and three 2D correction tables (in correlation to the
specified ‘axis2’ coordinates) for mechanical error compensation.
Syntax
Arguments
The index of the axis that the mechanical error compensation will be
axis0 applied to, valid numbers are: 0, 1, 2, ... up to the number of axes in the
system minus 1.
axis0_ The name of a real one-dimensional array that specifies ‘axis0’ command
values used for correction table of mechanical error compensation. The
command array type should be GLOBAL REAL STATIC (defined in D-Buffer).
axis1_ The name of a real one-dimensional array that specifies ‘axis1’ command
values used for correction table of mechanical error compensation. The
command array type should be GLOBAL REAL STATIC (defined in D-Buffer).
axis2_ The name of a real one-dimensional array that specifies ‘axis2’ command
values used for correction table of mechanical error compensation. The
command array type should be GLOBAL REAL STATIC (defined in D-Buffer).
referenced_ [Optional] The index of the first axis, or the index of the first analog input
axis_or_analog_ whose feedback will be used to calculate the mechanical error
input0 compensation.
referenced_ [Optional] The index of the second axis, or the index of the second analog
axis_or_analog_ input whose feedback will be used to calculate the mechanical error
input1 compensation.
referenced_ [Optional] The index of the second axis, or the index of the third analog
axis_or_analog_ input whose feedback will be used to calculate the mechanical error
input2 compensation.
Switches
Comments
> When incorrect parameters are specified, the relevant compile-time or run-time error is
generated. See ACSPL+ Runtime Errors for explanation of error 2044 and ACSPL+
Compilation Errors for explanations of errors 3113, 3384, 3413, 3414. The function is intended
for use with arrays only; an error is generated if a scalar is given as a parameter.
Example
D-Buffer:
global real static X_Correction1(3)(10)
global real static X_Correction2(3)(10)
global real static X_Correction3(3)(10)
global real static X_Axis_Coordinates(10)
global real static Y_Axis_Coordinates(3)
global real static Z_Axis_Coordinates(3)
Buffer:
local int X_axis
local int Y_axis
local int Z_axis
int Zone
4.10.12 ERRORMAP3D5
Description
The ERRORMAP3D5 function configures and activates 3D error correction for the mechanical error
compensation of the ‘axis0’ command, ‘axis1’ command, and 'axis2' command for the specified
zone, so that the compensated reference position will be calculated by adding the interpolated error
from the desired position so that the actual value will be closer to the desired value. Interpolation is
linear by default; other options are available.
The ERRORMAP3D5 function receives indices of three axes, zone index, the base value of the ‘axis0’
command, a fixed defined interval of the ‘axis0’ command, the base value of the ‘axis1’ command, a
fixed defined interval of the ‘axis1’ command, the base value of the 'axis2' command, a fixed defined
interval of the 'axis2' command, and five 2D correction tables (in correlation to the specified ‘axis2’
coordinates) for mechanical error compensation.
Syntax
Arguments
The index of the axis to which the mechanical error compensation will be
axis0 applied, valid numbers are: 0, 1, 2, ... up to the number of axes in the
system minus 1.
A real number representing the fixed interval distance between the two
step0
adjacent ‘axis0’ commands.
A real number representing the fixed interval distance between the two
step1
adjacent ‘axis1’ commands.
A real number representing the fixed interval distance between the two
step2
adjacent ‘axis2’ commands.
referenced_ [Optional] The index of the first axis, or the index of the first analog input
axis_or_analog_ whose feedback will be used to calculate the mechanical error
input0 compensation.
referenced_ [Optional] The index of the second axis, or the index of the second analog
axis_or_analog_ input whose feedback will be used to calculate the mechanical error
input1 compensation.
referenced_ [Optional] The index of the second axis, or the index of the third analog
axis_or_analog_ input whose feedback will be used to calculate the mechanical error
input2 compensation.
Switches
/aj Specifies that the first optional parameter to be treated as an analog input index.
/al Specifies that the third optional parameter to be treated as an analog input index.
Error Conditions
The function detects the following error conditions.
> 2044 - Index is out of range, when the defined array size is less than the defined number of
array points.
> 3113 - The step in the table is zero or negative, when the step argument is zero or negative.
> 3384 - The specified suffix combination is invalid. Please see the documentation for more
details.
> 3413 - The supplied correction maps (2-dimensional arrays or MATRIX types) should have
the same dimensions. Please see the documentation for more details.
> 3414 - The Specified referenced axes/analog inputs are invalid. Please see the
documentation for more details.
Comments
If incorrect parameters are passed to the function the corresponding runtime error is generated. The
function is intended to be used only with arrays; thus, an error is generated if a scalar is given as a
parameter.
4.10.13 ERRORMAPN3D5
Description
The ERRORMAPN3D5 function configures and activates 3D error correction for the mechanical error
compensation of the ‘axis0’ command, ‘axis1’ command, and 'axis2' command for the specified
zone, so that the compensated reference position will be calculated by adding the interpolated error
from the desired position so that the actual value will be closer to the desired value. Interpolation is
linear by default; other options are available.
ERRORMAPN3D5 function receives indices of three axes, zone index, ‘axis0’ command table, ‘axis1’
command table, 'axis2' command table, and 5 2D correction tables correlated to the specified 'axis2'
coordinates for mechanical error compensation.
Syntax
Arguments
The index of the axis that the mechanical error compensation will be
axis0 applied to, valid numbers are: 0, 1, 2, ... up to the number of axes in the
system minus 1.
axis0_ The name of a real one-dimensional array that specifies ‘axis0’ command
values used for correction table of mechanical error compensation. The
command array type should be GLOBAL REAL STATIC (defined in D-Buffer).
axis1_ The name of a real one-dimensional array that specifies ‘axis1’ command
values used for correction table of mechanical error compensation. The
command array type should be GLOBAL REAL STATIC (defined in D-Buffer).
axis2_ The name of a real one-dimensional array that specifies ‘axis2’ command
values used for correction table of mechanical error compensation. The
command array type should be GLOBAL REAL STATIC (defined in D-Buffer).
referenced_ [Optional] The index of the first axis, or the index of the first analog input
axis_or_analog_ whose feedback will be used to calculate the mechanical error
input0 compensation.
referenced_ [Optional] The index of the second axis, or the index of the second analog
axis_or_analog_ input whose feedback will be used to calculate the mechanical error
input1 compensation.
referenced_ [Optional] The index of the second axis, or the index of the third analog
axis_or_analog_ input whose feedback will be used to calculate the mechanical error
input2 compensation.
Switches
Specifies that the first optional parameter will be regarded as an analog input
/aj
index.
Specifies that the second optional parameter will be regarded as an analog input
/ak
index.
Specifies that the third optional parameter will be regarded as an analog input
/al
index.
Error Conditions
The function detects the following error conditions.
> 2044 - Index is out of range, when the defined array size is less than the defined number of
array points.
> 3384 - The specified suffix combination is invalid. Please see the documentation for more
details.
> 3413 - The supplied correction maps (2-dimensional arrays or MATRIX types) should have
the same dimensions. Please see the documentation for more details.
> 3414 - The Specified referenced axes/analog inputs are invalid. Please see the
documentation for more details.
Comments
If incorrect parameters are passed to the function the corresponding runtime error is generated. The
function is intended to be used only with arrays; thus, an error is generated if a scalar is given as a
parameter.
4.10.14 ERRORMAPN3DA
Description
The ERRORMAPN3DAfunction configures and activates 3D error correction for the mechanical error
compensation of the ‘axis0’ command, ‘axis1’ command, and 'axis2' command for the specified
zone, so that the compensated reference position will be calculated by adding the interpolated error
from the desired position so that the actual value will be closer to the desired value. Interpolation is
linear by default; other options are available.
ERRORMAPN3DA function receives indexes of three axes, zone index, ‘axis0’ command table, ‘axis1’
command table, ‘axis2’ command table, and 10 2D correction tables (correlated to the specified
‘axis2’ coordinates) for mechanical error compensation.
Syntax
Arguments
The index of the axis that the mechanical error compensation will be
axis0 applied to, valid numbers are: 0, 1, 2, ... up to the number of axes in the
system minus 1.
axis0_ The name of a real one-dimensional array that specifies ‘axis0’ command
values used for correction table of mechanical error compensation. The
command array type should be GLOBAL REAL STATIC (defined in D-Buffer).
axis1_ The name of a real one-dimensional array that specifies ‘axis1’ command
values used for correction table of mechanical error compensation. The
command array type should be GLOBAL REAL STATIC (defined in D-Buffer).
axis2_ The name of a real one-dimensional array that specifies ‘axis2’ command
values used for correction table of mechanical error compensation. The
command array type should be GLOBAL REAL STATIC (defined in D-Buffer).
referenced_ [Optional] The index of the first axis, or the index of the first analog input
axis_or_analog_ whose feedback will be used to calculate the mechanical error
input0 compensation.
referenced_ [Optional] The index of the second axis, or the index of the second analog
axis_or_analog_ input whose feedback will be used to calculate the mechanical error
input1 compensation.
referenced_ [Optional] The index of the second axis, or the index of the third analog
axis_or_analog_ input whose feedback will be used to calculate the mechanical error
input2 compensation.
Switches
Specifies that the first optional parameter will be regarded as an analog input
/aj
index.
Specifies that the second optional parameter will be regarded as an analog input
/ak
index.
Specifies that the third optional parameter will be regarded as an analog input
/al
index.
Error Conditions
The function detects the following error conditions.
> 2044 - Index is out of range, when the defined array size is less than the defined number of
array points.
> 3384 - The specified suffix combination is invalid. Please see the documentation for more
details.
> 3413 - The supplied correction maps (2-dimensional arraysor MATRIX) should have the
same dimensions. Please see the documentation for more details.
> 3414 - The Specified referenced axes/analog inputs are invalid. Please see the
documentation for more details.
Comments
If incorrect parameters are passed to the function the corresponding runtime error is generated. The
function is intended to be used only with arrays; thus, an error is generated if a scalar is given as a
parameter.
4.10.15 ERRORMAPOFF
Description
ERRORMAPOFF function receives axis index and zone index. The ERRORMAPOFF function
deactivates error mapping correction for the mechanical error compensation for the specified zone.
Syntax
Arguments
The axis index, valid numbers are: 0, 1, 2, ... up to the number of axes in the
axis
system minus 1.
The zone index, valid numbers are: 0, 1, 2, ... up to the maximum number of
zone
zones minus 1. If ‘-1’ is specified, all zones of specified axis will be affected.
4.10.16 ERRORMAPON
ERRORMAPON function receives axis index and zone index. The ERRORMAPON function activates
error correction for the mechanical error compensation for the specified zone.
Syntax
Arguments
The axis index, valid numbers are: 0, 1, 2, ... up to the number of axes in the
axis
system minus 1.
The zone index, valid numbers are: 0, 1, 2, ... up to the maximum number of
zone
zones minus 1. If ‘-1’ is specified, all zones of specified axis will be affected.
4.10.17 #ERRORMAPREP
Description
#ERRORMAPREP function generates a report of all activated zones of error mapping for all axes in
the system.
Syntax
#ERRORMAPREP
4.10.18 ERRORUNMAP
Description
ERRORUNMAP function receives axis index and zone index. The ERRORUNMAP function deactivates
error correction for the mechanical error compensation for the specified zone.
Syntax
Arguments
The axis index, valid numbers are: 0, 1, 2, ... up to the number of axes in the
axis
system minus 1.
The zone index, valid numbers are: 0, 1, 2, ... up to the maximum number of
zone
zones minus 1. If ‘-1’ is specified, all zones of specified axis will be affected.
Arguments
Modulation mode:
0 – Fixed parameters mode
1 - Fixed Frequency
Mode 2 - Fixed Pulse Width
3 - Fixed duty cycle
Modes 0 – 3 are incompatible modes, i.e. setting any of these modes
automatically disables the previously set mode.
Width Pulse Width in milliseconds, range for 6.67 nsec to 28.60 sec.
[Link] PowerAnalogOut
Description
The function defines the range of Analog Output value depending on the actual velocity
Syntax
Arguments
!D-buffer declaration
LCI lc
!Program buffer
[Link] = AxListAsMask(X,Y)
!Define laser power control by analog output
! Output value is 0 Volt for velocity < 10 and 10 Volt for velocity > VEL
(X)*2
! Use Analog output - 1
[Link](1, 0, 10, 10, VEL(X)*2)
[Link]()
[Link] PowerDigitalOut
Description
The function defines the range of Digital Output value depending on the actual velocity.
SYNTAX
Arguments
[Link] FixedDistPulse
Description
The function initializes the fixed distance pulse firing mode. This mode is useful if a laser be should
be activated at specified fixed intervals between activations along an actual motion trajectory. The
AxesUsed field defines which axes are used for multi-axis trajectory generation.
Syntax
Return Type
Occupied channel index as integer value
Arguments
Comments
The ExtraPulses and ExtraPeriod fields define the extra pulses generation. If at least one of
parameters is 0, no extra pulses are generated.
The PiercePulsesNum and PiercePulseWidth fields define the pierce pulse generation. If at least one
of parameters is 0, no pierce pulses are generated.
The MotionAxes axes mask field is used for trajectory calculation.
The PulseResolution field is used for operation pulse resolution. If the default PulseResolution is 0,
the pulse resolution should be calculated according to the XVEL parameter and Maximum LCI
Frequency.
When the motion occurs in the negative direction, it is not sufficient to specify a negative interval;
StartPos and EndPos must also be specified. See example below.
Example
stop
[Link] DistanceArrPulse
Description
The function initializes either array-based pulse firing mode.
Syntax
Return Type
Occupied channel index as integer value
Arguments
Array of points. Each element in the array defines the point where a pulse
arPos
should be fired.
Pulse Width value or Pulse Width array in milliseconds. Each width in the
array corresponds to a point in the Position array. The size of array should
arWidth
be equals to size of Position array. If the parameter is a real value, pulse
width is applied for all elements in the Position array.
Comments
The ExtraPulses and ExtraPeriod fields define the extra pulses generation. If at least one of
parameters is 0, no extra pulses are generated.
The MotionAxes axes mask field is used for trajectory calculation.
The PulseResolution field is used for operation pulse resolution. In case of the default
PulseResolution is 0, the pulse resolution should be calculated according to the Comments
The ExtraPulses and ExtraPeriod fields define the extra pulses generating. If at least one of
parameters is 0, no extra pulses are generated.
The MotionAxes axes mask field is used for trajectory calculation.
The PulseResolution field is used for operation pulse resolution. In case of the default
PulseResolution is 0, the pulse resolution should calculate according to XVEL parameter and
Maximum LCI Frequency.
Command requires “Array and Segment Based Modes” LCI ordering option to use.
Example
[Link] CoordinateArrPulse
Description
The function initializes either array-based pulse firing mode based on multiple axis position.
Syntax
Return Type
Occupied first channel index as integer value
Arguments
Pulse Width value or Pulse Width array in milliseconds. Each width in the
WidthArr array corresponds to a point in the Positions arrays. If the parameter is a
real value, pulse width is applied for all items of Positions arrays.
(optional) Array of X axis positions. Each element of the array defines the
XPosArr
point where a pulse should be fired.
(optional) Array of Y axis positions. Each element of the array defines the
YPosArr
point where a pulse should be fired.
Comments
Function occupies several channels, depending on the MotionAxes field.
If the parameter is 0, no extra pulses are generated.
The MotionAxes axes mask field is used for trajectory calculation.
The PulseResolution field is used for operation pulse resolution. In case of the default
PulseResolution is 0, the pulse resolution should calculate according to XVEL parameter and
Maximum LCI Frequency.
Command requires “Array and Segment Based Modes” LCI ordering option to use.
Example
[Link] Tickle
Description
The function initializes the Tickle mode. In this mode the laser control unit generates a signal at
constant frequency and with constant width. Usually this mode is used for those types of lasers that
require gas ionization during the time period when laser processing is off. By setting this mode the
laser will respond faster and more predictably when laser processing resumes. Once this mode is
initialized, the laser control unit constantly generates pulses without regard to any other operational
modes.
Syntax
Return Type
None
Arguments
[Link] LaserEnable
Description
The function enables laser pulse generation.
Syntax
LaserEnable ()
[Link] LaserDisable
Description
The function disables laser pulse generation.
Syntax
LaserDisable ()
[Link] DistanceArrGate
Description
The function adds the gating mode to the system. In this mode laser is to be switched on or off at a
predefined position. The position is defined by distance position.
Syntax
Return Type
None
Arguments
Array of points. Each element of the array defines the point where a state
arPos
signal should be changed.
Array of states. Each element of the array defines the state value in the
arStates corresponding point from arPos array. The array size should be equal to
points array (arPos)
Comments
The MotionAxes axes mask field is used for trajectory calculation. The PulseResolution field is used
for operation pulse resolution. If the default PulseResolution is 0, the pulse resolution should be
calculated according to the XVEL parameter and Maximum LCI Frequency.
Command requires “Array and Segment Based Modes” LCI ordering option to use.
[Link] CoordinateArrGate
Description
The function adds the gating mode to the system. In this mode laser is to be switched on or off at a
predefined position. The position defined by axes coordinates.
Syntax
Return Type
First occupied channel index as integer value
Arguments
Comments
The trajectory calculation is built according to defined Position arrays.
The PulseResolution field is used for operation pulse resolution. If PulseResolution is 0, the pulse
resolution should be calculated according to the XVEL parameter and Maximum LCI Frequency.
This command is available when the “Array and Segment Based Modes” LCI ordering option is
purchased.
[Link] AddZone
Description
Add the laser activation zone. If the zone is defined, the laser can be activated only in the specified
zone.
Syntax
Return Type
Occupied channel index as integer value
Arguments
[Optional] Mask that defines the axes, which are used for generating
MotionAxes pulses along the multi-axis motion trajectory. If parameter is 0 or
omitted, the default axes mask is taken from MotionAxes.
Example
[Link] SetZone
Description
Change the laser activation zone for specified channel. If zone is defined, the laser can be activated
only in the specified zone
Syntax
Return Type
None
Arguments
Example
[Link] SetCondition
Description
Define laser activation condition in one of the 3 condition registers by a bitwise mask.
Syntax
Return Type
None
Arguments
Comments
Table 6-19. Condition Mask for Register 0
Bit # Signal
0 PWM
1 Tickle
Bit # Signal
18 In Range 0
19 In Range 1
20 In Range 2
21 In Range 3
22 In Range 4
23 In Range 5
24 In Range 6
25 In Range 7
Bit # Signal
0 PEG Pulse 0
1 PEG Pulse 1
2 PEG Pulse 2
3 PEG Pulse 3
4 PEG Pulse 4
5 PEG Pulse 5
6 PEG Active 0
7 PEG Active 1
8 PEG Active 2
9 PEG Active 3
10 PEG Active 4
11 PEG Active 5
Bit # Signal
Bit #
Example
[Link] GetCondition
Description
Return the current laser activation condition mask from the specified register.
Syntax
Return Type
Condition mask. See tables in SetCondition description.
Arguments
Comments
Example
[Link] SegmentGate
Description
Activate automatic gating for segment motion.
Syntax
Arguments
Return Type
Channel ID allocated for this operation. Return -1 if failed.
[Link] SegmentPulse
Description
Activate automatic pulse firing for segment motion.
Syntax
Return Type
Channel ID allocated for this operation. Return -1 if failed.
Arguments
[Link] SetExtClockSync
Description
Enable or Disable External Laser Clock synchronization.
Syntax
Optional
1 or 0
Polarity
1 – Synchronization on rising edge(default)
0 – Synchronization on falling edge
Optional
Delay
Delay relative to External Laser Clock edge in μsec. The default is 0.
[Link] PowerPWMBurst
Description
The function initializes pulse modulation mode with specified number of pulses
Syntax
Arguments
Comments
The LaserEnable function should be called ahead beforehand to enable the sequence of pulses. If
the function works asynchronously, the program should check the PWMBurstReady field to ensure
that the pulse sequence is finished.
Example
[Link]()
[Link] SetSafetyMasks
Description
Enable or disable Safety and Fault inputs.
Syntax
SetSafetyMasks(SafetyInput, FaultInput )
Arguments
SafetyInput The 1 value masks the Safety Input and the system ignores Safety errors
FaultInput The 1 value masks the Fault Input and the system ignores the Faults
[Link] Stop
Description
Cancel laser mode or state for specified channel.
Syntax
Stop (Channel)
Return Type
None
Arguments
Channel Channel or Operation ID. If omitted or negative, cancel all active operations.
[Link] SetMechPlatformAxes
Description
Define the axes configuration for the mechanical platform.
Syntax
Return Type
None
Arguments
Comments
If parameter omitted or -1, axis is not available in the current mechanical platform configuration.
[Link] SetMotionAxes
Description
Define the axes used for subsequent laser operations.
Syntax
SetMotionAxes (Axes_list)
Arguments
Return Value
None
Comments
The function defines the mechanical platform to use. Valid values for axis designation are as follows:
Axis Code
X 0
Y 1
Z 2
A 3
B 4
C 5
Example
[Link] SetSystemDelay
Description
Change the internal pulse generation delay.
Syntax
Arguments
Channel Channel ID
Return Value
None
[Link] GetSystemDelay
Description
Return the current system delay in µsec for the specified channel.
Syntax
GetSystemDelay (Channel)
Arguments
Channel Channel ID. If omitted or negative cancel defined operation for all channels
Return Value
None
[Link] SetConfigOut
Description
Configure the Digital Output signal
Syntax
Arguments
Code Enumerator defines the signal routed to the output. See table below.
Return Value
None
Comments
0 Cancel Routing
2 P/D Pulse
3 P/D Direction
4 A signal of AqB
5 B signal of AqB
6 InRange
7 PEG Pulse
8 PEG State
9 PEG Active
If output index equals 10 (LPC output), channel parameter is irrelevant and the code parameter can
accept the following values:
2 LPC output use as synchronization pulse signal for 8 bit digital port
3 Reserved
Example
[Link] AssignChannels
Description
Dedicate channel for a specific operation.
Syntax
AssignChannels (OperationsArray)
Arguments
Return Value
None
Comments
Operation Enumeration
104 Segment-based
Zone (In Range). InRange code can be combined using an OR operator with
0x10000
another operation code
Example
[Link] SetCustomPosCalc
Description
Define the user function intended for position calculation. The firmware calls this function every
controller cycle. The function returns the calculated value as a real variable.
Syntax
Arguments
Reference to the function, which calculates the new position value. The
FuncRef
function must match this pattern: real fastcall FuncName()
Return Value
None
[Link] SetCustomVelCalc
Description
Define the user function intended for custom velocity-based calculation. The firmware calls this
function every controller cycle. The function returns the calculated value as a real variable.
Syntax
Arguments
Reference to the function, which calculates the new value. The function
FuncRef
must match this pattern: real fastcall FuncName()
[Link] SetCustomVelVar
Description
Define the user custom position calculation variable. Every controller cycle the firmware takes the
variable as a new calculated value.
Syntax
Arguments
Return Value
None
[Link] GetPulseCounts
Description
The GetPulseCounts function returns the number of pulses fired on specified channel.
Syntax
GetPulseCounts (Channel)
Arguments
Comments
The function returns the value of internal pulse counter. The counter is set to 0 when a new
operation is defined or by the functions [Link]() or [Link]().
Example
int ch
!Move axes …
int N
N=[Link](ch)!Get number of fired pulses
TicklePulseWidth real R
Boolean, 1 if modulation
PWMActive in T
mode is active
[Link] MotionAxes
Description
MotionAxes is a R/W integer field and contains the default axes mask used by LCI functions.
Syntax
[Link] = AxListAsMask(X,Y)
[Link] PosResolution
Description
PosResolution is a R/W real field and contains the default Pulse Resolution used by LCI functions. If
the default Pulse Resolution is 0, the pulse resolution should be calculated according to XVEL
parameter and Maximum LCI Frequency.
[Link] InternalPosResolution
Description
InternalPosResolution is a Read-only real array with one element for each LCI channel and
containing the actual Pulse Resolution used by LCI functions.
[Link] PWMDutyCycle
Description
PWMDutyCycle is a Read-Only real field. It presents the current laser duty cycle (%)
Syntax
DISP [Link]
[Link] PWMFrequency
Description
PWMFrequency is a Read-Only real field. It presents the current laser frequency (Hz)
Syntax
DISP [Link]
[Link] PWMPulseWidth
Description
PWMPulseWidth is a Read-Only real field. It presents the current PWM pulse width (ms)
Syntax
DISP [Link]
[Link] TickleFrequency
Description
TickleFrequency is a Read-Only real field. It presents the current Tickle frequency (Hz)
Syntax
DISP [Link]
[Link] TicklePulseWidth
Description
TicklePulseWidth is a Read-Only real field. It returns the current Tickle pulse width in ms.
Syntax
DISP [Link]
[Link] PWMActive
Description
PWMActive is a Read-Only integer field. It returns a Boolean value: 1 if modulation mode is switched
on, otherwise 0.
[Link] TickleActive
Description
TickeActive is a Read-Only integer field. It returns a Boolean value: 1 if Tickle mode is switched on,
otherwise 0.
[Link] InRange
Description
InRange is a Read-Only integer field. It returns a Boolean value: 1 if the unit is inside of defined
range, otherwise 0.
[Link] LaserEnabled
Description
Laser Enabled is a Read-Only integer field. It returns a Boolean value: 1 if the laser is enabled,
otherwise 0.
[Link] OperationMode
Description
OperationMode is an integer array with one element for each LCI channel. It returns the operation
mode defined for a specific channel.
[Link] Positions
Description
Positions is an integer array with one element for each LCI channel. It returns the pulse counter
value for a specific channel.
[Link] UserPos
Description
UserPos is an array of real, with one element for each LCI channel. Each element returns the current
channel position in user units. UserPos is calculated as follows:
UserPos = Positions*InternalPosResolution
[Link] MultiAxWinSize
Description
MultiAxWinSize returns a real value defining the window size in coordinate based mode. The value
defines the range (Δ ) inside which the pulse and gate signals should be fired. The field is applicable
for the CoordinateArrPulse and CoordinateArrGate functions. The parameter is in user units. The
default is 1 resolution count. Δ indicates the window in the following diagram.
[Link] ExtraPulsesQty
Description
ExtraPulsesQty returns the number of additional pulses generated with ExtraPulsesPeriod after the
initial pulse at each firing position. The parameter is applicable for pulses generated by the following
functions: FixedDistPulse, DistanceArrPulse, CoordinateArrPulse. The value 0 means no extra
pulses are generated (default).
[Link] ExtraPulsesPeriod
Description
The period in milliseconds for additional pulses defined in ExtraPulses to be generated after each
pulse at each firing position. The parameter is applicable for pulses generated by the following
functions: FixedDistPulse, DistanceArrPulse, CoordinateArrPulse. The value 0 means no extra
pulses are generated (default).
[Link] PiercePulsesNum
Description
The number of pierce pulses generated during a pierce pulse cycle. The parameter is applicable for
pulses generated by FixedDistPulse function. The value 0 means no pierce pulses are generated
(default).
[Link] PiercePulsesWidth
Description
The width of pierce pulses in milliseconds . The parameter is applicable for pulses generated by
FixedDistPulse function. The 0-value means, no pierce pulses are generated (default).
[Link] GateOnDelay
Description
Returns state on delay in milliseconds when in Gating Mode. Default is 0. See Figure 6-34
[Link] GateOffDelay
Description
Returns state off delay in milliseconds when in Gating Mode. Default is 0.
Figure 6-34. Delays in Gating Mode
[Link] PulseDelay
Description
Laser firing pulse delay in Distance Array Pulse modes. The default is 0.
[Link] PowerAOutVal
Description
PowerAOutVal is a Real Read-Only real field. It returns the current analog output value. The range is
0 to 100%. The field is updated if the Power Control via Analog Output mode is activated.
[Link] Faults
Description
Faults is a Read-only Integer Field. It contains a set of bits representing the current LCI error state,
according to the following table:
Bit # Description
Velocity limit fault, motion axes velocity exceeds the maximum frequency
2
supported by LCI
[Link] PWMBurstReady
Description
PWMBurstReady is a read-only Integer field. It is interpreted as a boolean flag: 1 means that the
system is ready to perform the next PWM burst.
[Link] PathCalcMethod
PathCalcMethod is an integer field defining the method of calculating the traveled distance. The
field accepts the following values:
> 0 – (default). Calculate the path by finite linear segment approximation
> 1 – Calculate the path analytically, depending on motion mode.
This method is applicable for the following motion modes: PTP, XSEG, BSEG, SPATH, NURBS, SPTP,
SMOVE.
5.2.1 DPM_Measurement
Description
DPM_Measurement is an ACSPL+ composite data type(STRUCT) with different fields of data types
and functions that are used to configure and store the results of the MeasureProcess()/
MeasurePeriodically() functions. It is part of the DPM(Diagnostics and Preventive Maintenance)
feature. To declare an instance of the DPM_Measurement STRUCT the user will use the reserved
word DPM_Measurement followed by the desired struct name.
Syntax
DPM_Measurement Struct_name
See the ACSPL+ Commands & Variables Reference Guide for details about specific commands,
functions, and variables.
real variable_abs_ It holds the absolute value of the variable_value. This variable is
value updated every MPU cycle once the measurement is initiated.
Specifies the size of the set of adjacent samples to be used for the
int sample_set_ calculation of the moving_average_value, std_dev_value, and the
size rms_value.
Values: Ranges between 1 and 512.
Specifies the number of samples that have been collected since the
real sample_ beginning of the measurement process.
counter
See definition of a sample at sampling_type
Holds the highest value of a sample that has been taken since the
real peak_value beginning of the measurement.
It can be set to 0 by the user by calling ClearPeak().
Holds the average value of the samples in the set. The number of
real moving_ samples in the set is specified by sample_set_size.
average_value
See definition of a sample at sampling_type
Holds the standard deviation of the samples in the set. The number of
real std_dev_value
samples in the set is specified by sample_set_size.
Holds the RMS (Root mean square) of the samples in the set. The
real rms_value
number of samples in the set is specified by the sample_set_size.
real/Int monitored_
variable – A variable to be
monitored. (see monitored_
variable field definition for
more details)
int when_to_measure – A
variable that acts as a flag. This function is used to initiate
when the value of the monitoring and
variable is different than 0, measurements of variables
MeasureProcess a measurement will take that are related to processes
(monitored_variable, place. (see when_to_ and especially motion
when_to_measure, measure field definition for processes that are generated
sample_set_size, more details) by atomic motion commands
sampling_type) (PTP, BPTP, JOG).
int sample_set_size –
Defines the samples set Example: The average current
size. (see sample_set_size during the acceleration phase
field definition for more of a moving axis.
details)
int sampling_type –
Defines the sampling
behavior(see sampling_
type definition for more
details)
real/Int monitored_
variable – A variable to be
monitored. (see monitored_
variable definition for more
details)
int when_to_measure – A
variable that acts as a flag. This function is used to initiate
When the value of the the monitoring and
variable is different than 0, measurements of the supplied
a measurement will take variable over time.
MeasurePeriodically
(monitored_variable, place. (see when_to_ Example 1: measurement of
when_to_measure, measure field definition for temperature that is monitored
sample_set_size, more details) by a sensor that is connected
sampling_time) int sample_set_size – to an analog input
Defines the samples set Example 2: 2D position error
size. (see sample_set_size during one “long” arbitrary XY
field definition for more move
details)
real sampling _time –
Defines the period between
samples(see sampling _
time definition for more
details)
5.2.2 DPM_Motion_Status
Description
DPM_Motion_Status is an ACSPL+ composite data type (STRUCT), with different fields of data types
and functions that are used to configure and to provide an indication on the phase of the motion for
a user-selected axis. It is part of the DPM (Diagnostics and Preventive Maintenance) feature. To
declare an instance of the DPM_Motion_Status STRUCT the user uses the reserved word DPM_
Motion_Status followed by the desired struct name.
Syntax
DPM_Motion_Status struct_name
Variable
Description
Name
int during_ The variable is set to true (=1) once the motion profile starts and is set
motion automatically to false (=0) once the motion profile is completed.
int during_ The variable is set to true (=1) once the motion profile reaches the
accel acceleration phase(can be constant acceleration or during jerk) and is set
automatically to false (=0) once the acceleration phase is completed.
The variable is set to true (=1) once the motion profile reaches the
int during_
deceleration(can be constant deceleration or during jerk) and is set
decel
automatically to false (=0) once the deceleration phase is completed.
The variable is set to true (=1) once the motion profile reaches the Constant
int during_cv
Velocity (CV) phase and is set to false (=0) once deceleration has started.
int selected_
axis The variable specifies the selected axis for which its motion phases are
monitored.
When 1, the motion phases are monitored. When 0, the phases are not
int on_off
monitored.
D-Buffer:
axisdef Y=1
Global static DPM_Measurement actual_current_during_accel_Y
Global static DPM_Motion_Status motion_status_Y
Global static REAL Y_Accel_Peak_Current_Threshold, Y_Accel_Moving_
Average_Current_Threshold, CURRENT_Y_AMP
Global INT Samplesample_set_size_Y, DRIVE_PEAK_CURRENT_AMP, ADC_RANGE
Buffer 0:
AUTOEXEC:
Y_Accel_Peak_Current_Threshold = 5
Y_Accel_Moving_Average_Current_Threshold = 2.5
measure_continuously = 1
sample_set_size_Y = 20
DRIVE_PEAK_CURRENT_AMP = 10
ADC_RANGE = 32767 ! Current is sampled with a 16 bit ADC
Buffer 1:
ENABLE 1
LOOP 10
PTP 1,1000
BPTP 1,3000
PTP 1,4000
PTP 1,0
.
.
.
END
STOP
!acceleration phase peak threshold has been exceeded
ON actual_current_during_accel_Y.peak_value > Y_Accel_Peak_Current_
Threshold
DISP “Y peak current threshold is exceeded”
actual_current_during_accel_Y.ClearPeak()
RET
!acceleration phase moving average threshold has been exceeded
ON actual_current_during_accel_Y.moving_average_value > Y_Accel_Moving_
Average_Current_Threshold
DISP “Y moving average current threshold is exceeded”
RET
from -
1.79769e+30
Default =
Velocity real R/W 8 to
10000
1.79769e+30
8
from
2.22507e-308
Default =
Acceleration real R/W to
100000
1.79769e+30
8
from
2.22507e-308
Default =
Deceleration real R/W to
100000
1.79769e+30
8
from
2.22507e-308
Default =
Jerk real R/W to
2E7
1.79769e+30
8
from
2.22507e-308
Deafault =
Snap real R/W to
100E7
1.79769e+30
8
from 1e-15 to
EncoderFactor real R/W Default = 1
1e+15
T_MotionOverallTime real R
T31_
JerkBuildupAccelerationBuild real R
up
T1_
ConstantJerkAccelerationBuil real R
dup
T32_
JerkFinishAccelerationBuildu real R
p
T2_ConstantAcceleration real R
T33_
JerkBuildupAccelerationFinis real R
h
T3_
real R
ConstantJerkAccelerationFinish
T34_
real R
JerkFinishAccelerationFinish
T4_ConstantVelocity real R
T35_
JerkBuildupDecelerationBuil real R
dup
T5_
ConstantJerkDecelerationBui real R
ldup
T36_
JerkFinishDecelerationBuildu real R
p
T6_ConstantDeceleration real R
T37_
JerkBuildupDecelerationFinis real R
h
T7_
ConstantJerkDecelerationFin real R
ish
T38_
real R
JerkFinishDecelerationFinish
Struct Functions
CalculatePTPDuration() T2_ConstantAcceleration,
T3_ConstantJerkAccelerationFinish,
T4_ConstantVelocity,
T5_ConstantJerkDecelerationBuildup,
T6_ConstantDeceleration,
T7_ConstantJerkDecelerationFinish
CalculateSPTPDuration() T3_ConstantJerkAccelerationFinish,
T34_JerkFinishAccelerationFinish,
T4_ConstantVelocity,
T35_JerkBuildupDecelerationBuildup,
T5_ConstantJerkDecelerationBuildup,
T36_JerkFinishDecelerationBuildup,
T6_ConstantDeceleration,
T37_JerkBuildupDecelerationFinish,
T7_ConstantJerkDecelerationFinish,
T38_JerkFinishDecelerationFinish
Comments
> Two options exist for initialization of the editable fields of the MotionDuration struct:
a. Initialize each writeable field manually, one by one.
b. Use the ReadFrom function to read the Velocity, Acceleration, Deceleration, Jerk, Snap
and EncoderFactor fields from a specified axis. The Distance field will still need to be
initialized manually.
Struct members: InitialVelocity, InitialAcceleration, FinalVelocity and FinalAcceleration will
not be affected by calling the ReadFrom function.
> Zero value in fields Velocity, Acceleration, Deceleration, Jerk, Snap and EncoderFactor will
implicitly be replaced by the default value.
> There may be calculated results that are not relevant for all types of motion; they will be
initialized to their default value.
Example
#D-Buffer:
global static MotionDuration motion_duration
#Buffer 0:
motion_duration.ReadFrom(0)
motion_duration.Distance=1
motion_duration.InitialVelocity=0
motion_duration.InitialAcceleration=0
motion_duration.FinalVelocity=0
motion_duration.FinalAcceleration=0
motion_duration.CalculatePTPDuration()
Terminal output:
?motion_duration
Struct type : MotionDuration
real Distance
1
real Velocity
10
real Acceleration
1000
real Deceleration
1000
real Jerk
100000
real Snap
1E+007
real InitialVelocity
0
real InitialAcceleration
0
real FinalVelocity
0
real FinalAcceleration
0
real EncoderFactor
1
READONLY real T_MotionOverallTime
0.12
READONLY real T31_JerkBuildupAccelerationBuildup
0
READONLY real T1_ConstantJerkAccelerationBuildup
0.01
READONLY real T32_JerkFinishAccelerationBuildup
0
Name Description
0 - No Enter Zone
ConditionType
1 - No Exit Zone
The Read Only integer flag. A non-zero value means that the motion
Faults
has been stopped by a safety zone condition.
Name Description
[Link] SZonesEn
Description
The function enables all previously disabled Safety Zones.
Syntax
SZonesEn
[Link] SZonesDis
Description
The function disables all previously enabled Safety Zones and removes them from system list.
Syntax
SZonesDis
5.4.2 SetAxes
Description
The function defines the Safety Zone physical axes indexes.
Syntax
Arguments
Comments
For 1D Safety zone only X_Index parameter is relevant, for 2D Zone only X_Index and Y_Index are
relevant. The default system settings are:
X_Index=0, Y_Index=1, Z_Index=2
Example
5.4.3 Enable
Description
This function enables a Safety Zone.
Syntax
Enable ()
Comments
The function enables the Safety Zone and adds it to available zones list. The Safety Zone should be
defined previously by one of these functions: SetZone1D, SetZone2D, SetZone3D, SetCustomZone,
or SetZoneDualCarriage.
5.4.4 Disable
Description
This function disables a Safety Zone.
Syntax
Disable()
5.4.5 SetZone1D
Description
The function defines a one-dimensional Safety Zone.
Syntax
Arguments
Comments
5.4.6 SetZone2D
Description
This function defines the parameters of a two-dimensional Safety Zone.
Syntax
Arguments
Comments
5.4.7 SetZone3D
Description
The function defines the parameters of a three-dimensional Safety Zone .
Syntax
Arguments
Comments
5.4.8 SetCustomZone
Description
The function defines the custom Safety Zone. The user ACSPL+ fastcall function is using for motion
validation .
Syntax
SetCustomZone(ValidationFunc)
Arguments
Comments
Define the user function intended for position validation calculation. The firmware calls this function
every controller cycle. If the function returns zero value, Safety Zone exception occurred. The motion
limits are determined solely by the User Custom Function.
Example
See TBD Example
5.4.9 SetZoneDualCarriage
Description
The function defines the gap between the two elements of a dual carriage configuration. In a dual
carriage configuration, two loads move independently along a single axis. The purpose of this Safety
Zone is to ensure a minimum distance between the two loads , independent of their absolute
positions.
Syntax
SetZoneDualCarriage (Gap)
Comments
The Dual Carriage system has two linear stages on one track (see picture below). Two stages have
coaxial and co-directional axes. The goal of Safety Zone is to prevent the two stages from colliding.
The minimal possible distance between the stages defined by Gap parameter. When the distance is
going to be less than Gap, kill motion process starts.
Example
!Program buffer
int Ax1 = 0
int Ax2 = 1
SET FPOS(Ax1)=0
SET FPOS(Ax2)=200
[Link](Ax1,Ax2)
[Link](50)
[Link]()
enable(Ax1,Ax2)
ptp (Ax1), 200
ptp (Ax2), 0
stop
5.4.10 SetMargins
Description
This function sets Safety Zone margins. It may be called dynamically, changing Safety Zone
dimensions during motion.
Syntax
Arguments
Comments
The margins enlarge the Safety Zone if the value is positive. If the value is negative the Safety Zone
becomes smaller. Margins change the Zone validation area, but don’t change the Zone limits. For a
1D Safety zone only the X_Margin parameter is relevant, for a 2D Zone only X_ Margin and Y_
Margin are relevant.
5.4.11 AddOffset
Description
This function sets Safety Zone Offsets. The offset or offsets are relative to the current offset values
and may be changed dynamically.
Syntax
Arguments
Comments
The zone moves additively, according to the specified values.
Example
!D-buffer declaration
global SafetyZone sz1
global int const NO_ENTER_ZONE = 0
global int const NO_EXIT_ZONE = 1
!Program buffer
sz1.SetZone2D(100, 700, 100, 400)
[Link] = NO_ENTER_ZONE
[Link]()
[Link](500, -50)
5.4.12 GetLeftLimit
Description
The function returns the left limit value for the specified axis .
Syntax
Arguments
5.4.13 GetRightLimit
Description
The function returns the right limit value for the specified axis .
Syntax
real GetRightLimit(Axis)
Arguments
5.4.14 GetMargin
Description
The function returns the Margin value for the specified axis.
Syntax
Arguments
!D-buffer declaration
global SafetyZone sz1
global int const NO_ENTER_ZONE = 0
global int const NO_EXIT_ZONE = 1
[Link](IsValidPos)
[Link]()
be defined; in such case that source is the Control source, and Quality conditions are met by suitable
settings of the threshold and factor parameters.
The control source is used as the feedback of the direction and the distance of the AutoFocus axis
from the optimal focus, and the Quality conditions, threshold and factor parameters define the area
where the focus operates.
The AutoFocusSource struct represents a signal source and allows the user to define the two
sources, A and B, that are used by the AutoFocus feature. The signals can be retrieved from either
SPI or a variable.
The AutoFocusSource struct cannot be independently instantiated and is only used as a field of the
AutoFocusDefinition struct.
When using SPI data, the AutoFocusSource parameters are used to define the content of the
bitstream. The bitstream may contain two separate values (Signals A and B), and some additional
bits to signify that the values are valid and have been updated. The parameters define what
position (starting bit, length) within the bitstream the data items (A and B values, A and B valid
symbols) are found, and masks that are used to extract the various data items.
For example, Signal A and its valid symbol may start at Bit 0, and occupy 16 bits; The first three bits
(bit 0 through bit 2) constitute the valid symbol, and the last 12 bits constitute the value of signal A. In
addition, the valid value is 0b101 (depending on the autofocus source configuration). It will also be
assumed that no reversal of any bit is required, so the Xor mask will not be utilized. In such case, the
relevant parameters would be set as follows:
[Link]=0;
[Link]=0;
[Link]=0xE;
[Link]=0xA;
[Link]=0x0FFF;
Struct Fields
Default
Field Name Type Accessibility Range Comments
Value
Only
SPINumofWord Int Read-only 0 relevant for
SPI signal
Only
SPIOffset Int Read-only 0 0-7 relevant for
SPI signal
Only
SPIValidOffset Int Read-only -1 1-4 relevant for
SPI signal
Only
SPIValidMask Int R/W 0 relevant for
SPI signal
Only
SPIValidCmp Int R/W 0 relevant for
SPI signal
Only
SPIIsMsb Int R/W 0 relevant for
SPI signal
Relevant for
Mask Int R/W 0
both signals
Relevant for
both SPI and
XorMask Int R/W 0
Analog
signals
Relevant for
both SPI and
ShiftRight Int R/W 0
Analog
signals
Relevant for
both SPI and
ShiftLeft Int R/W 0
Analog
signals
Default
Field Name Type Accessibility Range Comments
Value
Relevant for
(Analog) SP
DspVarAddress Int R/W -1
Variables
only
Struct Functions
Checks that the signal has been set to SPI/ Address and
IsValid()
checks for validity of field values
Set parameters for Direct address signal – the user must set
SetAddress(INT address) the address directly (retrieved using the GETSPA function)
Parameter address – the address
This struct must be defined in the D-buffer; defining this struct as a GLOBAL in any other
buffer will result in a compilation error.
Default
Field Name Type Accessibility Range Comments
Value
Is updated after
AppliedAxis Int Read-only -1 (Illegal) >= 0
application
Default
Field Name Type Accessibility Range Comments
Value
Control Saturation
ControlSignalSaturationThreshold Real Read-only 0
Threshold
Default
signalA AutoFocusSource R/W
values
Default
signalB AutoFocusSource R/W
values
IsValid() Are the set parameters valid and ready to be applied to an axis?
Apply Autofocus parameters to a specified axis. This does not activate the feature (see Activation function). If the
ApplyToAxis(Int Axis)
operation fails, an error will be presented. If the operation succeeds, the AppliedAxis field is updated
DisableForAxis(Int Axis) Disable the feature by setting the Autofocus parameters for the specified axis to NULL.
SetQualityParameters(Int Set parameters for quality signal. If source is invalid, an error is presented and the operation fails
SrcOption, Real Factor, Parameter SrcOption – quality signal source Parameter Factor – quality signal source Parameter offset – quality signal
Real offset, Real offset Parameter threshold – quality signal threshold. The valid ranges for the parameters are described above in
threshold) QualitySignalSourceOption, QualitySignalFactor, QualitySignalOffset, and QualitySignalThreshold, respectively.
Set parameters for Control signal, if source is Illegal, an error is presented, and the operation fails
> SrcOption – Control signal source
SetControlParameters (Int > Factor – Control signal source
SrcOption, Real Factor, > offset – Control signal offset
Real offset, Real > threshold – Control signal threshold
threshold) > saturationth – Control signal saturation threshold
The valid ranges of the parameters are described above in ControlSignalSourceOption, ControlSignalFactor,
ControlSignalOffset, ControlSignalThreshold, and ControlSignalSaturationThreshold, respectively.
Arguments
Axis index, valid numbers are: 0,1,2,…. Up to the number of the axes in the
Axis
system minus 1.
Example
Please note that ACTIVATEAF(Axis) is a blocking function, which is to say that it waits for the ASTX
(Axis).#AF_RANGE to be set before the communication channel through which it was called is freed
for other communication tasks. Accordingly, this function should be called from a buffer only.
Do not activate ACTIVATEAF from the terminal, call it only from a buffer!
Comments
Please note that DEACTIVATEAF(Axis) is a blocking function, which is to say that it waits for the ASTX
(Axis).#AF_RANGE to be set before the communication channel through which it was called is freed
for other communication tasks. Accordingly, this function should be called from a buffer only.
Arguments
AutoFocusDefinition autoFocusDef
!set AXIS
[Link](1)
activateaf(1) !Feature activation
TILL ASTX(1).#AF_RANGE
DISP "IN REANGE"
TILL ASTX(1).#AF_FOCUS
DISP "INFOCUS"
STOP
Response to KILL
As a response to a KILL command, the ASTX(axis).#AFACTIVE bit is reset, and the feature needs to
be activated again.
5.5.6 FE
Description
FE is a real array, with one element for each axis in the system, and is used for displaying the error in
Autofocus mode. FE measurement begins when the AutoFocus mode is activated.
FE displays the AutoFocus error in user units.
Tag
436
Accessibility
Read-Only
.NET Library Methods
ReadVariable
C Library Functions
acsc_ReadReal
5.5.7 ERRF
Description
ERRF is a real array, with one element for each axis in the system, and is used for defining the non-
critical Position Error criterion for Autofocus mode.
Syntax
ERRF(axis_index) = value
Arguments
Axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
434
Comments
ERRF defines the non-critical position error fault (FAULT(axis_index).#PE) criterion when the motor is
in focus mode.
As a configuration variable, the ERRF value is normally defined by SPiiPlus MMI Application Studio -
>Toolbox -> Setup -> Adjuster Wizard during the setup procedure of the system.
Accessibility
Read-Write
Related ACSPL+ Variables
FAULT(axis_index).#PE
FE, CERRF
5.5.8 CERRF
Description
CERRF is a real array with one element for each axis in the system, and is used for defining the
critical Position Error criterion for Autofocus mode.
Syntax
CERRF(axis_index) = value
Arguments
Axis_ Designates the specific axis, valid numbers are: 0, 1, 2, ... up to the number of
index axes in the system minus 1.
Tag
435
Comments
CERRF defines critical position error fault (FAULT(axis_index).#CPE) criterion when the motor is in
focus mode.
As a configuration variable, the CERRF value is normally defined by SPiiPlus MMI Application Studio -
>Toolbox -> Setup -> Adjuster Wizard during the setup procedure of the system.
Accessibility
Read-Write
Related ACSPL+ Variables
FAULT(axis_index).#CPE
FE, ERRF
.NET Library Methods
ReadVariable, WriteVariable
C Library Functions
acsc_ReadReal, acsc_WriteReal
Default
Field Name Type Accessibility Range Comments
Value
The Index
of the first 0 to number of
YawAxisIndex Int R/W valid Yaw axes in the The index of the yaw axis
Axis in the system-1
system
1 to minimum(10,
Number of elements in Cross Axis
NumberOfCrossAxes Int R/W 1 number of axes
related arrays
-2)
0 to number of
The indices of the cross axes (cannot be
CrossAxisIndex* Int array R/W 0 axes in the
Yaw or Longitudinal indexes)
system
Default
Field Name Type Accessibility Range Comments
Value
Default
Field Name Type Accessibility Range Comments
Value
.
In case of several CrossAxis,
CrossAxisMassRatio of cross (i) is
Default
Field Name Type Accessibility Range Comments
Value
0: The CrossAxisForceRatio is
automatically calculated based on the
TRUE or FALSE (0 CrossAxis parameters.
IsUserDefined INT R/W 0(FALSE)
or 1) 1: The algorithm is controlled by user.
The user should define the
CrossAxisForceRatio value.
Struct Functions
Name Description
StartCompensation() Starts the calculation of the CrossAxisForceRatio. Once it is called, the IsActive flag is set to 1
Comments
> The cross-axis compensation algorithm is supported in the following products:
> CMxa
> ECMsm / UDMsm / IDMsm
> ECMma / UDMma / IDMma
> ECMdx / UDMdx / IDMdx
> To start the compensation process, the following conditions must be met:
Example
The following example shows a gantry system with 2 cross axes, where the cross masses are , , and the non-moving gantry
mass is . The gantry motors are connected to axes 0,2. CrossAxis(1) is connected to axis 1, and CrossAxis(2) is connected to axis 3. The length of
the cross beam is 100 mm. Each cross axis has its own coordinate system:
> CrossAxis(1): Position “0” is located 20 mm from axis 2. The motion direction is from axis 0 to axis 2.
> CrossAxis(2): Position “0” is located 90 mm from axis 2. The motion direction is from axis 2 to axis 0.
D-Buffer:
global static CrossCouplingCompensation Cross
#-Buffer:
real m_cross_beam = 15; ! Non-moving mass (kg)
real m_cross1 = 3; ! CrossAxis(1) mass (kg)
real m_cross2 = 2; ! CrossAxis(2) mass (kg)
! CrossAxis(2) parameters
[Link](1) = 3;
[Link](1) = 1; ! Motion direction: 2->0
[Link](1) = -10;
[Link](1) = 90;
[Link](1) = m_cross2/(m_cross_beam + m_cross1 + m_cross2);
[Link]();
STOP
The bit mask defines the Random PEG State Output behavior (identical
OutputMode int R/W
to the PEG_R OutputMode argument). The default is 0x4444.
[Link] (node,[Reset])
Arguments
Reset Optional. If nonzero, all PEG engines are set to default state. The default is 1.
Example
!D-buffer definition
global PEG peg1
!Working buffer.
[Link](0) !Initialize PEG engines on node 0, set to default.
[Link] GetPulseCounter
Description
Returns the number of fired pulses.
Syntax
[Link] (Engine)
Arguments
Comments
Returns the accumulated number of fired pulses. The FW sets the counter to 0 when a PEG
definition function is called (SetIncrementalPEGor SetRandomPEG).
[Link] EnablePEG
Description
Enable the PEG engine.
Syntax
[Link] (Engine)
Arguments
Comments
Activates previously defined PEG engine. Call EnablePEG if PEG was initially defined as suspended.
[Link] DisablePEG
Description
Disable the PEG engine.
Syntax
[Link] (Engine)
Arguments
Comments
Disables previously enabled PEG engine.
[Link] AssignEngineByCode
Description
Set PEG engines to axes assignment by code, like ASSIGNPEG function
Syntax
[Link] (Code)
Arguments
Example
!D-buffer definition
global PEG peg1
!Working buffer.
[Link](1) !Initialize PEG engines on node 1 (UDMsm), set to
default.
[Link](0x03020100) !Assign engines
[Link] DisplayAvailableAssign
Description
Display in the communication terminal window all possible assignments for a specified axis. Can be
run only from a buffer.
Syntax
[Link] (Axis)
Arguments
Example
!D-buffer definition
global PEG peg1
!Working buffer.
[Link](1) !Initialize PEG engines on node 1 (UDMsm), set to
default.
[Link](4) !Display available assignments for axis 0
Output
[Link] AssignEngines
Description
Assign PEG engines to controller axes.
Syntax
Arguments
Comments
If requested assignment not available, run time error occurred.
Example
!D-buffer definition
global PEG peg1
!Working buffer.
[Link](1) !Initialize PEG engines on node 0 (UDMsm), set to
default.
[Link](4, 3) !Axis 4 assigned to Engine 3
[Link](4, 0, 5, 1) !Axis 4 assigned to Engine 0, axis 5 to
Engine 1
[Link] DisplayCurrentAssign
Description
Display current Engine to Axis assignment for node. Can only be run from a buffer.
Syntax
[Link] ()
Example
!D-buffer definition
global PEG peg1
!Working buffer.
[Link](1) !Initialize PEG engines on node 0 (UdMsm), set to
default.
[Link]() !Display assignments for node 1
Output:
[Link] DisplayAvailablePEGPulseOuts
Description
Display available outputs for PEG Pulse signal for the specified engine.
Syntax
[Link] (PEGEngine)
Arguments
Example
!D-buffer definition
global PEG peg1
global int const PEG_PULSE=0
global int const PEG_STATE0 =1
global int const PEG_STATE1 =2
!Working buffer.
[Link](1) !Initialize PEG engines on node 1 (UDMsm), set to
default.
[Link](0) !Disp available Outputs for PEG
pulse engine 0
Output
[Link] DisplayAvailablePEGStateOuts
Description
Display available outputs for PEG STATE signal for specified engine.
Syntax
Arguments
Example
!D-buffer definition
global PEG peg1
global int const PEG_PULSE=0
global int const PEG_STATE0 =1
global int const PEG_STATE1 =2
!Working buffer.
[Link](1) !Initialize PEG engines on node 1 (UDMsm), set to default.
[Link] (0, 1) !Disp available Outputs for PEG
State 1, engine 0
Output:
[Link] DisplayAvailableAqBOuts
Description
Display available outputs for AqB (A or B) encoder signal .
Syntax
Arguments
Example
!D-buffer definition
global PEG peg1
global int const PEG_PULSE=0
global int const PEG_STATE0 =1
global int const PEG_STATE1 =2
!Working buffer.
[Link](0) !Initialize PEG engines on node 1 (UDMsm), set to
default.
[Link](1, 0) ! Disp available Outputs for AqB phase
A encoder 1
Output
[Link] DisplayAvailableGPOUTOuts
Description
Display available outputs for General Purpose output.
Syntax
[Link] (Output)
Arguments
Example
!D-buffer definition
global PEG peg1
global int const PEG_PULSE=0
global int const PEG_STATE0 =1
global int const PEG_STATE1 =2
!Working buffer.
[Link](1) !Initialize PEG engines on node 1 (UDMsm), set to
default.
peg1. DisplayAvailableGPOUTOuts ( 1) !Disp available Outputs for GP
Output 1
Output
[Link] AssignPEGOutByCode
Description
Route PEG pulse signal to General Propose Outputs. Like last parameter in ASSIGNPEG function
Syntax
Arguments
Example
!D-buffer definition
global PEG peg1
!Working buffer.
[Link](1) !Initialize PEG engines on node 1 (UDMsm), set to
default.
[Link](1, 9) !Assign Output 1 to PEG1 Pulse signal
[Link] AssignOutPEGPulse
Description
Route the PEG Pulse signal of the specified engine to the defined Output.
Syntax
Arguments
Example
!D-buffer definition
global PEG peg1
global int const PEG_PULSE=0
global int const PEG_STATE0 =1
global int const PEG_STATE1 =2
!Working buffer.
[Link](1) !Initialize PEG engines on node 1 (UDMsm), set to
default.
[Link](8, 0) !Assign Output 8 to PEG pulse engine
[Link] AssignOutPEGState
Description
Route the PEG State signal of the specified engine to the defined Output
Syntax
Arguments
Example
!D-buffer definition
global PEG peg1
!Working buffer.
[Link](1) !Initialize PEG engines on node 1 (UDMsm), set to
default.
[Link](1, 0, 1) !Assign Output 1 to PEG State 1 engine 0
[Link] AssignOutAqB
Description
Route the AqB encoder phase to the defined Output
Syntax
Arguments
!D-buffer definition
global PEG peg1
!Working buffer.
[Link](1) !Initialize PEG engines on node 1 (UDMsm), set to
default.
[Link](4, 1, 0) !Assign Output 4 to A phase of encoder 1
[Link] AssignOutGPOUT
Description
Route the specifies output to the defined GP Output.
Syntax
Arguments
Example
!D-buffer definition
global PEG peg1
!Working buffer.
[Link](1) !Initialize PEG engines on node 1 (UDMsm), set to
default.
[Link] (1, 1) !Output 1 to GPOUT 1
[Link] SetIncrementalPEG
Description
The function defines the incremental PEG on specified engine
Syntax
Arguments
PulseWidth Width of the pulse in milliseconds. Valid range is 26.6 ns to 1.745 ms.
Example
!D-buffer definition
global PEG peg1
!Working buffer.
real Width = 0.1
real StartPos = 10
real Inc = 1
real StopPos = 100
[Link](1) !Initialize PEG engines on node 1 (UDMsm), set to
default.
[Link]=2
[Link]=0.2
! incremental PEG for on engine 2 with time-based pulses
[Link](2, Width , StartPos, Inc, StopPos)
[Link] SetRandomPEG
Description
The function defines the Random PEG on specified engine.
Syntax
Arguments
Example
!D-buffer definition
global PEG peg1
!Working buffer.
global real Pos(3000)
global int St(3000)
real StartPos, EndPos, PulseWidth
PulseWidth = 0.1
int Step = 10
int AxInd = 4
int PEGEng = 0
int PointsNum = 2500
[Link](1) !Initialize PEG engines on node 1 (UDMsm), set to
default.
StartPos = RPOS (AxInd) + Step/2
int i = 0
loop PointsNum !Set number of pulses each mentioned step, example use
only
block
Pos (i) = StartPos + i * Step
if (i & 1) = 0
St(i) = 0
else
St(i) = 0xF
end
i++
end
end
[Link](PEGEng, 0, PointsNum-1, Pos, PulseWidth, St)
[Link] SetPulseDelay
Description
The function defines the PEG Pulse signal delay for specified PEG engine.
Syntax
[Link](Engine, Delay)
Arguments
[Link] SetStateDelay
Description
The function defines the PEG State signal delay for specified PEG engine.
Syntax
Arguments
[Link] EnableErrorMap1D
Description
The function defines the incremental PEG on specified engine
Syntax
peg1.EnableErrorMap1D(Engine)
Arguments
[Link] EnableErrorMap2D
Description
The function enables 2D error support on specified PEG engine
Syntax
Arguments
Example
!D-buffer definition
global PEG peg1
!Working buffer.
real StartPos = 10
real Inc = 1
real StopPos = 100
real Width = 0.1
[Link](1) !Initialize PEG engines on node 1 (UDMsm), set to
default.
[Link](4, 0, 5, 1) !Axis 4 assigned to Engine 0, axis 5 to
Engine 1
peg1.EnableErrMap2D(0, 5, 101) !Enable 2D error map. Axis 4 is dynamic,
5 static Pos=101
[Link](0, Width, StartPos, Inc ) ! Endless incremental
PEG for on engine 0
[Link] EnableErrorMap3D
Description
The function enables 3D error support on specified PEG engine.
Syntax
Arguments
[Link] DisableErrorMap
Description
The function cancels error mapping support on specified PEG engine
Syntax
[Link](Engine)
Arguments
6. 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.
The Communication Terminal window is described in the SPiiPlus MMI Application Studio User Guide.
Command &
Description Example
Syntax
?[ACSPL+ Returns the current value of a ?TCPIP – Returns the TCP/IP for the
variable] standard variable . Ethernet port N1.
?[ACSPL+
?TCPIP, TCPPORT – Returns the
variable Returns the current value of
TCP/IP for the Ethernet port N1 and
ACSPL+ listed standard variables.
the TCP port number.
variable]...
?[buffer
Returns the current values of a ?1:MY_VAR – Returns the values of a
number]: [local
local user variable or array local user-defined variable named
user-defined
defined in a program buffer. MY_VAR.
variable]
Command &
Description Example
Syntax
?$[axis Returns the current status of ?$16 – Returns the current status of
number] the motor for the specified axis. the axis 16 motor.
Format Description
Decimal format.
This format is identical to the default format for integer variables. When
?D/ applied to a state variable, the format displays the decimal presentation of the
variable.
C-equivalent: %10i.
Hexadecimal format.
When applied to an integer variable, this format displays the hexadecimal
?X/
presentation of the variable.
C-equivalent: %08X
Binary format.
?B/ 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.
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
?E/
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
?B/ MST
00000000,00000000,00000000,00000011
?E/UserReal
1.00000000000001
Format Description
The motor feedback values for all axes are displayed in 12 digits, fixed
?{%12.3f}FPOS decimal point, 3 digits after the point. The same format applies to all 8
values.
?{XFPOS =
The response will look like XFPOS = 1234.
%8.0f}X_FPOS
All other commands operate with one buffer only, and must specify the buffer number.
Line Designation
A line designation can appear in one of three forms, as shown in the following table:
Table 8-1. Line Designation
Label preceded by a slash Specifies the line by a designated label (the text following the
(/) character slash).
Examples
The following are examples of using the L command.
List line 4 in buffer 3.
#3L4
4: till ^MST(0).#MOVE
1: movePTP:
2: VEL(0) = 20000
3: ptp 0, 4000
1: movePTP:
1: movePTP:
2: VEL(0) = 20000
3: ptp 0, 4000
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.
#3 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
# 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
[Link] D
Description
The D (Delete) command deletes the specified lines in the buffer.
Syntax
#buffer_numberDline_number[,line_number]
Arguments
Comments
If a buffer is open, the D command that addresses the buffer shifts the insert line to before the first
undeleted line.
Example
[Link] F/IF
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
search_
The text being sought.
string
line_ Optional, if included, line_number defines the start line for the search.
number 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.
[Link] L
Description
The L (List) command is used for displaying a program listing.
Syntax
#buffer_numberL[line_number]
Arguments
buffer_ buffer_number specifies the buffer, a number between 0 and 16; or you can
number use the pound (#) to designate all buffers.
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.
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.
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:
1: MovePTP:
Buffer 4
1: ! PLC program
Buffer 5 Buffer 5 is empty
0:
Buffer 6 Buffer 6 is empty
0:
Buffer 7 Buffer 7 is empty
0:
Buffer 8 Buffer 8 is empty
0:
Buffer 9 Buffer 9 is empty
0:
[Link] E/EC
Description
The E (Edit) command adds text to a buffer, optionally clearing the buffer.
Syntax
#buffer_numberE[C]%Text
Arguments
buffer_ buffer_number specifies the buffer, a number between 0 and 16; or you can
number use the pound (#) to designate all buffers.
Example
Clear buffer 8, and fill it with the line- DISP"bbb";STOP
#8EC%DISP"bbb";STOP
Resulting buffer:
6.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 in which case
the password, if included, is not needed.
6.3.4 SCTRIGGER
Description
SCTRIGGER sets conditions to start data collection for display in the MMI scope. When data colleciton
is triggered, AST[Channel] will also be triggered.
Syntax
SCTRIGGER/([0-7]T) Action [,Variable] [,BitMask] [,Level] [,Negative] [,Timeout]
Arguments
1 - Use all specified parameters. The scope will only be Triggered when the
variable condition is met.
Action
2 - Ignore all other parameters (variable, bitmask, etc.). The scope will be
triggered without using a trigger variable.
(Optional) If specified, collection will start automatically after the timeout (in
Timeout
milliseconds) has passed.
Switches
Return Value
None
Example 1
!Start collection on data channel 2 when variable a has passed the value
of 100
GLOBAL INT a=10
SCTRIGGER/2 1, a, 0xFFFFFFFF, 100, 0
Example 2
Example 2
Start collection on channel 2, when FPOS(0) is less than 1. If condition is not met within 100
milliseconds, start collection regardless.
[Link] 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]
Arguments
Comments
If group_name is omitted, the command lists only the categories. If group_name is included, the
command lists the ACSPL+ sub-categories within the category.
The category must be entered in exactly the same format as given in the list above.
[Link] VSD
Description
The VSD command lists all ACSPL+ variables with a short description.
Syntax
#VSD [group_name]
Arguments
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.
[Link] 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
Comments
When group_name is included in the VSG command, the names of the ACSPL+ variables within the
specified category are listed.
Example
The following is an example of the VS command.
[Link] 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
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.
[Link] 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
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
[Link] 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
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.
[Link] 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
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.
Examples
The following are examples of the V and VF commands.
Response
ITIME Global
TS_AMP1 Local
TS_AMP0 Global
#9VF Provide a list of user variables
in buffer 9 with additional information
Response
ITIME Global real@00DA0C50
TS_AMP1 Local int@00DA1A30
TS_AMP0 Global int@00DA0C80
[Link] 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
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:
[Link] 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
Comments
When group_name is included with the VSGT command, the ACSPL+ variables within the specified
category are listed.
[Link] 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 protection can be applied.
Syntax
#VSTF
#VSGTF [group_name]
#VSDT [group_name]
Arguments
Comments
When group_name is included with the VSGTF or VSDT command, the ACSPL+ variables within the
specified category are listed.
[Link] VGV
Description
The #VGV command is used to remove global variables that have been set via Communication
Terminal or STATIC variables defined in the D-Buffer.
Syntax
#VGV [global_var]
Arguments
Comments
If the global_var parameter is included, VGV removes only this variable; otherwise it removes all
global variables.
The #VGV command deletes STATIC variables but does not free their memory. If, after using the
command, the user encounter memory shortage issues, a controller reboot is needed to reset the
memory.
[Link] VGS/VGSF
Description
The VGS command is used to list all STATIC variables currently defined.
The VGSF command, in addition to STATIC variable names, also lists the type, number of elements
(arrays only) and address of the variable in the controller memory.
Syntax
#VGS [Static_Var]
#VGSF [Static_Var]
Arguments
#P
#X
Run Suspended
#S
#X
#X #S
#SR
#SR
Not Compiled
#C
compiled
#SR
[Link] 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_ buffer_number specifies the buffer, a number between 0 and 16; or you can
number 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.
Examples
The following are examples of the C command.
[Link] 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]
Arguments
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
[Link] 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}
Arguments
buffer_ buffer_number specifies the buffer, a number between 0 and 16; or you can
number 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.
Example
[Link] P
Description
The P (Pause) command suspends program execution in a buffer.
Syntax
#buffer_numberP
Arguments
buffer_ buffer_number specifies the buffer, a number between 0 and 16; or you can
number 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.
[Link] XS
Description
The XS (Execute one step) command executes one program line.
Syntax
#buffer_numberXSline_number
Arguments
buffer_
buffer_number specifies the buffer, a number between 0 and 16.
number
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.
[Link] XD
Description
The XD (Execute in Debug mode) command executes the program up to the next breakpoint (see
BS).
Syntax
#buffer_numberXD
Arguments
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.
[Link] BS
Description
The BS (Set Breakpoint) command sets a breakpoint at the specified line.
Syntax
#buffer_numberBSline_number
Arguments
buffer_
buffer_number specifies the buffer, a number between 0 and 16.
number
line_ line_number specifies the line at which to set the breakpoint, it can be a line
number 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.
A breakpoint will break the execution inside an autoroutine only if the program in the buffer is
running at the same time (PST.#RUN is ON), inside a "while" loop, for example. In general,
breakpoints do not work inside autoroutines.
[Link] BR
Description
The BR (Reset Breakpoint) command resets the breakpoint at the specified line or all breakpoints.
Syntax
#buffer_numberBR[line_number]
Arguments
buffer_ buffer_number specifies the buffer, a number between 0 and 16; or you can
number use the pound (#) to designate all buffers.
line_ Optional, if included, the command resets one breakpoint at this line. line_
number 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
6.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: [Link]
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: [Link]
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
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
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
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.[Link]
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.
SP1 Program Info:
Monitor version:1
Creation Date: Sun Apr 03 08:26:19 2011
Saving Tool: SPiiPlus NT Servo Application File Generator v.[Link]
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.
6.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:
001 SPiiPlus DDM-4
020 SPiiPlus CM
030 SPiiPlus SA
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:
> Total NumberOf Axes
Maximum number of allowed axes.
> 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).
> Dual_Loop
All axes that support Dual Loop control.
> PEG_Pulse
All axes that support the PEG Pulse feature.
> 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.
> Network Axes
The axes indices, separated by commas, of all axes allocated to the unit.
> Digital Inputs
All digital input variable indices, separated by commas, that are allocated to the unit.
1. PWM
2. External +10
3. LDM3U
4. ED2
5. Network
6. Digital LDM3U
#SIR/Options/LearningBoost/
[Options]
LearningBoost = Yes
Example 2
#SIR/Hardware/FW/
[Hardware]
FW = [Link]
Example 3
#SIR/ALL/ALL/
[Hardware]
Model = 60
FW = [Link]
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
NIC2_IP = 0
NIC2_MAC = 000000000000
[Options]
TotalNumberOfAxes = 32
SinCosEncoders = 32
InputShaping = Yes
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
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
[UNIT1]
ID = 2
DIP = 0
NetworkAxes = none
DigitalInputs = none
DigitalOutputs = none
AnalogInputs = none
AnalogOutputs = none
[AXIS0]
CurrentNominal = 0.000000
CurrentPeak = 0.000000
XRMSmax = 50.000000
XRMSTmax = 3230.000000
Voltage = 0
DriveInterface = 2
MaxCommandCurrent = 5242
SerialNumber =
[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
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
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
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
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 =
:
6.4.3 MEMORY
Description
Retrieves RAM availability.
Syntax
#MEMORY
Arguments
None.
Return Value
Available RAM.
Example
Up to Version 3.11
#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.
#MEMORY
Memory Allocation for buffers:
for all buffers code: 14832 kB
for all buffers source: 6416 kB
for all buffers local variables: 8704 kB
for global variables: 1024 kB
6.4.4 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.
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:\
[Link] 001E2870 001E2870 03672ED6 03672ED6
[Link] 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
par8.$$$ 00000A13 00000A13 43A67043 43A67043
par9.$$$ 00000A13 00000A13 67BC915E 67BC915E
par10.$$$ 00000A89 00000A89 454F04F9 454F04F9
par11.$$$ 00000A89 00000A89 5A67281F 5A67281F
6.4.5 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.
6.4.6 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
6.4.7 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
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
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
6.4.8 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
> PdoIndex
Afterwards the list of network variables is listed. Each variable is described with:
#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:
==================
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
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
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
Network variables:
==================
Offset Size Dir PdoIndex Name
72 32 In 0x1600 Command response1
76 32 In 0x1600 Command response2
80 32 In 0x1600 Command response3
84 32 In 0x1600 Command response4
88 32 In 0x1600 Feedback Position1
92 32 In 0x1600 Reference Position1
96 32 In 0x1600 Drive status1
100 32 In 0x1600 GP data 1A
104 32 In 0x1600 Feedback Position2
108 32 In 0x1600 Reference Position2
112 32 In 0x1600 Drive status2
116 32 In 0x1600 GP data 2A
120 16 In 0x1600 Drive Output1
122 16 In 0x1600 Drive Output2
124 16 In 0x1600 Digital inputs
126 16 In 0x1600 FPGA status
6.4.9 #ETHERCAT2
The #ETHERCAT2 command can be used for gaining complete information about the connected
EtherCAT nodes on the Secondary EtherCAT network.
Example:
#ETHERCAT2
EtherCAT Master is in OP state.
Network variables:
==================
Offset Size Dir ObjectIndex SubIndex PdoIndex Name
72.0 8 In 0x6000 0x01 0x1600 Digital Inputs 0
73.0 8 In 0x6000 0x02 0x1600 Digital Inputs 1
74.0 8 In 0x6000 0x03 0x1600 Digital Inputs 2
75.0 8 In 0x6000 0x04 0x1600 Digital Inputs 3
76.0 8 In 0x6000 0x05 0x1600 WD_COUNTER
77.0 8 In 0x6000 0x06 0x1600 SYSTEM
72.0 8 Out 0x7000 0x01 0x1A00 Digital Outputs 0
73.0 8 Out 0x7000 0x02 0x1A00 Digital Outputs 1
74.0 8 Out 0x7000 0x03 0x1A00 Digital Outputs 2
75.0 8 Out 0x7000 0x04 0x1A00 Digital Outputs 3
76.0 8 Out 0x7000 0x05 0x1A00 WD_COUNTER
77.0 8 Out 0x7000 0x06 0x1A00 System
6.4.10 ECMAPREP
Description
The ECMAPREP command displays a report of all variables mapped using the ECIN , ECOUT, ECEXTIN,
and ECEXTOUT functions. Bit notation is available for all variables..
Syntax
#ECMAPREP [/0 /1]
Example
Example
#ECMAPREP
EtherCAT Network 0:
========
Input 1:
========
Variable I0, at 0x856E0A24 (integer)
Array Length 0
Data Length 2
EC Offset 204.0
Limits 0
Read Only = false
EtherCAT Network 1:
========
Input 2:
========
Variable I2, at 0x856E0A44 (integer)
Array Length 0
Data Length 1
EC Offset 210.0
Limits 0
Read Only = false
6.4.11 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:[Link]
8 TCP/IP ( 701) Peer:[Link]
9 TCP/IP ( 701) Peer:[Link]
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
6.4.12 PLC
Description
The PLC command provides some very important information about the SpiiPlus PLC co-existence
inside the SpiiPlus firmware.
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
6.4.13 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.
Program errors (ACSPL+ buffer TIME program error, PERR(BUFFER) = ERROR, PERL
termination error) (BUFFER) = LINE
Syntax
#LOG
Example
6.4.15 LOGP
Description
Presents G-code run-time errors detected during running the program in simulation mode (using
START/s command).
Syntax
#LOGP buffer_number
Arguments
buffer_ The number of buffer that was ran in simulation mode using START/s
number command.
Comments
> If the program contains calls to sub-routines residing in the D-Buffer, then all run-time
errors occurred inside sub-routine will be addressed by the sub-routine calling line number.
> Buffer recompilation or rerun clears the list of run-time erors detected during the last
running process.
Motion generator related run-time errors are not detected, since the simulation takes
place only on G-code level.
Error code values of 7100 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.
Scalar variable cannot accept axis A scalar variable was used with an
1028
specification axis specification.
A GO or KILL/KILLALL command
Commands BEGIN, END, KILL, GO
1082 has been entered without an axis
require axis specification
specification.
Commands MPTP...ENDS,
MSEG...ENDS, PATH...ENDS,
Segment sequence for the
PVSPLINE...ENDS are followed by a
1130 previous motion was not
sequence of points or segments.
terminated with ENDS command
The sequence must terminate
with ENDS.
1132 The file is not a legal user data file The file designator is not valid.
Requested more SINCOS encoder The user tried to select more Sin-
1148
multipliers than installed Cos multipliers than allowed.
Attempt to split group with active Cannot split an axis group while in
1183
motion on motion.
1212 ARC arguments are inconsistent See MSEG...ENDS, ARC1 and ARC2.
Cross-Axis compensation is
1370
already active
Number user array elements can The limitation applies also to two-
2030 not exceed the XARRSIZE dimensional arrays. The total number
parameter 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.
Bit selection cannot be applied to The bit selector is specified for a real
2058
real variable variable.
GOTO, CALL, RET, LOOP, WHILE, IF, Commands GOTO, CALL, LOOP...END,
2079 ON are not allowed in dynamic or WAIT, IF, ELSEIF, ELSE...END, ON...RET
JIT buffer cannot be used in the dynamic buffer.
Connect/Trigger expressions do
2195
not support user defined functions
Codes from 3000 to 3019, however, do not indicate an error. For example, code 3001
reports that the program is suspended and 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 9-3. ACSPL+ Runtime Errors
Error
Error Message Remarks
Code
A command specifies an
3023 Read-only variable cannot be assigned assignment to a read-only
variable.
Error
Error Message Remarks
Code
Error
Error Message Remarks
Code
Error
Error Message Remarks
Code
Error
Error Message Remarks
Code
Error
Error Message Remarks
Code
Error
Error Message Remarks
Code
Error
Error Message Remarks
Code
Error
Error Message Remarks
Code
Error
Error Message Remarks
Code
Error
Error Message Remarks
Code
Error
Error Message Remarks
Code
Error
Error Message Remarks
Code
Error
Error Message Remarks
Code
Error
Error Message Remarks
Code
3141 Timeout
Error
Error Message Remarks
Code
Error
Error Message Remarks
Code
Error
Error Message Remarks
Code
Error
Error Message Remarks
Code
JIT and Dynamic modes are not allowed for JIT and Dynamic modes are not
3200
D-buffer allowed for D-buffer
Error
Error Message Remarks
Code
Error
Error Message Remarks
Code
Error
Error Message Remarks
Code
Error
Error Message Remarks
Code
Error
Error Message Remarks
Code
Error
Error Message Remarks
Code
Error
Error Message Remarks
Code
Error
Error Message Remarks
Code
Error
Error Message Remarks
Code
Error
Error Message Remarks
Code
Error
Error Message Remarks
Code
Error
Error Message Remarks
Code
Error
Error Message Remarks
Code
Error
Error Message Remarks
Code
Error
Error Message Remarks
Code
Error
Error Message Remarks
Code
7.4 Errors
Motion Termination error code values range between 5000 and 5150.
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 9-4. ACSPL+ Motion Termination Errors
Error
Error Message Remarks
Code
Motion generation The motion came to the final point and was
5001
finished successfully completed.
Motion was
5005 terminated because a The motion was disabled by DISABLE/DISABLEALL.
motor was disabled
Error
Error Message Remarks
Code
5010 Hardware Right Limit The motion was killed because of a right limit fault.
5011 Hardware Left Limit The motion was killed because of a left limit fault.
Error
Error Message Remarks
Code
Error
Error Message Remarks
Code
Attempt of motion
5032
while a fault is active
Error
Error Message Remarks
Code
Error
Error Message Remarks
Code
Safe Torque Off: SS1 See Timing Error section in STO Application Note for
5057
Timing Error more details.
Error
Error Message Remarks
Code
Driver Alarm: Power The motor was disabled or the motion failed
5069
Down because of a power-down condition in the drive.
Driver Alarm:
5072
Overcurrent
Driver Alarm:
5077 Regeneration module
fault
Error
Error Message Remarks
Code
Component Failure:
5081
Power supply 0 fault
Component Failure:
5082
Power supply 1 fault
Component Failure:
5083 Regeneration module
fault
Component Failure:
5086
Unknown error
Component Failure:
5087
Unknown error
Component Failure:
5088
Unknown error
Error
Error Message Remarks
Code
Component Failure:
This is caused by the inrush power protection
Power supply not
detector. It temporarily suspends the power input.
5091 ready. Try to enable
Wait for a few seconds for the power to normalize
axis again within 10
before starting.
seconds
Component Failure:
5092
Unknown error
Component Failure:
5093
Unknown error
Component Failure:
5095
Unknown error
Error
Error Message Remarks
Code
Error
Error Message Remarks
Code
ENABLE is prohibited
5103 while Constant Current
is ON
Current bias
measurements
5109
process was not
completed
Error
Error Message Remarks
Code
Encoder Error: An
internal incompatibility
5127 was detected. Full
system upgrade is
required.
Encoder Error:
5128
Watchdog
Encoder Error:
5124
Timeout
Encoder Error: An
internal
5127 incompatibility was
detected. Full system
upgrade is required.
Encoder error:
5128
Watchdog
Error
Error Message
Code
Initialization problem: One or more parameters are out of range for the current
5169
controller configuration (See #LOG for details). Default values are assigned
Initialization problem: One or more EEPROM parameters are different from the
5170
current controller configuration. Values from EEPROM are assigned
5171 Initialization problem: One axis attached to two drives in configuration file
Error
Error Message
Code
Initialization problem: Component was detected by I2C but was not found in
5178
configuration file
Error
Error Message
Code
5190 Initialization problem: Number of nodes does not meet the configuration
5191 Initialization problem: Number of axes does not meet controller options
Initialization problem: One or more EtherCAT nodes are incompatible with Ring
5196
Topology
Initialization problem: One or more EtherCAT nodes are incompatible with ENI.
5198
System should be reconfigured
Initialization problem: One or more Gantry pairs were changed. Controller reboot
5199
is required
5202 Initialization problem: File not found. Servo Processor program activation failed
5203 Initialization problem: Read file error. Servo Processor program activation failed
Error
Error Message
Code
5206 Initialization problem: EtherCAT error. Servo Processor program activation failed
Error
Error Message Remarks
Code
EtherCAT cable not Check that the EtherCAT connections are firmly
6001
connected seated.
Error
Error Message Remarks
Code
EtherCAT Master won't Hardware fault, for example DHD with broken
6013
enter INIT state (logic) supply.
Error
Error Message Remarks
Code
Change in configuration
was detected. Optional
6017
Group was added. It
should be approved.
EtherCAT Master won't EtherCAT Master is in INIT state and won’t enter
6018
enter PREOP state the PREOP state.
Group ID mismatch
between configuration
6021
file and actual
configuration
Change in configuration
was detected. Optional
6022
Group was removed. It
should be approved.
ACS Error
Error Message Remarks
Code
Unknown requested
7018 Requested state change is unknown
state
ACS Error
Error Message Remarks
Code
No valid inputs
7024 Slave application cannot provide valid inputs
available
No valid outputs
7025 Slave application cannot provide valid outputs
available
7032 Slave needs cold start Slave device requires a power off – power on reset
ACS Error
Error Message Remarks
Code
SyncMode Not
7040 Slave doesn’t support SYNC mode
Supported
Free Run Needs 3- FreeRun Mode, sync manager has to run in 3Buffer
7041
Buffer Mode Mode
ACS Error
Error Message Remarks
Code
ACS Error
Error Message Remarks
Code
ACS Error
Error Message Remarks
Code
A value contained in
the query data field is
8003
not an allowable value
for the server.
An unrecoverable
error occurred while
8004 the server was
attempting to perform
the requested action.
Server is engaged in
processing a long-
8006 duration command.
Client should retry
later.
ACS Error
Error Message Remarks
Code
Error
Error Message Remarks
Code
Error
Error Message Remarks
Code
8016 The connection with the server device has been closed.
Code Meaning
Code Meaning
Code Meaning
Code Meaning
Code Meaning
2516 G-code: Addresses that are not allowed together were specified
3504 G-code: An illegal arc with the current radius compensation parameters
3520 G-code: XSEG addresses - Cannot use (,Y) together with addresses (,J), (,A) & (,D)
3521 G-code: XSEG comma-addresses (,g), (,u) and (,h) cannot be specified together
G-code: Cannot use XSEG motion parameters command G200 with any of G01,
3522
G02 or G03
3523 G-code: XSEG addresses - Cannot use M61/M62 with addresses (,O1) to (,O4)
G-code: XSEG addresses - At least both (,O1) and (,O2) addresses must be used
3524
on the same line
3525 G-code: XSEG addresses - Cannot use (,M) together with (,F) or (F)
3526 G-code: XSEG addresses - Cannot use (,M) together with (,L)
G-code: G208 should define at least two primary axes, according to active
3528
trajectory plane (G17/G18/G19)
G-code: G208 should define minimum of 2 XSEG axes and maximum of 6 XSEG
3529
axes
G-code: Segment processing time (T) option should be specified only with in-
3530
plane G01/G02/G03
G-code: Cannot use (T) option - Segment processing time, together with (,F) or
3531
(F)
3532 G-code: The value should be above a minimum value (see GSP Reference Guide)
G-code: G207 should define one linear axis followed by one rotational axis or
3534
only one rotational axis, and cylinder radius or diameter in one statement
G-code: Blended motion should not specify feedrate and segment time
3538
together
3542 G-code: G84 only allows rotation angle and center parameters to be specifed
G-code: Buffer is in Path Smoothing mode, please switch mode to use G06
3555
command
3559 G-code: G54 and G54.4 are not allowed in the same line
G-code: Another tool length compensation is active, use G49 command to end it
3561
first
3562 G-code: TCP mode requires tool length selection using H address
Bit Code Encoder 0(X) Encoder 1(Y) Encoder 2(A) Encoder 3(B)
PEG0
010 PEG1 no no
PEG2
PEG1
011 PEG0 no no
PEG2
PEG0
100 PEG1 no no no
PEG2
PEG0
101 no PEG1 no no
PEG2
Table A-2. Mapping PEG Engines to Encoders (Servo Processor 1) for SPiiPlusNT / DC-LT / HP / LD
Bit Code Encoder 4(Z) Encoder 5(T) Encoder 6(C) Encoder 7(D)
PEG4
010 PEG5 no no
PEG6
PEG5
011 PEG4 no no
PEG6
PEG4
100 PEG5 no no no
PEG6
PEG4
101 no PEG5 no no
PEG6
Table A-3. Mapping PEG Engines to Encoders (Servo Processor 0) for SPiiPlus CMnt / CMhv / CMba / CMxa / UDMba / UDMhp / UDMxa / UDMhv /
UDMnt / UDMpa / UDMpm / UDMpc / UDMcb
Bit Code Encoder 0(X) Encoder 1(Y) Encoder 2(A) Encoder 3(B)
PEG0
010 PEG1 no
PEG22
PEG1
011 PEG0 no
PEG22
PEG0
100 PEG1 no no
PEG22
PEG0
101 no PEG1 no
PEG22
PEG01, 2
110 PEG11, 2
PEG21, 2
Bit Code Encoder 0(X) Encoder 1(Y) Encoder 2(A) Encoder 3(B)
PEG01, 2
111 PEG11, 2
PEG21, 2
Table A-4. Mapping PEG Engines to Encoders (Servo Processor 0) for UDMlc / UDMsd / UDIlt / UDIhp / UDMmc / PDIcl
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
Table A-5. Mapping PEG Engines to Encoders (Servo Processor 0) for NPMpm / NPMpc
PEG0
010 no no no
PEG1
PEG0
011 no no no
PEG1
Table A-6. Engine to Encoder Assignment for IDMxx, ECMxx, and UDMxx
PEG
Bits HEX Code Encoder 0 Encoder 1 Encoder 2 Encoder 3
Engine
00 (default) PEG0
0..7 01 PEG0
0
02 PEG0
03 PEG0
00 PEG1
03 PEG1
00 PEG2
16..23 01 PEG2
21
02 (default) PEG2
03 PEG2
PEG
Bits HEX Code Encoder 0 Encoder 1 Encoder 2 Encoder 3
Engine
00 PEG3
01 PEG3
1
3 24..31
02 PEG3
03 PEG3
1
This row applies to XXMsm, XXMma, and XXMdx
2
These rows apply only to XXMsm and XXMma
Instructions: the above table is used to build a hexadecimal value for the engines_to_encoders_ code argument. Byte x determines that PEG engine x will
be triggered by a specific encoder.
Example for IDMsm/ECMsm
ASSIGNPEG 0, 0x03020100
ASSIGNPEG 0, 0x02010203
Table A-8. General Purpose Outputs Assignment for Use as PEG Pulse Outputs (Servo Processor 1) for SPiiPlusNT / DC-LT / HP / LD
Table A-9. General Purpose Outputs Assignment for Use as PEG Pulse Outputs (Servo Processor 0) for SPiiPlus CMnt / UDMpm / CMhv / UDMhv-
Table A-10. General Purpose Outputs Assignment for Use as PEG Pulse Outputs (Servo Processor 0) for UDMnt / UDMpa / UDMcb
PEG OUTPUT 0 1 2 3 4
PIN NAME X_PEG Y_PEG Z_PEG T_PEG H_DO_1 (HSSI)
Bit Code
Table A-12. SPiiPlusNT / DC-LT / HP / LD Mapping of Engine Outputs to Physical Outputs (Servo Processor 1)
PEG OUTPUT 5 6 7 8 9
PIN NAME X_STATE0 X_STATE1 X_STATE2 H_DO_0 (HSSI) H_CON_0 (HSSI)
Bit Code
Table A-13. Mapping of Engine Outputs to Physical Outputs (Servo Processor 0) for CMnt / UDMpm / UDMpc / CMhv / UDMhv
PEG OUTPUT 0 1 5 6
PIN NAME PEG0 PEG1 STATE0 STATE1
Bit Code
Encoder X
001 Encoder X Phase B PEG1_OUT0 PEG1_OUT1
Phase A
Encoder Y
010 Encoder Y Phase B PEG2_OUT0 PEG2_OUT1
Phase A
Table A-14. Mapping of Engine Outputs to Physical Outputs (Servo Processor 0, OUT 0-4) for CMba / CMxa / UDMba / UDMhp / UDMxa
PEG OUTPUT 0 1 2 3 4
PIN NAME (0)_PEG_PULSE (1)_PEG_PULSE (1)_STATE0 (1)_STATE1 (1)_STATE2
Bit Code
Encoder X
001 Encoder X Phase B PEG0_STATE0 PEG0_STATE1 PEG0_STATE2
Phase A
Encoder Y
010 Encoder Y Phase B PEG2_STATE0 PEG2_STATE1 PEG2_STATE2
Phase A
Table A-15. Mapping of Engine Outputs to Physical Outputs (Servo Processor 0, OUT_5-9) for CMba / CMxa / UDMba / UDMhp / UDMxa
PEG OUTPUT 5 6 7 8 9
PIN NAME (0)_STATE0 (0)_STATE1 (0)_STATE2 (0)_STATE3 (1)_STATE3
Bit Code
Encoder X Encoder Y
011 Encoder X Phase B Encoder Y Phase A PEG2_STATE0
Phase A Phase B
Encoder Y EncoderY
100 Reserved Encoder Y INDEX PEG2_STATE1
Phase A Phase B
Table A-16. Mapping of Engine Outputs to Physical Outputs (Servo Processor 0) for UDMnt / UDMpa / UDMcb
PEG OUTPUT 0 1
PIN NAME PEG0 PEG1
Bit Code
Table A-17. Mapping of Engine Outputs to Physical Outputs (Servo Processor 0) for UDMlc / UDMsd / UDMmc / UDIlt / UDIhp / PDIcl
PEG OUTPUT 0
PIN NAME PEG0
Bit Code
001 Reserved
010 Reserved
011 Reserved
100 Reserved
101 Reserved
110 Reserved
111 FGP_OUT0
Table A-18. NPMpm / NPMpc Mapping of Engine Outputs to Physical Outputs (Servo Processor 0)
PEG OUTPUT 0 1
PIN NAME PEG0 PEG1
Bit Code
Table A-19. IDMsm / ECMsm / UDMsm Mapping of Engine Outputs to Physical Outputs ( Servo Processor 0, Outputs 0-5)
PEG OUTPUT 0 1 2 3 4 5
PIN NAME OUT_CNFG_0 OUT_CNFG_1 OUT_CNFG_2 OUT_CNFG_3 OUT_CNFG_4 OUT_CNFG_5
Bit Code
Encoder 0 Encoder 0
1000 PEG0_Pulse PEG0_Pulse PEG0_Pulse PEG0_Pulse
Phase A Phase A
PEG OUTPUT 0 1 2 3 4 5
PIN NAME OUT_CNFG_0 OUT_CNFG_1 OUT_CNFG_2 OUT_CNFG_3 OUT_CNFG_4 OUT_CNFG_5
Bit Code
Encoder 1 Encoder 1
1001 PEG1_Pulse PEG1_Pulse PEG1_Pulse PEG1_Pulse
Phase A Phase A
Encoder 2 Encoder 2
1010 PEG2_Pulse PEG2_Pulse PEG2_Pulse PEG2_Pulse
Phase A Phase A
Encoder 0 Encoder 0
1100 Reserved Reserved Reserved Reserved
Phase B Phase B
Encoder 1 Encoder 1
1101 Reserved Reserved Reserved Reserved
Phase B Phase B
Encoder 2 Encoder 2
1110 Reserved Reserved Reserved Reserved
Phase B Phase B
Encoder 3 Encoder 3
1111 Reserved Reserved Reserved Reserved
Phase B Phase B
Table A-20. IDMsm / ECMsm / UDMsm Mapping of Engine Outputs to Physical Outputs ( Servo Processor 0, Outputs 6-11)
PEG OUTPUT 6 7 8 9 10 11
PIN NAME OUT_CNFG_6 OUT_CNFG_7 PEG0 PEG1 PEG2 PEG3
Bit Code
GP_OUT6 GP_OUT7
0111 GP_OUT8 GP_OUT9 GP_OUT10 GP_OUT11
(Default) (Default)
Encoder 0 Encoder 0
1000 PEG0_Pulse PEG0_Pulse PEG0_Pulse PEG0_Pulse
Phase A Phase A
PEG OUTPUT 6 7 8 9 10 11
PIN NAME OUT_CNFG_6 OUT_CNFG_7 PEG0 PEG1 PEG2 PEG3
Bit Code
Encoder 1 Encoder 1
1001 PEG1_Pulse PEG1_Pulse PEG1_Pulse PEG1_Pulse
Phase A Phase A
Encoder 2 Encoder 2
1010 PEG2_Pulse PEG2_Pulse PEG2_Pulse PEG2_Pulse
Phase A Phase A
Encoder 3 Encoder 3
1011 PEG3_Pulse PEG3_Pulse PEG3_Pulse PEG3_Pulse
Phase A Phase A
Encoder 0 Encoder 0
1100 Reserved Reserved Reserved Reserved
Phase B Phase B
Encoder 1 Encoder 1
1101 Reserved Reserved Reserved Reserved
Phase B Phase B
Encoder 2 Encoder 2
1110 Reserved Reserved Reserved Reserved
Phase B Phase B
Encoder 3 Encoder 3
1111 Reserved Reserved Reserved Reserved
Phase B Phase B
Table A-21. ECMsa / IDMsa / UDMsa Mapping of Engine Outputs to Physical Outputs (Servo Processor 0)
PEG OUTPUT 8 9
PIN NAME PEG0 PEG1
Bit Code
PEG OUTPUT 8 9
PIN NAME PEG0 PEG1
Bit Code
Table A-22. ECMma / IDMma / UDMma Mapping of Engine Outputs to Physical Outputs (Servo Processor 0)
PEG OUTPUT
PIN NAME 0 1 2 3 8 9 10 11
OUT0 OUT1 OUT2 OUT3 PEG0 PEG1 PEG2 PEG3
Bit Code
PEG0_ PEG2_
PEG0_ PEG0_ PEG0_ PEG0_ PEG1_Pulse PEG3_Pulse
0000 Pulse Pulse
State0 State1 State2 State3 (Default) (Default)
(Default) (Default)
PEG OUTPUT
PIN NAME 0 1 2 3 8 9 10 11
OUT0 OUT1 OUT2 OUT3 PEG0 PEG1 PEG2 PEG3
Bit Code
PEG OUTPUT
PIN NAME 0 1 2 3 8 9 10 11
OUT0 OUT1 OUT2 OUT3 PEG0 PEG1 PEG2 PEG3
Bit Code
Table A-23. ECMdx / IDMdx / UDMdx Mapping of Engine Outputs to Physical Outputs (Servo Processor 0, Outputs 0-5)
PEG OUTPUT 0 1 2 3 4 5
PIN NAME OUT0 OUT1 OUT2 OUT3 OUT4 OUT5
Bit Code
PEG OUTPUT 0 1 2 3 4 5
PIN NAME OUT0 OUT1 OUT2 OUT3 OUT4 OUT5
Bit Code
Table A-24. ECMdx / IDMdx / UDMdx Mapping of Engine Outputs to Physical Outputs (Servo Processor 0, Outputs 6-11)
PEG OUTPUT 6 7 8 9 10 11
PIN NAME OUT6 OUT7 PEG0 PEG1 PEG2 PEG3
Bit Code
Encoder 0 Encoder 0
1000 PEG0_Pulse PEG0_Pulse PEG0_Pulse PEG0_Pulse
Phase A Phase A
PEG OUTPUT 6 7 8 9 10 11
PIN NAME OUT6 OUT7 PEG0 PEG1 PEG2 PEG3
Bit Code
Encoder 1 Encoder 1
1001 PEG1_Pulse PEG1_Pulse PEG1_Pulse PEG1_Pulse
Phase A Phase A
Encoder 2 Encoder 2
1010 PEG2_Pulse PEG2_Pulse PEG2_Pulse PEG2_Pulse
Phase A Phase A
Encoder 3 Encoder 3
1011 PEG3_Pulse PEG3_Pulse PEG3_Pulse PEG3_Pulse
Phase A Phase A
Encoder 0 Encoder 0
1100 Reserved Reserved Reserved Reserved
Phase B Phase B
Encoder 1 Encoder 1
1101 Reserved Reserved Reserved Reserved
Phase B Phase B
Encoder 2 Encoder 2
1110 Reserved Reserved Reserved Reserved
Phase B Phase B
Encoder 3 Encoder 3
1111 Reserved Reserved Reserved Reserved
Phase B Phase B
00000
X_MARK1 Y_MARK1 Z_MARK1 T_MARK1 - - - -
(default)
Z_MARK1
01101 - - - T_MARK1 X_MARK1 Y_MARK1 -
pin
Example
ASSIGNMARK 1, 1, 0b00010
By using SPiiPlusNT as the first node, entering the command performs the following assignments for these inputs:
> Latching of Encoder 0(X) occurs once Z_MARK1 physical pin gets an input.
> Latching of Encoder 1(Y) occurs once T_MARK1 physical pin gets an input.
> Latching of Encoder 4(Z) occurs once X_MARK1 physical pin gets an input.
> Latching of Encoder 5(T) occurs once Y_sMARK1 physical pin gets an input.
Table A-26. Mark-2 Inputs to Encoders Mapping for SPiiPlusNT / DC-LT / HP / LD
00000
GP IN6 GP IN7 GP IN4 GP IN5 - - - -
(default)
Example
ASSIGNMARK 1, 2, 0b00010
By using SPiiPlusNT as the first node, entering the command performs the following assignments for these inputs:
> Latching of M2ARK of Encoder 0(X) occurs once GP IN4 physical pin gets an input.
> Latching of M2ARK of of Encoder 1(Y) occurs once GP IN5 physical pin gets an input.
> Latching of M2ARK of of Encoder 4(Z) occurs once GP IN6 physical pin gets an input.
> Latching of M2ARK of Encoder 5(T) occurs once GP IN7 physical pin gets an input.
Table A-27. Mark-1 Inputs to Encoders Mapping for with SPiiPlus CMnt / UDMpm-x / UDMpc / CMba / CMxa / UDMba / UDMhp / UDMxa / CMhv /
UDMhv
000 (default) Mark1 of encoder 0(X) pin Mark1 of encoder 1(Y) pin Mark1 of encoder 0(X) pin Mark1 of encoder 1(Y) pin
001 GP IN6 Mark1 of encoder 0(X) pin Mark2 of encoder 0(X) pin Mark1 of encoder 0(X) pin
011 - GP IN6 - -
Example
ASSIGNMARK 1, 1, 0b0001
By using CMxa as the first node, entering the command above performs the following assignments for these inputs:
> Latching of Encoder 0 occurs once IN6 pin (pin 5, J9 connector at CMxa) gets an input.
> Latching of Encoder 1 occurs once X(0)_MARK1+ physical pin (pin 12, J9 connector at CMxa) gets an input.
> Latching of Encoder 2 occurs once X(0)_MARK2+ physical pin (pin 13, J9 connector at CMxa) gets an input.
> Latching of Encoder 3 occurs once X(0)_MARK1+ physical pin (pin 12, J9 connector at CMxa) gets an input.
Table A-28. Mark-2 Inputs to Encoders Mapping for with SPiiPlus CMnt/UDMpm/UDMpc/CMba/CMxa/UDMba/UDMhp/UDMxa/CMhv/UDMhv
Bit code Latching of Mark2 Encoder 0(X) Latching of Mark2 Encoder 1(Y) Latching of Mark2 Encoder 2(A) Latching of Mark2 Encoder 3(B)
000 (default) Mark2 of axis 0(X) pin Mark2 of axis 1(Y) pin GP IN6 GP IN7
001 Mark1 of axis 1(Y) pin Mark1 of axis 1(Y) pin Mark1 of axis 1(Y) pin Mark1 of axis 1(Y) pin
010 Mark2 of axis 1(Y) pin GP IN5 Mark2 of axis 1(Y) pin -
Example
ASSIGNMARK 1, 0b010
By using CMxa as the first node, entering the command above performs the following assignments for these inputs:
> Latching of Encoder 0 occurs once Y(1)_MARK2+ physical pin (pin 15, J9 connector at CMxa) gets an input.
> Latching of Encoder 1 occurs once IN5 pin (pin 23, J9 connector at CMxa) gets an input.
> Latching of Encoder 2 occurs once Y(1)_MARK2+ physical pin (pin 15, J9 connector at CMxa) gets an input.
Latching of Encoder 3(B) Latching of Encoder 2(A) Latching of Encoder 1(Y) Latching of Encoder 0(Y)
Hex Value - 0x AA BB CC DD
The table above allows the user to build a hexadecimal value for the inputs_to_encoder_bit_ code argument:
ASSIGNMARK axis, type, 0XAABBCCDD
Where AA is the code for encoder 3, BB is the code for encoder 2, CC is the code for encoder 1, and DD is the code for encoder 0.
Example 1 (default case)
ASSIGNMARK 1, 1, 0x03020100
By using UDMsm as the first node, entering the command above performs the following assignments for these inputs:
> Latching of Encoder 0 occurs once MARK0 physical pin (pin 16, J11 connector) gets an input.
> Latching of Encoder 1 occurs once MARK1 physical pin (pin 17, J11 connector) gets an input.
> Latching of Encoder 2 occurs once MARK2 physical pin (pin 18, J11 connector) gets an input.
> Latching of Encoder 3 occurs once MARK3 physical pin (pin 19, J11 connector) gets an input.
Example 2
ASSIGNMARK 1, 1, 0x03010102
By using UDMsm as the first node, entering the command above performs the following assignments for these inputs:
> Latching of Encoder 0 occurs once MARK2 physical pin (pin 18, J11 connector) gets an input.
> Latching of Encoder 1 occurs once MARK1 physical pin (pin 17, J11 connector) gets an input.
> Latching of Encoder 2 occurs once MARK1 physical pin (pin 17, J11 connector) gets an input.
> Latching of Encoder 3 occurs once MARK3 physical pin (pin 19, J11 connector) gets an input.