Manual for POSYS® Motion Controllers

Manual for POSYS® Motion Controllers
Motion Controller for
PCI-Bus and
PC/104 Embedded Systems
and
Standalone Operation
User's Guide and Programmer's Manual
for
POSYS® 8xx-B/9xx/18xx/19xx
POSYS Motion Control GmbH & Co.KG
Schulstr. 8 • D-92256 Hahnbach
Telefon +49 9664 9546520 • Fax +49 9664 9546521
E-mail: [email protected]
Url: www.halbeck.com
© POSYS Motion Control GmbH & Co.KG, 2013
© POSYS Motion Control GmbH & Co.KG, 2013
Table of Contents
User's Manual
Imprint
Disclaimer, Safety Notice, Warranty
Introduction POSYS® 18xx/19xx
Introduction POSYS® 7xx/8xx-B/9xx
System Overview
Models
Changes to previous manuals
Hardware
Hardware & Driver Installation
Hardware & Driver Installation: WinDriver
Hardware & Driver Installation: Rapid Driver
POSYS® Versions Specifications
POSYS® 8xx-B
Versions 8xx-B
User settable components; POSYS® 8xx-B
Serial Port
Brushed Servo Mode Pinout Description
Stepper Version Pinout Description
Analog Input Pinout Description; POSYS® 8xx-B
POSYS® 18xx
Versions 18xx
User settable components; POSYS® 18xx
SYNC IO
Serial Port
CAN 2.0B
Motor Mode Configuration; POSYS® 18xx
Brushed Servo Mode Pinout Description
Brushless Servo/Microstepping Mode Pinout Description
Stepper Mode Pinout Description
Analog Input Pinout Description; POSYS® 1800
Usage of the On-Board Dual Port RAM with POSYS® 1800
POSYS® 9xx
Versions 9xx
User settable components; POSYS® 9xx
Serial Port
Brushed Servo Mode Pinout Description
Stepper Version Pinout Description
Analog Input Pinout Description; POSYS® 900
POSYS® 19xx
Versions 19xx
User settable components; POSYS® 19xx
SYNC IO
Serial Port
CAN 2.0B
Motor Mode Configuration; POSYS® 19xx
Brushed Servo Mode Pinout Description
Brushless Servo/Microstepping Mode Version Pinout Description
Stepper Mode Pinout Description
Analog Input Pinout Description; POSYS® 1900
GP CON Connector
GP CON Connector
Interconnect Module
IO700/800-1
IO700/800-2
OPTON CON
Connection Overview - Amplifiers
2
10
11
12
13
14
15
16
21
25
26
27
30
32
33
33
33
36
37
38
40
41
41
41
46
46
47
47
48
50
53
55
55
60
60
60
62
63
64
66
68
68
68
70
70
71
71
72
73
76
78
79
79
80
80
83
86
89
© POSYS Motion Control GmbH & Co.KG, 2013
Overview; Connection Summary - Motor Amplifiers
POSYS® 8xx-B/18xx
POSYS® 9xx/19xx; Connections Summary - Motor Amplifiers
Usability
Control Modules for POSYS® 1800/1900 with Firmware Version >2.0
Control Flow Overview
Enabling and Disabling Control Modules
Disabling and Enabling the Position Loop Module
Reading Position Loop Values
Trajectory Generation
Trajectories, Profiles and Parameters
Trajectory Parameter Representation
Trajectory Point-to-Point Profile
Smoothing Factor
S-curve Point-to-Point Profile
Velocity Contouring Profile
Electronic Gear Profile
External Profile Mode
SetStop Command
Motor Mode
Setting the Cycle Time
Parameter Update
Parameter Buffering
Breakpoints
Breakpoints
Defining a Breakpoint; Overview
Breakpoint Triggers
Breakpoint Actions
Breakpoint Examples
The Servo Loop
Overview; Servo Loop
PID Loop Algorithm
Dual Encoder Support
BiQuad Output Filter
Output Limit
Motor Bias
Closed Loop and Open Loop Control Modes
Piezo (Ceramic) Motor Functions
Status Register
Overview; Status Registers
Event Status Register
Instruction Error
Activity Status Register
Signal Status Register
Signal Sense Mask
Monitoring Motion Performance
Host Interrupts
In-Motion Indicator
Motion Error
Motion Complete Indicator
Settled Indicator
Trace Capture
Tracking Window
SetEventAction Processing
Hardware Signals
Overview; Hardware Signals
Travel Limit Switches
AxisOut Output
AxisIn Input
Analog Input
The SYNC IO - Multiple Controller Synchronization
3
89
89
91
94
95
96
97
98
99
100
100
100
101
103
107
109
110
111
113
114
114
116
116
118
118
118
118
119
120
122
122
122
124
125
128
129
129
131
134
134
134
135
135
136
137
138
138
139
139
140
141
142
147
148
150
150
150
151
151
152
152
© POSYS Motion Control GmbH & Co.KG, 2013
Motor Interfacing
Overview; Motor Interfacing
Incremental Encoder Input
Actual Position Register
Digital Filtering
High Speed Position Capture
Parallel-word Position Input (option)
Multi-Turn Systems
Parallel-word Device Interfacing
Parallel Device I/O
Peripheral Device Read
Peripheral Device Write
Motor Command Output
Sign/Magnitude PWM
50/50 PWM Motor Command Output
16 Bit DAC Motor Command Output
Host Communication
Overview; Host Communication
Parallel Communication Port
Serial Interface
Controller Area Network CAN2.0B
Configuring the CAN 2.0B Interface
CAN Event Notification
Electrical Diagrams for CAN Interface
Using On-Board Memory
Memory Configuration
Memory Page Pointer
On-Board Memory Signal Decoding
On-Board Memory Read
On-Board Memory Write
On-Board Memory Buffer
External Memory Commands
Sinusoidal Commutation
Overview; Sinusoidal Commutation
Selecting Single Phase Output for the POSYS®
Commutation Waveforms
Commutation Parameters
Index Pulse Referencing
Commutation Error Detection
Phase Initialization
Phase Initialization Programming
Adjusting the Commutation Angle
Encoder Pre-Scalar
Motor Output Configuration
Open Loop Stepper Control
Overview; Open Loop Stepper Control
Trajectory Control Units
Encoder Feedback
Stall Detection
Pulse & Direction Signal Generation
Pulse Generation Control
AtRest Indicator
Microstep Sine/Cosine Motor Command Output
DAC & PWM Motor Output (POSYS® Microstepping Mode only)
Motor Output Signal Interpretation
PMW Decoding
Microstepping Waveform Generation
Microstepping Waveforms
Motor Command Control
AC Induction Motor Control
Command Summary
4
154
154
154
154
155
155
155
156
156
158
160
162
163
164
165
165
167
167
167
167
171
172
172
173
174
174
174
175
175
175
176
176
178
178
178
179
180
180
181
181
184
185
186
186
189
189
189
189
190
191
192
192
193
193
193
193
194
195
195
196
196
© POSYS Motion Control GmbH & Co.KG, 2013
Motor Drive Configurations
Programmer's Manual
How to use this manual
Commands
List of available commands
Card Initializing and Addressing
InitializePOSYS
OpenDevice/CloseDevice
DetectPosysDevices
RegisteredPosysDevices
Breakpoints und Interrupts
ClearInterrupt
GetInterruptAxis
Set/GetBreakpoint
Set/GetBreakpointUpdateMask
Set/GetBreakpointValue
Set/GetInterruptMask
Commutation
GetPhaseCommand
InitializePhase
Set/GetCommutationMode
Set/GetNumberPhases
Set/GetPhaseAngle
Set/GetPhaseCorrectionMode
Set/GetPhaseCounts
Set/GetPhaseInitializeMode
Set/GetPhaseInitializeTime
Set/GetPhaseOffset
Set/GetPhasePrescale
Digital Servo Filter
ClearPositionError
DACOutputs
GetAmpEnable
GetDerivative
GetIntegral
GetPositionError
GetPositionLoopValue
SetAmpDisable
SetAmpEnable
Set/GetAutoStopMode
Set/GetAuxiliaryEncoderSource
Set/GetBiQuadCoefficient
Set/GetDerivativeTime
Set/GetIntegrationLimit
Set/GetKaff
Set/GetKd
Set/GetKi
Set/GetKout
Set/GetKp
Set/GetKvff
Set/GetMotorLimit
Set/GetPositionErrorLimit
Set/GetPositionLoop
Set/GetProfileKp
Special Piezo Motor Functions
Set/GetpzIntLim
Set/GetpzIntLimStl
Set/GetpzKaff
Set/GetpzKd
Set/GetpzKdPeriod
Set/GetpzKi
197
199
199
200
201
205
206
207
209
210
211
211
212
213
215
216
218
219
219
220
221
222
223
224
225
226
227
228
229
230
230
231
232
233
234
235
236
237
238
239
240
241
243
244
245
246
247
248
249
250
251
252
253
256
257
258
259
260
261
262
263
5
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetpzKp
Set/GetpzKvff
Set/GetpzKvff2
Set/GetpzOffsetNeg
Set/GetpzOffsetPos
Set/GetpzWindow
Set/GetpzWindow2
Encoder
AdjustActualPosition
GetAbsoluteSSIPosition
GetActualVelocity
GetCaptureValue
GetSSIVersion
Read/WriteSSIFrequency
Read/WriteSSIRegister
Read/WriteSSIResolution
ResetSSI
SetActualToAbsolutePosition
Set/GetActualPosition
Set/GetActualPositionUnits
Set/GetCaptureSource
Set/GetEncoderModulus
Set/GetEncoderSource
Set/GetEncoderToStepRatio
On-Board RAM
DisableDPRam
EnableDPRam
ReadBuffer
ReadDPRamLong
Set/GetBufferFunction
Set/GetBufferLength
Set/GetBufferReadIndex
Set/GetBufferStart
Set/GetBufferWriteIndex
WriteBuffer
WriteDPRAMLong
Motor Output
GetActiveMotorCommand
GetCurrentMotorCommand
Set/GetHoldingCurrent
Set/GetMotorBias
Set/GetMotorCommand
Set/GetMotorMode
Set/GetMotorType
Set/GetOutputMode
Set/GetPWMFrequency
Set/GetStepRange
Operating Mode, Event und Update Control
GetActiveOperatingMode
MultiUpdate
RestoreOperatingMode
Set/GetEventAction
Set/GetOperatingMode
Set/GetUpdateMask
Update
Profile Generation
GetCommandedAcceleration
GetCommandedPosition
GetCommandedVelocity
Set/GetAcceleration
Set/GetDeceleration
6
264
265
266
267
267
269
270
271
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
289
291
292
293
294
295
296
297
298
299
300
300
302
303
304
305
306
307
308
309
310
311
312
313
314
315
317
318
319
319
320
321
322
323
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetGearMaster
Set/GetGearRatio
Set/GetJerk
Set/GetPosition
Set/GetProfileMode
Set/GetStartVelocity
Set/GetStopMode
Set/GetVelocity
Servo Loop Control
GetTime
Set/GetAxisMode
Set/GetLimitSwitchMode
Set/GetMotionCompleteMode
Set/GetSampleTime
Set/GetSettleTime
Set/GetSettleWindow
Set/GetTrackingWindow
Status Register and AxisOut Indicator
GetActivityStatus
GetAxis_In_Out_Home
GetDriveStatus
GetEventStatus
GetSignalStatus
ResetEventStatus
Set/GetAxisOutMask
Set/GetAxisOutSource
Set/GetSignalSense
Traces
GetTraceCount
GetTraceStatus
Set/GetTraceMode
Set/GetTracePeriod
Set/GetTraceStart
Set/GetTraceStop
Set/GetTraceVariable
Miscellaneous
GetChecksum
GetHostIOError
GetProcessorStatus
GetVersion
HardReset/MCReset
NoOperation
PortInOutW
ReadAnalog
ReadIO
ReadPLD
Set/GetCANMode
Set/GetDiagnosticPortMode
Set/GetSerialPortMode
Set/GetSynchronizationMode
SetWatchDog
WriteIO
Additional MotionScript® Functions
BitReset
BitSet
BitTest
CompareActivity
CompareEvent
CompareSignal
Command Overview - ReadIO/WriteIO
ReadIO / WriteIO
324
325
326
327
328
329
330
331
332
332
333
334
335
336
338
339
340
341
341
343
344
345
346
347
348
350
352
353
353
354
355
356
357
359
361
363
363
364
365
366
367
370
371
372
373
374
375
376
377
378
379
380
381
381
382
383
384
385
386
387
387
7
© POSYS Motion Control GmbH & Co.KG, 2013
Application Notes
Extension Port Connector J6 (POSYS® 700, ISA-Bus)
Stall Detection
Coordinated Motion with POSYS® Contouring Library
Coordinated Moves using POSYS® 900 Motion Controller
Digital IO Specification POSYS® 7xx/8xx/8xx-B/9xx
Digital Inputs & Outputs
Breakpoints
Error Code
On-Board RAM
Limit Switches
Microstep Mode Setup
Mixed Motor Mode
Multiple Cards
PCI ScanForPOSYS
Programmer's Info
Resistor Networks for TTL or Inverted Encoder Signals
Serial Interface
Status Read Operation
Synchronization of Multple Cards (POSYS® 8xx-B/9xx w/ Sync-Feature and
18xx/19xx)
Velocity, Acceleration and Jerk Calculation
MotionScript®
Overview; MotionScript®
POSYSDriverXSetup
Program Use
Examples
Variables
Reserved Words
MotionScript® Utility Functions
Other MotionScript® Functions
Loop Instructions
Writing MotionScript® Functions
POSYS® Functions and Procedures
POSYS® GUI for Windows 98/ME/2000/XP
Introduction
The POSYS® GUI Main Window
Initialization
Description of further Program Functions
Controller Status Box
Power-On Defaults Box
Motor Output Mode Box
Filter Parameter Box
Amplifier Enable and DACOutputs ON/OFF
Output Torque Box
Update Periods Box
Status Activity/Event/Signal
Signal Sense
Enter Data Box
Commanded and Actual Position Box
SSI Feedback
Analog Inputs
Single Port RAM / Dual Port RAM
Trace Mode
Setup Menu for Sinusoidal Commutation and Microstepping Mode
8
389
389
390
391
395
396
397
399
403
405
408
411
413
414
416
421
430
431
433
435
437
439
439
440
442
443
445
446
447
447
449
450
451
457
457
458
459
460
460
461
461
462
463
464
464
464
465
466
467
468
469
471
471
474
© POSYS Motion Control GmbH & Co.KG, 2013
9
© POSYS Motion Control GmbH & Co.KG, 2013
User's Manual
10
© POSYS Motion Control GmbH & Co.KG, 2013
Imprint
Manual
for
POSYS® Motion Controller
Series 800-B/900/1800/1900
POSYS Motion Control GmbH & Co.KG
Schulstr. 8
D-92256 Hahnbach
Tel: +49 9664 9546520
Fax: +49 9664 9546521
E-mail: [email protected]
Url: http://www.halbeck.com
Managing Director: Thomas Halbeck
HRA: 3227 Amtsgericht Amberg
Revision: 7.3
Datum: 19.06.2013
-o-
11
© POSYS Motion Control GmbH & Co.KG, 2013
Disclaimer, Safety Notice, Warranty
Warranty
POSYS Motion Control warrants performance to its products to the specifications applicable at the time of sale in
accordance with POSYS Motion Control´s standard warranty. Testing and other quality control techniques are utilized to the
extent POSYS Motion Control deems necessary to support this warranty. Specific testing of all parameters of each device is
not necessarily performed, except those mandated by government requirements.
POSYS Motion Control reserves the right to make changes to its products or to discontinue any product or service without
notice, and advises customers to obtain the latest version of relevant information to verify, before placing orders, that
information being relied on is current and complete. All products sold are subject to the terms and conditions of sale
supplied at the time of order acknowledgment, including those pertaining to warranty, patent infringement and limitation of
liability.
Safety Notice
C ertain applications using semiconductor products may involve potential risks of death, personal injury or severe property
or environmental damage. Products are not designed, authorized or warranted to be suitable for use in life support devices
or systems or other critical applications. Inclusion of POSYS Motion Control products in such applications is understood to
be fully at the customer's risk.
In order to minimize risks associated with the customer's applications, adequate design and operating safeguards must be
provided by the customer to minimize inherent procedural hazards.
Disclaimer
POSYS Motion Control assumes no liability for applications assistance or customer product design. servo-Halbeck does not
warrant or represent that any license, either express or implified, is granted under any patent right, copyright, mask work
right or other intellectual property right of POSYS Motion Control covering or relating to any combination, machine or
process in which such products or services might be or are used. POSYS Motion C ontrol's publication of information
regarding any third party's products or services does not constitute POSYS Motion Control's approval, warranty or
endorsement thereof.
-o-
12
© POSYS Motion Control GmbH & Co.KG, 2013
Introduction POSYS® 18xx/19xx
Introduction POSYS® 18xx/19xx
The POSYS® 18xx/19xx series are advanced motion control systems for brushed and brushless motors, hydraulics and
microstepping and stepper motors. The half-size PCI-Bus (POSYS® 19xx) card plug directly into an empty slot of an
IBM-PC or compatible computer and the POSYS® 18xx are fully compliant (100%) PC/104 embedded systems modules.
Each card is available in typical configurations for 1, 2, 3 or 4 axes for servo and stepper motors (mixed usage or
customized configuration). The use of a DSP in conjunction with an ASIC provides excellent motion control with an
unsurpassed 16-bit DAC motor command, 10-bit PWM, or pulse and direction output. There are 16 uncommitted
input/outputs in addition to the dedicated inputs (± limit switches with a digital noise filter and high speed latch inputs for
each axis). Programmable timers could also be used as counters. A digital PID or PI filter with KP, KL, KD, Kvff and IL and
the wide 16-bits programming range are additional reasons for this controller´s superior performance. Another
performance plus is the high 5 e.g. 10 MHz incremental or 160 MHz absolute encoder input frequency and the 51.2 µs to
76.8 µs sample rate per axis (depends on # of axes on card).
The POSYS® series were designed for great flexibility at an affordable price in order to provide answers to complex motion
problems and control peripheral equipment using the digital and analog inputs and the programmable outputs. The
dedicated outputs for in-position, motion error and amplifier-enable signal to the outside world the actual status of each
axis. Software compatibility is guaranteed through all versions (except where noticed).
The POSYS® controller is designed for complex motion control applications involving jogging, point-to-point positioning,
vector positioning, electronic gearing and multiple move sequences. S-curve profiling eliminates jerk; this is especially
useful when moving heavy inertia loads. PMD's Pro-Motion software with a multitude of graphic displays on a PC and hard
copy printouts of step responses make it easy for the user to determine the optimum filter parameters for almost any load
and system condition. Using PMD's Pro-Motion software lets the user find the right filter by observing the servo systems
response on the computer's monitor.
-o-
13
© POSYS Motion Control GmbH & Co.KG, 2013
Introduction POSYS® 7xx/8xx-B/9xx
Introduction
The POSYS® 7xx/8xx-B/9xx series is an advanced motion control system for brush and brushless motors, hydraulics or
stepper motors. The half-size ISA-Bus (POSYS® 7xx) and PC I-Bus (POSYS® 9xx) card plug directly into an empty slot of
an IBM-PC or compatible computer and the POSYS® 8xx-B is a fully compliant (100%) PC/104 embedded systems module.
Each card is available in typical configurations for 2 or 4 axes for servo or stepper motors. The use of a DSP in conjunction
with an ASIC provides excellent motion control with an unsurpassed 16-bit DAC motor command, 10-bit PWM, or pulse and
direction output. There are 16 uncommitted input/outputs in addition to the dedicated inputs (± limit switches with a digital
noise filter and high speed latch inputs for each axis). Programmable timers could also be used as counters. A digital PID
or PI filter with KP, KL, KD, Kvff and IL and the wide 16-bits programming range are additional reasons for this controller`s
superior performance. Another performance plus is the high 5 MHz incremental or 160 MHz absolute encoder input
frequency and the 100 or 150 µsec sample rate per axis.
The POSYS® 7xx/8xx-B/9xx series were designed for great flexibility at an affordable price in order to provide answers to
complex motion problems and control peripheral equipment using the digital and analog inputs and the programmable
outputs. The dedicated outputs for in-position, motion error and amplifier-enable signal to the outside world the actual
status of each axis. Software compatibility is guaranteed through all versions (except where noticed).
The POSYS® controller is designed for complex motion control applications involving jogging, point-to-point positioning,
vector positioning, electronic gearing and multiple move sequences. S-curve profiling eliminates jerk; this is especially
useful when moving heavy inertia loads. PMD's Pro-Motion software with a multitude of graphic displays on a PC and hard
copy printouts of step responses make it easy for the user to determine the optimum filter parameters for almost any load
and system condition. Using PMD's Pro-Motion software lets the user find the right filter by observing the servo systems
response on the computer's monitor.
-o-
14
© POSYS Motion Control GmbH & Co.KG, 2013
System Overview
System Overview
Each axis inputs the actual location of the axis using either incremental encoder signals or a parallel-word input device such
as an absolute encoder, analog to digital converter, resolver, or laser interferometer. If incremental signals are used, the
incoming A and B quadrature data stream is digitally filtered, and then passed on to a high-speed up/down counter. Using
the parallel-word interface, a direct binary-encoded position of up to 16 bits is read by the POSYS®. Regardless of the
encoder input method, this position information is then used to maintain a 32-bit actual axis position counter.
The trajectory generator calculates a new desired position at each cycle time interval, based on the profile modes, and
profile parameters programmed by the host, as well as the current state of the system. The cycle time is the rate at which
major system parameters are updated such as trajectory, servo compensation (if using axes of the POSYS® in servo
mode), and some other functions. For the servo control the output of the trajectory generator is combined with the actual
encoder position to calculate a 32-bit position error, which is passed through a PID filter. The resultant value is then output
by the POSYS® to an external amplifier using either PWM or DAC signals.
For the stepping motor the output of the trajectory generator is converted to pulse and direction signals and then output
accordingly.
C ommunication to/from the POSYS® motion controllers is accomplished using a parallel-bus microprocessor-style
interface, an asynchronous serial port or a CAN 2.0B interface (only POSYS 18xx/19xx). If parallel-bus interface is used
there is a further choice of 8-bit wide transfers or 16-bit wide transfers. If serial communication are used then the user
selects parameters such as baud rate, number of stop/start bits, and the transfer protocol. The transfer protocol can be
either point-to-point or multi-drop. For CAN communications the user selects the desired CAN data bus rate and the CAN
node address.
C ommunication to/from the POSYS® occurs using short commands sent or received as a sequence of bytes and words.
These packets contain an instruction code word that tells the POSYS® what operation is being requested. It might also
contain data sent to the motion processor, or data received from the motion processor.
These commands are sent by a host microprocessor or host computer that executes a supervisor program, thereby
providing overall system control. The POSYS® is designed to function as the motion engine, managing high speed
dedicated motion functions such as trajectory generation, safety monitoring, etc. while the host software program provides
the overall motion sequences.
Other major functions of the POSYS® include:
Breakpoints
Breakpoints allow various signals, parameters, or conditions to be monitored and compared against a setpoint condition
value. Breakpoints can be programmed to automatically adjust the POSYS® behavior when the condition is satisfied. This
is useful for functions such as "change the trajectory velocity when a signal goes high".
Diagnostic parameter capture
Diagnostic parameter capture allows up to four POSYS® parameters to be stored automatically into an on-board RAM chip
for later examination by the host. This facility makes it easy to generate very accurate graphs of servo performance,
trajectory information, etc., without any real time data collection involvement by the host.
Motion error, tracking window, and settle window
These functions perform automatic monitoring of the position error (the difference between the desired position and the
actual encoder position). They are useful for performing functions such as "stop the axis if a particular position error value
is exceeded" or "define the motion as being complete when the axis is within a programmed position error for a
programmed amount of time".
Limit switch
Allows the axis to be automatically stopped if the motion travel is beyond the legal range.
Other POSYS® features include analog signal input, software invertible digital signals, and user -defined I/O decoding, to
name a few.
In the following sections each of these POSYS® functions will be discussed and explained. Most POSYS® functions are
common across all motor types. However, some sections of this manual describe features that apply to particular motor
characteristics only (servo (brushed or brushless) or stepper motors). For example, servo filtering applies to the POSYS®
axes working in servo mode only. If this is the case then these sections will be clearly marked as such.
-o-
15
© POSYS Motion Control GmbH & Co.KG, 2013
Models
Models equipped with PMD Magellan Chip Set
Bus
PCI
# axes/motor
Multiple Motor Motion
Control Card
individually adjustable for
servo motors (incl. internal
commutation for
DC-brushless),
microstepping and stepper
motors
Multiple Motor Motion
Control Card
individually adjustable for
servo motors (w/o internal
commutation), and stepper
motors
OBSOLETE!
Stepper Motor Card
2
1922
1902 (obsolete)
1952
4
1924
1904 (obsolete)
1954
Multiple Motor Motion
Control Card
individually adjustable for
servo motors (incl. internal
commutation for
DC-brushless),
microstepping and stepper
motors
Multiple Motor Motion
Control Card
individually adjustable for
servo motors (w/o internal
commutation), and stepper
motors
OBSOLETE!
Stepper Motor Card
2
1822
1802 (obsolete)
1852
4
1824
1804 (obsolete)
1854
Bus
PC/104
# axes/motor
Models equipped with PMD Navigator Chip Set*
Bus
ISA
PC/104
# axes/Motor
Brushed
Servo
(only on
request)
Stepper
(only on
request)
Brushed
Servo
Brushless
Servo
w/ brushless
drive
Stepper
Combination of
Brushed and
Brushless Servo
and
microstepping
w/wo SYNC IO
OBSOLETE!
2
702
752
802-B
802-B
852-B
872/882 (obsolete)
4
704
754
804-B
804-B
854-B
874/884 (obsolete)
Bus
PCI
# axes/Motor
Brushed
Servo
Brushless
Servo w/ brushless
drives
Stepper
Combination of Brushed
and Brushless Servo and
microstepping
w/wo SYNC IO
OBSOLETE!
2
902
902
952
972/982 (obsolete)
4
904
904
954
974/984 (obsolete)
*POSYS® 7xx/8xx/8xx-B/9xx/180x/185x/190x/195x
-Versions for Brushed Servo can be used with brushless motors when using appropriate type of amplifiers (with Hall Sensor
Inputs for commutation)
-Versions for Stepper Motors can be used with microstepping drivers that take the pulse & direction signal.
Multiple Motor Motion Control Cards
Multiple Motor Motion Control Cards are defined to work with following motor types, individually configurable per axis:
16
© POSYS Motion Control GmbH & Co.KG, 2013
Motor Command Signal
Description
DAC
±10V analog command signal for brushed and/or brushless servo motors with
external commutation, or 2- and 3-phase brushless servo motors with on-board
commutation
PWM
PWM sign/magnitude Signal for brushed and brushless servo motors with
external commutation, or 2- and 3-phase brushless servo motors with on-board
commutation
Pulse & Direction
Pulse & Direction for stepper motors (only Magellan equipped versions)
Microstepping
PWM or DAC command output on 2 phases for microstepping motors
Each axis is individually configurable for use with one of the following motor types:
Standard Servo Motor with ±10 Volt Command Signal or PWM (sign/magnitude or
50/50)
The POSYS® achieve superior precision through use of a ±10-Volt, 16-bit motor command output DAC and a
sophisticated, scalable PID filter that features velocity and acceleration feedforward and BIAS, also integration limit,
settable derivative sampling time and output motor command limiting.
This configuration is also used to drive brushless servo motors if the electrical commutation is accomplished externally
(e.g. brushless amplifier).
The standard configuration is for use with ±10 Volt 16-bit command output for servo motors. How to configure the various
axes for use with one of the following motor types is described in the Programmer's Reference Manual.
This type of controller can also be used to drive DC Brushless servo motors so far you are using amplifiers which offer the
ability of internally generating the required commutation signals for the motors. This feature is available on the POSYS®
70x/80x-B/90x/182x/192x.
Brushless Servo Motor with ±10 Volt Command Signal or PWM (sign/magnitude or
50/50)
The difference to the standard servo motor configuration is that the user needs an amplifier that generates a sinusoidal
commutation signal. The new POSYS® PCI-Bus and PC/104 controller are now available with commutation on-board as a
standard feature. This feature is only available for the versions POSYS® 182x/192x.
Stepper Motor with Step and Direction Signals
The POSYS® can control stepper motors. In this mode, the controller provides two signals to connect to the stepper
motor: Step and Direction. For stepper motor operation, the controller does not require an encoder, although the controller
provides encoder feedback monitoring as a standard feature, and operates in open loop mode. The max. output frequency
is 4,98 MHz. The axis of the POSYS® being run in stepper mode provide the same features as the axis of the POSYS®
being run in servo mode, but without PID filter capabilities and the SYNC-function is deactivated. This feature is available
for the versions POSYS® 75x/85x-B/95x/18xx/19xx.
Microstepping with 90°/120° Shifted Signal Output for 2- and 3-Phase Stepping Motors
The POSYS® supports 2- and 3-phase stepping motors, providing a programmable microstepping rate from 1 to 256
microsteps per full step and outputs a PWM or DAC-compatible motor command signal to directly drive the windings of a
stepping motor. This feature is only available for the versions POSYS® 182x/192x.
Stepper Motor Card
Motor Command Signal
Description
Pulse & Direction
Pulse & Direction signal for stepper motors
The stepper motor card is a cost-reduced version of the multiple motor motion controller card and is designed for
cost-sensitive applications where only stepper motors are required. The usage of microstepping drivers allows precise
driving of stepper motors with this low-cost but high-end and high-functioned stepper motor controller card. This featuer is
available on the following models: POSYS® 75x/85x-B/95x/18xx/19xx.
Customized Cards
C ustomization of the Multiple Motor Motion Controller Card is possible to accomplish customer´s needs for a high-end
17
© POSYS Motion Control GmbH & Co.KG, 2013
product, but at lower cost. If desired it is possible to customize the card to work on and fit into any system. Applications
where for example 2 stepper motors and 2 brushed servo motors are needed, the multiple motor motion controller card
can be pre-configured for use with only these type of motors. Not needed components on the card help reduce costs and
help you save money. If you wish more information, then please contact us directly.
Features
The following table shows the main differences between the two versions of the Multiple Motor Motion Controller Card
POSYS® 180x/190x standard motion controller, the POSYS® 182x/192x with internal commutation for DC-Brushless servo
motors and direct microstepping output and the Stepper Motor Controller Card POSYS® 185x/195x:
Specification
POSYS® 182x/192x
POSYS® 180x/190x
POSYS® 185x/195x
# of axes
2, 4
2, 4
2, 4
Supported motor versions
Servo (incl. internal
commutation for
DC brushless),
Microstepping,
Pulse & Direction
Servo (w/o internal
commutation for
DC brushless),
Pulse & Direction
Pulse & Direction
Output format
PWM,
DAC ,
Pulse & Direction
PWM,
DAC ,
Pulse & Direction
Pulse & Direction
Parallel communication
+
+
+
Serial communication
+
+
+
C AN 2.0B communication
+
+
+
Incremental encoder input
+
+
+
Parallel word device input
+
+
+
Index & Home input
+
+
+
Position capture
+
+
+
Directional limit switches
+
+
+
PWM output
+
+
Parallel DAC output
+
+
Pulse & Direction output
+
+
+
Trapezoidal profiling
+
+
+
Velocity profiling
+
+
+
S-curve profiling
+
+
+
Electronic Gearing
+
+
+
On-the-Fly changes of position,
acceleration, speed, PID filter
parameters
+
+
PID servo control
+
+
Dual encoder loop
+
+
Derivative sampling time
+
+
Feedforward (accel. and vel.)
+
+
Dual Bi-Quad output filter
+
+
Data trace / Diagnostic
+
+
+
Profile-Upload
+
+
+
Motion error detection
+
+
+
(requires encoder)
Axis settled indicator
+
+
+
(requires encoder)
Analog input (8x)
+
+
+
Programmable bit output
+
+
+
Software-invertible signals
+
+
+
User-defined I/O
+
+
+
On-board RAM support
+
+
+
18
© POSYS Motion Control GmbH & Co.KG, 2013
Specification
POSYS® 182x/192x
POSYS® 180x/190x
(single port RAM = option;
dual port RAM = default)
(single port RAM = default; (single port RAM =
dual port RAM = option)
default;
dual port RAM = option)
POSYS® 185x/195x
Multiple card synchronization
support
+
+
(except if axis is being used (except if axis is being used
in stepper mode)
in stepper mode)
Watchdog Timer
+
+
+
Interrupt
+
+
+
POSYS 7xx/8xx-B/9xx
Available configurations (ISA, PC /104, PC I; 4 Axes:
Servo or Stepper)
ISA:
704, 754 (on request only)
PC /104:
804-B, 854-B
PC I:
904, 954
2 Axes (on request only; minimum order amount required):
ISA:
702, 752
PC /104:
802-B, 852-B
PC I:
902, 952
Operation modes
C losed loop (torque demand control; PID controlled)
Open loop (user-specified, programmable register)
C ommunication modes
16/16 parallel (16 bit external parallel bus with 16 bit internal command
word size)
Position range
-2,147,483,648 to +2,147,483,647 counts
Velocity range
-32,768 to +32,767 counts/sample with a resolution of 1/65,536
counts/sample
Acceleration/deceleration range (positive and -32,768 to +32,767 counts/sample² with a resolution of 1/65,536
negative)
counts/sample²
Jerk range
0 to ½ counts/sample³, with a resolution of 1/4,294,967,296
counts/sample³
Profile modes
S-curve point-to-pointramp (velocity, acceleration/deceleration,
Smoothing and position parameters); change of parameters "on-the-fly"
not possible in this mode
Trapezoidal point-to-point
ramp (velocity, acceleration/deceleration,
position and PID parameters); all parameters "on-the-fly" changeable
during motion
Electronic Gear(actual or commanded positioning selectable to move
one or more axes with upto ±16 bit resolution. (Master and Slave Axes
and Gear Ratio parameters)
External Profile Mode:allows the usage of profile data previously
generated by the host computer to be saved in the controller's memory.
Therefore low host intervention for highly complex profile movements.
This memory can be used in parallel for gathering data for diagnostic,
maintenance and to optimize performance.
OPTION: Trapezoidal point-to-point ramp with Smoothing Factor
("on-the-fly" changes of all parameters possible and s-curve similar
profiling)
Electronic Gear range
-32,768 to +32,767 with a resolution of 1/65,536 (negative and positive
direction)
Filter modes
Scalable PID (not for stepper motor versions) + Velocity feedforward +
Acceleration feedforward + Bias. Integrationlimit, adjustable Derivative
Sampling Time and limitated torque demand output
Filter parameter resolution
16 Bit (Servo)
Motion error detection
Motion Error (32-Bit) can cause automatic (with abrupt stop or stop with
ramp) stop or can be ignored.
Tracking Window (allows setting of flags if an axis exceeds a defined
programmed positioning window for a defined time after end of motion
Output signals
Servo:
Stepper:
DAC (16 Bit) ±10V output
PWM (10 Bit Resolution @ 20 Khz)
Pulse & Direction
Max. Encoder rate
Incremental (up to 4,98 Mhz.)
Servo loop update rate
100 µsec nominal (exact time is 102,4 µsec) per activated Axis (Servo
versions)
19
© POSYS Motion Control GmbH & Co.KG, 2013
150 µsec. nominal (exact time is 153.6 µsec.) per activated Axis (Stepper
versions)
Limit Switches
2 per Axis: 1 for each direction
Position C apture Triggers
2 per Axis: Index and Home
Other digital signals (per axis)
1 AxisIn Signal per Axis, 1 AxisOut Signal per Axis
Software invertable signals
Encoder A/A, Encoder B/B¯, Index I/I¯, Home, AxisIn, AxisOut,
PositiveLimit, NegativeLimit (all individually programmable per Axis)
Analog input
8 x 10-Bit analog inputs
Trace Modes
once
continuously
Max. # of Trace variables usable at the same 4
time
Number of available Trace variables
27
Number of commands
118-168 (dependant on motor type and card version)
I/Os
8 digital inputs / TTL, active low
8 digital outputs / TTL, active low
8 analog inputs
special profile combinations
Trapezoidal mode with Electronic Gearing
S-curve mode with Electronic Gearing
OPTION: Trapezoidal with Electronic Gearing and Smoothing Factor
(eliminates overshooting, "on-the-fly" changes of Profile parameters)
Master/Slave change
Automatic Master/Slave change possible if programmed in host software
Motor C heck
programmable max. motion error detection with or without automatic
motor shutdown
„On the fly“ control
of profile and filter parameters with Pre-Load and individual or
simultaneous update of the axes
power supply
4.80V to 5.25V; 1A
-o-
20
© POSYS Motion Control GmbH & Co.KG, 2013
Changes to previous manuals
Changes to previous manuals
With the manual released on August 25 2004 we now start issuing all changes that affect the use of the POSYS® or
software command structure. These changes can be found on this page in chronicle order of their change.
25.8.2004
C learInterrupt
Argument AXIS added for use with POSYS® when used in
C AN 2.0B mode.
25.8.2004
GetActualVelocity
Description more clearly explained
26.8.2004
GetInterruptAxis
Encoding changed
26.8.2004
GetPositionError
Addition to description
26.8.2004
GetVersion
Description changed
26.8.2004
ReadAnalog
Description corrected
26.8.2004
Reset
IMPORTANT NOTIC E: Warning Note added
26.8.2004
Set/GetC ommutationMode
Instance for mode added: microstepping;
Description adjusted
30.08.2004
Set/GetIntegrationLimit
Returned data/Type corrected from signed 32 bits to
unsigned 32 bits
30.08.2004
Set/GetSampleTime
values added for POSYS® 7xx, 8xx, 8xx-B and 9xx
30.08.2004
Set/GetSerialPortMode
Restrictions added for POSYS® 8xx-B and 9xx
30.08.2004
Set/GetSettleWindow
Values added for POSYS® 18xx/19xx
30.08.2004
Set/GetTracePeriod
values added for POSYS® 18xx/19xx
30.08.2004
Set/GetTraceStop
Examples added
28.09.2004
Analog Inputs 800-B version The description showed that a second connector for analog
inputs is available. This is not correct. The 800-B version has
only 1 possibility for connecting analog inputs. (J1 and J7). J9
does not exist on the 800-B version card.
28.09.2004
Jumper description changed With the exception of the jumper selection for the interrupt
for POSYS® 800-B
no jumpers are available on the 800-B card. This was
described incorrectly in the "User settable components"
section of the 800-B.
08.10.2004
Jumper description changed With the exception of the jumper selection for the interrupt
for POSYS® 1800
no jumpers are available on the 1800 card. This was
described incorrectly in the "User settable components"
section of the 1800.
08.10.2004
Description added for
POSYS® 1800
In the "User settable components" section the description for
" serial interface, C AN Interface, Motor Mode Jumpers and
SYNC I/O were added and corrected.
29.10.2004
Description added for
POSYS® 1800
In the "User settable components" section the descriptions
for the connectors, card base address setting were added.
The pinout for the extension connector and extended
extension connector were added.
The layout pictures with placement of switches, jumpers
(interrupt selection) and connectors were added (front & back
side).
29.10.2004
Description added for
POSYS® 1900
In the "User settable components" section the pinouts for the
extension connector and extended extension connector were
added.
29.10.2004
Description added for
POSYS® 900
In the "User settable components" section the pinout for the
extension connector was added.
29.10.2004
Description added for
POSYS® 800-B
In the "User settable components" section the pinout for the
extension connector was added.
29.10.2004
Description added for
POSYS® 800
In the "User settable components" section the pinout for the
extension connector was added.
29.10.2004
Description added for
POSYS® 700
In the "User settable components" section the pinout for the
extension connector was added.
29.10.2004
Description changed for C AN In the sections describing the usage with C AN the explanation
interface (POSYS® 1800,
was C ANOpen. This was wrong and has been corrected to
1900)
C AN 2.0B.
21
© POSYS Motion Control GmbH & Co.KG, 2013
4.11.2004
Dimensions of POSYS® 1800 added
4.11.2004
Memory base address setting The dip switch (SW2) base address setting for the POSYS®
for POSYS® 1800 when
18xx when equipped with dual port RAM was added
equipped with dual port RAM
04.11.2004
Analog pinout description to
be added to the POSYS®
800-B, 900, 1800, 1900
The analog input pinout description for the POSYS® 800-B,
900, 1800 and 1900 has been corrected respectively added
to the manual
24.11.2004
Safety instructions to be
added
Safety Notice, Warranty and Disclaimer added
1.4.2005
Program description for the
GUI version of the POSYS®
test program for Windows
added
4.11.2004
Serial and C AN 2.0B
Setup and connection information added for POSYS®
8xx-B/18xx/9xx/19xx
27.1.2005
C hanged jumper description The jumper configuration was referring to the wrong
for motor configuration
jumpers. This was corrected. Instead of JP2 for stepper
(POSYS 18xx)
motor configuration it must state JP1 and instead of JP1 for
servo and microstepping motors it must state JP2.
01.03.2005
Programmer's Info
Update and corrections on information about addressing
differences of the POSYS® 7xx/8xx and 8xx-B
1.4.2005
Technical Note: setting of
resistor networks for
encoders
This section describes which pins are needed or not needed
when using TTL incremental encoders or incremental
encoders with inverted signals
15.4.2005
User settable components for Exact information of placement of jumpers for IRQ setting
POSYS® 700/800/800-B/
added
1800
10.5.2005
User settable components for Descrition for usage of POSYS® 1800 with Dual Port RAM on
POSYS® 1800
the ISA-Bus added.
17.6.2005
Dual Port RAM Mode
activation/deactivation
17.6.2005
List of all POSYS® commandsA list of all POSYS® commands is now also available right at
the beginning of the Prgrammer's manual
The dual Port RAM on the POSYS® 1800 needs to be
activated or can be deactivated before access can take place
5.7.2005: C hange to Version 2.0.
The version 2.0 of the manual and higher reflect the POSYS® software and hardware changes in regards to the new
driver (WinDriver) which is now the actual driver for Windows and Linux based operating systems.
5.7.2005
C hange of all POSYS® cards All POSYS® motion controllers now use the same driver
to the same driver
module designed for the bus (ISA or PC I) and operating
(WinDriver)
system (Windows 98/2000/XP and Linux) they are used on.
5.7.2005
C hange of card initialization
5.7.2005
C ommands added for access Following commands were added for easier access to Dual
to Dual Port RAM
Port RAM (enable, disable, read and write)
26.7.2005
C ommandSet/GetProfileKp
added
The commandSet/GetProfileKpis an optional command to
smooth trapezoidal accel./decel. motion down to a s-curve
similar trajectory with the possibility to change all parameters
like velocity, accel./decel., position "on-the-fly" which is not
possible in pure s-curve profile mode.
17.08.2005
OpenDevice/C loseDevice
The english manual was not completed correctly in the
version 2.1 from 27.07.2005
12.10.2005
Analog Inputs
C orrections made to definition (reference voltage) and pinout
positions of analog inputs. see various models for details.
28.10.2005
Sample Description of setting The sample setting of the memory address setting for the
of DPRAM address for
DPRAM of the POSYS® 1800 was corrected. It was showing
POSYS® 1800 corrected
incorrectly the opposite setting for the address D0000. This
effected only the english manual.
09.11.2005
Usage of On-Board Dual Port Some information added for use of DPRAM with POSYS®
RAM with POSYS® 1800
1800 PC /104 motion controllers
09.11.2005
Single Port Ram / Dual Port
RAM
Due to the change of the driver the card initialization
procedure changes, too. This effects all ISA-Bus based cards
which no longer need the command EnableIO. The command
OpenDevice as previously only needed for the PC I-based
cards is now also the same (except parameters) for the
ISA-based cards. For details please refer to the command
OpenDevice/C loseDevice
POSYS® GUI program for POSYS® 1800 translation finalized
22
© POSYS Motion Control GmbH & Co.KG, 2013
07.04.2006
minor formatting adjustmentsjust some minor formatting adjustments for better printout
with PDF and HTMLHELP.
11.04.2006
Linux Driver and Software
Installation
Description for compiling and installing the software and
drivers for PC I-Bus based POSYS® and PC 104-Bus based
POSYS® added
25.7.2006
HardReset/MC Reset
Failure in the description which was corrected
9.10.2006
Status Read Operation
Technical Note Addendum
17.01.2007
GetAxis_In_Out_Home
Argument description and Instance were corrected
17.01.2007
Description of the variable
"CardHandle" for use with
MotionScript changed
The description was corrected for usage with MotionScript®
programming language
25.1.2007
Numbering of Breakpoint
The numbering of the value of the used Breakpoint in the
Breakpoint examples for breakpointID differed from the value
described in the command section. This was corrected.
30.1.2007
Activity Status Register
In the Activity Status Register the reserved Bit 6 and
Axis-settled Bit 7 was not correctly defined for POSYS
700/800/800-B/900 in the User's Guide.
The command description in the Programmer's manual
allthough was defined correctly.
13.2.2007
Numbering of connection
scheme changed for Option
C ON
The numbering scheme for the connections to the Option
C ON for the POSYS800-B, 1800, 900 and 1900 series was
changed for better regognition of correct placement.
27.4.2007
Added information to section The numbering of the pinout for the 68-position connector for
OPTION C ON
the POSYS 900 and 1900 series was confusing. Additional
information was added to clarify the pinout description and
numbering. Please read the information provided for
OPTION
C ON AND 900/1900 which are different, depending on if you
use the IO68 from POSYS Motion C ontrol or if you build your
own connector.
23.7.2007
C orrection on SampleTime forThe SampleTime for the single axis/dual chip version of the
MC58120/MC55120
Magellan motion control chip was incorrect. The correct
SampleTime is 102.4 µs and NOT as indicated 51.2 µs.
This also affects the POSYS® 18xx/19xx when equipped with
single axis/dual chip Magellan chip set OR if the POSYS®
18xx/19xx is used in such a way that the axes 2-4 have been
deactivated.
24.7.2007
Set/GetBufferStart
Set/GetBufferStart had an incorrect BufferStart value for the
POSYS® 1800/1900 boards indicating the same value as for
the POSYS® 700/800/800-B/900 boards. This has been
corrected.
05.10.2007
InitializePOSYS
This command is only needed together with the old
Kithara-Driver which is no longer supported.
The information passed on with the command are all located
in the commandOpenDevice
24.1.2008
Added connector description The description for the output signals of J12 for the POSYS
J12 for POSYS 1800 series
1800 series was added; depending on the type of motor and
type of signal you wish to use this connector provides the
possibility for connecting inverted PWM or Pulse & Direction
signals.
27.2.2008
Jumper description corrected On the page of the jumper description for correct motor
output mode for the POSYS 1900 series the wrong jumper
positions were defined. The opposite was correct. The
description is now correct.
01.09.2008
Piezo (C eramic) Motor
Functions
This chapter was added to describe the custom feature on
how to tune Piezo Motors being controlled like servo motors.
In addition on this page you will also find all commands
related to this topic.
16.10.2008
Hardware & Treiber
Installation: Rapid Driver
New drivers for POSYS® 800-B, 1800, 900 and 1900. This
chapter describes the nstallation procedure
1.11.2008
Information added for
Firmware-based >2.x POSYS
boards 1800/1900
The POSYS 1800/1900 series are now available with
Firmware version >2.x. With this firmware additional
commands have been added or existing commands were
expanded with additional parameters.
The commands are:
GetActiveMotorCommand (new)
GetActiveOperatingMode (new)
GetDriveStatus (new)
23
© POSYS Motion Control GmbH & Co.KG, 2013
GetInstructionError (same as GetHostIOError, but some
parameters added)
GetPositionLoopValue (new)
HardReset (added variables to be resetted)
ResetEventStatus (variable added)
RestoreOperatingMode (new)
Set/GetAxisOutMask (new)
Set/GetBreakpoint (added variables)
Set/GetBreakpointUpdateMask (new)
Set/GetBreakpointValue (add variable)
Set/GetEventAction (new)
Set/GetHoldingCurrent (new)
Set/GetOperatingMode (new)
Set/GetPositionLoop (new)
Set/GetSampleTime (different values for >2.x)
Set/GetUpdateMask (new)
19.11.2008
SetEventAction Description
added
SetEventAction was not yet added to the Usability Section of
the manual. This was corrected
12.03.2009
Programmer's Info
The English manual did not contain complete information.
This was corrected.
21.05.2009
External Profile Mode
The English section describing the usage of this mode was not
translated. This is now done
08.12.2009
Set/GetEncoderSource
Added additional explanation for parameter loopback which is
not available on POSYS® 85x-B and 95x series
05.02.2010
IO700/800-1
Description corrected regarding the jumper position for
internal and external power supply
26.07.2010
GP CON Steckverbinder
C orrected the Tyco/AMP model numbers which can be used.
12.01.2012
C hanged email addresses and Revision: 7.0
company to POSYS Motion
C ontrol
12.03.2012
Some corrections done
regarding software packages
and availability of functions
Support for circular interpolation only as option and not
available for all models.
Tuning software available using PMD's Pro-Motion software.
01.06.2013
New Software Tool for PCI
based boards
Software changed from WinDriver model with Delphi to
POSYS-based driver and C/C++ source; refer to integrated
help file regarding usage. Supports 32 Bit and 64 Bit
Windows operating systems (Windows 8 not tested)
-o-
24
© POSYS Motion Control GmbH & Co.KG, 2013
Hardware
25
© POSYS Motion Control GmbH & Co.KG, 2013
Hardware & Driver Installation
26
© POSYS Motion Control GmbH & Co.KG, 2013
Hardware & Driver Installation: WinDriver
Hardware and Driver Installation
New Installation procedure after change to WinDriver. Please read carefully. If you require a previous driver
(Kithara) then please contact servo-Halbeck GmbH & Co.KG for assistance.
Turn off the computer, do not install PCI boards while the computer is turned on. The boards and computer could be
damaged. The boards will definitely not be recognized by the system. PC I bus boards must be installed into a PCI slot, ISA
bus boards must be installed into an ISA slot. POSYS® 800/800B/1800 (PC-104 bus) boards can be installed into an ISA
slot using a PC-104 to ISA bus converter board. This is only sensible for testing in a conventional PC or IPC.
PCI Bus
Windows
After the computer has been turned off install the POSYS® 900/1900 series board into an empty PCI slot of the
computer, secure the slot bracket and turn the computer back on. Once the operating system (Windows 95/98/ME,
NT/2000/XP) has initialized the new hardware will be found (plug & pay) and you will be requested for the location of the
driver. Select the location of the driver and inf file.
The files will be automatically installed into the proper directories depending on the installed operating system.
If the installation was successful the installed drivers and boards will be available for verification by going to the system
and then to device manager. The installed board and drivers are listed under Multifunction Adaptor.
README.TXT
POSYS900WD.INF
POSYS1900WD.INF
WINDRVR6.SYS
WINDRVR6.INF
WDREG16.EXE
WDREG.EXE
WDREG_GUI.EXE
WINDRVR6.VXD
WD_UTILS.DLL
1900_XP.BAT
Important Installation Information for installing on different Windows
operating systems. PLEASE READ!!!
for the POSYS® 900 series
for the POSYS® 1900 series
Driver
Inf-file
for Windows 95/98/ME
for Windows NT/2000/XP
for Windows (all versions)
for Windows 95/98/ME
for Windows (all versions)
for Windows (all versions)
If you wish to use the sample program POSYS900V4.EXE or POSYS1900V4.EXE it will be necessary to register certain OCX
files to the system. Please go to the sub-directory /OCX in the /WD Driver Setup directory and run the batch-file
"registerOCX.bat". Depending on the type of Windows operating system you may be requested to confirm two pop-up
windows or not.
Linux
For the PCI-Bus based cards 2 seperate zip-files are supplied put together to a single zip-file for download. The file
"REDIST.ZIP" contains all necessary files for the driver installation. The file "DISTRIBUTE.ZIP" contains all the files,
including source code, to implement in to your own application. It also contains a sample console program, which can be
started immediately if the environment is the same as the one on which this version was compiled (SuSE Linux 10.0).
Otherwise it needs to be re-compiled for use in the new environment. For this purpose the makefile is supplied too. It is
also mandatory to have the kernel sources and the GNU C/C++ compiler installed.
Driver Installation:



open a terminal window and login as root or with su passwd.



afterwards execute sh ./configure or just ./configure. The makefile for the compilation of the driver file is made.

If everything ran well until now then the driver was successfully loaded and communication with the POSYS® can take
decompress the zip-file to the/usr/local directory. A new directory will be made with name
/WinDriver.
C D to the directory/usr/local/WinDriver/redistand check if the filesconfigure, setup_inst_dir and wdreg are all
executable. If not execute the command
chmod file 755
If no errors occurred then execute
make and make install to install the driver.
The driver should finally be loaded which can be checked by executing
lsmod. A file namedwindrvr6 should be listed
within all the loaded modules
27
© POSYS Motion Control GmbH & Co.KG, 2013
place

In the boot script a new entry should be made to load the driver automatically when booting the computer
Software Installation:



Decompress the ZIP-fileDistribute to the subdirectory /usr/local/POSYS.

In the subdirectory /source all source files can be found to implement in your own application. The source for the
driver can not be supplied because of limited licenceing rights.

In the subdirectory /test1900 is a precompiled console program for the POSYS 1900 series. Execute make and make
install to recompile a version which can run on your computer.

In the subdirectory /test900 is a precompiled console program for the POSYS 900 series. Execute make and make
install to recompile a version which can run on your computer.


The subdirectory /include contains all include files.
You will see additional subdirectories now listed as following:
/source
/test1900
/test900
/include
/object
/module
The subdirectory/object contains all object files
ISA/PC-104 Bus
Windows
Go to the directory /WD Driver Setup and run the program WDREG_GUI.EXE as required for your Windows operating
system (read the README.TXT). This will install all of the required driver files and driver DLLs into the proper directories
of Windows 95/98/ME or NT/2000/XP. It will probably be necessary to restart the computer after driver installation. For the
ISA bus there will be no check for address conflicts.
As the next step the utility POSYSDriverXSetup should be run. It will allow the entry of base addresses and interrupt
numbers for up to 16 installed motion control cards.
README.TXT
WINDRVR6.SYS
WINDRVR6.INF
WDREG16.EXE
WDREG.EXE
WDREG_GUI.EXE
WINDRVR6.VXD
WD_UTILS.DLL
Important Installation Information for installing on different Windows
operating systems. PLEASE READ!!!
Driver
Inf-file
for Windows 95/98/ME
for Windows NT/2000/XP
for Windows (all versions)
for Windows 95/98/ME
for Windows (all versions)
If you wish to use the sample program POSYS1800V4.EXE/POSYS800BV4.EXE or POSYS700V4.EXE it will be necessary to
register certain OCX files to the system. Please go to the sub-directory /OCX in the /WD Driver Setup directory and run the
batch-file "registerOCX.bat". Depending on the type of Windows operating system you may be requested to confirm two
pop-up windows or not.
Linux
The Posys1800 is a console program for Linux distributions. It cannot be guaranteed to work with all Linux operating
systems available. It has been tested with Linux SuSE 10.0. The program requires a prior installation of the WinDriver
windrvr6 module. This requiresroot privileges.
The test program includes all source files and is well documented so that the developer can adapt it to his needs. The
program supports up to 3 installed Posys PC -104 boards but could be extended for more.
Please follow all steps carefully to install the program and the driver.




C opy all files to the directory /usr/local.
Make sure that the kernel sources and the gnu (g++) compiler are installed on the target system.
C hange to the folder WinDriver/redist in the directory usr/local/.
Open a terminal window and execute the command ./configure.
28
© POSYS Motion Control GmbH & Co.KG, 2013


If configure finishes without reporting an error execute the command make install.

If the POSYS board has not yet been installed, make sure to turn off the computer. Check the IO address on the board
and set it to your desired address. The default address set on the board is 0x300 (768 decimal). This is normally a
safe address to use but make sure that it is not also used by another option board.

If the computer is powered up again the windrvr6 module will need to be inserted again. Issue the command ./wdreg
windrvr6 no in the folder /usr/local/WinDriver/redist. Make sure to also use the parameter no.

Now switch to the folder /posys_pc104/linux/Release_Build and execute the command ./Posys1800. This will start the
console program if all steps were exited without errors. The program will start up and ask for inputs by the user:
a.) Enter the number of POSYS controllers installed (1 or 2)
b.) Enter the base IO address of the POSYS controller as a Hex number. It must match the setting of DIP switch on the
board.
c.) Enter the base address of the dual port RAM (only valid for the POSYS 1800), the POSYS 800B uses single port
RAM.
d.) Enter the Interrupt number to be used. It must match the jumper setting on the board and must not be used by
another option board. Please refer to the POSYS manual for the jumper settings.

Once all of the data has been entered the driver will start and the board will be initialized and all of the POSYS
functions can be exercised. If an error was detected a message will be displayed and the program will be terminated.
If no error is reported the driver will be installed. A successful installation can be checked by executing the command
lsmod. It will list all installed modules and should also list windrvr6.
The program was originally developed using Borland
’s C ++BuilderX development system for Linux. It was compiled with
the gnu compiler. A makefile is also provided in the folder
/usr/local/posys_pc104
. For re-compilation the gnu compiler
must be installed on the target system.
DOS
For DOS no driver installation is required. IO and memory can be addressed directly from C, Pascal or Basic.
-o-
29
© POSYS Motion Control GmbH & Co.KG, 2013
Hardware & Driver Installation: Rapid Driver
Hardware and Driver Installation
New Installation procedure after change to WinDriver. Please read carefully. If you require a previous driver
(Kithara, WinDriver) then please contact servo-Halbeck GmbH & Co.KG for assistance.
Turn off the computer, do not install PCI boards while the computer is turned on. The boards and computer could be
damaged. The boards will definitely not be recognized by the system. PC I bus boards must be installed into a PCI slot, ISA
bus boards must be installed into an ISA slot. POSYS® 800B/1800 (PC-104 bus) boards can be installed into an ISA slot
using a PC-104 to ISA bus converter board. This is only sensible for testing in a conventional PC or IPC.
PCI Bus
Windows
After the computer has been turned off install the POSYS® 900/1900 series board into an empty PCI slot of the
computer, secure the slot bracket and turn the computer back on. Once the operating system (Windows 98/ME, 2000/XP)
has initialized the new hardware will be found (plug & pay) and you will be requested for the location of the driver. Select
the location of the driver and inf file.
The files will be automatically installed into the proper directories depending on the installed operating system.
If the installation was successful the installed drivers and boards will be available for verification by going to the system
and then to device manager. The installed board and drivers are listed under Multifunction Adaptor.
POSYS900WD.INF
POSYS1900WD.INF
RapidIsa.SYS
POSYS900.INF
POSYS1900.INF
RdInstall98.EXE
RdInstall.EXE
RdInst16.DLL
RapidInstaller32.dll
RapidIsa.dll
ReadMe.rtf / ReadMe.txt
for POSYS® 900 Series
for POSYS® 1900 Series
Driver
Inf-file for POSYS 900
Inf-file for POSYS 1900
for Windows 95/98/ME
for Windows 2000/XP
library
library
library
installation description
If you wish to use the sample program POSYS900V4.EXE or POSYS1900V4.EXE it will be necessary to register certain OCX
files to the system. Please go to the sub-directory /OCX in the /WD Driver Setup directory and run the batch-file
"registerOCX.bat". Depending on the type of Windows operating system you may be requested to confirm two pop-up
windows or not.
Linux (please use WinDriver)
ISA/PC-104 Bus
Windows
Go to the directory /WD Driver Setup and run the program WDREG_GUI.EXE as required for your Windows operating
system (read the README.TXT). This will install all of the required driver files and driver DLLs into the proper directories
of Windows 95/98/ME or NT/2000/XP. It will probably be necessary to restart the computer after driver installation. For the
ISA bus there will be no check for address conflicts.
As the next step the utility POSYSDriverXSetup should be run. It will allow the entry of base addresses and interrupt
numbers for up to 16 installed motion control cards.
RapidIsa.SYS
POSYS800.INF
POSYS1800.INF
RdInstall98.EXE
RdInstall.EXE
RdInst16.DLL
RapidInstaller32.dll
RapidIsa.dll
ReadMe.rtf / ReadMe.txt
Driver
Inf-file for POSYS 800-B
Inf-file for POSYS 1800
for Windows 95/98/ME
for Windows 2000/XP
library
library
library
installation description
30
© POSYS Motion Control GmbH & Co.KG, 2013
If you wish to use the sample program POSYS1800V4.EXE/POSYS800BV4.EXE or POSYS700V4.EXE it will be necessary to
register certain OCX files to the system. Please go to the sub-directory /OCX in the /WD Driver Setup directory and run the
batch-file "registerOCX.bat". Depending on the type of Windows operating system you may be requested to confirm two
pop-up windows or not.
Linux (please use WinDriver)
-o-
31
© POSYS Motion Control GmbH & Co.KG, 2013
POSYS® Versions Specifications
32
© POSYS Motion Control GmbH & Co.KG, 2013
POSYS® 8xx-B
Versions 8xx-B
List of available versions
POSYS® 80x-B for brushed servo motors.
The POSYS® 80x-B can be used as well for brushless servo motors when the appropriate type of amplifier is used.
Model
# of Axes
POSYS® 802-B
2
POSYS® 804-B
4
POSYS® 85x-B for stepper motors
The POSYS® 85x-B can be used as well for microstepping motors when the appropriate type of driver is used.
Model
# of Axes
POSYS® 852-B
2
POSYS® 854-B
4
All versions are also available for extended temperature range (-40° - +85°C ). Not in stock. Please add for order "I" to the
model number (for example: 804-BI).
-oUser settable components; POSYS® 8xx-B
User settable Components; POSYS® 8xx-B
The figures below show the locations of the principal components of the POSYS® 8xx-B cards. The component side of the
board is shown from both sides. All component locations in this manual refer to this orientation (top or bottom).
The important user-accessible components of the card are:

Resistor Packs RS1, RS2, and RS3 set the Encoder termination

Dip switch and jumper settings

Mode jumper allows the serial communication port mode to be selected

SYNC I/O for multiple card synchronization
33
© POSYS Motion Control GmbH & Co.KG, 2013
picture shows: POSYS 8xx-B
Resistor Packs RS1, RS2, RS3
The following table shows the function of the RS1-RS3 resistor packs
Item
What to set
Description
Resistor packs - RS1,
RS2, RS3
Installed
This is the default setting of
resistor packs RS1-RS3
If you are using differential connections leave these resistor
packs installed.
Remove if you are not using
differential encoders
If you are using single-ended encoder connections, remove the
resistor packs.
34
© POSYS Motion Control GmbH & Co.KG, 2013
Mode Jumper JP4
The following table describes the meaning of the Mode Jumper. Actually it is not necessary anymore to change this jumper
for use with either communication mode. Both methods work on either position, PC /104 (parallel) and serial. This jumper is
only on the PC /104 B-series, 18xx and PC I cards.
Item
What to set
Description
Mode Jumper - JP4
1-2
This is the default setting of
mode jumper
Sets PC /104 bus to be main communications channel.
2-3
Serial port is primary communication channel
If TTL as well as oncoders with inverted signals are going to be used then please look-up page
Resistor Networks for TTL or
inverted Encoder Signalsfor details on how to setup the resistor networks for mixed usage.
Dip Switches and Jumper Settings
The POSYS® 8xx-B have dip switches for address settings and jumpers for other certain purposes. These settings are
described in the following tables:
Item
How to set
Description
SW1
S1-1 8 (hex)
S1-2 10 (hex)
S1-3 20 (hex)
S1-4 40 (hex)
S1-5 80 (hex)
S1-6 100 (hex)
S1-7 200 (hex)
S1-8 400 (hex)
300 (hex) is the default base
address
Switch SW1 sets the card address on the ISA bus. The selected
card address is the additive value of the switch settings
indicated to the left. Moving the switch to the off position adds
that value to the final base address. For example to select a
base address of 340 (hex), the following switch settings would
be selected:
S1-1 on
S1-2 on
S1-3 on
S1-4 off
S1-5 on
S1-6 off
S1-7 off
S1-8 on
The card address selected using S1 must match the address
expected by your software. In addition, this address must not
be used by other cards. From the base address selected, 8
addresses are used by the ISA card. For example, if 300 (hex)
is selected, then locations 300 - 307 will be used by the card,
and cannot be used by other cards on the bus.
Interrupt
C onnect none,
no connection is default
"Interrupt" selects the specific IRQ signal that will be active on
the ISA bus. C onnect none, or one of the 8 IRQs 0-7. Only one
IRQ can be jumpered, and that IRQ must be available on your
system. For example, to select IRQ3, install the jumper across
position 3 on jumper 17. C heck your PC 's bus configuration to
determine which IRQs are free. The IRQ, if connected, is
activated by the on-board motion processor under various
host-programmable conditions.
J17 Designation / IRQ
Selector
ISA IRQ No.
0
1
2
3
4
5
6
7
3
5
7
10
11
12
14
15
Extension Connector
Pin No.
Description
Pin No.
Description
1
GND
2
A0
3
DS0
4
A1
5
DS1
6
A2
35
© POSYS Motion Control GmbH & Co.KG, 2013
Pin No.
Description
Pin No.
Description
7
DS2
8
A3
9
DS3
10
A4
11
DS4
12
A5
13
DS5
14
A6
15
DS6
16
A7
17
DS7
18
A8
19
DS8
20
A9
21
DS9
22
A10
23
DS10
24
A11
25
DS11
26
A12
27
DS12
28
A13
29
DS13
30
A14
31
DS14
32
A15
33
DS15
34
IS-
35
DS-
36
STRB-
37
WE-
38
VC C
39
R/W
40
PS-
-oSerial Port
Serial Port
This module and associated signals provides the capability to operate the POSYS® card using an asynchronous serial port
(only PC/104 8xx-B-series, 18xx/18xx-B and PCI cards), or to allow certain monitoring operations to be performed through
the serial port, even while the PCI bus is used to command motion sequences. To operate the serial port as the primary
communication channel to the card please refer to chapter „Host Communication – Serial Port“.
The serial cable is optional. Please contact us if you wish to connect via RS232 to the POSYS®.
The following connector is used during serial communications. The Serial I/F connector is a 5-position Molex MLX
Micro-4-SMD style connector (Molex part no.: 53398-0571) for the PCI cards POSYS® 9xx, 19xx and for the new PC/104
card POSYS® 18xx or 6-position connector for the PC /104 8xx-B-series. The counter connector for the cable for the PCI
cards is a female connector from Molex (Molex part no.: 51021-0500).
The default serial communication settings after power-on are:
speed: 9600 baud/s.
parity: none
stop bits: 1
protocol: point-to-point
If different than the standard power-on settings are desired, please contact servo-Halbeck. These values can be changed
and hard-coded to accomplish customer requirements. An initial change of the settings after each power-on can be
omitted. The appropriate settings take place at once.
Serial I/F Connector PC/104 Card POSYS® 8xx-B series
Only valid for POSYS® 8xx-B series
The following connector is used during serial communications. The Serial I/F connector is a 6-position Molex MLX
Micro-4-SMD style connector.
Pin
Connection
Description
1
SrlEnable
Serial Enable (only used for RS232/422)
2
SrlXmt
Serial transmit output
36
© POSYS Motion Control GmbH & Co.KG, 2013
Pin
Connection
Description
3
SrlRcv
Serial receive input
4
GND
Ground
5
Vcc
+5V
6
n.c.
No connection
Set/GetSerialPortMode, Serial Port Description
-oBrushed Servo Mode Pinout Description
Pinout description brushed servo and brushless servo w/
external commutation
POSYS® 80x-B:
Pin 1-50 = J7, Pin 51-100 = J1)
C onnectors on the board:
TSM-125-01-T-DV (Samtec)
Mating with: IDSD-25-S
Pin
Connection
Description
Pin
Connection
1
A1+
C hannel A+ encoder signal (X)
51
A3+
Description
C hannel A+ encoder signal (Z)
2
A1-
C hannel A- inverted encoder
signal (X)
52
A3-
C hannel A- inverted encoder
signal (Z)
3
B1+
C hannel B+ encoder signal (X)
53
B3+
C hannel B+ encoder signal (Z)
4
B1-
C hannel B- inverted encoder
signal (X)
54
B3-
C hannel B- inverted encoder
signal (Z)
5
I1+
C hannel I+ encoder signal (X)
55
I3+
C hannel I+ encoder signal (Z)
6
I1-
C hannel I- inverted encoder
signal (X)
56
I3-
C hannel I- inverted encoder
signal (Z)
7
Vc1
+5V
57
Vc1
+5V
8
GND
Ground
58
GND
Ground
9
XPLIM1
Limit switch positive direction
(X)
59
XPLIM3
Limit switch positive direction
(Z)
10
XNLIM1
Limit switch negative direction
(X)
60
XNLIM3
Limit switch negative direction
(Z)
11
HOME1
Home signal (X) or high speed
latch
61
HOME3
Home signal (Z) or high speed
latch
12
GND
Ground
62
GND
Ground
13
OUT1
User programmable output (X)
63
OUT3
User programmable output (Z)
14
BPWM1
PWM magnitude (X)
64
BPWM3
15
BPWMS1
PWM sign (X)
65
BPWMS3
16
AXIN1
User programmable input (X)
66
AXIN3
User programmable input (Z)
17
DACV1
Motor command (X), ±10V
signal
67
DACV3
Motor command (Z), ±10V
signal
18
AGND
Ground for motor command
68
AGND
Ground for motor command
19
A2+
C hannel A+ encoder signal (Y)
69
A4+
C hannel A+ encoder signal (W)
20
A2-
C hannel A- inverted encoder
signal (Y)
70
A4-
C hannel A- inverted encoder
signal (W)
21
B2+
C hannel B+ encoder signal (Y)
71
B4+
C hannel B+ encoder signal (W)
22
B2-
C hannel B- inverted encoder
signal (Y)
72
B4-
C hannel B- inverted encoder
signal (W)
23
I2+
C hannel I+ encoder signal (Y)
73
I4+
C hannel I+ encoder signal (W)
37
PWM magnitude (Z)
PWM sign (Z)
© POSYS Motion Control GmbH & Co.KG, 2013
Pin
Connection
Description
Pin
Connection
24
Description
I2-
C hannel I- inverted encoder
signal (Y)
74
I4-
C hannel I- inverted encoder
signal (W)
25
Vc1
+5V
75
Vc1
+5V
26
GND
Ground
76
GND
Ground
27
XPLIM2
Limit switch positive direction (Y)
77
XPLIM4
Limit switch positive direction
(W)
28
XNLIM2
Limit switch negative direction
(Y)
78
XNLIM4
Limit switch negative direction
(W)
29
HOME2
Home signal (Y) or high speed
latch
79
HOME4
Home signal (W) or high speed
latch
30
OUT2
User programmable output (Y)
80
OUT4
User programmable output (W)
31
BPWM2
PWM magnitude (Y)
81
BPWM4
32
BPWMS2
PWM sign (Y)
82
BPWMS4
33
AXIN2
User programmable input (Y)
83
AXIN4
User programmable input (W)
34
DACV2
Motor command (Y), ±10V
signal
84
DACV4
Motor command (W), ±10V
signal
35
AGND
Ground for motor command
85
AGND
Ground for motor command
36
UI0
uncommitted input (0)
86
UI4
uncommitted input (4)
37
UI1
uncommitted input (1)
87
UI5
uncommitted input (5)
38
UI2
uncommitted input (2)
88
UI6
uncommitted input (6)
39
UI3
uncommitted input (3)
89
UI7
uncommitted input (7)
40
AMPEN1
Amplifier enable (X) or user
programmable output
90
AMPEN3
41
UO0
uncommitted output (0)
91
UO4
uncommitted output (4)
42
UO1
uncommitted output (1)
92
UO5
uncommitted output (5)
43
UO2
uncommitted output (2)
93
UO6
uncommitted output (6)
44
UO3
uncommitted output (3)
94
UO7
uncommitted output (7)
45
AMPEN2
Amplifier enable (Y) or user
programmable output
95
AMPEN4
Amplifier enable (W) or user
programmable output
PWM magnitude (W)
PWM sign (W)
Amplifier enable (Z) or user
programmable output
46
RS-
Hardware reset
96
ANGND
GND for analog inputs
47
Ainput1
analog input channel (0)
97
Ainput5
analog input channel (4)
48
Ainput2
analog input channel (1)
98
Ainput6
analog input channel (5)
49
Ainput3
analog input channel (2)
99
Ainput7
analog input channel (6)
50
Ainput4
analog input channel (3)
100
Ainput8
analog input channel (7)
-oStepper Version Pinout Description
Pinout description stepper/microstepping* version
POSYS® 85x-B
Pin 1-50 = J7, Pin 51-100 = J1
C onnectors on the board:
TSM-125-01-T-DV (Samtec)
Mating with: IDSD-25-S
Pin
Connection
Description
Pin
Connection
1
A1+
C hannel A+ encoder signal (X)
51
A3+
C hannel A+ encoder signal (Z)
2
A1-
C hannel A- inverted encoder
signal (X)
52
A3-
C hannel A- inverted encoder
signal (Z)
3
B1+
C hannel B+ encoder signal (X)
53
B3+
C hannel B+ encoder signal (Z)
4
B1-
C hannel B- inverted encoder
signal (X)
54
B3-
C hannel B- inverted encoder
signal (Z)
38
Description
© POSYS Motion Control GmbH & Co.KG, 2013
Pin
Connection
Description
Pin
Connection
5
6
Description
I1+
C hannel I+ encoder signal (X)
55
I3+
C hannel I+ encoder signal (Z)
I1-
C hannel I- inverted encoder
signal (X)
56
I3-
C hannel I- inverted encoder
signal (Z)
7
Vc1
+5V
57
Vc1
+5V
8
GND
Ground
58
GND
Ground
9
XPLIM1
Limit switch positive direction
(X)
59
XPLIM3
Limit switch positive direction
(Z)
10
XNLIM1
Limit switch negative direction
(X)
60
XNLIM3
Limit switch negative direction
(Z)
11
HOME1
Home signal (X) or high speed
latch
61
HOME3
Home signal (Z) or high speed
latch
12
GND
Ground
62
GND
Ground
13
OUT1
User programmable output (X)
63
OUT3
User programmable output (Z)
14
PULSE1
Pulse (X)
64
PULSE3
Direction (X)
65
DIR3
User programmable input (X)
66
AXIN3
Pulse (Z)
15
DIR1
16
AXIN1
Direction (Z)
17
ATREST1
At Rest (X)
67
ATREST3
18
GND
Ground
68
GND
Ground
19
A2+
C hannel A+ encoder signal (Y)
69
A4+
C hannel A+ encoder signal (W)
20
A2-
C hannel A- inverted encoder
signal (Y)
70
A4-
C hannel A- inverted encoder
signal (W)
21
B2+
C hannel B+ encoder signal (Y)
71
B4+
C hannel B+ encoder signal (W)
22
B2-
C hannel B- inverted encoder
signal (Y)
72
B4-
C hannel B- inverted encoder
signal (W)
23
I2+
C hannel I+ encoder signal (Y)
73
I4+
C hannel I+ encoder signal (W)
24
I2-
C hannel I- inverted encoder
signal (Y)
74
I4-
C hannel I- inverted encoder
signal (W)
25
Vc1
+5V
75
Vc1
+5V
26
GND
Ground
76
GND
Ground
27
XPLIM2
Limit switch positive direction (Y)
77
XPLIM4
Limit switch positive direction
(W)
28
XNLIM2
Limit switch negative direction
(Y)
78
XNLIM4
Limit switch negative direction
(W)
29
HOME2
Home signal (Y) or high speed
latch
79
HOME4
Home signal (W) or high speed
latch
30
OUT2
User programmable output (Y)
80
OUT4
User programmable output (W)
31
PULSE2
Pulse (Y)
81
PULSE4
Direction (Y)
82
DIR4
User programmable input (Y)
83
AXIN4
User programmable input (Z)
At Rest (Z)
Pulse (W)
32
DIR2
33
AXIN2
34
ATREST2
At Rest (Y)
84
ATREST4
35
GND
Ground
85
GND
Ground
36
UI0
uncommitted input (0)
86
UI4
uncommitted input (4)
37
UI1
uncommitted input (1)
87
UI5
uncommitted input (5)
38
UI2
uncommitted input (2)
88
UI6
uncommitted input (6)
39
UI3
uncommitted input (3)
89
UI7
uncommitted input (7)
40
AMPEN1
Amplifier enable (X) or user
programmable output
90
AMPEN3
41
UO0
uncommitted output (0)
91
UO4
uncommitted output (4)
42
UO1
uncommitted output (1)
92
UO5
uncommitted output (5)
43
UO2
uncommitted output (2)
93
UO6
uncommitted output (6)
44
UO3
uncommitted output (3)
94
UO7
uncommitted output (7)
45
AMPEN2
Amplifier enable (Y) or user
programmable output
95
AMPEN4
Amplifier enable (W) or user
programmable output
46
RS-
Hardware reset
96
ANGND
GND for analog inputs
39
Direction (W)
User programmable input (W)
At Rest (W)
Amplifier enable (Z) or user
programmable output
© POSYS Motion Control GmbH & Co.KG, 2013
Pin
Connection
Description
Pin
Connection
47
Ainput1
analog input channel (0)
97
Ainput5
analog input channel (4)
48
Ainput2
analog input channel (1)
98
Ainput6
analog input channel (5)
49
Ainput3
analog input channel (2)
99
Ainput7
analog input channel (6)
100
Ainput8
analog input channel (7)
50
Ainput4
analog input channel (3)
*Microstepping with appropriate type driver
Description
-oAnalog Input Pinout Description; POSYS® 8xx-B
Analog Input Pinout description (only valid for POSYS® 800-B)
J7 Pin-Out
Description
Explanation
47
Analog Input 1
Analog input for channel (0)
48
Analog Input 2
Analog input for channel (1)
49
Analog Input 3
Analog input for channel (2)
50
Analog Input 4
Analog input for channel (3)
J1 Pin-Out
Description
Explanation
97
Analog Input 5
Analog input for channel (4)
98
Analog Input 6
Analog input for channel (5)
99
Analog Input 7
Analog input for channel (6)
100
Analog Input 8
Analog input for channel (7)
The analog input voltage for the 8 channels can range from 0-2.048 VDC, the resolution is 10 bits.
ReadAnalog(channel)
C hannel = 0-7 for the 8 inputs.
To display the returned value in volts, use the following conversion:
AnalogInputVoltage = (ReadAnalog(channel) / 65536) * 4.096V
This scales the returned value to the correct voltage.
If other than the standard input voltage is desired then we can offer optional input voltages at following rates: 1.8V, 2.5V,
3.0V and 3.3V.
-o-
40
© POSYS Motion Control GmbH & Co.KG, 2013
POSYS® 18xx
Versions 18xx
List of available versions
POSYS® 182x for brushed/brushless servo motors w/ internal commutation,
microstepping and stepper motors
The POSYS® 182x can be used for all types of motors (brushed, brushless, microstepping and stepper)
Model
# of Axes
POSYS® 1822
2
POSYS® 1824
4
POSYS® 185x for stepper motors
The POSYS® 185x can be used as well for microstepping motors when the appropriate type of driver is used.
Model
# of Axes
POSYS® 1852
2
POSYS® 1854
4
All versions are also available for extended temperature range (-40° - +85°C ). Not in stock. Please add for order "-I" to
the model number (for example: 1804-I).
The models 180x and 185x are available either with Single Port RAM (512KB) or Dual Port RAM (32KB or 64KB). The
versions 182x are generally equipped with 32KB Dual Port RAM. When ordering please add the type of RAM desired
otherwise standard versions will be delivered.
For example:
POSYS® 1804 with 32KB DPRAM = 1804-32
POSYS® 1804 with 64KB DPRAM = 1804-64
POSYS® 1804 with 32KB DPRAM for extended temperature range = 1804-I32
If it is desired to use the 182x with SPRAM instead of 32KB DPRAM then please order: 182x-S
If it is desired to use the 182x with 64KB DPRAM instead of 32KB DPRAM then please order: 182x-64
where x is the desired amount of axes.
-oUser settable components; POSYS® 18xx
User settable Components; POSYS® 18xx
The figures below show the locations of the principal components of the POSYS® 18xx cards. The component side of the
board is shown from both sides. All component locations in this manual refer to this orientation (top or bottom).
The important user-accessible components of the card are:





Resistor Packs RS1, RS2, and RS3 set the encoder termination
Dip switch settings for card base address and memory base address (SW1, SW2)
Jumper settings for interrupt (J17)
Jumper settings for motor type per axis (JP1 and JP2, 182x, 180x, 185x)
C onnectors for cables (J1/J7 (extension port), J2 (serial port), J3/J4 (SYNC I/O), J5/J6/J9 (3x 50-position main
connectors), J8 (C AN 2.0B), J12 (inverted signal output for steppers)
41
© POSYS Motion Control GmbH & Co.KG, 2013
42
© POSYS Motion Control GmbH & Co.KG, 2013
picture shows: POSYS 18xx
The following table shows the function of the RS1-RS3 resistor packs
Item
What to set
Description
Resistor packs - RS1,
RS2, RS3
Installed
This is the default setting of
resistor packs RS1-RS3
If you are using differential connections leave these resistor
packs installed.
Remove if you are not using
differential encoders
If you are using single-ended encoder connections, remove the
resistor packs.
If TTL as well as encoders with inverted signals are going to be used then please look-up page Resistor Networks for TTL or
inverted Encoder Signals for details on how to setup the resistor networks for mixed usage.
Dip Switches and Jumper Settings
The POSYS® 18xx have dip switches for base card and base memory address settings and jumpers for other certain
purposes. These settings are described in the following tables:
Item
How to set
Description
SW1
S1-1
S1-2
S1-3
S1-4
S1-5
S1-6
S1-7
S1-8
Switch SW1 sets the card address on the ISA bus. The selected
card address is the additive value of the switch settings
indicated to the left. Moving the switch to the off position adds
that value to the final base address. For example to select a
base address of 340 (hex), the following switch settings would
be selected:
S1-1 on
S1-2 on
8 (hex)
10 (hex)
20 (hex)
40 (hex)
80 (hex)
100 (hex)
200 (hex)
400 (hex)
43
© POSYS Motion Control GmbH & Co.KG, 2013
Item
How to set
Description
300 (hex) is the default base
address
S1-3 on
S1-4 off
S1-5 on
S1-6 off
S1-7 off
S1-8 on
The card address selected using S1 must match the address
expected by your software. In addition, this address must not
be used by other cards. From the base address selected, 8
addresses are used by the ISA card. For example, if 300 (hex)
is selected, then locations 300 - 307 will be used by the card,
and cannot be used by other cards on the bus.
SW2
S2-1 1000 (hex)
S2-2 2000 (hex)
S2-3 4000 (hex)
S2-4 8000 (hex)
S2-5 10000 (hex)
S2-6 20000 (hex)
S2-7 40000 (hex)
S2-8 80000 (hex)
D0000 (hex) is the default
memory base address setting.
This applies only to POSYS®
18xx boards equipped with
Dual Port RAM (32 KB or 64
KB)
DPRAM base address is set using dip switch SW2. It can be set
in the range of 4,096 (0x1000) to 1,044,480 (0xFF000). The
default setting is 851,968 (0xD0000). The maximum
addressable range is 65535 bytes or 32767 words. The default
is represented by dip switch positions:
S2-1 on
S2-2 on
S2-3 on
S2-4 on
S2-5 off
S2-6 on
S2-7 off
S2-8 off
The memory is mapped to the computers memory where the
space needs to be reserved by setting the appropriate
conditions. The memory is mapped to an area normally between
640 KB and 1 MB (upper memory area). Please refer to your
computer's manual for reserving the computers upper memory
(BIOS settings).
Interrupt
C onnect none,
no connection is default
"Interrupt" selects the specific IRQ signal that will be active on
the ISA bus. C onnect none, or one of the 8 IRQs 0-7. Only one
IRQ can be jumpered, and that IRQ must be available on your
system. For example, to select IRQ3, install the jumper across
position 0 on jumper 17. C heck your PC s bus configuration to
determine which IRQs are free. The IRQ, if connected, is
activated by the on-board motion processor under various
host-programmable conditions.
J17 Designation
ISA IRQ No.
0
1
2
3
4
5
6
7
3
5
7
10
11
12
14
15
Motor Mode Jumpers „JP1“ and „JP2“
Depending on model there are various possibilities of setting up the POSYS® for use with either DC brushed, DC brushless
(with or without on-board commutation), microstepping or stepper motors. Besides the necessity to setup the hardware for
use with different motor types you will also need to do software setup. These software setup procedures are described in
the programmer's reference. The default power-on mode is for any axis DC Brushed (except POSYS® 195x which is
generally in stepper mode after power-on), no matter what the jumper setting is. If you wish a different default on
power-on, then please tell us (for example: two axes = DC Brushless and 1 axis = stepper and 1 axis = DC brushed).
These are settings that can be hard-coded on the card.
The following section describes only which hardware configuration is needed for using the one or other motor type:
Motor Ty pe Jumper setting
DC Brushed JP1
DC
Brushless
JP1
Microsteppin JP1
g
44
© POSYS Motion Control GmbH & Co.KG, 2013
Motor Ty pe Jumper setting
Stepper
JP2
JP1 and JP2 both consist of four jumpers. Each position can be setup for axis 1, 2, 3 or 4, depending on if you have a 1, 2,
3 or 4 axes card. Depending also on the model you may have different setup possibilities. The tables on the pages for
setting up the motor configuration are described on POSYS® 180x; Motor Configuration, POSYS® 182x; Motor
C onfiguration, POSYS® 185x; Motor Configuration.
Inverted Signal Output for Stepper Motor Drives "J12"
This connector will be available on all POSYS® 1800 versions. It provides stepping motor pulse and direction outputs using
line drivers. Most modern stepping motor drivers require step and direction inputs with inverted signals. It helps in regard
to higher noise immunity. This means there is less of a chance of mispositioning due to noise signals on the drive of the
stepping motor.
Pin
Description
Pin
Description
1
GND
2
GND
3
W axis, Pulse +
4
W axis, Pulse -
5
X axis, Direction +
6
X axis, Direction -
7
W axis, Direction +
8
W axis, Direction -
9
Y axis, Pulse +
10
Y axis, Pulse -
11
Z axis, Direction +
12
Z axis, Direction -
13
X axis, Pulse +
14
X axis, Pulse -
15
Y axis, Direction +
16
Y axis, Direction -
17
Z axis, Pulse +
18
Z axis, Pulse -
19
GND
20
GND
20-Position Connector on the board (J12):
TSM-110-01-T-DV (Samtec)
Mating with: IDSD-10
Parallel Input Connector "J1"
Pin No.
Description
Pin No.
Description
1
GND
2
A0
3
DS0
4
A1
5
DS1
6
A2
7
DS2
8
A3
9
DS3
10
A4
11
DS4
12
A5
13
DS5
14
A6
15
DS6
16
A7
17
DS7
18
A8
19
DS8
20
A9
21
DS9
22
A10
23
DS10
24
A11
25
DS11
26
A12
27
DS12
28
A13
29
DS13
30
A14
31
DS14
32
A15
33
DS15
34
IS-
35
DS-
36
STRB-
37
WE-
38
VC C
39
R/W
40
PS-
45
© POSYS Motion Control GmbH & Co.KG, 2013
"J7" Connector
C on J7 is an extension of the connector J1 by 6 pins
Pin1 --> MC ~ReadEN
Pin2 --> MC W/~R
Pin3 --> MC CPReady
Pin4 --> MC ClockOut
Pin5 --> MC ~PerihpSel
Pin6 --> ALL ~Reset
-oSYNC IO
SYNC I/O
These two connectors allow to synchronize additional cards in one system to work within the same cycle period. If not
connected additional cards would start to work after the first card was initialized. This could be up to 400 or 600 µsec after
a 4 axis card, depending on model. With SYNC I/O activated all additional cards would not start to work later than 50 nsec.
after the master. This allows precise synchronizing of all implemented axes. How to accomplish this is described in the
section Set/GetSynchronizationMode of this manual. To connect 2 or more cards for synchronizing purpose you need the
optional SYNC I/O cable (1 for each set of two boards). This cable can be connected to any of the two SYNC I/O connectors
on the boards. Both connectors act either as an input or output. The SYNC I/O function is only available on selected
versions for PC/104 and PCI-Bus cards.
The connector on the board is a 2-position Molex male connector (Molex part no.: 53261–0271). The counter connector for
the cable is a female connector from Molex (Molex part no.: Molex 51021-0200, Crimp contact: Molex 50079-8100).
Set/GetSynchronizationMode, Sync IO Description
-oSerial Port
Serial Port
This module and associated signals provides the capability to operate the POSYS® card using an asynchronous serial port
(only PC/104 B-series, 18xx and PCI cards), or to allow certain monitoring operations to be performed through the serial
port, even while the PCI bus is used to command motion sequences. To operate the serial port as the primary
communication channel to the card please refer to chapter „Host Communication – Serial Port“.
The serial cable is optional. Please contact us if you wish to connect via RS232 to the POSYS®.
The following connector is used during serial communications. The Serial I/F connector is a 5-position Molex MLX
Micro-4-SMD style connector (Molex part no.: 53398-0571) for the PCI cards POSYS® 9xx, 19xx and for the new PC/104
card POSYS® 18xx/18xx-B or 6-position connector for the PC /104 8xx-B-series. The counter connector for the cable for
the PCI cards is a female connector from Molex (Molex part no.: 51021-0500).
The default serial communication settings after power-on are:
speed: 57600 baud/s.
parity: none
stop bits: 2
protocol: point-to-point
If different than the standard power-on settings are desired, please contact servo-Halbeck. These values can be changed
and hard-coded to accomplish customer requirements. An initial change of the settings after each power-on can be
omitted. The appropriate settings take place at once.
Serial I/F Connector PC/104 Card POSYS® 18xx series
Only valid for POSYS® 18xx series
The following connector is used during serial communications. The Serial I/F connector is a 5-position Molex PicoBlade (part
46
© POSYS Motion Control GmbH & Co.KG, 2013
no.: 53261-0571) SMD style connector. The counter connector's part no. is: 51021-0500
Pin
Connection
Description
1
SrlEnable
Serial enable (only used for RS422/485)
2
SrlXmt
Serial transmit output
3
SrlRcv
Serial receive input
4
GND
Ground
5
Vcc
+5V
Set/GetSerialPortMode, Serial Port Description
-oCAN 2.0B
CAN 2.0B
The POSYS® 18xx/19xx can integrate into a C AN 2.0B network and will coexist (but not communicate) with CAN 2.0B
nodes on that network. The POSYS® 18xx/19xx uses C AN to receive commands, send responses and (optionally) send
asynchronous event notifications.
The CAN 2.0B connector is a 2-position Molex PicoBlade (part no.: 53261-0271) SMD style connector. The counter
connector's part no. is: 51021-0200
For more information please refer to the pages: CAN (C ontroller Area Network, Konfiguration der CAN2.0B Schnittstelle,
C AN Ereignis Benachrichtigung and Set/GetCanMode)
-oMotor Mode Configuration; POSYS® 18xx
Motor Mode Jumpers „JP1“ and „JP2“
Depending on the model, there are several possibilities of setting up an axis for the one or other type of motor, for
example brushed/brushless servo motors (with or without on-board commutation), microstepping or stepper mode. In a
ddition to the hardware setup you also must setup your software for the one or other motor type. The software commands
are described in the Programmer's manual. The default values after power-on or after a HardReset is for use with brushed
servo motors (exception: POSYS® 185x which is set to stepper mode by default). If a different default is desired then
please contact us for details. It is possible to setup each axis to a default which meets your requirements. These defaults
can be hard-wired to the card.
The following section describes only the hardware configuration for the one or other motor type. The mixed usage is
possible. Please take in consideration that if the one or other motor type was chosen then the other motor type can not be
used unless the hardware and software configuration is changed again. To change the configuration the jumpers JP1 and
JP2 must be set accordingly:
Motor ty pe
Jumper setting
DC Brushed
JP2
DC Brushless
JP2
Microstepping
JP2
Stepper
JP1
JP1 and JP2 exist each of 4 jumpers. Each jumper represents an axis (1, 2, 3 or 4) and is dependant if you purchased a 1,
2, 3 or 4 axes card. The following tables describe the correct jumper positioning for the correct motor output signals for
the connected type of amplifier/driver.
POSYS® 182x
47
© POSYS Motion Control GmbH & Co.KG, 2013
The POSYS® 182x can be setup for use with DC brushed servo motors, DC brushless with internal/external commutation,
microstepping and stepper motors. The following table describes the positions of the jumpers on JP1 and JP2 for use with
the one or other motor type:
Achse
Motor ty pe
DC Brushed Serv o Motor
DC Brushless Serv o Motor
(w/ internal/external Commutation) or
Microstepping Motor
Stepper or
Micostepping Motor
(w/ Microstepping Driv er)
1
JP2 short (first from left); JP1 open
JP1 short (first from left); JP2 open
2
JP2 short (second from left); JP1 open
JP1 short (second from left); JP2 open
3
JP2 short (third from left); JP1 open
JP1 short (third from left); JP2 open
4
JP2 short (fourth from left); JP1 open
JP1 short (fourth from left); JP2 open
POSYS® 185x
The POSYS® 185x can only be setup for use with stepper motors. With the appropriate type of drive this card can be used
with microstepping drives that take the pulse & direction signal and generates the desired microsteps. The following table
describes the positions of the jumpers on JP1 and JP2 for use with this motor type:
Achse
Motor ty pe
DC Brushed Serv o Motor
DC Brushless Serv o Motor
(w/ internal/external Commutation) or
Microstepping Motor
Stepper or
Micostepping Motor
(w/ Microstepping Driv er)
1
n/a
JP1 short (first from left); JP2 open
2
n/a
JP1 short (second from left); JP2 open
3
n/a
JP1 short (third from left); JP2 open
4
n/a
JP1 short (fourth from left); JP2 open
-oBrushed Servo Mode Pinout Description
Pinout description brushed servo and brushless servo version
w/ external commutation
POSYS® 182x:
Pin 1-50 = J5, Pin 51-100 = J6)
C onnectors on the board:
TSM-125-01-T-DV (Samtec)
Mating with: IDSD-25-S
Pin
Connection
Description
Pin
Connection
1
A1+
C hannel A+ encoder signal (X)
51
A3+
C hannel A+ encoder signal (Z)
2
A1-
C hannel A- inverted encoder
signal (X)
52
A3-
C hannel A- inverted encoder
signal (Z)
3
B1+
C hannel B+ encoder signal (X)
53
B3+
C hannel B+ encoder signal (Z)
4
B1-
C hannel B- inverted encoder
signal (X)
54
B3-
C hannel B- inverted encoder
signal (Z)
5
I1+
C hannel I+ encoder signal (X)
55
I3+
C hannel I+ encoder signal (Z)
6
I1-
C hannel I- inverted encoder
signal (X)
56
I3-
C hannel I- inverted encoder
signal (Z)
7
Vc1
+5V
57
Vc1
+5V
8
GND
Ground
58
GND
Ground
9
XPLIM1
Limit switch positive direction
(X)
59
XPLIM3
48
Description
Limit switch positive direction
(Z)
© POSYS Motion Control GmbH & Co.KG, 2013
Pin
Connection
Description
Pin
Connection
10
11
Description
XNLIM1
Limit switch negative direction
(X)
60
XNLIM3
Limit switch negative direction
(Z)
HOME1
Home signal (X) or high speed
latch
61
HOME3
Home signal (Z) or high speed
latch
12
GND
Ground
62
GND
Ground
13
OUT1
User programmable output (X)
63
OUT3
User programmable output (Z)
PWM magnitude (X)
64
BPWM3
PWM sign (X)
65
BPWMS3
14
BPWM1
15
BPWMS1
PWM magnitude (Z)
PWM sign (Z)
16
AXIN1
User programmable input (X)
66
AXIN3
User programmable input (Z)
17
DACV1
Motor command (X), ±10V
signal
67
DACV3
Motor command (Z), ±10V
signal
18
AGND
Ground for motor command
68
AGND
Ground for motor command
19
A2+
C hannel A+ encoder signal (Y)
69
A4+
C hannel A+ encoder signal (W)
20
A2-
C hannel A- inverted encoder
signal (Y)
70
A4-
C hannel A- inverted encoder
signal (W)
21
B2+
C hannel B+ encoder signal (Y)
71
B4+
C hannel B+ encoder signal (W)
22
B2-
C hannel B- inverted encoder
signal (Y)
72
B4-
C hannel B- inverted encoder
signal (W)
23
I2+
C hannel I+ encoder signal (Y)
73
I4+
C hannel I+ encoder signal (W)
24
I2-
C hannel I- inverted encoder
signal (Y)
74
I4-
C hannel I- inverted encoder
signal (W)
25
Vc1
+5V
75
Vc1
+5V
26
GND
Ground
76
GND
Ground
27
XPLIM2
Limit switch positive direction (Y)
77
XPLIM4
Limit switch positive direction
(W)
28
XNLIM2
Limit switch negative direction
(Y)
78
XNLIM4
Limit switch negative direction
(W)
29
HOME2
Home signal (Y) or high speed
latch
79
HOME4
Home signal (W) or high speed
latch
30
OUT2
User programmable output (Y)
80
OUT4
User programmable output (W)
31
BPWM2
PWM magnitude (Y)
81
BPWM4
32
BPWMS2
PWM sign (Y)
82
BPWMS4
33
AXIN2
User programmable input (Y)
83
AXIN4
User programmable input (W)
34
DACV2
Motor command (Y), ±10V
signal
84
DACV4
Motor command (W), ±10V
signal
35
AGND
Ground for motor command
85
AGND
Ground for motor command
36
UI0
uncommitted input (0)
86
UI4
uncommitted input (4)
37
UI1
uncommitted input (1)
87
UI5
uncommitted input (5)
38
UI2
uncommitted input (2)
88
UI6
uncommitted input (6)
39
UI3
uncommitted input (3)
89
UI7
uncommitted input (7)
40
AMPEN1
Amplifier enable (X) or user
programmable output
90
AMPEN3
41
UO0
uncommitted output (0)
91
UO4
uncommitted output (4)
42
UO1
uncommitted output (1)
92
UO5
uncommitted output (5)
43
UO2
uncommitted output (2)
93
UO6
uncommitted output (6)
44
UO3
uncommitted output (3)
94
UO7
uncommitted output (7)
45
AMPEN2
Amplifier enable (Y) or user
programmable output
95
AMPEN4
Amplifier enable (W) or user
programmable output
PWM magnitude (W)
PWM sign (W)
Amplifier enable (Z) or user
programmable output
46
RS-
Hardware reset
96
ANGND
GND for analog inputs
47
Ainput1
analog input channel (0)
97
Ainput5
analog input channel (4)
48
Ainput2
analog input channel (1)
98
Ainput6
analog input channel (5)
49
Ainput3
analog input channel (2)
99
Ainput7
analog input channel (6)
analog input channel (3)
100
Ainput8
analog input channel (7)
50
Ainput4
49
© POSYS Motion Control GmbH & Co.KG, 2013
Inverted Signal Output for Stepper Motor Drives or PWM Output for Servo Motors "J12"
This connector will be available on all POSYS® 1800 versions. It provides stepping motor pulse and direction outputs or
PWM sign/magnitude outputs using line drivers. Most modern stepping motor drivers require step and direction inputs with
inverted signals. It helps in regard to higher noise immunity. This means there is less of a chance of mispositioning due to
noise signals on the drive of the stepping motor.
Depending on how the axis was configured (stepper or servo with PWM) the outputs have different meanings.
Pin
1
Description
GND
Pin
2
W axis, Pulse + or
3
PWMMag4A+
PWMSign1+
PWMSign4+
PWMMag2A+
PWMSign3+
PWMMag1A+
PWMSign2+
19
PWMMag3A+
GND
PWMMag1A+
Y axis, Direction - or
16
Z axis, Pulse + or
17
PWMSign3X axis, Pulse - or
14
Y axis, Direction + or
15
PWMMag2AZ axis, Direction - or
12
X axis, Pulse + or
13
PWMSign4Y axis, Pulse - or
10
Z axis, Direction + or
11
PWMSign1W axis, Direction - or
8
Y axis, Pulse + or
9
PWMMag4AX axis, Direction - or
6
W axis, Direction + or
7
GND
W axis, Pulse - or
4
X axis, Direction + or
5
Description
PWMSign2Z axis, Pulse - or
18
20
PWMMagA3GND
-oBrushless Servo/Microstepping Mode Pinout Description
Pinout description in brushless servo w/ internal commutation,
microstepping and multiple motor mode
POSYS® 182x:
Pin 1-50 = J5, Pin 51-100 = J6
C onnectors on the board:
TSM-125-01-T-DV (Samtec)
Mating with: IDSD-25-S
Pin
Connection
Description
Pin
Connection
1
2
A1+
C hannel A+ encoder signal (X)
51
A3+
C hannel A+ encoder signal (Z)
A1-
C hannel A- inverted encoder
signal (X)
52
A3-
C hannel A- inverted encoder
signal (Z)
3
B1+
C hannel B+ encoder signal (X)
53
B3+
C hannel B+ encoder signal (Z)
4
B1-
C hannel B- inverted encoder
signal (X)
54
B3-
C hannel B- inverted encoder
signal (Z)
5
I1+
C hannel I+ encoder signal (X)
55
I3+
C hannel I+ encoder signal (Z)
6
I1-
C hannel I- inverted encoder
signal (X)
56
I3-
C hannel I- inverted encoder
signal (Z)
7
Vc1
+5V
57
Vc1
+5V
50
Description
© POSYS Motion Control GmbH & Co.KG, 2013
Pin
Connection
Description
Pin
Connection
Description
8
GND
Ground
58
GND
9
XPLIM1
Limit switch positive direction
(X)
59
XPLIM3
Limit switch positive direction
(Z)
10
XNLIM1
Limit switch negative direction
(X)
60
XNLIM3
Limit switch negative direction
(Z)
11
HOME1
Home signal (X) or high speed
latch
61
HOME3
Home signal (Z) or high speed
latch
12
GND
Ground
62
GND
Ground
13
OUT1
User programmable output (X)
63
OUT3
User programmable output (Z)
14
n.c.
No connection.
64
n.c.
No connection
15
n.c.
No connection
65
n.c.
No connection
16
AXIN1
User programmable input (X)
66
AXIN3
User programmable input (Z)
17
DAC1A
Motor command (X), ±10V
signal
67
DAC3A
Motor command (Z), ±10V
signal
18
AGND
Ground for motor command
68
AGND
Ground for motor command
19
A2+
C hannel A+ encoder signal (Y)
69
A4+
C hannel A+ encoder signal (W)
20
A2-
C hannel A- inverted encoder
signal (Y)
70
A4-
C hannel A- inverted encoder
signal (W)
21
B2+
C hannel B+ encoder signal (Y)
71
B4+
C hannel B+ encoder signal (W)
22
B2-
C hannel B- inverted encoder
signal (Y)
72
B4-
C hannel B- inverted encoder
signal (W)
23
I2+
C hannel I+ encoder signal (Y)
73
I4+
C hannel I+ encoder signal (W)
24
I2-
C hannel I- inverted encoder
signal (Y)
74
I4-
C hannel I- inverted encoder
signal (W)
25
Vc1
+5V
75
Vc1
+5V
26
GND
Ground
76
GND
Ground
27
XPLIM2
Limit switch positive direction (Y)
77
XPLIM4
Limit switch positive direction
(W)
28
XNLIM2
Limit switch negative direction
(Y)
78
XNLIM4
Limit switch negative direction
(W)
29
HOME2
Home signal (Y) or high speed
latch
79
HOME4
Home signal (W) or high speed
latch
30
OUT2
User programmable output (Y)
80
OUT4
User programmable output (W)
31
n.c.
No connection
81
n.c.
No connection
32
n.c.
No connection
82
n.c.
No connection
33
AXIN2
User programmable input (Y)
83
AXIN4
User programmable input (W)
34
DAC2A
Motor command (Y), ±10V
signal
84
DAC4A
Motor command (W), ±10V
signal
35
AGND
Ground for motor command
85
AGND
Ground for motor command
36
UI0
uncommitted input (0)
86
UI4
uncommitted input (4)
37
UI1
uncommitted input (1)
87
UI5
uncommitted input (5)
38
UI2
uncommitted input (2)
88
UI6
uncommitted input (6)
39
UI3
uncommitted input (3)
89
UI7
uncommitted input (7)
40
AMPEN1
Amplifier enable (X) or user
programmable output
90
AMPEN3
41
UO0
uncommitted output (0)
91
UO4
uncommitted output (4)
42
UO1
uncommitted output (1)
92
UO5
uncommitted output (5)
43
UO2
uncommitted output (2)
93
UO6
uncommitted output (6)
44
UO3
uncommitted output (3)
94
UO7
uncommitted output (7)
45
AMPEN2
Amplifier enable (Y) or user
programmable output
95
AMPEN4
Amplifier enable (W) or user
programmable output
46
RS-
Hardware reset
96
ANGND
GND for analog inputs
47
Ainput1
analog input channel (0)
97
Ainput5
analog input channel (4)
48
Ainput2
analog input channel (1)
98
Ainput6
analog input channel (5)
51
Ground
Amplifier enable (Z) or user
programmable output
© POSYS Motion Control GmbH & Co.KG, 2013
Pin
Connection
49
Ainput3
50
Ainput4
Description
Pin
Connection
Description
analog input channel (2)
99
Ainput7
analog input channel (6)
analog input channel (3)
100
Ainput8
analog input channel (7)
Inverted Signal Output for Stepper Motor Drives or PWM Output for Servo Motors "J12"
This connector will be available on all POSYS® 1800 versions. It provides stepping motor pulse and direction outputs or
PWM sign/magnitude outputs using line drivers. Most modern stepping motor drivers require step and direction inputs with
inverted signals. It helps in regard to higher noise immunity. This means there is less of a chance of mispositioning due to
noise signals on the drive of the stepping motor.
Depending on how the axis was configured (stepper or servo with PWM) the outputs have different meanings.
Pin
1
Description
GND
Pin
2
W axis, Pulse + or
3
PWMMag4A+
PWMSign1+
PWMSign4+
PWMMag2A+
PWMSign3+
PWMMag1A+
PWMSign2+
19
PWMMag3A+
GND
PWMMag1A+
Y axis, Direction - or
16
Z axis, Pulse + or
17
PWMSign3X axis, Pulse - or
14
Y axis, Direction + or
15
PWMMag2AZ axis, Direction - or
12
X axis, Pulse + or
13
PWMSign4Y axis, Pulse - or
10
Z axis, Direction + or
11
PWMSign1W axis, Direction - or
8
Y axis, Pulse + or
9
PWMMag4AX axis, Direction - or
6
W axis, Direction + or
7
GND
W axis, Pulse - or
4
X axis, Direction + or
5
Description
PWMSign2Z axis, Pulse - or
18
20
PWMMagA3GND
Pinout description brushless servo and multiple motor mode:
Option Connector PC/104
NOTE: only POSYS® 182x (J9)
Pin
Connection
Description
Pin
Connection
1
BPWM1A
PWM magnitude Phase A (X)
26
HALL2B
Description
Phase B Hall Sensor input (Y)
2
BPWM1B
PWM magnitude Phase B (X)
27
HALL2C
Phase C Hall Sensor input (Y)
3
BPWM1C
PWM magnitude Phase C (X)
28
GND
4
BPWMS1A
PWM sign (X)
29
HALL3A
Phase A Hall Sensor input (Z)
5
GND
Ground
30
HALL3B
Phase B Hall Sensor input (Z)
6
BPWM2A
PWM magnitude Phase A (Y)
31
HALL3C
Phase C Hall Sensor input (Z)
7
BPWM2B
PWM magnitude Phase B (Y)
32
GND
8
BPWM2C
PWM magnitude Phase C (Y)
33
HALL4A
Phase A Hall Sensor input (W)
9
BPWMS2A
PWM sign (Y)
34
HALL4B
Phase B Hall Sensor input (W)
Phase C Hall Sensor input (W)
Ground
Ground
10
GND
Ground
35
HALL4C
11
BPWM3A
PWM magnitude Phase A (Z)
36
GND
12
BPWM3B
PWM magnitude Phase B (Z)
37
AGND
Ground for motor command
13
BPWM3C
PWM magnitude Phase C (Z)
38
DAC1A
Motor command (X), ±10V
signal, Phase A
52
Ground
© POSYS Motion Control GmbH & Co.KG, 2013
Pin
Connection
Description
Pin
Connection
14
BPWMS3A
PWM sign (Z)
39
DAC2A
Motor command (Y), ±10V
signal, Phase A
15
GND
Ground
40
DAC3A
Motor command (Z), ±10V
signal, Phase A
16
BPWM4A
PWM magnitude Phase A (W)
41
DAC4A
Motor command (W), ±10V
signal, Phase A
17
BPWM4B
PWM magnitude Phase B (W)
42
DAC1B
Motor command (X), ±10V
signal, Phase B
18
BPWM4C
PWM magnitude Phase C (W)
43
DAC2B
Motor command (Y), ±10V
signal, Phase B
19
BPWMS4A
PWM sign (W)
44
DAC3B
Motor command (Z), ±10V
signal, Phase B
20
GND
Ground
45
DAC4B
Motor command (W), ±10V
signal, Phase B
21
HALL1A
Phase A Hall Sensor input (X)
46
AGND
Ground for motor command
22
HALL1B
Phase B Hall Sensor input (X)
47
GND
Ground
23
HALL1C
Phase C Hall Sensor input (X)
48
GND
Ground
Ground
49
Vc1
+5V
Phase A Hall Sensor input (Y)
50
Vc1
+5V
24
GND
25
HALL2A
Description
-oStepper Mode Pinout Description
Pinout description stepper/microstepping* version
POSYS® 180x/182x/185x: Pin 1-50 = J5, Pin 51-100 = J6
C onnectors on the board:
TSM-125-01-T-DV (Samtec)
Mating with: IDSD-25-S
Pin
Connection
Description
Pin
Connection
1
A1+
C hannel A+ encoder signal (X)
51
A3+
C hannel A+ encoder signal (Z)
2
A1-
C hannel A- inverted encoder
signal (X)
52
A3-
C hannel A- inverted encoder
signal (Z)
3
B1+
C hannel B+ encoder signal (X)
53
B3+
C hannel B+ encoder signal (Z)
4
B1-
C hannel B- inverted encoder
signal (X)
54
B3-
C hannel B- inverted encoder
signal (Z)
5
I1+
C hannel I+ encoder signal (X)
55
I3+
C hannel I+ encoder signal (Z)
6
I1-
C hannel I- inverted encoder
signal (X)
56
I3-
C hannel I- inverted encoder
signal (Z)
7
Vc1
+5V
57
Vc1
+5V
8
GND
Ground
58
GND
Ground
9
XPLIM1
Limit switch positive direction
(X)
59
XPLIM3
Limit switch positive direction
(Z)
10
XNLIM1
Limit switch negative direction
(X)
60
XNLIM3
Limit switch negative direction
(Z)
11
HOME1
Home signal (X) or high speed
latch
61
HOME3
Home signal (Z) or high speed
latch
12
GND
Ground
62
GND
Ground
13
OUT1
User programmable output (X)
63
OUT3
User programmable output (Z)
14
PULSE1
Pulse (X)
64
PULSE3
Direction (X)
65
DIR3
User programmable input (X)
66
AXIN3
At Rest (X)
67
ATREST3
15
DIR1
16
AXIN1
17
ATREST1
53
Description
Pulse (Z)
Direction (Z)
User programmable input (Z)
At Rest (Z)
© POSYS Motion Control GmbH & Co.KG, 2013
Pin
Connection
Description
Pin
Connection
18
19
Description
GND
Ground
68
GND
Ground
A2+
C hannel A+ encoder signal (Y)
69
A4+
C hannel A+ encoder signal (W)
20
A2-
C hannel A- inverted encoder
signal (Y)
70
A4-
C hannel A- inverted encoder
signal (W)
21
B2+
C hannel B+ encoder signal (Y)
71
B4+
C hannel B+ encoder signal (W)
22
B2-
C hannel B- inverted encoder
signal (Y)
72
B4-
C hannel B- inverted encoder
signal (W)
23
I2+
C hannel I+ encoder signal (Y)
73
I4+
C hannel I+ encoder signal (W)
24
I2-
C hannel I- inverted encoder
signal (Y)
74
I4-
C hannel I- inverted encoder
signal (W)
25
Vc1
+5V
75
Vc1
+5V
26
GND
Ground
76
GND
Ground
27
XPLIM2
Limit switch positive direction (Y)
77
XPLIM4
Limit switch positive direction
(W)
28
XNLIM2
Limit switch negative direction
(Y)
78
XNLIM4
Limit switch negative direction
(W)
29
HOME2
Home signal (Y) or high speed
latch
79
HOME4
Home signal (W) or high speed
latch
30
OUT2
User programmable output (Y)
80
OUT4
User programmable output (W)
31
PULSE2
Pulse (Y)
81
PULSE4
Direction (Y)
82
DIR4
User programmable input (Y)
83
AXIN4
Pulse (W)
32
DIR2
33
AXIN2
Direction (W)
34
ATREST2
At Rest (Y)
84
ATREST4
35
GND
Ground
85
GND
Ground
36
UI0
uncommitted input (0)
86
UI4
uncommitted input (4)
37
UI1
uncommitted input (1)
87
UI5
uncommitted input (5)
38
UI2
uncommitted input (2)
88
UI6
uncommitted input (6)
39
UI3
uncommitted input (3)
89
UI7
uncommitted input (7)
40
AMPEN1
Amplifier enable (X) or user
programmable output
90
AMPEN3
41
UO0
uncommitted output (0)
91
UO4
uncommitted output (4)
42
UO1
uncommitted output (1)
92
UO5
uncommitted output (5)
43
UO2
uncommitted output (2)
93
UO6
uncommitted output (6)
44
UO3
uncommitted output (3)
94
UO7
uncommitted output (7)
45
AMPEN2
Amplifier enable (Y) or user
programmable output
95
AMPEN4
Amplifier enable (W) or user
programmable output
User programmable input (W)
At Rest (W)
Amplifier enable (Z) or user
programmable output
46
RS-
Hardware reset
96
ANGND
GND for analog inputs
47
Ainput1
analog input channel (0)
97
Ainput5
analog input channel (4)
48
Ainput2
analog input channel (1)
98
Ainput6
analog input channel (5)
49
Ainput3
analog input channel (2)
99
Ainput7
analog input channel (6)
Ainput8
analog input channel (7)
50
Ainput4
analog input channel (3)
100
*Microstepping with appropriate type driver when using 180x or 185x.
Inverted Signal Output for Stepper Motor Drives "J12"
This connector will be available on all POSYS® 1800 versions. It provides stepping motor pulse and direction outputs using
line drivers. Most modern stepping motor drivers require step and direction inputs with inverted signals. It helps in regard
to higher noise immunity. This means there is less of a chance of mispositioning due to noise signals on the drive of the
stepping motor.
Pin
Description
Pin
Description
1
GND
2
GND
3
W axis, Pulse +
4
W axis, Pulse -
5
X axis, Direction +
6
X axis, Direction -
54
© POSYS Motion Control GmbH & Co.KG, 2013
Pin
Description
Pin
Description
7
W axis, Direction +
8
W axis, Direction -
9
Y axis, Pulse +
10
Y axis, Pulse -
11
Z axis, Direction +
12
Z axis, Direction -
13
X axis, Pulse +
14
X axis, Pulse -
15
Y axis, Direction +
16
Y axis, Direction -
17
Z axis, Pulse +
18
Z axis, Pulse -
19
GND
20
GND
-oAnalog Input Pinout Description; POSYS® 1800
Analog Input Pinout description (only valid for POSYS® 1800)
J5 Pin-Out
Description
Explanation
47
Analog Input 1
Analog input for channel (0)
48
Analog Input 2
Analog input for channel (1)
49
Analog Input 3
Analog input for channel (2)
50
Analog Input 4
Analog input for channel (3)
J6 Pin-Out
Description
Explanation
47
Analog Input 5
Analog input for channel (4)
48
Analog Input 6
Analog input for channel (5)
49
Analog Input 7
Analog input for channel (6)
50
Analog Input 8
Analog input for channel (7)
The analog input voltage for the 8 channels can range from 0-2.048 VDC, the resolution is 10 bits.
ReadAnalog(channel)
C hannel = 0-7 for the 8 inputs.
To display the returned value in volts, use the following conversion:
AnalogInputVoltage = (ReadAnalog(channel) / 65536) * 2.048
This scales the returned value to the correct voltage.
If other than the standard input voltage is desired then we can offer optional input voltages at following rates: 1.8V, 2.5V,
3.0V and 3.3V.
-oUsage of the On-Board Dual Port RAM with POSYS® 1800
POSYS® 1800 Series (PC-104 Bus), Dual Port RAM
This TN describes the usage of the POSYS® 1800 with dual port RAM. The POSYS® 1800 can be equipped with single port
RAM (512K x 8 and 1024k x 8) or dual port RAM with 16K x 16, 32K x 16 or 64k x 16. One data position occupies 4 bytes
(32 bits). So the dual port RAM can store up to 8191 DWORDS (16k x 16). Applications requiring fast data transfer and
access should use units with dual port RAM. Writing and reading the dual port RAM is much faster, requiring approximately
55
© POSYS Motion Control GmbH & Co.KG, 2013
2 microseconds to read or write a DWORD. The time for a single port RAM write or read is approximately 52 microseconds.
The Dual Port RAM is appoximately 26 times as fast as the Single Port RAM. This TN describes the usage of the POSYS®
1800 with dual port RAM.
The applications include storing trace data written to the dual port RAM by the motion processor and being read
continuously by the host program using the other port. The storage capability is infinite. Another application is the use of
the dual port RAM as a data storage for motion control. Storing velocity, acceleration, jerk, position and a time multiplier
for up to 4 axes in the EXTERNAL profile mode allows very complex motion profiles with an infinite length. When the buffer
gets to the end it will roll over and read new data.
For the PC-104 bus (same as the ISA bus) the Dual Port RAM is memory mapped in the Upper Memory Block area of the
ISA bus. This is typically between 640 K and 1024 K. This is the only area available to be used for storing and retrieving
data from, being protected from programs and data storage below 640 K. The area above 640 K is sectioned into 6
segments of 64 K each. The segments are defined as:
A000 : 0000
;the first part 0xA000 is the segment (=40960 decimal), the second part is the offset, ranging
from 0x0000 to 0xFFFF (0 to 65535 decimal). This corresponds to a linear address of 0xA000 x
0x010 = 0xA0000 plus offset.
B000 : 0000
C 000 : 0000
D000 : 0000
E000 : 0000
F000 : 0000
Not all of these address ranges are available for add-on ISA (PC-104) bus cards.
The table below shows the layout of the upper memory area and the way that the various memory locations are typically
used in a modern PC:
Address
A0000AFF FF h
F irst 16K
(x0000h-x3FF Fh)
Second 16K
(x4000h-x7FF Fh)
Third 16K
(x8000h-xBFF Fh)
F ourth 16K
(xC000h-xF FF Fh)
VGA Graphics Mode Video RAM
B0000BFFFF h
VGA Monochrome Text Mode Video RAM
C0000CFF FF h
VGA Video BIOS ROM
VGA C olor Text Mode Video RAM
IDE Hard Disk BIOS
ROM
Optional Adapter ROM
BIOS or RAM UMBs
D0000DFF FF h
Optional Adapter ROM BIOS or RAM UMBs
E0000hEFF FF h
System BIOS Plug and Play Extended Information
F 0000F FF FF h
System BIOS ROM
This is a typical example only. The actual useage will vary from system to system. Experience has shown that the most
commonly available ranges are:
B0000 – BFFFFh
C 0000 – CFFFFh
most common
D0000 – DFFFFh
most common
E0000 – EFFFFh
The above ranges are 65535 bytes, the POSYS® 1800 dual port RAM requires only one half of that, 0x7FFF (32767) bytes
when equipped with 16k x 16 DPRAM.
To determine availability use a diagnostic program to analyse the system. One program, which is not provided as part of
the POSYS® 1800 software package is the Microsoft MSD.EXE program. This program is copyright protected and is part of
the MS DOS 6.22 distribution. It is on the second disk of the three disk set. It is normally also included with Windows 9x
distributions. It can be located in the directories \TOOLS\OLDMSDOS=MSD v2.14 and \OTHER\MSD=MSD v2.13. It is a
DOS based program and provides useful information about this system and the submenu MEMORY will show available
memory areas between 640 K and 1024 K. MSD.EXE works for systems using a DOS or a Windows operating system.
The matching base memory address must be set using DIP switch SW2. The minimum range setting is 32767 bytes.
Switches 1, 2 and 3 must always be in the ON position. Switches 4, 5, 6, 7 and 8 set the base memory address. The
address associated with each switch set to the OFF position is shown in the following table:
56
© POSYS Motion Control GmbH & Co.KG, 2013
SW2 -S4
SW2-S5
SW2-S6
SW2-S7
SW2-S8
32767
(0x8000)
65536
(0x10000)
131072
(0x20000)
262144
(0x40000)
524288
(0x80000)
The next table shows DIP switch settings for the most common base memory address selections:
Base Memory Range
(Hex)
SW2-S4
SW2-S5
SW2-S6
SW2-S7
SW2-S8
B0000 – B7FFF
ON
OFF
OFF
ON
OFF
B8000 - BFFFF
OFF
OFF
OFF
ON
OFF
C 0000 – C 7FFF
ON
ON
ON
OFF
OFF
C 8000 - CFFFF
OFF
ON
ON
OFF
OFF
D0000 – D7FFF
ON
OFF
ON
OFF
OFF
D8000 – DFFFF
OFF
OFF
ON
OFF
OFF
E0000 – E7FFF
ON
ON
OFF
OFF
OFF
E8000 – EFFFF
OFF
ON
OFF
OFF
OFF
For DOS based programs refer to the example program Test1800.exe to see how to read and write to the Dual Port RAM.
This is a C-program using the peek and poke functions. For example this procedure writes 0 to finalpos DWORD locations:
ofs=0;
for (ii=0; ii<(finalpos+1); ii++)
{
poke(base_memory,ofs,((WORD2LONG*)&value)->wordhi);
ofs=ofs+2;
poke(base_memory,ofs,((WORD2LONG*)&value)->wordlo);
ofs=ofs+2;
}
writes first the high word and then the low word to base_memory + ofs to store a DWORD.
The next C routine is an example for reading from the Dual Port RAM 0 to finalpos DWORDs:
ofs=0;
for (ii=0; ii<(finalpos+1); ii++)
{
value1 = peek(base_memory,ofs);
ofs=ofs+2;
value2 = peek(base_memory,ofs);
ofs=ofs+2;
value=GetDWORD(value1,value2);
printf("Value read: %lx\n",value);
}
The following type definition and functions are needed for the above routines:
typedef struct {
unsigned short wordlo,wordhi;
} WORD2LONG;
//conversion of 2 WORD values to a DWORD
LONG GetDWORD(unsigned short val_1,unsigned short val_2)
{
LONG temp;
temp=0;
((WORD2LONG*)&temp)->wordhi=val_1;
((WORD2LONG*)&temp)->wordlo=val_2;
return (temp);
}/**********************************/
After power-on the dual port RAM is disabled, so the BIOS will not see it and possibly cause hang-ups during initialization.
57
© POSYS Motion Control GmbH & Co.KG, 2013
After power-on the RAM can only be used in single port RAM mode. All writes and reads are via the motion controller. To
enable the dual port RAM use the Funktion
EnableDPRam(void)
EnableDPRam(hPosys:P1800_Handle);stdcall
//DOS
//Windows DLL
It can be disabled again anytime by using the function
DisableDPRam(void)
DisableDPRam(hPosys:P1800_Handle);stdcall
//DOS
//Windows DLL
A hardware Reset of the motion controller will also disable the dual port RAM function. The function
EnableDPRam(void)
EnableDPRam(hPosys:P1800_Handle);stdcall
//DOS
//Windows DLL
will re-enable the dual port RAM functionality after a hardware Reset or an ISA-Bus Reset.
In a Windows operating system the above routines will not work since the processor is in protected mode direct IO and
memory access is not possible. For Windows 98/Me and 2000/XP you must use the supplied DLL for accessing IO and
memory. The GUI program POSYS1800V4 makes use of the DLL routines and permits to exercise most of POSYS® 1800
functions.
For details please refer to separate documentation for using the on-board memory.
Hints to define available Memory Space
Note: the hints below are only valid for Microsoft operating systems as these operating systems, beginning
with DOS upto Windows XP, make problems when using Dual Port RAM via ISA-Bus, because they still reserve
memory areas for exclusive use in the range between 640k and 1MB and the usage can vary from computer to
computer.
Linux based operating systems work perfectly when using our driver provided with the software package for
Linux, no matter which area is selected as far as the PC will accept a ISA-Bus/PC-104-Bus based card with
Dual Port RAM. This also is not supported from all systems and may need to be evaluated before decision has
been made for a certain PC-system.
Each computer behaves different especially when it uses the Upper Memory Area (640k - 1MB). The usage of this area is
also determined by the operating system.
For example: the same computer when using MSDOS 6.22 may have more available area than when using DRDOS 7.03
which may make it necessary to change the memory address area on the POSYS® 1800. On a different computer it may
be the other way round.
Allthough MSD.EXE is very useful for determining available memory space it is not always 100% reliable and shows areas
to be available which are actually not available, but it still gives useful information which area may be usable and which
may not.
Unfortunately we made the experience that areas being shown as to be used by other software/components were available
but areas to be shown as available did not work. For this reason if you detemine a certain area to be free for use with Dual
Port RAM and it doesn't work, then just try other areas as they may work.
Dependent on the computer it may also be necessary to reserve certain memory areas already by determining the space in
the BIOS. Some computers offer the possibility to reserve the areas for use, but others may not have this feature and still
will work and others again don't care no matter to which setting the BIOS was set.
Another problem may be that not much upper memory is available, especially when you want to use additional boards. The
more POSYS® 1800 or other boards with Dual Port RAM are installed the less possibilities you have to reserve memory
space for the POSYS® 1800 and to get them all running. For this situation we can offer a very useful hint to avoid running
into problems with low UMAs. For more information please contact servo-Halbeck GmbH & Co.KG.
If you wish to avoid the effort determining available memory space then we can offer the POSYS® 1800 with 512 KB
Single Port RAM. When it is necessary to use additional boards in the same system this may be the only reliable solution.
For more information regarding Dual Port RAM with POSYS® 1800 please contact us directly.
Date: 28.04.2005
Revision: 09.05.2005
18.05.2005
E-mail: [email protected]
POSYS® is a registered trade mark of servo-Halbeck
58
© POSYS Motion Control GmbH & Co.KG, 2013
-o-
59
© POSYS Motion Control GmbH & Co.KG, 2013
POSYS® 9xx
Versions 9xx
List of available versions
POSYS® 90x for brushed servo motors.
The POSYS® 90x can be used as well for brushless servo motors when the appropriate type of amplifier is used.
Model
# of Axes
POSYS® 902
2
POSYS® 904
4
POSYS® 95x for stepper motors
The POSYS® 95x can be used as well for microstepping motors when the appropriate type of driver is used.
Model
# of Axes
POSYS® 952
2
POSYS® 954
4
All versions are also available for extended temperature range (-40° - +95°C ). Not in stock. Please add for order "I" to the
model number (for example: 904-BI).
-oUser settable components; POSYS® 9xx
User settable Components; POSYS® 9xx
The figure below shows the locations of the principal components of the POSYS 9xx cards. The component side of the
board is shown with the 100-position connector to the right. All component locations in this manual refer to this
orientation.
The important user-accessible components of the card are:

Resistor Packs RS1, RS2, and RS3 set the Encoder termination

Mode jumper allows theserial interfaceport mode to be selected

Sync I/O for multiple card synchronization
60
© POSYS Motion Control GmbH & Co.KG, 2013
Abbildung zeigt POSYS® 9xx
Resistor Packs RS1, RS2, RS3
The following table shows the function of the RS1-RS3 resistor packs
Item
What to set
Description
Resistor packs - RS1,
RS2, RS3
Installed
This is the default setting of
resistor packs RS1-RS3
If you are using differential connections leave these resistor
packs installed.
Remove if you are not using
differential encoders
If you are using single-ended encoder connections, remove the
resistor packs.
If TTL as well as oncoders with inverted signals are going to be used then please look-up page
Resistor Networks for TTL or
inverted Encoder Signalsfor details on how to setup the resistor networks for mixed usage.
Mode Jumper JP4
The following table describes the meaning of the Mode Jumper. Actually it is not necessary anymore to change this jumper
for use with either communication mode. Both methods work on either position, PC I and serial. This jumper is only on the
PC /104 8xx-B-series and PC I cards.
Item
What to set
Description
Mode Jumper - JP4
1-2
This is the default setting of
mode jumper
Sets PC I bus to be main communications channel.
2-3
Serial port is primary communication channel
Parallel Input Connector "J1"
Pin No.
Description
Pin No.
Description
1
GND
2
A0
3
DS0
4
A1
5
DS1
6
A2
61
© POSYS Motion Control GmbH & Co.KG, 2013
Pin No.
Description
Pin No.
Description
7
DS2
8
A3
9
DS3
10
A4
11
DS4
12
A5
13
DS5
14
A6
15
DS6
16
A7
17
DS7
18
A8
19
DS8
20
A9
21
DS9
22
A10
23
DS10
24
A11
25
DS11
26
A12
27
DS12
28
A13
29
DS13
30
A14
31
DS14
32
A15
33
DS15
34
IS-
35
DS-
36
STRB-
37
WE-
38
VC C
39
R/W
40
PS-
-oSerial Port
Serial Port
This module and associated signals provides the capability to operate the POSYS® card using an asynchronous serial port
(only PC/104 8xx-B/18xx/18xx-B and PCI cards), or to allow certain monitoring operations to be performed through the
serial port, even while the PCI bus is used to command motion sequences. To operate the serial port as the primary
communication channel to the card please refer to chapter „Host Communication – Serial Port“.
The serial cable is optional. Please contact us if you wish to connect via RS232 to the POSYS®.
The following connector is used during serial communications. The Serial I/F connector is a 5-position Molex PicoBlade SMD
style connector (Molex part no.: 53398-0571) for the PCI cards POSYS® 9xx, 19xx and for the PC/104 card POSYS®
18xx/18xx-B or 6-position connector for the PC/104 B-series. The counter connector for the cable for the PCI cards is a
female connector from Molex (Molex part no.: 51021-0500).
The default serial communication settings after power-on are:
speed: 9600 baud/s.
parity: none
stop bits: 1
protocol: point-to-point
If different than the standard power-on settings are desired, please contact servo-Halbeck. These values can be changed
and hard-coded to accomplish customer requirements. An initial change of the settings after each power-on can be
omitted. The appropriate settings take place at once.
Serial I/F Connector PCI Card POSYS® 9xx series
The following connector is used during serial communications. The Serial I/F connector is a 5-position Molex PicoBlade (part
no.: 53261-0571) SMD style connector. The counter connector's part no. is: 51021-0500
Pin
Connection
Description
1
SrlEnable
Serial enable (only used for RS422/485)
2
SrlXmt
Serial transmit output
3
SrlRcv
Serial receive input
4
GND
Ground
62
© POSYS Motion Control GmbH & Co.KG, 2013
Pin
Connection
Description
5
Vcc
+5V
Set/GetSerialPortMode, Serial Port Description
-oBrushed Servo Mode Pinout Description
Pinout description brushed servo and brushless servo w/
external commutation
POSYS® 90x
Pin
Connection
Description
Pin
Connection
1
2
Description
A1+
C hannel A+ encoder signal (X)
51
A3+
C hannel A+ encoder signal (Z)
A1-
C hannel A- inverted encoder
signal (X)
52
A3-
C hannel A- inverted encoder
signal (Z)
3
B1+
C hannel B+ encoder signal (X)
53
B3+
C hannel B+ encoder signal (Z)
4
B1-
C hannel B- inverted encoder
signal (X)
54
B3-
C hannel B- inverted encoder
signal (Z)
5
I1+
C hannel I+ encoder signal (X)
55
I3+
C hannel I+ encoder signal (Z)
6
I1-
C hannel I- inverted encoder
signal (X)
56
I3-
C hannel I- inverted encoder
signal (Z)
7
Vc1
+5V
57
Vc1
+5V
8
GND
Ground
58
GND
Ground
9
XPLIM1
Limit switch positive direction
(X)
59
XPLIM3
Limit switch positive direction
(Z)
10
XNLIM1
Limit switch negative direction
(X)
60
XNLIM3
Limit switch negative direction
(Z)
11
HOME1
Home signal (X) or high speed
latch
61
HOME3
Home signal (Z) or high speed
latch
12
GND
Ground
62
GND
Ground
13
OUT1
User programmable output (X)
63
OUT3
User programmable output (Z)
PWM magnitude (X)
64
BPWM3
PWM sign (X)
65
BPWMS3
14
BPWM1
15
BPWMS1
PWM magnitude (Z)
PWM sign (Z)
16
AXIN1
User programmable input (X)
66
AXIN3
User programmable input (Z)
17
DACV1
Motor command (X), ±10V
signal
67
DACV3
Motor command (Z), ±10V
signal
18
AGND
Ground for motor command
68
AGND
Ground for motor command
19
A2+
C hannel A+ encoder signal (Y)
69
A4+
C hannel A+ encoder signal (W)
20
A2-
C hannel A- inverted encoder
signal (Y)
70
A4-
C hannel A- inverted encoder
signal (W)
21
B2+
C hannel B+ encoder signal (Y)
71
B4+
C hannel B+ encoder signal (W)
22
B2-
C hannel B- inverted encoder
signal (Y)
72
B4-
C hannel B- inverted encoder
signal (W)
23
I2+
C hannel I+ encoder signal (Y)
73
I4+
C hannel I+ encoder signal (W)
24
I2-
C hannel I- inverted encoder
signal (Y)
74
I4-
C hannel I- inverted encoder
signal (W)
25
Vc1
+5V
75
Vc1
+5V
26
GND
Ground
76
GND
Ground
27
XPLIM2
Limit switch positive direction (Y)
77
XPLIM4
Limit switch positive direction
(W)
28
XNLIM2
Limit switch negative direction
(Y)
78
XNLIM4
Limit switch negative direction
(W)
63
© POSYS Motion Control GmbH & Co.KG, 2013
Pin
Connection
Description
Pin
Connection
29
Description
HOME2
Home signal (Y) or high speed
latch
79
HOME4
Home signal (W) or high speed
latch
30
OUT2
User programmable output (Y)
80
OUT4
User programmable output (W)
31
BPWM2
PWM magnitude (Y)
81
BPWM4
32
BPWMS2
PWM sign (Y)
82
BPWMS4
33
AXIN2
User programmable input (Y)
83
AXIN4
User programmable input (W)
34
DACV2
Motor command (Y), ±10V
signal
84
DACV4
Motor command (W), ±10V
signal
35
AGND
Ground for motor command
85
AGND
Ground for motor command
36
UI0
uncommitted input (0)
86
UI4
uncommitted input (4)
37
UI1
uncommitted input (1)
87
UI5
uncommitted input (5)
38
UI2
uncommitted input (2)
88
UI6
uncommitted input (6)
39
UI3
uncommitted input (3)
89
UI7
uncommitted input (7)
40
AMPEN1
Amplifier enable (X) or user
programmable output
90
AMPEN3
41
UO0
uncommitted output (0)
91
UO4
uncommitted output (4)
42
UO1
uncommitted output (1)
92
UO5
uncommitted output (5)
43
UO2
uncommitted output (2)
93
UO6
uncommitted output (6)
44
UO3
uncommitted output (3)
94
UO7
uncommitted output (7)
45
AMPEN2
Amplifier enable (Y) or user
programmable output
95
AMPEN4
Amplifier enable (W) or user
programmable output
46
RS-
Hardware reset
96
ANGND
GND for analog inputs
47
Ainput1
analog input channel (0)
97
Ainput5
analog input channel (4)
48
Ainput2
analog input channel (1)
98
Ainput6
analog input channel (5)
49
Ainput3
analog input channel (2)
99
Ainput7
analog input channel (6)
50
Ainput4
analog input channel (3)
100
Ainput8
analog input channel (7)
PWM magnitude (W)
PWM sign (W)
Amplifier enable (Z) or user
programmable output
-oStepper Version Pinout Description
Pinout description stepper/microstepping* version
POSYS® 95x
Pin
Connection
Description
Pin
Connection
1
2
A1+
C hannel A+ encoder signal (X)
51
A3+
C hannel A+ encoder signal (Z)
A1-
C hannel A- inverted encoder
signal (X)
52
A3-
C hannel A- inverted encoder
signal (Z)
3
B1+
C hannel B+ encoder signal (X)
53
B3+
C hannel B+ encoder signal (Z)
4
B1-
C hannel B- inverted encoder
signal (X)
54
B3-
C hannel B- inverted encoder
signal (Z)
5
I1+
C hannel I+ encoder signal (X)
55
I3+
C hannel I+ encoder signal (Z)
6
I1-
C hannel I- inverted encoder
signal (X)
56
I3-
C hannel I- inverted encoder
signal (Z)
7
Vc1
+5V
57
Vc1
+5V
8
GND
Ground
58
GND
Ground
9
XPLIM1
Limit switch positive direction
(X)
59
XPLIM3
Limit switch positive direction
(Z)
10
XNLIM1
Limit switch negative direction
(X)
60
XNLIM3
Limit switch negative direction
(Z)
11
HOME1
Home signal (X) or high speed
latch
61
HOME3
Home signal (Z) or high speed
latch
12
GND
Ground
62
GND
64
Description
Ground
© POSYS Motion Control GmbH & Co.KG, 2013
Pin
Connection
13
AXISOUT1
14
PULSE1
Description
Pin
Connection
User programmable output (X)
63
AXISOUT3
Pulse (X)
64
PULSE3
Direction (X)
65
DIR3
User programmable input (X)
66
AXIN3
Description
User programmable output (Z)
Pulse (Z)
15
DIR1
16
AXIN1
Direction (Z)
17
ATREST1
At Rest (X)
67
ATREST3
18
GND
Ground
68
GND
Ground
19
A2+
C hannel A+ encoder signal (Y)
69
A4+
C hannel A+ encoder signal (W)
20
A2-
C hannel A- inverted encoder
signal (Y)
70
A4-
C hannel A- inverted encoder
signal (W)
21
B2+
C hannel B+ encoder signal (Y)
71
B4+
C hannel B+ encoder signal (W)
22
B2-
C hannel B- inverted encoder
signal (Y)
72
B4-
C hannel B- inverted encoder
signal (W)
23
I2+
C hannel I+ encoder signal (Y)
73
I4+
C hannel I+ encoder signal (W)
24
I2-
C hannel I- inverted encoder
signal (Y)
74
I4-
C hannel I- inverted encoder
signal (W)
25
Vc1
+5V
75
Vc1
+5V
26
GND
Ground
76
GND
Ground
27
XPLIM2
Limit switch positive direction (Y)
77
XPLIM4
Limit switch positive direction
(W)
28
XNLIM2
Limit switch negative direction
(Y)
78
XNLIM4
Limit switch negative direction
(W)
29
HOME2
Home signal (Y) or high speed
latch
79
HOME4
Home signal (W) or high speed
latch
30
AXISOUT2
User programmable output (Y)
80
AXISOUT4
User programmable output (W)
31
PULSE2
Pulse (Y)
81
PULSE4
Direction (Y)
82
DIR4
User programmable input (Y)
83
AXIN4
User programmable input (Z)
At Rest (Z)
Pulse (W)
32
DIR2
33
AXIN2
Direction (W)
34
ATREST2
At Rest (Y)
84
ATREST4
35
GND
Ground
85
GND
Ground
36
UI0
uncommitted input (0)
86
UI4
uncommitted input (4)
37
UI1
uncommitted input (1)
87
UI5
uncommitted input (5)
38
UI2
uncommitted input (2)
88
UI6
uncommitted input (6)
39
UI3
uncommitted input (3)
89
UI7
uncommitted input (7)
40
AMPEN1
Amplifier enable (X) or user
programmable output
90
AMPEN3
41
UO0
uncommitted output (0)
91
UO4
uncommitted output (4)
42
UO1
uncommitted output (1)
92
UO5
uncommitted output (5)
43
UO2
uncommitted output (2)
93
UO6
uncommitted output (6)
44
UO3
uncommitted output (3)
94
UO7
uncommitted output (7)
45
AMPEN2
Amplifier enable (Y) or user
programmable output
95
AMPEN4
Amplifier enable (W) or user
programmable output
User programmable input (W)
At Rest (W)
Amplifier enable (Z) or user
programmable output
46
RS-
Hardware reset
96
ANGND
GND for analog inputs
47
Ainput1
analog input channel (0)
97
Ainput5
analog input channel (4)
48
Ainput2
analog input channel (1)
98
Ainput6
analog input channel (5)
49
Ainput3
analog input channel (2)
99
Ainput7
analog input channel (6)
100
Ainput8
analog input channel (7)
50
Ainput4
analog input channel (3)
*Microstepping with appropriate type driver
Pinout Description stepper version Option Connector 900 PCI
POSYS® 95x (68-position SCSI)
Pin
Connection
1
n.c.
Description
Pin
Connection
2
n.c.
No Connection
65
Description
No Connection
© POSYS Motion Control GmbH & Co.KG, 2013
Pin
Connection
Description
Pin
Connection
3
n.c.
5
n.c.
7
n.c.
No Connection
9
n.c.
No Connection
11
n.c.
No Connection
13
n.c.
No Connection
15
n.c.
17
n.c.
19
21
Description
No Connection
4
GND
Ground
No Connection
6
GND
Ground
8
n.c.
No Connection
10
GND
Ground
12
GND
Ground
14
n.c.
No Connection
No Connection
16
GND
Ground
No Connection
18
GND
Ground
n.c.
No Connection
20
n.c.
No Connection
n.c.
No Connection
22
GND
Ground
23
n.c.
No Connection
24
GND
Ground
25
n.c.
No Connection
26
n.c.
No Connection
27
n.c.
No Connection
28
GND
Ground
29
n.c.
No Connection
30
n.c.
No Connection
31
n.c.
No Connection
32
GND
Ground
33
n.c.
No Connection
34
n.c.
No Connection
35
n.c.
No Connection
36
GND
Ground
37
n.c.
No Connection
38
n.c.
No Connection
39
n.c.
No Connection
40
GND
Ground
41
Pulse1+
Pulse+ (X)
42
Pulse1-
Pulse- (X)
43
Pulse2+
Pulse+ (Y)
44
Pulse2-
Pulse- (Y)
45
Pulse3+
Pulse+ (Z)
46
Pulse3-
Pulse- (Z)
47
Pulse4+
Pulse+ (W)
48
Pulse4-
Pulse- (W)
49
Direction1+
Direction+ (X)
50
Direction1-
Direction- (X)
51
Direction2+
Direction+ (Y)
52
Direction2-
Direction- (Y)
53
Direction3+
Direction+ (Z)
54
Direction3-
Direction- (Z)
55
Direction4+
Direction+ (W)
56
Direction4-
Direction+ (W)
57
Vc1
+5V
58
Vc1
+5V
59
GND
Ground
60
GND
Ground
61
n.c.
No Connection
62
n.c.
No Connection
63
n.c.
No Connection
64
n.c.
No Connection
65
n.c.
No Connection
66
n.c.
No Connection
67
n.c.
No Connection
68
n.c.
No Connection
-oAnalog Input Pinout Description; POSYS® 900
Analog Input Pinout description (only valid for POSYS® 900)
GP CON
Description
Explanation
47
Analog Input 1
Analog input for channel (0)
48
Analog Input 2
Analog input for channel (1)
49
Analog Input 3
Analog input for channel (2)
50
Analog Input 4
Analog input for channel (3)
97
Analog Input 5
Analog input for channel (4)
98
Analog Input 6
Analog input for channel (5)
99
Analog Input 7
Analog input for channel (6)
100
Analog Input 8
Analog input for channel (7)
66
© POSYS Motion Control GmbH & Co.KG, 2013
The analog input voltage for the 8 channels can range from 0-2.048 VDC, the resolution is 10 bits.
ReadAnalog(channel)
C hannel = 0-7 for the 8 inputs.
To display the returned value in volts, use the following conversion:
AnalogInputVoltage = (ReadAnalog(channel) / 65536) * 4.096
This scales the returned value to the correct voltage.
If other than the standard input voltage is desired then we can offer optional input voltages at following rates: 1.8V, 2.5V,
3.0V and 3.3V.
-o-
67
© POSYS Motion Control GmbH & Co.KG, 2013
POSYS® 19xx
Versions 19xx
List of available versions
POSYS® 192x for brushed servo and brushless servo motors w/ internal commutation,
microstepping and stepper motors
The POSYS® 192x can be used for all types of motors (brushed, brushless, microstepping and stepper)
Model
# of Axes
POSYS® 1922
2
POSYS® 1924
4
POSYS® 195x for stepper motors
The POSYS® 195x can be used as well for microstepping motors when the appropriate type of driver is used.
Model
# of Axes
POSYS® 1952
2
POSYS® 1954
4
All versions are also available for extended temperature range (-40° - +85°C ). Not in stock. Please add for order "-I" to
the model number (for example: 1904-I).
The models 190x and 195x are available either with Single Port RAM (512KB) or Dual Port RAM (32KB or 64KB). The
versions 192x are generally equipped with 32KB Dual Port RAM. When ordering please add the type of RAM desired
otherwise standard versions will be delivered.
For example:
POSYS® 1904 with 32KB DPRAM = 1904-32
POSYS® 1904 with 64KB DPRAM = 1904-64
POSYS® 1904 with 32KB DPRAM for extended temperature range = 1904-I32
If it is desired to use the 192x with SPRAM instead of 32KB DPRAM then please order: 192x-S
If it is desired to use 64KB DPRAM instead of 32KB DPRAM then please order: 192x-64
where x is the desired amount of axes.
-oUser settable components; POSYS® 19xx
User settable components; POSYS® 19xx
The figure below shows the locations of the principal components of the POSYS® 19xx PCI cards. The component side of
the board is shown, with the PCI slot connector at the bottom and the 100-position connector at the right. All component
locations in this manual refer to this orientation. The important user-accessible components of the card are:





Resistor Packs RS1, RS2, and RS3 set the Encoder termination
Mode jumper allows the serial communication port mode to be selected
Sync I/O can be selected to set the board into master or slave mode when using additional cards
C AN 2.0B can be selected if the desired communication mode should be CAN 2.0B
JP1 und JP2 can be selected for either axis to be used in servo or stepper mode (not on stepper only card; POSYS®
195x)
In the following the settings of the different positions, connectors, resistor packs, and jumpers are described more
thoroughly:
68
© POSYS Motion Control GmbH & Co.KG, 2013
picture shows: POSYS® 19xx
Resistor Packs RS1, RS2, RS3
The following table shows the function of the RS1-RS3 resistor packs
Item
What to set
Description
Resistor packs - RS1,
RS2, RS3
Installed
This is the default setting of
resistor packs RS1-RS3
If you are using differential connections leave these resistor
packs installed.
Remove if you are not using
differential encoders
If you are using single-ended encoder connections, remove the
resistor packs.
If TTL as well as oncoders with inverted signals are going to be used then please look-up page Resistor Networks for TTL or
inverted Encoder Signals for details on how to setup the resistor networks for mixed usage.
Parallel Input Connector "J1"
Pin No.
Description
Pin No.
Description
1
GND
2
A0
3
DS0
4
A1
5
DS1
6
A2
7
DS2
8
A3
9
DS3
10
A4
11
DS4
12
A5
13
DS5
14
A6
15
DS6
16
A7
17
DS7
18
A8
19
DS8
20
A9
21
DS9
22
A10
23
DS10
24
A11
25
DS11
26
A12
27
DS12
28
A13
69
© POSYS Motion Control GmbH & Co.KG, 2013
Pin No.
Description
Pin No.
Description
29
DS13
30
A14
31
DS14
32
A15
33
DS15
34
IS-
35
DS-
36
STRB-
37
WE-
38
VCC
39
R/W
40
PS-
-oSYNC IO
SYNC I/O
These two connectors allow to synchronize additional cards in one system to work within the same cycle period. If not
connected additional cards would start to work after the first card was initialized. This could be up to 400 or 600 µsec after
a 4 axis card, depending on model. With SYNC I/O activated all additional cards would not start to work later than 50 nsec.
after the master. This allows precise synchronizing of all implemented axes. How to accomplish this is described in the
section Set/GetSynchronizationMode of this manual. To connect 2 or more cards for synchronizing purpose you need the
optional SYNC I/O cable (1 for each set of two boards). This cable can be connected to any of the two SYNC I/O connectors
on the boards. Both connectors act either as an input or output. The SYNC I/O function is only available on selected
versions for PC/104 and PCI-Bus cards.
The connector on the board is a 2-position Molex male connector (Molex part no.: 53261–0271). The counter connector for
the cable is a female connector from Molex (Molex part no.: Molex 51021-0200, Crimp contact: Molex 50079-8100).
Set/GetSynchronizationMode, Sync IO Description
-oSerial Port
Serial Port
This module and associated signals provides the capability to operate the POSYS® card using an asynchronous serial port,
or to allow certain monitoring operations to be performed through the serial port, even while the PCI bus is used to
command motion sequences. To operate the serial port as the primary communication channel to the card please refer to
chapter „Host Communication – Serial Port“.
The serial cable is optional. Please contact us if you wish to connect via RS232 to the POSYS®.
The following connector is used during serial communications. The Serial I/F connector is a 5-position Molex MLX
Micro-4-SMD style connector (Molex part no.: 53398-0571) for the PCI cards POSYS® 9xx, 19xx and for the PC/104 card
POSYS® 18xx/18xx-B or 6-position connector for the PC/104 B-series. The counter connector for the cable for the PCI
cards is a female connector from Molex (Molex part no.: 51021-0500).
The default serial communication settings after power-on are:
speed: 57600 baud/s.
parity: none
stop bits: 2
protocol: point-to-point
If different than the standard power-on settings are desired, please contact servo-Halbeck. These values can be changed
and hard-coded to accomplish customer requirements. An initial change of the settings after each power-on can be
omitted. The appropriate settings take place at once.
Serial I/F Connector PCI Card POSYS® 19xx series
The following connector is used during serial communications. The Serial I/F connector is a 5-position Molex PicoBlade (part
no.: 53261-0571) SMD style connector. The counter connector's part no. is: 51021-0500
70
© POSYS Motion Control GmbH & Co.KG, 2013
Pin
Connection
Description
1
SrlEnable
Serial enable (only used for RS422/485)
2
SrlXmt
Serial transmit output
3
SrlRcv
Serial receive input
4
GND
Ground
5
Vcc
+5V
Set/GetSerialPortMode, Serial Port Description
-oCAN 2.0B
CAN 2.0B
The POSYS® 18xx/19xx can integrate into a C AN 2.0B network and will coexist (but not communicate) with CAN 2.0B
nodes on that network. The POSYS® 18xx/19xx uses C AN to receive commands, send responses and (optionally) send
asynchronous event notifications.
The CAN 2.0B connector is a 2-position Molex PicoBlade (part no.: 53261-0271) SMD style connector. The counter
connector's part no. is: 51021-0200
For more information please refer to the pages: CAN (C ontroller Area Network, Konfiguration der CAN2.0B Schnittstelle,
C AN Ereignis Benachrichtigung and Set/GetCanMode)
-oMotor Mode Configuration; POSYS® 19xx
Motor Mode Jumpers „JP1“ und „JP2“
Depending on the model, there are several possibilities of setting up an axis for the one or other type of motor, for
example brushed/brushless servo motors (with or without on-board commutation), microstepping or stepper mode. In a
ddition to the hardware setup you also must setup your software for the one or other motor type. The software commands
are described in the Programmer's manual. The default values after power-on or after a HardReset is for use with brushed
servo motors (exception: POSYS® 195x which is set to stepper mode by default). If a different default is desired then
please contact us for details. It is possible to setup each axis to a default which meets your requirements. These defaults
can be hard-wired to the card.
The following section describes only the hardware configuration for the one or other motor type. The mixed usage is
possible. Please take in consideration that if the one or other motor type was chosen then the other motor type can not be
used unless the hardware and software configuration is changed again. To change the configuration the jumpers JP1 and
JP2 must be set accordingly:
Motor ty pe
Jumper setting
DC Brushed
JP2
DC Brushless
JP2
Microstepping
JP2
Stepper
JP1
JP1 and JP2 exist each of 4 jumpers. Each jumper represents an axis (1, 2, 3 or 4) and is dependant if you purchased a 1,
2, 3 or 4 axes card. The following tables describe the correct jumper positioning for the correct motor output signals for
the connected type of amplifier/driver.
POSYS® 192x
The POSYS® 192x can be setup for use with DC brushed servo motors, DC brushless with internal/external commutation,
microstepping and stepper motors. The following table describes the positions of the jumpers on JP1 and JP2 for use with
71
© POSYS Motion Control GmbH & Co.KG, 2013
the one or other motor type:
Achse
Motor ty pe
DC Brushed Serv o Motor
DC Brushless Serv o Motor
(w/ internal/external Commutation) or
Microstepping Motor
Stepper or
Micostepping Motor
(w/ Microstepping Driv er)
1
JP2 short (first from left); JP1 open
JP1 short (first from left); JP2 open
2
JP2 short (second from left); JP1 open
JP1 short (second from left); JP2 open
3
JP2 short (third from left); JP1 open
JP1 short (third from left); JP2 open
4
JP2 short (fourth from left); JP1 open
JP1 short (fourth from left); JP2 open
POSYS® 195x
The POSYS® 195x can only be setup for use with stepper motors. With the appropriate type of drive this card can be used
with microstepping drives that take the pulse & direction signal and generates the desired microsteps. The following table
describes the positions of the jumpers on JP1 and JP2 for use with this motor type:
Achse
Motor ty pe
DC Brushed Serv o Motor
DC Brushless Serv o Motor
(w/ internal/external Commutation) or
Microstepping Motor
Stepper or
Micostepping Motor
(w/ Microstepping Driv er)
1
n/a
JP1 short (first from left); JP2 open
2
n/a
JP1 short (second from left); JP2 open
3
n/a
JP1 short (third from left); JP2 open
4
n/a
JP1 short (fourth from left); JP2 open
-oBrushed Servo Mode Pinout Description
Pinout description brushed servo and brushless servo w/
external commutation
POSYS® 190x/192x
Pin
Connection
Description
Pin
Connection
1
2
A1+
C hannel A+ encoder signal (X)
51
A3+
C hannel A+ encoder signal (Z)
A1-
C hannel A- inverted encoder
signal (X)
52
A3-
C hannel A- inverted encoder
signal (Z)
3
B1+
C hannel B+ encoder signal (X)
53
B3+
C hannel B+ encoder signal (Z)
4
B1-
C hannel B- inverted encoder
signal (X)
54
B3-
C hannel B- inverted encoder
signal (Z)
5
I1+
C hannel I+ encoder signal (X)
55
I3+
C hannel I+ encoder signal (Z)
6
I1-
C hannel I- inverted encoder
signal (X)
56
I3-
C hannel I- inverted encoder
signal (Z)
7
Vc1
+5V
57
Vc1
+5V
8
GND
Ground
58
GND
Ground
9
XPLIM1
Limit switch positive direction
(X)
59
XPLIM3
Limit switch positive direction
(Z)
10
XNLIM1
Limit switch negative direction
(X)
60
XNLIM3
Limit switch negative direction
(Z)
11
HOME1
Home signal (X) or high speed
latch
61
HOME3
Home signal (Z) or high speed
latch
Ground
62
GND
User programmable output (X)
63
AXISOUT3
12
GND
13
AXISOUT1
72
Description
Ground
User programmable output (Z)
© POSYS Motion Control GmbH & Co.KG, 2013
Pin
Connection
14
BPWM1
15
BPWMS1
Description
Pin
Connection
PWM magnitude (X)
64
BPWM3
PWM sign (X)
65
BPWMS3
Description
PWM magnitude (Z)
PWM sign (Z)
16
AXIN1
User programmable input (X)
66
AXIN3
User programmable input (Z)
17
DACV1
Motor command (X), ±10V
signal
67
DACV3
Motor command (Z), ±10V
signal
18
AGND
Ground for motor command
68
AGND
Ground for motor command
19
A2+
C hannel A+ encoder signal (Y)
69
A4+
C hannel A+ encoder signal (W)
20
A2-
C hannel A- inverted encoder
signal (Y)
70
A4-
C hannel A- inverted encoder
signal (W)
21
B2+
C hannel B+ encoder signal (Y)
71
B4+
C hannel B+ encoder signal (W)
22
B2-
C hannel B- inverted encoder
signal (Y)
72
B4-
C hannel B- inverted encoder
signal (W)
23
I2+
C hannel I+ encoder signal (Y)
73
I4+
C hannel I+ encoder signal (W)
24
I2-
C hannel I- inverted encoder
signal (Y)
74
I4-
C hannel I- inverted encoder
signal (W)
25
Vc1
+5V
75
Vc1
+5V
26
GND
Ground
76
GND
Ground
27
XPLIM2
Limit switch positive direction (Y)
77
XPLIM4
Limit switch positive direction
(W)
28
XNLIM2
Limit switch negative direction
(Y)
78
XNLIM4
Limit switch negative direction
(W)
29
HOME2
Home signal (Y) or high speed
latch
79
HOME4
Home signal (W) or high speed
latch
30
AXISOUT2
User programmable output (Y)
80
AXISOUT4
User programmable output (W)
31
BPWM2
PWM magnitude (Y)
81
BPWM4
32
BPWMS2
PWM sign (Y)
82
BPWMS4
33
AXIN2
User programmable input (Y)
83
AXIN4
User programmable input (W)
34
DACV2
Motor command (Y), ±10V
signal
84
DACV4
Motor command (W), ±10V
signal
35
AGND
Ground for motor command
85
AGND
Ground for motor command
36
UI0
uncommitted input (0)
86
UI4
uncommitted input (4)
37
UI1
uncommitted input (1)
87
UI5
uncommitted input (5)
38
UI2
uncommitted input (2)
88
UI6
uncommitted input (6)
39
UI3
uncommitted input (3)
89
UI7
uncommitted input (7)
40
AMPEN1
Amplifier enable (X) or user
programmable output
90
AMPEN3
41
UO0
uncommitted output (0)
91
UO4
uncommitted output (4)
42
UO1
uncommitted output (1)
92
UO5
uncommitted output (5)
43
UO2
uncommitted output (2)
93
UO6
uncommitted output (6)
44
UO3
uncommitted output (3)
94
UO7
uncommitted output (7)
45
AMPEN2
Amplifier enable (Y) or user
programmable output
95
AMPEN4
Amplifier enable (W) or user
programmable output
46
RS-
Hardware reset
96
ANGND
GND for analog inputs
47
Ainput1
analog input channel (0)
97
Ainput5
analog input channel (4)
48
Ainput2
analog input channel (1)
98
Ainput6
analog input channel (5)
49
Ainput3
analog input channel (2)
99
Ainput7
analog input channel (6)
50
Ainput4
analog input channel (3)
100
Ainput8
analog input channel (7)
PWM magnitude (W)
PWM sign (W)
Amplifier enable (Z) or user
programmable output
-oBrushless Servo/Microstepping Mode Version Pinout Description
Pinout description brushless servo w/ internal commutation,
73
© POSYS Motion Control GmbH & Co.KG, 2013
microstepping and multiple motor version
POSYS® 192x
Pin
Connection
Description
Pin
Connection
1
2
Description
A1+
C hannel A+ encoder signal (X)
51
A3+
C hannel A+ encoder signal (Z)
A1-
C hannel A- inverted encoder
signal (X)
52
A3-
C hannel A- inverted encoder
signal (Z)
3
B1+
C hannel B+ encoder signal (X)
53
B3+
C hannel B+ encoder signal (Z)
4
B1-
C hannel B- inverted encoder
signal (X)
54
B3-
C hannel B- inverted encoder
signal (Z)
5
I1+
C hannel I+ encoder signal (X)
55
I3+
C hannel I+ encoder signal (Z)
6
I1-
C hannel I- inverted encoder
signal (X)
56
I3-
C hannel I- inverted encoder
signal (Z)
7
Vc1
+5V
57
Vc1
+5V
8
GND
Ground
58
GND
Ground
9
XPLIM1
Limit switch positive direction
(X)
59
XPLIM3
Limit switch positive direction
(Z)
10
XNLIM1
Limit switch negative direction
(X)
60
XNLIM3
Limit switch negative direction
(Z)
11
HOME1
Home signal (X) or high speed
latch
61
HOME3
Home signal (Z) or high speed
latch
12
GND
Ground
62
GND
Ground
13
OUT1
User programmable output (X)
63
OUT3
User programmable output (Z)
14
n.c.
No connection.
64
n.c.
No connection
15
n.c.
No connection
65
n.c.
No connection
16
AXIN1
User programmable input (X)
66
AXIN3
User programmable input (Z)
17
DAC1A
Motor command (X), ±10V
signal
67
DAC3A
Motor command (Z), ±10V
signal
18
AGND
Ground for motor command
68
AGND
Ground for motor command
19
A2+
C hannel A+ encoder signal (Y)
69
A4+
C hannel A+ encoder signal (W)
20
A2-
C hannel A- inverted encoder
signal (Y)
70
A4-
C hannel A- inverted encoder
signal (W)
21
B2+
C hannel B+ encoder signal (Y)
71
B4+
C hannel B+ encoder signal (W)
22
B2-
C hannel B- inverted encoder
signal (Y)
72
B4-
C hannel B- inverted encoder
signal (W)
23
I2+
C hannel I+ encoder signal (Y)
73
I4+
C hannel I+ encoder signal (W)
24
I2-
C hannel I- inverted encoder
signal (Y)
74
I4-
C hannel I- inverted encoder
signal (W)
25
Vc1
+5V
75
Vc1
+5V
26
GND
Ground
76
GND
Ground
27
XPLIM2
Limit switch positive direction (Y)
77
XPLIM4
Limit switch positive direction
(W)
28
XNLIM2
Limit switch negative direction
(Y)
78
XNLIM4
Limit switch negative direction
(W)
29
HOME2
Home signal (Y) or high speed
latch
79
HOME4
Home signal (W) or high speed
latch
30
OUT2
User programmable output (Y)
80
OUT4
User programmable output (W)
31
n.c.
No connection
81
n.c.
No connection
32
n.c.
No connection
82
n.c.
No connection
33
AXIN2
User programmable input (Y)
83
AXIN4
User programmable input (W)
34
DAC2A
Motor command (Y), ±10V
signal
84
DAC4A
Motor command (W), ±10V
signal
35
AGND
Ground for motor command
85
AGND
Ground for motor command
36
UI0
uncommitted input (0)
86
UI4
uncommitted input (4)
37
UI1
uncommitted input (1)
87
UI5
uncommitted input (5)
74
© POSYS Motion Control GmbH & Co.KG, 2013
Pin
Connection
Description
Pin
Connection
38
39
40
AMPEN1
41
42
Description
UI2
uncommitted input (2)
88
UI6
uncommitted input (6)
UI3
uncommitted input (3)
89
UI7
uncommitted input (7)
Amplifier enable (X) or user
programmable output
90
AMPEN3
UO0
uncommitted output (0)
91
UO4
uncommitted output (4)
UO1
uncommitted output (1)
92
UO5
uncommitted output (5)
43
UO2
uncommitted output (2)
93
UO6
uncommitted output (6)
44
UO3
uncommitted output (3)
94
UO7
uncommitted output (7)
45
AMPEN2
Amplifier enable (Y) or user
programmable output
95
AMPEN4
Amplifier enable (W) or user
programmable output
Amplifier enable (Z) or user
programmable output
46
RS-
Hardware reset
96
ANGND
GND for analog inputs
47
Ainput1
analog input channel (0)
97
Ainput5
analog input channel (4)
48
Ainput2
analog input channel (1)
98
Ainput6
analog input channel (5)
49
Ainput3
analog input channel (2)
99
Ainput7
analog input channel (6)
50
Ainput4
analog input channel (3)
100
Ainput8
analog input channel (7)
Pinout Description brushless servo and multiple motor version
Option Connector PCI
POSYS® 192x (68-position SCSI); Pinout description only valid when using internal and external SCSI cable
and IO68 provided by servo-Halbeck GmbH & Co.KG. If you wish to configure your own cables and use
different interconnect modules then please use pinout description as described in the section OPTION CON.
Pin
Connection
Pin
Connection
1
BPWM1A
Description
PWM magnitude Phase A (X)
2
BPWM1B
Description
3
BPWM1C
PWM magnitude Phase C (X)
4
GND
Ground
5
BPWMS1B
PWM sign (X)
6
GND
Ground
PWM magnitude Phase B (X)
7
BPWM2A
PWM magnitude Phase A (Y)
8
BPWM2B
9
BPWM2C
PWM magnitude Phase C (Y)
10
GND
PWM magnitude Phase B (Y)
Ground
11
BPWMS2B
PWM sign (Y)
12
GND
Ground
13
BPWM3A
PWM magnitude Phase A (Z)
14
BPWM3B
15
BPWM3C
PWM magnitude Phase C (Z)
16
GND
Ground
17
BPWMS3B
PWM sign (Z)
18
GND
Ground
PWM magnitude Phase B (Z)
19
BPWM4A
PWM magnitude Phase A (W)
20
BPWM4B
21
BPWM4C
PWM magnitude Phase C (W)
22
GND
PWM magnitude Phase B (W)
Ground
23
BPWMS4B
PWM sign (W)
24
GND
Ground
25
HALL1A
Phase A Hall Sensor input (X)
26
HALL1B
27
HALL1C
Phase C Hall Sensor input (X)
28
GND
29
HALL2A
Phase A Hall Sensor input (Y)
30
HALL2B
31
HALL2C
Phase C Hall Sensor input (Y)
32
GND
33
HALL3A
Phase A Hall Sensor input (Z)
34
HALL3B
35
HALL3C
Phase C Hall Sensor input (Z)
36
GND
37
HALL4A
Phase A Hall Sensor input (W)
38
HALL4B
39
HALL4C
Phase C Hall Sensor input (W)
40
GND
41
Pulse1+
Pulse+ (X)
42
Pulse1-
Pulse- (X)
43
Pulse2+
Pulse+ (Y)
44
Pulse2-
Pulse- (Y)
45
Pulse3+
Pulse+ (Z)
46
Pulse3-
Pulse- (Z)
47
Pulse4+
Pulse+ (W)
48
Pulse4-
Pulse- (W)
49
Direction1+
Direction+ (X)
50
Direction1-
Direction- (X)
51
Direction2+
Direction+ (Y)
52
Direction2-
Direction- (Y)
53
Direction3+
Direction+ (Z)
54
Direction3-
Direction- (Z)
55
Direction4+
Direction+ (W)
56
Direction4-
Direction+ (W)
57
Vc1
+5V
58
Vc1
75
Phase B Hall Sensor input (X)
Ground
Phase B Hall Sensor input (Y)
Ground
Phase B Hall Sensor input (Z)
Ground
Phase B Hall Sensor input (W)
Ground
+5V
© POSYS Motion Control GmbH & Co.KG, 2013
Pin
Connection
Description
Pin
Connection
Description
59
GND
Ground
60
GND
61
DAC1B
Motor command (X), ±10V
signal, Phase B
62
DAC1A
Ground
Motor command (X), ±10V
signal, Phase A
63
DAC2B
Motor command (Y), ±10V
signal, Phase B
64
DAC2A
Motor command (Y), ±10V
signal, Phase A
65
DAC3B
Motor command (Z), ±10V
signal, Phase B
66
DAC3A
Motor command (Z), ±10V
signal, Phase A
67
DAC4B
Motor command (W), ±10V
signal, Phase B
68
DAC4A
Motor command (W), ±10V
signal, Phase A
-oStepper Mode Pinout Description
Pinout description stepper/microstepping* version
POSYS® 190x/192x/195x
Pin
Connection
Description
Pin
Connection
1
2
A1+
C hannel A+ encoder signal (X)
51
A3+
C hannel A+ encoder signal (Z)
A1-
C hannel A- inverted encoder
signal (X)
52
A3-
C hannel A- inverted encoder
signal (Z)
3
B1+
C hannel B+ encoder signal (X)
53
B3+
C hannel B+ encoder signal (Z)
4
B1-
C hannel B- inverted encoder
signal (X)
54
B3-
C hannel B- inverted encoder
signal (Z)
5
I1+
C hannel I+ encoder signal (X)
55
I3+
C hannel I+ encoder signal (Z)
6
I1-
C hannel I- inverted encoder
signal (X)
56
I3-
C hannel I- inverted encoder
signal (Z)
7
Vc1
+5V
57
Vc1
+5V
8
GND
Ground
58
GND
Ground
9
XPLIM1
Limit switch positive direction
(X)
59
XPLIM3
Limit switch positive direction
(Z)
10
XNLIM1
Limit switch negative direction
(X)
60
XNLIM3
Limit switch negative direction
(Z)
11
HOME1
Home signal (X) or high speed
latch
61
HOME3
Home signal (Z) or high speed
latch
Ground
62
GND
User programmable output (X)
63
AXISOUT3
Pulse (X)
64
PULSE3
Direction (X)
65
DIR3
User programmable input (X)
66
AXIN3
At Rest (X)
67
ATREST3
12
GND
13
AXISOUT1
14
PULSE1
15
DIR1
Description
Ground
User programmable output (Z)
Pulse (Z)
Direction (Z)
16
AXIN1
17
ATREST1
18
GND
Ground
68
GND
Ground
19
A2+
C hannel A+ encoder signal (Y)
69
A4+
C hannel A+ encoder signal (W)
20
A2-
C hannel A- inverted encoder
signal (Y)
70
A4-
C hannel A- inverted encoder
signal (W)
21
B2+
C hannel B+ encoder signal (Y)
71
B4+
C hannel B+ encoder signal (W)
22
B2-
C hannel B- inverted encoder
signal (Y)
72
B4-
C hannel B- inverted encoder
signal (W)
23
I2+
C hannel I+ encoder signal (Y)
73
I4+
C hannel I+ encoder signal (W)
24
I2-
C hannel I- inverted encoder
signal (Y)
74
I4-
C hannel I- inverted encoder
signal (W)
25
Vc1
+5V
75
Vc1
+5V
26
GND
Ground
76
GND
Ground
27
XPLIM2
Limit switch positive direction (Y)
77
XPLIM4
76
User programmable input (Z)
At Rest (Z)
Limit switch positive direction
© POSYS Motion Control GmbH & Co.KG, 2013
Pin
Connection
Description
Pin
Connection
28
Description
XNLIM2
Limit switch negative direction
(Y)
78
XNLIM4
Limit switch negative direction
(W)
29
HOME2
Home signal (Y) or high speed
latch
79
HOME4
Home signal (W) or high speed
latch
30
AXISOUT2
User programmable output (Y)
80
AXISOUT4
User programmable output (W)
31
PULSE2
Pulse (Y)
81
PULSE4
32
DIR2
Direction (Y)
82
DIR4
User programmable input (Y)
83
AXIN4
At Rest (Y)
84
ATREST4
(W)
Pulse (W)
Direction (W)
33
AXIN2
34
ATREST2
35
GND
Ground
85
GND
Ground
36
UI0
uncommitted input (0)
86
UI4
uncommitted input (4)
37
UI1
uncommitted input (1)
87
UI5
uncommitted input (5)
38
UI2
uncommitted input (2)
88
UI6
uncommitted input (6)
39
UI3
uncommitted input (3)
89
UI7
uncommitted input (7)
40
AMPEN1
Amplifier enable (X) or user
programmable output
90
AMPEN3
41
UO0
uncommitted output (0)
91
UO4
uncommitted output (4)
42
UO1
uncommitted output (1)
92
UO5
uncommitted output (5)
43
UO2
uncommitted output (2)
93
UO6
uncommitted output (6)
44
UO3
uncommitted output (3)
94
UO7
uncommitted output (7)
45
AMPEN2
Amplifier enable (Y) or user
programmable output
95
AMPEN4
Amplifier enable (W) or user
programmable output
46
RS-
Hardware reset
96
ANGND
GND for analog inputs
47
Ainput1
analog input channel (0)
97
Ainput5
analog input channel (4)
48
Ainput2
analog input channel (1)
98
Ainput6
analog input channel (5)
49
Ainput3
analog input channel (2)
99
Ainput7
analog input channel (6)
Ainput8
analog input channel (7)
50
Ainput4
analog input channel (3)
100
*Microstepping with appropriate type driver when using 190x or 195x
User programmable input (W)
At Rest (W)
Amplifier enable (Z) or user
programmable output
Pinout Description stepper motor version Option Connector
1900 PCI
POSYS® 192x (68-position SCSI)
Pin
Connection
Pin
Connection
1
n.c.
Description
No Connection
2
n.c.
No Connection
3
n.c.
No Connection
4
GND
Ground
5
n.c.
No Connection
6
GND
Ground
7
n.c.
No Connection
8
n.c.
No Connection
9
n.c.
No Connection
10
GND
Ground
11
n.c.
No Connection
12
GND
Ground
13
n.c.
No Connection
14
n.c.
No Connection
15
n.c.
No Connection
16
GND
Ground
17
n.c.
No Connection
18
GND
Ground
19
n.c.
No Connection
20
n.c.
No Connection
21
n.c.
No Connection
22
GND
Ground
23
n.c.
No Connection
24
GND
Ground
25
n.c.
No Connection
26
n.c.
No Connection
27
n.c.
No Connection
28
GND
Ground
29
n.c.
No Connection
30
n.c.
No Connection
31
n.c.
No Connection
32
GND
Ground
33
n.c.
No Connection
34
n.c.
No Connection
77
Description
© POSYS Motion Control GmbH & Co.KG, 2013
Pin
Connection
Description
Pin
Connection
35
37
Description
n.c.
No Connection
36
GND
Ground
n.c.
No Connection
38
n.c.
No Connection
39
n.c.
No Connection
40
GND
Ground
41
Pulse1+
Pulse+ (X)
42
Pulse1-
Pulse- (X)
43
Pulse2+
Pulse+ (Y)
44
Pulse2-
Pulse- (Y)
45
Pulse3+
Pulse+ (Z)
46
Pulse3-
Pulse- (Z)
47
Pulse4+
Pulse+ (W)
48
Pulse4-
Pulse- (W)
49
Direction1+
Direction+ (X)
50
Direction1-
Direction- (X)
51
Direction2+
Direction+ (Y)
52
Direction2-
Direction- (Y)
53
Direction3+
Direction+ (Z)
54
Direction3-
Direction- (Z)
55
Direction4+
Direction+ (W)
56
Direction4-
Direction+ (W)
57
Vc1
+5V
58
Vc1
+5V
59
GND
Ground
60
GND
Ground
61
n.c.
No Connection
62
n.c.
No Connection
63
n.c.
No Connection
64
n.c.
No Connection
65
n.c.
No Connection
66
n.c.
No Connection
67
n.c.
No Connection
68
n.c.
No Connection
-oAnalog Input Pinout Description; POSYS® 1900
Analog Input Pinout description (only valid for POSYS® 1900)
GP CON
Description
Explanation
47
Analog Input 1
Analog input for channel 1
48
Analog Input 2
Analog input for channel 2
49
Analog Input 3
Analog input for channel 3
50
Analog Input 4
Analog input for channel 4
97
Analog Input 5
Analog input for channel 5
98
Analog Input 6
Analog input for channel 6
99
Analog Input 7
Analog input for channel 7
100
Analog Input 8
Analog input for channel 8
The analog input voltage for the 8 channels can range from 0-2.048 VDC, the resolution is 10 bits.
ReadAnalog(channel)
C hannel = 0-7 for the 8 inputs.
To display the returned value in volts, use the following conversion:
AnalogInputVoltage = (ReadAnalog(channel) / 65536) * 2.048
This scales the returned value to the correct voltage.
If other than the standard input voltage is desired then we can offer optional input voltages at following rates: 1.8V, 2.5V,
3.0V and 3.3V.
-o-
78
© POSYS Motion Control GmbH & Co.KG, 2013
GP CON Connector
GP CON Connector
„GP CON“ Connector
The GP Con connector is used to connect to various motion peripherals such as encoders, amplifiers, etc. It is a
100-position high density connector. The following table provides ordering information for those users wishing to develop
their own cables to this connector:
Part description
Vendors and part numbers
Straight connector
AMP: 2-5175887-9 (C hamp)
3M: 102A0-6212VC (Mini D-ribbon)
Right angle connector
AMP: 2-5178238-9 (C hamp)
3M: N102A0-52E2VC
Shielded cable connector AMP: 176793-9 champ (shell)
AMP: 2-5175677-9 champ (plug)
3M: 103A0-A200-00 (shell)
3M: 101A0-6000EC (plug)
Connectors on the POSYS® 800-B/1800 board:
TSM-125-01-T-DV (Samtec)
Mating with: IDSD-25-S
Depending on which card is being used, there are different pin descriptions. These are decribed in the sections of the
POSYS® versions specifics: POSYS® 7xx, POSYS® 8xx-B, POSYS® 18xx, POSYS® 9xx and POSYS® 19xx.
-o-
79
© POSYS Motion Control GmbH & Co.KG, 2013
Interconnect Module
IO700/800-1
IO700/800-1
The IO700/800-1 is an interconnect module which helps you to setup your motion control system and provide you with all
necessary connections to the “outside world”. All wiring from and to the amplifiers, power supplies, IOs and encoder
feedback can easily be connected to this central point.
The enclosure of the board is a standard Phoenix EN rail mounting system. For alternative mounting you can take off the
enclosure and use the four 3.5 mm diameter holes on the board and mount it to whatever kind of mounting system you
prefer.
The pinout descriptions on the previous pages will guide you to the right connections. Please observe the differences
between the servo and stepping motor versions. The screw terminal numbers correspond to the pin out description for the
POSYS® controller.
80
© POSYS Motion Control GmbH & Co.KG, 2013
J1 is used with the ISA-Bus POSYS® 7xx and PCI-Bus motion controllers POSYS 9xx/19xx.
J4 and J5 are in parallel to J1 and are used with the PC/104 motion controller POSYS® 8xx/8xx-B and 18xx. J5
corresponds to the pinout 1-50 and J4 corresponds to the pinout 51-100. Please refer to the pinout definition of the PC/104
board you are using for correct connection.
The POSYS® supplies 5 VDC from the computer to the pins 7, 25, 57 and 75 for the encoders. The output is protected by
a 1 Amp fuse. It is also possible to use an external power supply. This input is also protected by a 1 Amp fuse. Depending
on the type of encoder used, this voltage can be 5 VDC or a max. of 12 VDC for encoders requiring more than 5 VDC. In
this case connect the external power to pin 106 and GND to pin 107. If using the internal power supllied by the POSYS card
the jumpers JP1 to JP4 need to short 1 - 2. If an external power supply (5V or 12V) is supposed to be used, then the
jumpers JP1 to JP4 need to short 2 - 3. The pins 101, 102, 103, 104 and 105 output 5 or 12 VDC with 1 Amp. max.
The mechanical dimensions of the interconnect module are:

With enclosure for rail mounting: 162x112x50 mm

Without enclosure for rail mounting: 160x108x28 mm
OPTO 22
C onnections to J3 (OPTO 22) are as follows:
J3, Pins 2, 4, 6, 8…50 are connected to GND
Jumper JP5, 5 VDC will be supplied to pin 49 of J3 if jumper is inserted
J1
Pin
Pin
J3
Description
49
connected to JP5, provides +5 VDC if jumpered
36
47
UI0
J1
J3
Description
37
45
UI1
38
43
UI2
39
41
UI3
86
39
UI4
87
37
UI5
88
35
UI6
89
33
UI7
41
31
UO0
42
29
UO1
43
27
UO2
44
25
UO3
91
23
UO4
92
21
UO5
93
19
UO6
94
17
UO7
40
15
AMPEN1
45
13
AMPEN2
90
11
AMPEN3
95
09
AMPEN4
13
07
OUT1
30
05
OUT2
63
03
OUT3
80
01
OUT4
-o-
81
© POSYS Motion Control GmbH & Co.KG, 2013
82
© POSYS Motion Control GmbH & Co.KG, 2013
IO700/800-2
IO700/800-2
This interconnect module is especially designed to interface to Berger Lahr drivers (pulse & direction output) and amplifiers
(±10V motor command output). For pinout description please refer to the description/tables below:
The following tables shows the connection description of the screw-type terminal breakout and the other connectors:
83
© POSYS Motion Control GmbH & Co.KG, 2013
Connectors:
Description
J1
100-position connector to the motion control card with shielded and round cable to the POSYS®
700/900/1900 and with adaptor card to POSYS® 800-B/1800
J4, J5
2 x 50-position IDC connector, parallel to
J1, for the POSYS® 800-B/1800.J4 is for axes 1+2 (X/Y) and
J5 is for axes 3+4 (Z/W).
The connectors ofJ4 (Pins 1-50) are connected parallel to those with the connectors 1-50 J1.
of
The connectors ofJ5 (Pins 1-50) are connected parallel to those with the connectors 51-100 J1.
of
J2, J3,J6, J7
4 x 15-position SUB-D female connectors for encoders.
PIN
J2
J3
J6
J7
1
A1+
A2+
A3+
A4+
9
A1-
A2-
A3-
A4-
12
B1+
B2+
B3+
B4+
5
B1-
B2-
B3-
B4-
13
I1+
I2+
I3+
I4+
6
I1-
I2-
I3-
I4-
2
VC C
VC C
VC C
VC C
3
GND
GND
GND
GND
The power supply for the encoders can be 5 or 12 VDC , depending on the type of encoders used.
J8 – J11
J21
4 x 15-position SUB-D male connector for Pulse & Direction outputs, Amplifier Enable, AxisOut output,
AxisID input and UI-input
Pin
J8
J9
J10
J11
1
Pulse1+
Pulse2+
Pulse3+
Pulse4+
9
Pulse1-
Pulse2-
Pulse3-
Pulse4-
2
DIR1+
DIR2+
DIR3+
DIR4+
10
DIR1-
DIR2-
DIR3-
DIR4-
3
AMPEN1+
AMPEN2+
AMPEN3+
AMPEN4+
11
AMPEN1-
AMPEN2-
AMPEN3-
AMPEN4-
5
OUT1+
OUT2+
OUT3+
OUT4+
6
OUT1-
OUT2-
OUT3-
OUT4-
8
AxisIn1
AxisIn2
AxisIn3
AxisIn4
15
GND
GND
GND
GND
J21 is a screw-type terminal with 36 connections. The connections are as following:
84
© POSYS Motion Control GmbH & Co.KG, 2013
Connectors:
Description
Connector
Name
Description
1
5VDC /out
5 V output from the computer can be connected with
connector 4 to supply encoders with 5V
2
DAC V1
±10 V motor command output (only for servo
motors, X-axis)
3
XPLIM1-HV
positive limit switch input, X-axis, 24VDC
4
5VDC /in
VC C input for encoder supply voltage (5 VDC or 12
VDC )
5
DAC V2
±10 V motor command output (only for servo
motors, Y-axis)
6
XNLIM1-HV
negative limit switch input, X-axis, 24VDC
7
GND
Digital Ground
8
DAC V3
±10 V motor command output (only for servo
motors, Z-axis)
9
XPLIM2-HV
positive limit switch input, Y-axis, 24VDC max.
10
AGND
Analog Ground for analog outputs and inputs
11
DAC V4
±10 V motor command output (only for servo
motors, W-axis)
12
XNLIM2-HV
negative limit switch input, Y-axis, 24VDC max.
13
AINPUT1
Analog Input channel 1 (0-2.5 VDC )
14
AGND
Analog Ground for analog outputs and inputs
15
XPLIM3-HV
positive limit switch input, Z-axis, 24VDC max.
16
AINPUT2
Analog Input channel 2 (0-2.5 VDC )
17
GND
Digital Ground
18
XNLIM3-HV
negative limit switch input, Z-axis, 24VDC max.
19
AINPUT3
Analog Input channel 3 (0-2.5 VDC )
20
GND
Digital Ground
21
XPLIM4-HV
positive limit switch input, W-axis, 24VDC max.
22
AINPUT4
Analog Input channel 4 (0-2.5 VDC )
23
GND
Digital Ground
24
XNLIM4-HV
negative limit switch input, W-axis, 24VDC max.
25
AINPUT5
Analog Input channel 5 (0-2.5 VDC )
26
GND
Digital Ground
27
HOME1-HV
Latch input (High Speed), X-axis, 24 VDC max.
28
AINPUT6
Analog Input channel 6 (0-2.5 VDC )
29
GND
Digital Ground
30
HOME2-HV
Latch input (High Speed), Y-axis, 24 VDC max.
31
AINPUT7
Analog Input channel 7 (0-2.5 VDC )
32
GND
Digital Ground
33
HOME3-HV
Latch input (High Speed), Z-axis, 24 VDC max.
34
AINPUT8
Analog Input channel 8 (0-2.5 VDC )
35
RS-
Reset input, parallel to the Reset switch S1
36
HOME4-HV
Latch input (High Speed), W-axis, 24 VDC max.
The analog outputs DAC V1 to DAC V4 are only for motion controllers which provide ±10 V motor command output for servo
motors. Motion controllers for stepper motors only provide Pulse & Direction signals.
The new POSYS® series 180x/190x/182x/192x now can be used in combination with servo and stepper motor signal
outputs.
F 1 and F 2 are 1 Ampere fuses. The 5 VDC from the host and the external 5VDC and 12VDC are being secured.
-o-
85
© POSYS Motion Control GmbH & Co.KG, 2013
OPTON CON
Option CON with POSYS® PCI
When either the brushless DC or microstepping motors are used, the Option Connector provides additional signals for
multi-phase motor output and input of signals such as Hall sensors. If only one axis is setup for DC Brushless or
Microstepping mode, then this additional cable will be needed.
The Option Connector is a 68-pin SCSI-style connector for the POSYS® 95x/190x. The following tables provide ordering
information for those users wishing to develop their own cables to this connector:
Part description
Vendors and part numbers
for flat ribbon
Harting: 60 06 068 5440 (for AWG 30, 0,635mm flat ribbon)
Plug
Harting: 60 03 068 52
Shell
Harting: 60 03 068 0155
Figure shows OPTION CON (only PCI cards) with pinout description
The following table shows connections to the Extension Connector when the axes are used for brushless DC, or
microstepping motors. Unless otherwise noted, 1 indicates axis 1, 2 indicates axis 2, etc., and A indicates phase A, B
indicates phase B, etc.
POSYS® PCI cards
Description
Pin number
Pin number
Beschreibung
PWM Magnitude 1A
1
35
PWM Magnitude 1B
PWM Magnitude 1C
2
36
GND
PWM Sign 1
3
37
GND
PWM Magnitude 2A
4
38
PWM Magnitude 2B
PWM Magnitude 2C
5
39
GND
PWM Sign 2
6
40
GND
PWM Magnitude 3A
7
41
PWM Magnitude 3B
PWM Magnitude 3C
8
42
GND
PWM Sign 3
9
43
GND
PWM Magnitude 4A
10
44
PWM Magnitude 4B
PWM Magnitude 4C
11
45
GND
PWM Sign 4
12
46
GND
Hall 1A
13
47
Hall 1B
Hall 1C
14
48
GND
Hall 2A
15
49
Hall 2B
Hall 2C
16
50
GND
Hall 3A
17
51
Hall 3B
Hall 3C
18
52
GND
Hall 4A
19
53
Hall 4B
86
© POSYS Motion Control GmbH & Co.KG, 2013
Description
Pin number
Pin number
Beschreibung
Hall 4C
20
54
GND
Pulse 1+
21
55
Pulse 1-
Pulse 2+
22
56
Pulse 2-
Pulse 3+
23
57
Pulse 3-
Pulse 4+
24
58
Pulse 4-
Direction 1+
25
59
Direction 1-
Direction 2+
26
60
Direction 2-
Direction 3+
27
61
Direction 3-
Direction 4+
28
62
Direction 4-
VC C (5V) Output
29
63
VC C (5V) Output
GND
30
64
GND
DAC B1 (X-Axis)
31
65
DAC A1 (X-Axis)
DAC B2 (Y-Axis)
32
66
DAC A2 (Y-Axis)
DAC B3 (Z-Axis)
33
67
DAC A3 (Z-Axis)
DAC B4 (W-Axis)
34
68
DAC A4 (W-Axis)
OPTION CON and OPTION CON "J9" with POSYS® PC/104
(only POSYS® 18xx)
When either the brushless DC or microstepping motors are used, the Option Connector provides additional signals for
multi-phase motor output and input of signals such as Hall sensors. If only one axis is setup for DC Brushless or
Microstepping mode, then this additional cable will be needed.
The Option Connector is a 50-pin IDC-style connector for the POSYS® 182x/185x:
Part description
Manufacturer and part number
POSYS® PC /104: female Samtec: ASP-53116-02
IDC with cable 50-position
Pin
Connection
Description
Pin
Connection
Description
1
BPWM1A
PWM magnitude Phase A (X)
26
HALL2B
Phase B Hall Sensor input (Y)
2
BPWM1B
PWM magnitude Phase B (X)
27
HALL2C
Phase C Hall Sensor input (Y)
3
BPWM1C
PWM magnitude Phase C (X)
28
GND
Ground
4
BPWMS1A
PWM sign Phase A (X)
29
HALL3A
Phase A Hall Sensor input (Z)
5
GND
Ground
30
HALL3B
Phase B Hall Sensor input (Z)
6
BPWM2A
PWM magnitude Phase A (Y)
31
HALL3C
Phase C Hall Sensor input (Z)
7
BPWM2B
PWM magnitude Phase B (Y)
32
GND
Ground
8
BPWM2C
PWM magnitude Phase C (Y)
33
HALL4A
Phase A Hall Sensor input (W)
9
BPWMS2A
PWM sign Phase A (Y)
34
HALL4B
Phase B Hall Sensor input (W)
10
GND
Ground
35
HALL4C
Phase C Hall Sensor input (W)
11
BPWM3A
PWM magnitude Phase A (Z)
36
GND
Ground
12
BPWM3B
PWM magnitude Phase B (Z)
37
AGND
Ground for motor command
13
BPWM3C
PWM magnitude Phase C (Z)
38
DAC 1A
Motor command (X), ±10V signal,
Phase A
14
BPWMS3A
PWM sign Phase A (Z)
39
DAC 2A
Motor command (Y), ±10V signal,
Phase A
15
GND
Ground
40
DAC 3A
Motor command (Z), ±10V signal,
Phase A
16
BPWM4A
PWM magnitude Phase A (W)
41
DAC 4A
Motor command (W), ±10V signal,
Phase A
17
BPWM4B
PWM magnitude Phase B (W)
42
DAC 1B
Motor command (X), ±10V signal,
Phase B
18
BPWM4C
PWM magnitude Phase C (W)
43
DAC 2B
Motor command (Y), ±10V signal,
Phase B
19
BPWMS4A
PWM sign Phase A (W)
44
DAC 3B
Motor command (Z), ±10V signal,
87
© POSYS Motion Control GmbH & Co.KG, 2013
Pin
Connection
Description
Pin
Connection
Description
Phase B
20
GND
Ground
45
DAC 4B
Motor command (W), ±10V signal,
Phase B
21
HALL1A
Phase A Hall Sensor input (X)
46
AGND
Ground for motor command
22
HALL1B
Phase B Hall Sensor input (X)
47
GND
Ground
23
HALL1C
Phase C Hall Sensor input (X)
48
GND
Ground
24
GND
Ground
49
Vc1
+5V
25
HALL2A
Phase A Hall Sensor input (Y)
50
Vc1
+5V
-o-
88
© POSYS Motion Control GmbH & Co.KG, 2013
Connection Overview - Amplifiers
Overview; Connection Summary - Motor Amplifiers
Overview; Connection Summary - Motor Amplifiers
The POSYS® card supports four methods of output to motor amplifiers:
Motor command output
method
Description
DAC
Analog signals from the on-board D/A converters
PWM Sign / Magnitude
Pulse-width modulated signals with separate magnitude and sign signals per output
phase.
PWM 50/50
Pulse-width modulated square-wave signals with a single PWM signal per output phase
Pulse & Direction
Pulse & Direction output signals
In addition, each motor axis may have 1, 2, or 3 output phases associated with it. For DC brush motors, the number of
phases is one, while for multi-phase motors such as brushless DC or microstepping motors, the number of phases can be 2
or 3, depending on the output waveform programmed into the Motion Processor. The following tables provide convenient
summaries of amplifier connections for various configurations of motor output method and motor type. These outputs
should be connected from the designated connector pins to the appropriate amplifier inputs. Note that the names of the
pins may vary among amplifiers. Common names are shown.
-oPOSYS® 8xx-B/18xx
POSYS® 8xx-B/18xx; Connections Summary - Motor Amplifiers
The POSYS® 8xx/8xx-B/18xx supports four methods of output to motor amplifiers:
Motor command signal
Description
DAC
analog signals from the on-board D/A converters
PWM Sign / Magnitude
PWM signals for Sign/Magnitude mode per phase.
PWM 50/50
PWM signals for 50/50 mode per phase.
Pulse & Direction
Pulse & Direction output signals
In addition, each motor axis may have 1, 2, or 3 output phases associated with it. For DC brush motors, the number of
phases is one, while for multi-phase motors such as brushless DC or microstepping motors, the number of phases can be 2
or 3, depending on the output waveform programmed into the motion processor.
The tables on the following pages provide convenient summaries of amplifier connections for various configurations of
motor output method and motor type. These outputs should be connected from the designated connector pins to the
appropriate amplifier inputs. Note that the names of the pins may vary among amplifiers. Common names are shown.
DC Brush Servo Motor Connections and DC Brushless Servo Motor Connections (external
commutation)
POSYS® 80x-B
POSYS® 182x (for correct interpretation: J7 = J5 and J1 = J6)
Connection
Motor output
method
POSYS® 8xx-B
Amplifier
connection name connection
Axis 1
Axis 2
Axis 3
Axis 4
DAC
DAC 1-4A
Ref+ or V+
J7-17
J7-34
J1-17
J1-34
AGND
Ref- or Gnd
J7-18
J7-35
J1-18
J1-35
89
© POSYS Motion Control GmbH & Co.KG, 2013
Connection
Motor output
method
POSYS® 8xx-B
Amplifier
connection name connection
Axis 1
Axis 2
Axis 3
Axis 4
PWM
sign/magnitude
PWMMag1-4A
PWM magnitude
J7-14
J7-31
J1-14
J1-31
PWMSign1-4A
PWM direction
J7-15
J7-32
J1-15
J1-32
GND
Gnd
J7-8
J7-26
J1-8
J1-26
PWM 50/50
unused
DC Brushless Motor Connections (internal commutation)
POSYS® 182x (for correct interpretation: J7 = J5 and J1 = J6)
Connection
Motor output
method
POSYS® 182x
Amplifier
connection name connection
Axis 1
Axis 2
Axis 3
Axis 4
DAC
DAC 1-4A
Ref1+ or V1+
Option
C on-38
Option
C on-39
Option
C on-40
Option
C on-41
DAC 1-4B
Ref2+ or V2+
Option
C on-42
Option
C on-43
Option
C on-44
Option
C on-45
AGND
Ref- or Gnd
Option
C on-37
Option
C on-46
Option
C on-37
Option
C on-46
PWMMag1-4A
PWM phase 1
Option
C on-1
Option
C on-6
Option
C on-11
Option
C on-16J1-31
PWMMag1-4B
PWM phase 2
Option
C on-2
Option
C on-7
Option
C on-12
Option
con-17
PWMMag1-4C
PWM phase 3
Option
C on-3
Option
C on-8
Option
C on-13
Option
C on-18
GND
Gnd
Option
C on-5
Option
C on-10
Option
C on-15
Option
C on-20
PWM 50/50
PWM
sign/magnitude
unused
Microstepping Motor Connections
POSYS® 182x (for correct interpretation: J7 = J5 and J1 = J6)
Connection
Motor output
method
POSYS® 182x
Amplifier
connection name connection
Axis 1
Axis 2
Axis 3
Axis 4
DAC
DAC 1-4A
Ref1+ or V1+
Option
C on-38
Option
C on-39
Option
C on-40
Option
C on-41
DAC 1-4B
Ref2+ or V2+
Option
C on-42
Option
C on-43
Option
C on-44
Option
C on-45
AGND
Ref- or Gnd
Option
C on-37
Option
C on-46
Option
C on-37
Option
C on-46
PWMMag1-4A
PWM magnitude
Option
C on-1
Option
C on-6
Option
C on-11
Option
C on-16
PWMSign1-4A
PWM direction
Option
C on-4
Option
C on-9
Option
C on-14
Option
C on-19
PWMMag1-4B
PWM magnitude
Option
C on-2
Option
C on-7
Option
C on-12
Option
C on-17
PWMSign1-4B
PWM sign
Option
C on-3
Option
C on-8
Option
C on-13
Option
con-18
GND
Gnd
Option
C on-5
Option
C on-10
Option
C on-15
Option
C on-20
PWM
sign/magnitude
PWM 50/50
unused
Pulse & Direction Motor Connections or microstepping with appropriate type drivers
90
© POSYS Motion Control GmbH & Co.KG, 2013
POSYS® 85x-B
POSYS® 182x/185x (for correct interpretation: J7 = J5 and J1 = J6)
Connection
Motor output
method
POSYS® 85x-B/ Amplifier
18xx connection connection
name
Axis 1
Axis 2
Axis 3
Axis 4
Pulse & Direction
Pulse 1-4
Pulse or step
J7-14
J7-31
J1-14
J1-31
Direction 1-4
Direction
J7-15
J7-32
J1-15
J1-32
GND
Gnd
J7-8
J7-26
J1-8
J1-26
-oPOSYS® 9xx/19xx; Connections Summary - Motor Amplifiers
POSYS® 9xx/19xx; Connections Summary - Motor Amplifiers
The POSYS® PCI cards support, depending on model, up to 4 different motor output signals for amplifiers and drives:
Motor command signal
Description
DAC
analog signals from the on-board D/A converters
PWM Sign / Magnitude
PWM signals for Sign/Magnitude mode per phase.
PWM 50/50
PWM signals for 50/50 mode per phase.
Pulse & Direction
Pulse & Direction output signals
Depending on the motor type 1, 2, or 3 phases can be used. DC brushed motors have a single phase, but DC brushless
servo motors or microstepping motors have 2 or 3 phases, deppending on the type of signal to use.
The following tables list, depending on the type of motor and signal output, the basic connecting possibilities. These
outputs should be connected with the corresponding amplifier inputs. Please note that the names used may vary as each
amplifier manufacturer may use different names for their connectors. The names used in the tables are usually used
names.
Brushed Servo Motor mode with DAC output, PWM magnitude and direction output or
PWM 50/50 output and DC Brushless Servo Motor Connections (external commutation)
POSYS® 190x/192x
POSYS® 90x/91x/97x/98x
GP CON J6, 100-position Connector
Motor command
method
Signal
Connection to
amplifier
X-Axis
Y-Axis
Z-Axis
W-Axis
16 Bit DAC (±10 Volt)
DAC V 1-4
Ref+ or V+
17
34
67
84
Analog Ground
AGND
Ref- or GND
18
35
68
85
PWM Sign + Magnitude
oder 50/50 Output
BPWM 1-4
PWM Magnitude
14
31
64
81
PWM Sign
BPWMS 1-4
PWM Sign
15
32
65
82
Digital Ground für 50/50
GND
GND
12
26
62
76
Stepping Motor mode ONLY possible or microstepping with appropriate type drivers
POSYS® 190x/192x/195x
POSYS® 95x
GP CON J6, 100-position Connector
91
© POSYS Motion Control GmbH & Co.KG, 2013
Motor command
method
Signal
connection to
amplifier
X-Axis
Y-Axis
Z-Axis
W-Axis
Pulse (TTL)
Pulse 1-4
Pulse or C lock
14
31
64
81
Direction (TTL)
Dir 1-4
Direction input
15
32
65
82
In –Position (TTL)
AtRest 1-4
Standby C urrent
17
34
67
84
Stepping motor mode, inverted signals Pulse & Direction
POSYS® 95x
POSYS® 190x/192x/195x (Standard 95x/195x)
These signals can only be accessed if the board is equipped w ith „Option Con“ J5.
OPTION CON J5, 68-position connector
Motor command
method
Signal
Connection to
amplifier
X-Axis
Y-Axis
Z-Axis
W-Axis
Pulse, (TTL)
Pulse 1-4
Pulse oder C lock
1
4
7
10
Direction, (TTL)
Dir 1-4
Direction input
3
6
9
12
Pulse+, Line Driver
Pulse+
1-4
Pulse+ oder C lock+ 21
22
23
24
Pulse- , Line Driver
Pulse – 1-4
Pulse– oder C lock- 55
56
57
58
Direction+, Line Driver
Dir+ 1-4
Direction+
25
26
27
28
Direction-, Line Driver
Dir-
Direction-
59
60
61
62
In-Position, TTL
AtRest 1-4
Standby C urrent
2
5
8
11
1-4
Brushless Servo Motor mode with on-board sinusoidal commutation
POSYS® 192x
POSYS® 92x/93x/97x/98x
(requires CON J5)
GP CON J6, 100-position Connector
Motor command
method
Signal
Connection to
amplifier
X-Axis
Y-Axis
Z-Axis
W-Axis
16 Bit DAC ± 10 Volt
DAC V 1-4
Ref+ or V+
17
34
67
84
Analog Ground
AGND (1-4)
Ref- or GND
18
35
68
85
In this mode DACA1-4 and AGND (1-4) are available twice (on GP CON and OPTION CON), but only need to be connected
once. The user can choose which connections are more convenient for his application.
OPTION CON J5, 68-position Connector
Motor command
method
Signal
Connection to
amplifier
X-Axis
Y-Axis
Z-Axis
W-Axis
16 Bit DAC ± 10 Volt
DAC B1-4
Ref+ or V+
31
32
33
34
Analog Ground
AGNDB (1-4) Ref- or GND
30
30
30
30
16 Bit DAC ± 10 Volt
DAC A1-4
65
66
67
68
Analog Ground
AGNDA (1-4) Ref- or GND
64
64
64
64
PWM 50/50
PWM
PWM Phase 1
Magnitude nA
1
4
7
10
PWM 50/50
PWM
PWM Phase 2
Magnitude nB
35
38
41
44
PWM 50/50
PWM
PWM Phase 3
Magnitude nC
2
5
8
11
Hall Sensor
Hall A (1-4)
To motor Halls
13
15
17
19
Hall Sensor
Hall B (1-4)
To motor Halls
47
49
51
53
Hall Sensor
Hall C (1-4)
To motor Halls
14
16
18
20
Ref+ or V+
92
© POSYS Motion Control GmbH & Co.KG, 2013
Motor command
method
Signal
Connection to
amplifier
X-Axis
Y-Axis
Z-Axis
W-Axis
Ground
Ground
GND
48
50
52
54
Ground
Ground
GND
36
37
39
40
Microstepping Motor mode
POSYS® 192x
POSYS® 94x/96x/97x/98x
(requires CON J5)
GP CON J6, 100-position Connector
Motor command
method
Signal
Connection to
amplifier
X-Axis
Y-Axis
Z-Axis
W-Axis
16 Bit DAC ± 10 Volt
DAC V 1-4
Ref+ or V+
17
34
67
84
Analog Ground
AGND (1-4)
Ref- or GND
18
35
68
85
In diesem Modus sind DACV1-4 und AGND (1-4) doppelt vorhanden (on GP CON and OPTION CON), aber nur das eine oder
andere muss angeschlossen werden. Der Anwender kann entscheiden welche Anschlüsse für seine Applikation am
bequemsten zu verwenden sind.
OPTION CON J5, 68-poliger Stecker
Motor command
method
Signal
Connection to
amplifier
X-Axis
Y-Axis
Z-Axis
W-Axis
16 Bit DAC ± 10 Volt
DAC B 1-4
Ref+ or V+
31
32
33
34
Analog Ground
AGNDB (1-4) Ref- or GND
30
30
30
30
16 Bit DAC ± 10 Volt
DAC VA1-4
65
66
67
68
Analog Ground
AGNDA (1-4) Ref- or GND
64
64
64
64
PWM Magnitude
PWM
PWM Magnitude
Magnitude nA
1
4
7
10
PWM Sign
PWM Sign nA PWM Direction
3
6
9
12
PWM Magnitude
PWM
PWM Magnitude
Magnitude nB
35
38
41
44
PWM Sign
PWM Sign nB PWM Direction
2
5
8
11
PWM 50/50
PWM
PWM Phase 1
Magnitude nA
1
4
7
10
PWM 50/50
PWM
PWM Phase 2
Magnitude nB
35
38
41
44
PWM 50/50
PWM
PWM Phase 3
Magnitude nC
2
5
8
11
Ref+ or V+
C onnections not specifically listed in these tables would be common to all models for the J5 and J6 connectors.
-o-
93
© POSYS Motion Control GmbH & Co.KG, 2013
Usability
94
© POSYS Motion Control GmbH & Co.KG, 2013
Control Modules for POSYS® 1800/1900 with Firmware Version >2.0
95
© POSYS Motion Control GmbH & Co.KG, 2013
Control Flow Overview
Control Flow Overview
The following figure provides a control flow overview for the Magellan Motion Processors. It shows how a final motor
command is generated, starting with the profile generator and ending with the motor output module that generates
amplifier-compatible output signals. Depending on the type of product and motor, some modules may not be used. For
example, step motors do not use a position PID loop. In addition, depending on the nature of the control problem, some
modules may be disabled by the user to tailor the control for their specific application.
C ontrol Flow Überblick
Each of the major blocks within the control flow diagram is referred to as a module. The following table provides a brief
description of each module.
Module name
Function
Trajectory Generator This module accepts user-specified parameters and generates a trajectory.
Position Loop
This module is used with servo motors only. It inputs the
commanded position(the instantaneous
desired axis position) and theactual position (the motor position measured by an encoder), and
passes the resultantposition error (the difference between the commanded and the actual position)
through a PID filter along with dual biquad filters to generate a motor command.
C ommutation/Phasin This module is used with multi-phase motors such as brushless DC motors or microstepping step
g
motors, and generates desired torque signals for each phase of the motor.
Motor Output
This module inputs the desired motor phase command and generates the appropriate signals for
the selected output format.
Each of these modules is described in detail in subsequent chapters. Beyond the functions provided by these major control
modules, Magellan also provides numerous additional capabilities such as breakpoints, trace, and PLC -style signal control.
These features are common to all motor types and motion processors, and are also described in detail in subsequent
chapters.
-o-
96
© POSYS Motion Control GmbH & Co.KG, 2013
Enabling and Disabling Control Modules
Enabling and Disabling Control Modules
At various times during setup or operation of an axis, it may be desirable to selectively enable or disable specific control
modules. This is accomplished using the command SetOperatingMode. To read back the status set using this command, the
command GetOperatingMode is used. Generally speaking, if a module is disabled, Magellan skips whatever features and
calculations are associated with that module, and the input from the previous module is passed directly to the subsequent
module without modification.
The following table summarizes which modules may be disabled or enabled, and describes typical circumstances under
which this might be useful. In addition to these specific modules it is possible to enable or disable an entire axis using the
SetOperatingMode command. Note that the commutation/phasing module may not be disabled or enabled by the user. If a
multi-phase motor type such as brushless DC or microstepping is selected, this module is always enabled.
Module
Description
Typical Uses
Trajectory Generator
If disabled, the commanded position will stayThe trajectory generator is not usually
at its present value.
disabled manually. For trajectory control,
which requires an immediate stop, the
SetStopModecommand with an argument
of Abrupt Stop is used instead.
Position Loop
Used with servo motors only. If disabled, thisDisabling this module with trajectory
module outputs from one of two sources,
generator enabled is useful if voltage or
depending on whether the trajectory
current-proportional positioning devices are
generator module is enabled or disabled.
used, such as certain kinds of
Trajectory generator enabled.If the
galvanometers. It may also be useful if
trajectory generator is enabled, then the
amplifier calibration with automated ramps is
position loop is skipped, and the output of
required. With trajectory generator disabled,
the profile generator is input directly to the disabling this module may be useful for
subsequent module.
amplifier or motor calibration.
Trajectory generator disabled.If the
trajectory generator is also disabled, the
output comes from the Motor C ommand
register, which can be manually set using the
command SetMotorCommand
.
Motorausgabe
Disabling this module sets all motor
Disabling motor output is useful in
generation to a value of zero (0). The actual connection with various safety-related
states of the associated motor output signalsconditions, or for amplifier calibration.
will depend on the selected signalling method
(PWM sign/mag, PWM 50/50, parallel DAC ,
or serial DAC )
In addition to manually disabling modules, there are a number of circumstances where modules may be automatically
disabled due to event-related issues, or breakpoints.
GetOperatingMode returns the value set using the command SetOperatingMode, which sets the desired operating mode
under normal operational circumstances. However this may differ from the actual operating mode for the reasons
mentioned above. To determine the actual current status of the operating mode word use the command
GetActiveOperatingMode
.
-o-
97
© POSYS Motion Control GmbH & Co.KG, 2013
Disabling and Enabling the Position Loop Module
Disabling and Enabling the Position Loop Module
only available for POSYS® 1800/1900 with Motion Control F irmware Version >2.x
There are a number of reasons why it might be desirable to disable the position loop module. See
Enabling
"
and Disabling
C ontrol Modules” for details. In addition, there are event-related actions that may result in this module being disabled. See
“SetEventAction Processing,
” for details.
If the position loop module is disabled, the overall control flow of the motion processor module will be altered in one of two
ways, depending on whether the trajectory generator is enabled or disabled when the position loop module is disabled.
Trajectory generator disabled
— If the trajectory generator module is disabled when the position loop is disabled, the
output of the position loop module will be a 16-bit word derived from a programmable motor command register, set using
SetMotorC ommand
, and read back usingGetMotorC ommand
.
Trajectory generator enabled
— If the trajectory generator module is enabled when the position loop is disabled, then
the position loop module is bypassed, and the output value of the trajectory generator becomes the motor command value.
Note that only the low word of the 32-bit commanded position is used. This is because the output of the trajectory
generator is a 32-bit commanded position, while the output of the position loop, and therefore the input to subsequent
modules, is a 16-bit motor command. Effectively this means that when used in this mode, the range of the trajectory
generator is limited to 16 bits –32,768
(
to +32,767).
Regardless of whether the position loop module is enabled or disabled, the actual effective motor command value may be
queried using the command GetActiveMotorC ommand. This value will indicate the motor command being sent
“ to
downstream” processing modules such as commutation, current control (Magellan/ION only), or motor output.
A previously disabled position loop module may be re-enabled in a number of ways. If the module was disabled using the
SetOperatingModecommand, then anotherSetOperatingModecommand may be issued. If the position loop module was
disabled as part of an automatic event-related action (see
“SetEventAction Processing,
” for more information) then the
command RestoreOperatingMode is used.
Regardless of how the module is re-enabled, at the time that the re-enable operation is requested, certain special
processing occurs to avoid unexpected axis movement. In particular, all position loop state variables are set to zero(0).
-o-
98
© POSYS Motion Control GmbH & Co.KG, 2013
Reading Position Loop Values
Reading Position Loop Values
only available for POSYS® 1800/1900 with Motion Control F irmware version >2.x
As indicated in this chapter and others, there are a number of commands which can be used to read various position
loop-related values. These includeGetC ommandedPositionto read the input command of the position loop,
GetActualPositionto read the actual encoder position,
GetPositionErrorto read the difference between these two quantities,
and GetActiveMotorC ommandto read the output of the position loop module. In addition to being readable through these
commands, these variables can also be selected for tracing.
Beyond these registers, to further facilitate tuning, there are a number of internal position loop values that can be read
back as well as traced. To read back these values the command
GetPositionLoopValueis used.
The variables within the position loop that can be read and traced are summarized in the following table.
Variable Name
Function
Integrator Sum
This register holds the sum of the integrator for the position PID loop.
Integral Contribution
This register holds the overall contribution of the integrator to the position PID loop.
Derivative
This register holds the position error derivative value. That is, the difference between
the present position error and the previous one.
BiQuad1 Input
This register holds the input value to biquad filter 1.
BiQuad2 Input
This register holds the input value to biquad filter 2.
-o-
99
© POSYS Motion Control GmbH & Co.KG, 2013
Trajectory Generation
Trajectories, Profiles and Parameters
Trajectories, Profiles and Parameters
The trajectory generator performs calculations to determine the instantaneous position, velocity and acceleration of the
desired POSYS® at any given moment in time. These values are called the commanded values. During a profile motion
some or all of these parameters will change continuously. Once the profile move is complete these parameters will stay at
the same value until a new move is started.
To query the instantaneous commanded profile values the commands GetCommandedPosition, GetCommandedVelocity,
and GetCommandedAcceleration are used.
Throughout this manual various command mnemonics will be shown to clarify POSYS® usage or provide specific examples.
See the POSYS® Programmers Section for more information on commands, nomenclature, and syntax.
The specific profile that is created by the POSYS® depends on several factors including the presently selected profile
mode, the presently selected profile parameters, and other system conditions such as whether a motion stop has been
requested. Four trajectory profile modes are supported:




S-curve point to point
Trapezoidal point to point (w/ or w/o smoothing factor)
Velocity contouring
Electronic gearing
The operation of these profile modes will be explained in detail in subsequent sections. The command used to select the
profile mode is SetProfileMode. The command GetProfileMode retrieves the programmed profile mode.
The profile mode may be programmed independently for each axis. For example axis #1 may be in trapezoidal mode while
axis #2 is in S-curve point to point.
With one exception, the POSYS® can switch from one profile to another while an axis is in motion. The exception: when
switching to the S-curve point-to-point profile from any other profile, the axis must be at rest.
-oTrajectory Parameter Representation
Trajectory parameter representation
The POSYS® sends and receives trajectory parameters using a fixed point representation. In other words, a fixed number
of bits are used to represent the integer portion of a real number, and a fixed number of bits are used to represent the
fractional component of a real number.
The POSYS® uses three formats:
Format
Word size
Range
Description
32.0
32 bits
2,147,483,648 to
+2,147,483,647
counts
Unity scaling. This format uses an integer only representation of
the number.
16.16
32 bits
32,768 to 32,767
+65,535/65,536
Uses 1/216 scaling. The POSYS® expects a 32 bit number which
has been scaled by a factor of 65,536. For example to specify a
velocity 2.75, 2.75 is multiplied by 65,536 and the result is sent to
the POSYS® as a 32 bit integer (180,224 dec. or 2c000 hex)
0.32
32 bits
2,147,483,648/
4,294,967,296 to
+2,147,483,647/
4,294,967,296
Uses 1/232 scaling. The POSYS® expects a 32 bit number which
has been scaled by a factor of 4,294,967,296 (232). For example
to specify a value of 0.0075, 0.0075 is multiplied by 4,294,967,296
and the result is sent to the POSYS® as a 32 bit integer
(32,212,256 dec. or 1eb8520 hex).
100
© POSYS Motion Control GmbH & Co.KG, 2013
The conversion to the appropriate types and formats is already done by the supplied DLL.
-oTrajectory Point-to-Point Profile
Trapezoidal point-to-point profile
The following table summarizes the host specified profile parameters for the trapezoidal point to point profile mode:
Profile Parameter
Format
word size
Range
Position
32.0
32 bits
-2,147,483,648 to +2,147,483,647 counts
Velocity
16.16
32 bits
0 to 32,767+65,535/65,536 counts/cycle
Acceleration
16.16
32 bits
0 to 32,767+65,535/65,536 counts/cycle²
Deceleration
16.16
32 bits
0 to 32,767+65,535/65,536 counts/cycle²
The host instructions SetPosition, SetVelocity, SetAcceleration, and SetDeceleration load these values. The commands
GetPosition, GetVelocity, GetAcceleration, and GetDeceleration retrieve the programmed values.
For this profile, the host specifies an initial acceleration and deceleration, a velocity, and a destination position. The profile
gets its name from the resulting curve (Figure 1-1a): the axis accelerates linearly (at the programmed acceleration value)
until it reaches the programmed velocity. It continues in motion at that velocity, then decelerates linearly (using the
deceleration value) until it stops at the specified position. If deceleration must begin before the axis reaches the
programmed velocity, the profile will have no constant velocity portion, and the trapezoid becomes a triangle (Figure
1-1b).
101
© POSYS Motion Control GmbH & Co.KG, 2013
Figure 1-1. Trapezoidal point-to-point profiles
The slopes of the acceleration and deceleration segments may be symmetric (if acceleration equals deceleration) or
asymmetric (if acceleration is not equal to deceleration).
The acceleration parameter is always used at the start of the move. Thereafter, the acceleration value will be used for
acceleration in that direction, and deceleration will be used for accelerations in the opposite direction. If no motion
parameters are changed during the motion then the acceleration value will be used until the maximum velocity is reached,
and the deceleration value will be used when ramping down to zero.
It is acceptable to change any of the profile parameters while the axis is moving in this profile mode. The profile generator
will always attempt to remain within the legal bounds of motion specified by the parameters. If, during the motion, the
destination position is changed in such a way that an overshoot is unavoidable, the profile generator will decelerate until
stopped, then reverse direction to move to the specified position.
Note that since the direction of acceleration/deceleration is fixed at the start of the move, the deceleration
value will be used when ramping up velocity for the final move to the destination position. This is shown in
figure 1-1c.
If a deceleration value of 0 (zero) is programmed (or no value is programmed leaving the POSYS®´s default value of zero)
then the deceleration value used will be the acceleration value.
-o-
102
© POSYS Motion Control GmbH & Co.KG, 2013
Smoothing Factor
Filtered Trapezoidal Profile (Blending)
The Smoothing Factor is an option and enhancement of the standard trapezoidal profile that includes a filtered trapezoidal
trajectory generator. Because the underlying profile mode is the trapezoid, profile features including on-the-fly parameter
change (position, velocity and acceleration/deceleration) and asymmetrical profile generation are available.
This modified trapezoidal profile produces an S-Curve style velocity profile while permitting all trajectory parameters to be
changed on the fly. The actual filter is shown below.
The “ProfileKp” is a proportional gain parameter with a range between 0 and 32767. When set to 32767 the gain is “unity”
and results in no filtered output. For values below 32767 the trajectory is filtered accordingly.
C ommanded velocity and acceleration, which are used by the PID filter for the feedforward terms, are derived from the
filtered position.
The default ProfileKp value after a Reset or power-on is 0x7fff.
The following pictures show the differences in the motion without and then with activated Smoothing Factor. Without
activated Smoothing Factor you can see clear overshooting when running into position. With activated Smoothing Factor
this overshooting is reduced or even eliminated.
The first 4 pictures show typical behaviour without activated Smoothing Factor. The first picture gives an overview of the
complete motion and the next 3 pictures are zoomed-in areas of the positions where the motion come to an halt and
accelerates again or as indicated in the last (4th) picture when it motion comes to a complete end.
103
© POSYS Motion Control GmbH & Co.KG, 2013
Total movement without Smoothing Factor
First stop without Smoothing Factor. Overshooting is visible. After in-position the motion continues to new target position
104
© POSYS Motion Control GmbH & Co.KG, 2013
Second stop with overshooting and new start of motion in opposite direction
End of motion with overshooting again
The next 4 pictures show the same motion with the same target positions, velocity and acceleration values as before. The
new effect is that the motion becomes a s-curve similar shape with the difference that all parameters stay changeable
"on-the-fly" as usual in trapezoidal mode. Compared to the pure trapezoidal mode the motion needs longer to reach end
position.
105
© POSYS Motion Control GmbH & Co.KG, 2013
C omplete motion with Smoothing Factor
First stop with Smoothing Factor. Overshooting is no longer visible. After in-position the motion continues to new target
position
106
© POSYS Motion Control GmbH & Co.KG, 2013
Second stop without overshooting and new start of motion in opposite direction
End of motion without overshooting again
All pictures show actual position values as captured with the POSYS® trace function.
Set/GetProfileKp
-oS-curve Point-to-Point Profile
S-curve point-to-point profile
The following table summarizes the host specified profile parameters for the S-curve point to point profile mode:
Profile Parameter
Format
Range
Position
32 bits
-2,147,483,648 to +2,147,483,647
Velocity
32 bits
0 to 32,767+65,535/65,536 counts/cycle
107
© POSYS Motion Control GmbH & Co.KG, 2013
Profile Parameter
Format
Range
Acceleration
32 bits
0 to 32,767+65,535/65,536 counts/cycle²
Deceleration
32 bits
0 to 32,767+65,535/65,536 counts/cycle²
Jerk
32 bits
0 to 2,147,483,647/4,294,967,296 counts/cycle³
The host instructions SetPosition, SetVelocity, SetAcceleration, SetDeceleration, and SetJerk load these respective values.
The commands GetPosition, GetVelocity, GetAcceleration, GetDeceleration, and GetJerk retrieve the programmed values.
In S-curve profile mode, the same value must be used for both acceleration and deceleration. Asymmetric profiles are not
allowed.
The S-curve point-to-point profile adds a limit to the rate of change of acceleration to the basic trapezoidal curve. A new
parameter (jerk) is added which specifies the maximum change in acceleration in a single cycle.
In this profile mode, the acceleration gradually increases from 0 to the programmed acceleration value, then the
acceleration decreases at the same rate until it reaches 0 again at the programmed velocity. The same sequence in reverse
brings the axis to a stop at the programmed destination position.
Figure 2-1. S-curve profile
Figure 2-1 shows a typical S-curve profile. In segment I, the S-curve profile drives the axis at the specified jerk (J) until
the maximum acceleration (A) is reached. The axis continues to accelerate linearly (jerk = 0) through Segment II. The
profile then applies the negative value of the jerk to reduce acceleration to 0 during Segment III. The axis is now at
maximum velocity (V), at which it continues in motion through Segment IV. The profile will then decelerate in a manner
similar to the acceleration stage, using the jerk value first to reach the maximum deceleration (A), and then to bring the
axis to a halt at the destination.
An S-curve profile might not contain all of the segments shown in figure 2-1. For example, if the maximum acceleration
cannot be reached before the 'halfway' point to or from the velocity, the profile would not contain a Segment II or a
Segment VI. Such a profile is shown in figure 2-2
Figure 2-2. S-curve that doesn't reach maximum acceleration
Similarly, if the position is specified such that velocity is not reached, there will be no Segment N, as shown in figure 2-3.
(There may also be no Segment II or Segment VI, depending on where the profile is "truncated".)
108
© POSYS Motion Control GmbH & Co.KG, 2013
Figure 2-3. S-curve with no maximum-velocity segment
Unlike the trapezoidal profile mode, the S-curve profile mode does not support changes to any of the profile
parameters while the axis is in motion.
Likewise, the axis may not be switched into S-curve profile mode while the axis is in motion. It is however legal to switch
from S-curve mode to any other profile mode while in motion. If the S-curve mode is substantial to the type of control
application and the necessity of changing various PID, velocity, accel./decel. parameters, then it is recommended to use
the Trapezoidal point to point mode with smoothing factor. This mode allows a S-curve similar behavior of the motion when
changing from accel./decel sectors to the velocity sector or coming to a STOP.
-oVelocity Contouring Profile
Velocity contouring profile
The following table summarizes the host specified profile parameters for the Velocity contouring profile mode:
Profile Parameter Word size
Range
Velocity
32 bits
0 to 32,767+65,535/65,536 counts/cycle
Acceleration
32 bits
0 to 32,767+65,535/65,536 counts/cycle²
Deceleration
32 bits
0 to 32,767+65,535/65,536 counts/cycle²
The host instructions SetVelocity, SetAcceleration, and SetDeceleration load these respective values. The commands
GetVelocity, GetAcceleration, and GetDeceleration, retrieve the programmed values.
Unlike the Trapezoidal and S-curve profile modes where the destination position determines the direction of initial travel, in
the Velocity contouring profile mode the sign of the velocity parameter determines the initial direction of motion. Therefore
the velocity value that is sent to the POSYS® can have positive values (for positive direction motion) or negative values
(for negative direction motion).
In this profile, no destination position is specified. The motion is controlled entirely by changing the acceleration, velocity,
and deceleration parameters while the profile is being executed.
The trajectory is executed by continuously accelerating the axis at the specified rate until the velocity is reached. The axis
starts decelerating when a new velocity is specified which has a smaller value (in magnitude) then the present velocity, or
has a sign that is opposite to the present direction of travel.
A simple velocity-contouring profile looks just like a simple trapezoidal point-to-point profile, as shown in Figure 1-1.
Figure 3-1 illustrates a more complicated profile, in which the both the velocity and the direction of motion change twice:
109
© POSYS Motion Control GmbH & Co.KG, 2013
Figure 3-1. Velocity-contouring profile
Note:
In velocity contouring profile mode axis motion is not bounded by a destination. It is the host´s responsibility
to provide acceleration, deceleration, and velocity values w hich result in safe motion within acceptable
position limits.
-oElectronic Gear Profile
Electronic-gear profile
The following table summarizes the host specified profile parameters for the electronic gear profile mode:
Profile ParameterWord size
Range
Gear ratio
32 bits
-32,767 to 32,767+65,535/65,536 counts/cycle
Master axis #
2 bits
0-3*
Master source
1 bit
2 values; encoder or commanded (see below for details)
*for two axes products 0-1. Single axis products do not support electronic gearing.
The host instructions SetGearRatio, and SetGearMaster load these respective values. The commands GetGearRatio and
GetGearMaster retrieve the programmed values.
In this profile, the host specifies three parameters. The first is the „master“ axis # which is the axis that will be the source
of position information used to drive the „slave“ axis, which is the axis in gear mode. The second is the gear source, which
is either actual (the encoder position of the master axis) or the commanded (the commanded position of the master axis).
The third is the gear ratio, which specifies the direction and ratio of master gear counts to slave counts.
Figure 4-1. POSYS® set up for electronic-gearing profile
110
© POSYS Motion Control GmbH & Co.KG, 2013
A positive gear ratio value means that when the master axis actual or commanded position is increasing the
slave-commanded position will also increase. A negative gear ratio value has the opposite effect; increasing master
position will result in decreasing slave axis commanded position.
For example, let us assume the slave axis is axis #0 (axes are counted 0, 1, 2, 3 for a four axes motion controller) and the
master axis is set to axis #3. Also assume the source will be actual with a gear ratio of -½.
Then for each positive encoder count of axis 3, axis 0 commanded position will decrease in value by ½ count, and for each
negative encoder count of axis 3 axis 0 commanded position will increase in value by ½ count.
Figure 4-1 shows the arrangement of encoders and motor drives in a typical electronic gearing
The electronic gear profile requires two axes to be enabled. The single-axis motion processors, therefore, do not support
electronic gearing in a useful way.
If the master axis source is set to actual, this axis need not have a physical motor attached to it. Frequently, it is used only
for its encoder input, for example from a directly driven (open-loop) motor, or a manual control. It is possible, however, to
drive a motor on the master axis by enabling the axis and applying a profile mode other than electronic gear to the axis.
The effect of this arrangement is that both master and slave can be driven by the same profile, even though the slave can
drive at a different ratio and in a different direction if desired. The master axis will operate the same whether or not it
happens to be the master for some other geared axis. The optional components shown in Figure 4-1 illustrate this
arrangement. Such a configuration can be used to perform useful functions such as linear interpolation of two axes.
NOTES
The gear-ratio parameter may be changed while the axis is in motion, but care should be taken to select ratios
so that safe motion is maintained.
-oExternal Profile Mode
On-board RAM
All motion controllers utilize on-board RAM as which we refer to on-board RAM in this document. Depending on the type of
model they either have 256k x 8 (700, 800 series), 512k x 8 (800-B, 900, 1800, 1850, 1900, 1950 series) Single Port
RAM or 32k x 16 (1920, 1820 series) Dual Port RAM.
This memory can be used to support two purposes, first it can be used to store trace information, the second purpose is to
use it to store profile information (for complex motion profiles, e.g. circular interpolation). The usage of the RAM for the
tracing function allows real-time capturing of certain data and events by the motion processor and the automatic storage to
the on-board RAM. 4 different variables out of 28 can be selected for parallel capturing. Data is captured each update
period. Longer periods can be selected changing the trace capturing period (e.g. every 10th update period or 13th update
period).
The length of the trace buffers can be defined and is programmable. It is possible to choose the complete amount of
memory (POSYS 1800/1900) or just a part of it with exception of the first 512 words (POSYS 700/800/800-B/900).
It is possible to define separate trace and program buffers. The different buffers are defined by setting IDs. A trace buffer
must always be ID=0.
The POSYS 1800/1900 boards are optionally available with DPRAM. Only the fully equipped versions 1820 and 1920 have
DPRAM by default (32k x 16). For all other 1800/1900 versions it is possible to order the boards with other RAM sizes and
SPRAM or DPRAM. For details please contact servo Halbeck GmbH & Có.KG.
Relevant On-Board RAM-Functions
Relevant functions for use with on-board RAM are:
Profile Mode




GetBufferFunction
GetBufferLength
GetBufferReadIndex
GetBufferStart
111
© POSYS Motion Control GmbH & Co.KG, 2013










GetBufferWriteIndex
GetStopMode
ReadBuffer
SetBufferFunction
SetBufferLength
SetBufferReadIndex
SetBufferStart
SetBufferWriteIndex
SetStopMode
WriteBuffer
The function SetProfileMode(axis, mode) was extended with the mode "External Profile Mode = 4".
All above functions and necessary parameters are described in the Programmer's manual.
Trace Mode












GetTraceCount
GetTraceMode
GetTracePeriod
GetTraceStart
GetTraceStatus
GetTraceStop
GetTraceVariable
SetTraceMode
SetTracePeriod
SetTraceStart
SetTraceStop
SetTraceVariable
These functions are only valid for setup and execution for tracing. A detailed description can be found in the Programmer's
manual.
Usage of On-Board RAM for External Profile Mode
The on-board RAM can be used to store complex motion profiles. The motion data needs to be pre-calculated by the host
and can then be downloaded to the memory from where the motion processor loads the information and executes the
motion without further host intervention. Up to 4 axes can be moved in parallel in a high-complex motion sequence.





Position
Velocity
Acceleration
Jerk (S-curve)
SegmentTime
All data needs to be provide in 32 bit format





Position data is always absolut und represents the target position at the end of a segment.
Velocity is in quadrature counts per update period
Acceleration (negative and positive) are quadrature counts per update period²
Jerk is in quadrature counts per update period³
SegmentTime is a multiple of the update period
If all 4 axes are active and the update period ist set to the standard value of 408 µs (as on POSYS 700/800/800-B/900
boards), then the fastest available update-time for the data in the buffer which are represented by SegmentTime are a
multiple of 1. As soon as a SegmentTime multiple of 0 is recognized the External Profile Mode for this axis is stopped. The
other axes continue with the execution of their motion profiles. Position Error and an Abrupt Stop are also possible to stop
the execution of programs residing in the on-board RAM.
112
© POSYS Motion Control GmbH & Co.KG, 2013
The length of the SegmentTime depends on the type of profile and on the type of application. The shorter the time the
more memory is used. Linear motion profiles can utilize much longer SegmentTimes than circular interpolation profiles.
SegmentTimes for circular interpolation profiles seldomly need to be shorter than 2 ms (equals about 5 update periods on
POSYS 700/800/800-B/900 boards and 8 update periods on POSYS 1800/1900 boards).
What needs to be taken into consideration
A motion profile being executed in External Profile Mode is normally programmed to reach to an end of the programmed
buffer containing its data. If the SegmentTime value of 0 is not found at this position it will jump back to the start position
(defined with SetBufferStart) and continue with the execution. This can become a potentially dangerous situation.
This can lead to a sudden jump of the axis from one position to another if the End Position differs a lot from the Start
Position. To leave the External Profile Mode the last segment must have a SegmentTime multiple of 0 for each involved
axis. The axes will then remain in their end position. But the defined Profile Mode is still active (profil=4) and needs to be
set to the desried mode with the command SetProfileMode(axis,mode) if the External Profile Mode is no longer needed.
Available Memory (RAM) too small for Program Execution
If the program length is too small to fit completely in to the on-board RAM, then this is no problem. Devide the motion
sequence in to smaller sequences. Load these segments and send additional sequences to the Memory segments as soon
as the memory is available again. The memory is devided in to segments which contain just actually executed sequences
and segments which wait to be executed. The functions GetBufferReadIndex and GetBufferWriteIndex are mechanisms to
define the actual reading and writing position for new data. As soon as the starting data has been executed the read index
returns automatically to the start position and continues with the execution of the program.
For example: the total number of programmed positions in the RAM equals 26,350, but only 10,000 positions are available.
Then do the following:



Load the data to the positions 0 to 10,0000



Start to load new data to the RAM and start with the position BufferWriteIndex = 0 until RAM position = 4,999
Start the External Profile Mode
Set a Breakpoint which fits to an event as soon as the BufferReadIndex gets to position 5,000 or check the
BufferReadIndex >= 5,000
C heck the BufferReadIndex until it is <= 10,000
Start to load new data to the RAM and start at the position BufferWriteIndex = 5,000 and continue until RAM position
= 10,000
C ontinue with this method until all data has been loaded and executed. Take care to add the last segment which contains
the SegmentTime multiplier = 0 to leave the External Profile Mode at the end of the sequence.
-oSetStop Command
The SetStop command
Normally each of the above trajectory profile modes will execute the specified trajectory, within the specified parameter
limits, until the profile conditions are satisfied. For example, for the point-to-point profile modes this means that the profile
will move the axis until the final destination position has been reached, at which point the axis will have a velocity of zero.
In some cases however it is necessary to halt the trajectory manually, for safety reasons, or simply to achieve a particular
desired profile. This can be accomplished using one of two methods: abrupt stop, or smooth stop.
To perform a stop the command SetStopMode is used. To retrieve the current stop mode the command GetStopMode is
used.
AbruptStop instantaneously stops the profile by setting the target velocity of the designated axis to zero. This is, in effect,
an emergency stop with instantaneous deceleration.
Smooth Stop brings the designated axis to a controlled stop, using the current deceleration parameter to reduce the
velocity to zero.
CAUTION
AbruptStop must be used with care. Sudden deceleration from a high velocity can damage equipment or cause
injury.
113
© POSYS Motion Control GmbH & Co.KG, 2013
AbruptStop functions in all profiles. SmoothStop functions in all profiles except electronic-gear.
-oMotor Mode
Motor Mode
All POSYS® support a programmable motor mode that can enable and disable the profile generator, and the axes in servo
mode of the POSYS® can be set to open loop mode or closed loop mode.
The command SetMotorMode determines the motor mode and the command GetMotorMode retrieves the current value of
the motor mode.
If the motor mode is set ON then the trajectory generator is active. If the motor mode is set OFF then the profile generator
is disabled.
In addition, for the POSYS® axes in servo mode, if the motor mode is set OFF then the POSYS® enters open loop mode
which means the servo filter is disabled and the motor command (the current output level requested by the POSYS®) is
determined manually by the host using the command SetMotorCommand. If the motor mode is set ON then the motor
command is determined by the servo loop.
The most common use of the motor mode in anything other than the standard ON state is after a motion error. In the case
of a motion error (and if auto stop is enabled) then the POSYS® will set the motor mode OFF automatically, thereby
placing it in a safe state where no further motion can occur until the host explicitly restores the motor mode to the ON
condition.
For the servo version it may also be useful to set the motor mode to OFF for purposes of amplifier calibration.
-oSetting the Cycle Time
Setting the cycle time
POSYS® 7xx/8xx/8xx-B/9xx
The POSYS® calculates all trajectory and servo information on a fixed, regular interval. This interval is known as the cycle
time.
For each axis of the POSYS® that is enabled there is a minimum cycle time required for the POSYS® to function properly.
The following table shows this for the POSYS® 7xx/8xx-B/9xx:
POSYS®
Cycle time per enabled axis
POSYS® 70x, 80x, 90x, 91x
100 µsec
POSYS® 75x, 85x, 94x, 95x,
96x
n.a. (instead: profile calculation timing range = 100 µsec for POSYS® 75x, 85x,
95x;
150 µsec for POSYS® 94x, 96x
POSYS® 92x, 93x, 97x, 98x
150 µsec
To calculate the total minimum cycle time for a given number of enabled axes, multiply the number of axes by the
minimum cycle time. For example for a POSYS® with four axes enabled, the minimum loop time would be 4x100 = 400
µsec, for a cycle frequency of 2.5 kHz.
The cycle rate determines the trajectory update rate for all products as well as the servo loop calculation rate for the servo
products (POSYS® 70x, 80x, 90x, 91x, 92x, 93x, 97x, 98x).
An enabled axis receives its cycle "time slice" whether or not it is in motion, and whether or not the motor is on or off
SetMotorMode command). If cycle time is critical, it`s possible to reclaim that time by disabling an unused axis and
114
© POSYS Motion Control GmbH & Co.KG, 2013
resetting the loop rate with the instruction SetSampleTime.
For example, using a POSYS® 704/804/904, four axes are available, but if only 3 will be used in a specific application then
the unused axis can be disabled using the command SetMotorMode and the new sample time of 300 µsec can be set using
the SetSampleTime command. This improves the cycle frequency from 2.5 kHz to 3.333 kHz.
POSYS® 18xx/19xx
The minimum cycle time for the POSYS® 18xx/19xx is 51.2 µs, independent of the number and motor types of the
enabled axes. At this setting, the maximum cycle frequency would be 19.531 kHz. Beyond this minimum, cycle time is
increased in increments of 51.2/64/68.3/76.8/102.4 µs.
For each enabled axis of the POSYS® that is enabled there is a minimum cycle time required for the POSYS® to function
properly. The following table shows this:
# enabled axes
minimum cycle time min. cycle time
maximum cycle frequency
w/ trace
capture
time per axis
1
51.2 µs
102.4 µs
102.4 µs
19.53 khz
2
153.6 µs
153.6 µs
76.8 µs
6.51 kHz
3
204.8 µs
204.8 µs
68.3 µs
4.88 kHz
4
256 µs
256 µs
64 µs
3.91 kHz
For POSYS 1800/1900 with Motion Control Chip Setz Ver. >2.x
# enabled axes
minimum cycle time min. cycle time
maximum cycle frequency
w/ trace
capture
time per axis
1
102.4 µs
102.4 µs
102.4 µs
9.76kHz
2
153.6 µs
153.6 µs
76.8 µs
6.51 kHz
3
204.8 µs
204.8 µs
68.3 µs
4.88 kHz
4
256 µs
256 µs
64 µs
3.91 kHz
The cycle rate determines the trajectory update rate for all motor types as well as the servo loop calculation rate for the
servo axes. It does not however determine the commutation rate of the Brushless DC motor types. An enabled axis
receives its cycle time slice whether or not it is in motion, and whether or not the motor is on or off (SetMotorMode
command). If cycle time is critical, it is possible to reclaim that time slice by disabling an unused axis and resetting the
loop rate with the instructions SetSampleTime and SetAxisMode. For example, using a POSYS® with four axes but if only 3
will be used in a specific application then the unused axis can be disabled using the command SetAxisMode and the new
sample time of can be set using the SetSampleTime command. Doing so would improve the cycle frequency from 3.91 kHz
to 4.88 kHz.
It is the responsibility of the host to make sure that the specified sample time is equal or larger than the specified
minimums from the table above.
-o-
115
© POSYS Motion Control GmbH & Co.KG, 2013
Parameter Update
Parameter Buffering
Parameter buffering
Various parameters must be specified to the POSYS® for an axis to be controlled correctly. In some cases it may be
desired that a set of parameters take effect at the exact same time to facilitate precise synchronized motion.
To support this all profile parameters and several other types of parameters such as servo parameters (servo axes only)
are loaded into the POSYS® using a buffered scheme. These buffered commands are loaded into an area of the POSYS®
that does not affect the actual POSYS® behavior until a special event known as an Update occurs. An Update causes the
buffered registers to be copied to the active registers, thereby causing the POSYS® to act on the new parameters.
For example the following command sequence loads a profile mode, position, velocity, and destination position in but will
not become active (take affect) until an Update is given:
Command
Action
SetProfileMode(Axis1, trapezoidal)
set profile mode to trapezoidal for axis 1
SetPosition (Axis1,12345)
load a destination position for axis 1
SetVelocity (Axis1, 223344)
load a velocity for axis 1
SetAcceleration(Axis1,1000)
load an acceleration for axis 1
After this sequence is completed the buffered registers for these parameters (including the profile mode itself) are loaded
into the POSYS® but the trajectory generator module still operates on whatever the previous trajectory profile mode and
parameters were. Only when an Update occurs will the trajectory profile mode actually be changed to trapezoidal and the
specified parameters loaded into the trajectory generator, causing the trajectory generator to start the programmed
motion.
Updates
There are three different ways that an Update can occur. They are listed below:

Update command - The simplest way is to give an Update command. This causes the parameters for the programmed
axis to be updated immediately.

MultiUpdate command - The multiple axis instantaneous update, which is specified using the MultiUpdate command,
causes multiple axes to be updated simultaneously. This can be useful when synchronized multi-axis profiling is
desired. This command takes a 1-word argument which consists of a bit mask, with 1 bit assigned to each axis.
Executing this command has the same affect as sending a set of Update commands to each of the individual axes
selected in the MultiUpdate command mask.

Breakpoints - There is a very useful facility supported by the POSYS® that can be programmed to generate an Update
command automatically when a pre-programmed condition becomes true. This feature is known as the breakpoint
facility, and it is useful for performing operations such as “automatically change the velocity when a particular position
is reached”, or “stop the axis abruptly when a particular external signal goes active.”
Whichever Update method is used, at the time the update occurs, all of the buffered registers and commands will be copied
to the active registers. Conversely, before the Update occurs, loading the buffered registers or executing buffered
commands will have no effect on the system behavior.
In addition to profile generation most servo parameter commands are not buffered, and some other commands are
buffered. Following is a complete list of buffered values and commands.
Buffered Commands
Trajectory
Servo & Error Tracking
Miscellaneous
SetProfileMode
C learPositionError
SetMotorC ommand
SetAcceleration
SetIntegrationLimit
SetJerk
SetKaff
116
© POSYS Motion Control GmbH & Co.KG, 2013
Trajectory
Servo & Error Tracking
SetVelocity
SetKd
SetPosition
SetKi
SetDeceleration
SetKp
SetGearRatio
SetKvff
Miscellaneous
SetKaff
-o-
117
© POSYS Motion Control GmbH & Co.KG, 2013
Breakpoints
Breakpoints
Breakpoints
Breakpoints are a convenient way of programming the POSYS® event upon some specific condition. Depending on the
breakpoint instruction´s arguments, a breakpoint can cause an update; an abrupt stop followed by an update, a smooth
stop followed by an update, a motor-off followed by an update (more on this function in a later section); or no action
whatever.
Each axis has two breakpoints that may be programmed for it. So two completely separate conditions may be monitored
and acted upon. These two breakpoints are known as breakpoint 1 and breakpoint 2.
-oDefining a Breakpoint; Overview
Defining a breakpoint, Overview
Each breakpoint has five components: the breakpoint axis, the source axis for the triggering event, the event itself, the
action to be taken and the comparison value.
The breakpoint axis is the axis on which the specified action is to be taken.
The source axis is the axis on which the triggering event is located. It can be the same as or different than the breakpoint
axis. Any number of breakpoints may use the same axis as a source axis.
The trigger is the event that causes the breakpoint.
The action is the sequence of operations executed by the POSYS® when the breakpoint is triggered.
After a breakpoint is triggered the action is performed on the breakpoint axis.
The comparison value is used in conjunction with the action to define the breakpoint event.
Altogether these parameters provide great flexibility in setting breakpoint conditions. By combining these components,
almost any event on any axis can cause a breakpoint.
The command used to send the breakpoint axis, the trigger, the source axis and the action is SetBreakPoint. To retrieve
these same values the command GetBreakpoint is used. To set the comparison value the command SetBreakpointValue is
used. This comparison value can be retrieved using the command GetBreakpointValue. For each of these commands the
breakpoint number (1 or 2) must be specified.
The SetBreakpointValue command should always be sent before the SetBreakpoint command to set up a
particular breakpoint.
-oBreakpoint Triggers
Breakpoint triggers
The POSYS® supports the following breakpoint trigger conditions:
Trigger Condition
Level or Threshold
Positive C ommanded Position Threshold
Description
Is satisfied when the current commanded position is equal
118
© POSYS Motion Control GmbH & Co.KG, 2013
Trigger Condition
Level or Threshold
Description
to or greater than the programmed compare value
Negative C ommanded PositionThreshold
Is satisfied when the current commanded position is equal
to or less than the programmed compare value
Positive Actual Position
Threshold
Is satisfied when the current actual position is equal to or
greater than the programmed compare value
Negative Actual Position
Threshold
Is satisfied when the current actual position is equal to or
less than the programmed compare value
C ommanded Position C rossedThreshold
Is satisfied when the current commanded position crosses
(is equal to) the programmed compare value
Actual Position C rossed
Threshold
Is satisfied when the current actual position crosses (is
equal to) the programmed compare value
Time
Threshold
Is satisfied when the current POSYS® time (in number of
cycles since power-up) is equal to the programmed
compare value
Event Status
Level
Is satisfied when the EventStatus register matches bit
mask and high/low pattern is programmed compare value
Activity Status
Level
Is satisfied when the ActivityStatus register matches bit
mask and high/low pattern is programmed compare value
Signal Status
Level
Is satisfied when the SignalStatus register matches bit
mask and high/low pattern is programmed compare value
None
-
Disable any previously set breakpoint
If "none" is selected for the breakpoint trigger then this effectively means that breakpoint is inactive. Only one of the
above triggers can be selected at a given time.
Threshold-triggered breakpoints
Threshold triggered breakpoints use the value set using the SetBreakpointValue command as a single 32-bit threshold
value to which a comparison is made. When the comparison is true, the breakpoint is triggered.
For example, if it is desired that the trigger occur when the commanded position is equal to or greater than 1,000,000,
then the comparison value loaded using SetComparisonValue would be 1,000,000, and the trigger selected would be
PositiveCommandedPosition.
Level-triggered breakpoints
To set a level-triggered breakpoint, the host instruction supplies two 16-bit data words: a trigger mask, and a sense mask.
These masks are set using the SetBreakpointValue instruction. The high word of data passed with this command is the
trigger mask value, the low word is the sense mask value.
The trigger mask determines which bits of the selected status register are enabled for the breakpoint.
A 1 in any position of the trigger mask enables the corresponding status-register bit to trigger a breakpoint, a 0 in the
trigger mask disables the corresponding status register bit. If more then one bit is selected, then the breakpoint will be
triggered when any selected bit enters the specified state.
The sense mask determines which state of the corresponding status bits cause a breakpoint. Any status bit that is in the
same state (i.e. 1 or 0) as the corresponding sense bit is eligible to cause a breakpoint (assuming of course that it has
been selected by the trigger mask).
For example, if the activity status register breakpoint has been selected, and the trigger mask contains the value 0402h
and the sense mask contains the value 0002h, then the breakpoint will be triggered when bit 1 (the at max velocity
indicator) assumes the value 1, or bit 10 (the in motion indicator) assumes the value.
-oBreakpoint Actions
Breakpoint actions
119
© POSYS Motion Control GmbH & Co.KG, 2013
Once a breakpoint has been triggered, the POSYS® can be programmed to perform one of the following instruction
sequences:
Action
Command Sequence Executed
Keine
No commands executed
Update
Update Achse
Abrupt Stop
SetStopMode axis, AbruptStop Update axis
SmoothStop
SetStopMode axis, SmoothStop Update axis
MotorOff
SetMotorMode axis, Off Update axis
Regardless of the host´s action, once a breakpoint condition has been satisfied, the Event Status bit corresponding to the
breakpoint is set and the breakpoint is deactivated.
-oBreakpoint Examples
Breakpoint Examples
Here are a few examples to illustrate how breakpoints can be used.
Example #1The host would like axis 1 to change velocity when the encoder position reaches a particular value. Breakpoint
#1 should be used.
The following command sequence achieves this:
Commands
Description
SetPosition (Axis1,123456)
Load destination
SetVelocity (Axis1, 55555)
Load velocity
SetAcceleration (Axis1, 500)
Load acceleration
SetDeceleration (Axis1,1000)
Load deceleration
Update (Axis1)
Make the move
SetVelocity (Axis1,111111)
Load a new velocity of 111,111 but do not send an Update
SetBreakpointValue (Axis1,1,100000)
Load 100,000 into the comparison register for breakpoint 1
SetBreakpoint (Axis1, Breakpoint1, Axis1,
Update, PositiveActuaIPosition)
Specify a positive actual position breakpoint on axis 1 which will result
in an Update when satisfied for breakpoint 1
This sequence makes an initial move and loads a breakpoint after the first move has started. The breakpoint that is defined
will result in the velocity being "updated" to 111,111 when the actual position reaches a value of 100,000. Therefore at
100,000 the axis will accelerate from a velocity of 55,555 to 111,111 at the acceleration value of 500. Note that any
buffered registers that are not sent again will remain in the buffered registers. For example when the breakpoint performs
an Update the values for position, acceleration and deceleration are unchanged and therefore are copied over to the active
registers without modification.
Example #2The host would like axis 1 to perform an emergency stop whenever the AxislN signal for axis 3 goes high. In
addition the axis 1 acceleration should change whenever a particular commanded position is achieved on axis 4.
The following command sequence achieves this:
Commands
Description
SetPosition (Axis1,123456)
Load destination
SetVelocity (Axis1, 55555)
Load velocity
SetAcceleration(Axis1, 500)
Load acceleration
SetDeceleration(Axis1,1000)
Load deseleration
Update (Axis1)
Make the move
SetVelocity (Axis1, 111111)
Load a new velocity of 111,111 but do not send an Update
SetBreakpointValue(Axis1,1, 0x400040)
Load mask and sense word of 0x40, 0x40 (bit 6 must be high) for
breakpoint 1
120
© POSYS Motion Control GmbH & Co.KG, 2013
Commands
Description
SetBreakpoint(Axis1, Breakpoint1, Axis3, Specify a breakpoint to monitor the signal status register of axis 3 to
AbruptStop, SignaIStatus)
trigger when bit 6 (Axisln) goes high for breakpoint 1
SetAcceleration(Axis1,5000)
Load a new acceleration of 5,000 but do not send an Update
SetBreakpointValue(Axis1, 2,100,000)
Load 100,000 into the comparison register for breakpoint 2
SetBreakpoint(Axis1, Breakpoint2, Axis4, Specify a positive commanded position breakpoint on axis 4 which will
Update, PositiveC ommandedPosition)
result in an Update when satisfied for breakpoint 2
This sequence is similar to the previous one except that an additional breakpoint has been defined which causes the abrupt
stop. Both of these breakpoints were defined after the primary move was started although this may not be strictly
necessary depending on when the breakpoint is expected to occur. Generally breakpoints should be set up after the
primary move because there is only one set of buffered registers and it is thus impossible to load primary move
parameters (position, velocity, etc.) and also "breakpoint" profile parameters (the profile parameters that will take affect
once the breakpoint occurs) before the primary move is Updated.
-o-
121
© POSYS Motion Control GmbH & Co.KG, 2013
The Servo Loop
Overview; Servo Loop
Overview; Servo Loop
For the POSYS® in servo mode a servo loop is used as part of the basic method of determining the motor command
output. The function of the servo loop is to match as closely as possible the commanded position, which comes from the
trajectory generator, and the actual motor position.
To accomplish this the profile generator commanded value is combined with the actual encoder position to create a position
error, which is then passed through a digital PID-type servo filter. The scaled result of the filter calculation is the motor
command, which is output as either a PWM signal to the motor amplifier, or a 16-bit input to a D/A Converter.
-oPID Loop Algorithm
PID Loop Algorithm
The servo filter used with the POSYS® is a proportional-integral-derivative (PID) algorithm, with velocity and acceleration
feedforward terms and an output scale factor. An integration limit provides an upper bound for the accumulated error. An
optional bias value can be added to the filter calculation to produce the final motor output command. A limiting value for
the filter output provides additional constraint.
The PID+Vff+Aff formula, including the scale factor and bias terms, is as follows:
where
E
are the accumulated error terms from the main encoder
n
K
I
is the Integral Gain
K
d
is the Derivative Gain
K
P
is the Proportional Gain
K
aff
is the Acceleration feed-forward
K
vff
is the Velocity feed-forward
Bias is the DC motor offset
K
out
Is the scale factor for the output command
All filter parameters, the motor output command limit, and the motor bias are programmable, so that the filter may be
fine-tuned to any application. The parameter ranges, formats and interpretations are shown in the following table:
Terminus
Name
Ilim Integration Limit
KI Integral Gain
Representation & Range
unsigned 32 Bit (0 to 2.124.483.647)
unsigned 16 Bit (0 to 32.767)
122
© POSYS Motion Control GmbH & Co.KG, 2013
Terminus
Name
Representation & Range
Kd Derivative Gain
unsigned 16 Bit (0 to 32.767)
Kp Proportional Gain
unsigned 16 Bit (0 to 32.767)
Kaff Acceleration feed-forward
unsigned 16 Bit (0 to 32.767)
Kvff Velocity feed-forward
unsigned 16 Bit (0 to 32.767)
Kout Output scale factor
unsigned 16 Bit (0 to 32.767)
Bias DC motor offset
signed 16 Bit (32.767 to 65.535)
Motor command limit
unsigned 16 Bit (0 to 32.767)
The structure of the digital filter is shown in Figure 4.1-1.
Motor bias
When an axis is subject to a net external force in one direction (such as a vertical axis pulled downward by gravity), the
servo filter can compensate for it by adding a constant DC bias to the filter output. The bias value is set using the host
instruction SetMotorBias (axis, bias). It can be read back using the command GetMotorBias axis.
Output scaling
The Kout parameter can be used to scale down the output of the PID filter in situations that require it. It does this by
multiplying the filter result by Kout/65536. It has the effect of increasing the range of Kp, which is typically programmed in
the 1 to 150 range when no output scaling is done. The Kout value is set using the host instruction SetKout. It can be read
back using the command GetKout.
Output limit
The motor output limit prevents the filter output from exceeding a boundary magnitude in either direction. If the filter
produces a value greater than the limit, the motor command takes the limiting value.
123
© POSYS Motion Control GmbH & Co.KG, 2013
The motor limit applies only in closed-loop mode. It does not affect the motor command value set by the host in open-loop
mode (see next section for more information on open and closed loop operations).
-oDual Encoder Support
Dual Encoder Support
The multi-axis POSYS® configurations support an auxiliary encoder input. This is useful for applications where the position
of the load is critical but cannot be deterministically related to the motor position because of backlash. In this
configuration, the encoder input for a second axis (other than the one being controlled) is incorporated as the derivative
term in the servo loop as shown in figure 4.2-1.
Dual Enkodereingang
When used in this manner, the auxiliary encoder input is not available to its primary axis.
Dual Encoder PID Loop Algorithm
The structure of the servo filter used by the motion processor in dual-encoder mode is slightly different than that used in
single encoder mode, as shown here:
Where
E1n are the accumulated error terms from the
main encoder
Pn Is the position of theauxiliary encoder
KI is the Integral Gain
Kd is the Derivative Gain
KP is the Proportional Gain
Kaff is the Acceleration feed-forward
Kvff is the Velocity feed-forward
Bias is the DC motor offset
Kout is the scale factor for theoutput command
124
© POSYS Motion Control GmbH & Co.KG, 2013
POSYS Dual Loop Digitalfilter
Configuring Dual Encoder Support
The SetAuxiliaryEncoderSource command is used to enable dual encoder processing for an axis. The auxiliaryAxis
parameter controls which axis encoder input will be used to augment the primary (Load) encoder. The mode parameter
enables or disables dual loop processing. When dual loop is disabled (the default condition), the servo processing loop
functions exactly as described in previous section.
If the application needs to determine the actual position of the auxiliary encoder, use the GetActualPosition command and
specify the axis of the auxiliary encoder.
Note:
The auxiliary encoder should always have a resolution w hich is greater than or equal to the resolution of the
main encoder. This will avoid potentially unstable operating conditions.
-oBiQuad Output Filter
Bi-Quad Ausgangsfilter
A bi-quad is a generic digital filter structure. With the proper coefficients it can be programmed to be a low-pass filter,
high-pass filter, band-pass filter, notch filter or custom filter. Programs such as Octave (www.octave.org) may be used to
find the coefficients.
The POSYS® supports up to 2 programmable bi-quad output filters for each axis. These filters are chained; when both are
enabled, the output of Filter0 feeds the input of Filter1. If Filter0 is disabled (the default state), the entire filter chain is
bypassed and the POSYS® output passes unfiltered to the motor.
The output of the filter at time n can be expressed as:
where
Yn is the output of the filter at time n
125
© POSYS Motion Control GmbH & Co.KG, 2013
Xn is the input to the filter at time n
K is a positive scaling value used to avoid rounding errors
B0 is a programmable bi-quad coefficient
B1 is a programmable bi-quad coefficient
B2 is a programmable bi-quad coefficient
A1 is a programmable bi-quad coefficient
A2 is a programmable bi-quad coefficient
Determining Bi-Quad Coefficients
Typically, coefficients used in bi-quad filter equations are small floating point numbers. To avoid rounding errors when
storing these numbers as 16-bit values, the K coefficient is scaled by 227 to allow the other coefficients to be entered as
integers.
For example, in Octave the coefficients for a 2nd order butterworth filter can be found as:
[b,a] = butter(2,0.1)
This results in the coefficients:
B0 = 0.020083
B1 = 0.040167
B2 = 0.020083
A1 = -1.56102
a2 = 0.64135
If the POSYS®´s filter equation (shown above) is compared to the filter equation used by Octave (type help filter in
Octave), there is a slight difference in that the ax components are subtracted in Octave as opposed to being added in the
motion processor. The result is that the a1 and a2 coefficients from Octave (or Matlab) need to be multiplied by -1 before
being sent to the motion processor. This results in:
b0
b1
b2
a1
a2
=
=
=
=
=
0.020083
0.040167
0.020083
1.56102
-0.64135
These values will be scaled and set as the output filter coefficients once the output scaling factor K is determined.
Determining the Bi-Quad Scaling Factor
To obtain maximum output precision, the programmable scaling value K should be chosen to be a value that will scale the
largest absolute value of the set of coefficients (a1 in this case) closest to 32,767 (the largest positive value for a 16-bit
signed integer). Using the coefficient values above (and accounting for the 227 internal scaling factor), K can be
determined by solving this equation:
a1 = K * 32767 * 2-27
which can be easily resolved:
restated as: K = (a1 * 227) / 32767
substituting: K = (1.56102 * 227) / 32767
evaluates to: K = 6394
Scaling Bi-Quad Coefficients
Once the optimal K scaling factor has been determined, the integer equivalents of the bi-quad coefficients must be
calculated. These integer values (named B0, B1, B2, A1 and A2) can be calculated as in the following example:
b0 = B0 * K * 2-27
which can be easily resolved:
126
© POSYS Motion Control GmbH & Co.KG, 2013
restated as: B0 = (b0* 227) / K
substituting: B0 = (0.020083 * 227) / 6394
evaluates to: B0 = 422
Using this formula ( X = (x * 227) / K ) for each of the coefficients yields:
B0 = 422
B1 = 843
B2 = 422
A1 = 32767
A2 = -13463
and
K = 6394
Configuring the Bi-Quad Filters
Bi-Quad filter coefficients are entered into the POSYS®´s filter registers via the SetBiQuadCoefficient command. See the
POSYS® Programmer´s C ommand Reference for detailed information on this command. The following POSYS® command
sequence demonstrates setting the coefficients for the first bi-quad filter (Filter0) on axis 1:
SetBiQuadC oefficient
// Disable the filter
SetBiQuadC oefficient
// Set K
SetBiQuadC oefficient
// Set B0
SetBiQuadC oefficient
// Set B1
SetBiQuadC oefficient
// Set B2
SetBiQuadC oefficient
// Set A1
SetBiQuadC oefficient
// Set A2
SetBiQuadC oefficient
// Enable the filter
Upon completion of this command sequence, the filter begins altering the output value of axis 1 immediately.
-o-
127
© POSYS Motion Control GmbH & Co.KG, 2013
Output Limit
Output Limit
The motor output limit prevents the filter output from exceeding a boundary magnitude in either direction. If the filter
produces a value greater than the limit, the motor command takes the limiting value. The motor limit value is set using the
host instruction SetMotorLimit. It is read by using the commandGetMotorLimit. The value specified is a 16-bit unsigned
number with a range of 0 to 32,767. The specified value is the maximum magnitude that will be output to the motor. For
example, if the motor limit is set to 30,000 (or 91.6% output), then motor values greater than 30,000 will be output as
30,000, and motor values less than–30,000 will be output as–30,000.
The motor limit applies only when the position loop is enabled. In the case that the position loop is disabled, the output
limit does not affect either the value passed on from the trajectory generator, or the value specified from the Motor
C ommand register.
The default value of the motor command limit is 32,767, which corresponds to 100% output.
-o-
128
© POSYS Motion Control GmbH & Co.KG, 2013
Motor Bias
Motor Bias
When an axis is subject to a net external force in one direction (such as a vertical axis pulled downward by gravity), the
servo filter can compensate for it by adding a constant DC bias to the filter output. As for the regular PID values, the bias
value is set using the host instructionSetMotorBias. It can be read using the command
GetMotorBias.
The motor bias is applied at all times that the position loop is enabled. If the position loop is disabled but the trajectory
generator is enabled, the motor bias is also applied at all times.
If the position loop is disabled and the trajectory generator is also disabled, then the motor bias is applied only after a
transition to this state, and any subsequent setting of the Motor C ommand register will be applied without motor bias. See
“Disabling and Enabling Position Loop Modules
” for more information on setting the Motor C ommand register.
For example, if a motor bias value of +1,000 (= ~+3%) has been set, at the time
SetOperatingMode
a
command is given
to disable trajectory generator and position loop, or at the time a safety-related response such as motion error occurs and
these modules are automatically disabled, the output motor command will be +1,000. If, in the process of recovering from
this condition, a user sets the motor command to +2,000, this value, unaffected by the motor bias, will be output.
The default value of motor bias is zero (0).
If the specified bias value does not properly compensate for the external force, the axis may move suddenly in
one direction or another after SetOperatingMode
a
command. It is the responsibility of the user to select a
motor bias v alue which will maintain safe motion.
The commandSetOperatingModeis only av ailable on POSYS® 1800/1900 controller with firmware v ersion
>2.x.
-oClosed Loop and Open Loop Control Modes
Closed-loop and open-loop control modes
In a previous section motor mode is discussed. For all POSYS® setting the motor off (SetMotorMode OFF) has the effect of
disabling the trajectory generator.
In addition however, for the servo axes turning the motor off, or having the motor be turned off automatically by the
POSYS® via a motion error, places the POSYS® into what is known as open loop mode. In open loop mode the servo filter
does not operate and the motor command output value is set manually by the host using the command SetMotorCommand
With the motor ON the POSYS® is in closed loop mode and the motor command value is controlled automatically by the
servo filter.
Figure 3-1. Motor control paths, closed- and open-loop modes
C losed-loop mode is the normal operating mode of the servo version of the POSYS®. Open-loop mode is typically used
when one or more axes require torque control only, or when the amplifier must be calibrated.
129
© POSYS Motion Control GmbH & Co.KG, 2013
NOTE: Limit switches do not function in open-loop mode.
Motor bias in open-loop mode
The motor bias applies at all times when operating in closed-loop mode. If the axis is switched to open-loop mode, the bias
value continues to be output to the motor, to prevent the axis from suddenly lurching in the direction of the external force.
Once the host issues a new motor command, however, its value supersedes the bias output, which no longer has any
effect. As soon as the axis returns to closed-loop mode, the previous bias value is reinstated.
NOTE: If the specified bias value does not properly compensate for the external force, the axis may move
suddenly in one direction or another after a SetMotorMode (Off) instruction. It is the responsibility of the user
to select a motor bias value that will maintain safe motion.
-o-
130
© POSYS Motion Control GmbH & Co.KG, 2013
Piezo (Ceramic) Motor Functions
POSYS 1800 PC-104 Motion Contoller with specific Piezo Motor
Parameters
POSYS 1900 PCI-Bus Motion Contoller with specific Piezo Motor
Parameters
Version with changes to servo parameters and methode of updating
Description:
The POSYS 1800 is a PC -104-Bus motion controller for servo and stepper motors and provides one to four axes of motion.
The POSYS 1900 is a PC I-Bus motion controller for servo and stepper motors and provides one to four axes of motion. This
is a custom release with a special code base. Piezo motor functionality is available on a given axis when the motor type is
Brushed or Brushless. All Magellan V1.5/2.3 commands are available with the exception of those listed below. This
document details the changes for this release.
Custom F eatures:
The piezo motor functionality that exists in this custom release centers around the ability to change the value of the servo
parameters on the fly as a function of position error, distance left to move, or whether or not the axis is in motion. In
Addition there is a user defined offset added to the output of the servo loop. The changes are detailed below.
1. Two conditions must be present to activate the Piezo motor behaviour on a particular axis. The axis’s motor type must
be a “servo” motor (Brushed or Brushless) and the value PzWindow
of
must be set to non-zero by the user. Otherwise,
standard (non-custom) behaviour will occur and steps 2 to 6 do not apply.
update command is not necessary to change
2. All servo loop gains (kp, ki, kvff, etc) are updated immediately. The
these values and has no effect on them.
3. When the motor is settled into position, its integration limit is replaced by a new limit. The value of the new integration
limit is defined by the new user command,
Set/GetpzIntLimStl. This integration limit value is only used when the axis
is settled. When the axis is in motion (i.e. not settled) then the value used for the integration term constant will
depend on the other factors (see #5). The valid range of values for the
Set/GetpzIntLimStlcommand is the same as
for the Set/GetIntegrationLimitcommand.
4. When the motor is not settled into position, one of two offset values are applied to the servo output (in addition to the
standard torque offset if present). The offset used depends on several conditions. If the distance left to move in the
profile is greater thanpzWindow then a positive offset is used for positive profile velocities and a negative offset for
negative velocities. Otherwise the positive offset is used when the position error is positive and the negative offset is
used when the position error is negative. Both offset values are programmed as positive numbers (ranging from 0 to
32k) but the negative offset is always applied as a negative number. These offsets are set by the user commands
Set/GetpzOffsetPosand Set/GetpzOffsetNeg.
5. When the motor is in motion (not settled), the distance left to move in the profile is considered. If this distance is
greater than pzWindow then a completely new set of servo parameters (Piezo loop gains) are used. Otherwise the new
set of servo parameters are still used if the absolute position error is greater than
pzWindow. If neither of these cases
are true than the standard servo parameters are active. C ommands have been added to allow the user to define the
new set of servo parameters for this window. The new commands are
Set/GetpzKp, Set/GetpzKi, Set/GetpzKd,
Set/GetpzKvff, Set/GetpzKaff, Set/GetpzIntLimand Set/GetpzKdPeriod
. The new command that is used to specify the
position error threshold for the new parameters to take effectSet/GetpzWindow
is
.
6. A second position error window has also been added. The value of the secondary window is defined by the
Set/GetpzWindow2command. If the motor is not settled, and the absolute position error is greater than the value
defined by this command, then a new velocity feed forward (pzKvff2) value is used. The velocity feed forward value
for this secondary window is defined by the user command
Set/GetpzKvff2.
7. The pseudo-code below explains the behaviour. The term settled is true if bit 7 of the GetActivityStatus is set. This bit
will only be set if the conditions defined by SetSettleWindow and
SetSettleTimeare met. SetSettleTimedefines the
length of time in Update Rate for the position to be within the
SettleWindow before bit 7 will be set.
For clarity the behaviour of the modified firmware is explained below using pseudo-code.
131
© POSYS Motion Control GmbH & Co.KG, 2013
Pseudo-Code:
If (motor type is "servo") and (pzWindow > 0)
{
(Kp, Kd, Ki, etc.) active.
The UPDATE command is not needed to make a buffered position loop parameter
If ( settled )
{
//the conditions of SetSettleWindow and SetSettleTime are met
Use the standard set of loop gains except for integration limit
Use the new 'in position' integration limit
Don't apply any extra offset to the motor output
}
else
{
if(abs(DestintationPos-C ommandedPos)<pzWindow)
{
Apply the extra offset to the motor output based on sign of position error
if( abs(position error) < pzWindow ) use standard set of loop gains.
else use Piezo loop gains.
}
else
{
Apply the extra offset to the motor output based on the sign of
CommandedVelocity
Use Piezo loop gains.
}
if(abs(position error) > pzWindow2) use PzKvff2 instead of PzKvff.
}
}
else
use standard behavior
Command Usage:
The usage of the new custom commands is consistent with the usage of the standard commands. For instance the SetpzKp
command has the exact usage, in terms of packet format, parameter range and return codes, as the SetKp command. The
only difference would be the OpC ode specified in the command packet.
All values for the new commands will default to zero.
The Op-C odes associated with the new commands are listed below.
COMMAND
SIZE
OPCODE
DESCRIPTION
GetpzOffsetPos
uint16
0x35
Servo offset used when not settled and position
error is positive
GetpzOffsetNeg
uint16
0x3D
Servo offset used when not settled and position
error is negatiove
GetzIntLimStl
uint32
0x04
integration limit (32-bit) used when settled
GetpzWindow
uint16
0x05
Location of primary Window boundary
GetpzKp
uint16
0x08
Proportional term when position error is in
primary window.
GetpzKi
uint16
0x09
Integral Term "
GetpzKd
uint16
0x0A
Derivative Term "
GetpzKvff
uint16
0x0B
Velocity Feed Forward Term "
GetpzKaff
uint16
0x0C
Acceleration Feed Forward Term "
GetpzIntLim
uint32
0x0D
Integration Limit "
132
"
"
"
"
"
© POSYS Motion Control GmbH & Co.KG, 2013
GetpzKdPeriod
uint16
0x0E
Derivative Time "
GetpzWindow2
uint16
0x4E
Location of secondary Window boundary
GetpzKvff2
uint16
0x4F
Velocity Feed Forward Term when position
error is in secondary window.
SetpzOffsetPos
uint16
0x16
See above for corresponding "Get" command.
SetpzOffsetNeg
uint16
0x17
"
•"
SetzIntLimStl
uint32
0x18
"
•"
SetpzWindow
uint16
0x19
"
•"
SetpzKp
uint16
0x1B
"
•"
SetpzKi
uint16
0x1C
"
•"
SetpzKd
uint16
0x1F
"
•"
SetpzKvff
uint16
0x20
"
•"
SetpzKaff
uint16
0x23
"
•"
SetpzIntLim
uint32
0x24
"
•"
SetpzKdPeriod
uint16
0x28
"
•"
SetpzWindow2
uint16
0x29
"
•"
SetpzKvff2
uint16
0x2E
"
•"
C orresponding Delphi types: Word = uint16, LongWord = uint32
The following functions are no longer available in the PIEZO version:
Set/GetBiQuadC oefficient
Set/GetAuxiliaryEncoderSource
Set/GetSPIMode
Set/GetPWMFrequency
Document Rev. 3.0
Date: 01.09.2008
-----------------------------------------POSYS Motion C ontrol GmbH & C o. KG
Tel: 09158 958355
Fax: 09158 1642
------------------------------------------
-o-
133
"
© POSYS Motion Control GmbH & Co.KG, 2013
Status Register
Overview; Status Registers
Overview; Status Registers
The POSYS® can monitor almost every aspect of an axis´s motion. There are numerous numerical registers that can be
queried to determine the current state of axis such as the current actual position (GetActualPositioncommand), the current
commanded position (GetCommandedPosition-Kommandocommand) etc.
In addition to these numerical registers there are three bit-oriented status registers which provide a continuous report on
the state of a particular axis. These status registers conveniently combine a number of separate bit-oriented fields for the
specified axis. These three 16-bit registers are (GetActivityStatus, GetSignalStatus, GetEventStatus).
The host may query these three registers, or the contents of these registers may be used in breakpoint operations to
define a triggering event such as "trigger when bit 8 in the signal status register goes low". These registers are also the
source of data for the AxisOut mechanism, which allows any bit within these three registers to be output as a hardware
signal.
-oEvent Status Register
Event Status register
The Event Status register is designed to record events that do not continuously change in value, but rather tend to occur
once upon some specific event. As such, each of the bits in this register is set by the POSYS® and cleared by the host.
The EventStatus register is defined in the table below:
Bit
Name
Description
0
Motion complete
Set when a trajectory profile completes. The motion being considered complete may
be based on the programmed position or actual encoder position.
1
Position wrap
Set when the actual motor position exceeds 7FFFFFFFh (the most positive position)
and wraps to 80000000h (the most negative position), or vice versa.
2
Breakpoint 1
Set when breakpoint #1 is triggered
3
C apture received Set when the high-speed position capture hardware acquires a new position value.
4
Motion error
Set when the actual position differs from the commanded position by an amount more
then the specified maximum position error.
5
Positive limit
Set when a positive limit switch event occurs
6
Negative limit
Set when a negative limit switch event occurs
7
Instruction error
Set when an instruction error occurs
8, 9, 10
Reserved
May contain 1 or 0
11
C ommutation
error
Set when a commutation error occurs (not valid in these versions)
12,13
Reserved
May contain 1 or 0
14
Breakpoint 2
Set when breakpoint #2 is triggered
15
Reserved
May contain 1 or 0
The command GetEventStatus returns the contents of the Event Status register for the specified axis.
Bits in the Event Status register are latched. Once set, they remain set until cleared by a host instruction or a system
reset. Event Status register bits may be reset to 0 by the instruction ResetEventStatus, using a 16-bit mask. Register bits
corresponding to 0s in the mask are reset; all other bits are unaffected.
The event status register may also be used to generate a host interrupt signal.
134
© POSYS Motion Control GmbH & Co.KG, 2013
-oInstruction Error
Instruction error
Bit 7 of the event status register indicates an Anweisungsfehler Such an error occurs if an otherwise valid instruction or
instruction sequence is sent when the POSYS®´s current operating state makes the instructions invalid. Instruction errors
occur at the time of an update.
Should an instruction error occur the invalid parameters are ignored, and the Instruction Error indicator of the Event Status
register is set. While invalid parameters checked at the time of the update are ignored, valid parameters are sent on
however. This can have unintended side effects depending on the nature of the motion sequence so all instruction error
events should be treated very seriously.
Example: in the following sequence:
SetProfileMode (axis2, Velocity)
SetVelocity (axis2, -4387)
SetProfileMode (axis2, Trapezoidal)
Update (axis2)
The negative velocity is not valid in the new profile mode. The Update is executed, but the Instruction Error bit is set.
(Legitimate parameters, such as Position, are updated, and profile generation continues.
-oActivity Status Register
Activity Status register
Like the Event Status register, the Activity Status register tracks various POSYS® fields.
Activity Status register bits however are not latched, they are continuously set and reset by the POSYS® to indicate the
states of the corresponding conditions.
The Activity Status register is defined in the table below:
Bit
Name
Description
0
Reserved
n.a.
1
At maximum
velocity
Set (1) when the commanded velocity is equal to the maximum velocity specified by
the host. Cleared (0) if it is not. This bit functions only when the profile mode is
trapezoidal, velocity contouring, or s-curve. It will not function when the POSYS® is
in electronic gearing mode.
2
Position Tracking
Set (1 ) when the servo is keeping the axis within the Tracking Window. Cleared (0)
when it is not.
3, 4, 5
C urrent Profile
Mode
These bits indicate the profile mode currently in effect, which might be different than
the value set using the SetProfileMode command if an Update command has not yet
been issued. The 3 bits define the current profile mode as follows:
bit 5
0
0
0
0
1
bit 4
0
0
1
1
0
bit 3
0
1
0
1
0
Profile Mode
trapezoidal
velocity contouring
s-curve
electronic gear
external profile mode
6
Reserved
May contain 1 or 0
7
Axis-settled
Set (1) when the axis has remained within the Settle Window for a specified period of
time. Cleared (0) if it has not.
8
Motor mode
1. Set (1) when the motor is "on", cleared (0) when the motor is "off'. When the
motor is on this means that the POSYS® can perform trajectory operations, and
for the servo versions it means the controller is in closed loop mode and the
135
© POSYS Motion Control GmbH & Co.KG, 2013
Bit
Name
Description
servo loop is operating. When the motor is off this means trajectory operations
can not be performed and for the servo versions it means the POSYS® is in open
loop mode and the servo loop is disabled. The SetMotorMode command is
normally used to select the mode of the motor, however the POSYS® will reset
the mode to 0 turn the motor off if a motion error occurs.
9
Position capture
Set (1) when a new position value is available to read from the high speed capture
hardware. Cleared (0) when a new value is not yet been captured. While this bit is
set, no new values will be captured. The command GetCaptureValue retrieves a
captured position value and clears this bit, allowing additional captures to occur.
10
In-motion indicator Set (1) when the trajectory profile commanded position is changing. Cleared (0)
when the commanded position is not changing. The value of this bit may or may not
correspond to the value of the motion complete bit of the event status register
depending on whether the motion complete mode has been set to commanded or
actual.
11
In positive limit
Set (1) when the motor is in a positive limit condition. Cleared (0) when it is not.
12
In negative limit
Set (1) when the motor is in a negative limit condition. Cleared (0) when it is not.
13, 14,
15
S-curve segment
Indicates the S-curve segment number using values 1-7 to indicate s-curve phases
1-7 as shown in the s-curve trajectory section of this manual. A value of 0 in this
field indicates the trajectory is not in motion. This field is undefined for profile modes
other than s-curve and may contain 0´s or 1´s.
The command GetActivityStatus returns the contents of the Activity Status register for the specified axis.
-oSignal Status Register
Signal Status register
The signal status register provides real time signal levels for various POSYS® I/O pins. The SignalStatus register is defined
in the table below:
Bit
Name
Description
0
A encoder
A signal of quadrature encoder input.
1
B encoder
B signal of quadrature encoder input.
2
Index encoder Index signal of quadrature encoder input.
3
Home
Home position capture input
4
Positive limit
Positive limit switch input
5
Negative limit
Negative limit switch input
6
AxisID
Generic axis input signal
7
Not for use
with servo or step motor version
8
Not for use
with servo or step motor version
9
Not for use
with servo or step motor version
10
AxisOut
Programmable axis output signal
11-15
Reserved
The command GetSignalStatus returns the contents of the Signal Status register for the specified axis.
All Signal Status register bits are inputs except bit 10 (AxisOut).
The bits in the signal status register always represent the actual hardware levels on the corresponding pins. A 1 in this
register represents an electrically high value on the pin; a 0 indicates an electrically low level. The state of the signal sense
mask affects the value read using GetSignalStatus (see the next section for more information on the signal sense mask).
-o-
136
© POSYS Motion Control GmbH & Co.KG, 2013
Signal Sense Mask
Signal Sense Mask
The bits in the signal status register represent the high/low state of various signal pins on the POSYS®.
How these signal pins are interpreted by the POSYS® may be controlled using a signal sense mask. This is useful for
changing the interpretation of input signals to match the signal interpretation of the user's hardware.
The SignalSenseMask register is defined in the table below:
Bit
Name
Interpretation
0
A encoder
Set(1) to invert quadrature A input signal. C lear (0) for no inversion.
1
B encoder
Set(1) to invert quadrature B input signal. C lear (0) for no inversion.
2
Index
encoder
Set(1) to invert Index signal. C lear (0) for no inversion.
3
Home
Set(1) to invert home signal. C lear (0) for no inversion.
4
Positive Limit
Set (1) for active high interpretation of positive limit switch, meaning positive limit occurs
when signal is high. C lear (0) for active low.
5
Negative
Limit
Set (1) for active high interpretation of negative limit switch, meaning negative limit occurs
when signal is high. C lear (0) for active low.
6
Axisln
Set (1) to invert AxisID signal. C lear (0) for no inversion.
7
Not for use
with servo or step motor motion controller
8
Not for use
with servo or step motor motion controller
9
Not for use
with servo or step motor motion controller
10
AxisOut
Set (1) to invert AxisOut signal. C lear (0) for no inversion.
11-15 Reserved
The command SetSignalSense sets the signal sense mask value. The command GetSignalSense retrieves the current signal
sense mask.
-o-
137
© POSYS Motion Control GmbH & Co.KG, 2013
Monitoring Motion Performance
Host Interrupts
Host Interrupts
Interrupts allow the host to become aware of a special condition without the need for continuous monitoring or polling of
the status registers. The POSYS® provides this service in the form of a host interrupt.
The events that trigger a host interrupt are the same as those that set the assigned bits of the Event Status Register reproduced here for convenience.
Bit
Event
Occurs when
0
Motion complete
The profile reaches endpoint, or motion is otherwise stopped
1
Wrap-around
The axis position wraps
2
Breakpoint 1
Breakpoint 1 condition has been satisfied
3
C apture received
Encoder index pulse or home pulse has been captured
4
Motion error
Maximum position error set for a particular axis has been exceeded
5
In positive limit
switch
Positive over travel limit switch violation has occurred
6
In negative limit
switch
Negative over travel limit switch violation has occurred
7
Instruction error
Host instruction causes an error
11
C ommutation Error
Index pulse does not match actual phase (only for POSYS® 1800/1900 with
firmware version >2.x)
14
Breakpoint 2
Breakpoint 2 condition has been satisfied
Using a 16-bit mask, the host may condition any or all of these bits to cause an interrupt. This mask is set using the
command SetInterruptMask. The value of the mask may be retrieved using the command GetInterruptMask. The mask bit
positions correspond to the bit positions of the "Event Status Register". If a 1 is stored in the mask then a 1 in the
corresponding bit of the event status register will cause an interrupt to occur. Each axis supports its own interrupt mask,
allowing the interrupting conditions to be different for each axis.
The POSYS® continually scans the event register and interrupt mask together to determine if an interrupt has occurred.
When an interrupt occurs, the HostIntrpt signal is made active.
At this point the host can respond to the interrupt (although the execution of the current host instruction, including the
transfer of all associated data packets, should be completed), but it is not required to do so.
Since it is possible for more then one axis to be configured to generate interrupts at the same time, the POSYS® provides
the command GetInterruptAxis This command returns a bitmasked value with one bit set for each axis currently generating
an interrupt. Bit 0 will be set if axis 1 is interrupting, bit 1 is set for axis 2, etc. If no interrupt is currently pending then no
bits will be set.
To process the interrupt normal POSYS® commands are used. The specific commands sent by the host to process the
interrupt depend on the nature of the interrupting condition, however at a minimum the interrupting bit in the event status
register should be cleared using the ResetEventStatus command. If this is not done then the same interrupt will
immediately occur once interrupts are re-enabled.
Once the host has completed processing the interrupt, it should send a C learInterrupt command to clear the interrupt line,
and re-enable interrupt processing. Note that if another interrupt is pending the interrupt line will only be cleared
momentarily and then reasserted.
Following is a typical sequence of interrupts and host responses. In this example, an axis has hit a limit switch in the
positive direction causing a limit switch event and an abrupt stop. The abrupt stop causes a motion error. Assume that
these events all occur more or less simultaneously. In this example the interrupt mask for this axis has been set so that
either motion errors or limit switch trips will cause an interrupt.
Event
Host action
Motion error & limit switch trip generates interrupt
sends GetInterruptAxis instruction
138
© POSYS Motion Control GmbH & Co.KG, 2013
Event
Host action
A bitmask identifying all interrupting axes is returned by Sends GetEventStatus instruction, detects motion error
the POSYS®. This value identifies one axis as generating and limit switch flags are set. Issues a ResetEventStatus
the interrupt.
command to clear both bits. Returns the axis to closed
loop mode by issuing SetMotorMode On command.
Issues a C learInterrupt command to reset the interrupt
signal.
POSYS® clears motion error bit and disables host
interrupt line
Generates a negative direction move to clear the limit
switch
Motor moves off limit switch. Activity status limit bit is
cleared.
None
At the end of this sequence, all status bits are cleared, the interrupt line is inactive, and no interrupts are pending.
-oIn-Motion Indicator
In-motion Indicator
The POSYS® can indicate whether or not the axis is moving. This function is available in the in-motion indicator.
The in-motion indicator appears in bit 10 of the activity status register. The in-motion bit is similar to the motion complete
bit however there are two important differences. The first is that (like all bits in the Activity Status Register the in-motion
indicator continuously indicates its status without interaction with the host. In other words the in-motion bit cannot be set
or cleared by the host. The other difference is that this bit always indicates the profile generator (commanded) state of
motion, not the actual encoder.
The in-motion indicator bit functions in the S-curve point-to-point, Trapezoidal point-to-point, and Velocity
Contouring profile modes only. It does not function when the profile mode is set to electronic gearing.
-oMotion Error
Motion Error
Under certain circumstances, the actual axis position (encoder position) may differ from the commanded position
(instantaneous output of the profile generator) by an excessive amount. Such an excessive position error often indicates a
potentially dangerous condition such as motor or encoder failure, or excessive mechanical friction.
To detect this condition, thereby increasing safety and equipment longevity, the POSYS® include a programmable
maximum position error.
The maximum position error is set using the command SetPositionErrorLimit and read back using the command
GetPositionErrorLimit. To determine whether a motion error has occurred the position error limit is continuously compared
against the actual position error. If the position error limit value is exceeded, then the axis is said to have had a "motion
error".
At the moment a motion error occurs several events occur simultaneously. The following list describes these events:


Motion Error bit of the event status word is set
If automatic stop on motion error is enabled the motor is set off, which has the effect of the disabling the trajectory
generator (for all versions) and for the servo versions has the additional affect of disabling the servo loop and placing
the POSYS® into open loop mode. This is the equivalent to(SetMotorMode
a
axis, OFF) command.
To recover from a motion error that results in the motor being turned off, the following sequence should be performed:

Determine cause of motion error and correct problem (this may require human intervention).
139
© POSYS Motion Control GmbH & Co.KG, 2013

Issue a SetMotorMode axis, On command followed by an
Update command.After the above sequence, the axis will be
at rest, with the motor on.
If automatic stop on motion error is not set then only the motion error status bit is set, the motor is not stopped and no
recovery sequence is required to continue operating the POSYS®. Nevertheless, for safety reasons, the user may still want
to manually shut down the motion and explore the cause of the motion error.
Automatic Stop On Motion Error
Because a motion error may indicate a serious problem it is useful to have the axis automatically stop until the problem
can be addressed and rectified. This feature is known as automatic stop on motion error.
The command SetAutoStopMode controls the action that will be taken if a motion error occurs. The options for this
command are disable and enable.
If Autostop is enabled, when a motion error occurs a SetAutoStopMode Off command is generated which has the effect of
instantaneously halting the trajectory generator and (for servo versions) putting the POSYS® into open loop.
For stepping motor versions the motor will stop moving immediately (same as an abrupt stop). For servo versions the
trajectory will stop instantly but because motor off means open loop mode the motor will coast to a stop not under servo
control in an amount of time determined by the velocity at time of motion error and the inertia of the system. For the
servo version, transitioning to open loop mode can be dangerous if the axis is oriented vertically, so that the axis may fall
downward due to gravity if not supported by the servo feedback. This problem can be rectified by use of the motor bias
value, which is discussed in the Servo Filter sections of this document. The motor bias is a fixed, open-loop command to
the motor, which is normally added to the PID-filter output. Upon a motion error with automatic stop enabled the motor
bias will be output even while the controller is in open loop mode.
This means that with a properly set motor bias, when the axis experiences a motion error and transitions to open loop
mode, the motor bias can prevent the axis from falling.
Caution: Because the motor bias value is applied open-loop to the axis, care should be taken when setting its
value.
-oMotion Complete Indicator
Motion Complete Indicator
In many cases it is useful to have the controller signal that a given motion is completed. This function is available in the
motion complete indicator.
The motion complete indicator appears in bit 0 of the event status register. As are all bits in the event status register the
motion complete bit is set by the controller and cleared by the host. When a motion has been completed, the controller
sets the motion complete bit on. The host can examine this bit by polling the Event Status Register or the host can
program some automatic follow-on function using a Breakpoint, a Interrupt, or an AxisOut signal. In either case, once the
host has recognized that the motion has been completed the host should clear the motion complete bit, enabling the bit to
indicate the end of motion for the next move.
Motion complete can indicate the end of the trajectory motion in one of two ways. The first is commanded-based; the
motion complete indicator is set based on the profile generator position only.
The other method is actual-based, meaning the motion complete indicator is based on the actual encoder.
The host instruction SetMotionCompleteMode determines which condition controls the indicator. When set to commanded,
the motion is considered complete when the commanded velocity and acceleration values both become zero. This normally
happens at the end of a move when the destination position has been reached. But it may also happen as the result of a
stop command SetStopMode command), a change of velocity to zero, or when a limit switch event occurs.
When set to actual-based the motion is considered complete when all of the following have occurred.


The profile generator (commanded) motion is complete
The difference between the actual position and the commanded position is less than or equal to the value of the settle
window. The settle window is set using the command
SetSettleWindow. This same value may be read back using the
command GetSettleWindow.
140
© POSYS Motion Control GmbH & Co.KG, 2013

The above two conditions have been met continuously for the last N cycles, where N is the programmed settle time.
The settle time is set using the command
SetSettleTime. This same value may be read back using the command
GetSettleTime.
At the end of the trajectory profile the cycle timer for the actual-based motion complete mechanism is cleared, so there will
always be at least an N cycle delay (where is the settle time) between the profile generator being complete and the motion
complete bit being set.
Appropriate software methods should be used with the actual-based motion complete mode because it is in
fact possible that the motion complete bit will never be set if the servo is not tracking well enough to stay
within the programmed position error window for the specified settle time.
The motion complete bit functions in the S-curve point-to-point, Trapezoidal point-to-point, and Velocity Contouring profile
modes only. It does not function when the profile mode is set to Electronic Gearing.
-oSettled Indicator
Settled indicator
The POSYS® can also continuously indicate whether or not the axis is settled.
The settled indicator appears in bit 6 of the "Activity Status Register". The settled indicator is similar to the motion
complete bit when the motion complete mode is set to actual-based. The differences are that the settled indicator
continuously indicates its status (can not be set or cleared) and also that it indicates regardless of whether or not the "
Motion Complete Mode" is set to actual based.
The axis is considered to be settled when the axis is at rest (i.e. not performing a trajectory profile) and when the actual
motor position has settled in at the commanded position for the programmed settle time.
The settle window and settle time used with the settled indicator are the same as for the motion complete bit when set to
actual-based. Correspondingly the same commands are used to set and read these values: SetSettleWindow,
GetSettleWindow, SetSettleTime, GetSettleTime.
Figure 7.5-1. The Tracking Window
141
© POSYS Motion Control GmbH & Co.KG, 2013
Figure 7.5-2. The Settle Window
-oTrace Capture
Trace Capture
Data trace is a powerful feature of the POSYS® that allows various POSYS® parameters and registers to be continuously
captured and stored to an on-board memory buffer. The captured data may later be downloaded by the host using
standard memory buffer access commands. Data traces are useful for optimizing servo performance, verifying trajectory
behavior, capturing sensor data, or to assist with any type of monitoring where a precise time-based record of the
system's behavior is needed.
Maintaining the trace buffer requires the POSYS® to perform extra work during each cycle. In very high-performance
scenarios (such as a single axis configuration running at maximum speed), this may increase the chip cycle time and
increase the servo loop time. Most applications should disable trace capture once the motion profile has been debugged.
Generally trace data capture (by the POSYS®) and trace data retrieval (by the host) are executed as two separate
processes. The host specifies which parameters will be captured, and how the trace will be executed. Then the POSYS®
performs the trace, and finally the host retrieves the data after the trace is complete. It is also possible however to
perform continuous data retrieval even as the POSYS® is continuing to collect additional data trace.
To start a trace the host must specify a number of parameters. They are listed below:
"Trace Buffer" - The host must initiate the buffer for the trace. The POSYS® offers various instructions to setup the
on-board memory to initialize the size, the start and the end position.
"Trace Variables" - Depending on the model you have the choice of upto 28 variables to select which can be stored, Actual
Position, Event Status Register, Motion Error aso. The user must select which variables and from which axis the data shall
be collected.
"Trace Period" - The trace periods to gather and store data can be freely programmed (one cycle, in uneven intervals or in
a certain frequency. These variables must be defined.
"Trace Mode" - 2 different Trace modes are available, once and continuous. These defines how data is stored and if the
trace mode is stopped automatically or if the host interupts the trace.
"Trace Start/Stop Conditions" - To allow precise synchronization of data collection it is possible to define the start and stop
conditions for a given trace. The POSYS® monitors these specified conditions and starts or stops the trace automatically
without host intervention.
The trace buffer
The POSYS® organizes on-board memory into data buffers. Each buffer is given a numerical ID. The trace buffer must
always be ID 0 (zero). Before parameter traces may be used, memory buffer 0 must be programmed with a valid base
address and length.
142
© POSYS Motion Control GmbH & Co.KG, 2013
The size of the trace buffer determines the maximum number of data points that may be captured. The maximum size of
the trace buffer is only limited by the amount of physical memory in the system. The addressable memory space allows
32/64 KB of Dual Port Ram (default or option) or 512 KB Single Port RAM (default or option) to be addressed all of which
(with the exception of the first 1K) may be used to store trace information.
While trace data is being collected, it is not legal to change the trace buffer configuration. If an attempt is made to change
the base address, length, or write pointer associated with buffer 0 while a trace is running, the change will be ignored and
an error will be flagged. It is, however, possible to change the read pointer and read data from the trace buffer while a
trace is running. This allows the buffer to be constantly emptied while the trace runs.
The trace period
The tracing system supports a configurable period register that defines the frequency at which data is stored to the trace
buffer. The tracing frequency is specified in units of cycles, where one cycle is the time required to process all enabled
axes.
The command SetTracePeriod sets the trace period, the command GetTracePeriod retrieves it.
Trace variables
When traces are running, one to four POSYS® parameters may be stored to the trace buffer every trace period. The four
trace variable registers are used to define which parameters are stored. Use the following commands to configure the trace
variables:
The command SetTraceVariable selects which traceable parameter will be stored by the trace variable specified. The
command GetTraceVariable retrieves this same value.
The trace parameter value passed and returned by the preceding two commands specifies the axis and type of data to be
stored. The format of this word is as follows:
Bits
Name
Description
0-1
Axis
Selects the source axis for the parameter
2-7
Reserved
Must be written as 0
8-15
ID
Selects the parameter to be stored
Die supported parameter ID values for POSYS® 700/800/800-B/900 and POSYS® 1800/1900 (<= firmware version 1.5)
are:
ID
Name
Description
0
None
Indicates that no data is selected for the trace variable
1
Position Error
The difference between the actual and commanded position values for the
specified axis.
2
C ommanded Position
The instantaneous commanded position output from the profile generator.
3
C ommanded Velocity
The instantaneous commanded velocity output from the profile generator.
4
Commanded
Acceleration
The instantaneous commanded acceleration output from the profile generator.
5
Actual Position
The actual position of the motor.
6
Actual Velocity
An estimated actual velocity (calculated using a simple low-pass filter).
7
Motor Command
C ommanded motor torque (output of the servo filter).
8
C ycle Time
The chipset time (units of servo cycles).
9
C apture Register
The current contents of the high speed capture register.
10
Servo Integral
The integral value used in the servo filter.
11
Servo Derivative
The derivative value used in the servo filter.
12
Event Status
The current contents of the event status register.
13
Activity Status
The current contents of the activity status register.
143
© POSYS Motion Control GmbH & Co.KG, 2013
ID
Name
Description
14
Signal Status
The current contents of the signal status register.
15
Phase Angle
The current motor phase angle (brushless motors only).
16
Phase Offset
The current phase offset value (brushless motors only).
17
Phase A Output
The value currently being output to motor winding 1.
18
Phase B Output
The value currently being output to motor winding 2. Only valid for two or three
phase motors.
19
Phase C Output
The value currently being output to motor winding 3. Only valid for three phase
motors.
20
Analog Input 0
The most recently read value from analog input 0.
21
Analog Input 1
The most recently read value from analog input 1.
22
Analog Input 2
The most recently read value from analog input 2.
23
Analog Input 3
The most recently read value from analog input 3.
24
Analog Input 4
The most recently read value from analog input 4.
25
Analog Input 5
The most recently read value from analog input 5.
26
Analog Input 6
The most recently read value from analog input 6.
27
Analog Input 7
The most recently read value from analog input 7.
28
PID Position Error
The difference between the actual and commanded position values for the
specified axis. This is the value used as the error term for the PID filter
calculation.
Die supported parameter ID values for POSYS® 1800/1900 (> firmware version 2.x) are:
ID
Name
Description
0
None
Indicates that no data is selected for the trace variable
1
Position Error
The difference between the actual and commanded position values for the
specified axis.
2
C ommanded Position
The instantaneous commanded position output from the profile generator.
3
C ommanded Velocity
The instantaneous commanded velocity output from the profile generator.
4
Commanded
Acceleration
The instantaneous commanded acceleration output from the profile generator.
5
Actual Position
The actual position of the motor.
6
Actual Velocity
An estimated actual velocity (calculated using a simple low-pass filter).
7
Motor Command
C ommanded motor torque (output of the servo filter).
8
C ycle Time
The chipset time (units of servo cycles).
9
C apture Register
The current contents of the high speed capture register.
10
Servo Integral
The integral value used in the servo filter.
11
Servo Derivative
The derivative value used in the servo filter.
12
Event Status
The current contents of the event status register.
13
Activity Status
The current contents of the activity status register.
14
Signal Status
The current contents of the signal status register.
15
Phase Angle
The current motor phase angle (brushless motors only).
16
Phase Offset
The current phase offset value (brushless motors only).
17
Phase A Output
The value currently being output to motor winding 1.
18
Phase B Output
The value currently being output to motor winding 2. Only valid for two or three
144
© POSYS Motion Control GmbH & Co.KG, 2013
ID
Name
Description
phase motors.
19
Phase C Output
The value currently being output to motor winding 3. Only valid for three phase
motors.
20
Analog Input 0
The most recently read value from analog input 0.
21
Analog Input 1
The most recently read value from analog input 1.
22
Analog Input 2
The most recently read value from analog input 2.
23
Analog Input 3
The most recently read value from analog input 3.
24
Analog Input 4
The most recently read value from analog input 4.
25
Analog Input 5
The most recently read value from analog input 5.
26
Analog Input 6
The most recently read value from analog input 6.
27
Analog Input 7
The most recently read value from analog input 7.
28
PID Position Error
The difference between the actual and commanded position values for the
specified axis. This is the value used as the error term for the PID filter
calculation.
29
Phase Angle Scaled
The phase angle, scaled from 0 to 360 deg rather than in encoder counts.
56
Drive Status
The current contents of the drive status register.
57
Position Loop Integral
C ontribution
The contribution of the integral portion of the PID filter.
64
Biquad1 Input
The value input to biquad 1 filter.
65
Biquad2 Input
The value input to biquad 2 filter.
Setting a trace variable´s parameter to zero will disable that variable and all subsequent variables. Therefore, if N
parameters are to be saved each trace period, trace variables 0 - (N-1) must be used to identify what parameters are to
be saved, and trace variable N must be set to zero.
For example; assume that the actual and command position values are to be stored for axis three each cycle period. The
following commands would be used to configure the trace variables:
SetTraceVariable 0, 0203h: Sets trace variable 0 to store parameter 2 (commanded position) for axis 3.
SetTraceVariable 1, 0502h: Sets trace variable 1 to store parameter 5 (actual position) for axis 3.
SetTraceVariable 2, 0000h: Disable trace variables 2 (and above).
Trace Modes
As trace data is collected it is written to sequential locations in the trace buffer. When the end of the buffer is reached, the
trace mechanism will behave in one of two ways depending on the mode that has been selected.
If one-time mode is selected then the trace mechanism will stop collecting data when the buffer is full.
If rolling-buffer is selected then the trace mechanism will wrap around to the beginning of the trace buffer and continue
storing data. In this mode the diagnostic trace will not end until the conditions specified in a SetTraceStop command are
met.
Use the command SetTraceMode to select the trace mode. The command GetTraceMode retrieves the trace mode.
Trace start/stop conditions
The command SetTraceStart is used to specify what conditions will cause the trace mechanism to start collecting data. A
similar command (SetTraceStop ) is used to define the condition that will cause the trace mechanism to stop collecting
data. Both SetTraceStart and SetTraceStop take a 16-word of data which contains four encoded parameters:
Bits
Name
Description
0-3
Trigger Axis
For trigger types other then immediate this field determines which axis will be
used as the source for the trigger. Use 0 for axis 1, 1 for axis 2, etc.
145
© POSYS Motion Control GmbH & Co.KG, 2013
Bits
Name
Description
4-7
Trigger Type
Defines the type of trigger to be used. See the table below for a complete list of
trigger types.
8-11
Bit Number
For trigger types based on a status register, this field determines which bit
(0-15) of the status register will be monitored.
12-15
Bit State
For status register based trigger types, this field determines which state or (0 or
1) of the specified bit will cause a trigger.
The Trigger Type field must contain one of the following values:
ID
Name
Description
0
Immediate
This trigger type indicates that the trace starts (stops) immediately when the
type is SetTraceStart (SetTraceStop) command is issued. If this trigger type is
specified, the source axis, bit number and bit state value are not used.
1
Update
The trace will start (stop) on the next update of the specified source axis. This
trigger type does not use the bit number or state values.
2
Event Status
The specified bit in the event status register will be constantly monitored. When
that bit enters the defined state (0 or 1) then the trace will start.
3
Activity Status
The specified bit in the activity status register will be constantly monitored.
When that bit enters the defined state (0 or 1) then the trace will start.
4
Signal Status
The specified bit in the signal status register will be constantly monitored. When
that bit enters the defined state (0 or 1) then the trace will start.
Downloading Trace Data
Once a trace has been run and the trace buffer is full (or partially full) of data, this data may be downloaded by the host
using the standard commands to read from on-board buffer memory.
When a trace stops running (either because of a SetTraceStop command or because the end of the trace buffer has been
reached) the trace buffer´s read pointer will be adjusted to point to the oldest word of data in the trace. If the trace buffer
did not wrap then this will be location 0. If a wrap occurred in the trace buffer, then the read pointer will be set to the
memory location that would have been overwritten by the next trace sample. At any time, the command GetTraceCount
can be used to get the number of 32-bit words of data stored in the trace buffer.
This value may be used to determine the number of ReadBuffer commands that must be issued to download the entire
contents of the trace buffer. Since the read pointer is automatically set to the oldest word of data in the trace buffer when
the trace ends, and since the read pointer will automatically increment and wrap around the buffer as data is read, reading
the entire contents of the trace buffer is as easy as issuing N ReadBuffer commands (where N is the value returned by
GetTraceCount). During each trace period, each of the trace variables is used in turn to store a 32-bit value to the trace
buffer. Therefore, when data is read from the buffer, the first value read would be the value corresponding to trace
variable 1, the second value will correspond to trace variable 2, up to the number of trace variables used.
Both the length of the trace buffer and the number of trace variables set directly effect the number of trace samples that
may be stored. If for example the trace buffer is set to 1000 words (each 32 bits), and 2 trace variables are initialized
(variables 0 and 1), then up to 500 trace samples will be stored. However, if three trace variables are used then 333 full
trace samples may be stored. In this case the remaining word of data will store the first variable from the 334th Sample.
If the trace mode is set to RollingBuffer then the 334th trace sample will store the first word in the last location of the trace
buffer, and the second and third words will be stored in locations 0 and 1 respectively. In this case the first two words of
the first sample have been overwritten by the last two words of sample 334. When the trace is stopped the read pointer
will point to the oldest word of data in the buffer. This word may not correspond to the first word of a trace sample.
It is therefore recommended that the length of the trace buffer be set so that it is an even multiple of the number of trace
variables being used. This will ensure that the read index is pointing to the first word in a complete trace sample whether
the trace buffer wraps or not. The simplest solution is to make sure that the trace buffer length is an even multiple of 12
(since 12 is evenly divisible by all possible numbers of trace variables 1, 2, 3 or 4).
Running Traces
Here is a summary of data trace operation to help you get started.

Setup the trace buffer. Using the commands SetBufferStart and SetBufferLength define the location in on-board RAM
where trace data should be stored and the amount of RAM to be used to hold the trace data. Be careful not to extend
146
© POSYS Motion Control GmbH & Co.KG, 2013
the buffer beyond the amount of physical RAM available in your system, in particular recall that SetBufferStart and
SetBufferLength specify values based on a 32-bit word size.

Set the trace period. The command SetTracePeriod allows an interval between trace samples to be specified.

Specify what data is to be stored. The command SetTraceVariable may be used to specify up to four variables to be
stored each trace period. Make sure that variables 0 - (N-1) are used if N variables are to be stored, and that variable
N is set to zero.

Set the trace mode. If the trace is to be started on some event then the OneTime mode should probably be used. This
will allow one buffer full of trace data to be stored beginning with the starting event (set using SetTraceStart).
Alternatively, if the trace is to stop on an event (as specified using SetTraceStop), then the rolling buffer mode should
be used. This will cause the system to constantly record data until the stopping event occurs. At that point the data
leading up to the event will be saved in the trace buffer.

Set the stopping mode (if desired). If a specific event will cause the trace to stop, then it should be programmed using
the SetTraceStop command. However, if the trace is to be programmed to stop when the buffer fills up (by setting the
trace mode to OneTime) then it is not necessary to set another stopping event. Also, at any time while the trace is
running the SetTraceStop command may be issued to stop the trace immediately.

Start the trace. The SetTraceStart command may be used to start the trace directly (by specifying the immediate
trigger type). Alternatively, a triggering event may be specified which will start the trace when it occurs.
-oTracking Window
Tracking window
The POSYS® provides programmable tracking windows that can be used to monitor servo performance outside the context
of a motion error. The tracking window functions similarly to the motion error, in that there is a programmable position
error limit within which the axis must stay.
Unlike the motion error facility however, if the axis moves outside of the tracking window the axis is not stopped. The
tracking window is useful when external processes depend on the motor tracking the desired trajectory within some range.
Alternatively the tracking window can be used as an early warning for performance problems that do not yet qualify as a
motion error.
To set the size of the tracking window (maximum allowed position error to stay within the tracking window) the command
SetTrackingWindow is used. The command GetTrackingWindow retrieves this same value.
When the position error is less than or equal to the window value the tracking bit in the Activity Status Register is set.
When the position error exceeds the tracking window value, the tracking bit is cleared.
-o-
147
© POSYS Motion Control GmbH & Co.KG, 2013
SetEventAction Processing
SetEventAction Processing
only for POSYS® 1800/1900 with Motion Control Firmware Version >2.x
Die POSYS® 1800/1900 provide a programmable mechanism for reacting to various safety or performancerelated
conditions.
The command SetEventAction is used to specify what action should be taken for a given condition. To define an
eventrelated response, both a condition and an action must be specified. The following table lists the possible Event Status
Register conditions that can be used to define an event-related action.
Condition Name
Description
Motion Error
A motion error occurs when the position error exceeds a programmable
threshold.
Positive Limit
A positive limit event occurs when the corresponding signal goes active
while the motor velocity is positive.
Negaitve Limit
A negative limit event occurs when the corresponding signal goes active
while the motor velocity is negative.
Both motion error processing and limit switch processing are described in detail later in this chapter. In addition to these
four monitored conditions it is possible to request an immediate safety action.
Action Name
Description
No Action
No action taken.
Smooth Stop
C auses a smooth stop to occur at the current active deceleration rate.
The velocity command will be set to zero after event action occurs.
Abrupt Stop
C auses an instantaneous halt of the trajectory generator. The velocity
command will be set to zero (0) after event action occurs.
Abrupt Stop with Position Clear
C auses an instantaneous halt of the trajectory generator as well as a
zeroing of the position error (equivalent to ClearPositionError
command). The velocity command will be set to zero (0) after event
action occurs.
Disable Position Loop and Higher Modules Disables trajectory generator and position loop module.
Disable Current Loop and Higher Modules Disables trajectory generator, position loop, and current loop modules.
Disable Motor Output & Higher Modules
Disables trajectory generator, position loop, current loop, and motor
output modules.
Once the event condition is programmed, the motion processor monitors the specified condition continuously and executes
the programmed action if it occurs. Upon occurrence, the programmed action is executed, and related actions may occur
such as setting the appropriate bit in theEvent Status Register
.
To recover from an event action, the command
RestoreOperatingModeis used. This command will reset the motion
processor to the operating mode previously specified using
SetOperatingModecommand. Note that if the event condition is
still present, then the event action will immediately occur again.
It is the responsibility of the user to safely and thoroughly investigate the cause of ev ent-related events, and
only restart motion operations when appropriate correctiv e measures have been taken.
If the event action programmed was either
No Action, Abrupt Stop, or Smooth Stop, then the RestoreOperatingMode
command will have no effect. It is intended to restore disabled modules only, and has no effect on trajectory generator
parameters.
Once programmed, an event action will be in place until reprogrammed. The occurrence of the event condition does not
reset the programmed event action.
The POSYS® 1800/1900 boards with firmware version >2.x provide default values for event-related processing. These
defaults are intended to provide safe operation for many typical motion systems. Whether or not these defaults are
appropriate must be determined by the user.
The default event actions are summarized in the following table.
148
© POSYS Motion Control GmbH & Co.KG, 2013
Condition
Default Action
Motion Error
Disable position loop and trajectory generator.
Positive & Negative Limit
Abrupt Stop with Position Error Clear.
-o-
149
© POSYS Motion Control GmbH & Co.KG, 2013
Hardware Signals
Overview; Hardware Signals
Overview; Hardware Signals
There are a number of signals which appear on each axis of the POSYS® which can be used to coordinate POSYS® activity
with events outside the POSYS®. In this section we will discuss these signals. They are the bi-directional travel limit
switches, the Axisln pin, and the AxisOut pin. These signals appear on each axis of the POSYS®. For example, a four-axis
POSYS® such as the POSYS® 1904 has four Axisln pins, four positive limit switches, etc.
GetAxis_In_Out_Home
-oTravel Limit Switches
Travel-limit switches
The POSYS® supports motion travel limit switches that can be used to automatically recognize an "end of travel" condition.
This is an important safety feature for systems that have a defined range of motion.
The positive and negative switches are connected to POSYS® inputs PosIim1-4 and Neglim1-4 respectively, to detect
over-travel in the positive and negative directions, respectively.
Directional limit switch operation
There are two primary functions that the POSYS® provides in connection with the over-travel limit switch inputs:

The host can be automatically notified that an axis has entered an over-travel condition, allowing the host to take
appropriate special action to manage the over-travel condition.

Upon entering an over-travel condition, the trajectory generator can be automatically halted, so that the motor does
not travel further into the over travel region.
Limit switch processing may be enabled or disabled for a given axis through the command SetLimitSwitchMode. This same
register can be read using the command GetLimitSwitchMode.
If limit processing is enabled then the POSYS® will constantly monitor the limit switch input pins looking for a limit switch
event. A limit switch event occurs when a limit switch goes active while the axis commanded position is moving in that limit
switch´s direction. If the axis is not moving, is in open-loop mode, or is moving in the opposite direction, then a limit
switch event will not occur. For example a positive limit switch will occur when the axis commanded position is moving in
the positive direction and the positive limit switch goes active. However it will not occur if the axis commanded position is
moving in the negative direction or is stationary.
The "sense" of the limit switch inputs (active high or active low) can be controlled using the SetSignalSense command.
150
© POSYS Motion Control GmbH & Co.KG, 2013
When a limit event occurs, the POSYS® will generate an abrupt stop thereby halting the motion. In addition, the bit in the
"Event Status Register" corresponding to the active limit switch will be set. Finally, the appropriate bit in the "Activity
Status Register" will be set.
Once an axis has entered a limit switch condition the following steps should be taken to clear the limit switch event:

Unless limit switch events can occur during normal machine operation the cause of the event should be investigated
and appropriate safety corrections made.

The limit switch bit(s) in the event status register should be cleared by issuing the ResetEventStatus command. No
motion is possible in any direction while either of the limit switch bits in the event status register is set.

A move should be made in the direction opposite to the direction that caused the limit switch event. This can be any
profile move that „backs“ the axis out of the limit. If the host instead attempts to move the axis further into the limit,
a new limit event will occur and an instruction error will be generated.
If the limit switches are wired to separate switches it should not be possible for both limit switches to be active at the same
time. However, if this does occur (presumably due to a special wiring arrangement) then both limit switch bits in the
activity status register would be set, thus disabling moves in either direction. In this case, the SetLimitSwitchMode
command should be used to temporarily disable limit switch processing while the motor is moved off of the switches.
NOTE: Limit switches do not function when the POSYS® is in motor off, also known as open-loop mode.
-oAxisOut Output
The AxisOut pin
Each axis has a general purpose axis output pin which can be programmed to track the state of any of the assigned bits in
the "Event Status Register, "Activity Status Register" or "Signal Status Register". The tracked bit in one of these three
registers may be in the same axis or in a different axis as the axis of the AxisOut pin itself. This function is useful for
outputting hardware signals to trigger external peripherals.
The POSYS® command Set/GetAxisOutSource may be used to configure the axis output pin. This command takes a single
word as an argument. The value of this parameter is interpreted as follows:
Bits
Name
Description
0-3
Source axis
Specifies the axis to be used as a source for the axis output signal. The axis
output pin will follow the specified register bit of the source axis. Writing a zero
indicates axis 1, writing a one indicates axis 2, etc.
4-7
Bit number
Indicates which bit in the selected status register will be followed by the axis
output pin. Bits are numbered from 0-15 where bit 0 indicates the least
significant bit.
8-11
Status register
Indicates which register will be used as the source for the axis output. The
encoding is as follows:
ID
1
2
3
4 - 15
12-15
Reserved
register
None, the axis output pin will always be inactive
Event status register
Activity status register
Signal status register
Reserved, do not use
Reserved for future use. Should be written as zeros.
Note that the AxisOut pin may be configured to be active low or active high using the SetSignalSense
command. The default after power-on or reset is 5V (high).
It is possible to use the AxisOut pin as a software-programmed direct output bit under direct host control. This can be done
by selecting zero as the register ID code in the SetAxisOutSource command and by adjusting the level of the resulting
inactive output state to high or low as desired using the SetSignalSense commands.
-oAxisIn Input
151
© POSYS Motion Control GmbH & Co.KG, 2013
The Axisln Input
Each axis has an input pin (Axisln) which can be used as a general purpose input, readable using the GetSignalStatus
command, as well as to trigger automatic events such as performing a motion change (stop, start, change of velocity, etc.)
upon a signal transition using breakpoints.
No special commands are required to setup or enable the Axisln.
-oAnalog Input
Analog Input
The POSYS® motion controller provides 8 channels of general-purpose analog input. These 8 inputs are connected to
internal circuitry that converts the analog signal to a digital word with a precision of 10-bits. The conversions are
performed continuously, with all 8 channels being converted every 4 cycles of the controller.
To read the most recent value converted by any of the 8 channels, the command ReadAnalog is used. The value returned
by this command is the result of shifting the converted 10-bit value 6 bits left.
The analog data is general-purpose and is not used by the motion processor in any calculations.
These analog inputs can be connected to external devices like joysticks to read in a certain position for manually adjusting
or teaching purposes. In conjunction with the trace function the gathered information can be stored and used for automatic
contouring.
Which input voltages are available and allowed can be found in the descriptions of the POSYS® Versions Specifics.
-oThe SYNC IO - Multiple Controller Synchronization
The Synch IO - multiple controller synchronization (POSYS®
w/o activated stepper axes)
The POSYS® controllers contain support for synchronizing their internal cycle time across multiple cards. This allows the
start/stop and modification of motion profiles to be synchronized across controllers where precise timing of movement is
required. This may be necessary because the controllers are remotely located or the application may require greater than 4
axes of synchronized motion. In the most common configuration one controller is assigned as a Master node and other
controllers are set into Slave mode.
The input/output state of this IO and its function are set using the command SetSynchronizationMode mode
Multiple controller synchronization is not available if any axis is configured for a Pulse & Direction motor type.
This feature is then deactivated on the POSYS®.
The table below summarizes the modes.
Encoding
Mode
Description
0
Disabled
In the disabled mode, the connector is configured as an input and is not used. This is
the default mode after reset or power up.
1
Master
In the master mode, the controller outputs a synchronization pulse that can be used
by slave nodes or other devices to synchronize with the internal controller cycle of the
master node.
2
Slave
In the slave mode, the controller is configured as an input and a pulse on the
controller synchronizes the internal controller cycle.
152
© POSYS Motion Control GmbH & Co.KG, 2013
When synchronizing multiple controllers, the following rules must be observed:

All controllers must have their sample time set to the same value. For example, if a POSYS® 1904 and a POSYS®
1902 are to be synchronized the sample time must be at least the greater of the two sample times. In this case the
value must be at least 256 µs since the POSYS® 1904 has a sample time of 256 µs and the POSYS® 1902 has a
sample time of 102,6 µs.

Only one node in the network can be a master. For example, with 3 controllers in a network one controller must be
designated the master and the other two must be slaves.

Slave nodes must be set into slave mode before the master is set as the master node. This ensures that the slave(s)
cycle starts at precisely the moment that the master assumes its state as master.
The master node outputs a synchronization pulse every 50 µs. Applications are free to use this pulse to synchronize
external equipment to the internal cycle of the POSYS®.
-o-
153
© POSYS Motion Control GmbH & Co.KG, 2013
Motor Interfacing
Overview; Motor Interfacing
Overview; Motor Interfacing
The POSYS® supports two types of motor position input: incremental-encoder and parallel-word feedback. The feedback
type is programmable, but the appropriate hardware must be installed for the selection to be effective. (parallel-word
feedback is option)
To set the feedback type the command SetEncoderSource is used. This same value can be read back using the command
GetEncoderSource.
-oIncremental Encoder Input
Incremental Encoder Input
Incremental encoder feedback provides two square-wave signals: A quadrature, B quadrature, and an optional Index pulse
that normally indicates when the motor has made one full rotation. The A and B signals are offset from each other by 90°
as shown in the figure 8-3.
Figure 8-3. Quadrature Encoder Timing
For the quadrature incremental position to be properly registered by the POSYS®, when the motor moves in the positive
direction QuadA should lead QuadB. When the motor moves In the negative direction, QuadB should lead QuadA. Because
of the 90° offset, four resolved quadrature counts occur for one full phase of each A and B channel.
-oActual Position Register
Actual Position Register
The POSYS® continually monitors the position feedback signals and accumulates a 32-bit position value called the Actual
Position. Upon power-up the default Actual Position is zero. The Actual Position can be explicitly set using the command
SetActualPosition, and can be retrieved using the command GetActualPosition.
Particularly when using incremental feedback, the Actual Position is generally set shortly after power-up, using a homing
procedure to reference the actual position to a physical hardware location.
154
© POSYS Motion Control GmbH & Co.KG, 2013
-oDigital Filtering
Digital Filtering
All encoder inputs as well both the index and home capture inputs, are digitally filtered to enhance reliability. The filter
requires that a valid transition be accepted only if it remains in its new (high or low) state for at least three cycles of 50
nsec each (total 150 nsec). This insures that brief noise pulses will not be interpreted as an encoder transition.
Although this digital filtering scheme can increase the overall reliability of the quadrature data, to achieve the highest
possible reliability additional techniques may be required, such as differential line drivers/receivers, or analog filtering.
Whether these additional schemes are required depends on the specific system, and the amount and type of noise sources.
-oHigh Speed Position Capture
High speed position capture
Each axis of the POSYS® supports a high-speed position capture register that allows the current axis location to be
captured triggered by an external signal. One of two signals may be used as the capture trigger the index signal or the
home signal.
These two input triggers differ in how a capture is recognized. If the index signal is used as the trigger, a capture will be
triggered when the A, B, and Index signals achieve a particular state (defined by the signal sense register using the
SignalSenseRegister command). If the home signal is selected as the capture trigger source then only the home signal
need to be in a particular state for the capture to be triggered.
The default values for the A, B, index, and home sense signals in the signal sense register are 0, meaning these signals are
active low. In this condition if index is selected as the trigger source a capture will be recognized when A, B, and Index are
all low. Any change to the sense mask from active low interpretation to active high interpretation will cause a
corresponding change in recognition of the trigger condition.
The command SetCaptureSource determines whether the index signal or the home signal will be used as the position
capture trigger. The command GetCaptureSource retrieves this same value.
When a capture is triggered, the contents of the actual position registers are transferred to the Position capture register,
and the Capture-Received indicator (Bit 3 of the Event Status Register is set. To read the capture register the command
GetCaptureValue is used. The capture register must be read before another capture can take place. Reading the position
capture register causes the trigger to be re-armed, meaning more captures can thereafter occur. As for all Event Status
Register bits, to clear the position capture indicator the command ResetEventStatus is used.
-oParallel-word Position Input (option)
Parallel-word position input (Option)
For feedback systems that do not provide incremental signals, but instead a digital binary word, the POSYS® supports a
parallel-word input mechanism which can be used with a large variety of devices including the following:





Resolvers (after Resolver to Digital conversion)
Absolute optical encoders
Laser interferometers with parallel word read-out
Incremental encoders with external quadrature decoder circuit
A/D converters reading an analog feedback signal
155
© POSYS Motion Control GmbH & Co.KG, 2013
In this position-input mode the encoder position is read through the POSYS® external bus by reading a 16-bit word, one
for each axis set to this mode. Depending on the nature of the feedback device fewer than 16 bits of resolution may be
available, in which case the unused high order data bits should be arranged to indicate a 0 value when read by the
POSYS®. It is also acceptable to sign extend these bits, however under no circumstances should unused bits of the
parallel-word be left floating.
The value input by the POSYS® should be binary coded. The POSYS® assumes that tile position data provided by the
external device is a two`s complemented signed number although if the value returned instead ranges from 0 to 2n-1
(where n is the number of bits provided by the feedback device) than the difference in behavior will be the interpretation of
the start location, which will be `shifted` by 1/2 the full scale feedback range. If desired this initial position may be altered
using the SetActualPosition command.
-oMulti-Turn Systems
Multi-turn systems
In addition to supporting position tracking across the full numeric feedback range of a particular device the ability to
support multi-turn systems is also provided. The parallel encoder values being read in are continuously examined and a
position "wrap" condition is automatically recognized, whether from largest encoder value to smallest encoder value
(negative wrap) or from smallest value to largest value (positive wrap).
Using this "virtual" multi-turn counter, the POSYS® continuously maintain the location to a full 32 bits. Of course if the axis
does not wrap around (non multi-turn system), the range will stay within a 16 bit value.
As the motor moves in the positive direction, the input value should increase up to some maximum at which point it may
wrap back to zero and continue increasing from there. Likewise, when the motor moves in the negative direction the value
should decrease to zero at which point it may wrap back to its maximum. The value at which the parallel input device
wraps is called the device's modulus, and should be set using the SetEncoderModulus command.
Note that the SetEncoderModulus command takes as a parameter ½ the value of the modulus.
For example if a rotary motor uses a 12-bit resolver for feedback the encoder modulus is 4,096, and therefore the value
sent to the SetEncoderModulus command would be 2,048. Once this is done each time the motor rotates and the binary
word value 'Jumps' from the largest binary output to the smallest, the POSYS® will properly recognize the motor wrap
condition and accumulate actual encoder position with values larger than 4,096 or smaller than 0.
For systems that use a position counter with a modulo smaller than the encoder counts per revolution, set the counts/rev
value equal to the position counter size. For example, if a rotary laser interferometer is being used which provides a 16-bit
output value, but provides 16,777,216 counts per revolution, use a counts/rev value of 32,768 (216/2).
No high-speed position capture is supported in the parallel-word device input mode. Therefore for the purpose
of position capture the index and home signals, as well as the quadrature A and B signals are unused in this
mode.
But the reading of position data via this interface is still fast and precise. For example the reading of position data with our
SSI800/900 can be done x20.000 per second.
Nevertheless for other non-position capture functions utilizing the signal status register these signals can still be used in
the normal way. For example these bits can be read (GetSignalStatus) or these bits can be used as breakpoint triggers,
etc.
-oParallel-word Device Interfacing
Parallel-word device interfacing
For each axis that is set for parallel-word input the POSYS® will use its peripheral bus and the addresses listed below to
read the position feedback value for that axis. The value is read from the POSYS®´s peripheral address bus at the
following addresses:
156
© POSYS Motion Control GmbH & Co.KG, 2013
Peripheral bus address
POSYS® I/O operation
Addressed motor (Axis #)
800h
16-bit peripheral read
1
801h
16-bit peripheral read
2
802h
16-bit peripheral read
3
803h
16-bit peripheral read
4
For each axis that is set to parallel-word position input mode the POSYS® will perform a peripheral read at the
corresponding address, but axes not in parallel-word mode will not be addressed. For example, if Axes 1 and 3 are set to
incremental feedback mode and 2 and 4 are set to parallel-word, then Addresses 0801h (address for axis #2 from above
table) and address 0803h (address for axis # 4) will be read by the POSYS®, and the values returned by the associated
host peripheral circuitry will determine the actual position for axis 2 and 4.
If you are interested in using this interface to develop your own addon card (for example memory extension, additional
digital and analog I/Os), then please contact servo-Halbeck GmbH & Co.KG for additional information.
-o-
157
© POSYS Motion Control GmbH & Co.KG, 2013
Parallel Device I/O
Parallel Device I/O
The Navigator chipsets make use of an external peripheral bus to write to and read from the user's peripheral devices
associated with various dedicated chipset functions such as DAC (Digital to Analog C onverter) signal output, parallel-word
input, user-defined memory I/O, and serial port configuration input.
The bus consists of 5 control signals; ~PeriphSlct, ~Strobe, W/~R, R/~W, and ~WriteEnbl. In addition there are 16
address lines (Addr0-Addr15) and 16 data lines (Data0-Data15). The chipset manipulates these control, address, and data
lines in such a way that the user can develop peripheral circuitry to read or write data into or from the chipset.
The following diagram shows the pin description of this interface. As an example for using this interface please also take a
look at our SSI800/900 SSI card which allows the usage SSI-compatible
of
absolute encoders
.
158
© POSYS Motion Control GmbH & Co.KG, 2013
-o-
159
© POSYS Motion Control GmbH & Co.KG, 2013
Peripheral Device Read
Peripheral Device Read
To perform a peripheral read the chipset will drive to a low level the ~PeriphSlct signal, the ~Strobe signal, and the W/~R
signal. In addition the chipset will drive to a high level one or more address bits depending on the number of addresses to
decode for a given function. After these signals have been asserted it is expected that the user's peripheral circuitry will
assert the correct data onto the data bus Data0-15.
The following table summarizes the addresses of the Navigator peripherals:
Base Address
Address bits to decode Dev ice
Description
0800h - 0803h
A0, A1, A11
Parallel-word encoder
Addresses for parallel-word
feedback devices for axes 1-4.
1000h - 10ffh
A0-A7, A12
User-defined
Addresses for user-defined I/O
devices.
The specific timing for the Peripheral Read function is:
POSYS® 700/800/800-B/900
Timing Interv al
Tn
Minimum
Maximum
Address Setup Delay Time
T30
7 nsec
Data Access Time
T31
71 nsec
Data Hold Time
T32
Read to Write Delay Time
T40
PeriphSlct Low to Strobe Low
T55
1 nsec
PeriphSlct High to Strobe High
T56
4 nsec
2 nsec
50 nsec
Note 1 Performance figures and timing information valid at Fclk = 40.0 MHz only.
Note 2 For 8/8 and 8/16 interface modes only.
Note 3 The clock low/high split has an allowable range of 45-55%.
POSYS 1800/1900
160
© POSYS Motion Control GmbH & Co.KG, 2013
Timing Interv al
Tn
Minimum
Maximum
External Memory Read
C lockOut low to control valid
T20
C lockOut low to address valid
T21
4nsec
Address valid to ~ReadEnable low
T22
C lockOut high to ~ReadEnable low
T23
5nsec
Data access time from Address valid
T24
40nsec
Data access time from ~ReadEnable low
T25
Data hold time
T26
C lockOut low to control inactive
T27
Address hold time after C lockOut low
T28
C lockOut low to Strobe low
T29
5nsec
C lockOut low to Strobe high
T30
6nsec
W/~R low to R/~W rising delay time
T31
5nsec
8nsec
31nsec
31nsec
0nsec
5nsec
2nsec
Peripheral Device Read
Address valid to ~ReadEnable low
T45
Data access time from Address valid
T46
56nsec
65nsec
Data access time from ~ReadEnable low
T47
56nsec
-o-
161
© POSYS Motion Control GmbH & Co.KG, 2013
Peripheral Device Write
Peripheral Device Write
To perform a peripheral write the chipset will drive to a low level the ~PeriphSlct signal, the R/~W signal, and the
~WriteEnbl signal. In addition the chipset will drive to a high level one or more bits depending on the number of addresses
to decode for a given function, also asserting the data word to be written by the chipset.
After the Navigator asserts these signals it is expected that the user's peripheral circuitry will read in the data written by
the chipset.
POSYS® 700/800/800-B/900
Timing Interv al
Tn
Minimum
Maximum
Address Setup Delay Time
T33
Address Setup to WriteEnable High
T34
PeriphSlct Low to WriteEnable High
T35
Address Hold Time
T36
17 nsec
WriteEnable Pulse Width
T37
89 nsec
Data Setup Time
T38
3 nsec
Data Setup before Write High Time
T39
92 nsec
WriteEnable Low to Strobe Low
T53
1 nsec
WriteEnable High to Strobe High
T54
3 nsec
7 nsec
122 nsec
129 nsec
Note 1 Performance figures and timing information valid at Fclk = 40.0 MHz only.
Note 2 For 8/8 and 8/16 interface modes only.
Note 3 The clock low/high split has an allowable range of 45-55%.
POSYS 1800/1900
Timing Interv al
Tn
Minimum
Maximum
External Memory Write
C lockOut high to control valid
T32
4nsec
162
© POSYS Motion Control GmbH & Co.KG, 2013
C lockOut high to address valid
T33
Address valid to ~WriteEnable low
T34
10nsec
C lockOut low to ~WriteEnable low
T35
Data setup time before ~WriteEnable high
T36
33nsec
Data bus driven from C lockOut low
T37
-3nsec
Data hold time
T38
2nsec
C lockOut high to control inactive
T39
Address hold time after C lockOut low
T40
C lockOut low to Strobe low
T41
6nsec
C lockOut low to Strobe high
T42
6nsec
R/~W low to W/~R rising delay time
C lockOut high to control valid
T43
T44
5nsec
6nsec
29nsec
6nsec
5nsec
-5nsec
Peripheral Device Write
Address valid to ~WriteEnable low
T48
54nsec
Data setup time before ~WriteEnable high
T49
58nsec
-oMotor Command Output
Motor Command Output
163
© POSYS Motion Control GmbH & Co.KG, 2013
The POSYS® provides a variety of methods to interface to the motor amplifier, however the methods available vary with
each product series. The following table shows the motor output options available for each supported motor type:
Motor ty pe
POSYS® series
Phases per axis
Available output format
DC -Brush
POSYS®
70x
80x
80x-B, 81x-B, 87x-B, 88x-B
90x, 91x, 97x, 98x
180x, 182x
190x, 192x
1
Sign/Magnitude PWM
50/50 PWM
16-bit DAC
Brushless DC
(w/ external
commutation)
POSYS®
70x
80x
80x-B, 81x-B, 87x-B, 88x-B
90x, 91x, 97x, 98x
180x, 182x
190x, 192x
1
Sign/Magnitude PWM
50/50 PWM
16-bit DAC
Brushless DC
(internal
commutation)
POSYS®
82x-B, 83x-B, 87x-B, 88x-B
92x, 93x, 97x, 98x
182x
192x
2 or 3
Sign/Magnitude PWM*
50/50 PWM
16-bit DAC
Microstepping
POSYS®
84x-B, 86x-B, 87x-B, 88x-B
94x, 96x, 97x, 98x
182x
192x
2 or 3
Sign/Magnitude PWM*
50/50 PWM
16-bit DAC
Stepper
POSYS®
75x
85x
85x-B
95x
180x, 182x, 185x
190x, 192x, 195x
1
Pulse & Direction
* only when 2 phases are selected. This format is not supported for 3-phases motors.
Sign/Magnitude PWM, 50/50 PWM and 16-Bit DAC output signals use a signed numeric command value, but in various
formats. In all of these formats the signal is coded in a manner that the numeric value corresponds to a torque demand
e.g. velocity demand value which the POSYS® outputs to the amplifier.
Pulse and direction is fundamentally different from the other two representations because it makes no attempt to encode a
motor torque. Instead pulse and direction supports step motor amplifiers which accept a positive direction movement
"pulse" and a negative direction movement "pulse". The amplifier then determines the motor torque, usually through an
analog setting on the amplifier itself.
The command SetOutputMode controls which of the available output formats will be used. The command GetOutputMode
retrieves this same value.
-oSign/Magnitude PWM
Sign/Magnitude PWM
In this mode, two pins are used to output the motor command information for each motor phase. One pin carries the PWM
magnitude that ranges from 0 to 100%. This signal expresses the absolute magnitude of the desired motor command. A
high signal on this pin means the motor coil should be driven with voltage. A second pin outputs the sign of the motor
command by going high for positive sign and low for negative.
In this mode, output is resolvable to 1 part per 2,048. The total range of the motor command register which is -32,768 to
+32,767 is scaled to fit the PWM output range.
For example if the motor command that the POSYS® outputs for a given phase is +12,345 then the sign bit will be output
164
© POSYS Motion Control GmbH & Co.KG, 2013
as a high level, and the magnitude pin will output with a duty cycle of 2,048*12,345/32,768 = 771.56 = 772, meaning the
magnitude signal will be high for 772 cycles and low for the remaining 1,276 cycles. If it were desired that the output value
be -12,345 then the magnitude signal would be the same but the sign bit would be low instead of high.
Sign/Magnitude PWM output is typically used with H-bridge type amplifiers. Most such amplifiers have separate sign and
magnitude inputs allowing the POSYS® signals to be connected directly.
The following figure shows sign and magnitude output waveforms:
Typical Sign/Magnitude PWM output signals
Set/GetOutputMode
-o50/50 PWM Motor Command Output
50/50 PWM
In this mode only one pin is used per motor output or per motor phase. This pin carries a variable duty cycle PWM signal
much like the magnitude signal for sign magnitude PWM. This PWM output method differs however in that a 50% output
signal (high half the time, low half the time) indicates a desired motor command of zero, and positive motor commands are
encoded as duty cycles greater than 50% duty cycles, and negative motor commands are encoded as duty cycles less than
50 %. In this mode a full on positive command is encoded as a 100% duty cycle (always high) and a full on negative
command is encoded as a 0 % duty cycle (always low).
For example if the motor command that the controller outputs for a given phase is +12,345 then the magnitude pin will
output with a duty cycle of 1,024 + 1,024*12,345/32,768 = 771.56 = 1,409.78 = 1,410, meaning the magnitude signal
will be high for 1,410 cycles and low for the remaining 638 cycles. If it were desired that the output value be -12,345 then
the magnitude signal would have a duty cycle of 1,024 + 1,024*-12,345/32,768 = 638.2 = 638 meaning the magnitude
signal will be high for 638 cycles and low for the remaining 1,410.
50/50 magnitude PWM output is used with two different types of amplifiers. When driving a brushless PM (permanent
magnet) motor the magnitude signal is connected to a half bridge driver. When driving a DC brushed motor an H-bridge
type amplifier is used however the magnitude signal input of the H-bridge. This alternative method of controlling an
H-bridge is occasionally useful in situations where motor back-EMF during deceleration is a problem using the standard sign
magnitude schemes.
Set/GetOutputMode
-o16 Bit DAC Motor Command Output
165
© POSYS Motion Control GmbH & Co.KG, 2013
16-Bit DAC
In this mode the motor command for a given phase is output directly to the POSYS's® peripheral bus where it is
assembled into an analog voltage using a DAC (Digital to Analog Converter). The POSYS® writes the DAC output value to
each enabled channel in this mode at the commutation frequency of 10 kHz. So (for example) for a 4-axes POSYS® which
has all four axes set to Parallel DAC mode, DAC output will be written for each axis once per 100 µsec, with the writes in
pairs separated by 50 µsec.
For one or two phase motors, one DAC output is used for each phase. For three phase motors, only two DAC outputs are
used, the third phase will always be an analog signal equal to - 1 * (P1 + P2) where P1 is the output for phase 1 and P2 is
the output for phase 2. If necessary this third phase signal may be realized using an inverting summing amplifier in the
external circuitry. Generally though this is not necessary since the majority of 3-phase off-the-shelf amplifiers accept two
phases and internally construct the third.
The output value written has a resolution of 16 bit. This value is offset by 8000h, so a value of 0 will correspond to the
most negative output. A value of 8000h corresponds to zero output, and a value of 0FFFFh corresponds to the most
positive output.
Set/GetOutputMode
-o-
166
© POSYS Motion Control GmbH & Co.KG, 2013
Host Communication
Overview; Host Communication
Overview; Host Communication
The POSYS® communicates with its host(s) through either of three ports: a bi-directional parallel port, an asynchronen
seriellen Port, or via C AN 2.0B.
The POSYS® accepts commands from the host in a packet format. By sending sequences of commands the host can
control the behavior of the motion system as desired, and monitor the status of the POSYS® and the motors.
-oParallel Communication Port
Parallel Communication Port
The bi-directional parallel port is configured to operate in the following mode, as follows:
16-bit mode
The POSYS® transfers instructions and data as full 16-bit words, using the entire 16-bit data
path.
This is the default after power-on.
-oSerial Interface
Serial Port
In addition to the parallel interface, the POSYS® provides an asynchron serial interface. This serial port may be configured
to operate at baud rates ranging from 1200 baud to 416,667 baud, and may be used in point-to-point or multi-drop mode.
Configuration
Following serial I/F connectors are used on the boards.
POSYS® 8xx-B: 2x 3-position female connector (2 mm)
The counter connector is a male style connector 2x 3-position (2 mm)
POSYS® 18xx/9xx/19xx: Molex 5-position PicoBlade SMT style connector part no.: 53261-0590 or 53261-0571
(lead-free)
The counter connector for the Molex 5-position connector is: Molex part no. 51021-0500
The POSYS® 7xx and 8xx do not offer the possibility of serial communication.
The configuration word read by the POSYS® at address 200h is organized as follows:
Bit
Parameter
Indications
0-3
Transmission rate selector
0
1
2
3
4
5
6
7
1200 bps
2400 bps
9600 bps
19200 bps
57600 bps*
115200 bps*
250000 bps
416667 bps
4-5
Parity selector
0
None
167
© POSYS Motion Control GmbH & Co.KG, 2013
Bit
Parameter
Indications
1
2
3
Odd parity
Even parity
Reserved (do not use)
6
Number of stop bits
0
1
1 stop bit
2 stop bits
7-8
Protocol type
0
1
2
3
Point-to-point
Reserved (do not use)
Multi-drop (address bit mode)
Multi-drop (idle line mode)
9-10
Reserves
11-15
Multi-drop address selector
Should be zero in
point-to-point mode
0
1
...
31
Address 0
Address 1
Address 31
*To insure synchronization between characters at these transmission rates, use 2 stop bits.
The default values at power-on are for the various types different. The POSYS® 8xx-B and 9xx vary from those for the
POSYS® 18xx and 19xx. Other default values are possible and can be defined by the customer and programmed by
servo-Halbeck to the Eprom. This customization must be determined before ordering.
The default values are for the POSYS® 8xx-B and 9xx:
Argument
Default values
Serial communication
9600 baud
Parity
none
Stop bits
1
Protocol
point-to-point
The default values are for the POSYS® 18xx and 19xx:
Argument
Default values
Serial communication
57600 baud
Parity
none
Stop bits
2
Protocol
point-to-point
All of the defaults can be changed by writing to the appropriate register. A soft reset (motion processor only) will not reset
these values, they will be retained and read by the CP (after a CP reset) and used as new defaults. After a HardReset or
power-on reset the original defaults will be used again.
Control Signals
Three signals, SrlXmt, SrlRcv, and SrlEnable mediate serial transfers. SrlXmt encodes data transmitted from the CP to the
host processor. SrlRcv receives data sent from the host to the CP. SrlEnable goes active (high) when data is being
transmitted in multi-drop mode. This signal may be connected to the output enable pin of a serial buffer IC to allow
tri-stating of the transmit line of a serial bus when not in use. In point-to-point mode the SrlEnable pin is always active
(high). The basic unit of serial data transfer (both transmit and receive) is the byte. Each byte of data consists of the
following parts:





One start bit
Eight data bits
An optional even/odd parity bit
One or two stop bits
An extra bit which distinguishes between address bytes and data bytes (address-bit style multi-drop mode only)
Command format
The command format used to communicate between the host and POSYS® consists of a command packet sent by the host
168
© POSYS Motion Control GmbH & Co.KG, 2013
processor followed by a response packet sent by the POSYS®.
C ommand packets sent by the host contain the following fields:
Field
Byte
Description
Address
1
One byte identifying which CP the command packet is being sent to. This field should
always be zero in point-to-point mode.
Checksum
2
One byte value used to validate packet data. See description below.
Instruction
code
3-4
Two byte instruction, sent upper byte (axis number) first. The command codes are the
same as used in the parallel communication mode.
Data
5-
Zero to six bytes of data, sent most significant byte first. See the individual command
descriptions for details on what data is required for each command.
In response to the command packet, the POSYS® will respond with a packet of the following format:
Field
Byte
Description
Status
1
Zero if the command was completed correctly, otherwise an error code specifying the
nature of the error. (see Host I/O Errors)
Checksum
2
A one-byte checksum value used to validate the packet's integrity. See details below.
Data
3
Zero to six bytes of data. No data will be sent if an error occurred in the command (i.e.
the status byte was non-zero). If no error occurred, then the number of bytes of data
returned would depend on what command had the CP was responding to. Data is always
sent MSB first.
Host I/O Errors
There are a number of checks that the chip makes on the command sent to the chip. These checks improve safety of the
motion system by eliminating some obviously incorrect command data values. All such checks associated with host I/O
commands are referred to as Host I/O errors. The status byte in the response packet will contain one of the following error
codes:
Code
Indication
Cause
0
No error
No error condition.
1
Pilot reset
Default value of error code on reset or power-up.
2
Invalid instruction Instruction is not valid in the current context, or an illegal instruction code has been
detected.
3
Invalid axis
4
Invalid parameter The parameter value sent to the POSYS® was out of its acceptable range.
5
Trace running
6
Reserved
7
Block bound
exceeded
1. The value sent by SetBufferLength or SetBufferStart would create a memory block
which extends beyond the allowed limits of 400h – 7FFFFFFFh.
2. Either SetBufferReadIndex or SetBufferWriteIndex sent an index value greater than
or equal to the block length.
8
Trace zero
SetTraceStart Immediate was issued, but the length of the trace buffer is currently set
to zero.
9
Bad checksum
The checksum complied and returned by the POSYS® does not match that sent by the
host.
Bh
Negative velocity
An attempt was made to set a negative velocity without the axis being in velocity
contouring profile mode.
Ch
S-curve change
The axis is currently executing an S-curve profile move and an attempt was made to
change the profile parameters. This is not permitted.
Dh
Limit event
pending
A limit switch event has occurred.
Eh
Move into limit
An attempt was made to execute a move without first clearing the limit bit(s) in the
Event Status register.
The axis number contained in the upper bits of the instruction word is not supported
by this chip.
An instruction was issued that would change the state of the tracing mechanism while
the trace is running. Instructions which can return this error are SetTraceVariable,
SetTraceMode & SetTracePeriod.
169
© POSYS Motion Control GmbH & Co.KG, 2013
Checksums
Both command and response packets contain a checksum byte. The checksum is used to detect transmission errors, and
allows the POSYS® to identify and reject packets which have been corrupted during transmission or which were not
properly formed.
Unlike the parallel interface, checksums are mandatory when using serial communications. Any command packets sent to
the POSYS® containing invalid checksums will not be processed and will result in a data packet being returned containing
an error status code.
The serial checksum is calculated by summing all bytes in the packet (not including the checksum) and negating (i.e.
taking the two's complement of) the result. The lower eight bits of this value are used as the checksum. To check for a
valid checksum, all bytes of a packet should be summed (including the checksum byte) and if the lower eight bits of the
result are zero then the checksum is valid.
For example, if a command packet is sent to POSYS® address 3, containing command 0177h (SetMotor- Command for
axis 2) with the one word data value 1234h, then the checksum will be calculated by summing all bytes of the command
packet (03h + 01h + 77h + 12h + 34h = C1) and negating this to find the checksum value (3Fh). On receipt, the CP will
sum all bytes of the packet and if the lower eight bits of the result are zero then it will accept the packet (03h + 3Fh + 01h
+ 77h + 12h + 34h = 100h).
Transmission protocols
The POSYS®s support the ability to have more than one POSYS® on a serial bus , thereby allowing a chain, or network of
POSYS®s to communicate on the same serial hardware signals.
There are three methods supported by the serial port to resolve timing problems, transmission conflicts, and other issues
that may occur during serial operations. These are point-to-point (used when there is only one device connected to the
serial port), multi-drop address bit-mode (used when there are multiple devices on the serial bus), and multi-drop idle-line
mode (also used when there are multiple devices on the serial bus). The next sections describe these three transmission
protocols.
Point-to-point mode
Point-to-point serial mode is intended to be used when there is a direct serial connection between one host and one motion
controller. In this mode the address byte is not used by the POSYS® (except in the calculation of the checksum), and the
POSYS® responds to all commands sent by the host.
When in point-to-point mode there are no timing requirements on the data transmitted within a packet. The amount of
data contained in a command packet is determined by the command code in the packet. Each command code has a specific
amount of data associated with it. When the POSYS® receives a command code it waits for all data bytes to be received
before processing the command. The amount of data returned from any command is also determined by the command
code. After processing a command the POSYS® will return a data packet of the necessary length.
When running in point-to-point mode there is no direct way for the POSYS® to distinguish the beginning of a new
command packet, except by context. It is therefore important for the host to remain synchronized with the POSYS® when
sending and receiving data. To ensure that the POSYS® stay in synchronization it is recommended that the host processor
implement a time limit when waiting for data packets to be sent by the POSYS®. The minimum time-out period suggested
is the amount of time required to send one byte at the selected baud rate plus one millisecond. For example, at 9600 baud
each bit takes 1/9600 seconds to transfer, and a typical byte consists of 8 data bits, 1 start bit, and 1 stop bit. Therefore,
one byte takes just over 1 millisecond, and the recommended minimum timeout is 2 milliseconds. If the timeout period
elapses between bytes of receive data while the host is waiting on a data packet, then the host should assume that it is out
of synchronization with the POSYS®. To resynchronize, the host should send a byte containing zero data and wait for a
data packet to be received. This process should be repeated until a data packet is received from the POSYS®, at which
point the two processors will be synchronized.
Multi-drop protocols
Two multi-drop serial protocols are supported by the POSYS®. Multi-drop modes are intended to be used on a serial bus in
which a single host processor communicates with multiple POSYS® (or other subordinate devices). In this mode the
address byte which starts a command packet is used to indicate which device the packet is intended for. Only the
addressed device will respond to the packet. Therefore, it is important to properly set up the POSYS® address (using the
serial configuration word described above), and to include this address as the first byte of any command packet destined
for the POSYS®.
Because the address that starts a command packet is used to enable or disable the response from a POSYS® in multi-drop
mode, the multi-drop protocols must include a method to avoid losing synchronization between the host and the
POSYS®(s) because it would be difficult to regain synchronization in this environment. The two multi-drop protocols differ
in the methods they use to control packet synchronization.
170
© POSYS Motion Control GmbH & Co.KG, 2013
Note that the multi-drop protocols may also be used when the host and POSYS® are wired in a point-to-point configuration
as long as the host always transmits the correct address byte at the start of a packet, and follows any additional rules
detailed below for the selected protocol. This mode of operation allows the host to be sure that it will remain synchronized
with the POSYS® without implementing the timeout and re-synch procedure outlined above.
Idle-line mode
When the idle-line protocol is used, the POSYS® imposes tight timing requirements on the data sent as part of a command
packet. In this mode, the POSYS® will interpret the first byte received after an idle period as the start of a new packet.
Any data already received will be discarded.
The timeout period is equal to the time required to send ten bits of serial data at the configured baud rate (roughly 1
millisecond at 9600 baud for example). If a delay of this length occurs between bytes of a command packet then the bytes
already received will be discarded, and the first character received after the delay will be interpreted as the address byte of
a new packet.
Address bit mode
When the address bit protocol is used, each byte of data transmitted or received by the POSYS® contains an extra bit of
data (just after the last data bit). This bit is used to identify the address byte of a packet. Any byte received by the
POSYS® which has this bit set will be interpreted as the start of a new command packet. If the POSYS® was in the
process of receiving data from an earlier command packet then that data will be discarded.
-oController Area Network CAN2.0B
Controller Area Network (CAN)
The POSYS® 18xx/19xx can integrate into a C AN 2.0B network and will coexist (but not communicate) with CAN 2.0B
nodes on that network. The POSYS® 18xx/19xx uses C AN to receive commands, send responses and (optionally) send
asynchronous event notifications. Each message type has an address, as follows:
Message ty pe
CAN Address
C ommand receive
0x600 + nodeID
C ommand response
0x580 + nodeID
Event notification
0x180 + nodeID
C AN nodes communicate via messages. Each message can carry a data payload of up to 8 bytes. The C AN interface layer
automatically corrects transmission errors, so a checksum is not a part of the motion IC s C AN interface protocol as it is
with serial or parallel.
The data formats for the three message types are expressed in terms of the byte sequences for the parallel interface.
C ommands have varying data lengths; see the POSYS® Programmer´s C ommand Reference for the data formats of
particular commands. Bytes that will always be present independent of the command being processed are marked as
required below. The corresponding byte sequences in the C AN protocol for the 3 message types are as follows:
Command received
Message data byte
Required?
Corresponding parallel by te
1
Y
C ommand word, high byte
2
Y
C ommand word, low byte
3
N
1st data word, high byte
4
N
1st data word, low byte
5
N
2nd data word, high byte
6
N
2nd data word, low byte
7
N
3rd data word, high byte
8
N
3rd data word, low byte
171
© POSYS Motion Control GmbH & Co.KG, 2013
Command response
Message data byte
Required?
Corresponding parallel by te
1
Y
C ommand word, high byte
2
Y
C ommand word, low byte
3
N
1st data word, high byte
4
N
1st data word, low byte
5
N
2nd data word, high byte
6
N
2nd data word, low byte
7
N
3rd data word, high byte
8
N
3rd data word, low byte
Event notification
Message data byte
Required?
Data interpretation
1
Y
Axis number (1-4)
2
Y
event status register value, high byte
3
Y
event status register value, low byte
-oConfiguring the CAN 2.0B Interface
Configuring the CAN 2.0B Interface
The POSYS®'s CAN interface is configured via the SetCANMode command. This command is used to set the CAN nodeID of
a particular POSYS® (0 - 127), as well as the transmission rate of the connected CAN network. The supported transmission
rates are listed here:
SetCANMode Encoding
CAN Transmission Rate (bps)
0
1000000
1
800000
2
500000
3
250000
4
125000
5
50000
6
20000
7
10000
The default values at power-on are for the various types the same. Other default values are possible and can be defined by
the customer and programmed by servo-Halbeck to the Eprom. This customization must be determined before ordering.
The default values are:
Argument
Default values
Transmission rate
500000
C AN nodeID
0
All of the defaults can be changed by writing to the appropriate register. A soft reset (motion processor only) will not reset
these values, they will be retained and read by the CP (after a CP reset) and used as new defaults. After a HardReset or
power-on reset the original defaults will be used again.
-oCAN Event Notification
172
© POSYS Motion Control GmbH & Co.KG, 2013
CAN Event Notification
When communicating via the C AN interface, the POSYS® can (optionally) send messages when selected bits in the Event
Status Register are set active. This facility directly corresponds to the motion IC s host interrupt facility when using the
parallel interface (refer to section Host Interrupts for more information). These messages are sent with a CAN address of
0x180 + nodeID.
This CAN notification facility is controlled with the SetInterruptMask command. For each on bit in the notify mask, a CAN
message will be generated whenever the corresponding bit in the event status register becomes 1. The available mask bits
are as follows:
POSYS® Ev ent
Mask Bit
Motion complete
0001h
Wrap-around
0002h
Breakpoint 1
0004h
C apture received
0008h
Motion error
0010h
In positive limit
0020h
In negative limit
0040h
Instruction error
0080h
C ommutation error
0800h
Breakpoint 2
4000h
-oElectrical Diagrams for CAN Interface
Electrical Diagrams for CAN Interface
C AN Interface for POSYS® 1800/1900 Series Motion Controllers
The POSYS® 1800/1900 uses the TI SN65HVD232QD-SO8 CAN Transceiver. For more details please refer to the TI data
sheet. The CANH and CANL connections are made via the CON3 Molex connector on the POSYS® 1800/1900 board.
The CAN 2.0B cable is optional. Please contact us if you wish to connect via CAN 2.0B to the POSYS®.
The connector on the board is a 2-position Molex male connector (Molex part no.: 53398 – 0290). The counter connector
for the cable is a female connector from Molex (Molex part no.: Molex 51021-0200, Crimp contact: Molex 50079-8100).
-o-
173
© POSYS Motion Control GmbH & Co.KG, 2013
Using On-Board Memory
Memory Configuration
Memory Configuration
POSYS® 7xx, 8xx, 8xx-B, 9xx
The POSYS® motion controller is capable of accessing on-board memory used to store trace data. In addition it is possible
to access the on-board memory independent of the trace function, thereby allowing it to be used for generic storage such
as for product configuration or path information (ExternalProfileMode).
If on-board RAM is present, it must be configured with a width of 16 bits. Any size of RAM may be supported from 1K and
up although the first 1024 words of on-board memory are always reserved for the use of the controller. The total on-board
memory available for functions such as trace must therefore be calculated accordingly.
The controller address and data busses are used to interface to the on-board memory. The controller uses 15 address lines
for on-board memory operation that allow it to directly access up to 32K words of memory. To allow a greater addressable
space, the controller also makes use of a memory page selector (mapped into peripheral address space at location 2000h)
which allows up to 64K pages to be accessed. This increases the maximum addressable memory space to 2,048M words
(2,147,483,648 words, each 16 bits wide).
This memory organization gives the designer several options as to the level of support provided to this feature:
Memory size
Notes
None
The on-board memory space is optional. Diagnostic trace and other features that make use
of the on-board memory space cannot be used.
1K to 32K
The first 1K (1024 words) are reserved by the controller.
All memory fits into the first page, so there is no need to decode writes to the external page
pointer.
More than 32K
An external page pointer must be used. The first 1K words of page zero are reserved for use
by the C P.
POSYS® 18xx, 19xx
The POSYS® 18xx and 19xx are capable of accessing external memory used to store trace data. In addition it is possible
to access the external memory independent of the trace function, thereby allowing it to be used for generic storage such as
for product configuration information or path information (ExternalProfileMode).
If on-board RAM is present, it must be configured with a width of 16 bits. Any size of RAM may be supported.
The controller address and data busses are used to interface to the external memory. The controller uses 15 address lines
for external memory operation that allow it to directly access up to 32K words of memory. To allow a greater addressable
space, the CP also makes use of a memory page selector (mapped into peripheral address space at location 2000h) which
allows up to 64K pages to be accessed. This increases the maximum addressable memory space to 2,048M words
(2,147,483,648 words, each 16 bits wide).
This memory organization gives the designer several options as to the level of support provided to this feature:
Memory size
Notes
None
The on-board memory space is optional. Diagnostic trace and other features that make use
of the on-board memory space cannot be used.
Up to 32K
All memory fits into the first page, so there is no need to decode writes to the external page
pointer.
More than 32K
An external page pointer must be used. The first 1K words of page zero are reserved for use
by the C P.
-oMemory Page Pointer
174
© POSYS Motion Control GmbH & Co.KG, 2013
Memory page pointer
If a memory address space of more then 32K words is desired, then an external page register must be supported.
Before the controller writes to on-board memory space, it writes a 16-bit page number to peripheral address location
2000h. This value should be latched and used as the upper 16 bits of the 31 bit true memory address.
The controller will never attempt to read from this page number register, so there is no need to provide
support for reads. Although the value written by the controller is 16 bits, it is not necessary to latch any bits
that will not be used. For example, if 128K words of memory mapped to the physical addresses 0 – 1FFFFh,
then 4 pages of memory (4 x 32K = 128K) will be needed. This corresponds to the low two bits of the page
register. When the controller a 16-bit value to peripheral address 2000h the lowest two bits should be latched
and used as address bits 15 and 16 when accessing on-board memory. The upper 14 bits of the page register
value need not be saved since they will not be used. External memory signal decoding.
-oOn-Board Memory Signal Decoding
On-board memory signal decoding
The POSYS® controller support an on-board RAM memory bus to read and write to on-board memory. The bus consists of
4 control signals; ~RAMSlct, W/~R, R/~W, and ~WriteEnbl. In addition there are 15 address lines (Addr0-Addr14) and 16
data lines (Data0-Data15).
-oOn-Board Memory Read
On-board memory read
To perform an on-board memory read the controller first loads the memory page pointer using the peripheral bus as
described above. Then to perform the read the controller will drive to a low level the ~RAMSlct signal, the ~Strobe signal,
and the W/~R signal. In addition the controller will drive the address bus high or low based on the specific memory being
fetched.
After the POSYS® asserts these signals it is expected that the user´s peripheral circuitry will assert the requested data
onto the controller's data bus data0-15.
ReadBuffer, WriteBuffer
-oOn-Board Memory Write
On-board memory write
To perform an on-board memory write the controller first loads the memory page pointer using the peripheral bus
described above. Then to perform a write the controller will drive to a low level the ~RAMSlct signal, the ~Strobe signal,
the W/~R signal, and the ~WriteEnbl signal. In addition the controller will drive the address bus high or low based on the
specific memory being written to and it will also assert the data word on to the data bus for the value being written by the
controller.
After the POSYS® asserts these signals it is expected that the user´s peripheral circuitry will read in and store the data
written by the controller.
ReadBuffer, WriteBuffer
175
© POSYS Motion Control GmbH & Co.KG, 2013
-oOn-Board Memory Buffer
On-board memory buffers
The POSYS® provides a number of commands that may be used to access the on-board memory space. Through these
commands, up to 16 memory buffers may be defined. A buffer describes a contiguous block of memory by defining a base
address for the block and a block length.
Once a buffer´s base address and length have been defined, data values may be written to and read back from the buffer.
When defining memory buffers, the on-board memory space is treated as a sequence of 32-bit memory locations. Each
32-bit value takes up two 16-bit memory locations in physical memory.
Buffer base addresses and lengths both deal with 32 bit quantities, and therefore must be doubled to get the
corresponding physical addresses.
When defining memory buffers, the controller will allow any values to be used for the base address and length as long as
those values result in legal addresses. Legal memory addresses range from 200h (only valid for POSYS®
700/800/800-B/900; corresponding to physical location 400h that falls just after the 1K reserved block) to 3FFFFFFFh
(corresponding to physical address 7FFFFFFEh). The memory on the POSYS® 1800/1900 boards have no restrictions
regarding buffer start address. This can be 0h. Unless the full two Gigawords of physical memory are present, it is possible
to map a buffer to a memory location that does not contain physical memory.
Accessing such a memory location will result in unpredictable behavior, and should be avoided.
In addition to the base address and length, each memory block maintains a read index and a write index.
The read index may be assigned a value between 0 and L-1 (where L is the buffer length). It defines the location from
which the next value will be read. Similarly, the write index ranges from 0 to L-1 and defines the location at which the next
value will be written. When a value is read from the memory buffer the read index is automatically incremented, thereby
selecting the next value for reading. The write index is incremented whenever a value is written to a buffer. If either index
reaches the end of the buffer, it is automatically reset to 0 on the next read/write operation.
Set/GetBufferFunction, Set/GetBufferLength
-oExternal Memory Commands
External memory commands
This section details host I/O commands which setup, access, and monitor the on-board memory.
Commands
Description
SetBufferStartbufferID, address
Sets the base address of a buffer.
bufferID is a 16-bit integer in the range
0–15 which specifies which buffer to modify;
address is a 32-bit integer in
the range 200h to 3FFFFFFFh which defines the new base address of the
buffer. The controller addsaddress to the current buffer length (as set by
the SetBufferLength instruction) to be sure that the buffer will not extend
beyond the addressable memory limit. If it would extend beyond the limit,
the instruction is ignored and the instruction error bit is set.
GetBufferStartbuffered
Returns the base address of the specified buffer.
SetBufferLength, bufferID, length
Sets the length of a buffer.bufferID is a 16-bit integer in the range –
015.
length is a 32-bit integer in the range 1 to 3FFFFFFFh. The controller adds
length to the current buffer base address (as set by the SetBufferStart
instruction) to be sure that the buffer will not extend beyond the
addressable memory limit. If it would, the instruction is ignored and the
instruction error bit is set.
SetBufferStart and SetBufferLength reset the buffer indexes to zero.
176
© POSYS Motion Control GmbH & Co.KG, 2013
Commands
Description
GetBufferLengthbuffered
Returns the length of the specified buffer.
SetBufferReadIndexbufferID, index
Sets the read index for the specified buffer.
index is a 32-bit integer in the
range 0 to length-1, where length is the current buffer length. Ifindex is
not in this range, it is not set, and an instruction error is generated.
GetBufferReadIndexbufferID
Returns the value of the read index for the specified buffer.
SetBufferWriteIndexbufferID, index
Sets the write index for the specified buffer.
index is a 32-bit integer in the
range 0 to length-2, where length is the current buffer length. Ifindex is
not in this range, it is not set, and an instruction error is generated.
GetBufferWriteIndexbufferID
Returns the value of the write index for the specified buffer.
ReadBuffer bufferID
Returns a 32-bit value from the specified buffer. The location from which
the value is read is determined by adding the base address to the read
index. After the value has been read, the read index is incremented. If the
result is equal to the current buffer length, the read index is set to zero.
WriteBuffer bufferID, value
Writes a 32-bit value to the specified buffer. The location to which the
value is written is determined by adding the base address to the write
index. After the value has been written, the write index is incremented. If
the result is equal to the current buffer length, the write index is set to
zero.
-o-
177
© POSYS Motion Control GmbH & Co.KG, 2013
Sinusoidal Commutation
Overview; Sinusoidal Commutation
Overview; Sinusoidal Commutation
In addition to trajectory generation and servo loop closure the POSYS® controllers provide sinusoidal motor commutation
of 3 and 2-phase brushless motors. This allows for mixed motor combinations using just one controller.
The following diagram shows an overview of the control flow of the sinusoidal commutation portion of the axes of the
POSYS® running in brushless mode:
The commutation portion of the controller uses as input the motor command signal from either the servo filter or the motor
command register (depending on whether the controller is in closed loop or open loop mode). This pre-commutated
command signal is then multiplied by commutation values derived from an internal lookup Sin/Cos table.
The commutation angle used in the Sin/Cos lookup is determined by the position encoder as well as parameters set by the
host processor which relate the specific encoder used to the motor magnetic poles.
Two commutation waveforms are provided, one appropriate for 3-phase devices with 120 deg. separation between phases
(such as brushless motors), and one appropriate for 2-phase devices with 90 deg. separation between phases (such as
stepper motors).
Other features of the POSYS® are the ability to use Hall-sensor inputs for phase initialization, to use an index pulse to
maintain commutation synchronization, to pre-scale the encoder input to support a wider variety of feedback devices, and
to provide velocity-based phase advance for smoother and more efficient high speed operation.
-oSelecting Single Phase Output for the POSYS®
Selecting single-phase output with the POSYS®
To operate a brushed single phase motor with the POSYS®, the command SetNumberPhases is used for the POSYS®
8xx-B and POSYS® 9xx multiple motor cards and SetMotorType for the POSYS® 182x/192x. Additionally the output mode
should be set according the requirements as shown in the following example:
POSYS® 8xx-B/9xx (versions for brushless servo motors)
178
© POSYS Motion Control GmbH & Co.KG, 2013
Command
Description
SetOutputMode
Set the output mode
SetNumberPhases
Set the number of phases to one
POSYS® 182x/192x
Command
Description
SetMotorType
Set the output mode
-oCommutation Waveforms
Commutation Waveforms
The POSYS® supports two commutation waveforms, a 120 degree offset waveform appropriate for 3-phase brushless
motors, and a 90-degree offset waveform appropriate for 2-phase brushless motors. To specify the 3-phase brushless
waveform the command SetNumberPhases 3 is used, and to set it for 2-phase brushless motors the command
SetNumberPhases 2 is used or for the POSYS® 18xx/19xx the command Set/GetMotorType is used.
Depending on the waveform selected, as well as the motor output mode selected (PWM or DAC16), either 2 or 3
commutated output signals per axis will be provided by the controller. The following chart shows this.
Waveform
Motor output mode
Number of output
signals & name
3-phase
PWM5050
3 (A, B, C )
3-phase
PWMSign/Mag
2 (A, B)
3-phase
DAC 16
2 (A, B)
2-phase
PWM5050
2 (A, B)
2-phase
PWMSign/Mag
2 (A, B)
2-phase
DAC 16
2 (A, B)
The diagram below shows the phase A, B, and C commutation signals for a 3-phase brushless motor, and the phase A and
phase B signals for a 2-phase brushless motor.
179
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetNumberPhases, Set/GetMotorType
-oCommutation Parameters
Commutation Parameters
To perform sinusoidal commutation it is necessary to specify the number of encoder counts per electrical cycle. To
determine this value the number of electrical cycles of the motor, along with the number of encoder counts per motor
revolution must be known. Knowing these two quantities the number of encoder counts per electrical cycle is given by the
following equation:
C ounts_per_cycle = Counts_per_rot/Electrical_cycles
where:
C ounts_per_rot is the number of encoder counts per motor rotation
Electrical_cycles is the number of motor electrical cycles
The number of electrical cycles can normally be determined by examining the motor manufacturer’s specification. The
number of electrical cycles is usually half the number of poles. Care should be taken not to confuse poles with pole pairs.
The command used to set the number of encoder counts per electrical cycle is SetPhaseCounts. To read back this value use
the command GetPhaseCounts.
-oIndex Pulse Referencing
Index Pulse Referencing
To enhance long term commutation reliability the POSYS® provides the ability to utilize an index pulse input from the
motor encoder as a reference point during commutation. By using an index pulse during the phase calculations any long
term loss of encoder counts which might otherwise affect the accuracy of the commutation are automatically eliminated.
180
© POSYS Motion Control GmbH & Co.KG, 2013
To utilize index pulse referencing the motor encoder chosen must provide an index pulse signal to the controller once per
rotation. This index pulse is connected to the controller using the Index signal of the I/O chip.
Index pulse referencing is recommended for all rotary brushless motors with quadrature encoders. For linear brushless
motors it is generally not used, although it can be used as long as the index pulses are arranged so that each pulse occurs
at the same phase angle within the commutation cycle.
When using an index pulse the number of encoder counts per electrical cycle is not required to be an exact integer. In the
case that this value is not an integer, the nearest integer should be chosen.
C onversely, if index pulses are not being used then the number of counts per electrical cycle must be an exact integer,
with no remainder.
For example if a 6-pole brushless motor is to be used with an encoder without an index pulse than an encoder with 1200
counts per rotation would be an appropriate choice, but an encoder with 1024 would not because 1024 cannot be divided
by 3 evenly.
The command Set/GetPhaseCorrectionMode is used to enable/disable index pulse phase correction.
Index pulse referencing is performed automatically by the controller, regardless of the initialization scheme used
(algorithmic, Hall-based, microstepping, or direct set).
-oCommutation Error Detection
Commutation Error Detection
With an index signal properly installed the controller will automatically correct any small losses of encoder counts that may
occur.
If the loss of encoder counts becomes excessive however, or if the index pulse does not arrive at the expected location
within the commutation cycle, a "commutation error" is said to occur. The commutation error bit (11) in the Event Status
Register is set whenever a commutation error occurs.
This bit is set if the required correction is greater than (PhaseCounts/128)+4. Commutation errors are caused by a number
of circumstances. The most common are listed below:



noise on the A or B encoder lines
noise on the index line
incorrect setting of encoder counts per electrical cycle
For each instance that a commutation error occurs phase referencing will not occur for that index pulse. Depending on the
cause of the error the commutation error may be a one-time event, or may occur continuously after the first event.
When a commutation error occurs bit #11 of the Event Status Register word is set high (1). This condition can also be used
as a source of host interrupts so the host can be automatically notified of a commutation error. To recover from a
commutation error this bit is cleared by the host, however depending on the nature of the error it is possible that
commutation errors will continue to be generated.
A commutation error may indicate a serious problem with the motion system, potentially resulting in unsafe
motion. It is the responsibility of the host to determine and correct the cause of commutation errors.
-oPhase Initialization
Phase Initialization
After startup the controller must determine the proper commutation angle of the motor relative to the encoder position.
This information is determined using a procedure called phase initialization.
181
© POSYS Motion Control GmbH & Co.KG, 2013
The controller provides four methods to perform phase initialization; algorithmic, Hall Sensor-based, microstepping, and
direct-set.
Algorithmic Phase Initialization
To set the controller for algorithmic initialization use the command SetPhaseInitializeMode and specify Algorithmic as the
parameter.
In the algorithmic initialization mode no additional motor sensors beyond the position encoder are required. To determine
the phasing the controller performs a sequence that briefly stimulates the motor windings, and sets the initial phasing
using the observed motor response. From the resulting motion the controller can automatically determine the correct
motor phasing.
Depending on the size and speed of the motor, the time between the start of motor phasing and the motor coming to a
complete rest (settling time) will vary. To accommodate these differences the amount of time to wait for the motor to
settle is programmable using the command SetPhaseInitializeTime. To read back this value use the command
GetPhaseInitializeTime.
To minimize the impact on the system mechanics this method utilizes a motor command value set by the host processor to
determine the overall amount of power to "inject" into the motor during phase initialization Typically, the amount of power
to inject should be in the range of 5 - 25 % of full scale output, but in any case should be at least 3 times the breakaway
starting friction. For best results the initialization motor command value can be determined experimentally. The command
used to set the motor output level is SetMotorCommand. To read back this value use the command GetMotorCommand.
To execute the initialization procedure, the host command InitializePhase is used. Upon executing this command, the
phasing procedure will immediately be executed.
Before the phase initialization command is given however (InitializePhase), the motor must be turned off (SetMotorMode
command), a motor command output must be specified (SetMotorCommand)and an initialization duration must be
specified (SetPhaseInitializeTime).
During algorithmic phase initialization the motor may move suddenly in either direction.
Proper safety precautions should be taken to prevent damage from this movement. In addition, to provide
accurate results motor movement must be unobstructed in both directions and must not experience excessive
starting friction.
Hall-Based Phase Initialization
To set the controller for Hall-based initialization use the command SetPhaseInitializeMode and specify Hall-based as the
parameter.
In this mode 3 Hall-Sensor signals are used to initially determine the motor phasing, and sinusoidal commutation begins
automatically after the motor has moved through one full rotation.
The Hall-Sensor signals are fed back to the controller through the signals Hall1A-C (axis #1) and Hall2A-C (axis #2), etc.
C are should be taken to connect these sensors properly. To read the current status of the hall sensors use the command
GetSignalStatus.
The following diagram shows the relationship between the state of the three Hall sensor inputs for each axis and the
commutated motor outputs. This graph shows the expected Hall sensor states and winding excitation for forward motion
(increasing position).
182
© POSYS Motion Control GmbH & Co.KG, 2013
Unlike the algorithmic method, using Hall-based phase initialization no special motor setup procedures is required.
Initialization is performed using the command InitializePhase, and occurs immediately, without any motor motion.
To accommodate varying types of Hall sensors, or sensors that contain inverter circuitry, the signal level/logic
interpretation of the Hall sensor input signals can be set through the host.
The command SetSignalSense accepts a bit-programmed word that controls whether the incoming Hall signals are
interpreted as active high or active low. To read back this Hall interpretation value use the command GetSignalSense.
Hall-based initialization should only be used with a 3-phase commutation waveform, and with Hall sensors
located 120 degrees apart. Hall-sensors located 60 degrees apart should not be used.
Microstepping Phase Initialization
If the location of the index pulse in relation to the motor rotor and case is known then it may be advantageous to use an
initialization technique which operates the motor as a microstepper, rotating the motor until the index pulse is found, and
then setting the phase angle explicitly.
This scheme is only appropriate for motors which have the index pulse in a fixed and repeatable location within the
commutation cycle for all of the motors to be used during manufacturing of the product. Although this is relatively
uncommon, it is typical for motors with optical Hall-sensors which use a single disk containing the A, B, index, and Hall
sensor information.
To set the controller for microstepping operation the command SetCommutationMode Microstepping is used. To restore the
controller for encoder-based commutation the command SetCommutationMode Sinusoidal is used. Once the index pulse is
encountered the phase angle can be set using the command SetPhaseAngle.
To operate the motor in microstepping mode the motor must be set on (SetMotorMode) and a motor output value must be
provided (SetMotorCommand). In addition the number of encoder counts per electrical cycle should be set to 512.
When in microstepping mode each trajectory count corresponds to 1/256 of a full electrical cycle.
For example using a 4-pole motor (2 electrical cycles per motor rotation) a trajectory move of 512 counts will move the
motor 1 full motor rotation.
Special care should be taken when initializing the motor using the microstepping method. Because the motor
is operated open-loop the resultant coil energization and subsequent rotation may be jerky and abrupt.
Phase initialization using the microstepping method should only be used under special circumstances.
It is not generally recommended unless the algorithmic or Hall-based methods cannot be used.
Direct-Set Phase Initialization
If, after power-up, the location of the motor phasing is known explicitly the phase angle can simply be set directly using
the SetPhaseAngle command.
This typically occurs when sensors such as resolvers are used where the returned motor position information is absolute in
nature (not incremental), and can be used to generate a quadrature data stream as well as be read by the host directly.
183
© POSYS Motion Control GmbH & Co.KG, 2013
-oPhase Initialization Programming
Phase Initialization Programming
The following examples show typical host command sequences to initialize the commutation of a brushless motor for all
four initialization methods.
Algorithmic Initialization Sequence
Command
Description
SetOutputMode m
Set the output mode
SetNumberPhasesp
Set the number of phases or the
Motor Type depending on the type of controller
SetPhaseC ountsuuuu
Set # of encoder counts per electrical cycle.
SetPhaseInitializeModeAlgorithmic
Set phase initialization method to algorithmic.
SetMotorMode Off
Turn motor off so it doesn't conflict with initialization procedure.
SetPhaseInitializeTimewwww
Set algorithmic phase init duration.
SetMotorC ommandyyyy
Set initialization motor command level.
InitializePhase
Perform the initialization.
This sequence will cause the motor to immediately begin the initialization procedure, which will last wwww servo loops
long. To determine if the procedure is completed, the command GetActivityStatus can be used. The 'phase initialization’ bit
will indicate when the procedure is finished. After the initialization procedure is completed the motor should be enabled (
SetMotorMode On) if the controller is to be run in closed loop mode.
Hall-based Initialization Sequence
Command
Description
SetOutputMode m
Set the output mode
SetNumberPhasesp
Set the number of phases or the
Motor Type depending on the type of controller
SetPhaseC ountsuuuu
Set # of encoder counts per electrical cycle.
SetSignalSensevvvv
Set Hall sensor signal interpretation.
SetPhaseInitializeMode
Hall Set phase initialization method to hall based.
InitializePhase
Perform the initialization.
This sequence will cause the controller to read the Hall sensor signals and initialize the phasing immediately. The motor will
not move as a result of this sequence, and no delay is required for further motor operations to be performed.
Microstepping Initialization Sequence
Command
Description
SetOutputMode m
Set the output mode
SetNumberPhasesp
Set the number of phases or the
Motor Type depending on the type of controller
SetPhaseC ounts512
Set # of encoder counts per electrical cycle.
SetC ommutationModeMicrostepping
Set controller for microstepping mode.
SetC aptureSourceIndex
Set capture mode to index (not necessary if already so set).
ResetEventStatus0
C lear axis status.
GetC aptureValue
C lear out any previous captures.
SetMotorMode On
Turn motor on (not necessary if already on).
SetMotorC ommandxxxx
Set motor command value.
SetPosition 560
Set rotation distance a bit more than 1 full motor rotation (assuming
4-pole motor).
SetVelocity yyyy
Set velocity.
184
© POSYS Motion Control GmbH & Co.KG, 2013
Command
Description
SetAccelerationzzzz
Set acceleration.
Update
Start the motion.
This sequence will cause the motor to make a move of somewhat more than 1 rotation. After the Update the host should
poll the status word (GetEventStatus) until a capture occurs and then immediately send a SetPhaseAngle command,
followed by a SetPhaseOffset command, each loaded with the phase angle required to initialize the phasing.
See the following section of this manual entitled "Adjusting the commutation angle" for more information on determining
the correct phase set value.
Once the SetPhaseAngle and SetPhaseOffset commands have been sent by the host the controller should be initialized for
normal commutation operation. This means the phasing mode should be set to encoder-based (SetCommutationMode
Sinusoidal) and the correct # of encoder counts per electrical cycle should be set SetPhaseCounts.
Direct-Set Initialization Sequence
Command
Description
SetOutputMode m
Set the output mode
SetNumberPhasesp
Set the number of phases or the
Motor Type depending on the type of controller
SetPhaseC ountsxxxx
Set the number of encoder counts per electrical cycle (hex).
SetPhaseAngleyyyy
Set phase angle based on information from external sensor.
This sequence will directly set the phase angle to a value determined by another sensor. The set value must be between 0
and the number of encoder counts per electrical cycle.
-oAdjusting the Commutation Angle
Adjusting The Commutation Angle
The POSYS® supports the ability to change the motor's commutation angle directly, both when the motor is stationary and
when it is in motion. Although this is not generally required it can be useful during testing, or during commutation
initialization when the microstepping or direct-set methods are used.
To change the commutation angle when the motor is stationary use the command SetPhaseAngle.
To change the commutation angle while the motor is moving the index pulse is required, and a different command
SetPhaseOffset is used which only takes effect when an index pulse occurs. The following description provides some
background on this function.
After phase initialization has occurred the correct commutation angle is stored by the controller as the offset from the
index mark (in encoder counts) to the phase A maximum output value (commutation zero location). This 16-bit offset
register can be read using the command GetPhaseOffset.
The following chart shows the relationship between the phase A commutation zero location, the index location, and the
phase offset value. For a given motor the index pulse shown in this figure could have been located anywhere within the
phase cycle since it will usually vary in position from motor to motor. Only motors that have been mechanically assembled
such that the index position is referenced to the motor windings will have a consistent index position relative to the
commutation zero location.
185
© POSYS Motion Control GmbH & Co.KG, 2013
Before phase initialization has occurred the phase offset register will have a value of ffff (hex). Once phase initialization has
occurred and the motor has been rotated such that at least one index pulse has been received, the phase offset value will
be stored as a positive number with a value between 0 and the number of encoder counts per electrical cycle.
To convert the phase offset value, which is in encoder counts, to degrees, the following expression can be used:
Offsetdegrees = 360 * Offsetcounts/counts_per_cycle
where:
Offsetdegrees is the phase offset in degrees
Offsetcounts is the phase offset in encoder counts
counts_per_cycle is the # of counts per electrical cycle set
using the SetPhaseCounts command
The phase offset value can also be changed any number of times while the motor is in motion, although only relatively
small changes should be made to avoid sudden jumps in the motor motion.
The SetPhaseOffset and GetPhaseOffset commands can only be used when an index pulse from the encoder is connected.
If no index pulse is used the phase offset angle cannot be adjusted or read back by the host.
Setting the phase offset value does not change the relative phasing of phase B and C to phase A. These phases are still set
at either 90 or 120 degree offsets from phase A (depending on the waveform chosen).
-oEncoder Pre-Scalar
Encoder Pre-Scalar
Particularly when used with linear motors, the range in the value of the # of encoder counts per electrical cycle can vary
widely. Typical rotary motors can have a value between 1 and 32,767. Linear brushless motors however can have values of
1,000,000 counts per cycle or higher because they often use high accuracy laser-based encoders.
To accommodate this large range the POSYS® brushless servo series controllers support a prescalar function which, for the
purposes of commutation calculations, divides the incoming encoder counts by 64. With the prescalar enabled the max
range for the number of encoder counts per electrical cycle is 2,097,088.
To enable the prescalar use the command SetPhasePrescale On. To disable the prescalar use the command
SetPhasePrescale Off.
The prescalar function only affects the commutation of the controller. It does not affect the position used during servo
filtering or requested by the command GetActualPosition.
The prescalar function should not be enabled or disabled once the motor has been put in motion.
-oMotor Output Configuration
186
© POSYS Motion Control GmbH & Co.KG, 2013
Motor Output Configuration
The POSYS® controllers supports up to four motor output methods, PWM and DAC (up to 16 bit resolution), microstepping
and Pulse & Direction (Set/GetOutputMode).
Below is shown a typical amplifier configuration for a 3-phase brushless motor using the PWM output mode:
In this configuration the controller outputs 3 phased PWM magnitude signals per axis. These signals are then fed directly
into 3 half-bridge type voltage amplifiers.
Below is shown a typical amplifier configuration for a 3-phase brushless motor using the DAC output mode:
When using DAC output mode the digital word provided by the controller must first be converted into a voltage using an
external DAC. Two DAC channels are required per axis. To construct the third phase for a brushless motor (C phase) the
sum of the A and B signals must be 'negated' using C = -(A+B).
This is usually accomplished with an Op-amp circuit. In addition, if current loop control is desired the three output signals
are usually arranged so that the sum of the currents flowing through the windings of the motor are zero.
Motor Output Signal Interpretation
The following graph shows the desired output voltage waveform for a single phase.
187
© POSYS Motion Control GmbH & Co.KG, 2013
The waveform is centered around a value of 0 volts. The magnitude of the generated waveform is proportional to either
the output of the servo filter or the motor command register (depending on the commutation mode and motor on/off
status).
For example if the controller is connected to a DAC with output range of -10 Volts to +10 Volts and the controller is set to
open loop mode with a motor command value of 32,767 (which is the maximum allowed value) than as the motor rotates
through a full electrical cycle, a sinusoidal waveform centered at 0 volts will be output with a minimum voltage of -10 and a
maximum voltage of +10.
PWM Decoding
The PWM output mode also outputs a sinusoidal desired voltage waveform for each phase; however, the method by which
these signals encode the voltage differ substantially from the DAC16 digital word. The PWM output mode uses a single
signal per output motor phase. This signal contains a pulse-width encoded representation of the desired voltage. In this
encoding the duty cycle of the waveform determines the desired voltage. The PWM cycle has a frequency of 20 kHz, with a
resolution of 10 bits, or 1/1,024.
The following chart shows the encoding:
An output pulse width of 0 parts per 1,024 represents the maximum negative voltage, an output pulse width of 512 per
1,024 (50 %) represents a voltage of 0, and a pulse width of 1,024 per 1,024 represents the maximum positive voltage.
This PWM scheme has been chosen to allow convenient interfacing to half bridge type amplifiers by connecting the PWM
output to a level shifter circuit, and using this output to drive the high and low side drivers of the bridge.
Set/GetNumberPhases, Set/GetMotorType
-o-
188
© POSYS Motion Control GmbH & Co.KG, 2013
Open Loop Stepper Control
Overview; Open Loop Stepper Control
Overview; Open Loop Stepper Control
This chapter describes the open loop stepper control features of the POSYS® controllers.
All of these controllers contain circuitry for encoder feedback that can be used for detecting a stall in the motion of the
attached motor in addition to output circuitry designed for stepper motor control.
The beginning of this chapter discusses the common stepper features of the POSYS®, with the output mechanisms specific
to each motor mode (stepper or microstepping) being discussed in the second and third sections of the chapter.
-oTrajectory Control Units
Trajectory control units
For the POSYS® stepping products, all units for trajectory control are steps for the POSYS® in stepper mode and
micro-steps for the POSYS® in microstep mode. In the servo products all units are in encoder counts. The table below
shows the commands and the appropriate units.
Command
Servo
Microstep
Step
Set/GetPosition
counts
micro-steps
steps
Set/GetVelocity
counts/cycle
micro-steps/cycle
steps/cycle
Set/GetAcceleration
counts/cycle²
micro-steps/cycle²
steps/cycle²
Set/GetDeceleration
counts/cycle²
micro-steps/cycle²
steps/cycle²
Set/GetJerk
counts/cycle³
micro-steps/cycle³
steps/cycle³
Set/GetStartVelocity
-
micro-steps/cycle
steps/cycle
GetC ommandedPosition
counts
micro-steps
Steps
GetC ommandedVelocity
counts/cycle
micro-steps/cycle
steps/cycle
GetC ommandedAcceleration
counts/cycle²
micro-steps/cycle²
steps/cycle²
Set/GetPositionErrorLimit
counts
micro-steps
Steps
GetPositionError
counts
micro-steps
steps
-oEncoder Feedback
Encoder feedback
The POSYS® stepping controllers include support for an incremental encoder, or position data presented as a parallel word
on the data bus. On power-up or after a Reset instruction, the encoder source (GetEncoderSource) is set to none, making
the encoder feedback optional. In this mode, the encoder position is ignored by the controller. The current actual position
is retrieved using the command GetActualPosition.
The SetActualPosition command can be used to set the current actual position to a programmed value. The default units of
this command are encoder counts. To simplify program design and debugging, actual position units can be changed to
steps/micro-steps. This is done using the command SetActualPositionUnits. The table below shows the commands that are
affected by:
189
© POSYS Motion Control GmbH & Co.KG, 2013
Command
Position Units = counts
Position Units = steps
Set/GetActualPosition
counts
steps/micro-steps
AdjustActualPosition
counts
steps/micro-steps
GetC aptureValue
counts
steps/micro-steps
-oStall Detection
Stall Detection
In addition to passively returning position to the host with the GetActualPosition command, the POSYS® controller can
actively monitor the target and actual position and detect a motion error that results in a stall condition. Automatic stall
detection allows the controller to detect when the step motor has lost steps during a motion. This typically occurs when the
motor encounters an obstruction, or otherwise exceeds its rated torque specification.
Automatic stall detection operates continuously once it is initiated. The current desired position (commanded position) is
compared with the actual position (from the encoder) and if the difference between these two values exceeds a specified
limit a stall condition is detected. The user programmed register SetPositionErrorLimit determines the threshold at which a
motion error is generated.
To initiate automatic stall detection the host must specify the number of encoder counts per output step/micro-step. This is
accomplished using the command SetEncoderToStepRatio This command accepts two parameters, the first parameter is
the number of encoder counts per motor rotation and the second parameter is the number of steps/micro-steps per motor
rotation.
Parameter
Format
Word size
Range
Encoder counts per rev
16.0
16 bits
0 to 32,767
Steps/micro-steps per rev
16.0
16 bits
0 to 32,767
For example if a step motor with 1.8 degree full step size is used with an encoder which has 4,000 counts per motor
rotation, the parameters used would be
SetEncoderToStepRatio 4000 200
where the number of steps per rotation is derived from 360/1.8.
If the same motor and encoder are used with the POSYS® microstepper versions and the number of micro-steps per full
step is set to 64, then the parameters would be
SetEncoderToStepRatio 4000 12800
where the number of steps per rotation is derived from (360/1.8)*64.
In cases where the number of steps, micro-steps or encoder counts per rotation exceeds the allowed maximum of 32767,
the parameters can be specified as a fractions of a rotation as long as the ratio is maintained accurately. So in the above
example, the ratio could also be represented as
SetEncoderToStepRatio 2000 6400
indicating the ratio for half a revolution. Specifying the ratio for a fraction of a rotation is just as accurate as specifying it
for a full rotation.
A typical sequence for enabling stall detection is shown below.
Commands
Description
SetEncoderSource Incremental
Set the source for encoder position feedback
SetEncoderToStepRatio 4096 200
Set the ratio between the steps/micro-steps and the encoder
190
© POSYS Motion Control GmbH & Co.KG, 2013
Commands
Description
counts per revolution
SetPositionErrorLimit
Set the desired error window in units of steps/micro-steps
C learPositionError
Zero any existing position error
Update
Send buffered commands to motion processor
SetAutoStopMode On
Enables stopping the motor when a motion error is detected
At the moment a motion error occurs, several events occur simultaneously. The Motion Error bit of the event status word is
set. If automatic stop on motion error is enabled the motor is set off, which has the effect of disabling the trajectory
generator.
-oPulse & Direction Signal Generation
Pulse & Direction Signal Generation
For each axis two signals are provided which determine the desired axis position at any given moment. These two signals
are the pulse signal, and the direction signal.
The pulse signal output by the controller consists of a precisely controlled series of individual pulses each of which
represents a desired increment of movement. This signal is always output as a square wave pulse train (50 % duty cycle
regardless of pulse rate). By default, a step, or pulse, is considered to have occurred when the pulse signal transitions from
a high to a low output value. Inverting this logic is discussed later in this chapter. The direction signal is synchronized with
the pulse signal at the moment each pulse transition occurs. The direction signal is encoded such that a high value
indicates a positive direction pulse, and a low value indicates a negative direction pulse.
The POSYS® stepper controllers supports separate pulse rate modes using the command SetStepRange The table below
shows the values and resultant step ranges available using this command.
Command
Frequency range of output pulses
SetStepRange 1
0 to 4.98 M steps per second
SetStepRange 4
0 to 622.5 K steps per second
SetStepRange 6
0 to 155.625 K steps per second
SetStepRange 8
0 to 38.90625 K steps per second
The ranges above show the maximum and minimum ranges that can be generated by the controller for the specified mode.
So, for example, if the desired maximum step rate is 200 K steps per second, then the appropriate setting is SetStepRange
4.
For full-step and half-step applications, as well as pulse and direction applications which will have a maximum velocity of ~
38 ksteps/sec, SetStepRange 8 should be used. For applications which require pulse rates higher than 48 ksteps/sec the
191
© POSYS Motion Control GmbH & Co.KG, 2013
higher speed ranges should be used.
A different step range can be set for each axis. To read back the current step range setting, use the GetStepRange
command.
The pulse counter is designed such that a step occurs when the pulse signal transitions from high to low. Systems that use
step motor amplifiers that interpret a pulse as a low to high transition should use the command SetSignalSense to set the
step logic to this mode. Refer to the Programmer’s Reference for information on SetSignalSense.
-oPulse Generation Control
Pulse Generation Control
The rate of pulse output is usually determined by the particular trajectory profile parameters being requested by the host
processor. In addition to the trajectory profile however there is separate method of enabling and disabling pulse
generation. This method is known as motor control and provides an on/off pulse generator control mechanism.
The command to enable pulse output is SetMotorMode ON and the command to disable pulse generation is SetMotorMode
OFF. SetMotorMode OFF causes the trajectory generator to immediately discontinue further pulse generation until a
SetMotorMode ON command is given. As long as the motor is in the off state any further trajectory commands will have no
effect until the motor is turned on.
The current motor status (on or off) can be read back using GetMotorMode.
If the motor is turned on by the host (Command SetMotorMode ON) the motor will stay at rest until a new trajectory move
is loaded and initiated, if will not restart motion if a trajectory was previously programmed.
-oAtRest Indicator
AtRest Indicator
In addition to the standard pulse and direction output signals the POSYS® stepper controllers provide an additional output
for each axis known as the AtRest signal which indicates when the trajectory generator is in motion. This signal can be
useful when interfacing with amplifiers that support a separate torque output level for the stepper during motion as when
the motor is not moving (holding).
This feature is enabled and operational automatically at all times. It does not need to be enabled by the host processor.
-o-
192
© POSYS Motion Control GmbH & Co.KG, 2013
Microstep Sine/Cosine Motor Command Output
DAC & PWM Motor Output (POSYS® Microstepping Mode only)
DAC and PWM Motor Output (POSYS® microstepping only)
The POSYS® microstepping series of controllers support two motor output methods, PWM and DAC. The motor output
method is host-selectable. The method can be selected individually for each axis. The host command to select the output
mode is SetMotorCommand with the parameter specifying the output method. A value of zero sets the output type to DAC
and a value of one sets the output to PWM sign/magnitude.
-oMotor Output Signal Interpretation
Motor Output Signal Interpretation
The diagram below shows typical waveforms for a single output phase of the POSYS®. Each phase has a similar waveform,
although the phase of the B channel output is shifted relative to the A channel output by 90 or 120 degrees (depending on
the waveform selected).
The waveform is centered around an output value of 0. The magnitude of the overall generated waveform is controlled by
the motor command register (SetMotorCommand).
For example if the controller is connected to a DAC with an output range of -10 Volts to + 10 Volts and the controller is set
to a motor command value of 32,767 (which is the maximum allowed value) than as the motor rotates through a full
electrical cycle, a sinusoidal waveform centered at 0 volts will be output with a minimum voltage of - 10, and a maximum
voltage of +10.
-oPMW Decoding
193
© POSYS Motion Control GmbH & Co.KG, 2013
PWM Decoding
The PWM output mode also outputs a sinusoidal desired voltage waveform for each phase, however the method by which
these signals encode the voltage differ substantially from the DAC digital word. The PWM mode uses a magnitude signal
and a sign signal. The magnitude signal encodes the absolute value of the output sinusoid and the sign signal encodes the
polarity of the output, positive or negative. The following diagram shows the magnitude and sign signals for a single output
phase.
In this diagram the PWM magnitude signal has been filtered to convert it from a digital variable duty cycle waveform to an
analog signal.
Before filtering this signal contains a pulse-width encoded representation of the 'analog' desired voltage. In this encoding
the duty cycle of the waveform determines the desired voltage. The PWM cycle has a frequency of 20 kHz, with a
resolution of 10 bits; or 1/1024. or 78 KHz, with a resolution of 8 bits, or 1/256.
-oMicrostepping Waveform Generation
Microstepping Waveform Generation
In addition to trajectory generation the POSYS® microstepping controller provides direct internal generation of
microstepping signals for 2-phase, as well as 3-phase stepper motors.
The following diagram shows an overview of the control flow of the microstepping scheme:
The microstepping portion of the controller generates a sinusoidal waveform with a number of distinct output values per
full step (one full step is one quarter of an electrical cycle). The number of microsteps per full step is set using the
command SetPhaseCounts. The parameter used for this command represents the number of microsteps per electrical cycle
(4 times the desired number of microsteps). So for example, to set 64 microsteps per full step, the command
SetPhaseCounts 256 should be used. The maximum number of microsteps that can generated per full step is 256, giving a
maximum parameter for this command of 1024.
194
© POSYS Motion Control GmbH & Co.KG, 2013
The output frequency of the microstepping signals are controlled by the trajectory generator. The amplitude of the
microstepping signals are controlled using a register that can be set by the host processor known as the motor command
register. Adjustment of this register by the host allows different motor power levels during (for example) motion, and at
rest.
Two microstepping waveforms are provided, one appropriate for traditional 2-phase stepper motors with 90 deg. of
separation between phases, and one appropriate for 3-phase stepper motors and AC Induction motors with 120 deg.
separation between phases. For more information on AC Induction Motor Control see the section entitled AC Induction
Motor Control.
-oMicrostepping Waveforms
Microstepping Waveforms
To specify 2-phase motor waveforms use the command SetNumberPhases 2, and to specify 3-phase motor waveforms use
the command SetNumberPhases 3. This command is only used for the POSYS® 8xx-B and 9xx for microstepping or
multiple motor types.
For the POSYS® 182x/192x the command SetMotorType is used to automatically define the number of Phases used.
Waveform
Motor output mode
Number of output signals & name
2-phase
PWMSign/Mag
2 (A, B)
2-phase
DAC
2 (A, B)
3-phase
PWM50/50
3 (A, B, C )
3-phase
DAC
2 (A, B)
The diagram below shows the phase A, B signals for a 2-phase stepper motor, and the phase A, B and C signals for a
3-phase stepper motor or AC Induction motor.
For 3-phase stepper motors or AC Induction motors, the phase C waveform must be constructed externally using the
expression C = -(A+B). Typically this is performed by the motor amplifier. See the "Motor Output" section for more
information.
-oMotor Command Control
195
© POSYS Motion Control GmbH & Co.KG, 2013
Motor Command Control
The POSYS® microstepping controller provides the ability to set the motor command (power output) level of the stepper
motor. This is often useful to optimize the motor torque, power consumption, and heat generation of the motor while it is
at rest, or in various states of motion.
The motor output level is controlled by the motor command register. This register can be set using SetMotorCommand. A
value between 0 and 32767 is set, representing an amplitude of zero to 100 percent. Since SetMotorCommand is double
buffered, it requires an Update or a breakpoint to occur before it takes effect. This feature can be used to advantage when
it is desired that the motor power changes be synchronized with other profile changes such as at the start or the end of a
move.
C hanging the power level does not affect the microstepping output phasing or the frequency of the output waveform, it
simply adjusts the magnitude of the waveform.
-oAC Induction Motor Control
AC Induction Motor Control
The POSYS® microstepping controller can be used as the basis of a variable speed 3-phase AC Induction motor controller.
In this mode the controller is set for a 3-phase waveform, and is operated as if it were a stepper motor. The position of the
motor is not precisely maintained, however the velocity of the AC Induction motor can typically be controlled to within 10 20 percent. Such a controller can be used for spindles, and other motors where velocity control, not positioning is required.
When running an AC Induction motor using variable speed control care should be taken that the output drive signal should
never have a frequency of 0. Even if the motor is not rotating the drive frequency should have at least some rotational
frequency. This is because a relative difference in the frequency of the drive signals and the motor rotor (called the slip
frequency) is required to avoid magnetic field saturation at rest, a potentially damaging condition.
Using the POSYS® microstepping controller, up to four, two or one AC Induction motor can be controlled. The output drive
configuration is the same as for 3-phase steppers shown in the 'Motor Output Configuration' section.
The POSYS® in microstepping mode does not provide Flux Vector Control of AC Induction Motors, only
variable speed control. Therefore the POSYS® in microstepping mode should not be used in AC Induction
applications involving precision positioning.
-oCommand Summary
Command Summary
The following table summarizes the commands that are used in conjunction with microstepping signal generation:
Commands
F unction
Set/GetOutputMode
Sets the output to either PWM or DAC
Set/GetNumberPhases
,
Set/GetMotorType
Sets the number of motor phases
Set/GetMotorC ommand
Sets the amplitude of the output waveform. This is a buffer command
and requires an Update
Set/GetPhaseC ounts
Sets the number of microsteps per electrical cycle of the motor
Before the controller will generate any motor output, the motor command value must be set and the
appropriate output mode and number of phases must be set.
-o-
196
© POSYS Motion Control GmbH & Co.KG, 2013
Motor Drive Configurations
Motor Drive Configurations
Shown below is a typical amplifier configuration for a 2-phase stepper motor using either the PWM or DAC output mode.
Using the DAC output mode the digital motor output word for each phase is typically converted into a DC signal with a
value between -10 to +10 volts. This signal can then be input into an off-the-shelf DC-Servo type amplifier (one amplifier
for each phase) or into any other linear or switching amplifier that performs current control and provides a bipolar,
two-lead output.
In this scheme each amplifier drives one phase of the stepper motor, with the controller generating the required sinusoidal
waveforms in each phase to perform smooth, accurate motion.
If the controller’s PWM output mode is used the PWM magnitude and sign signals are typically connected to an
H-bridge-type device. For maximum performance, current control should be performed by the amplifier. This minimizes the
coil current distortion due to inductance and back-EMF. Although there are several methods that can be used to achieve
current control with the PWM output mode, a common method is to pass the PWM magnitude signal through a low pass
filter, thereby creating an analog reference signal which can be directly compared with the current through the coil.
Several single-chip amplifiers are available which are compatible with these input signals. These amplifiers require an
analog reference input (low-passed PMWMag signal from controller) as well as a sign bit (PWMSign signal from controller).
The amplifier in-turn performs current control typically, using a fixed-off time PWM drive scheme.
The diagram below shows this amplifier scheme:
Relative to the DAC output method the PWM output mode when used with this amplifier scheme has the advantage of high
performance with a minimum of external parts.
Below is shown a typical amplifier configuration using the POSYS® microstepper in DAC mode for a 3-phase stepper or for
an AC Induction motor with 3 phases.
197
© POSYS Motion Control GmbH & Co.KG, 2013
When using DAC output mode the digital word provided by the controller must first be converted into a voltage using an
external DAC. Two DAC channels are required per axis. The third phase is constructed externally using the expression C =
-(A+B). This is usually accomplished with an Op-amp circuit.
For additional information, or for technical assistance, please contact servo-Halbeck GmbH & Co.KG (
www.servo-halbeck.com) at +49 9158 1612, or e-mail us: [email protected]
-o-
198
© POSYS Motion Control GmbH & Co.KG, 2013
Programmer's Manual
How to use this manual
Instruction Reference
How to use this reference
IMPORTANT: For the PCI-based cards (POSYS 900 and 1900 series), we recommend the new software package based on
the new motion controller driver and C/C++ code (available as source code). Please also use therein Help for using the
new software. This software is suitable for both 32-bit and 64-bit Windows operating systems (Windows 8 has not been
tested).
The previously provided software for the motion controller 900 and 1900 series (and soon POSYS 800-B, 1800-B and 1800
cards) is already or will soon be available only on request. The following documentation is not valid for the new software.
This document is in two parts: first, a detailed description of all host instructions, and second, a set of summary tables
listing the instructions by functional group, and alphabetically by instruction mnemonic.
In the reference section, instructions are arranged alphabetically, except that all Set/Get pairs (for example, SetVelocity
and GetVelocity) are described together. Each description begins on a new page; most occupy no more than a page. The
page is organized as follows:
Name
The instruction mnemonic is shown at the left.
Syntax
The instruction mnemonic and its required arguments are shown with all arguments separated by
spaces.
Motor Ty pes
The motor types to which this command applies. Supported motor types are printed in black,
unsupported motor types for the command are blanked out.
Arguments
There are two types of arguments: encoded-field and numeric.
Encoded-field arguments are packed into a single 16-bit data word, except for axis, which
occupies bits 11-8 of the instruction word. The Name of the argument is that shown in the generic
syntax. Instance is the mnemonic used to represent the data value. Encoding is the value assigned
to the field for that instance.
For numeric arguments, the parameter Value, the Type (signed or unsigned integer) and Range of
acceptable values are given. Numeric arguments may require one or two data words. For 32-bit
arguments, the high-order part is transmitted first.
Buffered
C ertain parameters and other data written to the motion IC are buffered. That is, they are not
acted upon until the next Update or MultiUpdate command is executed. These parameters are
identified by the word buffered in the instruction heading.
Description
Describes what the instruction does and any special information relating to the instruction.
Restrictions
Describes the circumstances in which the instruction is not valid, that is, when it should not be
issued. For example, velocity, acceleration, deceleration, and jerk parameters may not be issued
while an S-curve profile is being executed.
API
The syntax of the Delphi, C ++ or VB function call in the POSYS® DLL that implements this motion
processor command.
see
Refers to related instructions.
-o-
199
© POSYS Motion Control GmbH & Co.KG, 2013
Commands
200
© POSYS Motion Control GmbH & Co.KG, 2013
List of available commands
POSYS® Functions and Procedures
MotionScript® requires for the parameters the type DOUBLE and if a value is returned it is also returned as a DOUBLE.
By default all numeric MotionScript® variables are of the type DOUBLE, in fact that is the only numeric type
Card Initialization & Addressing
Procedure InitializePOSYS(cardAddress0, cardAddress1:word);stdcall;
Function OpenDevice(base_IO:word;base_MEM, MEM_range:DWORD):P1800_HANDLE;stdcall; //only valid for POSYS 1800
equipped with Dual Port RAM
Function OpenDevice:word;
Function C loseDevice(hPosys :integer) :integer;stdcall;
Function DetectPosysDevices:word;stdcall;
Function RegisteredPosysDevices:word;stdcall;
Breakpoints & Interrupts
Procedure C learInterrupt(hPosys:Thandle);stdcall;
Function GetInterruptAxis(hPosys:Thandle):word;stdcall;
Procedure SetBreakpoint(hPosys:Thandle;axis,breakpoint,sourceAxis,action,trigger:word);stdcall;
Function GetBreakpoint(hPosys:Thandle;axis,breakpoint:word):word;stdcall;
Procedure SetBreakpointValue(hPosys:Thandle;axis,breakpoint:word;value:integer);stdcall;
Function GetBreakpointValue(hPosys:Thandle;axis,breakpoint:word):integer;stdcall;
Procedure SetBreakpointUpdateMask(hPosys:Thandle;axis,breakpointID,mask:word);stdcall;
Function GetBreakpointUpdateMask(hPosys;Thandle;axis,breakpointID:word):word;stdcall;
Procedure SetInterruptMask(hPosys:Thandle;axis,interruptMask:word);stdcall;
Function GetInterruptMask(hPosys:Thandle;axis:word):word;stdcall;
Commutation
Function GetPhaseCommand(hPosys:Thandle;axis:word):integer;stdcall;
Procedure InitializePhase(hPosys:Thandle;axis:word);stdcall;
Procedure SetCommutationMode(hPosys:Thandle;axis,mode:word);stdcall;
Function GetCommutationMode(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetNumberPhases(hPosys:Thandle;axis,phases:word);stdcall;
Function GetNumberPhases(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetPhaseAngle(hPosys:Thandle;axis,angle:word);stdcall;
Function GetPhaseAngle(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetPhaseCorrectionMode(hPosys:Thandle;axis,mode:word);stdcall;
Function GetPhaseCorrectionMode(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetPhaseCounts(hPosys:Thandle;axis,count:word);stdcall;
Function GetPhaseCounts(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetPhaseInitializeMode(hPosys:Thandle;axis,mode:word);stdcall;
Function GetPhaseInitializeMode(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetPhaseInitializeTime(hPosys:Thandle;axis,time:word);stdcall;
Function GetPhaseInitializeTime(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetPhaseOffset(hPosys:Thandle;axis,offset:word);stdcall;
Function GetPhaseOffset(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetPhasePrescale(hPosys:Thandle;axis,mode:word);stdcall;
Function GetPhasePrescale(hPosys:Thandle;axis:word):word;stdcall;
Digital Servo Filter
Procedure C learPositionError(hPosys:Thandle;axis:word);stdcall;
Procedure DACOutputsOff(hPosys:Thandle);stdcall;
Procedure DACOutputsOn(hPosys:Thandle);stdcall;
Function GetAmpEnable(hPosys:Thandle;ampID:word):word;stdcall;
Function GetDerivative(hPosys:Thandle;axis:word):word;stdcall;
Function GetIntegral(hPosys:Thandle;axis:word):integer;stdcall;
Function GetPositionError(hPosys:Thandle;axis:word):integer;stdcall;
Procedure SetAmpDisable(hPosys :integer; disable :word);stdcall;
Procedure SetAmpEnable(hPosys :integer; enable :word);stdcall;
Procedure SetAutoStopMode(hPosys:Thandle;axis,mode:word);stdcall;
Function GetAutoStopMode(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetBiQuadCoefficient(hPosys:Thandle;axis,coefficientID,filterID,value:word);stdcall;
Function GetBiQuadCoefficient(hPosys:Thandle,axis:word);stdcall;
Procedure SetDerivativeTime(hPosys:Thandle;axis,time:word);stdcall;
Function GetDerivativeTime(hPosys:Thandle;axis:word):word;stdcall;
201
© POSYS Motion Control GmbH & Co.KG, 2013
Procedure SetIntegrationLimit(hPosys:Thandle;axis:word;limit:integer);stdcall;
Function GetIntegrationLimit(hPosys:Thandle;axis:word):integer;stdcall;
Procedure SetKaff(hPosys:Thandle;axis,Kaff:word);stdcall;
Function GetKaff(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetKd(hPosys:Thandle;axis,Kd:word);stdcall;
Function GetKd(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetKi(hPosys:Thandle;axis,Ki:word);stdcall;
Function GetKi(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetKp(hPosys:Thandle;axis,Kp:word);stdcall;
Function GetKp(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetKout(hPosys:Thandle;axis,Kout:word);stdcall;
Function GetKout(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetKvff(hPosys:Thandle;axis,Kvff:word);stdcall;
Function GetKvff(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetMotorBias(hPosys:Thandle;axis,bias:word);stdcall;
Function GetMotorBias(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetMotorLimit(hPosys:Thandle;axis,limit:word);stdcall;
Function GetMotorLimit(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetPositionErrorLimit(hPosys:Thandle;axis:word;limit:integer);stdcall;
Function GetPositionErrorLimit(hPosys:Thandle;axis:word):integer;stdcall;
Piezo (Ceramic) Motor Functions
Procedure SetpzOffsetPos(hPosys:Thandle;axis:word;offset:word);stdcall;external DLL;
Function GetpzOffsetPos(hPosys:Thandle;axis:word):word;stdcall;external DLL;
Procedure SetpzOffsetNeg(hPosys:Thandle;axis:word;offset:word);stdcall;external DLL;
Function GetpzOffsetNeg(hPosys:Thandle;axis:word):word;stdcall;external DLL;
Procedure SetpzIntLimitStl(hPosys:Thandle;axis:word;limit:longword);stdcall;external DLL;
Function GetpzIntLimitStl(hPosys:Thandle;axis:word):longword;stdcall;external DLL;
Procedure SetpzWindow(hPosys:Thandle;axis:word;window:word);stdcall;external DLL;
Function GetpzWindow(hPosys:Thandle;axis:word):word;stdcall;external DLL;
Procedure SetpzKp(hPosys:Thandle;axis:word;kp:word);stdcall;external DLL;
Function GetpzKp(hPosys:Thandle;axis:word):word;stdcall;external DLL;
Procedure SetpzKi(hPosys:Thandle;axis:word;ki:word);stdcall;external DLL;
Function GetpzKi(hPosys:Thandle;axis:word):word;stdcall;external DLL;
Procedure SetpzKd(hPosys:Thandle;axis:word;kd:word);stdcall;external DLL;
Function GetpzKd(hPosys:Thandle;axis:word):word;stdcall;external DLL;
Procedure SetpzKvff(hPosys:Thandle;axis:word;kvff:word);stdcall;external DLL;
Function GetpzKvff(hPosys:Thandle;axis:word):word;stdcall;external DLL;
Procedure SetpzKaff(hPosys:Thandle;axis:word;kaff:word);stdcall;external DLL;
Function GetpzKaff(hPosys:Thandle;axis:word):word;stdcall;external DLL;
Procedure SetpzIntLim(hPosys:Thandle;axis:word;intlim:longword);stdcall;external DLL;
Function GetpzIntLim(hPosys:Thandle;axis:word):longword;stdcall;external DLL;
Procedure SetpzKdPeriod(hPosys:Thandle;axis:word;kdperiod:word);stdcall;external DLL;
Function GetpzKdPeriod(hPosys:Thandle;axis:word):word;stdcall;external DLL;
Procedure SetpzWindow2(hPosys:Thandle;axis:word;window2:word);stdcall;external DLL;
Function GetpzWindow2(hPosys:Thandle;axis:word):word;stdcall;external DLL;
Procedure SetpzKvff2(hPosys:Thandle;axis:word;kvff2:word);stdcall;external DLL;
Function GetpzKvff2(hPosys:Thandle;axis:word):word;stdcall;external DLL;
Encoder
Procedure AdjustActualPosition(hPosys:Thandle;axis:word;position:integer);stdcall;
Function GetAbsoluteSSIPosition(hPosys:Thandle;axisID:word):integer;stdcall;
Function GetActualVelocity(hPosys:Thandle;axis:word):integer;stdcall;
Function GetCaptureValue(hPosys:Thandle;axis:word):integer;stdcall;
Function GetSSIVersion(hPosys:Thandle):word;stdcall;
Procedure WriteSSIRegister(hPosys:Thandle;axisID:word; resolution, frequency:word);stdcall;
Procedure ReadSSIRegister(hPosys:Thandle;axisID:word;var resolution:word;var frequency:word);stdcall;
Procedure WriteSSIResolution(hPosys:Thandle;axisID:word;var resolution:word);stdcall;
Procedure ReadSSIResolution(hPosys:Thandle;axisID:word;var resolution:word);stdcall;
Procedure WriteSSIFrequency(hPosys:Thandle;axisID:word;var resolution:word);stdcall;
Procedure ReadSSIFrequency(hPosys:Thandle;axisID:word;var resolution:word);stdcall;
Procedure ResetSSI(hPosys:Thandle);stdcall;
Procedure SetActualToAbsolutePosition(hPosys:Thandle;axisID:word);stdcall;
Procedure SetActualPosition(hPosys:Thandle;axis:word;pos:integer);stdcall;
Function GetActualPosition(hPosys:Thandle;axis:word):integer;stdcall;
Procedure SetActualPositionUnits(hPosys:Thandle;axis,mode:word);stdcall;
Function GetActualPositionUnits(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetAuxiliaryEncoderSource(hPosys:Thandle;axis,mode,auxiliaryAxis:word);stdcall;
Function GetAuxiliaryEncoderSource(hPosys:Thandle;axis:word);stdcall;
Procedure SetCaptureSource(hPosys:Thandle;axis,source:word);stdcall;
Function GetCaptureSource(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetEncoderModulus(hPosys:Thandle;axis,modulus:word);stdcall;
202
© POSYS Motion Control GmbH & Co.KG, 2013
Function GetEncoderModulus(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetEncoderSource(hPosys:Thandle;axis,source:word);stdcall;
Function GetEncoderSource(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetEncoderToStepRatio(hPosys:Thandle;axis,encodercounts,steps:word);stdcall;
Function GetEncoderToStepRatio(hPosys:Thandle;axis:word):integer;stdcall;
On-Board RAM
Procedure EnableDPRam(hPosys:P1800_Handle);stdcall; //only valid for POSYS® 1800 series equipped with Dual Port
RAM
Procedure DisableDPRam(hPosys:P1800_Handle);stdcall; //only valid for POSYS® 1800 series equipped with Dual Port
RAM
Function ReadBuffer(hPosys:Thandle;bufferID:word):integer;stdcall;
Procedure SetBufferFunction(hPosys:Thandle;axis:word;funct:integer;bufferID:word);stdcall;
Function GetBufferFunction(hPosys:Thandle;axis:word;funct:word):word;stdcall;
Procedure SetBufferLength(hPosys:Thandle;bufferID:word;length:integer);stdcall;
Function GetBufferLength(hPosys:Thandle;bufferID:word):integer;stdcall;
Procedure SetBufferReadIndex(hPosys:Thandle;bufferID:word;index:integer);stdcall;
Function GetBufferReadIndex(hPosys:Thandle;bufferID:word):integer;stdcall;
Procedure SetBufferStart(hPosys:Thandle;bufferID:word;address:integer);stdcall;
Function GetBufferStart(hPosys:Thandle;bufferID:word):integer;stdcall;
Procedure SetBufferWriteIndex(hPosys:Thandle;bufferID:word;index:integer);stdcall;
Function GetBufferWriteIndex(hPosys:Thandle;bufferID:word):integer;stdcall;
Procedure WriteBuffer(hPosys:Thandle;bufferID:word;value:integer);stdcall;
Function ReadDPRamLong(hPosys:Thandle;offset:dword):integer;stdcall;
Procedure WriteDPRamLong(hPosys:Thandle;offset:dword;value:dword);stdcall;
Motor Output
Function GetCurrentMotorCommand(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetMotorCommand(hPosys:Thandle;axis,value:word);stdcall;
Function GetMotorCommand(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetMotorMode(hPosys:Thandle;axis,mode:word);stdcall;
Function GetMotorMode(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetMotorType(hPosys:Thandle;axis:word):word;stdcall;
Function GetMotorType(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetOutputMode(hPosys:Thandle;axis,mode:word);stdcall;
Function GetOutputMode(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetPWMFrequency(hPosys:Thandle;axis,frequency:word);stdcall;
Function GetPWMFrequency(hPosys:Thandle;axis:word);stdcall;
Procedure SetStepRange(hPosys:Thandle;axis,frequency:word);stdcall;
Function GetStepRange(hPosys:Thandle;axis:word):word;stdcall;
Profile Generation
Function GetCommandedAcceleration(hPosys:Thandle;axis:word):integer;stdcall;
Function GetCommandedPosition(hPosys:Thandle;axis:word):integer;stdcall;
Function GetCommandedVelocity(hPosys:Thandle;axis:word):integer;stdcall;
Procedure MultiUpdate(hPosys:Thandle;mask:word);stdcall;
Procedure SetAcceleration(hPosys:Thandle;axis:word;accel:integer);stdcall;
Function GetAcceleration(hPosys:Thandle;axis:word):integer;stdcall;
Procedure SetDeceleration(hPosys:Thandle;axis:word;deceleration:integer);stdcall;
Function GetDeceleration(hPosys:Thandle;axis:word):integer;stdcall;
Procedure SetGearMaster(hPosys:Thandle;axis,masterAxis,source:word);stdcall;
Function GetGearMaster(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetGearRatio(hPosys:Thandle;slaveAxis:word;ratio:integer);stdcall;
Function GetGearRatio(hPosys:Thandle;slaveAxis:word):integer;stdcall;
Procedure SetJerk(hPosys:Thandle;axis:word;jerk:integer);stdcall;
Function GetJerk(hPosys:Thandle;axis:word):integer;stdcall;
Procedure SetPosition(hPosys:Thandle;axis:word;position:integer);stdcall;
Function GetPosition(hPosys:Thandle;axis:word):integer;stdcall;
Procedure SetProfileMode(hPosys:Thandle;axis,mode:word);stdcall;
Function GetProfileMode(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetStartVelocity(hPosys:Thandle;axis:word;velocity:integer);stdcall;
Function GetStartVelocity(hPosys:Thandle;axis:word):integer;stdcall;
Procedure SetStop(hPosys:Thandle;axis,mode:word);stdcall;
Function GetStop(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetStopMode(hPosys:Thandle;axis,mode:word);stdcall;
Function GetStopMode(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetVelocity(hPosys:Thandle;axis:word;velocity:integer);stdcall;
Function GetVelocity(hPosys:Thandle;axis:word):integer;stdcall;
Procedure Up_date(hPosys:Thandle;axis:word);stdcall;
203
© POSYS Motion Control GmbH & Co.KG, 2013
Procedure Update(hPosys:Thandle;axis:word);stdcall;
Servo Loop Control
Function GetTime(hPosys:Thandle):integer;stdcall;
Procedure SetAxisMode(hPosys:Thandle;axis,mode:word);stdcall;
Function GetAxisMode(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetLimitSwitchMode(hPosys:Thandle;axis,mode:word);stdcall;
Function GetLimitSwitchMode(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetMotionCompleteMode(hPosys:Thandle;axis,mode:word);stdcall;
Function GetMotionCompleteMode(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetSampleTime(hPosys:Thandle;time:word);stdcall;
Function GetSampleTime(hPosys:Thandle):word;stdcall;
Procedure SetSettleTime(hPosys:Thandle;axis,time:word);stdcall;
Function GetSettleTime(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetSettleWindow(hPosys:Thandle;axis,window:word);stdcall;
Function GetSettleWindow(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetTrackingWindow(hPosys:Thandle;axis,window:word);stdcall;
Function GetTrackingWindow(hPosys:Thandle;axis:word):word;stdcall;
Status Registers and AxisOut Indicator
Function GetActivityStatus(hPosys:Thandle;axis:word):word;stdcall;
Function GetAxis_In_Out_Home(hPosys:Thandle;statID:word):word;stdcall;
Function GetEventStatus(hPosys:Thandle;axis:word):word;stdcall;
Function GetSignalStatus(hPosys:Thandle;axis:word):word;stdcall;
Procedure ResetEventStatus(hPosys:Thandle;axis,mask:word);stdcall;
Procedure SetAxisOutSource(hPosys:Thandle;axis:word;sourceAxis,bit,reg:word);stdcall;
Function GetAxisOutSource(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetSignalSense(hPosys:Thandle;axis,mask:word);stdcall;
Function GetSignalSense(hPosys:Thandle;axis:word):word;stdcall;
Traces
Function GetTraceCount(hPosys:Thandle):integer;stdcall;
Function GetTraceStatus(hPosys:Thandle):word;stdcall;
Procedure SetTraceMode(hPosys:Thandle;mode:word);stdcall;
Function GetTraceMode(hPosys:Thandle):word;stdcall;
Procedure SetTracePeriod(hPosys:Thandle;period:word);stdcall;
Function GetTracePeriod(hPosys:Thandle):word;stdcall;
Procedure SetTraceStart(hPosys:Thandle;triggerAxis,condition,triggerBit,triggerState:word);stdcall;
Function GetTraceStart(hPosys:Thandle):word;stdcall;
Procedure SetTraceStop(hPosys:Thandle;triggerAxis,condition,triggerBit,triggerState:word);stdcall;
Function GetTraceStop(hPosys:Thandle):word;stdcall;
Procedure SetTraceVariable(hPosys:Thandle;variableNumber,traceAxis,variable:word);stdcall;
Function GetTraceVariable(hPosys:Thandle;variableNumber:word):word;stdcall;
Miscellaneous (Controller Reset, Communication Mode aso)
# Function EnableIO(deviceNo, portCount:word):word (no longer needed with new driver Windriver)
Function GetChecksum(hPosys);stdcall;
Function GetHostIOError(hPosys:Thandle):word;stdcall;
Function GetProcessorStatus(hPosys:Thandle):word;stdcall;
Function Get_Version(hPosys:Thandle):integer;stdcall;
Function GetVersion(hPosys:Thandle):integer;stdcall;
Procedure HardReset(hPosys:Thandle);stdcall;
Procedure MCReset(hPosys:Thandle);stdcall;
Procedure NoOperation(hPosys:Thandle);stdcall;
Function PortInW(hPosys:Thandle;address:word):word;stdcall;
Procedure PortOutW(hPosys:Thandle;address,outword:word);stdcall;
Procedure PortOutB(hPosys:Thandle;address:word;value:byte);stdcall;
Function ReadAnalog(hPosys:Thandle;portID:word):word;stdcall;
Function ReadIO(hPosys:Thandle;ioID:word):word;stdcall;
Function ReadPLD(hPosys:Thandle;pld_adr:word):word;stdcall;
Procedure SoftReset(hPosys:Thandle);stdcall;
Procedure SetCANMode(hPosys:mask);stdcall;
Function GetCANMode(hPosys);stdcall;
Procedure SetDiagnosticPortMode(hPosys:Thandle;mode:word);stdcall;
Function GetDiagnosticPortMode(hPosys:Thandle):word;stdcall;
Procedure SetSerialPort(hPosys:Thandle;baudrate,parity,stopbits,protocol,mdaddress:word);stdcall;
Function GetSerialPort(hPosys:Thandle):word;stdcall;
Procedure SetSerialPortMode(hPosys:Thandle;baudrate,parity,stopbits,protocol,mdaddress:word);stdcall;
204
© POSYS Motion Control GmbH & Co.KG, 2013
Function GetSerialPortMode(hPosys:Thandle):word;stdcall;
Procedure SetSynchronizationMode(hPosys:Thandle;mode:word);stdcall;
Function GetSynchronizationMode(hPosys:Thandle):word;stdcall;
Procedure SetWatchDog(hPosys:Thandle;watchdog_adr:word;watchdog_value:word);stdcall;
Procedure WriteIO(hPosys:Thandle;ioID,data:word);stdcall;
Additional MotionScript® Functions
Procedure
Procedure
Procedure
Procedure
Procedure
Procedure
BitReset(hPosys:Thandle;testVar,bitToReset:integer);stdcall;
BitSet(hPosys:Thandle;testVar,bitToReset:integer);stdcall;
BitTest(hPosys:Thandle;testVar,bitToReset:integer);stdcall;
C ompareActivity(hPosys:Thandle;axis:word;mask:integer);stdcall;
C ompareEvent(hPosys:Thandle;axis:word;mask:integer);stdcall;
C ompareSignal(hPosys:Thandle;axis:word;mask:integer);stdcall;
-o-
Card Initializing and Addressing
205
© POSYS Motion Control GmbH & Co.KG, 2013
InitializePOSYS
InitializePOSYS
only valid for ISA-Bus and PC/104 cards (POSYS® 7xx, 8xx, 8xx-B and 18xx)
only valid with Kithara Driver (no longer supported)
Syntax
InitializePOSYS(hPosys, cardAddress) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
Pulse & Direction
Type
card address
Description
unsigned 16 bits
Range
512-1016
Scaling
none
InitializePOSYS initializes the address space that the motion control card occupies in the IO space
of your computer. The cardAddress must correspond to the address set on the motion control
card. This corresponds to the base address of the card and a call to InitializePOSYS(cardAddress)
will set the command, data and hardware reset addresses. No other motion control card or other
peripheral device should be within this address space (cardAddress + 7 bytes). If more than one
card is installed then there must be 8 bytes between the address of card 1 and card 2. Assuming
card 1 is at address 768 (300 H) then card 2 could be at address 776 (308H).
If more than one card is installed it is necessary to switch address space by calling
InitializePOSYS(cardAddress1) or InitializePOSYS(cardAddress2) for example before sending
commands to the motion control cards.
Restriction
This command is only valid for the POSYS
® ISA and PC /104 cards.
The only restrictions that apply are related to the available address space for the particular
computer configuration. Theoretically it is possible to also use the address space below 512 as
long as there is no conflict with other devices or system calls to those addresses.
see
OpenDevice/CloseDevice
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
InitializePOSYS(hPosys#, cardAddress)
hPosys# is the value returned by a call to EnableIO
-o-
206
© POSYS Motion Control GmbH & Co.KG, 2013
OpenDevice/CloseDevice
OpenDevice
CloseDevice
Syntax
OpenDevice(deviceNumber) stdcall
for PCI-Bus
OpenDevice(base_IO;base_MEM;MEM_range) stdcall
for POSYS® 1800 w/
Dual Port RAM (PC-104
bus)
OpenDevice(base_IO) stdcall
for POSYS® 700/
800/800-B/1800 (ISA
& PC-104 bus; 1800 w/
Single Port RAM)
C loseDevice(hPosys) stdcall
for all cards
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
PCI: deviceNumber
Pulse & Direction
no limitation (1 -)
ISA/PC-104:
Returned Data
base_IO
unsigned 16 Bit
512 - 1024
base_MEM
unsigned 32 Bit
B0000 to EFFFF
MEM_range
unsigned 32 Bit
16k x 16 (32768 KB) or other sizes for custom
purposes possible
PCI: returns a 32 Bit handle "hPosys which was opened with the card instance "deviceNumber"
ISA/PC-104: reserves the addressed area for the ISA-bus based cards (ISA & PC/104). In
addition the POSYS® 1800 has two possibilities:
1.) if equipped with Dual Port RAM three parameters, 1 for the base_IO address, 1 for the
base_MEM and 1 for the MEM_range are defined and if available are reserved
2.) if equipped with Single Port RAM only 1 parameter is needed for reserving and addressing the
base_IO address. For more information on how to use and address the Dual Port RAM equipped
POSYS® 1800 cards please look-up section "Usage of the On-Board Dual Port RAM with POSYS®
1800".
Description
OpenDevice
PCI: opens an instance of the POSYS® PC I driver and returns the handle hPosys to the motion
control card.
ISA/PC104: starts the driver. In addition for the POSYS® 1800 the base MEM-address and the
MEM_range are defined.
C loseDevice(hPosys) closes the device driver of the appropriate card in the system
and frees
resources. No values returned.
(hPosys) indicates the device that should be opened (only PCI) or closed (PCI, ISA/PC-104).
Restriction
The number of supported cards is only dependent from the amount of available slots. The driver is
theorically capable of addressing an unlimited amount of instances.
For the POSYS® 1800 two possibilities exist to address the card. for Dual PORT RAM equipped
cards both methods can be used whereas the second method as described before allows the use
of Dual Port RAM only in Single Port RAM mode. Cards equipped with Single Port RAM must not be
addressed with the base_MEM and MEM_range parameters as this simply does not function.
see
PortInOutW, DetectPosysDevices, RegisteredPosysDevices
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
OpenDevice(deviceNumber)
for PCI cards only
OpenDevice(base_IO;base_MEM;MEM_range)
for POSYS® 1800 only
w/ Dual Port RAM
OpenDevice(base_IO)
for POSYS®
700/800/800-B/
1800 w/ Single Port
RAM
C loseDevice(hPosys#)
for all cards
207
© POSYS Motion Control GmbH & Co.KG, 2013
-o-
208
© POSYS Motion Control GmbH & Co.KG, 2013
DetectPosysDevices
DetectPosysDevices
only valid for POSYS® PCI cards (POSYS® 900/1900)
Syntax
DetectPosysDevices stdcall
Motor type
DC Brush
Arguments
none
Result
Returns the number of found POSYS® PCI Motion Controllers. None were found if 0 is returned.
Description
DetectPosysDevices searches for all POSYS® PCI motion controllers. All PCI-busses are
queried.
Returned Data
Returns a number between 0 and 16.
DC Brushless
Microstepping
Pulse & Direction
Returns the number of found POSYS® PCI motion controllers. No POSYS® PCI motion controllers
were located if 0 is returned.
Restriction
The driver supports a maximum of 15 POSYS® PC I motion controllers and reports them as 1 - 16
see
OpenDevice/CloseDevice, RegisteredPosysDevices
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
DetectPosysDevices()
//no Parameters
-o-
209
© POSYS Motion Control GmbH & Co.KG, 2013
RegisteredPosysDevices
RegisteredPosysDevices
only valid for POSYS® ISA/PC-104 cards (POSYS® 7xx/8xx/8xx-B/18xx)
Syntax
RegisteredPosysDevices stdcall
Motor type
DC Brush
Arguments
none
Returned Data
Returns a number between 0 and 16.
DC Brushless
Microstepping
Pulse & Direction
Returns the number of found POSYS® ISA/PC-104 motion controllers. No POSYS® ISA/PC-104
motion controllers were located if 0 is returned.
Description
RegisteredPosy sDev ices
will find all registered POSYS® ISA/PC -104motion controllers.
All cards registered using POSYSDriverXSetup will be found.
Restriction
The driver supports a maximum of 16 POSYS® ISA/PC -104 motion controllers and reports them
as 1 - 16.
POSYS® controllers (ISA-Bus and PC /104) must have been registered in the registry using the
utility program POSYSDriverXSetup
see
OpenDevice/CloseDevice
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
RegisteredPosysDevices()
POSYS® controllers (ISA-Bus and PC /104) must have been registered in the registry using the utility program
POSYSDriverXSetup.
-o-
210
© POSYS Motion Control GmbH & Co.KG, 2013
Breakpoints und Interrupts
ClearInterrupt
ClearInterrupt
Syntax
C learInterrupt(hPosys) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Description
Pulse & Direction
ClearInterruptresets the HostInterrupt signal to its inactive state. If interrupts are still pending,
the HostInterrupt line will return to its active state within one cycle. It is used after an interrupt
has been recognized and processed by the host. This command does not affect the Event Status
Register. If this command is executed when no interrupts are pending it has no effect.
When communicating using C AN, this command resets the interrupt message sent flag. When an
interrupt is triggered on an axis, a single interrupt message is sent and no further messages will
be sent by that axis until this command is issued.
When serial or parallel communication is used, the axis number is not used.
Restriction
see
GetInterruptAxis, Set/GetInterruptMask, ResetEventStatus
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
C learInterrupt(hPosys#)
-o-
211
© POSYS Motion Control GmbH & Co.KG, 2013
GetInterruptAxis
GetInterruptAxis
Syntax
GetInterruptAxis(hPosys) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
CardHandle
value returned by call to OpenDevice
Name
Instance
Encoding
axis
None
Axis1mask
Axis2mask
Axis3mask
Axis4mask
0
1
2
4
8
Returned Data
Description
GetInterruptAxis returns a field which identifies all axes with pending interrupts. Axis
numbers are assigned to the low-order four bits of the returned word; bits
corresponding to interrupting axes are set to 1. If the host interrupt signal has not been
set, the returned word is 0. If any axis has a pending interrupt, the HostInterrupt signal
will be in an active state.
Restriction
see
ClearInterrupt, Set/GetInterruptMask
DLL: Delphi, C++, Refer to the various import files (imp*.*)
VB
MotionScript®
language calling
convention
Pulse & Direction
GetInterruptAxis(hPosys#)
-o-
212
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetBreakpoint
SetBreakpoint
GetBreakpoint
Some options are dependent on the firmware used. For POSYS® 1800/1900 if equipped
with Motion Control Chipset >< V2.x. These are marked with an "*".
Syntax
SetBreakpoint(hPosys, axis, breakpoint, sourceAxis, action, trigger) stdcall
GetBreakpoint(hPosys, axis, breakpoint) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
breakpointID
Breakpoint 1
Breakpoint 2
0
1
sourceAxis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
action
(none)
Update
AbruptStop
SmoothStop
Motor Off **
Disable Position Loop & Higher Modules *
n/a
Disable Motior Output & Higher Modules *
Abrupt Stop with Position Error Clear *
0
1
2
3
4
5
6
7
8
trigger
(none)
GreaterOrEqualCommandedPosition
LesserOrEqualCommandedPosition
GreaterOrEqualActualPosition
LesserOrEqualActualPosition
C ommandedPositionCrossed
ActualPositionCrossed
Time
EventStatus
ActivityStatus
SignalStatus
Drive Status *
0
1
2
3
4
5
6
7
8
9
Ah
Bh
Description
Pulse & Direction
SetBreakpointestablishes a breakpoint for the specified axis to be triggered by a condition or
event on sourceAxis, which may be the same as or different from axis. Up to two concurrent
breakpoints can be set for each axis, each of which may have its own breakpoint type and
comparison value. The breakpoint field specifies which breakpoint the SetBreakpoint and
GetBreakpoint commands will address.
The six Position breakpoints and the Time breakpoint are threshold-triggered; the breakpoint
occurs when the indicated value reaches or crosses a threshold. The Status breakpoints are
level-triggered; the breakpoint occurs when a specific bit or combination of bits in the indicated
status register changes state. Thresholds and bit specifications are both set by the
SetBreakpointValue instruction.
action determines what the POSYS® does when the breakpoint occurs, as follows:
Action
Resultant command sequence
None
Update
AbruptStop
SmoothStop
MotorOff **
Disable Position Loop &
no action
Update axis
SetStop axis, AbruptStop, Update axis
SetStop axis, SmoothStop, Update axis
SetMotorMode axis, Off, Update axis
Deactivates Trajectory Generator & higher modules
213
© POSYS Motion Control GmbH & Co.KG, 2013
Higher Modules *
Disable Motor Output & Deactivates all modules incl. motor command output & higher modules
Higher Modules *
Abrupt Stop with
Abrupt Stop of the Trajectory Generator and Position Error cleared
Position Error Clear *
axis is the axis for which the breakpoint has been set.
GetBreakpoint returns the condition, axis, and action for the specified breakpoint (1 or 2) of the
indicated axis. When a breakpoint occurs the trigger value will be reset to none. The
C ommandedPositionC rossed and the ActualPositionC rossed triggers are converted to one of the
position trigger types 1-4 depending on the current position when the command is issued.
Two completely separate breakpoints are supported, each of which may have its own breakpoint
type and comparison value. The breakpoint field specifies which breakpoint the SetBreakpoint and
GetBreakpoint commands will address.
Restriction
Before setting a new breakpoint condition (SetBreakpoint command) ALWAYS load the comparison
value first (SetBreakpointValue command). This is because as soon as the breakpoint condition is
set the POSYS® will start using the breakpoint value register, and if it is not yet defined the
breakpoint will not behave as expected.
* with asterisk marked options for action and trigger are only available on POSYS® 1800/1900
with firmware vers. >2.x.
** with 2 asterisk marked options for action are only available for POSYS® 800-B, 900, 1800 and
1900. For POSYS® 1800/1900 this option is restricted to versions with firmware <2.x.
see
Set/GetBreakpointValue, Set/GetBreakpointUpdateMask
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetBreakpoint(hPosys#, axis, breakpoint, sourceAxis, action, trigger)
GetBreakpoint(hPosys#, axis, breakpoint)
-o-
214
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetBreakpointUpdateMask
SetBreakpointUpdateMask
GetBreakpointUpdateMask
only valid for POSYS® 1800/1900 with firmware version >2.x
Syntax
SetBreakpointUpdateMask(hPosys, axis, breakpointID, mask) stdcall
GetBreakpointUpdateMask(hPosys, axis, breakpointID) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
Wert zurückgeliefert durch Aufruf von
OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
breakpointID
Breakpoint 1
Breakpoint 2
0
1
mask
unsigned 16 bits
bitmask
Description
Pulse & Direction
SetBreakpointUpdateMask
configures what loops are updated upon the Update action of a
breakpoint. If the bitmask for a given loop is set in the mask, the operating parameters for that
loop will be updated from the buffered values when the breakpoint is hit, and Update is the
breakpoint action. Each breakpoint has its own Update Mask. The bitmask encoding is given
below.
Name
Bit(s)
Description
Trajectory
0
Set to 1 to update trajectory from buffered
parameters.
Position Loop
1
Set to 1 to update position loop from buffered
parameters.
Reserved
2-15
For example, if the Update Mask for breakpoint 1 is set to hexadecimal 0001h, and the action for
breakpoint 1 is set to Update, the trajectory for the given axis will be updated from its buffered
parameters when breakpoint 1 is hit.
GetBreakpointUpdateMask
gets the Update Mask for the indicated breakpoint.
Restriction
see
Set/GetBreakpoint, Set/GetUpdateMask
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetBreakpointUpdateMask(hPosys#, axis, breakpointID, mask)
GetBreakpointUpdateMask(hPosys#, axis, breakpointID)
-o-
215
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetBreakpointValue
SetBreakpointValue
GetBreakpointValue
Syntax
SetBreakpointValue(hPosys, axis, breakpoint, value) stdcall
GetBreakpointValue(hPosys, axis, breakpoint) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
breakpoint
Breakpoint 1
Breakpoint 2
0
1
value
Description
Pulse & Direction
see below
SetBreakpointValuesets the breakpoint comparison value for the specified axis. For the position
and time breakpoints this is a threshold comparison value.
The value parameter is interpreted according to the trigger condition for the selected breakpoint.
The data format for each trigger condition is as follows:
Breakpoint Trigger
Value Type
Range
Units
GreaterOrEqualCommandedPosition
signed 32 bit
31
31
-2
to 2 -1
counts
LesserOrEqualCommandedPosition
signed 32 bit
31
31
-2
to 2 -1
counts
GreaterOrEqualActualPosition
signed 32 bit
31
31
-2
to 2 -1
counts
LesserOrEqualActualPosition
signed 32 bit
31
31
-2
to 2 -1
counts
C ommandedPositionCrossed
signed 32 bit
31
31
-2
to 2 -1
counts
ActualPositionCrossed
signed 32 bit
31
31
-2
to 2 -1
counts
Time
unsigned 32 bit
32
cycles
EventStatus
2 word mask
-
Boolean status values
ActivityStatus
2 word mask
-
Boolean status values
2 word mask
-
Boolean status values
SignalStatus
Description
0 to 2
-1
For level-triggered breakpoints, the high-order part of value is the selection mask, and the
low-order word is the sense mask. For each selection bit that is set to 1, the corresponding bit of
the specified status register is conditioned to cause a breakpoint when it changes state. The
sense-mask bit determines which state causes the break. If it is 1, the corresponding
status-register bit will cause a break when it is set to 1. If it is 0, the status-register bit will cause a
break when it is set to 0.
For example assume it is desired that the breakpoint type will be set to EventStatus and that a
breakpoint should be recognized whenever the motion complete bit (bit 0 of event status register)
is set to 1, or the commutation error bit (bit 11 of event status register) is set to 0. In this situation
the high and low words for value would be high word: 0x801 (hex) and low word: 1.
GetBreakpointValuereturns the current breakpoint value for the specified breakpoint.
Two completely separate breakpoints are supported, each of which may have its own breakpoint
type and comparison value. The breakpoint field specifies which breakpoint the SetBreakpointValue
and GetBreakpointValue commands will address.
Restriction
Always load the breakpoint comparison value (SetBreakpointValue command) before setting a new
breakpoint condition (SetBreakpoint command). Failure to do so will likely result in unexpected
motion IC behavior.
see
Set/GetBreakpoint
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
216
© POSYS Motion Control GmbH & Co.KG, 2013
MotionScript®
language calling
convention
SetBreakpointValue(hPosys#, axis, breakpoint, value)
GetBreakpointValue(hPosys#, axis, breakpoint)
-o-
217
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetInterruptMask
SetInterruptMask
GetInterruptMask
Syntax
SetInterruptMask(hPosys, axis, interruptMask) stdcall
GetInterruptMask(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
InterruptMask
Motion complete
0001h
Wrap-around
0002h
Breakpoint 1
0004h
C apture received
0008h
Motion error
0010h
In positive limit
0020h
In negative limit
0040h
Instruction error
0080h
C ommutation error
0800h
Breakpoint 2
4000h
Description
Pulse & Direction
SetInterruptMaskdetermines which bits in the Event Status register of the specified axis will
cause a host interrupt. For each interrupt mask bit that is set to 1, the corresponding Event Status
register bit will cause an interrupt when that status register bit goes active (is set to 1). Interrupt
mask bits set to 0 will not generate interrupts.
GetInterruptMaskreturns the current mask for the specified axis.
Example: The interrupt mask value 28h will generate an interrupt when either the "in positive
limit" bit or the "capture received" bit of the event status register goes active (set to 1).
POSYS® 18xx/19xx:
SetInterruptMask also controls CAN event notification when using the POSYS® CAN 2.0B
interface. Whenever a host interrupt is activated, a CAN message is generated using message ID
0x180 + nodeID, notifying interested CAN nodes of the change in the Event Status Register.
Restriction
see
C learInterrupt, GetInterruptAxis
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetInterruptMask(hPosys#, axis, interruptMask)
GetInterruptMask(hPosys#, axis)
-o-
218
© POSYS Motion Control GmbH & Co.KG, 2013
Commutation
GetPhaseCommand
GetPhaseCommand
Syntax
GetPhaseCommand(hPosys, axis, phase) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
phase
PhaseA
PhaseB
PhaseC
0
1
2
Name
Type
motor command
signed 16 bits
Returned Data
Range
Scaling
Units
Description
15
15
-2
to 2 -1
100/2
15
% output
GetPhaseCommandreturns the value of the current motor output command for phase A, B, or C
of the specified axis. These are values directly output to the motor after commutation.
Scaling example: If a value of 4,489 is retrieved (EE77h) for a given axis and phase then this
corresponds to 4,489*100/32,767 = -13.7% of full-scale output.
Restriction
PhaseC is only valid when the motor type has been set for a 3-phase commutation.
see
InitializePhase, Set/GetNumberPhases, Set/GetMotorType
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
GetPhaseCommand(hPosys#, axis, phase)
-o-
219
© POSYS Motion Control GmbH & Co.KG, 2013
InitializePhase
InitializePhase
Syntax
InitializePhase(hPosys, axis) stdcall
Motor type
Arguments
DC Brushless
Name
Instance
Encoding
hPosys
cardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Description
InitializePhase initializes the phase angle for the specified axis using the mode (Hall-based or
Algorithmic) specified by the Set/GetPhaseInitializationMode command.
Restriction
Warning: If the phase initialization mode has been set to algorithmic then after this
command is sent the motor can move suddenly in an uncontrolled manner.
see
GetPhaseCommand, Set/GetCommutationMode
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
InitializePhase(hPosys#, axis)
-o-
220
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetCommutationMode
SetCommutationMode
GetCommutationMode
Syntax
SetCommutationMode(hPosys, axis, mode) stdcall
GetCommutationMode(hPosys, axis) stdcall
Motor type
Arguments
Description
DC Brushless
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
mode
sinusoidal
hall-based
microstepping
0
1
2
SetCommutationModesets the phase commutation mode for the specified axis.
When set to sinusoidal, as the motor turns, the encoder input signal is used to calculate the
phase angle. This angle is in turn used to generate sinusoidally varying outputs to each motor
winding.
When set to Hall-basedthe hall effect sensor inputs are used to commutate the motor windings
using a six-step or trapezoidal waveform method.
When set to microsteppingthe output of the trajectory generator is used to calculate the phase
angle. This angle is in turn used to generate sinusoidally varying outputs to each motor phase.
When operating with brushless servo motors either sinusoidal or Hall-based are typically used for
motor commutation.
Microstepping is sometimes used with brushless motors to "manually" move the motor before
phase initialization has occurred. Alternatively, Microstepping can be used step motors or with AC
induction motors where frequency synthesis is all that is required to rotate the motor.
GetCommutationMode returns the current commutation mode.
Restriction
see
Set/GetPhasePrescale, Set/GetPhaseCounts
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetCommutationMode(hPosys#, axis, mode)
GetCommutationMode(hPosys#, axis)
-o-
221
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetNumberPhases
SetNumberPhases
GetNumberPhases
only valid for POSYS® 8xx-B and 9xx
Syntax
SetNumberPhases(hPosys, axis, phase) stdcall
GetNumberPhases(hPosys, axis) stdcall
Motor type
Arguments
Description
DC Brushless
Microstepping
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call toOpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
mode
1Phase
2Phases
3Phases
1
2
3
SetNumberPhasesestablishes the number of phases, 1, 2 or 3, for commutation of the specified
axis.
GetNumberPhases returns the number of phases set for the axis.
Restriction
In PWM Sign/Magnitude output mode, the number of phases can be set to 1 or 2.
In PWM 5050 output mode, the number of phases can be set to 1,2 or 3.
This command is only valid for POSYS® 8xx-B and POSYS® 9xx with internal commutation or
microstepping mode.
see
GetPhaseCommand, InitializePhase, Set/GetPhaseOffset, Set/GetOutputMode
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetNumberPhases(hPosys#, axis, phase)
GetNumberPhases(hPosys#, axis)
-o-
222
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetPhaseAngle
SetPhaseAngle
GetPhaseAngle
Syntax
SetPhaseAngle(hPosys, axis, angle) stdcall
GetPhaseAngle(hPosys, axis) stdcall
Motor type
Arguments
DC Brushless
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Type
angle
Description
unsigned 16 bits
Range
0 to 2
15
-1
Scaling
unity
Units
counts
microsteps
SetPhaseAnglesets the instantaneous commutation angle for the specified
axis.
GetPhaseAnglereturns the value of the current phase angle. To convert counts to an actual
phase angle divide by the number of encoder counts per electrical cycle and multiply by 360.
For example if a value of 500 is retrieved using GetPhaseAngle and the counts per electrical cycle
value has been set to 2,000 (SetPhaseCounts command) this corresponds to an angle of
(500/2,000)*360 = 90 degrees current phase angle position.
Restriction
The specified angle must not exceed the number of counts per electrical cycle set by the
SetPhaseCounts command.
see
Set/GetPhaseCounts, InitializePhase, Set/GetMotorType, Set/GetNumberPhases
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetPhaseAngle(hPosys#, axis, angle)
GetPhaseAngle(hPosys#, axis)
-o-
223
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetPhaseCorrectionMode
SetPhaseCorrectionMode
GetPhaseCorrectionMode
Syntax
SetPhaseCorrectionMode(hPosys, axis, mode) stdcall
GetPhaseCorrectionMode(hPosys, axis) stdcall
Motor type
Arguments
Description
DC Brushless
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
mode
disable
enable
0
1
SetPhaseCorrectionMode
sets the phase correction mode for the specified axis to either 0
(disabled) or 1 (enabled). When phase correction is enabled, the encoder index signal is used to
update the commutation phase angle each motor revolution. This ensures that the commutation
angle will remain correct even if some encoder counts are lost due to electrical noise, or due to the
number of encoder counts/electrical phase not being an integer.
GetPhaseCorrectionMode returns the current phase correction mode.
Restriction
see
GetPhaseCommand, InitializePhase, Set/GetMotorType, Set/GetNumberPhases,
Set/GetPhaseCounts
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetPhaseCorrectionMode(hPosys#, axis, mode)
GetPhaseCorrectionMode(hPosys#, axis)
-o-
224
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetPhaseCounts
SetPhaseCounts
GetPhaseCounts
Syntax
SetPhaseCounts(hPosys, axis, counts) stdcall
GetPhaseCounts(hPosys, axis) stdcall
Motor type
Arguments
DC Brushless
Microstepping
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Type
counts
unsigned 32 bits
POSYS® 18xx/19xx:
Range
1 to 2
15
Scaling
unity
Units
counts
steps
-1
POSYS® 8xx-B/9xx:
Range
Description
0 to 2
15
Scaling
unity
Units
counts
steps
-1
For POSYS® axes configured for DC Brushless motor types,
SetPhaseCountssets the number of
encoder counts per electrical phase of the motor. The number of electrical cycles is equal to 1/2
the number of motor poles. If this value is not an integer then the closest integer value should be
used and phase correction mode should be enabled (See SetPhaseC orrectionMode command).
For POSYS® axes configured for microstepping motor types, the number of microsteps per full
step is set using the commandSetPhaseCounts. The parameter used for this command
represents the number of microsteps per electrical cycle (4 times the desired number of
microsteps). So for example, to set 64 microsteps per full step, the command SetPhaseC ounts 256
should be used. The maximum number of microsteps that can be generated per full step is 256,
giving a maximum parameter for this command of 1024.
GetPhaseCounts returns the number of counts or microsteps per electrical cycle.
Restriction
see
Set/GetPhaseAngle
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetPhaseCounts(hPosys#, axis, counts)
GetPhaseCounts(hPosys#, axis)
-o-
225
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetPhaseInitializeMode
SetPhaseInitializeMode
GetPhaseInitializeMode
Syntax
SetPhaseInitializeMode(hPosys, axis, mode) stdcall
GetPhaseInitializeMode(hPosys, axis) stdcall
Motor type
Arguments
Description
DC Brushless
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
mode
Algorithmic
Hall-based
0
1
SetPhaseInitializeModeestablishes the mode in which the specified axis is to be initialized for
commutation. The options are Algorithmic and Hall-based. In algorithmic mode the chip set briefly
stimulates the motor windings and sets the initial phasing based on the observed motor response.
In Hall-based initialization mode the 3 Hall sensor signals are used to determine the motor phasing.
GetPhaseInitializeMode returns the current initialization mode.
Restriction
Algorithmic mode should only be selected if it is known that the axis is free to move in both
directions, and that a brief uncontrolled move can be tolerated by the motor, mechanism, and load.
see
GetPhaseCommand, InitializePhase, Set/GetMotorType, Set/GetNumberPhases
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetPhaseInitializeMode(hPosys#, axis, mode)
GetPhaseInitializeMode(hPosys#, axis)
-o-
226
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetPhaseInitializeTime
SetPhaseInitializeTime
GetPhaseInitializeTime
Syntax
SetPhaseInitializeTime(hPosys, axis, time) stdcall
GetPhaseInitializeTime(hPosys, axis) stdcall
Motor type
Arguments
DC Brushless
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Type
time
Description
unsigned 16 bits
Range
0 to 2
15
Scaling
unity
Units
cycles
-1
SetPhaseInitializeTimesets the time value (in cycles) to be used during the algorithmic phase
initialization procedure. This value determines the duration of each of the four segments in the
phase initialization algorithm. See the User's guide for more information on algorithmic
initialization.
GetPhaseInitializeTime returns the current phase initialization time.
Restriction
see
GetPhaseCommand, InitializePhase, Set/GetNumberPhases, Set/GetPhaseInitializeMode,
Set/GetMotorType
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetPhaseInitializeTime(hPosys#, axis, time)
GetPhaseInitializeTime(hPosys#, axis)
-o-
227
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetPhaseOffset
SetPhaseOffset
GetPhaseOffset
Syntax
SetPhaseOffset(hPosys, axis, offset) stdcall
GetPhaseOffset(hPosys, axis) stdcall
Motor type
Arguments
DC Brushless
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Type
time
unsigned 16 bits
POSYS® 18xx/19xx:
Range
-1 to 2
Scaling
unity
Units
counts
15
-1
POSYS® 8xx-B/9xx:
Range
Description
0 to 2
15
Scaling
unity
Units
counts
-1
SetPhaseOffsetsets the offset from the index mark of the specified axis to the maximum output
value of phase A. This command will have no immediate effect on the commutation angle but will
have an affect once the index pulse is encountered.
GetPhaseOffsetreturns the current value of the phase offset.
To convert counts to a phase angle in degrees, divide by the number of encoder counts per
electrical cycles and multiply by 360. For example if a value of 500 is specified using
SetPhaseOffset and the counts per electrical cycle value has been set to 2,000 (SetPhaseCounts
command) this corresponds to an angle of (500/2,000)*360 = 90 degrees phase angle at the
index mark.
Restriction
Before the first index capture has occurred GetPhaseOffset will return 65535.
see
GetPhaseCommand, InitializePhase, Set/GetNumberPhases, Set/GetMotorType
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetPhaseOffset(hPosys#, axis, offset)
GetPhaseOffset(hPosys#, axis)
-o-
228
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetPhasePrescale
SetPhasePrescale
GetPhasePrescale
Syntax
SetPhasePrescale(hPosys, axis, scale) stdcall
GetPhasePrescale(hPosys, axis) stdcall
Motor type
Arguments
Description
DC Brushless
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
scale
Off
1/64
1/128
1/256
0
1
2 (only POSYS® 18xx/19xx)
3 (only POSYS® 18xx/19xx)
SetPhasePrescalecontrols scaling of the encoder counts before they are used to calculate a
commutation angle for the specified axis. When operated in the prescale mode the POSYS® can
commutate motors with a high number of counts per electrical cycle, such as motors with very high
accuracy encoders.
SetPhasePrescale Off removes the scale factor.
GetPhasePrescale returns the current scaling mode.
Restriction
see
GetPhaseCommand, InitializePhase, Set/GetNumberPhases, Set/GetMotorType
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetPhasePrescale(hPosys#, axis, scale)
GetPhasePrescale(hPosys#, axis)
-o-
229
© POSYS Motion Control GmbH & Co.KG, 2013
Digital Servo Filter
ClearPositionError
ClearPositionError
Syntax
C learPositionError(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Pulse & Direction
Description
ClearPositionError sets the current profile's commanded position equal to the actual position
(encoder input), thereby clearing the position error for the specified axis. This command can be
used when the axis is at rest, or when it is moving. If it is used when the axis is moving the host
should be aware that the trajectory destination position (used in trapezoidal and s-curve modes) is
not changed by this command.
Restriction
ClearPositionErroris a buffered command. The new value set will not take effect until the next
Update or MultiUpdate instruction is entered.
This command should not be sent while the controller is executing a move using the S-curve profile
mode.
see
GetPositionError, Set/GetPositionErrorLimit, Update, MultiUpdate
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
C learPositionError(hPosys#,axis)
-o-
230
© POSYS Motion Control GmbH & Co.KG, 2013
DACOutputs
DACOutputsOn
DACOutputsOff
Syntax
DACOutputsOn(hPosys) stdcall
DACOutputsOff(hPosys) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
Description
DACOutputsOn turns all ±10V outputs (optical switches) on (ON).
DACOutputsOff turns all ±10V outputs (optical switches) off (OFF).
The outputs are connected to GND. This is the power-on state and the state after a HardReset and
an external Reset.
Restriction
This applies only to the analog motor command outputs. It has no effect on the PWM outputs. The
PWM motor command outputs are connected to different pins.
see
HardReset/MCReset
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
DACOutputsOn(hPosys#)
DACOutputsOff(hPosys#)
-o-
231
© POSYS Motion Control GmbH & Co.KG, 2013
GetAmpEnable
GetAmpEnable
Syntax
GetAmpEnable(hPosys) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
Name
Type
Range
0 - 15
enabled1
enabled2
enabled3
enabled4
none
signed 16 bits
Returned Value
1
2
4
8
0
Returned Data
Description
GetAmpEnable will return the status of the four output lines.
Restriction
see
SetAmpDisable, SetAmpEnable
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
GetAmpEnable(hPosys#)
-o-
232
Pulse & Direction
© POSYS Motion Control GmbH & Co.KG, 2013
GetDerivative
GetDerivative
Syntax
GetDerivative(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Name
Type
derivative
signed 16 bits
Returned Data
Description
Range
15
15
-2
to 2 -1
Scaling
unity
Units
counts/cycle
GetDeriv ativ ereturns the derivative of the current position error as calculated by the servo filter.
The derivative value is defined as the previous position error subtracted from the current position
error.
See SetDerivativeTime for details on setting the derivative sampling time.
Restriction
This value is available only when the POSYS® is in closed-loop operation.
see
GetIntegral, Set/GetDerivativeTime
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
GetDerivative(hPosys#, axis)
-o-
233
© POSYS Motion Control GmbH & Co.KG, 2013
GetIntegral
GetIntegral
Syntax
GetIntegral(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Name
Type
integral
signed 32 bits
Returned Data
Description
Range
31
31
-2
to 2 -1
Scaling
8
1/2
Units
counts*cycle
GetIntegralreturns the current integrated position error of the servo filter for the specified axis.
GetIntegral can be used to monitor loading on the axis, because changes in the axis loading can be
reflected in the value of the integration term.
Scaling example: If a constant position error of 100 counts is present for 256 cycles then the total
accumulated integral value will be 100 (100*256/256). Alternatively a returned value of 1,000
indicates a total stored value of 256,000 counts*cycles (1,000*256).
Restriction
The integrated position error is available only when the POSYS® is in closed-loop mode
(SetMotorMode command).
see
GetDerivative, Set/GetIntegrationLimit, GetPositionError
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
GetIntegral(hPosys#, axis)
-o-
234
© POSYS Motion Control GmbH & Co.KG, 2013
GetPositionError
GetPositionError
Syntax
GetPositionError(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Name
Type
position error
signed 32 bits
Returned Data
Description
Pulse & Direction
Range
31
31
-2
to 2 -1
Scaling
unity
Units
counts
steps
GetPositionErrorreturns the current position error of the specified axis. The error is the
difference between the actual position (encoder position) and the commanded position
(instantaneous output of the trajectory generator).
When used with the motor type set to microstepping, or pulse and direction, the error is defined as
the difference between the encoder position (represented in steps), and the commanded position
(instantaneous output of the trajectory generator).
Restriction
see
Set/GetPosition, Set/GetPositionErrorLimit
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
GetPositionError(hPosys#, axis)
-o-
235
© POSYS Motion Control GmbH & Co.KG, 2013
GetPositionLoopValue
GetPositionLoopValue
only valid for POSYS® 1800/1900 with firmware version >2.x
Syntax
GetPositionLLoop(hPosys, axis, node) stdcall
Motor type
DC Brush
DC Brushless
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
node
Integrator Sum
Integral Contribution
Deivative
Biquad1 Input
Biqaud2 Input
0
1
2
3
4
Type
Range/Scaling
signed 32 bits
see below
Result
value
Description
GetPositionLoopValueis used to find the value of a node in the position loop. Refer to the
product user’s guide for more detail on the location of each
node in the position loop processing.
Though the data returned is signed 32 bits regardless of the node, the range and format varies
depending on thenode, as follows:
Parameter
Range
Scaling
Units
Integrator Sum
31
31-1
-2
to 2
unity
(counts or
microsteps)*cycles
Integral Contribution
31
31-1
-2
to 2
16
100*Kout/(2 )
Derivative
15
15-1
-2
to 2
unity
(counts oder
microsteps)/cycles
Biquad1 Input
15
15-1
-2
to 2
unity
counts or microsteps
Biquad2 Input
15
15-1
-2
to 2
unity
counts or microsteps
Restriction
see
Set/GetPositionLoop
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
GetPositionLoopValue(hPosys#, axis, node)
-o-
236
© POSYS Motion Control GmbH & Co.KG, 2013
SetAmpDisable
SetAmpDisable
Syntax
SetAmpDisable(hPosys, disable) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
disable1
disable2
disable3
disable4
1
2
4
8
Description
Pulse & Direction
SetAmpDisable is used to reset one, any combination or all of the amplifier enable outputs. After
power-on or an external reset or a HardReset command all 4 amplifier enable outputs will be in a
low state. Setting an amplifier output will put it into a high state. The SoftReset command has no
effect on the state of the amplifier enable outputs. The command SetAmpDisable will turn off (put
into a low state) the amplifier enable outputs.
Restriction
see
SetAmpEnable, GetAmpEnable
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetAmpDisable(hPosys#, disable)
-o-
237
© POSYS Motion Control GmbH & Co.KG, 2013
SetAmpEnable
SetAmpEnable
Syntax
SetAmpEnable(hPosys, enable) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
enable1
enable2
enable3
enable4
1
2
4
8
Pulse & Direction
Description
SetAmpEnable is used to set one, any combination or all of the amplifier enable outputs. After
power-on or an external reset or a HardReset command all 4 amplifier enable outputs will be in a
low state. Setting an amplifier output will put it into a high state.
Restriction
The SoftReset command has no effect on the state of the amplifier enable outputs.
see
SetAmpDisable, GetAmpEnable
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetAmpEnable(hPosys#, enable)
-o-
238
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetAutoStopMode
SetAutoStopMode
GetAutoStopMode
Syntax
SetAutoStopMode(hPosys, axis, mode) stdcall
GetAutoStopMode(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
mode
Disable
Enable
0
1
Description
Pulse & Direction
SetAutoStopModedetermines the behavior of the specified axis when a motion error occurs.
When auto stop is enabled (SetAutoStopMode (enable)), the axis goes into open-loop mode when a
motion error occurs. When Auto-Stop is disabled (SetAutoStopMode (disable)), the axis is not
affected by a motion error.
GetAutoStopMode returns the current state of the Auto-Stop mode.
Restriction
When the encoder is set to none (SetEncoderSource none), setting the auto stop mode to Enable
will not stop motion in the event that the position error limit is exceeded.
see
GetEventStatus, Set/GetPositionErrorLimit
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetAutoStopMode(hPosys#, axis, mode)
GetAutoStopMode(hPosys#, axis)
-o-
239
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetAuxiliaryEncoderSource
SetAuxiliaryEncoderSource
GetAuxiliaryEncoderSource
only available for POSYS® 18xx/19xx Series
Syntax
SetAuxiliaryEncoderSource(hPosys, axis, mode, auxiliaryAxis) stdcall
GetAuxiliaryEncoderSource(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
mode
disable
enable
0
1
auxiliaryAxis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Description
Pulse & Direction
SetAuxiliaryEncoderSource
controls the motion IC 's dual encoder loop feature. The mode
argument enables or disables the secondary encoder loop for axis. The auxiliaryAxis parameter
selects which axis encoder input is to be interpreted as the damping term (Kd) of the servo
equation for axis.
To determine the actual position of the auxiliary encoder, use GetActualPosition (auxiliaryAxis)
.
Restriction
To avoid a potentially unstable operating condition the auxiliary encoder should always have a
resolution greater or equal to that of the main encoder.
This command is not available for POSYS® 700/800/800-B/900, it is only available for the
POSYS® 1800/1900 series.
see
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetAuxiliaryEncoderSource(hPosys#, axis, mode, auxiliaryAxis)
GetAuxiliaryEncoderSource(hPosys#, axis)
-o-
240
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetBiQuadCoefficient
SetBiQuadCoefficient
GetBiQuadCoefficient
only available for POSYS® 18xx/19xx Series
Syntax
SetBiQuadCoefficient(hPosys, axis, coefficientID, filterID, value) stdcall
GetBiQuadCoefficient(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
coefficientID
FilterEnable
coefficient B0
coefficient B1
coefficient B2
coefficient A1
coefficient A2
coefficient k
0
1
2
3
4
5
6
filterID
Filter0
Filter1
0
1
Type
value
Description
signed 16 bit
Range
15
15
-2
to 2 -1
Scaling
unity
SetBiQuadCoefficientsets the selected coefficient for the selected bi-quad output filter of the
selected axis.
An axis´ filter is enabled by sending a coefficientID of 0 (FilterEnable) and a value of 1; a value of
0 disables the filter.
The output of the filter at time n (Y[n]) is determined by the input data (X[n]) using the following
formula:
Y[n] = K*(B0*X[n] + B1*X[n-1] + B2*X[n-2] + A1*Y[n-1] + A2*Y[n-2]
B0, B1, B2, A1 and A2 are the signed coefficients; K is a 15-bit positive scaler used to help reduce
round-off errors.
GetBiQuadCoefficient returns the selected coefficient for the selected bi-quad output filter of the
selected axis.
Restriction
Each POSYS® supports up to 2 bi-quad filters per axis (depends on # of axes per card). If both
filters are enabled, their outputs are chained (filter0 followed by filter1).
If filter0 is disabled for an axis, filter1 is also disabled on that axis, regardless of the filterEnable
setting for filter1.
It is recommended that the filter be disabled while its parameters are being changed, then
re-enabled once all parameters have been set. Doing so will avoid sudden, unexpected changes in
the motor output values.
This command is not available for the POSYS® 700/800/800-B/900 series. It is only available for
the POSYS® 1800/1900 series.
For POSYS® 1800/1900 boards with Piezo-functionality this command is not available.
see
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetBiQuadCoefficient(hPosys#, axis, coefficientID, filterID, value)
GetBiQuadCoefficient(hPosys#, axis)
-o-
241
© POSYS Motion Control GmbH & Co.KG, 2013
242
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetDerivativeTime
SetDerivativeTime
GetDerivativeTime
Syntax
SetDerivativeTime(hPosys, axis, time) stdcall
GetDerivativeTime(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Type
time
Description
unsigned 16 bits
Range
0 to 2
15
Scaling
unity
Units
cycles
-1
SetDeriv ativeTimesets the sampling time, in number of servo cycles, for the servo filter to use
in calculating the derivative term for the specified axis.
GetDerivativeTime returns the derivative sampling time.
Restriction
This command is a buffered command. The value set using this command will not take effect until
the next Update or MultiUpdate instruction.
This command does not affect the overall cycle time of the POSYS®, only the derivative sampling
time. The overall cycle time of the POSYS® is set using the command SetSampleTime.
see
GetDerivative
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetDerivativeTime(hPosys#, axis, time)
GetDerivativeTime(hPosys#, axis)
-o-
243
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetIntegrationLimit
SetIntegrationLimit
GetIntegrationLimit
Syntax
SetIntegrationLimit(hPosys,axis, limit) stdcall
GetIntegrationLimit(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Name
Type
limit
unsigned 32 bits
Returned Data
Description
Range
0 to 2
31
-1
Scaling
8
1/2
Units
counts*cycle
SetIntegrationLimitloads the integration-limit register of the digital servo filter for the specified
axis.
GetIntegrationLimitreturns the value of the current integration limit.
Scaling example: The scaling is the same as for the GetIntegral command, namely that (for
example) a constant position error of 100 counts which is present for 256 cycles will result in an
integral value of 100 (100*256/256) , and therefore an Integration Limit value of 100 will limit the
total accumulated integration error to 25,600 count*cycles.
Restriction
This is a buffered command. The value set using this command will not take effect until the next:
Update or MultiUpdate instruction.
see
GetIntegral, GetDerivative, Set/GetDerivativeTime, MultiUpdate, Update
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetIntegrationLimit(hPosys#, axis, limit)
GetIntegrationLimit(hPosys#, axis)
-o-
244
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetKaff
SetKaff
GetKaff
Syntax
SetKaff(hPosys, axis, Kaff) stdcall
GetKaff(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Type
Kaff
unsigned 16 bits
Range
Scaling
Description
0 to 2
15
-1
unity
SetKaff sets the acceleration feedforward gain of the digital servo filter for the specified axis.
GetKaff reads the current value of the acceleration feedforward gain.
Restriction
SetKaff is a buffered command. The value set using this command will not take effect until the next
Update or MultiUpdate instruction.
see
Set/GetKd, Set/GetKi, Set/GetKout, Set/GetKp, Set/GetKvff, MultiUpdate, Update
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetKaff(hPosys#, axis, Kaff)
GetKaff(hPosys#, axis)
-o-
245
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetKd
SetKd
GetKd
Syntax
SetKd(hPosys, axis, Kd) stdcall
GetKd(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Type
Kd
unsigned 16 bits
Range
Scaling
Description
0 to 2
15
-1
unity
SetKd sets the derivative gain of the digital servo filter for the specified axis.
GetKd reads the current value of the derivative gain.
Restriction
SetKd is a buffered command. The value set using this command will not take effect until the next
Update or MultiUpdate instruction.
see
Set/GetKi, Set/GetKout, Set/GetKp, Set/GetKaff, Set/GetKvff, MultiUpdate, Update
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetKd(hPosys#, axis, Kd)
GetKd(hPosys#, axis)
-o-
246
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetKi
SetKi
GetKi
Syntax
SetKi(hPosys, axis, Ki) stdcall
GetKi(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Type
Ki
unsigned 16 bits
Range
Scaling
Description
0 to 2
15
-1
unity
SetKi sets the integral gain of the digital servo filter for the specified axis.
GetKi reads the current value of the integral gain.
Restriction
This is a buffered command. The value set using this command will not take effect until the next
Update or MultiUpdate instruction.
see
Set/GetKd, Set/GetKout, Set/GetKp, Set/GetKaff, Set/GetKvff, MultiUpdate, Update
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetKi(hPosys#, axis, Ki)
GetKi(hPosys#, axis)
-o-
247
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetKout
SetKout
GetKout
Syntax
SetKout(hPosys,axis, Kout) stdcall
GetKout(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Type
Kout
unsigned 16 bits
Range
Scaling
Units
Description
0 to 2
16
100/2
-1
16
% output
SetKout sets the output scale factor of the digital servo filter for the specified axis. The default
value of Kout is 65,535, approximately 100% output.
GetKout reads the current value of the output scale register.
Example: To set the output scaling of the servo filter to 50%, set the Kout register to 32,767.
Restriction
This command is NOT buffered. It will take effect immediately after it is sent.
see
Set/GetKd, Set/GetKi, Set/GetKp, Set/GetKaff, Set/GetKvff, MultiUpdate, Update
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetKout(hPosys#, axis, Kout)
GetKout(hPosys#, axis)
-o-
248
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetKp
SetKp
GetKp
Syntax
SetKp(hPosys, axis, Kp) stdcall
GetKp(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Type
Kp
unsigned 16 bits
Range
Scaling
Description
0 to 2
15
-1
unity
SetKp sets the proportional gain of the digital servo filter for the specified axis.
GetKp reads the current value of the proportional gain.
Restriction
SetKp is a buffered command. The value set using this command will not take effect until the next
Update or MultiUpdate instruction.
see
Set/GetKd, Set/GetKi, Set/GetKout, Set/GetKaff, Set/GetKvff, MultiUpdate, Update
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetKp(hPosys#, axis, Kp)
GetKp(hPosys#, axis)
-o-
249
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetKvff
SetKvff
GetKvff
Syntax
SetKvff(hPosys, axis, Kvff) stdcall
GetKvff(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Type
Kvff
unsigned 16 bits
Range
Scaling
Description
0 to 2
15
-1
unity
SetKvff sets the velocity feedforward gain of the digital servo filter for the specified axis.
GetKvff reads the current value of the velocity feedforward gain.
Restriction
SetKvff is a buffered command. The value set using this command will not take effect until the next
Update or MultiUpdate instruction.
see
Set/GetKd, Set/GetKi, Set/GetKout, Set/GetKp, Set/GetKaff, MultiUpdate, Update
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetKvff(hPosys#, axis, Kvff)
GetKvff(hPosys#, axis)
-o-
250
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetMotorLimit
SetMotorLimit
GetMotorLimit
Syntax
SetMotorLimit(hPosys, axis, limit) stdcall
GetMotorLimit(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Type
limit
unsigned 16 bits
Range
Scaling
Units
Description
0 to 2
15
100/2
-1
15
% output
SetMotorLimitsets the maximum value for the motor output command allowed by the digital
servo filter of the specified axis. Motor command values beyond this value will be clipped to the
specified motor command limit. For example if the motor limit was set to 1,000 and the servo filter
determined that the current motor output value should be 1,100 the actual output value would be
1,000. Conversely if the output value were -1,100 then it would be clipped to -1,000. This
command is useful for protecting amplifiers, motors, or system mechanisms when it is known that
a motor command exceeding a certain value will cause damage.
GetMotorLimitreads the current motor limit value
Scaling example: If it is desired that a motor limit of 75 % of full scale be established then this
register should be loaded with a value of 75.0*32,768/100 = 24,576 (decimal). This corresponds
to a hexadecimal value of 06000h.
Restriction
This command only affects the motor output when an axis is in closed loop mode. When an axis of
the POSYS® is in open loop mode this command has no affect.
see
Set/GetMotorBias, Set/GetMotorCommand, Set/GetMotorMode
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetMotorLimit(hPosys#, axis, limit)
GetMotorLimit(hPosys#, axis)
-o-
251
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetPositionErrorLimit
SetPositionErrorLimit
GetPositionErrorLimit
Syntax
SetPositionErrorLimit(hPosys, axis, limit) stdcall
GetPositionErrorLimit(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Pulse & Direction
Type
limit
Description
unsigned 32 bits
Range
0 to 2
31
Scaling
unity
Units
counts
-1
SetPositionErrorLimitsets the absolute value of the maximum position error allowable by the
POSYS® for the specified axis. If the position error exceeds this limit, a motion error occurs. Such
a motion error may or may not cause the axis to stop moving depending on the value set using the
SetAutoStopMode command.
GetPositionErrorLimit returns the current position error limit value.
Restriction
see
GetPositionError, Set/GetActualPosition, Set/GetPosition
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetPositionErrorLimit(hPosys#, axis, limit)
GetPositionErrorLimit(hPosys#, axis)
-o-
252
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetPositionLoop
SetPositionLoop
GetPositionLoop
only valid for POSYS® 1800/1900 with firmware version >2.x
Syntax
SetPositionLoop(hPosys, axis, parameter, value) stdcall
GetPositionLoop(hPosys, axis, parameter) stdcall
Motor type
DC Brush
DC Brushless
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
Encoding
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
parameter
PID Proportional Gain (Kp)
PID Integrator Gain (Ki)
PID Integrator Limit (Ilimit)
PID Derivative Gain (Kd)
PID Derivate Time
PID Output Gain (Kout)
Velocity Feedforward Gain (Kvff)
Acceleration Feedforward Gain (Kaff)
Biquad1, enable filter
Biquad1, coefficientB0
Biquad1, coefficientB1
Biquad1, coefficientB2
Biquad1, coefficientA1
Biquad1, coefficientA2
Biquad1, coefficientK
Biquad2, enable filter
Biquad2, coefficientB0
Biquad2, coefficientB1
Biquad2, coefficientB2
Biquad2, coefficientA1
Biquad2, coefficientA2
Biquad2, coefficientK
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Type
Range/Scaling
signed 32 bits
see below
value
Definition
SetPositionLoopis used to configure the operating parameters of the PID position loop. Refer to
the product user’s guide for more detail on how each
parameter is used in the position loop
processing. Though these commands always use 32-bit data, the range and format vary depending
on the parameter, as follows:
The values read by GetPositionLoop are the buffered settings.
Parameter
Range
Velocity Feedforward
Gain (Kvff)
0 to 2
Acceleration
Feedforward Gain
(Kaff)
0 to 2
PID Proportional Gain
(Kp)
0 to 2
PID Integrator Gain
(Ki)
0 to 2
PID Derivative Gain
(Kd)
0 to 2
PID Integrator Limit
(Limit)
0 to 2
Scaling
15-1
unity
15-1
unity
15-1
unity
15-1
1/256
15-1
unity
31-1
unity
253
Units
count*cycles
© POSYS Motion Control GmbH & Co.KG, 2013
PID Derivative Time
PID Output Gain (Kout)
0 to 2
0 to 2
15-1
unity
16-1
100/2
cycles
16
Biquad1, Enable Filter
0 to 1
0=disable
1=enable
Biquad1, coefficientB0
15
15-1
-2
to 2
unity
Biquad1, coefficientB1
15
15-1
-2
to 2
unity
Biquad2, coefficientB2
15
15-1
-2
to 2
unity
Biquad1, coefficientA1
15
15-1
-2
to 2
unity
Biquad1, coefficientA2
15
15-1
-2
to 2
unity
Biquad1, coefficientK
0 to 2
15-1
unity
Biquad2, Enable Filter
0 to 1
0=disable
1=enable
Biquad2, coefficientB0
15
15-1
-2
to 2
unity
Biquad2, coefficientB1
15
15-1
-2
to 2
unity
Biquad2, coefficientB2
15
15-1
-2
to 2
unity
Biquad2, coefficientA1
15
15-1
-2
to 2
unity
Biquad2, coefficientA2
15
15-1
-2
to 2
unity
Biquad2, coefficientK
0 to 2
%output
15-1
unity
Many of these parameters are self-descriptive. However, below are some additional comments on
the use of specific parameters.

PID Derivative Time has units of cycles. This is the sample time of the axis, as configured by
SetSampleTime. For example, if set to 10, the derivative term will be computed every 10
cycles of the axis position loop.PID Integrator Limit has units of count*cycles, and scaling of
unity. This matches the units and scaling of the position loop integrator sum. For example, a
constant position error of 100 counts which is present for 256 cycles will result an an
integrator sum of 100*256 = 25,600.

PID Integrator Gain has scaling of 1/256. Thus, a setting of 256 corresponds to “unity”
integrator gain. From the above example, this would make the integrator sum of 25,600
create a contribution to the PID output of 25,600.

PID Output Gain is a scaling factor applied to the output of the digital servo filter, with units of
% output. Its default value is 65,535, or approximately 100% output. To set the scaling to, for
example, 50% of output, PID Output Gain would be set to 32,767.

The biquad coefficients configure the two biquad output filters. If both filters are enabled, their
outputs are chained (filter1 followed by filter2). If filter1 is disabled for an axis, filter2 is also
disabled for that axis, regardless of user setting of Biquad2 Enable Filter. The signed
coefficients and unsigned scalar K combine to implement the following equation, for each filter:
Y = K x (B x X + B x X
+B xX
+A xY
*A xY
)
n
0
1
n-1
2
n-2
1
n-1
2
n-2
Where Y is the filter output at cycle n, and X is the filter input at cycle n.
n
n
Restrictions
Set/GetPositionLoop are buffered commands. All parameters set are buffered, and will not take
effect until an update is done on the position loop (through Update command, MultiUpdate
command, or update action on breakpoint).
see
Update, Set/GetUpdateMask, MultiUpdate, Set/GetBreakPointUpdateMask, GetPositionLoopValue,
Set/GetKi, Set/GetKd, Set/GetKp, Set/GetBiQuadCoefficient, Set/GetIntegrationLimit,
Set/GetDerivativeTime, Set/GetKout, Set/GetKaff, Set/GetKvff
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetPositionLoop(hPosys#, axis, parameter, value)
GetPositionLoop(hPosys#, axis, parameter)
-o-
254
© POSYS Motion Control GmbH & Co.KG, 2013
255
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetProfileKp
SetProfileKp
GetProfileKp
Syntax
SetProfileKp(hPosys, axis, Kp) stdcall
GetProfileKp(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Type
Kp
unsigned 16 bits
Range
Scaling
Description
0 to 2
15
-1
unity
This modified trapezoidal profile produces an S-C urve style velocity profile while permitting all
trajectory parameters to be changed "on-the-fly". The “ProfileKp” is a proportional gain parameter
with a range between 0 and 32767. When set to 32767 the gain is “unity” and results in no filtered
output. For values below 32767 the trajectory is filtered accordingly.
SetProfileKpsets this proportional acceleration gain parameter for the specified axis. The
command is available in trapezoidal, electronic geraing and velocity mode.
GetProfileKpreturns the programmed value for the proportional acceleration gain.
Restriction
SetProfileKp is a buffered command. The value set using this command will not take effect until the
next Update or MultiUpdate instruction.
This command is optional and only available on POSYS® 800-B/900 boards. For details
please contact servo-Halbeck GmbH & Co.KG.
see
Set/GetKd, Set/GetKi, Set/GetKout,Set/GetKaff, Set/GetKvff, MultiUpdate, Update
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetProfileKp(hPosys#, axis, Kp)
GetProfileKp(hPosys#, axis)
-o-
256
© POSYS Motion Control GmbH & Co.KG, 2013
Special Piezo Motor Functions
257
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetpzIntLim
SetpzIntLim
GetpzIntLim
only available for the POSYS® 18xx-Piezo/19xx-Piezo Series
Syntax
SetpzIntLim(hPosys,axis, limit) stdcall
GetpzIntLim(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Name
Type
limit
unsigned 32 bits
Description
Range
0 to 2
31
-1
Scaling
8
1/2
Units
counts*cycle
SetpzIntLim sets the Interal Portion in the digital servo filter for the specified axis when position
error in primary window.
GetpzIntLim returns the programmed value for the specified axis. Returned value = unsigned 32
bit
Scaling example: The scaling is the same as for the Set/GetIntegrationLimit command, namely that
(for example) a constant position error of 100 counts which is present for 256 cycles will result in
an integral value of 100 (100*256/256) , and therefore an Integration Limit value of 100 will limit
the total accumulated integration error to 25,600 count*cycles.
Restriction
This command is not available for the POSYS® 700/800/800-B/1800/1900 series.
It is only available for the POSYS® 1800-Piezo and 1900-Piezo.
see
Set/GetpzKaff, Set/GetpzKp, Set/GetpzKi, Set/GetpzKd, Set/GetpzKvff, Set/GetpzKdPeriod,
Set/GetpzWindow2, Set/GetpzKvff2
DLL: Delphi, C++,
VB
refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetpzIntLim(hPosys#,axis, limit)
GetpzIntLim(hPosys#, axis)
-o-
258
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetpzIntLimStl
SetpzIntLimitStl
GetpzIntLimitStl
only available for the POSYS® 18xx-Piezo/19xx-Piezo Series
Syntax
SetpzIntLimitStl(hPosys,axis, limit) stdcall
GetpzIntLimitStl(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Name
Type
limit
unsigned 32 bits
Description
Range
0 to 2
31
-1
Scaling
8
1/2
Units
counts*cycle
SetpzIntLimitStlsets the Integration Limit for the specified axis when settled.
GetpzIntLimitStlreturns the programmed value for the specified axis. Returned value =
unsigned 32 bit
Scaling example: The scaling is the same as for the Set/GetIntegrationLimit command, namely that
(for example) a constant position error of 100 counts which is present for 256 cycles will result in
an integral value of 100 (100*256/256) , and therefore an Integration Limit value of 100 will limit
the total accumulated integration error to 25,600 count*cycles.
Restriction
This command is not available for the POSYS® 700/800/800-B/1800/1900 series.
It is only available for the POSYS® 1800-Piezo and 1900-Piezo.
see
Set/GetpzOffsetNeg, Set/GetpzOffsetPos, Set/GetpzWindow
DLL: Delphi, C++,
VB
refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetpzIntLimitstl(hPosys#,axis, limit)
GetpzIntLimitStl(hPosys#, axis)
-o-
259
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetpzKaff
SetpzKaff
GetpzKaff
only available for the POSYS® 18xx-Piezo/19xx-Piezo Series
Syntax
SetpzKaff(hPosys, axis, Kaff) stdcall
GetpzKaff(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Type
Kaff
unsigned 16 bits
Range
Scaling
Description
0 to 2
15
-1
unity
SetpzKaff sets the acceleration feedforward gain of the digital servo filter for the specified axis
when position error is in primary window.
GetpzKaff returns the programmed value for the specified axis. Returned value = unsigned 32 bit
Restriction
This command is not available for the POSYS® 700/800/800-B/1800/1900 series.
It is only available for the POSYS® 1800-Piezo and 1900-Piezo.
see
Set/GetpzKp, Set/GetpzKi, Set/GetpzKd, Set/GetpzKvff, Set/GetpzIntLim, Set/GetpzKdPeriod,
Set/GetpzWindow2, Set/GetpzKvff2
DLL: Delphi, C++,
VB
refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetpzKaff(hPosys#, axis, Kaff)
GetpzKaff(hPosys#, axis)
-o-
260
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetpzKd
SetpzKd
GetpzKd
only available for the POSYS® 18xx-Piezo/19xx-Piezo Series
Syntax
SetpzKd(hPosys, axis, Kd) stdcall
GetpzKd(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Type
Kd
unsigned 16 bits
Range
Scaling
Description
0 to 2
15
-1
unity
SetpzKd sets the derivative gain of the digital servo filter of the specified axis when position error
in primary window.
GetpzKd returns the programmed value for the specified axis. Returned value = unsigned 16 bit
Restriction
This command is not available for the POSYS® 700/800/800-B/1800/1900 series.
It is only available for the POSYS® 1800-Piezo and 1900-Piezo.
see
Set/GetpzKaff, Set/GetpzKp, Set/GetpzKi, Set/GetpzKvff, Set/GetpzIntLim, Set/GetpzKdPeriod,
Set/GetpzWindow2, Set/GetpzKvff2
DLL: Delphi, C++,
VB
refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetpzKd(hPosys#, axis, Kd)
GetpzKd(hPosys#, axis)
-o-
261
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetpzKdPeriod
SetpzKdPeriod
GetpzKdPeriod
only available for the POSYS® 18xx-Piezo/19xx-Piezo Series
Syntax
SetpzKdPeriod(hPosys, axis, time) stdcall
GetpzKdPeriod(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Type
time
Description
unsigned 16 bits
Range
0 to 2
15
Scaling
unity
Units
cycles
-1
SetpzKdPeriodsets the derivative time for the specified axis when position error is in primary
window.
GetpzKdPeriodreturns the programmed value for the specified axis. Returned value = unsigned
32 bit
Restriction
This command is not available for the POSYS® 700/800/800-B/1800/1900 series.
It is only available for the POSYS® 1800-Piezo and 1900-Piezo.
see
Set/GetpzKaff, Set/GetpzKp, Set/GetpzKi, Set/GetpzKd, Set/GetpzKvff, Set/GetpzIntLim,
Set/GetpzWindow2, Set/GetpzKvff2
DLL: Delphi, C++,
VB
refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetpzKdPeriod(hPosys#, axis, time)
GetpzKdPeriod(hPosys#, axis)
-o-
262
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetpzKi
SetpzKi
GetpzKi
only available for the POSYS® 18xx-Piezo/19xx-Piezo Series
Syntax
SetpzKi(hPosys, axis, Ki) stdcall
GetpzKi(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Type
Ki
unsigned 16 bits
Range
Scaling
Description
0 to 2
15
-1
unity
SetpzKi sets the integral term for the specified axis when position error is in primary window.
GetpzKi returns the programmed value for the specified axis. Returned value = unsigned 16 bit
Restriction
This command is not available for the POSYS® 700/800/800-B/1800/1900 series.
It is only available for the POSYS® 1800-Piezo and 1900-Piezo.
see
Set/GetpzKaff, Set/GetpzKp, Set/GetpzKd, Set/GetpzKvff, Set/GetpzIntLim, Set/GetpzKdPeriod,
Set/GetpzWindow2, Set/GetpzKvff2
DLL: Delphi, C++,
VB
refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetpzKi(hPosys#, axis, Ki)
GetpzKi(hPosys#, axis)
-o-
263
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetpzKp
SetpzKp
GetpzKp
only available for the POSYS® 18xx-Piezo/19xx-Piezo Series
Syntax
SetpzKp(hPosys, axis, Kp) stdcall
GetpzKp(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Type
Kp
unsigned 16 bits
Range
Scaling
Description
0 to 2
15
-1
unity
SetpzKp sets the proportional gain of the digital servo filter for the specified axis when the
position error is in the primary window.
GetpzKp returns the programmed value for the specified axis. Returned value = unsigned 16 bit
Restriction
This command is not available for the POSYS® 700/800/800-B/1800/1900 series.
It is only available for the POSYS® 1800-Piezo and 1900-Piezo.
see
Set/GetpzKaff, Set/GetpzKi, Set/GetpzKd, Set/GetpzKvff, Set/GetpzIntLim, Set/GetpzKdPeriod,
Set/GetpzWindow2, Set/GetpzKvff2
DLL: Delphi, C++,
VB
refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetKp(hPosys#, axis, Kp)
GetKp(hPosys#, axis)
-o-
264
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetpzKvff
SetpzKvff
GetpzKvff
only available for the POSYS® 18xx-Piezo/19xx-Piezo Series
Syntax
SetpzKvff(hPosys, axis, Kvff) stdcall
GetpzKvff(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Type
Kvff
unsigned 16 bits
Range
Scaling
Description
0 to 2
15
-1
unity
SetpzKvff sets the velocity feedforward gain of the digital servo filter des digitalen Servofilters for
the specified axis when the position error is in the primary window.
GetpzKv ffreturns the programmed value for the specified axis. Returned value = unsigned 16 bit
Restriction
This command is not available for the POSYS® 700/800/800-B/1800/1900 series.
It is only available for the POSYS® 1800-Piezo and 1900-Piezo.
see
Set/GetpzKaff, Set/GetpzKp, Set/GetpzKi, Set/GetpzKd, Set/GetpzIntLim, Set/GetpzKdPeriod,
Set/GetpzWindow2, Set/GetpzKvff2
DLL: Delphi, C++,
VB
refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetpzKvff(hPosys#, axis, Kvff)
GetpzKvff(hPosys#, axis)
-o-
265
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetpzKvff2
SetpzKvff2
GetpzKvff2
only available for the POSYS® 18xx-Piezo/19xx-Piezo Series
Syntax
SetpzKvff2(hPosys, axis, Kvff) stdcall
GetpzKvff2(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Type
Kvff
unsigned 16 bits
Range
Scaling
Description
0 to 2
15
-1
unity
SetpzKvff2 sets die Velocity Feedforward term of the digital servo filters for the specified axis
when the position error is in secondary window.
GetpzKv ff2returns the programmed value for the specified axis when position error is in
secondary window. Returned value = unsigned 16 bit
Restriction
This command is not available for the POSYS® 700/800/800-B/1800/1900 series.
It is only available for the POSYS® 1800-Piezo and 1900-Piezo.
see
Set/GetpzKaff, Set/GetpzKp, Set/GetpzKi, Set/GetpzKd, Set/GetpzKvff, Set/GetpzIntLim,
Set/GetpzKdPeriod, Set/GetpzWindow2
DLL: Delphi, C++,
VB
refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetpzKvff2(hPosys#, axis, Kvff)
GetpzKvff2(hPosys#, axis)
-o-
266
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetpzOffsetNeg
SetpzOffsetNeg
GetpzOffsetNeg
only available for the POSYS® 18xx-Piezo/19xx-Piezo Series
Syntax
SetpzOffsetNeg(hPosys, axis, offset) stdcall
GetpzOffsetNeg(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Type
offset
unsigned 16 bit
Range
Scaling
Description
0 to 2
15
-1
unity
SetpzOffsetNegis a servo offset used when not settled as defined in SetSettleWindow and
SetSettleTime and position error is negative.
GetpzOffsetNegreturns the programmed value for the specified axis. Returned value = unsigned
16 bit
Restriction
This command is not available for the POSYS® 700/800/800-B/1800/1900 series.
It is only available for the POSYS® 1800-Piezo and 1900-Piezo.
see
Set/GetpzOffsetPos, Set/GetpzIntLimStl, Set/GetpzWindow
DLL: Delphi, C++,
VB
refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetpzOffsetNeg(hPosys#, axis, offset)
GetpzOffsetNeg(hPosys#, axis)
-oSet/GetpzOffsetPos
SetpzOffsetPos
GetpzOffsetPos
only available for the POSYS® 18xx-Piezo/19xx-Piezo Series
Syntax
SetpzOffsetPos(hPosys, axis, offset) stdcall
GetpzOffsetPos(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Type
offset
unsigned 16 bit
Range
Scaling
267
0 to 2
unity
15
-1
© POSYS Motion Control GmbH & Co.KG, 2013
Description
SetpzOffsetPosis a servo offset used when not settled as defined in SetSettleWindow and
SetSettleTime and position error is positive.
GetpzOffsetPosreturns the programmed value for the specified axis. Returned value = unsigned
16 bit
Restriction
This command is not available for the POSYS® 700/800/800-B/1800/1900 series.
It is only available for the POSYS® 1800-Piezo and 1900-Piezo.
see
Set/GetpzOffsetNeg, Set/GetpzIntLimStl, Set/GetpzWindow
DLL: Delphi, C++,
VB
refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetpzOffsetPos(hPosys#, axis, offset)
GetpzOffsetPos(hPosys#, axis)
-o-
268
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetpzWindow
SetpzWindow
GetpzWindow
only available for the POSYS® 18xx-Piezo/19xx-Piezo Series
Syntax
SetpzWindow(hPosys, axis, window) stdcall
GetpzWindow(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Pulse & Direction
Type
window
Description
unsigned 16 bits
Range
0 to 2
16
Scaling
unity
Units
counts
-1
SetpzWindow defines the location of the primary window boundary.
GetpzWindow reads the current value for the specified axis. Returned value = unsigned 16 bit
Restriction
This command is not available for the POSYS® 700/800/800-B/1800/1900 series.
It is only available for the POSYS® 1800-Piezo and 1900-Piezo.
see
Set/GetpzOffsetNeg, Set/GetpzOffsetPos, Set/GetpzIntLimStl
DLL: Delphi, C++,
VB
refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetpzWindow(hPosys#, axis, window)
GetpzWindow(hPosys#, axis)
-o-
269
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetpzWindow2
SetpzWindow2
GetpzWindow2
only available for the POSYS® 18xx-Piezo/19xx-Piezo Series
Syntax
SetpzWindow2(hPosys, axis, window) stdcall
GetpzWindow2(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Pulse & Direction
Type
window
Description
unsigned 16 bits
Range
0 to 2
16
Scaling
unity
Units
counts
-1
SetpzWindow2 defines the boundary of the secondary window.
GetpzWindow2 reads the current value of the secondary window. Returned value = unsigned 16
bit
Restriction
This command is not available for the POSYS® 700/800/800-B/1800/1900 series.
It is only available for the POSYS® 1800-Piezo and 1900-Piezo.
see
Set/GetpzKaff, Set/GetpzKp, Set/GetpzKi, Set/GetpzKd, Set/GetpzKvff, Set/GetpzIntLim,
Set/GetpzKdPeriod, Set/GetpzKvff2
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetpzWindow2(hPosys#, axis, window)
GetpzWindow2(hPosys#, axis)
-o-
270
© POSYS Motion Control GmbH & Co.KG, 2013
Encoder
AdjustActualPosition
AdjustActualPosition
Syntax
AdjustActualPosition(hPosys, axis, position) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Pulse & Direction
Type
position
Description
signed 32 bits
Range
31
31
-2
to 2 -1
Scaling
unity
Units
counts
steps
The position specified as the parameter to
AdjustActualPositionis summed with the actual
position register (encoder position) for the specified axis. This has the effect of adding or
subtracting an offset to the current actual position. At the same time, the current commanded
position is replaced by the new actual position value minus the current actual position error. This
prevents a servo "bump" when the new axis position is established. The destination position (see
SetPosition) is also modified by this amount so that no trajectory motion will occur when the
update instruction is issued. In effect, this instruction establishes a new reference from which
subsequent positions can be calculated. It is commonly used to set a known reference position
after a homing procedure.
Note: On axes configured for stepping and microstepping motors, the current actual position error
is zeroed.
AdjustActualPosition takes effect immediately, it is not buffered.
Restriction
see
GetPositionError, GetActualVelocity, Set/GetActualPositionUnits, Set/GetActualPosition
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
AdjustActualPosition(hPosys#, axis, position)
-o-
271
© POSYS Motion Control GmbH & Co.KG, 2013
GetAbsoluteSSIPosition
GetAbsoluteSSIPosition
Syntax
GetAbsoluteSSIPosition(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Pulse & Direction
Returned Data
Absolute encoder position as a 32 bit integer
Description
GetAbsoluteSSIPosition returns a 32 bit integer representing the encoder´s absolute position as
reported by the encoder for the selected axis. Absolute encoder position as a 32 bit integer.
Restriction
These functions are only available if the SSI 800/900 (Synchronous Serial Interface) board is
installed. The SSI 800/900 can only be used with the POSYS® 900 and POSYS® 800/800-B, 1800
and 1900 motion controller.
see
GetSSIVersion, Set/GetEncoderSource, ResetSSI, Read/WriteSSIResolution,Read/WriteSSIRegister
, Read/WriteSSIFrequency, SetActualToAbsolutePosition
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
GetAbsoluteSSIPosition(hPosys#, axis)
-o-
272
© POSYS Motion Control GmbH & Co.KG, 2013
GetActualVelocity
GetActualVelocity
Syntax
GetActualVelocity(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Name
Type
velocity
signed 32 bits
Returned Data
Description
Pulse & Direction
Range
31
31
-2
to 2 -1
Scaling
16
1/2
Units
counts/cycle
GetActualVelocityreads the value of the velocity for the specified axis. The actual velocity is
derived by subtracting the actual position during the previous chip cycle from the actual position
for this chip cycle. The result of this subtraction will always be integer because position is always
integer. As a result the value returned by GetActualVelocity will always be a multiple of 65,536
since this represents a value of one in the 16.16 number format. The low word is always zero.
This value is the result of the last encoder input, so it will be accurate to within one cycle.
Scaling example: If a value of 1,703,936 is retrieved by the GetActualVelocity command (high
word: 01Ah, low word: 0h) this corresponds to a velocity of 1,703,936/65,536 or 26 counts/cycle.
Restriction
The actual velocity is derived by subtracting the actual position during the previous chip cycle from
the actual position for this chip cycle. The result of this subtraction will always be integer because
position is always integer. As a result the value returned by GetActualVelocity will always be a
multiple of 65,536 since this represents a value of one in the 16.16 number format. The low word
is always zero.
see
GetCommandedVelocity
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
GetActualVelocity(hPosys#, axis)
-o-
273
© POSYS Motion Control GmbH & Co.KG, 2013
GetCaptureValue
GetCaptureValue
Syntax
GetCaptureValue(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Returned Data
Type
captured position
Description
Pulse & Direction
signed 32 bits
Range
31
31
-2
to 2 -1
Scaling
unity
Units
counts
steps
GetCaptureValuereturns the contents of the Position C apture Register for the specified axis. This
command also resets the bit 9 of the activity status register to allow another capture to occur.
If actual position units is set to steps, the returned position will be in units of steps.
Restriction
see
Set/GetCaptureSource, Set/GetActualPositionUnits, GetActivityStatus
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
GetCaptureValue(hPosys#, axis)
-o-
274
© POSYS Motion Control GmbH & Co.KG, 2013
GetSSIVersion
GetSSIVersion
Syntax
GetSSIVersion(hPosys) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
Name
Type
version
unsigned 16 bit
Returned Data
Pulse & Direction
Description
This function returns the version number of the SSI board installed. It provides useful information
when analyzing problems.
Restriction
This function is only available if the SSI 800/900 (Synchronous Serial Interface) board is installed.
The SSI 800/900 can only be used with the POSYS® 900 and POSYS® 800/800-B, 1800 and 1900
motion controller.
see
GetAbsoluteSSIPosition, Set/GetEncoderSource, ResetSSI, Read/WriteSSIResolution,
Read/WriteSSIRegister, Read/WriteSSIFrequency, SetActualToAbsolutePosition
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
GetSSIVersion(hPosys#)
-o-
275
© POSYS Motion Control GmbH & Co.KG, 2013
Read/WriteSSIFrequency
WriteSSIFrequency
ReadSSIFrequency
Syntax
WriteSSIFrequency(hPosys, axis, resolution) stdcall
ReadSSIFrequency(hPosys, axis, resolution) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
frequency
1100 KHz
550 KHz
275 KHz
137.5 KHz
1100
550
275
137
Description
Pulse & Direction
WriteSSIFrequencyoverwrites the power-on default DIP-switch settings for frequency of the
selected axis. Each axis can be set to its individual value.
ReadSSIFrequency returns the active frequency for the selected axis.
Restriction
Do not change frequency while the sy stem is running and motors and driv ers are
powered!
These functions are only available if the SSI 800/900 (Synchronous Serial Interface) board is
installed The SSI 800/900 can only be used with the POSYS® 900 and POSYS®
800/800-B/1800/1900 motion controller.
see
GetSSIVersion, GetAbsoluteSSIPosition, Set/GetEncoderSource, ResetSSI,Read/WriteSSIResolution
, Read/WriteSSIRegister, SetActualToAbsolutePosition
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
WriteSSIFrequency(hPosys#, axis, resolution)
ReadSSIFrequency(hPosys#, axis, resolution)
-o-
276
© POSYS Motion Control GmbH & Co.KG, 2013
Read/WriteSSIRegister
WriteSSIRegister
ReadSSIRegister
Syntax
WriteSSIRegister(hPosys, axis, resolution, frequency) stdcall
ReadSSIRegister(hPosys, axis, resolution, frequency) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
resolution
25
13
12
10
25
13
12
10
frequency
1.1 MHz
550 KHz
275 KHz
137.5 KHz
Description
bits
bits
bits
bits
Pulse & Direction
1100
550
275
137
WriteSSIRegisteroverwrites the power-on defaults (1.1 MHz frequency) and the DIP-switch
settings for resolution. Each axis can be set to its individual values.
ReadSSIRegister returns the active resolution and frequency in these two variables for the
selected axis.
Restriction
Do not change resolution while the sy stem is running and motors and driv ers are
powered!
These functions are only available if the SSI 800/900 (Synchronous Serial Interface) board is
installed The SSI 800/900 can only be used with the POSYS® 900 and POSYS®
800/800-B/1800/1900 motion controller.
see
GetSSIVersion, GetAbsoluteSSIPosition, Set/GetEncoderSource, ResetSSI,Read/WriteSSIResolution
, Read/WriteSSIFrequency, SetActualToAbsolutePosition
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
WriteSSIRegister(hPosys#, axis, resolution, frequency)
ReadSSIRegister(hPosys#, axis, resolution, frequency)
-o-
277
© POSYS Motion Control GmbH & Co.KG, 2013
Read/WriteSSIResolution
WriteSSIResolution
ReadSSIResolution
Syntax
WriteSSIResolution(hPosys, axis, resolution) stdcall
ReadSSIResolution(hPosys, axis, resolution) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
resolution
25
13
12
10
25
13
12
10
Description
bits
bits
bits
bits
Pulse & Direction
WriteSSIResolutionoverwrites the power-on default DIP-switch settings for resolution of the
selected axis. Each axis can be set to its individual value.
ReadSSIResolution returns the active resolution for the selected axis.
Restriction
Do not change resolution while the sy stem is running and motors and driv ers are
powered!
These functions are only available if the SSI 800/900 (Synchronous Serial Interface) board is
installed The SSI 800/900 can only be used with the POSYS® 900 and POSYS®
800/800-B/1800/1900 motion controller.
see
GetSSIVersion, GetAbsoluteSSIPosition, Set/GetEncoderSource, ResetSSI,Read/WriteSSIRegister,
Read/WriteSSIFrequency, SetActualToAbsolutePosition
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
WriteSSIResolution(hPosys#, axis, resolution)
ReadSSIResolution(hPosys#, axis, resolution)
-o-
278
© POSYS Motion Control GmbH & Co.KG, 2013
ResetSSI
ResetSSI
Syntax
ResetSSI(hPosys) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
Pulse & Direction
Description
ResetSSI resets the SSI board to its defaults. Frequency = 1.1 MHz and resolution to the
DIP-switch settings. After reset the momentary absolute position of the encoder will be send to the
POSYS® motion controller.
Restriction
An external reset or using the POSYS® hardware reset command HardReset will NOT reset the
SSI 800/900 board. Only removal of power or issuing the ResetSSI command will cause a reset of
the SSI 800/900 board.
see
GetSSIVersion, GetAbsoluteSSIPosition, Set/GetEncoderSource,Read/WriteSSIResolution,
Read/WriteSSIRegister, Read/WriteSSIFrequency,SetActualToAbsolutePosition
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
ResetSSI(hPosys#)
-o-
279
© POSYS Motion Control GmbH & Co.KG, 2013
SetActualToAbsolutePosition
SetActualToAbsolutePosition
Syntax
SetActualToAbsolutePosition(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
CardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Pulse & Direction
Description
SetActualToAbsolutePosition will set the motion controller´s actual position to the
encoder´s absolute position for the selected axis. This synchronizes the two counters.
The motion controller will maintain the position for the full 32 bit range, the SSI
800/900 maintains the position for the absolute encoder´s range. If the encoder´s
resolution is 25 bits the position range will be 0 to 33,554,432 counts and then start at
zero again.
Restriction
Caution must be exercised when using this function to assure that no abrupt motion
takes place. Before motors and amplifiers are powered assure that commanded and
actual positions do not deviate by more than a few counts otherw ise their could be
DANGEROUS abrupt movement when the system starts to servo! SetMotorMode should
be OFF (not servoing) before using the SetActualToAbsolutePosition command.
Note: These functions are only available if the SSI 800/900 (Synchronous Serial
Interface) board is installed. The SSI 800/900 can only be used with the POSYS® 900
and POSYS® 800/800-B, 1800 and 1900 motion controller.
see
GetSSIVersion, GetAbsoluteSSIPosition, Set/GetEncoderSource, ResetSSI,
Read/WriteSSIResolution, Read/WriteSSIRegister, Read/WriteSSIFrequency,
SetActualToAbsolutePosition, Set/GetActualPosition
DLL: Delphi,
C++, VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetActualToAbsolutePosition(hPosys#, axis)
-o-
280
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetActualPosition
SetActualPosition
GetActualPosition
Syntax
SetActualPosition(hPosys, axis, position) stdcall
GetActualPosition(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Pulse & Direction
Type
position
Description
signed 32 bit
Range
31
31
-2
to 2 -1
Scaling
unity
Units
counts
steps
SetActualPositionloads the actual position register (encoder position) for the specified axis. At
the same time, the current commanded position is replaced by the loaded value minus the current
actual position error. This prevents a servo "bump" when the new axis position is established. The
destination position (see SetPosition) is also modified by this amount so that no trajectory motion
will occur when the update instruction is issued. In effect, this instruction establishes a new
reference position from which subsequent positions can be calculated. It is commonly used to set a
known reference position after a homing procedure.
Note: On the POSYS® axes in stepper or microstepping mode, the actual position is set in units of
steps. This ensures a common unit is used for both the trajectory generator and the actual
position. Normally the trajectory generator has a higher resolution than the encoder so maximum
accuracy is achieved using this method.
Note: On the POSYS® axes in stepper or microstepping mode, the current actual position error is
zeroed and the units are determined by Set/GetActualPositionUnits.
SetActualPositiontakes effect immediately, it is not buffered.
GetActualPositionreads the contents of the encoder's actual position register. This value will be
the result of the last encoder input, which will be accurate to within one cycle (as determined by
Set/GetSampleTime).
Restriction
Note: For the stepper motor versions the actual position is defined in steps. This guarantees, that
for the trajectory generator and for the actual position identical values are used. Normally the
trajectory generator has a higher resolution than the used type of encoders which results in
maximum accuracy.
Note: The actual following error is zeroed for stepper motor versions.
see
GetPositionError, GetActualVelocity, Set/GetActualPositionUnits, AdjustActualPosition
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetActualPosition(hPosys#, axis, position)
GetActualPosition(hPosys#, axis)
-o-
281
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetActualPositionUnits
SetActualPositionUnits
GetActualPositionUnits
Syntax
SetActualPositionUnits(hPosys, axis, mode) stdcall
GetActualPositionUnits(hPosys, axis) stdcall
Motor type
Arguments
Description
Microstepping
Pulse & Direction
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
mode
counts
steps
0
1
SetActualPositionUnitsdetermines the units used by the GetActualPosition, AdjustActualPosition
and GetC aptureValue when it returns the axis position for the specified axis. When set to C ounts
GetActualPosition returns the axis position in encoder counts. When set to Steps GetActualPosition
returns the axis position in steps.
The step position is calculated using the ratio as set by the SetEncoderToStepRatio command.
GetActualPositionUnits returns the position units for the specified axis.
Restriction
see
Set/GetActualPosition, Set/GetEncoderToStepRatio, AdjustActualPosition,
GetCaptureValue
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetActualPositionUnits(hPosys#, axis, mode)
GetActualPositionUnits(hPosys#, axis)
-o-
282
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetCaptureSource
SetCaptureSource
GetCaptureSource
Syntax
SetCaptureSource(hPosys, axis, source) stdcall
GetCaptureSource(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
source
index
home
0
1
Description
Pulse & Direction
SetCaptureSourcedetermines which of two encoder signals, Index or Home, is used to trigger
the high-speed capture of the actual axis position for the specified axis.
GetCaptureSource returns the capture signal source for the selected axis.
Restriction
see
GetCaptureValue
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetCaptureSource(hPosys#, axis, source)
GetCaptureSource(hPosys#, axis)
-o-
283
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetEncoderModulus
SetEncoderModulus
GetEncoderModulus
Syntax
SetEncoderModulus(hPosys, axis, modulus) stdcall
GetEncoderModulus(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Pulse & Direction
Type
modulus
Description
unsigned 16 bits
Range
1 to 2
16
Scaling
unity
Units
counts
-1
SetEncoderModulus sets the parallel word range for the specified axis when parallel-word
feedback is used. Modulus determines the range of the connected device. The value provided
should be one-half of the actual modulus of the axis.
For example if the parallel-word input is used with a linear potentiometer connected to an external
A/D (Analog to Digital converter) which has 12 bits of resolution, then the total range is 4,096 and
a value of 2,048 should be loaded with this command.
GetEncoderModulus returns the current encoder modulus.
Restriction
These commands are only used if parallel-word feedback is used (Option). If incremental encoder
feedback is used then these commands are not required.
see
Set/GetEncoderSource
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetEncoderModulus(hPosys#, axis, modulus)
GetEncoderModulus(hPosys#, axis)
-o-
284
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetEncoderSource
SetEncoderSource
GetEncoderSource
Syntax
SetEncoderSource(hPosys, axis, source) stdcall
GetEncoderSource(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
source
incremental
parallel
none
loopback (POSYS®
1800/1900 series only)
0
1
2
3
Description
Pulse & Direction
SetEncoderSourcesets the type, of feedback (incremental quadrature encoder or parallel-word
(option)) for the specified axis. When incremental quadrature is selected the POSYS® expects A
and B quadrature signals to be input at the I/O chip. When parallel-word is selected the POSYS®
expects user-defined external circuitry connected to the POSYS's® external bus to load a 16-bit
word containing the current position value for each axis. External feedback devices with less than
16 bits may be used but the unused bits must be sign extended or zeroed.
When motor type is set to Pulse & Direction and the encoder source is set to Loopback (only for
POSYS® 1800/1900 series), the step output is internally fed back into the quad counters. This
allows for position capture of the step output when a physical encoder is not present.
Otherwise it is also possible to use the command
GetC ommandedPositionto determine the
commanded (possible actual) position of the stepper motor when using it without an encoder. This
is needed when using the POSYS® 85x-B or 95x series.
The two modes, loopback andGetC ommandedPosition
, do not allow to determine the real actual
position, but only offer the possibility to determine the possibly actual position because of the
commanded position to a certain time.
GetEncoderSource returns the code for the current type of feedback.
Restriction
see
Set/GetEncoderModulus
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetEncoderSource(hPosys#, axis, source)
GetEncoderSource(hPosys#, axis)
-o-
285
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetEncoderToStepRatio
SetEncoderToStepRatio
GetEncoderToStepRatio
Syntax
SetEncoderToStepRatio(hPosys, axis, counts, steps) stdcall
GetEncoderToStepRatio(hPosys, axis) stdcall
Motor type
Arguments
Microstepping
Pulse & Direction
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Type
counts
steps
Description
unsigned 16 bits
unsigned 16 bits
Range
0 to 2
15
Scaling
unity
Units
counts
Range
0 to 2
Scaling
unity
Units
steps
15
-1
-1
SetEncoderToStepRatiosets the ratio of number of encoder counts to the number of output
steps per motor rotation used by the motion controller to convert encoder counts into steps.
C ounts is the number of encoder counts per full rotation of the motor. Steps is the number of steps
output by the motion processor per full rotation of the motor. Since this command sets a ratio, the
parameters do not have to be for a full rotation as long as they correctly represent the encoder
count to step ratio.
GetEncoderToStepRatio gets the ratio of number of encoder counts to the number of output
steps per motor rotation.
Restriction
see
Set/GetActualPositionUnits
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetEncoderToStepRatio(hPosys#, axis, counts, steps)
GetEncoderToStepRatio(hPosys#, axis)
-o-
286
© POSYS Motion Control GmbH & Co.KG, 2013
On-Board RAM
287
© POSYS Motion Control GmbH & Co.KG, 2013
DisableDPRam
DisableDPRam
Syntax
DisableDPRam(hPosys) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
Pulse & Direction
Result
Deactivates the Dual Port RAM Mode thru the ISA-Bus.
Description
DisableDPRamdeactivates the DPRam mode on the POSYS® 1800. The on-board memory is
then only accessable via the motion processor in the Single Port RAM mode which results in slower
write-/read processes. During the boot sequence the Dual Port RAM is deactivated to reduce
eventually occurring problems on PC s which may not act correctly with ISA-boards equipped with
Dual Port RAM. This command can also be used to deactivate Dual Port RAM during normal
operation.
The command EnableDPRam can be used at any time to activate the Dual Port RAM Mode again.
Restriction
This command is only available for POSYS® 1800 PC /104 boards equipped with Dual Port RAM.
see
EnableDPRam, ReadDPRamLong, WriteDPRamLong
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
DisableDPRam(hPosys#)
-o-
288
© POSYS Motion Control GmbH & Co.KG, 2013
EnableDPRam
EnableDPRam
Syntax
EnableDPRam(hPosys) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
Pulse & Direction
Result
Activates the Dual Port RAM Mode thru the ISA-Bus.
Description
EnableDPRamactivates the DPRAM on the POSYS® 1800. The on-board memory can then be
accessed via the ISA-Bus as well thru the motion processor. Without activation the on-board Dual
Port RAM can only be accessed thru the motion processor which results in slower read-/write
processes. This command can also be helpful to reduce problems on PC -systems. During the boot
sequence the Dual Port RAM is deactivated to reduce eventually occurring problems on PC s which
may not act correctly with ISA-boards equipped with Dual Port RAM. This command can also be
used to re-activate Dual Port RAM during normal operation after a previous deactivation.
The command DisableDPRam can be used at any time to deactivate the Dual Port RAM Mode again.
Restriction
This command is only available for POSYS® 1800 PC /104 boards equipped with Dual Port RAM.
see
DisableDPRam, ReadDPRamLong, WriteDPRamLong
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
EnableDPRam(hPosys#)
-oReadBuffer
ReadBuffer
Syntax
ReadBuffer(hPosys, bufferID) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
Pulse & Direction
Type
bufferID
Returned Data
unsigned 16 Bit
Range
0 to 31
Scaling
unity
Units
-
Range
31
31
-2
to 2 -1
Scaling
unity
Units
-
Type
data
signed 32 Bit
Description
ReadBuffer returns the 32-bit contents of the current location in the specified buffer. The current
location is determined by adding the base address of the buffer (set by SetBufferStart), to the
buffer´s Read Index (set by SetBufferReadIndex). After the contents have been read, the Read
Index is incremented by 1; if the result is equal to the buffer length (set by SetBufferLength), the
Index is reset to 0.
Restriction
Some commands automatically change the read index such as at the completion of a trace when in
rolling mode.
Range of bufferID: 0 to 31
To read the buffer you must first call ReadIndex(n)
n = starting position of the buffer
289
© POSYS Motion Control GmbH & Co.KG, 2013
see
Set/GetBufferReadIndex, WriteBuffer, Set/GetBufferStart, Set/GetBufferLength
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
ReadBuffer(hPosys#, bufferID)
-o-
290
© POSYS Motion Control GmbH & Co.KG, 2013
ReadDPRamLong
ReadDPRamLong
only valid for POSYS® 18xx/19xx with Dual Port RAM
Syntax
ReadDPRamLong(hPosys;offset) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
offset
unsigned 32 Bit
Memory base address + offset
Returned Data
Pulse & Direction
Type
data
signed 32 Bit
Range
31
31
-2
to 2 -1
Scaling
unity
Units
-
Description
Reads a 32-Bit value at the memory base address + offset.
Restriction
This command is only valid for POSYS® 1800 cards equipped with Dual Port RAM.
see
WriteDPRamLong, EnableDPRam, DisableDPRam
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
ReadDPRamLong(hPosys#, offset)
-o-
291
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetBufferFunction
SetBufferFunction
GetBufferFunction
Syntax
SetBufferFunction(hPosys, axis, function, bufferID) stdcall
GetBufferFunction(hPosys, axis, function) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
function
Position
Velocity
Acceleration
Jerk
Time
AxisOut1
0
1
2
3
4
5 (only available on POSYS 1800 & 1900 with
firmware 5842018FD = Piezo version)
Type
Range
signed 16 bits
-1 to 31
bufferID
Description
Pulse & Direction
SetBufferF unctionsets the interpretation for data stored in a buffer when an axis is in External
Profile Mode. A function will have no associated buffer if the bufferID parameter is set to -1. This is
useful for disabling a function.
GetBufferFunction returns the bufferID for the specified function. If a function has not been
assigned a buffer, the return value is -1.
Restriction
see
Set/GetProfileMode
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetBufferFunction(hPosys#, axis, function, bufferID)
GetBufferFunction(hPosys#, axis, function)
-o-
292
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetBufferLength
SetBufferLength
GetBufferLength
Syntax
SetBufferLength(hPosys, bufferID, length) stdcall
GetBufferLength(hPosys, bufferID) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
Description
Type
Range
bufferID
unsigned 16 bit
0 to 31
length
unsigned 32 bit
1 to 2
30
Pulse & Direction
-1
SetBufferLengthsets the length, in number of 32-bit elements, of the buffer in the memory block
identified by bufferID.
Note: SetBufferLength resets the buffers read and write indexes to 0.
GetBufferLength returns the length of the specified buffer.
Restriction
If the specified length extends beyond the end of addressable memory, SetBufferLength is not
executed, and returns host-I/O error code 7, buffer bound exceeded.
Note: Setting the buffer length bey ond the end of physical memory could cause the
POSYS® to unexpectedly reset during operation.
see
Set/GetBufferReadIndex, Set/GetBufferStart, Set/GetBufferWriteIndex
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetBufferLength(hPosys#, bufferID, length)
GetBufferLength(hPosys#, bufferID)
-o-
293
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetBufferReadIndex
SetBufferReadIndex
GetBufferReadIndex
Syntax
SetBufferReadIndex(hPosys, bufferID, index) stdcall
GetBufferReadIndex(hPosys, bufferID) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
Pulse & Direction
Type
bufferID
index
Description
unsigned 16 bit
unsigned 32 bit
Range
0 to 31
Scaling
unity
Units
-
Range
0 to buffer
length - 1
Scaling
unity
Units
double words
SetBufferReadIndexsets the address of the Read Index for the specified buffer.
GetBufferReadIndex returns the current Read Index for the specified buffer.
Restriction
If the read index is set to an address beyond the length of the buffer, the command will not be
executed and will return an error.
see
Set/GetBufferLength, Set/GetBufferStart, Set/GetBufferWriteIndex
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetBufferReadIndex(hPosys#, bufferID, index)
GetBufferReadIndex(hPosys#, bufferID)
-o-
294
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetBufferStart
SetBufferStart
GetBufferStart
Syntax
SetBufferStart(hPosys, bufferID, address) stdcall
GetBufferStart(hPosys, bufferID) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
Type
Range
bufferID
unsigned 16 bit
0 to 31
address
unsigned 32 bit
31
200h to 2 -1 for POSYS® 700/800/800-B/900
31
0h to 2 -1 for POSYS® 1800/1900
Description
Pulse & Direction
SetBufferStartsets the starting address for the specified buffer.
The buffer start address must
be 200h or greaterfor POSYS® 700/800/800-B/900. The start address for POSYS®
1800/1900 can be 0h.
Note: SetBufferStart resets the buffers read and write indexes to 0.
GetBufferStart returns the starting address for the specified buffer.
Restriction
If the specified length extends beyond the end of addressable memory, SetBufferStart is not
executed, and returns host-I/O error code 7, buffer bound exceeded.
Note: Setting the buffer start bey ond the end of phy sical memory could cause the
POSYS® to unexpectedly reset during operation
see
Set/GetBufferLength, Set/GetBufferReadIndex, Set/GetBufferWriteIndex
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetBufferStart(hPosys#, bufferID, address)
GetBufferStart(hPosys#, bufferID)
-o-
295
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetBufferWriteIndex
SetBufferWriteIndex
GetBufferWriteIndex
Syntax
SetBufferWriteIndex(hPosys, bufferID, index) stdcall
GetBufferWriteIndex(hPosys, bufferID) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
Pulse & Direction
Type
bufferID
index
Description
unsigned 16 bit
unsigned 32 bit
Range
0 to 32
Scaling
unity
Units
-
Range
0 to buffer
length - 1
Scaling
unity
Units
double words
SetBufferWriteIndexsets the address of the write index for the specified buffer. If the write
index is set to an address beyond the length of the buffer, the command will not be executed and
will return an error.
GetBufferWriteIndex returns the current write index for the specified buffer.
Restriction
If the read index is to an address beyond the length of the buffer, the command will be executed
and will return host I/O error code 7, buffer bound exceeded.
see
Set/GetBufferLength, Set/GetBufferReadIndex, Set/GetBufferStart
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetBufferWriteIndex(hPosys#, bufferID, index)
GetBufferWriteIndex(hPosys#, bufferID)
-o-
296
© POSYS Motion Control GmbH & Co.KG, 2013
WriteBuffer
WriteBuffer
Syntax
WriteBuffer(hPosys, bufferID, value) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
Type
Range
bufferID
unsigned 16 bits
0 to 31
value
signed 32 bits
31
31
-2
to 2 -1
POSYS® 7xx, 8xx,
8xx-B, 9xx
Type
Range
bufferID
unsigned 16 bits
0 to 15
value
signed 32 bits
31
31
-2
to 2 -1
Pulse & Direction
POSYS® 18xx, 19xx
Description
WriteBufferwrites the 32-bit value into the current location in the specified buffer. The current
location is determined by adding the base address of the buffer (set by SetBufferStart), to the
buffer's write index (set by SetBufferWriteIndex). After the contents have been read, the write
index is incremented by 1; if the result is equal to the buffer length (set by SetBufferLength), the
index is reset to 0.
Some POSYS® operations automatically change the write index such as during a trace. See the
POSYS® User's Guide for more details.
Restriction
see
ReadBuffer, Set/GetBufferWriteIndex
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
WriteBuffer(hPosys#, bufferID, value)
-o-
297
© POSYS Motion Control GmbH & Co.KG, 2013
WriteDPRAMLong
WriteDPRamLong
only valid for POSYS® 18xx/19xx with Dual Port RAM
Syntax
WriteDPRamLong(hPosys,offset,value) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
offset
unsigned 32 Bit
memory base address + offset
value
signed 32 Bit
Range
31
31
-2
to 2 -1
Scaling
Unity
Units
-
Pulse & Direction
Description
Writes a 32-Bit value to the memory base address + offset
Restriction
This command is only valid for POSYS® cards equipped with Dual Port RAM.
see
ReadDPRamLong, EnableDPRam, DisableDPRam
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
WriteDPRamLong(hPosys#,offset,value)
-o-
298
© POSYS Motion Control GmbH & Co.KG, 2013
Motor Output
299
© POSYS Motion Control GmbH & Co.KG, 2013
GetActiveMotorCommand
GetActiveMotorCommand
only valid for POSYS® 1800/1900 with firmware version >2.x
Syntax
GetActiveMotorCommand(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Name
Type
Returned Data
Motor output command signed 16 bits
Range
Scaling
Units
Description
15
15
-2
to 2 -1
100/2
15
% output
GetActiveMotorCommandreturns the value of the motor output command for the specified
axis.
This is the input to the commutation or FOC current control. Its source depends on the motor type,
as well as the Operating Mode of the
axis.
For brushless DC and DC brush motors: If position loop is enabled, it is the output of the position
servo filter. If trajectory generator is enabled without the position loop, it is the output of the
trajectory generator. If both trajectory generator and position loop are disabled, it is the contents
of the motor output command register.
For Microstepping motors: It is the contents of the motor output command register, subject to
holding current reduction.
Restrictions
see
Set/GetMotorCommand
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
GetActiveMotorCommand(hPosys#, axis)
-oGetCurrentMotorCommand
GetCurrentMotorCommand
Syntax
GetCurrentMotorCommand(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Name
Type
Returned Data
Motor output command signed 16 bits
300
Range
15
15
-2
to 2 -1
© POSYS Motion Control GmbH & Co.KG, 2013
Scaling
Units
Description
100/2
15
% output
GetCurrentMotorCommandreturns the current motor output command for the specified axis. In
closed-loop mode, this is the output of the servo filter, in open-loop mode it is the contents of the
motor output command register.
Scaling example: To convert the retrieved value to units of % of full scale motor output multiply by
100/32,768. For example if the value -123 is retrieved by the GetC urrentMotorC ommand, this
represents -123*100/32,768 or -.3754 % of full scale output.
Restriction
see
Set/GetMotorCommand
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
GetCurrentMotorCommand(hPosys#, axis)
-o-
301
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetHoldingCurrent
SetCurrentHolding
GetCurrentHolding
only valid for POSYS® 1800/1900 with firmware version >2.x
Syntax
SetCurrentHolding(hPosys, axis, parameter, value) stdcall
GetCurrentHolding(hPosys, axis, parameter) stdcall
Motor type
Arguments
Microstepping
Name
Instance
Encoding
hPosys
C ardHandle
Wert zurückgeliefert durch Aufruf von
OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
parameter
Holding Motor Limit
Holding Delay
0
1
value
unsigned 16 bits
Range
Scaling
Units
Description
Pulse & Direction
0 to 2
15-1
100/2
15
% output
SetHoldingCurrentconfigures the operation of the holding current. The two parameters to set
are Holding Motor Limit, the maximum commanded current when in holding, and
Holding Delay,
the number of cycles to wait after end of move before going into holding current.
The Holding Motor Limitis in units of % maximum current, with scaling of 100/2^15. Its range is 0
to 2^15–1. It defines the value to which the current will be limited when in the holding state. This
limit is applied as an additional limit to the motor limit, so the lower of the two will affect the true
limit.
The Holding Delay is in units of trajectory generator cycles, with unity scaling and a range of 0 to
2^15–2. It defines the wait time between ending a move and switching to the holding current
limit. That is, there will be a delay of
Holding Delay trajectory cycles after Motion C omplete, after
which the In Holding bit in theDrive Status Registerwill be set, and the motor command will be
limited by the Holding Motor Limit.
When the Holding Delay is set to 2^15–1 (its reset default), the axis will never go into holding
current.
GetHoldingCurrent gets the indicated holding current parameter.
Restriction
For Pulse & Direction motor types, only the Holding Delay is used. It delays the assertion of the
AtRest output by the indicated number of cycles after a move is complete.
see
GetDriveStatus, Set/GetSampleTime
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetCurrentHolding(hPosys#, axis, parameter, value)
GetCurrentHolding(hPosys#, axis, parameter)
-o-
302
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetMotorBias
SetMotorBias
GetMotorBias
Syntax
SetMotorBias(hPosys, axis, bias) stdcall
GetMotorBias(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Type
bias
signed 16 bits
Range
Scaling
Units
Description
15
15
-2
to 2 -1
100/2
15
% output
SetMotorBiassets the bias voltage of the digital servo filter for the specified axis.
GetMotorBiasreacts the current bias voltage of the digital servo filter.
Scaling example: If it is desired that a motor bias value of -2.5 % of full scale be placed on the
servo filter output than this register should be loaded with a value of -2.5*32,768/100=-819
(decimal). This corresponds to a loaded hexadecimal value of 0FCC Dh.
Restriction
see
Set/GetMotorCommand, Set/GetMotorLimit
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetMotorBias(hPosys#, axis, bias)
GetMotorBias(hPosys#, axis)
-o-
303
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetMotorCommand
SetMotorCommand
GetMotorCommand
Syntax
SetMotorCommand(hPosys, axis, value) stdcall
GetMotorCommand(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Type
value
signed 16 bits
Range
Scaling
Units
Description
15
15
-2
to 2 -1
100/2
15
% output
SetMotorCommandloads the motor-command buffer register of the specified axis.
For axes configured for microstepping mode, this command is used to control the magnitude of the
output waveform.
GetMotorCommandreads the contents of the motor-command buffer register.
Scaling example: If it is desired that a motor command value of 13.7 % of full scale be output to
the motor then this register should be loaded with a value of 13.7 *32,768/100 = 4,489
(decimal).This corresponds to a hexadecimal value of 1189h.
Restriction
SetMotorC ommand is valid only when the motor is "off" for axes configured as DC -Brushless or
DC -Brushed.
SetMotorCommand is a buffered command. The value set using this command will not take effect
until the next Update or MultiUpdate instruction.
see
Set/GetMotorBias, Set/GetMotorLimit, Set/GetMotorMode, MultiUpdate, Update
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetMotorCommand(hPosys#, axis, value)
GetMotorCommand(hPosys#, axis)
-o-
304
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetMotorMode
SetMotorMode
GetMotorMode
Syntax
SetMotorMode(hPosys, axis, mode) stdcall
GetMotorMode(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
mode
off
on
0
1
Description
Pulse & Direction
SetMotorModedetermines the mode of motor operation. When set to On, several events take
place. For servo axes, the axis is placed in closed-loop mode, and is controlled by the output of the
servo filter. For step motor and microstepping axes, the trajectory generator controls the motor
output. For all motor types, when the encoder source (Set/GetEncoderSource) is set to incremental
or parallel, the position error is cleared; equivalent to a C learPositionError command.
When the motor mode is set to Off, the axis is in open-loop mode, and is controlled by commands
placed directly into the motor output register by the host. Setting the motor mode to Off also
resets the trajectory generator, bringing any active motion to an abrupt stop. In addition, the
maximum velocity (Set/GetVelocity) is set to zero. On axes configured for step motor and
microstepping motor types, the step generator is switched off when the motor mode is set to Off.
Motor Type
Motor Mode
Motor Output Source
DC brush; brushless
DC
off
Motor command register
on
servo filter
Pulse & direction;
microstepping
off
N/A
on
Trajectory generator
GetMotorMode returns the current motor mode.
Restriction
see
GetActivityStatus, Set/GetMotorCommand
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetMotorMode(hPosys#, axis, mode)
GetMotorMode(hPosys#, axis)
-o-
305
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetMotorType
SetMotorType
GetMotorType
only valid for POSYS® 18xx/19xx
Syntax
SetMotorType(hPosys, axis, type) stdcall
GetMotorType(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
type
Brushless DC (3 phase)
Brushless DC (2 phase)
Microstepping (3 phase)
Microstepping (2 phase)
Pulse & Direction
DC Brush
0
1
2
3
4
7
Description
Pulse & Direction
SetMotorTypesets type of motor being driven by the selected axis. This operation sets the
number of phases for commutation on the axis, as well as internally configuring the motion IC for
the motor type. Refer to the POSYS® User's Guide for more information. For each motor type the
table below lists the number of phases that will be commutated.
GetMotorType returns the configured motor type for the selected axis.
Restriction
Motor Type
Commutation
DC Brushless (3 phase)
3 phase
DC Brushless (2 phase)
2 phase
Microstepping (3 phase)
3 phase
Microstepping (2 phase)
2 phase
Pulse & Direction
None
DC Brushed
None
only valid for POSYS® 18xx/19xx.
The motor type should only be set once for each axis; either via the motor configuration word
during device startup, or immediately after reset using SetMotorType. Once it has been set, it
should not be changed.
see
Set/GetOutputMode
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetMotorType(hPosys#, axis, type)
GetMotorType(hPosys#, axis)
-o-
306
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetOutputMode
SetOutputMode
GetOutputMode
Syntax
SetOutputMode(hPosys, axis, mode) stdcall
GetOutputMode(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
mode
Bipolar DAC
PWMSignMagnitude
PWM5050Magnitude
SPIDAC
Unipolar DAC
0
1
2
3 (only POSYS® 18xx/19xx)
4 (only POSYS® 18xx/19xx)
Description
SetOutputModedetermines the form of the motor output signal of the specified axis.
GetOutputMode returns the code for the current motor output mode.
Restriction
see
Set/GetMotorType
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetOutputMode(hPosys#, axis, mode)
GetOutputMode(hPosys#, axis)
-o-
307
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetPWMFrequency
SetPWMFrequency
GetPWMFrequency
only valid for POSYS® 18xx/19xx
Syntax
SetPWMFrequency(hPosys, axis, frequency) stdcall
GetPWMFrequency(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Type
frequency
Description
unsigned 16 bits
Range
0 to 2
Scaling
8
1/2
Units
kHz
16
-1
SetPWMFrequencysets the PWM output frequency (in kHz) for the specified axis. Only two
frequencies are supported by the POSYS®; these are shown in the table below. To select one of
the supported frequencies, pass the value listed in the SetPWMFrequency Value column as the
frequency argument to this command.
GetPWMFrequency returns the programmed value.
Restriction
Frequency
PWM Bit Resolution
Actual Frequency
SetPWMFrequency Value
20 kHz
10 bit
19.531 kHz
5
80 kHz
8 bit
78.124 kHz
20
This command is only valid for the POSYS® 18xx/19xx series.
Only 20 kHz and 80 kHz are currently supported by the POSYS® Motion C ontroller.
This command is not available on POSYS® 1800/1900 boards with Piezo-functionality. The PWM
frequency is set to 20 kHz/10-bit resolution and can not be changed.
see
Set/GetOutputMode
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetPWMFrequency(hPosys#, axis, frequency)
GetPWMFrequency(hPosys#, axis)
-o-
308
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetStepRange
SetStepRange
GetStepRange
Syntax
SetStepRange(hPosys, axis, frequency) stdcall
GetStepRange(hPosys, axis) stdcall
Motor type
Arguments
Description
Pulse & Direction
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
frequency
5 MHz
625 KHz
156.25 KHz
39.062 KHz
1
4
6
8
SetStepRangesets the maximum pulse rate frequency for the specified axis. For example, if the
desired maximum pulse rate is 200.000 pulses/sec., the command SetStepRange 4 should be
issued.
GetStepRange returns the maximum pulse rate frequency for the specified axis.
Restriction
This command is only valid for stepper motor cards or for cards with axes running in stepper
mode.
see
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetStepRange(hPosys#, axis, frequency)
GetStepRange(hPosys#, axis)
-o-
309
© POSYS Motion Control GmbH & Co.KG, 2013
Operating Mode, Event und Update Control
310
© POSYS Motion Control GmbH & Co.KG, 2013
GetActiveOperatingMode
GetActiveOperatingMode
only valid for POSYS® 1800/1900 with firmware version >2.x
Syntax
GetActiveOperatingMode(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Name
Type
mode
unsigned 16 bits
Returned Data
Description
bit field
GetActiveOperatingModegets the actual Operating Mode that the
axis is currently in. This may
or may not be the same as the static Operating Mode, as safety responses or programmable
conditions may change the Active Operating Mode. When this occurs, the Active Operating Mode
can be changed to the programmed static Operating Mode using the RestoreOperatingMode
command. The bit definitions of the Operating Mode are given below.
Name
Bit
Description
Axis Enabled
0
0: No axis processing, axis outputs in Reset
state. 1: Axis active.
Motor Output Enabled
1
0: Axis motor outputs disabled. 1: Axis motor
outputs enabled.
Reserved
2-3
Position Loop Enabled
4
0: Axis position loop bypassed. 1: Axis position
loop active.
Trajectory Enabled
5
0: Trajectory Generator disabled. 1: Trajectory
Generator enabled.
Reserved
6-15
When the axis is disabled, no processing will be done on the axis, and the axis outputs will be at
their reset states. When the axis motor output is disabled, the axis will function normally, but its
motor outputs will be in their disabled state. When a loop is disabled (position or current loop), it
operates by passing its input directly to its output, and clearing all internal state variables (such as
integrator sums, etc.). When the Trajectory Generator is disabled, it operates by commanding zero
(0) velocity.
Restrictions
The possible modes of an axis are axis specific. Refer to the product user’s guide for a description
of what modes are supported on each axis.
see
Set/GetOperatingMode, RestoreOperatingMode, Set/GetEventAction, Set/GetBreakpoint
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
GetActiveOperatingMode(hPosys#, axis)
-o-
311
© POSYS Motion Control GmbH & Co.KG, 2013
MultiUpdate
MultiUpdate
Syntax
MultiUpdate(hPosys, mask) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
mask
None
Axis1mask
Axis2mask
Axis3mask
Axis4mask
0
1
2
4
8
Description
Pulse & Direction
MultiUpdate causes an Update to occur on all axes whose corresponding bit is set to 1 in the
mask argument. After this command is executed, and for those axes which are selected using the
mask, all buffered data parameters are copied into the corresponding run-time registers.
The following instruction is buffered: C learPositionError.
The following trajectory parameters are buffered: Acceleration, Deceleration, GearRatio, Jerk,
Position, ProfileMode, StartVelocity, StopMode, and Velocity.
The following PID filter parameters are buffered: DerivativeTime, IntegrationLimit, Kaff, Kd, Ki, Kp,
and Kvff.
The following Motor C ommand parameter is buffered: MotorC ommand
Restriction
see
Update
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
MultiUpdate(hPosys#, mask)
-o-
312
© POSYS Motion Control GmbH & Co.KG, 2013
RestoreOperatingMode
RestoreOperatingMode
only valid for POSYS® 1800/1900 with firmware version >2.x
Syntax
RestoreOperatingMode(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Pulse & Direction
Description
RestoreOperatingModeis used to command theaxis to return to its static Operating Mode. It
should be used when the Active Operating Mode has changed due to actions taken from safety
events or other programmed events. C alling RestoreOperatingMode will re-enable all loops that
were disabled as a result of events.
Restriction
Before using RestoreOperatingMode to return to the static Operating Mode, the
Event Status
Register bits should all be cleared. If a bit in Event Status that caused a change in Operating Mode
is not cleared, this command will return an error. An exception to this is Motion Error, which does
not have to be cleared prior to restoring the Operating Mode.
Though RestoreOperatingMode will re-enable the trajectory generator (if it was disabled as a result
of an event action), it will not resume a move. This must be done through an Update or
MultiUpdate.
see
GetActiveOperatingMode, Set/GetOperatingMode, Set/GetEventAction, Set/GetBreakpoint
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
RestoreOperatingMode(hPosys#, axis)
-o-
313
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetEventAction
SetEventAction
GetEventAction
only valid for POSYS® 1800/1900 with firmware version >2.x
Syntax
SetEventAction(hPosys, axis, event, action) stdcall
GetEventAction(hPosys, axis, event) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
Wert zurückgeliefert durch Aufruf von
OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
event
Immediate
Positive Limit
Negative Limit
Motion Error
0
1
2
3
action
none
0
Reserved
1
Abrupt Stop
2
Smooth Stop
3
Reserved
4
Disable Position Loop & 5
Higher Modules
n/a
6
Disable Motor Output & 7
Higher Modules
Abrupt Stop with
8
Position Error Clear
Description
Pulse & Direction
SetEv entActionconfigures what actions will be taken by the
axis in response to a givenevent.
The action can be either to modify the Operating Mode by disabling some or all of the loops, or, in
the case of all loops remaining on, to perform an abrupt or smooth stop. The
Abrupt Stop action
can be done with or without a clearing of the position error.
When, through SetEventAction one of the
events causes an action, the event bit in the Event
Status register must be cleared prior to returning to operation. For trajectory stops, this means
that the bit must be cleared prior to performing another trajectory move. For changes in
Operating Mode, this means that the bit must be cleared prior to restoring the Operating Mode,
either by RestoreOperatingMode or SetOperatingMode.
An exception is the Motion Error event, which only needs to be cleared in Event Status ifaction
its
is Abrubt Stop or Smooth Stop. If it causes changes in Operating Mode, the Operating Mode can
be restored without clearing the bit in Event Status first.
GetEventAction gets the action that is currently programmed for the given event with the
exception of the Immediate event, which cannot be read back.
Restriction
If a Smooth Stop action occurs while the trajectory mode is S-curve, the trajectory cannot be
restarted until the smooth stop is complete. If a Smooth Stop action occurs while the trajectory
mode is electronic gearing, an abrupt stop will occur.
see
GetActiveOperatingMode, RestoreOperatingMode, Set/GetOperatingMode
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetEventAction(hPosys#, axis, event, action)
GetEventAction(hPosys#, axis, event)
-o-
314
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetOperatingMode
SetOperatingMode
GetOperatingMode
only valid for POSYS® 1800/1900 with firmware version >2.x
Syntax
SetOperatingMode(hPosys, axis, mode) stdcall
GetOperatingMode(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
Wert zurückgeliefert durch Aufruf von
OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
mode
unsigned 16 bit
see below
Description
Pulse & Direction
SetOperatingModeconfigures the Operating Mode of the
axis. Each bit of the mode configures
whether a feature/loop of theaxis is active or disabled, as follows:
Name
Bit
Description
Axis enabled
0
0: No axis processing, axis outputs in reset
state. 1: Axis active.
Motor Output Enabled
1
0: Axis motor outputs disabled. 1: Axis motor
outputs enabled.
Reserved
2-3
Reserved
Position Loop Enabled
4
0: Axis position loop bypassed. 1: Axis position
loop active.
Trajectory Enabled
5
0: Trajectory Generator disabled. 1: Trajectory
Generator enabled.
Reserved
6-15
Reserved
When the axis is disabled, no processing will be done on the axis, and the axis outputs will be at
their reset states. When the axis motor output is disabled, the axis will function normally, but its
motor outputs will be in their disabled state. When a loop is disabled (position or current loop), it
operates by passing its input directly to its output, and clearing all internal state variables (such as
integrator sums, etc.). When the Trajectory Generator is disabled, it operates by commanding 0
velocity.
For example, to configure an axis for Torque Mode, (trajectory and position loop disabled) the
Operating Mode would be set to hexadecimal 0007h.
This command should be used to configure the static Operating Mode of the
axis. The actual
current Operating Mode may be changed by the axis in response to safety events, or
user-programmable events. In this case, the present Operating Mode is available using
GetActiveOperatingMode. GetOperatingMode will always return the static Operating Mode set using
SetOperatingMode. Executing the SetOperatingMode command sets both the static Operating Mode
and the Active Operating Mode to the desired state.
GetOperatingModegets the operating mode of theaxis.
Restrictions
see
GetActiveOperatingMode, RestoreOperatingMode
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetOperatingMode(hPosys#, axis, mode)
GetOperatingMode(hPosys#, axis)
-o-
315
© POSYS Motion Control GmbH & Co.KG, 2013
316
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetUpdateMask
SetUpdateMask
GetUpdateMask
only valid for POSYS® 1800/1900 with firmware version >2.x
Syntax
SetUpdateMask(hPosys, axis, mask) stdcall
GetUpdateMask(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Type
Scaling
unsigned 16 bits
bitmask
mask
Description
Pulse & Direction
SetUpdateMaskconfigures what loops in theaxis are updated when an update is executed on
the given axis. If the bitmask for a given loop is set in the
mask, the operating parameters for
that loop will be updated from the buffered values when an
Update or MultiUpdate command is
received.
Name
Bit(s)
Description
Trajectory
0
Set to 1 to update trajectory from buffered
parameters.
Position Loop
1
Set to 1 to update position loop from buffered
parameters.
Reserved
2-15
GetUpdateMaskgets the Update Mask for the indicated axis.
Restrictions
see
Set/GetBreakpointUpdateMask, Update, MultiUpdate
DLL: Delphi, C++,
VB
wir verweisen auf die verschiedenen Importdateien (imp*.*)
MotionScript®
language calling
convention
SetUpdateMask(hPosys#, axis, mask)
GetUpdateMask(hPosys#, axis)
-o-
317
© POSYS Motion Control GmbH & Co.KG, 2013
Update
Update
Syntax
Update(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Description
Pulse & Direction
Update causes all buffered data parameters are copied into the corresponding run-time registers
on the specified axis.
The following instruction is buffered: C learPositionError.
The following trajectory parameters are buffered: Acceleration, Deceleration, GearRatio, Jerk,
Position, ProfileMode, StopMode, and Velocity.
The following PID filter parameters are buffered: DerivativeTime, IntegrationLimit, Kaff, Kd, Ki, Kp,
and Kvff.
The following motor command parameters is buffered: MotorCommand.
Restriction
see
MultiUpdate
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
Update(hPosys#, axis)
-o-
318
© POSYS Motion Control GmbH & Co.KG, 2013
Profile Generation
GetCommandedAcceleration
GetCommandedAcceleration
Syntax
GetCommandedAcceleration(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Name
Type
acceleration
signed 32 bits
Returned data
Description
Pulse & Direction
Range
31
31
-2
to 2 -1
Scaling
16
1/2
Units
counts/cycle²
steps/cycle²
GetCommandedAcceleration
returns the commanded acceleration value for the specified
axis.
C ommanded acceleration is the instantaneous acceleration value output by the trajectory
generator.
Scaling example: If a value of 114,688 is retrieved using this command then this corresponds to
114,688/65,536 = 1.750 counts/cycle² acceleration value.
Restriction
This command functions only in the trapezoidal, s-curve and velocity contouring profile modes.
see
GetCommandedPosition, GetCommandedVelocity
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
GetCommandedAcceleration(hPosys#, axis)
-o-
319
© POSYS Motion Control GmbH & Co.KG, 2013
GetCommandedPosition
GetCommandedPosition
Syntax
GetCommandedPosition(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Name
Type
position
signed 32 bits
Returned Data
Description
Pulse & Direction
Range
31
31
-2
to 2 -1
Scaling
unity
Units
counts
steps
GetCommandedPositionreturns the current commanded position for the specified axis.
C ommanded position is the instantaneous position value output by the trajectory generator.
This command functions in all profile modes.
Restriction
see
GetCommandedAcceleration, GetCommandedVelocity
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
GetCommandedPosition(hPosys#, axis)
-o-
320
© POSYS Motion Control GmbH & Co.KG, 2013
GetCommandedVelocity
GetCommandedVelocity
Syntax
GetCommandedVelocity(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Name
Type
velocity
signed 32 bits
Returned Data
Description
Pulse & Direction
Range
31
31
-2
to 2 -1
Scaling
16
1/2
Units
counts/cycle
Steps/cycle
GetCommandedVelocityreturns the current commanded velocity value for the specified axis.
C ommanded velocity is the instantaneous velocity value output by the trajectory generator.
Scaling example: If a value of -1,234,567 is retrieved using this command (FFEDh in high word,
2979h in low word) then this corresponds to 1,234,567/65,536 18.8380 counts/cycle velocity
value.
This command functions in all profile modes.
Restriction
see
GetCommandedAcceleration, GetCommandedPosition
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
GetCommandedVelocity(hPosys#, axis)
-o-
321
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetAcceleration
SetAcceleration
GetAcceleration
Syntax
SetAcceleration(hPosys, axis, acceleration) stdcall
GetAcceleration(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Name
Type
acceleration
unsigned 32 bit
Description
Range
Pulse & Direction
0 to 2
31
-1
Scaling
16
1/2
Units
counts/cycle²
steps/cycle²
SetAccelerationloads the maximum acceleration buffer register for the specified axis. This
command is used with the Trapezoidal, Velocity C ontouring, and S-profiling modes.
GetAccelerationreads the maximum acceleration buffer register set by the previous
SetAcceleration command.
Scaling example: To load a value of 1.750 counts/cycle² multiply by 65,536 (giving 114,688) and
load the resultant number as a 32 bit number, giving 0001 in the high word and C 000h in the low
word. Values returned by GetAcceleration must correspondingly be divided by 65,536 to convert to
units of counts/cycle² or steps/cycle².
Please note that the values are scaled. To load a value of 2.58 counts/cycle² multiply 2.58 * 65536
= 169083 and load this value.
Restriction
SetAcceleration may not be issued while an axis is in motion with the S-curve profile.
SetAcceleration is not valid in Electronic Gearing profile mode.
SetAcceleration is a buffered command. The value set using this command will not take effect until
the next Update or MultiUpdate instruction.
see
Set/GetDeceleration, Set/GetJerk, Set/GetPosition, Set/GetVelocity, MultiUpdate,
Update
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetAcceleration(hPosys#, axis, acceleration)
GetAcceleration(hPosys#, axis)
-o-
322
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetDeceleration
SetDeceleration
GetDeceleration
Syntax
SetDeceleration(hPosys, axis, deceleration) stdcall
GetDeceleration(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Pulse & Direction
Type
deceleration
Description
unsigned 32 bits
Range
0 to 2
31
-1
Scaling
16
1/2
Units
counts/cycle²
steps/cycle²
SetDecelerationloads the maximum deceleration buffer register for the specified axis.
GetDecelerationreads the Maximum Deceleration buffer.
Scaling example: To load a value of 1.750 counts/cycle² multiply by 65,536 (giving 114,688) and
load the resultant number as a 32 bit number, giving 0001 in the high word and C000h in the low
word. Retrieved numbers (GetDeceleration) must correspondingly be divided by 65,536 to convert
to units of counts/cycle² or steps/cycle².
Restriction
This is a buffered command. The new value set will not take effect until the next Update or
MultiUpdate instruction is entered.
These commands are used with the Trapezoidal and Velocity contouring profile modes. They are
not used with the electronic gearing, S-curve or external profile mode.
Note: If deceleration is set to zero then the acceleration value will be used.
see
Set/GetAcceleration, Set/GetPosition, Set/GetVelocity, MultiUpdate, Update
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetDeceleration(hPosys#, axis, deceleration)
GetDeceleration(hPosys#, axis)
-o-
323
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetGearMaster
SetGearMaster
GetGearMaster
Syntax
SetGearMaster(hPosys, axis, masterAxis, source) stdcall
GetGearMaster(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
masterAxis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
source
Actual
Commanded
0
1
Description
Pulse & Direction
SetGearMasterestablishes the slave (axis) and master (masterAxis) axes for the
electronic-gearing profile, and sets the source, Actual or C ommanded, of the master axis position
data to be used.
The masterAxis determines what axis will drive the slave axis. Both the slave and the master axes
must be enabled (SetAxisMode command). The source determines whether the master axis'
commanded position as determined by the trajectory generator will be used to drive the slave axis,
or whether the master axis' encoder position will be used to drive the slave.
GetGearMaster returns the codes for the geared axes and position source.
Restriction
For electronic gear mode to operate properly the master axis must be enabled. The command
Set/GetProfileMode must be set to "Electronic Gearing".
see
Set/GetGearRatio, Set/GetProfileMode, MultiUpdate, Update
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetGearMaster(hPosys#, axis, masterAxis, source)
GetGearMaster(hPosys#, axis)
-o-
324
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetGearRatio
SetGearRatio
GetGearRatio
Syntax
SetGearRatio(hPosys, slaveAxis, ratio) stdcall
GetGearRatio(hPosys, slaveAxis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
slaveAxis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Pulse & Direction
Type
ratio
Description
signed 32 bits
Range
31
31
-2
to 2 -1
Scaling
16
1/2
Units
Slavecounts/
Mastercounts
SetGearRatiosets the ratio between the master and the slave axes for the electronic gearing
profile for the currentaxis. Positive ratios cause the slave to move in the same direction as the
master, negative ratios in the opposite direction. The specified ratio has a unity scaling of 65,536
(means 65,536 increments for the MasterAxis = 1 increment for the SlaveAxis).
GetGearRatioreturns the gear ratio set for the specified slave axis.
Scaling example:
ratio value
resultant ratio
-32,768
.5 negative slave counts for each positive master count
1,000,000
15.259 positive slave counts for each positive master count
123
.0018 positive slave counts for each positive master count
Restriction
This is a buffered command. The new value set will not take effect until the next Update or
MultiUpdate instruction is entered.
see
Set/GetGearMaster, Set/GetProfileMode, MultiUpdate, Update
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetGearRatio(hPosys#, slaveAxis, ratio)
GetGearRatio(hPosys#, slaveAxis)
-o-
325
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetJerk
SetJerk
GetJerk
Syntax
SetJerk(hPosys, axis, jerk) stdcall
GetJerk(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Pulse & Direction
Type
jerk
Description
unsigned 32 bits
Range
0 to 2
31
-1
Scaling
32
1/2
Units
counts/cycle³
steps/cycle³
SetJerk loads the jerk register in the parameter buffer for the specified axis.
GetJerk reads the contents of the jerk register.
Scaling example: To load a jerk value (time rate of change of acceleration) of .012345
32
counts/cycle³ (or steps/cycle³) multiply by 2 or 4,294,967,296. In this example this gives a
value to load of 53,021,371 (decimal) which corresponds to a high word of 0329h and a low word
of 0ABBh when loading each word in hexadecimal.
Restriction
SetJerk is a buffered command. The value set using this command will not take effect until the
next Update or MultiUpdate instruction.
This command is used only with the S-curve profile mode. It is not used with the trapezoidal,
velocity contouring, or electronic gear profile modes.
see
Set/GetAcceleration, Set/GetDeceleration, Set/GetPosition, Set/GetVelocity,
MultiUpdate, Update
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetJerk(hPosys#, axis, jerk)
GetJerk(hPosys#, axis)
-o-
326
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetPosition
SetPosition
GetPosition
Syntax
SetPosition(hPosys, axis, position) stdcall
GetPosition(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Pulse & Direction
Type
position
Description
signed 32 bits
Range
31
31
-2
to 2 -1
Scaling
unity
Units
counts
steps
SetPosition specifies the trajectory destination of the specified axis. It is used in the Trapezoidal
and S-curve profile modes.
GetPosition reads the contents of the buffered position register.
Restriction
SetPosition is a buffered command. The value set using this command will not take effect until the
next Update or MultiUpdate instruction.
see
Set/GetAcceleration, Set/GetDeceleration, Set/GetJerk, Set/GetVelocity,
GetPositionError, Set/GetPositionErrorLimit, MultiUpdate, Update
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetPosition(hPosys#, axis, position)
GetPosition(hPosys#, axis)
-o-
327
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetProfileMode
SetProfileMode
GetProfileMode
Syntax
SetProfileMode(hPosys, axis, profile) stdcall
GetProfileMode(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
profile
Trapezoidal
Velocity
S-curve
Electronic gear
External
0
1
2
3
4
Description
Pulse & Direction
SetProfileModesets the profile mode, selecting Trapezoidal, Velocity C ontouring, S-curve,
Electronic gear, or External for the specified axis.
GetProfileMode returns the contents of the buffered profile-mode register for the specified axis.
Restriction
SetProfileMode is a buffered command. The value set using this command will not take effect until
the next Update or MultiUpdate instruction.
see
MultiUpdate, Update, Set/GetGearMaster, Set/GetGearRatio, Set/GetBufferFunction
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetProfileMode(hPosys#, axis, profile)
GetProfileMode(hPosys#, axis)
-o-
328
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetStartVelocity
SetStartVelocity
GetStartVelocity
Syntax
SetStartVelocity(hPosys, axis, velocity) stdcall
GetStartVelocity(hPosys, axis) stdcall
Motor type
Arguments
Microstepping
Pulse & Direction
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Type
velocity
Description
unsigned 32 bits
Range
0 to 2
31
-1
Scaling
16
1/2
Units
counts/cycle
steps/cycle
SetStartVelocityloads the starting velocity buffer register for the specified axis.
GetStartVelocityreads the starting velocity buffer register.
Scaling example: To load a starting velocity value of 1.750 counts/cycle multiply by 65,536 (giving
114,688) and load the resultant number as a 32 bit number, giving 0001 in the high word and
C 000h in the low word. Retrieved numbers (GetStartVelocity) must correspondingly be divided by
65,536 to convert to units of counts/cycle.
Restriction
StartVelocity is only used in the Velocity Contouring and Trapezoidal profile modes.
SetStartVelocity is a buffered command. The value set using this command will not take effect until
the next Update or MultiUpdate instruction.
see
Set/GetAcceleration, Set/GetDeceleration, Set/GetVelocity, Set/GetPosition, MultiUpdate, Update
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetStartVelocity(hPosys#, axis, velocity)
GetStartVelocity(hPosys#, axis)
-o-
329
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetStopMode
SetStopMode
GetStopMode
Syntax
SetStopMode(hPosys, axis, mode) stdcall
GetStopMode(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
mode
NoStop
AbruptStop
SmoothStop
0
1
2
Description
Pulse & Direction
SetStopModestops the specified axis. The available stop modes are AbruptStop, which instantly
(without any deceleration phase) stops the axis, SmoothStop which uses the programmed
deceleration value and profile shape for the current profile mode to stop the axis, or NoStop which
is generally used to turn off a previously set stop command.
Note: After an Update a buffered stop command (SetStopMode command) will reset to the NoStop
condition. In other words if the command SetStopMode is followed by an Update command and
then by a GetStopMode command, the retrieved stop mode will be NoStop.
GetStopMode returns the stop mode set using SetStopMode.
Restriction
SmoothStop mode is not valid in the electronic-gearing profile.
SetStopMode is a buffered command. The value set using this command will not take effect until
the next Update or MultiUpdate instruction.
see
MultiUpdate, Update
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetStopMode(hPosys#, axis, mode)
GetStopMode(hPosys#, axis)
-o-
330
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetVelocity
SetVelocity
GetVelocity
Syntax
SetVelocity(hPosys, axis, velocity) stdcall
GetVelocity(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Pulse & Direction
Type
velocity
Description
signed 32 bits
Range
31
31
-2
to 2 -1
Scaling
16
1/2
Units
counts/cycle
steps/cycle
SetVelocityloads the maximum velocity buffer register for the specified axis.
GetVelocityreturns the contents of the maximum velocity buffer register.
Scaling example: To load a velocity value of 1.750 counts/cycle multiply by 65,536 (giving
114,688) and load the resultant number as a 32 bit number, giving 0001 in the high word and
C 000h in the low word. Retrieved numbers (GetVelocity) must correspondingly be divided by
65,536 to convert to units of counts/cycle.
Restriction
SetVelocity may not be issued while an axis is in motion with the S-curve profile.
SetVelocity is not valid in Electronic Gear or External profile mode.
The velocity must not be < 0 except in the Velocity-C ontouring profile mode.
SetVelocity is a buffered command. The value set using this command will not take effect until the
next Update or MultiUpdate instruction.
see
Set/GetAcceleration, Set/GetDeceleration, Set/GetJerk, Set/GetPosition, MultiUpdate, Update
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetVelocity(hPosys#, axis, velocity)
GetVelocity(hPosys#, axis)
-o-
331
© POSYS Motion Control GmbH & Co.KG, 2013
Servo Loop Control
GetTime
GetTime
Syntax
GetTime(hPosys) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
Name
Type
time
unsigned 32 bits
Returned Data
Description
Range
Pulse & Direction
0 to 2
32
Scaling
unity
Units
cycles
-1
Returns the number of cycles that have occurred since the POSYS® was last initialized or reset.
Restriction
see
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
GetTime(hPosys#)
-o-
332
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetAxisMode
SetAxisMode
GetAxisMode
Syntax
SetAxisMode(hPosys, axis, mode) stdcall
GetAxisMode(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
mode
off
on
0
1
Description
Pulse & Direction
SetAxisModeenables (On) or disables (off) the specified axis. A disabled axis will not respond to
profile or other motion commands.
GetAxisMode returns the current status of the specified axis.
Restriction
Disabled axes do not provide encoder feedback. If it is desired that an axis provide encoder
feedback even though no profiling or servo control is to be used, that axis must be left enabled.
see
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetAxisMode(hPosys#, axis, mode)
GetAxisMode(hPosys#, axis)
-o-
333
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetLimitSwitchMode
SetLimitSwitchMode
GetLimitSwitchMode
Syntax
SetLimitSwitchMode(hPosys, axis, mode) stdcall
GetLimitSwitchMode(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
mode
off
on
0
1
Description
Pulse & Direction
SetLimitSwitchModeenables (On) or disables (Off) limit-switch sensing for the specified axis.
When the mode is enabled, the axis will cause the corresponding limit-switch bits in the Event
Status register and Activity Status register to be set when it enters either the positive or negative
limit switches and the axis will be immediately stopped. When it is disabled these bits are not set,
regardless of whether the axis is in a limit switch or not.
GetLimitSwitchMode returns the code for the current state of the limit-sensing mode.
Restriction
see
GetActivityStatus, GetEventStatus
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetLimitSwitchMode(hPosys#, axis, mode)
GetLimitSwitchMode(hPosys#, axis)
-o-
334
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetMotionCompleteMode
SetMotionCompleteMode
GetMotionCompleteMode
Syntax
SetMotionCompleteMode(hPosys, axis, mode) stdcall
GetMotionCompleteMode(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
mode
commanded
actual
0
1
Description
Pulse & Direction
SetMotionCompleteModeestablishes the source for the comparison which determines the
motion-complete status for the specified axis. When set to commanded mode the motion is
considered complete when the profile velocity reaches zero and no further motion will occur
without an additional host command. This mode is unaffected by the actual encoder location.
When set to actual mode the motion complete bit will be set when the above condition is true AND
the actual encoder position has been within the Settle Window (SetSettleWindow command) for the
number of servo loops specified by the SetSettleTime command. The settle "timer" is started at
zero at the end of the trajectory profile motion so at a minimum a delay of SettleTime cycles will
occur after the trajectory profile motion is complete.
GetMotionCompleteMode reads the code for the current motion-complete mode.
Restriction
see
Set/GetSettleTime, Set/GetSettleWindow
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetMotionCompleteMode(hPosys#, axis, mode)
GetMotionCompleteMode(hPosys#, axis)
-o-
335
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetSampleTime
SetSampleTime
GetSampleTime
Syntax
SetSampleTime(hPosys, time) stdcall
GetSampleTime(hPosys) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
Pulse & Direction
POSYS® 18xx/19xx
Type
time
Description
unsigned 32 bits
POSYS® 7xx, 8xx,
8xx-B, 9xx
Type
time
unsigned 16 bits
Range
51 to 220
Scaling
unity
Units
µsec/cycle
Range
1 to 2
15
-1
Scaling
unity
Units
µsec/cycle
SetSampleTimesets the time basis for the POSYS®. This time basis determines the trajectory
update rate for all motor types as well as the servo loop calculation rate for the servo axes. It does
not, however, determine the commutation rate of the Brushless DC motor types.
The time value is expressed microseconds. The POSYS® hardware can adjust the cycle time only in
increments of 64 microseconds (depends on number of activated axes); the time value passed to
this command will be rounded up to the nearest increment of this base value.
GetSampleTimereturns the current sample time value.
Minimum cycle time depends on the number of enabled axes as follows:
POSYS® 18xx and 19xx series
# enabled axes
Minimum cycle time
Cycle time w/ trace
capture
Cycle time
Time per axis
Maximum cycle
frequency
1
51.2 µs
102.4 µs
102.4 µs
19.53 kHz
(9.76 kHz w/ Trace
C apture)
2
153.6 µs
153.6 µs
76.8 µs
6.51 kHz
3
204.8 µs
204.8 µs
68.3 µs
4.88 kHz
4
256 µs
256 µs
64 µs
3.91 kHz
Minimum cycle time
brushed and stepper
versions
Minimum cycle time
brushless DC and
microstepping versions
Maximum cycle
Maximum cycle
frequency brushed
frequency brushless
and stepper versions DC and microstepping versions
1
102.4 µs
153.6 µs
10 kHz
6.51 kHz
2
204.8 µs
307.2 µs
5 kHz
3.255 kHz
3
307.2 µs
460.8 µs
3.33 kHz
4.822 kHz
4
409.6 µs
614.4 µs
2.5 kHz
1.627 kHz
POSYS® 7xx, 8xx, 8xx-B and 9xx series
# enabled axes
Restriction
This command affects the cycle time for all axes on multi-axis configurations.
This command cannot be used to set a sample time lower than the required minimum cycle time
for the current configuration. Attempting to do so will set the sample time to the required minimum
cycle time as specified in the previous table.
see
DLL: Delphi, C++,
Refer to the various import files (imp*.*)
336
© POSYS Motion Control GmbH & Co.KG, 2013
VB
MotionScript®
language calling
convention
SetSampleTime(hPosys#, time)
GetSampleTime(hPosys#)
-o-
337
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetSettleTime
SetSettleTime
GetSettleTime
Syntax
SetSettleTime(hPosys, axis, time) stdcall
GetSettleTime(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Pulse & Direction
Type
time
Description
unsigned 16 bits
Range
0 to 2
15
Scaling
unity
Units
cycles
-1
SetSettleTimesets the time, in number of cycles, that the specified axis must remain within the
settle window before the axis-settled indicator (in the activity status register) is set.
GetSettleTime returns the current settle time for the specified axis.
Restriction
see
Set/GetMotionCompleteMode, Set/GetSettleWindow, GetActivityStatus
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetSettleTime(hPosys#, axis, time)
GetSettleTime(hPosys#, axis)
-o-
338
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetSettleWindow
SetSettleWindow
GetSettleWindow
Syntax
SetSettleWindow(hPosys, axis, window) stdcall
GetSettleWindow(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Pulse & Direction
POSYS® 18xx, 19xx
Type
window
Description
unsigned 16 bits
POSYS® 7xx, 8xx,
8xx-B, 9xx
Type
window
unsigned 16 bits
Range
0 to 2
16
Scaling
unity
Units
counts
Range
0 to 2
15
Scaling
unity
Units
counts
-1
-1
SetSettleWindowsets the position range within which the specified axis must remain for the
duration specified by SetSettleTime before the axis-settled indicator (in the activity status register)
is set.
GetSettleWindow returns the current value of the settle window.
Restriction
see
Set/GetMotionCompleteMode, Set/GetSettleTime, GetActivityStatus
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetSettleWindow(hPosys#, axis, window)
GetSettleWindow(hPosys#, axis)
-o-
339
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetTrackingWindow
SetTrackingWindow
GetTrackingWindow
Syntax
SetTrackingWindow(hPosys, axis, window) stdcall
GetTrackingWindow(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Pulse & Direction
POSYS® 18xx/19xx
Type
window
Description
unsigned 16 bits
POSYS® 7xx, 8xx,
8xx-B, 9xx
Type
window
unsigned 16 bits
Range
0 to 2
16
Scaling
unity
Units
counts
Range
0 to 2
15
Scaling
unity
Units
counts
-1
-1
SetTrackingWindowsets boundaries for the actual position of the specified axis. If the axis
crosses the window boundary in either direction, the tracking indicator (bit 2 of the activity status
register) is set to 0. When the axis returns to within the window, the tracking indicator is set to 1.
GetTrackingWindow returns the value of the current tracking window.
Restriction
see
GetActivityStatus, Set/GetActualPosition
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetTrackingWindow(hPosys#, axis, window)
GetTrackingWindow(hPosys#, axis)
-o-
340
© POSYS Motion Control GmbH & Co.KG, 2013
Status Register and AxisOut Indicator
GetActivityStatus
GetActivityStatus
Syntax
GetActivityStatus(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Arguments
Name
Instance
hPosys
C ardHandle
Microstepping
Pulse & Direction
Encoding
value returned by call to OpenDevice
axis
Returned Data
0
1
2
3
Type
status
Description
Axis1
Axis2
Axis3
Axis4
unsigned 16 bits
see below
GetActivity Statusreads the 16 bit activity status register for the specified axis. Each of the bits
in this register continuously indicate the state of the POSYS® without any action on the part of
the host. There is no direct way to set or clear the state of these bits, since they are controlled by
the POSYS®.
The following table shows the encoding of the data returned by this command.
Name
Bit Number
Description
Phasing Initialized
0
Set to 1 if phasing is initialized (axes in DC
brushless mode only)
At maximum velocity
1
Set to 1 when the trajectory is at maximum
velocity. This bit is determined by the
trajectory generator, not the actual encoder
velocity.
Tracking
2
Set to 1 when the axis is within the tracking
window
3-5
C ontains trajectory mode encoded as mode
follows:
C urrent profile mode
Bit 1
Bit 2
Bit 3
Profile
Mode
0
0
0
Trapezoidal
0
0
1
Velocity
contouring
0
1
0
S-curve
0
1
1
Electronic
gear
1
0
0
External
profile mode
reserved
6
Not used, may be 0 or 1
Axis settled
7
Set to 1 when the axis is settled
Motor on/off
8
Set to 1 when motor mode is on, 0 when off.
Position capture
9
Set to 1 when a value has been captured by
the high speed position capture hardware but
has not yet been read. The GetCaptureValue
command must be executed before another
capture can occur.
In-motion
10
Set to 1 when the trajectory generator is
executing a profile on the axis.
In positive limit
11
Set to 1 when the positive limit switch is
341
© POSYS Motion Control GmbH & Co.KG, 2013
active
In negative limit
12
Set to 1 when the negative limit switch is
active
Profile segment
13-15
Only used during S-curve profile mode.
C ontains value of 0 when the profile is at
rest. Contains phase number 1-7 when
profile is in motion.
Restriction
see
GetEventStatus, GetSignalStatus, ResetEventStatus
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
GetActivityStatus(hPosys#, axis)
-o-
342
© POSYS Motion Control GmbH & Co.KG, 2013
GetAxis_In_Out_Home
GetAxis_In_Out_Home
Syntax
GetAxis_In_Out_Home(hPosys, statID) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
statID
InOutHomeStatus
01
Description
Pulse & Direction
GetAxis_In_Out_Homereturns the status of the four axis specific AxisIn input, AxisOut outputs
and the Home inputs. The lowest four bits 0-3 relate to the status of the home inputs, bits 4-7 to
the AxisOut status and the bits 8-11 relate to the AxisIn inputs.
The exact meaning:
Bits 0-3: Home inputs axis 0-3 (X-W)
Bits 4-7: AxisIn inputs axis 0-3 (X-W)
Bits 8-11: AxisOut outputs axis 0-3 (X-W)
Bit 12: Reset cause - Software
Bit 13: Reset cause - Undervoltage
Bit 14: Reset cause - External
Bit 15: Reset cause - Watchdog
Restriction
These outputs are not affected by a HardReset, SoftReset or an external reset. They will retain
their state.
see
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
GetAxis_In_Out_Home(hPosys#, statID)
-o-
343
© POSYS Motion Control GmbH & Co.KG, 2013
GetDriveStatus
GetDriveStatus
only valid for POSYS® 1800/1900 with firmware version >2.x
Syntax
GetDriveStatus(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Name
Type
status
unsigned 16 bits
Returned Data
Description
Pulse & Direction
see below
GetDriveStatusreads the Drive Status register for the specified
axis. All of the bits in this status
word are set and cleared by the motion processor. They are not settable or clearable by the host.
The bits represent states or conditions in the motion processor that are of a transient nature.
Name
Bit
Reserved
0-3
In Holding
4
Reserved
5-15
Description
Set to 1 when the unit is in the holding current
state– the output current is limited by the
holding current limit.
Restriction
see
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
GetDriveStatus(hPosys#, axis)
-o-
344
© POSYS Motion Control GmbH & Co.KG, 2013
GetEventStatus
GetEventStatus
Syntax
GetEventStatus(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Name
Type
Encoding
status
unsigned 16 bits
see below
Returned Data
Description
Pulse & Direction
GetEv entStatusreads the event register for the specified axis.
All of the bits in this status word
are set by the motion processor and cleared by the host. To clear these bits, use the
ResetEventStatus command.
The following table shows the encoding of the data returned by this command.
Name
Bit(s)
Description
Motion Complete
0
Set to 1 when motion is completed.
SetMotionCompleteMode determines if this bit is
based on the trajectory generator position or the
encoder position.
Wrap-around
1
Set to 1 when the actual (encoder) position
wraps from maximum allowed position to
minimum or vice versa
Breakpoint 1
2
Set to 1 when breakpoint 1 is triggered
C apture received
3
Set to 1 when a position capture occurs
Motion error
4
Set to 1 when a motion error occurs
In positive limit
5
Set to 1 when the axis enters a positive limit
switch condition
In negative limit
6
Set to 1 when the axis enters a negative limit
switch condition
Instruction error
7
Set to 1 when instruction error occurs
reserved
C ommutation error
reserved
8-10
11
12-13
Not used, may be 0 or 1
Set to 1 when a commutation error occurs
Not used, may be 0 or 1
Breakpoint 2
14
Set to 1 when breakpoint 2 is triggered
reserved
15
Not used, may be 0 or 1
Restriction
All bits in this status word are set by the POSYS® and cleared by the host. To clear these bits use
the ResetEventStatus command.
see
GetActivityStatus, GetSignalStatus, ResetEventStatus, GetDriveStatus
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
GetEventStatus(hPosys#, axis)
-o-
345
© POSYS Motion Control GmbH & Co.KG, 2013
GetSignalStatus
GetSignalStatus
Syntax
GetSignalStatus(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Name
Type
see below
unsigned 16 bits
Returned Data
Description
Pulse & Direction
GetSignalStatusreturns the contents of the signal status register for the specified axis. The
signal status register contains the current value of the various hardware signals connected to each
axis of the POSYS®. The value read is combined with the signal sense register (SetSignalSense
command) and then returned to the user. For each bit in the Signal Sense register that is set to 1
the corresponding bit in the GetSignalStatus command will be inverted, so that a low signal will be
read as 1 and a high signal will be read as a 0. C onversely for each bit in the Signal Sense register
that is set to 0 the corresponding bit in the GetSignalStatus command is not inverted, so that a low
signal will be read as 0 and a high signal will be read as a 1.
All of the bits in the GetSignalStatus command are inputs except for AxisOut. The value read for
this bit is equal to the current value output by the axis out mechanism. See SetAxisOutSource
command for more details.
Name
Description
Bit Number
status
Encoder A
Encoder B
Encoder Index
Encoder Home
Positive limit
Negative limit
Axisln
Hall A
Hall B
Hall C
AxisOut
reserved
0
1
2
3
4
5
6
7
8
9
10
11-15
Restriction
see
GetActivityStatus, GetEventStatus, ResetEventStatus, Set/GetSignalSense
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
GetSignalStatus(hPosys#, axis)
-o-
346
© POSYS Motion Control GmbH & Co.KG, 2013
ResetEventStatus
ResetEventStatus
Syntax
ResetEventStatus(hPosys, axis, mask) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
mask
Description
Motion Complete
Wrap-Around
Breakpoint 1
C apture Received
Motion Error
In positive Limit
In negative Limit
Instruction Error
C ommutation Error
Breakpoint 2
Pulse & Direction
POSYS® 700, 800,
800B all versions &
POSYS® 1800, 1900
Firmware <=1.5
POSYS® 1800/1900
Firmware >2.x
0001h
0002h
0004h
0008h
0010h
0020h
0040h
0080h
0800h
4000h
FFFEh
FFFDh
FFFBh
FFF7h
FFEFh
FFDFh
FFBFh
FF7Fh
F7FFh
BFFFh
ResetEventStatusclears (sets to 0), for the specified axis, each bit in the Event Status Register
that has a value of 0 in the mask sent with this command. All other Event Status Register bits (bits
which have a mask value of 1) are unaffected.
POSYS 18001900 mit Firmware >2.x
Events that cause changes in Operating Mode or trajectory require, in general, that the
corresponding bit in Event Status be cleared prior to returning to operation. That is, prior to
restoring the Operating Mode (in cases where the Event caused a change in it) or prior to
performing another trajectory move (in cases where the Event caused a trajectory stop). The one
exception to this is Motion Error, which is not required to be cleared if the event action for it
includes disabling of the Position Loop.
Restriction
see
GetEventStatus
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
ResetEventStatus(hPosys#, axis, mask)
-o-
347
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetAxisOutMask
SetAxisOutSource
GetAxisOutSource
only valid for POSYS® 1800/1900 with firmware version >2.x
Syntax
SetAxisOutSource(hPosys, axis, sourceAxis, sourceRegister, selectionMask, senseMask) stdcall
GetAxisOutSource(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
sourceAxis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
sourceRegister
disabled
EventStatus
ActivityStatus
SignalStatus
DriveStatus
0
1
2
3
4
selectionMask
see below
bitmask
senseMask
see below
bitmaks
Description
Pulse & Direction
SetAxisOutMaskconfigures what will drive theAxisOut pin of the axis. The sourceRegisterand
sourceAxis arguments specify which register, from which axis, will be used to drive
AxisOut of the
specified axis. For each bit in theselectionMaskthat is set to 1, the corresponding bit of the
specified sourceRegisteris selected to setAxisOut active. The senseMask bit determines which
state of each bit causesAxisOut to be active—a zero (0) in thesenseMask means that a 0 in the
corresponding bit will causeAxisOut to be active, and a 1 in thesenseMask means that a 1 in the
corresponding bit will causeAxisOut to be active. If multiple bits are selected in the
sourceRegister, AxisOut will be active if any of the selected bits, combined with their sense,
require it to be.
For example, assume it is desired to have the
AxisOut pin of Axis1 driven active whenever motion
complete of Axis2 is 1, or commutation error of Axis2 is 0. In this case,
axis would be 0 (Axis1),
sourceAxis would be 1 (Axis2), sourceRegisterwould be 1 (Event Status), selectionMaskwould be
0801h (commutation error and motion complete) and
senseMask would be 0001h.
GetAxisOutMaskreturns the mapping of theAxisOut pin of axis.
The following table shows the available bits in each register.
Encoding of bit
Register =
event status
Register =
activity status
Registe
r=
signal
status
0
Motion Complete
Phasing initialized
Encoder
A
1
Wrap-around
At maximum velocity
Encoder
B
2
Breakpoint 1
Tracking
Encoder
index
3
Position capture
Home
4
Motion error
Positive
limit
5
In positive limit
Negative
limit
6
In negative limit
AxisIn
348
Drive
Status
Registe
r
In
Holding
© POSYS Motion Control GmbH & Co.KG, 2013
7
Instruction error
Axis settled
Hall
sensor 1
8
Disable
Motor on/off
Hall
sensor 2
Position capture
Hall
sensor 3
9
0Ah
0Bh
In motion
C ommutation error
0Ch
In positive limit
In negative limit
0Dh
0Eh
Breakpoint 2
0Fh
see
Set/GetSignalSense
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetAxisOutSource(hPosys#, axis, sourceAxis, sourceRegister, selectionMask, senseMask)
GetAxisOutSource(hPosys#, axis)
-o-
349
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetAxisOutSource
SetAxisOutSource
GetAxisOutSource
Syntax
SetAxisOutSource(hPosys, axis, sourceAxis, bit, register) stdcall
GetAxisOutSource(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
sourceAxis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
bit
see below
0 to 15
register
disabled
EventStatus
ActivityStatus
SignalStatus
0
1
2
3
Description
Pulse & Direction
SetAxisOutSourcemaps the specified bit of the specified status register of axis to the AxisOut pin
for the specified axis. The state of the AxisOut pin will thereafter track the state of bit. If register is
absent (encoding of 0), bit is ignored, and the specified AxisOut pin is, in effect, turned off
(inactive). When the AxisOutSource is set to disabled, the AxisOut signal can be set high or low
using SetSignalSense bit 10.
GetAxisOutSourcereads the mapping of the AxisOut pin of axis.
The table below shows the source for combinations of bit and register.
Encoding of bit
Register =
event status
Register =
activity status
Register =
signal status
0
Motion Complete
Phasing initialized
Encoder A
1
Wrap-around
At maximum velocity
Encoder B
2
Breakpoint 1
Tracking
Encoder index
3
Position capture
Home
4
Motion error
Positive limit
5
In positive limit
Negative limit
6
In negative limit
AxisIn
7
Instruction error
Axis settled
Hall sensor 1
8
Motor on/off
Hall sensor 2
9
Position capture
Hall sensor 3
0Ah
0Bh
In motion
C ommutation error
0Ch
In positive limit
In negative limit
0Dh
0Eh
Breakpoint 2
0Fh
see
Set/GetSignalSense
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
SetAxisOutSource(hPosys#, axis, sourceAxis, bit, register)
GetAxisOutSource(hPosys#, axis)
350
© POSYS Motion Control GmbH & Co.KG, 2013
convention
-o-
351
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetSignalSense
SetSignalSense
GetSignalSense
Syntax
SetSignalSense(hPosys, axis, mask) stdcall
GetSignalSense(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Indicator
Encoding
Bit number
Encoder A
Encoder B
Encoder Index
Encoder Home
Positive Limit
Negative Limit
AxisIn
Hall A
Hall B
Hall C
AxisOut
StepOutput
MotorDirection
reserved
0001h
0002h
0004h
0008h
0010h
0020h
0040h
0080h
0100h
0200h
0400h
0800h
1000h
0
1
2
3
4
5
6
7
8
9
10
11
12
13-15
mask
Description
Pulse & Direction
SetSignalSenseestablishes the sense of the corresponding bits of the signal status register, with
the addition of StepOutput and MotorDirection, for the specified
axis.
For all input signals, the input is inverted if the corresponding sense bit is one; otherwise it is not
inverted.
For encoder index/home: if the sense bit is 1, a capture will occur on a low-to-high signal
transition.
Otherwise, a capture will occur on a high-to-low transition.
For positive and negative limit: if the sense bit is 1, an overtravel condition will occur if the signal
is high.
Otherwise, an overtravel condition will occur when the signal is low.
The AxisOut signal is inverted if the sense bit is set to one; otherwise it is not inverted.
When the StepOutput bit is set to 1, a step will be generated by the motion processor with a
low-to-high transition on the Pulse signal. Otherwise, a step will be generated by the motion
processor with a high-to-low transition on the Pulse signal.
Setting the MotorDirection bit has the effect of swapping the sense of positive and negative motor
movement.
GetSignalSense returns the current signal sense mask.
Restriction
Inverting the encoder A, B, or index may prevent the index capture mechanism from operating
correctly. Please contact us for support.
see
GetSignalStatus
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetSignalSense(hPosys#, axis, mask)
GetSignalSense(hPosys#, axis)
-o-
352
© POSYS Motion Control GmbH & Co.KG, 2013
Traces
GetTraceCount
GetTraceCount
Syntax
GetTraceCount(hPosys) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
Value
Type
trace count
unsigned 32 bits
Returned Data
Range
Pulse & Direction
0 to 2
32
Scaling
unity
Units
samples
-1
Description
GetTraceCount returns the number of points (variable values) stored in the trace buffer since the
beginning of the trace.
Restriction
If the trace mode is set to rolling and the buffer wraps, GetTraceCount returns the number of
samples in the filled buffer.
see
ReadBuffer, Set/GetTraceStart, Set/GetTraceStop, Set/GetBufferLength
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
GetTraceCount(hPosys#)
-o-
353
© POSYS Motion Control GmbH & Co.KG, 2013
GetTraceStatus
GetTraceStatus
Syntax
GetTraceStatus(hPosys) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
Name
Type
see below
unsigned 16 bits
Returned Data
Description
Pulse & Direction
GetTraceStatusreturns the current trace status. The definitions of the individual status bits are
as follows:
Bit Number
Name
Description
0
Mode
Set to 0 when trace is in one-time mode, 1 when
in rolling mode
1
Activity
Set to 1 when trace is active (currently tracing),
0 if trace not active
2
DataWrap
Set to 1 when trace has wrapped, 0 if it has not
wrapped. If 0, the buffer has not yet been filled
and all recorded data are intact. If 1, the trace
has wrapped to the beginning of the buffer; any
previous data may have been overwritten if not
explicitly retrieved by the host using the
ReadBuffer command while the trace is active.
Restriction
see
Set/GetTraceStart, Set/GetTraceMode
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
GetTraceStatus(hPosys#)
-o-
354
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetTraceMode
SetTraceMode
GetTraceMode
Syntax
SetTraceMode(hPosys, mode) stdcall
GetTraceMode(hPosys) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
mode
OneTime
RollingBuffer
0
1
Description
Pulse & Direction
SetTraceModesets the buffer usage for the next trace. In OneTime mode, the trace continues
until the buffer is filled, then stops. In Rolling mode, the trace continues from the beginning of the
buffer after the end is reached. Values stored when in the rolling mode are lost if they are not read
before being overwritten by the wrapped data being traced and stored.
GetTraceMode returns the code for the current buffer mode.
Restriction
see
GetTraceStatus
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetTraceMode(hPosys#, mode)
GetTraceMode(hPosys#)
-o-
355
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetTracePeriod
SetTracePeriod
GetTracePeriod
Syntax
SetTracePeriod(hPosys, period) stdcall
GetTracePeriod(hPosys) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
Pulse & Direction
POSYS® 18xx/19xx
Type
period
Description
unsigned 16 bits
POSYS® 7xx, 8xx,
8xx-B, 9xx
Type
period
unsigned 16 bit
Range
1 to 2
16
Scaling
unity
Units
cycles
Range
1 to 2
15
Scaling
unity
Units
cycles
-1
-1
SetTracePeriodsets the time period, expressed in number of cycles, between successive trace
points.
GetTracePeriod returns the current trace period.
Restriction
see
Set/GetSampleTime, Set/GetTraceStart, Set/GetTraceStop
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetTracePeriod(hPosys#, period)
GetTracePeriod(hPosys#)
-o-
356
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetTraceStart
SetTraceStart
GetTraceStart
Syntax
SetTraceStart(hPosys, triggerAxis, condition, triggerBit, triggerState) stdcall
GetTraceStart(hPosys) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
triggerAxis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
condition
Immediate
Next update
Event Status register bit
Activity Status register bit
Signal Status register bit
0
1
2
3
4
triggerBit
Status register bit
0 to 15
triggerState
Triggering state of the bit
0 (value = 0)
1 (value = 1)
Description
Pulse & Direction
SetTraceStartsets the condition for starting the trace. The Immediate condition requires no axis
to be specified and the trace will begin upon execution of this instruction. The other four conditions
require an axis to be specified; and when the condition for that axis is attained, the trace will
begin.
When a status register bit is the trigger, the bit number and state must be included in the
argument. The trace is started when the indicated bit reaches the specified state (0 or 1).
Once a trace has started, the trace-start indicator is reset and the SetTraceStart instruction must
be resent before another trace can be started.
GetTraceStartreturns the current trace-start condition.
Examples:
If it is desired that the trace begin on the next Update for axis 3, then a 1 is set for the condition, a
2 is set for the axis number, and bit number and state can be loaded with zeroes since they are
not used.
If it is desired that the trace begin when bit 7 of the Activity Status register for axis 2 goes to 0
then the trace start is loaded as follows: A 3 is loaded for condition, a 1 is loaded for axis number,
a 7 is loaded for bit number, and a 0 is loaded for state.
The table below shows the corresponding value for combinations of triggerBit and register.
Encoding of bit
Register =
event status
Register =
activity status
Register =
signal status
0
Motion Complete
Phasing initialized
Encoder A
1
Wrap-around
At maximum velocity
Encoder B
2
Breakpoint 1
Tracking
Encoder index
3
Position capture
Home
4
Motion error
Positive limit
5
In positive limit
Negative limit
6
In negative limit
AxisIn
7
Instruction error
Axis settled
Hall sensor 1
8
Motor on/off
Hall sensor 2
9
Position capture
Hall sensor 3
0Ah
0Bh
In motion
C ommutation error
0Ch
In positive limit
In negative limit
357
© POSYS Motion Control GmbH & Co.KG, 2013
0Dh
0Eh
Breakpoint 2
0Fh
Restriction
see
Set/GetBufferLength, GetTraceCount, Set/GetTraceMode, Set/GetTracePeriod,
Set/GetTraceStop
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetTraceStart(hPosys#, triggerAxis, condition, triggerBit, triggerState)
GetTraceStart(hPosys#)
-o-
358
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetTraceStop
SetTraceStop
GetTraceStop
Syntax
SetTraceStop(hPosys, triggerAxis, condition, triggerBit, triggerState) stdcall
GetTraceStop(hPosys) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
triggerAxis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
condition
Immediate
Next update
Event Status register bit
Activity Status register bit
Signal Status register bit
0
1
2
3
4
triggerBit
Status register bit
0 to 15
triggerState
Triggering state of the bit
0 (value = 0)
1 (value = 1)
Description
Pulse & Direction
SetTraceStopsets the condition for starting the trace. The Immediate condition requires no axis
to be specified and the trace will begin upon execution of this instruction. The other four conditions
require an axis to be specified; and when the condition for that axis is attained, the trace will stop.
When a status register bit is the trigger, the bit number and state must be included in the
argument. The trace is started when the indicated bit reaches the specified state (0 or 1). Once a
trace has started, the trace-start indicator is reset and the SetTraceStop instruction must be sent
before another trace can be started.
Once a trace has stopped, the trace-stop indicator is reset and the SetTraceStop instruction must
be reentered before another trace can be stopped.
GetTraceStopreturns the current trace-start condition.
Examples:
If it is desired that the trace stop on the next Update for axis 3, then a 1 is set for the condition,
a 2 is set for the axis number, and bit number and state can be loaded with zeroes since they are
not used.
If it is desired that the trace stop when bit 7 of the Activity Status register for axis 2 goes to 0 then
the trace start is loaded as follows: A 3 is loaded for condition, a 1 is loaded for axis number, a
7 is loaded for bit number, and a 0 is loaded for state.
The table below shows the corresponding value for combinations of triggerBit and register.
Encoding of bit
Register =
event status
Register =
activity status
Register =
signal status
0
Motion Complete
Phasing initialized
Encoder A
1
Wrap-around
At maximum velocity
Encoder B
2
Breakpoint 1
Tracking
Encoder index
3
Position capture
Home
4
Motion error
Positive limit
5
In positive limit
Negative limit
6
In negative limit
7
Instruction error
AxisIn
Axis settled
Hall sensor 1
8
Motor on/off
Hall sensor 2
9
Position capture
Hall sensor 3
0Ah
0Bh
In motion
C ommutation error
0Ch
In positive limit
In negative limit
359
© POSYS Motion Control GmbH & Co.KG, 2013
0Dh
0Eh
Breakpoint 2
0Fh
Restriction
see
GetTraceCount, Set/GetTraceStart, GetTraceStatus
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetTraceStop(hPosys#, triggerAxis, condition, triggerBit, triggerState)
GetTraceStop(hPosys#)
-o-
360
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetTraceVariable
SetTraceVariable
GetTraceVariable
Some options are dependent on the firmware used. For POSYS® 1800/1900 if equipped
with Motion Control Chipset >< V2.x. These are marked with an "*".
Syntax
SetTraceVariable(hPosys, variableNumber, traceAxis, variable) stdcall
GetTraceVariable(hPosys, variableNumber) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
variableNumber
Variable1
Variable2
Variable3
Variable4
0
1
2
3
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
variable
None (disable variable)
Position Error
C ommanded Position
C ommanded Velocity
C ommanded Acceleration
Actual Position
Actual Velocity
Motor Command
C hip Time
C apture Register
Position Loop Integral Sum
Position Loop Derivative
Event Status Register
Activity Status Register
Signal Status Register
Phase Angle
Phase Offset
Phase A
Phase B
Phase C
Analog Input 1
Analog Input 2
Analog Input 3
Analog Input 4
Analog Input 5
Analog Input 6
Analog Input 7
Analog Input 8
PID Servo Error
Phase Angle Scaled *
Drive Status Register *
Position Loop Integral Contribution *
PID Output (Biquad1 Input) *
Biquad1 Output (Biquad2 Input) *
0
1
2
3
4
5
6
7
8
9
Ah
Bh
Ch
Dh
Eh
Fh
10h
11h
12h
13h
14h
15h
16h
17h
18h
19h
1Ah
1Bh
1Ch
1Dh
38h
39h
40h
41h
Description
Pulse & Direction
SetTraceVariableassigns the given variable to the specified variableNumber location in the trace
buffer. The variable will always occupy a 32-bit buffer location. All 16-bit values are sign extended
to 32 bits. Up to four variables may be traced at one time. All combinations of axis numbers and
trace variables are supported.
All variable assignments must be contiguous starting with variableNumber = 0.
GetTraceVariablereturns the variable and axis of the specified variableNumber.
Example: To set up a 3 variable trace capturing the commanded acceleration for axis 1, the actual
position for axis 1, and the event status word for axis 3 the following sequence of commands
would be used. First a SetTraceVariable command with traceID of 0 , axis of 0 , and variable of 4
would be sent. Then a SetTraceVariable command with traceID of 1 , axis of 0 , and variable of
361
© POSYS Motion Control GmbH & Co.KG, 2013
5 would be sent. Finally a SetTraceVariable command with traceID of 2 , axis of 2 and variable
of 0Ch would be sent.
Restriction
When selecting ActualVelocity as a trace variable, the reported value is the absolute change in
position between trace samples, not the velocity per chip cycle. In this way, the trace period can
be used to alter the sample period for the velocity.
* with an asterisk marked parameters are only available on POSYS® 1800/1900 boards when
equipped with a firmware vers. >2.x
see
Set/GetTracePeriod, Set/GetTraceStart, Set/GetTraceStop
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetTraceVariable(hPosys#, variableNumber, traceAxis, variable)
GetTraceVariable(hPosys#, variableNumber)
-o-
362
© POSYS Motion Control GmbH & Co.KG, 2013
Miscellaneous
GetChecksum
GetChecksum
Syntax
GetChecksum(hPosys) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
Returned Data
Type
checksum
Description
Pulse & Direction
unsigned 32 bits
GetChecksum reads the internal 32-bit checksum value. The return value is dependent on the
firmware version of the motion processor; for further information contact servo-Halbeck GmbH &
Co.KG
Restriction
see
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
Motion Script®
language calling
convention
GetChecksum(hPosys#)
-o-
363
© POSYS Motion Control GmbH & Co.KG, 2013
GetHostIOError
GetHostIOError
GetInstructionError (only valid for POSYS® 1800/1900 with firmware >2.x)
Syntax
GetHostIOError(hPosys) stdcall
GetInstructionerror(hPosys) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
Name
Type
Range
error code
unsigned 16 bit
0 - Eh
Returned Data
Description
Pulse & Direction
POSYS® 7xx, 8xx, 8xx-B, 9xx
GetHostIOErrorreturns the code for the last Host I/O error, then resets to 0 both the error and
the Host I/O bit in the Status-Read word. Generally this command is issued only after the Host I/O
error bit in the Status-read word indicates there was an I/O error.
POSYS® 18xx, 19xx
GetHostIOError / GetInstructionError
now only clears the command error bit in the parallel
status register if it was called from the parallel interface. Prior to this change, calling the
GetHostIOError using any communication interfaces would clear the command error bit.
GetHostIOError / GetInstructionError
(firmware >2.x) clears the Host I/O Error Bit in the
parallel status register only if it was called thru the parallel interface (ISA-Bus or PC I-Bus). Before
this change a call to GetHostIOError was valid on any interface.
Error Code
Encoding
No error
Processor reset
Invalid instruction
Invalid axis
Invalid parameter
Trace running
reserved
Block out of bounds
Trace buffer zero
Bad serial checksum
reserved
Invalid negative value
Invalid parameter change
Invalid move after limit condition
Invalid move into limit
Invalid Operating Mode restore after
event-triggered change
Invalid Operating Mode for command
0
1
2
3
4
5
6
7
8
9
Ah
Bh
Ch
Dh
Eh
10h (only POSYS 1800/1900 >2.x)
Restriction
see
GetEventStatus, ResetEventStatus
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
GetHostIOError(hPosys#)
GetInstructionError(hPosys#)
-o-
364
11h (only POSYS 1800/1900 >2.x)
© POSYS Motion Control GmbH & Co.KG, 2013
GetProcessorStatus
GetProcessorStatus
Syntax
GetProcessorStatus(hPosys) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
Returned Data
Pulse & Direction
Returns a 16-bit word.
Bit 0-12: unused, set to 0
Bit 13: Holds value of HostIOError signal, 1 if a HostIOError occurred
Bit 14: Holds value of HostIntrpt signal. A 1 indicates the signal level is high.
Bit 15: Holds value of HostRdy signal. A 1 indicates the level is high.
Description
GetProcessorStatus can be called at any time. The status read returns information about the chip
set’s interface signals.
Restriction
see
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
GetProcessorStatus(hPosys#)
-o-
365
© POSYS Motion Control GmbH & Co.KG, 2013
GetVersion
GetVersion
Syntax
GetVersion(hPosys) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
Returned Data
Description
Restriction
Name
Type
version info high-word
unsigned 16 bits
version info low-word
unsigned 16 bits
Pulse & Direction
GetVersionreturns product information encoded as shown above.
Product information
Description
Encoding
product family
motor type
POSYS®
2 or 5 (Navigator or
Magellan)
brushed servo
1
brushless servo
3
microstepping
4
stepper
5
all motor types (only Magellan)
8
number of chips
1, 2
axes supported
1, 2, 3, 4
special attributes
reserved
0 to 3
customization code
reserved
0 to 255
major s/w version
0 to 15
minor s/w version
0 to 15
Note that in the DLL call GetVersion, the special attributes value and chip count value are combined
and returned in a single return parameter (special_and_chip_count). Chip count is encoded in the 2
least-significant bits of this value; special attributes is encoded in the upper 2 bits.
see
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
GetVersion(hPosys#)
-o-
366
© POSYS Motion Control GmbH & Co.KG, 2013
HardReset/MCReset
HardReset
MCReset
Syntax
HardReset(hPosys) stdcall
alternatively
MCReset(hPosys) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
Description
Pulse & Direction
HardReset executes a hardware reset of the motion control card residing at the address hPosys.
The Motion control processor will be reset and the optical motor command output switches will be
turned off, actually the output will be put to ground potential. All inputs and outputs are set back to
their power-on state. HardReset has the same effect as executing an external reset by bringing the
Reset Input low.
To reinitialize the motion control card it will be necessary to execute a callSoftReset
to
followed
by reloading filter and other parameters and a call to DAC OutputsOn to turn on the optical output
switches to connect the ±10 V motor command output to the servo amplifiers. Only the ±10 V
output is connected to the optical output switches. The PWM output uses a different connector pin
and is NOT switched by the optical output switches.
MCReset executes a hardware reset of the motion control card residing at the address hPosys.
This command is faster in the execution than the command
HardReset since it will not reload the
FPGA. In all other facts it is the same as the command
HardReset.
Note: POSYS® 700/800
With the exception of the AxisOut outputs other outputs are not automatically reset (user outputs
and amplifier enable outputs). If these are to be reset to the default it will be necessary to do this
by calls to WriteIO(ioAddress, outputStatus). HardReset has the same effect as executing an
external reset by bringing the Reset Input low.
Reset restores the POSYS® to its initial condition, setting all variables to their default values.
These default values are shown in the following table:
Acceleration
ActualPosition
Active Operating
Mode*
ActualPositionUnits *
AutoStopMode
Auxiliary Encoder
Source *
AxisMode
AxisOutSource
AxisOut Register *
AxisOut Selection Mask
*
AxisOut Sense Mask *
BiQuadCoefficients *
Breakpoint 1
Breakpoint 2
BreakpointValue 1
BreakpointValue 2
Breakpoint Update
Mask 1 *
Breakpoint Update
Mask 2 *
BufferLength
BufferReadIndex
BufferStart
BufferWriteIndex
C aptureSource
C ommutation Mode *
Deceleration *
DerivativeTime *
EncoderModulus
Encoder Source
EncoderToStepRatio
GearMaster
0
0
0033h *
0 or motor dependent*
1
0*
1
0
0*
0*
0*
0
0
0
0
0
0*
0*
0
0
siehe notes
0
0
siehe notes
0 or 1 *
0 or 1 *
0
motor dependent *
00010001h
0
367
Kp
Kvff
LimitSwitchMode
MotionCompleteMode
Motion Error Event
Action *
MotorBias
MotorCommand
MotorLimit
MotorMode *
Operating Mode *
PhaseAngle
Phase Correction Mode
PhaseCounts
PhaseInitializeMode
PhaseInitializeTime
PhaseOffset *
PhasePrescale
Position
PositionErrorLimit
Positive Limit Event
Action *
Negative Limit Event
Action *
ProfileMode
PWM Frequency *
SampleTime
SettleTime
SettleWindow
SignalSense *
Start Velocity *
Step Range
StopMode
TraceMode
TracePeriod
0
0
1
0
motor dependent *
0
0
32767
1 or motor dependent*
0033h *
0
motor dependent
motor dependent
0
0
65353 or -1 *
0
0
siehe notes
8*
8*
0
motor dependent *
siehe notes
0
0
motor dependent *
0*
1
0
0
1
© POSYS Motion Control GmbH & Co.KG, 2013
GearRatio
Holding Motor Limit *
Holding Delay *
IntegrationLimit
InterruptMask
Jerk
Kaff
Kd
Ki *
Kout
0
32767 *
motor dependent *
0
0
0
0
0
65535 or 0 *
65535
TraceStart
TraceStop
TraceVariable1
TraceVariable2
TraceVariable3
TraceVariable4
TrackingWindow
Update Mask *
Velocity
0
0
0
0
0
0
0
0Bh *
0
The motor-type dependant default values are listed below:
Variable
DC Brushed
DC Brushless
(3 phase)
DC Brushless
(2 phase)
0
0
0
n/a
0
0
EncoderSource
0
0
0
Motion Error Event
Action *
5
5
5
OutputMode
1
2
2
PhaseCorrectionMode
n/a
1
1
PWMFrequency (kHz)
0
n/a
n/a
Actual Position Units *
C ommutationMode
Phase Counts *
n/a
1
1
Holding Delay *
n/a
n/a
n/a
Signal Sense *
0
0
0
Microstepping
(3 phase)
Microstepping
(2 phase)
Pulse & Direction
Actual Position Units *
0
0
0
C ommutationMode
0
0
n/a
EncoderSource
2
2
3
Motion Error Event
Action *
5
5
5
OutputMode
2
1
n/a
PhaseCorrectionMode
n/a
n/a
n/a
PWMFrequency (kHz)
20
80
n/a
Phase Counts *
256
256
n/a
Holding Delay *
32767
32767
20
Signal Sense *
0
0
0800h
Variable
Notes:
*BiQuadCoefficient:not available on POSYS® 7xx, 8xx, 8xx-B and 9xx
BufferStart:
The default value set after a Reset with the POSYS® 7xx, 8xx, 8xx-B and 9xx is 1024. A lower
value is not possible.
The default value set after a Reset with the POSYS® 18xx and 19xx is 0h.
MotorLimit:
The default value set after a Reset with the POSYS® 7xx, 8xx, 8xx-B and 9xx is 32765
.
The default value set after a Reset with the POSYS® 19xx and 18xx is 65535.
PositionErrorLimit:
The default value set after a Reset with the POSYS® 7xx, 8xx, 8xx-B and 9xx2147483647.
is
The default value set after a Reset with the POSYS® 19xx and 18xx is 65535.
SampleTime:
Refer to Set/GetSampleTime for more information regarding SampleTime.
All axes supported by the motion processor are enabled at reset on all axes.
Profile, servo filter, and other axis-specific parameters are reset on all axes.
On-board-memory buffer parameters are reset for all buffers. BufferStart is reset to (200h), the
lowest user-accessible address.
368
© POSYS Motion Control GmbH & Co.KG, 2013
Axis-specific conditions are reset on all axes. On-board-memory buffer conditions are reset on all
32 memory buffers.
Parameters marked with "*" are normally only valid for POSYS controllers 1800/1900. Please note
that most of these parameters are also only available on boards equipped with the firmware
version >2.x. If 2 values are noted the first value is valid for firmware versions =< 1.5 and the
second value is valid for firmware versions >2.x. (exception: Biquadcoefficient; in all POSYS
1800/1900 boards available with exception of those equipped with firmware supporting Piezo
functionality).
Restriction
PWMFrequency can not be set on the POSYS® 7xx, 8xx, 8xx-B and 9xx
Warning: If the external Reset is permanently pulled low for a longer period, the motion
processor may be damaged. Therefore it is necessary and the responsibility of the user
to setup the circuit for the external Reset in a manner that a permanent Reset can not
occur, even at an emergency machine shutdown. In this case warranty is voided.
see
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
HardReset(hPosys#)
or
MCReset(hPosys#)
-o-
369
© POSYS Motion Control GmbH & Co.KG, 2013
NoOperation
NoOperation
Syntax
NoOperation(hPosys) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
Description
Pulse & Direction
The NoOperation command has no affect on the POSYS®. It is useful as a "null" operation to
verify communications with the Motion Controller.
Restriction
see
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
NoOperation(hPosys#)
-o-
370
© POSYS Motion Control GmbH & Co.KG, 2013
PortInOutW
PortInW
PortOutW
Syntax
PortInW(hPosys, address) stdcall
PortOutW(hPosys, address, data) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
Pulse & Direction
Type
Description
address
unsigned 16 bits
data
unsigned 16 bits
Range
51-1023
Scaling
none
Range
0-65535
Scaling
none
The function PortInW and PortOutW should under normal conditions never be used. If
improperly applied they could cause havoc within your system and may crash your computer and
cause dangerous runaway of your motors.
They should only be used by experienced
programmers.These functions provide direct access to the computers IO address space using the
provided device driver. PortInW will read a data word at address and PortOutW will write a data
word to address.
These functions permit experienced programmers to write programs as close to the hardware as
possible.
Restriction
Do not use these functions unless you are absolutely sure of what you are doing!!!
see
OpenDevice/CloseDevice
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
PortInW(hPosys#, address)
PortOutW(hPosys#, address, data)
-o-
371
© POSYS Motion Control GmbH & Co.KG, 2013
ReadAnalog
ReadAnalog
Syntax
ReadAnalog(hPosys, portID) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
Name
Type
portID
unsigned 16 bits
Returned Data
Name
Type
value
unsigned 16 bits
Range
0 to 7
Scaling
unity
Units
-
Range
Scaling
Units
Description
Pulse & Direction
0 to 2
16
100/2
-1
16
% input
ReadAnalog returns a 16-bit value representing the voltage (read by an on-chip 10-bit A/D)
presented to the specified analog input. The value returned is the result of shifting the 10-bit value
6 bits to the left.
Restriction
see
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
ReadAnalog(hPosys#, portID)
-o-
372
© POSYS Motion Control GmbH & Co.KG, 2013
ReadIO
ReadIO
Syntax
ReadIO(hPosys, address) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
Name
Type
address
unsigned 16 bits
Returned Data
Description
Name
Type
data
unsigned 16 bits
Pulse & Direction
Range
0 to 255
Scaling
unity
Units
-
Range
0 to 2
Scaling
unity
Units
-
16
-1
ReadIO reads one 16-bit word of data from the device whose address is calculated by adding
1000h to address. (address is an offset from the base address, 1000h, of the POSYS's®
memory-mapped I/O space.)
The format and interpretation of the 16-bit data word are dependent on the user-defined device
being addressed. User-defined I/O can be used to implement a number of features including
additional parallel I/O, flash memory for nonvolatile configuration information storage, or display
devices such as LED arrays.
Restriction
see
WriteIO
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
ReadIO(hPosys#, address)
-o-
373
© POSYS Motion Control GmbH & Co.KG, 2013
ReadPLD
ReadPLD
Syntax
ReadPLD(hPosys) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
Name
Type
value
unsigned 16 bits
Returned Data
Description
Range
see
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
ReadPLD(hPosys#)
-o-
374
0 to 2
Scaling
unity
Units
-
Reads internal system data reflecting configuration and revision levels.
Restriction
Pulse & Direction
15
-1
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetCANMode
SetCANMode
GetCANMode
only available for POSYS® 18xx/19xx Series
Syntax
SetCANMode(hPosys, mask) stdcall
GetCANMode(hPosys) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
Pulse & Direction
Type
mask
Description
unsigned 16 bit
see below
SetCANMode sets the C AN 2.0B communication parameters for the POSYS®. After completion of
this command, the POSYS® will respond to a C AN receive message addressed to 0x600 + nodeID.
C AN responses are sent to 0x580 + nodeID. The C AN transmission rate will be as specified in the
transmission rate parameter. The standard transmission rate after power-on is 500,000.
The following table shows the encoding of the data used by this command:
Bit Number
Name
Instance
Encoding
0-6
C AN node ID
Address 0
Address 1
...
Address 127
0
1
...
127
7-12
reserved
13-15
transmission rate
1,000,000 baud
800,000
500,000
250,000
125,000
50,000
25,000
10,000
0
1
2
3
4
5
6
7
Restriction
see
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetCANMode(hPosys#, mask)
GetCANMode(hPosys#)
-o-
375
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetDiagnosticPortMode
SetDiagnosticPortMode
GetDiagnosticPortMode
only available for POSYS® 8xx-B/9xx Series
Syntax
SetDiagnosticPortMode(hPosys, mask) stdcall
GetDiagnosticPortMode(hPosys) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
Pulse & Direction
Type
mode
Description
limited
full
0
1
SetDiagnosticPortModedetermines the instruction set that can be executed through the
diagnostic port. When set to Limited, only the following instructions may be executed:
all GET instructions
The SetBufferReadIndex instruction
When set to FULL, all instructions may be executed.
GetDiagnosticPortMode returns the current mode of the diagnostic port.
Restriction
only valid for POSYS® 8xx-B and 9xx series.
see
Set/GetSerialPortMode
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetDiagnosticPortMode(hPosys#, mask)
GetDiagnosticPortMode(hPosys#)
-o-
376
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetSerialPortMode
SetSerialPortMode
GetSerialPortMode
only available for POSYS® 8xx-B/9xx/18xx/19xx Series
Syntax
SetSerialPortMode(hPosys, mask) stdcall
GetSerialPortMode(hPosys) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
Name
Type
Encoding
mask
unsigned 16 bits
see unten
Description
Pulse & Direction
SetSerialPortModesets the configuration for the asynchronous serial port.
Note: It is recommended that two stop bits be used for baud rates greater than 19200bps.
GetSerialPortModereturns the configuration for the asynchronous serial port.
The following table shows the encoding of the data used by this command:
Restriction
Bit number
Name
Instance
Encoding
0-3
Transmission rate
1200 baud
2400
9600
19200
57600
115200
250000
416667
0
1
2
3
4
5
6
7
4-5
parity
none
odd
even
0
1
2
6
stop bits
1
2
0
1
7-8
protocol
point-to-point
multi-drop using
address bit
multi-drop using idle
line detection
0
1
2
11-15
Multi-drop address
Address 0
Address 1
...
Address 31
0
1
...
31
For the POSYS® 8xx-B and 9xx the command Set/GetDiagnosticPortMode needs to be issued for
full access to the complete command structure via serial interface. In addition a jumper must be
set for either mode (parallel or serial).
Not available for POSYS® 7xx, 8xx
Set/GetDiagnosticPortMode is not available for the POSYS® 1800/1900 series. These cards are
generally capable to communicate on all three available interfaces simultaneously (parallel, serial,
CAN)
see
Set/GetDiagnosticPortMode
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetSerialPortMode(hPosys#, mask)
GetSerialPortMode(hPosys#)
-o-
377
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetSynchronizationMode
SetSynchronizationMode
GetSynchronizationMode
only available for POSYS® 8xx-B/9xx with SYNC IO option and 18xx/19xx Series
Syntax
SetSynchronizationMode(hPosys, mode) stdcall
GetSynchronizationMode(hPosys) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
mode
Disabled
Master
Slave
0
1
2
Description
SetSy nchronizationMode
sets the mode of the pin used for the synchronization of the internal
timer across multiple POSYS® motion controllers. In the disabled mode, the pin is configured as an
input and is not used. In the master mode, the pin outputs a synchronization pulse that can be
used by slave nodes or other devices to synchronize with the internal chip cycle of the master
node. In the slave mode, the pin is configured as an input and a pulse on the pin synchronizes the
internal chip cycle.
GetSynchronizationMode returns the code for the current synchronization mode.
Restriction
If any axis is configured for Pulse & Direction output (POSYS® 18xx/19xx), multi-controller
synchronization cannot be used.
The SYNC I/O feature is not available for the POSYS® 7xx, 8xx, 85x-B and 95x.
see
Set/GetSampleTime, Set/GetBreakpoint, Set/GetBreakpointValue
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetSynchronizationMode(hPosys#, mode)
GetSynchronizationMode(hPosys#)
-o-
378
© POSYS Motion Control GmbH & Co.KG, 2013
SetWatchDog
SetWatchDog
Syntax
SetWatchDog(hPosys,address,value) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
Description
address
0x04
value
0x5562
Pulse & Direction
SetWatchDog activates a POSYS® hardware timer which times out after approximately104
milliseconds unless it is refreshed before the timeout. A timeout will cause a hardware reset. The
Watch Dog Timer is deactivated after a timeout.
Example:
address = 4
timeout = 21858
Rem 0x04
Rem 0x5562
SetWatchDog(hPosys,address, timeout)
This starts the Watch Dog Timer. It must be refreshedbefore timeout or the motion
control card will be reset!
Address and timeout values must not be changed!!!
Restriction
The Watch Dog Timer cannot be stopped once it has been started. It can only be stopped by a
reset. The timeout time is fixed at 104 milliseconds.
see
OpenDevice/CloseDevice, PortInOutW
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
SetWatchDog(hPosys#,address,value)
-o-
379
© POSYS Motion Control GmbH & Co.KG, 2013
WriteIO
WriteIO
Syntax
WriteIO(hPosys, address, data) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
POSYS® 18xx, 19xx
Type
Range
address
unsigned 16 bits
0 to 255
data
unsigned 16 bits
POSYS® 7xx, 8xx,
8xx-B, 9xx
Type
Range
address
unsigned 8 bits
0 to 255
data
unsigned 16 bits
Description
0 to 2
0 to 2
16
16
Pulse & Direction
-1
-1
WriteIO writes one 16-bit word of data to the device whose address is calculated by adding 1000h
to address. In other words, address is an offset from address 1000h of the motion IC ´s
memory-mapped I/O space.
The format and interpretation of the 16-bit data word are dependent on the user-defined device
being addressed. User-defined I/O can be used to implement a variety of features such as
additional parallel I/O, flash memory for non-volatile configuration information storage, or display
devices such as LED arrays.
Restriction
see
ReadIO
DLL: Delphi, C++,
VB
Refer to the various import files (imp*.*)
MotionScript®
language calling
convention
WriteIO(hPosys#, address, data)
-o-
380
© POSYS Motion Control GmbH & Co.KG, 2013
Additional MotionScript® Functions
BitReset
BitReset
Syntax
BitReset(hPosys#, testVar, bitToReset) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys#
C ardHandle
value returned by call to OpenDevice
testVar
32 bits
bitToReset
32 bits
Description
BitReset will reset bitToReset (set to 0) in testVar.
Result = BitReset(testVar, bitToReset), the result of the operation
Restriction
Only available for the MotionScript® language
see
BitTest, BitSet, C ompareActivity, C ompareEvent, C ompareSignal
DLL: Delphi, C++,
VB
not applicable
MotionScript®
language calling
convention
BitReset(hPosys#, testVar, bitToTest)
-o-
381
Pulse & Direction
© POSYS Motion Control GmbH & Co.KG, 2013
BitSet
BitSet
Syntax
BitSet(hPosys#, testVar, bitToSet) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys#
C ardHandle
value returned by call to OpenDevice
testVar
32 bits
bitToTest
32 bits
Description
BitSet will set bitToSet in testVar by oring the two values.
Result = BitTest(testVar, bitToSet)
Restriction
Only available for the MotionScript® language
see
BitReset, BitTest, C ompareActivity, C ompareEvent, C ompareSignal
DLL: Delphi, C++,
VB
not applicable
MotionScript®
language calling
convention
BitSet(hPosys#, testVar, bitToTest)
-o-
382
Pulse & Direction
© POSYS Motion Control GmbH & Co.KG, 2013
BitTest
BitTest
Syntax
BitTest(hPosys#, testVar, bitToTest) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys#
C ardHandle
value returned by call to OpenDevice
testVar
32 bits
bitToTest
32 bits
Description
BitTest returns 1 if the bitToTest is set, otherwise it will return 0.
Result = BitTest(testVar, bitToTest)
Restriction
Only available for the MotionScript® language
see
BitReset, BitSet, C ompareActivity, C ompareEvent, C ompareSignal
DLL: Delphi, C++,
VB
not applicable
MotionScript®
language calling
convention
BitTest(hPosys#, testVar, bitToTest)
-o-
383
Pulse & Direction
© POSYS Motion Control GmbH & Co.KG, 2013
CompareActivity
CompareActivity
Syntax
C ompareActivity(hPosys#, axis, mask) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys#
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
mask
0 - 65535 (0xFFFF)
Pulse & Direction
Description
CompareActivity returns the result of ANDing the bit mask with GetActivityStatus.
Result = (GetActivityStatus and mask)
Restriction
Only available for the MotionScript® language
see
BitReset, BitTest, BitSet, C ompareEvent, C ompareSignal
DLL: Delphi, C++,
VB
not applicable
MotionScript®
language calling
convention
C ompareActivity(hPosys#, axis, mask)
-o-
384
© POSYS Motion Control GmbH & Co.KG, 2013
CompareEvent
CompareEvent
Syntax
C ompareEvent(hPosys#, axis, mask) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
mask
0 - 65535 (0xFFFF)
Pulse & Direction
Description
CompareActivity returns the result of ANDing the bit mask with GetEventStatus.
Result = (GetEventStatus and mask)
Restriction
Only available for the MotionScript® language
see
BitReset, BitTest, BitSet, C ompareActivity, C ompareSignal
DLL: Delphi, C++,
VB
not applicable
MotionScript®
language calling
convention
C ompareEvent(hPosys#, axis, mask)
-o-
385
© POSYS Motion Control GmbH & Co.KG, 2013
CompareSignal
CompareSignal
Syntax
C ompareSignal(hPosys#, axis, mask) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys#
C ardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
mask
0 - 1024 (0x0400)
Pulse & Direction
Description
CompareSignal returns the result of ANDing the bit mask with GetSignalStatus.
Result = (GetSignalStatus and mask)
Restriction
Only available for the MotionScript® language
see
BitReset, BitTest, BitSet, C ompareActivity, C ompareEvent
DLL: Delphi, C++,
VB
not applicable
MotionScript®
language calling
convention
C ompareSignal(hPosys#, axis, mask)
-o-
386
© POSYS Motion Control GmbH & Co.KG, 2013
Command Overview - ReadIO/WriteIO
ReadIO / WriteIO
ReadIO, WriteIO
In addition to numerous special-purpose digital signals that are input or output to the card such as AxisIn, AxisOut, Home,
Encoder, etc., the POSYS® cards support 8 general-purpose inputs, and 8 general-purpose outputs. These signals provide
a convenient way of accessing additional general purpose digital I/O. Although access to these signals occurs through the
motion processor’s ReadIO and WriteIO command, the signals present at these various connections do not directly affect
the motion processor’s behavior. Thus the motion processor simply passes them through to the host.
C ard-specific features are accessed through the POSYS®´s general-purpose I/O addressing scheme. These card-specific
functions can be accessed using the ReadIO and WriteIO commands. For further information please refer also to the FAQ
section FAQs/Programmer's Info and to the command descriptions in the Programmer's manual (ReadIO/WriteIO).
The following table shows the overall address map for the ReadIO and WriteIO functions supported by the POSYS® cards.
I/O space address Register
offset
Description
+0
digital I/O
Register which allows 8 general purpose digital input and output
signals to be read from and written to.
+1
Amplifier & DAC
enable
Register which allows AmpEnable 1-4 output signals (which can also
be used as general purpose outputs to be written to and verified,
and which allows the DAC enable output function to be written to
and verified).
+2
Reset monitor
Register which allows the reset monitor to be checked and reset.
+3
unused
-
+4
Watchdog
Register which allows the watchdog function to activated and
updated.
+0xff
C ard ID
Register which allows Card ID word to be read.
General purpose digital I/O Control register (I/O space address +0)
The following table details the +0 address digital I/O control register.
I/O Address
Bit location
Signals
+0
0-7
DigitalOut0-7
8-15
DigitalIn0-7
Amplifier Enable control register (I/O space address +1)
The following table details the +1 address amplifier & DAC enable register.
I/O Address
Bit location
Signals
+1
0-3
Amplifier enable outputs (0-3)
4-6
unused
7
DAC enable status (1 = enabled; 0 = disabled)
8-11
C hange mask for bits 0-3: amplifier enable outputs
(1= change; 0 = don’t change)
12-14
unused
15
C hange mask for DAC enable
(1= change; 0 = don’t change)
Reset Monitor control register (I/O space address +2)
The following table details the +6 address reset monitor register.
387
© POSYS Motion Control GmbH & Co.KG, 2013
I/O Address
Bit location
Signals
+2
0-11
reserved
12
Software command: a 1 value in this bit indicates reset caused by a
software command by the user.
13
Under voltage detection: a 1 value in this bit indicates reset caused by
under voltage detection.
14
External signal: a 1 value in this bit indicates reset caused by external
signal. Such a reset originates from the „GP Con“ connector on the
connector „Reset“. When this signal is brought low, a reset condition
occurs.
15
Watchdog timeout: a 1 value in this bit indicates reset caused by
watchdog timeout.
Card ID control register (I/O space address +0xff)
The following table details the +0xff address card ID register
I/O Address
Bit location
Signals
+0xff
0-3
Major PLD revision: binary coded 4-bit word encoding the major PLD
revision. This value can range from 0 to 15.
4-7
Minor PLD revision: binary-coded 4-bit word encoding the minor PLD
revision. This value can range from 0 to 15.
8-11
Board revision: binary-coded 4-bit word encoding the board revision.
This value can range from 0 to 15.
12-15
Board type: binary-coded 4-bit word encoding the board type. This
value can have one of the following values:
0 – ISA-based family card
1 – PCI-based family card
2 - unused
3 - PC/104 family card
4 - 15 unused
Watchdog control register (IO space address +4)
The following table details the +4 watchdog timeout register. A write to this register activates the watchdog timeout. From
then on every 104 millsec. a new write to this register must occur to avoid a reset of the motion control card.
I/O Address
Bit location
Data
+4
0-15
0x5562
-o-
388
© POSYS Motion Control GmbH & Co.KG, 2013
Application Notes
Extension Port Connector J6 (POSYS® 700, ISA-Bus)
Extension Port Connector J6 (POSYS® 700, ISA-Bus)
Pin No.
Description
Pin No.
Description
1
GND
2
A0
3
DS0
4
A1
5
DS1
6
A2
7
DS2
8
A3
9
DS3
10
A4
11
DS4
12
A5
13
DS5
14
A6
15
DS6
16
A7
17
DS7
18
A8
19
DS8
20
A9
21
DS9
22
A10
23
DS10
24
A11
25
DS11
26
A12
27
DS12
28
A13
29
DS13
30
A14
31
DS14
32
A15
33
DS15
34
IS-
35
DS-
36
STRB-
37
WE-
38
VCC
39
R/W
40
PS-
DS0..DS15: data
A0..A15 : addresses
IS-, DS-, STRB-, WE-, R/W, PS- : connections to CP
Connector J9
The analog inputs to this connector are in parallel to the analog inputs of connector J7.
J9 provides also inputs for external voltage references (high and low) selected by jumpers JP13, JP14 and JP15.
For example Analog1 from J7 is tied to Analog1 of J9 and Analog8 of J7 is tied to Analog8 of J9.
Date: 09/09/03
Servo Halbeck GmbH & Co. KG
-o-
389
© POSYS Motion Control GmbH & Co.KG, 2013
Stall Detection
Stall Detection
Subject: POSYS® Series, Stepping Motor Stall Detection
Stepping motor versions of the POSYS® series controllers can be equipped with encoder feedback. This provides means for
monitoring the actual position of the axis. It also provides means of detecting a stall condition of the stepping motor. In
order to activate this feature following command must be issued to the POSYS®:






SetEncoderSource(axis, incremental) //incremental = 0
SetEncoderToStepRatio(axis, counts, steps) //for example 400 encoder counts, 100 motor steps
SetPositionErrorLimit(axis, limit)
C learPosition Error(axis) //clears any follow error
Update(axis)
SetAutoStopMode(axis, On) //On = 1, Off = 0; this stops the motor if the limit is exceeded
The above settings would stop the motor if the difference between commanded and actual position would exceed 500
steps. The command SetEncoderToStepRatio will not change the value returned by GetActualPosition. In the above
example. A move of 500 motor steps would equal 2000 encoder counts. Assuming no counts would be generated but the
motor would turn, then it would require 2000 encoder counts (this corresponds to 500 x 4 steps) to deactivate the motion
generator, at this point no steps would be output if a start command would be issued.
If in the above example GetActualPosition(axis) returns 228, the command
C learPositionError(axis) would copy the value 57 (228 / 4) to the Commanded Position register.
Date: 26.01.2004
Revised:
-o-
390
© POSYS Motion Control GmbH & Co.KG, 2013
Coordinated Motion with POSYS® Contouring Library
Coordinated Motion with POSYS® Contouring Library
Theme: Generating coordinated motion data
The POSYS® series supports on-board RAM. This RAM can be used for trace buffer and/or program buffer. If complex
motion is required then we recommend the use of the on-board RAM. Data points, position, velocity and an
Update-multiplicator need to be generated and stored in the on-board RAM. The program CONTOUR is a help for simple
2-axes coordinated motion. This document describes the usage of this program.




Install the POSYS® main program with the integrated Setup for Windows 9x/ME/NT/2000/XP.
After installation change to the new created subdirectory /Driver Installation. Start the program Ksetup.exe.
C hange to the new created subdirectory /lib and start the batch-file registerOCX.exe.
Decompress this program to a subdirectory of your choice and start the program.
Screen with Contour Data
Program description
1. C ontrols Box: choose Test Mode. Push Start.
2. The box “TestMode only” opens.
3. Input in the windows “StartPosition1” and “StartPosition2” the start positions of the axes 1 and 2. Defaults are 0. The
upper example shows values for the X-axis = 17321 and for the Y-axis = 10000.
4. In the Box “SelectAxes” the X and Y axes are set to default. You can choose any other possible configuration.
5. In the Box “Profile Type and Rate” choose START PROFILE and the desired Up Date Rate. Up Date Rate is a factor with
which the Chip Update Time is multiplied and then valid is for each segment. Assumed you have a 4-axes card (servo
or stepper), then the Chip Update Time = 0.0004096 seconds. This value is multiplied with the Chip Update Rate, in
this example with 10. Each segment will be driven with the calculated speed of increments/Chip Update Time. Each
segment in the example has therefore a time frame of 4.096 milliseconds.
391
© POSYS Motion Control GmbH & Co.KG, 2013
6. The Box “Linear” will be used for coordinated linear motion and for the desired velocity (Feed Rate) in Millicounts/(Chip
7.
8.
9.
10.
11.
Update Time). The value 10000 Millicounts = 10 counts/(Chip Update Time) = 24 414 pulses/second. Axis 1 Distance
and Axis 2 Distance are occupied by defaults, which need to be changed if necessary. For our example we took the
value 10000 for FeedRate.
The Box C ircle serves for the input of data for circular interpolation. C enter 1 and C enter 2 contain the values for the
center of the circle and Arc the value for the circular arc in millidegrees. A CW motion is positive and CC W motion is
negative. For a CW circular arc of 15,54 degrees you must input 15540.
For the first segment which will be calculated START PROFILE must be chosen first. For all additional segments
APPEND PROFILE must be defined. The last segment can be either defined as APPEND PROFILE or LAST PROFILE.
Then the button Generate Array for either linear or circular motion calculation must be pushed to calculate the path
information. The generated data will be shown in the windows Array Display.
To save the data you can click the button Save. To load the data you can click the button Load.
The menu point Show Path/Display allows to graphically display a calculated path. The screen shot below shows a
typical motion. The center of the circle is at (0,0), the motion will be -120 degrees, the radius is 20000. The starting
point for X=17321 and Y=10000.
Circular Motion
12. With Zoom ON and using the right button of the mouse you can choose an area of the path which should be shown in
a different zoom factor. Reset Zoom or doubleclick of the right mouse button resets the display to the default size.
13. In the Box Rel/Abs. You can choose if the input data is absolute or relative. At the moment only absolute can be
chosen.
14. The button C lear Array clears a programmed array, the button C lear List Box clears the content of the output window.
Sample programming
The values in the above screen shot shall be used for this programming example. All necessary steps will be shown.
1. The two axes are at position: X = 17321 (Start Position 1), Y = 10000 (Start Position 2) which are considered the start
positions. Input in Test Mode Box.
2. Velocity (Feed Rate) = 10000 Millicounts. Input in Linear Box.
3. Motion path = -120000 millidegrees (120 degrees CC W), radius 20000, center of circle (0,0), Input as C enter 1 and
C enter 2.
4. Linear acceleration and deceleration over 9 degrees each with start at 1000 Millicounts. The acceleration is not
implemented in the this version yet and needs to be done manually by deviding the segment into 1 degree motions.
5. Input:
392
© POSYS Motion Control GmbH & Co.KG, 2013
START PROFILE
Start Position 1 = 17321
Start Position 2 = 10000
Feed Rate = 1000
C enter 1 = 0
C enter 2 = 0
Arc = -1000 (equals 1 degree)
button Generate Array in Box C ircle
APPEND PROFILE
Feed Rate = 2000
C enter 1 = 0
C enter 2 = 0
Arc = -1000 (equals 1 degree)
button Generate Array in Box C ircle
Feed Rate = 3000
C enter 1 = 0
C enter 2 = 0
Arc = -1000 (equals 1 degree)
button Generate Array in Box C ircle
Feed Rate = 4000
C enter 1 = 0
C enter 2 = 0
Arc = -1000 (equals 1 degree)
button Generate Array in Box C ircle
Feed Rate = 5000
C enter 1 = 0
C enter 2 = 0
Arc = -1000 (equals 1 degree)
button Generate Array in Box C ircle
Feed Rate = 6000
C enter 1 = 0
C enter 2 = 0
Arc = -1000 (equals 1 degree)
button Generate Array in Box C ircle
Feed Rate = 7000
C enter 1 = 0
C enter 2 = 0
Arc = -1000 (equals 1 degree)
button Generate Array in Box C ircle
Feed Rate = 8000
C enter 1 = 0
C enter 2 = 0
Arc = -1000 (equals 1 degree)
button Generate Array in Box C ircle
Feed Rate = 9000
C enter 1 = 0
C enter 2 = 0
Arc = -1000 (equals 1 degree)
button Generate Array in Box C ircle
Feed Rate = 10000
C enter 1 = 0
C enter 2 = 0
Arc = -102000 (equals 102 degrees with constant velocity)
button Generate Array in Box C ircle
Feed Rate = 9000
C enter 1 = 0
C enter 2 = 0
Arc = -1000 (equals 1 degree)
button Generate Array in Box C ircle
Feed Rate = 8000
C enter 1 = 0
C enter 2 = 0
Arc = -1000 (equals 1 degree)
button Generate Array in Box C ircle
Feed Rate = 7000
C enter 1 = 0
C enter 2 = 0
Arc = -1000 (equals 1 degree)
button Generate Array in Box C ircle
Feed Rate = 6000
C enter 1 = 0
C enter 2 = 0
Arc = -1000 (equals 1 degree)
button Generate Array in Box C ircle
393
© POSYS Motion Control GmbH & Co.KG, 2013
Feed Rate = 5000
C enter 1 = 0
C enter 2 = 0
Arc = -1000 (equals 1 degree)
button Generate Array in Box C ircle
Feed Rate = 4000
C enter 1 = 0
C enter 2 = 0
Arc = -1000 (equals 1 degree)
button Generate Array in Box C ircle
Feed Rate = 3000
C enter 1 = 0
C enter 2 = 0
Arc = -1000 (equals 1 degree)
button Generate Array in Box C ircle
Feed Rate = 2000
C enter 1 = 0
C enter 2 = 0
Arc = -1000 (equals 1 degree)
button Generate Array in Box C ircle
Feed Rate = 1000
C enter 1 = 0
C enter 2 = 0
Arc = -1000 (equals 1 degree)
button Generate Array in Box C ircle
The input and generating of the Array is complete. Now the data needs to be uploaded into the on-board RAM and
executed. The motion will be a arc of 120 degrees.
Datum: 15.09.2003
Revision:
Europe: [email protected]
POSYS® is a registered trademark of servo-Halbeck
-o-
394
© POSYS Motion Control GmbH & Co.KG, 2013
Coordinated Moves using POSYS® 900 Motion Controller
Coordinated Moves using POSYS® 900 Motion Controller
There are different ways of programming a coordinated move. This description refers to standard POSYS900.DLL functions.




C alculate speed and acceleration values for every axis and do a MultiUpdate(axes) (simultaneous start).

Similar calls exists for 3 and 4 axes linear moves like LinearMove3( ) and LinearMove4( )
a. It is possible to preload new speeds, acceleration and distances on the fly and activate (update) these values
automatically using the SetBreakpoint and SetBreakpointValue functions, an automatic update will occur. This can now
be set to generate an interrupt to alert the host that an interrupt occurred and new data may be loaded for the next
update.
b. Depending on the speed of the host computer update rates of 2 milliseconds or faster are possible. If the fast MC
(version 2.0 and higher) are used update rates of 400 microseconds are possible
Using the Master/Slave functions simplifies linear moves. It is possible to have two master and two slaves working
independently of each other. Any axis can be master or slave. Assuming a linear move of two axes should take place
program the following
a. Master = axis 0, Slave1 = axis1
b. Use the following functions:
c. SetProfileMode(slaveAxis, electronicgear) //sets the profile for this axis to electronic gear
d. SetGearMaster(axis,masterAxis,source) //axis=slave axis, masterAxis=master axis, source=actual position or
commanded position
e. SetGearRatio(slaveAxis,ratio) //sets the ratio between master and slave. Example: 32768 moves the slave 0.5
counts for every positive master count.
f. Update(slaveAxis) //updates the data
g. Now any movement of the master axis will result in a proportionate (gear ratio) move of the slave axis or axes. The
ratio is scaled by 1/65536 and can be positive or negative. The ratio can be changed anytime on the fly. A gear ratio
of 1,000,000 would cause the slave to move 15.295 positive slave counts for every master count.
h. The gear ratio is a buffered command and will not take effect until an update is issued. The ratio can be changed
anytime on the fly, therefore great caution must be used.
1.
Assign Master and Slave axis and program the Ratio
Use the on-board RAM to store a motion profile and execute this sequence of commands
For simple linear moves vector speed and vector acceleration must be known as well as the destination points for the
involved axes. The routines called from the DLL will then calculate the corresponding axis speeds and acceleration.
a. LinearMove2(axis1, axis2, vectorspeed, vectoracceleration, distance1, distance2)
b. Axis1 = 0 3
c. Axis2 = 0 3
d. vectorspeed = quadrature counts/sec
e. vectoracceleration = quadrature counts/sec²
f. distance1, distance2 = quadrature counts

Using the On-board RAM provides the greatest flexibility. It allows execution of very complex profiles which must be
precalculated by the host and then loaded into the RAM. The best way to explain the method is by an example. The
files of the example ExternalProfile show how to program this way in Delphi. An example in C is also available. This
could easily be translated to Visual Basic since this program makes use of the POSYS700.DLL (for the PCI version it
would be the POSYS900.dll). This allows continuous path contouring for linear and circular motion. It also allows linear
and S-curve acceleration and deceleration. It also gives the programmer flexibility in assigning update rates which can
vary over the length of the program. The program length is practically unlimited since the RAM can be refilled with new
data as stored data is being executed.

The optional PathFinder development software provides the ultimate in ease of programming using the on-board RAM.
It includes functions for complex move programming of linear and circular interpolation for continuous path motion
with linear or S-curve acceleration/deceleration. The software also includes a G-code and HPGL interpreter. It is
available as a DLL or in complete source (C/C++). The PathFinder user s guide is included for more detailed
information.
Date: 23 July, 2002
Last Revision:
Europe e-mail: [email protected]
-o-
395
© POSYS Motion Control GmbH & Co.KG, 2013
Digital IO Specification POSYS® 7xx/8xx/8xx-B/9xx
Digital IOs Specifications
Subject: POSYS® Series, Digital Input/Output Specifications
The POSYS® motion controllers are equipped with programmable digital IO. This TN provides details about the IO
specifications for the POSYS® 700, POSYS® 800 and the POSYS® 900 series.
Type of IO
POSYS® 700
POSYS® 800
POSYS® 800-B/900
Digital Inputs
10k Pullup to 5VDC
10k Pullup to 5VDC
10k Pullup to 5VDC ,
74AC T541MTC
Limit Switch Inputs
10k Pullup to 5VDC ,
MC14490DW
10k Pullup to 5VDC ,
MC14490DW
10k Pullup to 5VDC ,
MC14490DW
AxisIn Inputs
4.7k Pullup to 5VDC
4.7k Pullup to 5VDC
4.7k Pullup to 5VDC ,
74AC T541MTC
Home Inputs
4.7k Pullup to 5VDC
4.7k Pullup to 5VDC
800-B
900
4.7k Pullup to
5VDC ,
Encoder Inputs
Line Receiver SN75173, 150Line Receiver SN75173, 150 Line Receiver DS26LS32C M,
Ohm terminating resistor
Ohm terminating resistor
150 Ohm terminating resistor
Digital Outputs
TTL, 74FC T244,
TTL, 74AC T244,
sink current: 48 mA, source source/sink current: ±24
current: 12 mA
mA
TTL, 74AC T541,
source/sink current: ±24 mA
(max. ±50)
Amplifier Enable
Outputs
TTL, 74FC T244,
TTL, 74AC T244,
sink current: 48 mA, source source/sink current: ±24
current: 12 mA
mA
TTL, 74AC T541,
source/sink current: ±24 mA
(max. ±50)
AxisOut Outputs
TTL, 74FC T244,
TTL, 74AC T244,
sink current: 48 mA, source source/sink current: ±24
current: 12 mA
mA
TTL, 74AC T541,
source/sink current: ±24 mA
(max. ±50)
Date: 24.06.2003
Revision:
E-mail: [email protected]
POSYS® is a registered trade mark of POSYS Motion Control
-o-
396
© POSYS Motion Control GmbH & Co.KG, 2013
Digital Inputs & Outputs
Digital Inputs and Outputs
Subject: POSYS® Series, Digital Inputs and Outputs
The POSYS® motion controllers provide a number of digital inputs and outputs which ma be used in different ways.
1. Inputs:
1. Encoder SignalsA+/A-, B+/B-, I+/I-. The signals A-, B- and I- are used in addition to the + signals if the
encoder provides inverted signals (line driver) outputs. A+, B+ and I+ are the only signals used with TTL
output encoders. Encoder input signals are dedicated inputs and cannot be used for other purposes.
2. Limit Switchinputs XPLIM1, XNLIM1, XPLIM2, XNLIM2, XPLIM3, XNLIM3, XPLIM4 and XNLIM4 are used to
monitor axis movement beyond a certain positive or negative distance. If the limit switch function has been
activated by software, motion will stop if the appropriate positive or negative input goes active. It is possible
to determine by software if the input should be active on a high or a low input signal. If the limit switches are
not used to inhibit motion, it is possible to use these inputs as general purpose inputs. The state of the limit
switch inputs (2 per axis) can be interrogated using the GetActivityStatus command. Bits 11 and 12 are set
for an active input.
3. AxisIninputs. There is one axis specific input per axis. These inputs can be used as dedicated inputs to
trigger automatic events. These events can be a motion change (stop, start, change of velocity, etc.). The
event is triggered upon a signal transition using the breakpoint mechanism. The AxisIn inputs can also be
used as general purpose inputs. The command GetSignalStatus returns the state of the AxisIn input.
4. Homeinputs are used for high speed position capture. When this input, one per axis, goes active the current
actual position will be saved to a register of the motion control processor. The capture source must be defined
by software since the encoder index can also be used to capture the position. The command to set the
capture source is SetCaptureSource. The command GetCaptureValue returns the position value captured
when a Home input went active. When used for high speed position capture, the inputs are axis specific.
These 4 inputs can also be used as general purpose inputs. The command GetAxis_In_Out_Home returns
the status of the Home inputs, the AxisIn inputs and the AxisOut outputs. The lower 4 bits (0..3) report the
status of the 4 Home inputs, bits 4..7 report the status of the AxisIn inputs and bits 8..11 report the status of
the AxisOut outputs.
5. Uncommitted Inputs. There are 8 uncommitted digital inputs. Their normal sate is high (5 VDC) with pullup
resistors of 10k. These signals are available to signal events to the operating program.
2. Outputs
1. AxisOut, there is one AxisOut output per axis. These outputs can be programmed to track any of the
assigned bits in ActivityStatus, EventStatus or SignalStatus register. The tracked bit in one of the three
registers may be in the same axis or a different axis as the axis of the AxisOut pin itself. If the AxisOut
outputs are not used for the above purpose it can be configured as a user programmable output. To do this
select 0 as the register ID code in the SetAxisOutSource command and by adjusting the level of the
resulting inactive output state to high or low as desired using the SetSignalSense command.
2. AtRest output signals. These 4 outputs (one per axis) are only available with the stepping motor version
(Pulse + Direction). The AtRest signal indicates when the trajectory generator is in motion. This signal is
useful for stepper drivers that support different torque output levels for the motor in motion and for the
motor at rest. No software setup is required to use these outputs. These are dedicated outputs and cannot be
user programmed.
3. AmpEnable outputs are provided to enable or disable attached servo amplifiers or stepping motor drivers.
There are 4 outputs, one per axis. The state of these outputs after power-on reset and executing other reset
functions like External Reset or a Hard Reset is LOW. These outputs can be set and reset by the software
commands SetAmpEnable and SetAmpDisable. The command GetAmpEnable returns the status of all 4
outputs. If a reversed output level for enable and disable is required (HIGH level after power-on) inquire
about our firmware upgrade. An in-field upgrade is possible. If these outputs are not required to enable or
disable amplifiers or drivers it is possible to use them as user programmable outputs. The 3 commands are:
4. SetAmpEnable(hPosys, mask) turns amplifier outputs on
5. SetAmpDisable(hPosys, mask) turn amplifier outputs off
397
© POSYS Motion Control GmbH & Co.KG, 2013
6. mask = GetAmpEnable(hPosys) returns the amplifier status
7. mask is a bit mask for the 4 outputs (1+2+4+8 for outputs 1,2,3 + 4)
8. hPosys is the card handle returned by OpenDevice(device)
9. User Outputs. There are 8 user programmable outputs. The power-on and after Reset state of these outputs
is LOW.
10. PULSE + DIRECTION, these outputs apply to the stepping motor version only. The default behavior is that a
step or pulse is considered to have occurred when the signal transitions from a high to a low output value. A
high level of the direction signal indicates a positive direction pulse and a low level indicates a negative
direction pulse. The logic for the pulse output can be inverted using the command SetSignalSense
For additional details about the mentioned commands please refer to the manual.
Example for AxisOut pin use
Assume the AxisOut pin should signal if the motor axis 0 (X) is in motion:
axis = 0
sourceAxis = 0
bit = 10
register = 2 (ActivityStatus)
SetAxisOutSource( axis, sourceAxis, register)
The AxisOut pin for the X-axis will now follow the status of bit 10 in the ActivityStatus register. The output will be set (high
level) while a profile is being executed for the X-Axis. The level will revert to a low state when in position. Using
SetMotionCompleteMode will specify if the bit should follow a commanded or actual position profile.
Date: 02.05.2003
Revision: 26.05.2004 – AmpEnable description revised
E-mail: [email protected]
POSYS® is a registered trade mark of servo-Halbeck
-o-
398
© POSYS Motion Control GmbH & Co.KG, 2013
Breakpoints
Breakpoints
Subject: POSYS® Series, DLL BreakPoint Functions
All POSYS® series controllers support the DLL breakpoint functions. Breakpoints provide a convenient way of having the
motion controller react to certain events. Each POSYS® axis has two distinct breakpoints that may be programmed for it.
They are known as breakpoint 1 and breakpoint 2. Therefore it is possible to monitor two separate events for each axis.
This note describes how to program the breakpoint functions and uses an example to explain the steps required.
The following functions apply to the use of breakpoints:
F unction
Description
SetBreakpointValue(axis, breakpoint_no, trigger_value)This function sets breakpoint 1 or 2 for the selected axis
to react to trigger_value
GetBreakpointValue(axis,breakpoint_no)
This function returns a long integer with the programmed
trigger_value
SetBreakpoint(axis, breakpoint_no, source_axis, action,This function establishes a breakpoint for the specified
trigger)
axis to be triggered by an event or condition of the
source_axis. The source_axis may be the same or
different then axis
GetBreakpoint(axis,breakpoint_no)
This function returns programmed source_axis, action
and trigger
SetAxisOutSource(axis, source_axis, bit, register)
This function is not directly related to breakpoints but
offers a convenient means of setting an out put without
host intervention
GetAxisOutSource(axis)
This function returns the programmed values of
source_axis, bit and register
For more details of the various commands please refer to the POSYS® manual.
Note:Always program SetBreakpointValue() first. This is very important since the motion controller will start to react
immediately to a breakpoint event or condition once SetBreakpoint() is issued.
The following example demonstrates the steps required for using breakpoints based on an actual requirement.
Assume the following requirements:
1.
2.
3.
4.
5.
X-motor starts to move towards a target position
Solenoid # 1 turns on after X-motor has reached ¼ of the target position
Y-motor starts to move to its target position after X-motor has traveled ½ towards the target position
Solenoid # 2 turns on when Y-motor is at ¾ of its target position
Solenoid # 1 and solenoid # 2 are turned on and off by axis specific outputs OUT1 (X-axis) and OUT2 (Y-axis)
Program Sequence, all values are only taken as an example:
All axes are assumed to start from absolute position 0.
C onst
Xaxis = 0
Yaxis = 1
Speed = 01A36E (4000 steps/sec.)
Accel = 00DB (20000 steps(sec²)
TargetX = 20000 (quadrature counts)
TargetY = 34000 (quadrature counts)
Breakpoint1 = 0
Breakpoint2 = 1
Begin
SetVelocity(Xaxis, Speed)
SetVelocity(Yaxis, Speed)
SetAcceleration(Xaxis, Accel)
399
© POSYS Motion Control GmbH & Co.KG, 2013
SetAcceleration(Xaxis, Accel)
SetPosition(Xaxis, TargetX)
SetPosition(Yaxis, TargetY) //values are written to the registers but not yet executed
SetBreakpointValue(Xaxis, Breakpoint1, (TargetX / 4))
//the breakpoint value for Breakpoint1 and the X-axis has been set to TargetX = 20000 / 4 =5000
SetBreakpointValue(Yaxis, Breakpoint1, (TargetX /2))
//set the Breakpoint1 of the Y-axis to the position of TargetX //= 20000 / 2= 10000
SetBreakpointValue(Yaxis, Breakpoint2, (TargetY * 0.75)
//set the Breakpoint2 of the Y-axis to the position of TargetY //= 34000 * 0.75= 25500
ResetEventStatus(Xaxis, GetEventStatus(Xaxis) and not 04H)
ResetEventStatus(Yaxis, GetEventStatus(Yaxis) and not 04004H)
//these commands clear the Breakpoint1 bits in the //EventStatusRegister of the X- and Y-axes if they were set, a //zero
(0) clears the bit. Breakpoint2 bit of the Y-axis is also //cleared
SetAxisOutSource(Xaxis, Xaxis, 2, 1)
//source_axis = Xaxis, Output OUT1 will be triggered when Breakpoint1 changes state, bit number = 2, status register = 1
(event). The OUT1 pin will follow the state of Breakpoint1 in the event register
SetAxisOutSource(Yaxis, Yaxis, 0E, 1)
//source_axis = Yaxis, Output OUT2 will be triggered when Breakpoint2 changes state, bit number = 0E, status register =
1 (event). The OUT2 pin will follow the state of Breakpoint2 in the event register
SetBreakpoint(Xaxis, Breakpoint1, Xaxis, 0, 1)
//this function activates the X-axis Breakpoint1 mechanism, source_axis = Xaxis, action = 0 (none), trigger = 1
(commanded position)
SetBreakpoint(Yaxis, Breakpoint1, Xaxis, 1, 1)
//this function activates the Y-axis Breakpoint1 mechanism, source_axis = Xaxis, action = 0, trigger = 1 (commanded
position). Note that the source axis is the X-axis! Action = 1 = Update starts the move of the Y-axis, trigger = 1 is the
commanded position of the X-axis
SetBreakpoint(Yaxis, Breakpoint2, Yaxis, 0, 1)
//this function activates the Y-axis Breakpoint2 mechanism, source_axis = Yaxis, action = 0 (none), trigger = 1
(commanded position)
Update(Xaxis) //this starts motion of the X-axis
End
Explanation of the program
The POSYS® axis specific outputs (OUT1 and OUT2) and its breakpoint mechanism are used to solve this requirement
without the need of host intervention or polling.
After initializing the X- and Y-axes with speed, acceleration and target positions, the breakpoints and the source for the
axis outputs (OUT1, OUT2) are setup.
Two breakpoints are available for each axis. Using the command SetAxisOutSource it is possible to set the event to
which the outputs should react. The Breakpoint1 bits of the X and Y-axes in the GetEventStatus register will be set once
the event/condition occurs as programmed in SetBreakpointValue and SetBreakpoint.
IMPORTANT
When programming SetBreakpointValue for conditions of EventStatus, ActivityStatus or SignalStatus, a two word mask has
to be sent to the controller. The high word will be the mask for the trigger condition and the low word will be the mask for
400
© POSYS Motion Control GmbH & Co.KG, 2013
the sense (high or low) of the trigger bits. An example will best explain this requirement. Assuming for the EventStatus
register breakpoint number 2 should be triggered when the motion complete bit is set to one, bit 14 and bit 0 would be
set. The value to be sent would be high_word=0x4001 and low_word=0x4001, so the value to be sent would be value =
((high_word shl 16) or low_word) = 0x40014001. In another example for the EventStatus assume a breakpoint should be
recognized if the motion complete bit (bit 0) is set to 1 (motion complete), and the commutation error bit(bit 11) is set to
0. In this case high_word = 0x0801 and the low_word = 0x0001. The command to be sent actually would be the value =
((high_word shl 16) or low_word) = 0x08010001
SetBreakpointValue( axis, breakpointNo, 0x08010001)
Explanation: shl = shift left (in C/C++ << )
or = or (in C/C++ | )
In order to reset OUT1 and OUT2 it is necessary to reset the corresponding bits in the EventStatus register. The
ResetEventStatus will do just that. To reset OUT1 issue the following command
ResetEventStatus(Xaxis, GetEventStatus(Xaxis) and not 04)
Any zeros in the bit mask will reset those bits. In the above command, the Event Status register is read in with
GetEventStatus(Xaxis) and bit 2 is set to zero and reset. Output OUT1 will revert to its previous state.
It is possible to change the sense state of the outputs OUT1 to OUT4 using the command
SetSignalSense(axis, mask)
A zero for the sense bit, the input/outputs is active low, a one for the sense bit makes the input/output active high. The
OUT-bit is number 10, the encoding would be 0400H.
For example if the signal sense for the output OUT should be high, do the following
SetSignalSense(Xaxis, (GetSignalSense(Xaxis) or 0400H))
This turns on bit 10 in the mask.
Another interesting aspect is the use of interrupts with breakpoints. Breakpoint1 and Breakpoint2 can both trigger an
interrupt. To activate this condition use the command
SetInterruptMask(axis, interruptMask)
To generate an interrupt on Breakpoint1 and Breakpoint2 bit 2 and bit 14 must be set to 1. The corresponding Event
Status register bit will cause an interrupt when the status register bit goes active. To cause an interrupt on the X-axis’s
Breakpoint1 send the following:
SetInterruptMask(Xaxis, GetInterruptMask(Xaxis) or 04H)
After an interrupt has been serviced it must be cleared using
ClearInterrupt
and
ResetEventStatus(axis, GetEventStatus(axis) and not bit)
If interrupts are to be used it will be necessary to call an ISR (interrupt service routine) which will execute the desired
routines. In this example it would be possible to have the ISR execute special host commands to a separate user I/O card.
If no interrupt handler is installed it would be possible to use polling. The command
GetProcessorStatus
is a special instruction that returns the motion processor status. It returns 16 bits with the following meaning:
Bit number Description
0 – 12 unused, set to 0
13 holds value of HostIOError signal
401
© POSYS Motion Control GmbH & Co.KG, 2013
14 holds value of Host Interrupt Signal, a 1 indicates a high level
15 holds value of Host Ready Signal, a 1 indicates a high level
Date: 06.09.2002
Revision: 15.01.2003
E-mail: [email protected]
POSYS® is a registered trademark of servo-Halbeck
-o-
402
© POSYS Motion Control GmbH & Co.KG, 2013
Error Code
Error Code
Subject: POSYS® Series, Error Code
For more details of the various commands please refer to the POSYS® manual.
The POSYS® motion controllers can be interrogated to determine if an error occurred.
Two functions are useful for this. They are:
GetProcessorStatusand
GetHostIOError
GetProcessorStatus is a status read function that can be called anytime without a wait time. There is no check of the
processors’ ready bit.
The table defines the returned signal bits.
Bit Number
Description
0-12
Unused, set to 0
13
Holds value of HostIOError signal, refer to GetHostIOError function
14
Holds value of HostIntrpt signal, a 1 indicates the signal level is high
15
Holds value of HostRdy signal, a 1 indicates the signal level is high
If a call to GetProcessorStatus returns with Bit 13 set (1) it indicates an error condition. If this is the case a call to
GetHostIOError would return a code indicating the cause of the error. The following table lists all of the error conditions:
Code
Indication
Cause
0
No error
No error condition
1
Motion chip reset
Default value of error code on reset or power-up
2
Invalid instruction
Instruction is not valid in the current context, or an illegal instruction
code has been detected
3
Invalid axis
The axis number contained in the upper bits of the instruction word is
not supported by the chip set
4
Invalid parameter
The parameter value sent to motion processor was out of its
acceptable range
5
Trace running
An instruction was sent that would change the state of the tracing
mechanism while the trace is running. Instruction which can return this
error are SetTraceVariable, SetTraceMode
and SetTracePeriod
6
Reserved
7
Block bound exceeded
1. The value sent bySetBufferLength, or SetBufferStartwould
2.
create a memory block which extends beyond the allowed limits of
400h – 7FFFFFFF
Either SetBufferReadIndex
, or SetBufferWriteIndexsent an
index greater than or equal to the block length
8
Trace zero
SetTraceStartImmediate
was issued, but the length of trace buffer
is currently set to zero
9
Bad checksum
Applies to serial port only! The checksum compiled and returned by the
motion processor does not match that sent by the host
Ah
Not primary port
A prohibited instruction (one which can be executed only through the
primary port) was issued through the diagnostic port
Bh
Negative velocity
An attempt was made to set a negative velocity without the axis being
in velocity contouring profile mode
Ch
S-curve change
The axis is currently executing an S-curve profile move and an attempt
was made to change the profile parameters. This is not permitted
Dh
Limit event pending
A limit switch event occurred
403
© POSYS Motion Control GmbH & Co.KG, 2013
Code
Indication
Cause
Eh
Move into limit
An attempt was made to execute a move without first clearing the limit
bit(s) in the Event Status register
Executing the GetHostIOError command clears both the error code and the I/O error bit in the I/O status read word (
GetProcessorStatus).
The GetHostIOError function call takes more time then a call to GetProcessorStatus. The reason is that GetHostIOError
checks the motion processor’s ready bit and GetProcessorStatus does not. The suggested approach for error checking is
shown in the following example:
Section calling Motion Processor Functions
SetVelocity(axis, speed)
If (GetProcessorStatus and Bit13 = 2000h) then
GetErrorRoutine // only if bit 13 is set go to the GetErrorRoutine and call GetHostIOError to determine the error cause
Section retrieving the error code and handling of the error
GetErrorRoutine
Var
Errorcode
Begin
Errorcode = GetHostIOError //a call to this function will reset all error bits
if (Errorcode and 2) = 2 then
DisplayMessage //display a message or go to an error handling routine
HandleError
End
End
Date: 24.10.2002
Revision:
E-mail: [email protected]
POSYS® is a registered trade mark of POSYS Motion Control
-o-
404
© POSYS Motion Control GmbH & Co.KG, 2013
On-Board RAM
On-board RAM
Subject: POSYS® Series, On-board RAM
Al l POSYS® Series controllers are equipped with on-board RAM which in this document will be referred to as on-board
RAM. The POSYS® 700 and 800 Series controllers make 256k x 8 available and the POSYS® 900 series makes 512k x 8
available.
This RAM serves two purposes, one is to use it as a trace buffer, the other is to use for storing and executing complex
motion profiles. Using on-board RAM for the trace buffer makes it possible to collect real time data generated by the
motion processor and store it automatically in RAM. Four different variables can be selected from a total of 28. It is
possible to trace 4 variable at a time, i.e. data can be captured for each variable per update period (servo cycle).
The length of the trace buffer is variable and programmable. It could be up to the full available memory minus 512 words
for the system.
If memory is needed for program storage and execution, again it could be the full length minus 512 words or it could be
setup to have trace buffers and profile buffers. The different buffers are identified by Id's, the trace buffer must always be
assigned ID = 0.
Relevant On-board RAM Functions
Functions which are relevant to the use of the on-board RAM are:
Profile Mode













GetBufferFunction
GetBufferLength
GetBufferReadIndex
GetBufferStart
GetBufferWriteIndex
ReadBuffer
SetBufferFunction
SetBufferFunction
SetBufferLength
SetBufferReadIndex
SetBufferStart
SetBufferWriteIndex
WriteBuffer
The function SetProfileMode(axis, mode) has been expanded to include the on-board RAM mode = 4.
All of the above functions and the required parameters are described in detail in the Programmer’s manual.
Trace Mode










GetTraceCount
GetTraceMode
GetTracePeriod
GetTraceStart
GetTraceStatus
GetTraceStop
GetTraceVariable
SetTraceMode
SetTracePeriod
SetTraceStart
405
© POSYS Motion Control GmbH & Co.KG, 2013


SetTraceStop
SetTraceVariable
These functions only apply to trace function setup and execution. A detailed description can be found in the Programmer’s
manual.
Use of On-board RAM for Profile Mode
The on-board RAM can be used to store and execute complex motion profiles. Motion data calculated by the host is loaded
into RAM and then executed by the motion processor without further host intervention. Up to 4 axes can move on a
complex path in continuous fashion. Each axis can be programmed for





Position
Velocity
Acceleration
Jerk (S-curve)
SegmentTime
All data is in 32-bit format.





Position data is always absolute and represents the target destination at the end of the segment.
Velocity is in quadrature counts/update period (servo cycle)
Acceleration is quadrature counts/update period²
Jerk is in quadrature counts/update period³
Segment time is a multiplier for the update period (servo cycle)
If 4 axes are enabled and the update time is the default of 408 microsecond then this is the fastest available update time
for data in the buffers represented by a SegmentTime multiplier of 1. If a SegmentTime multiplier of 0 is encountered in
the time buffer the external profile mode for that axis will be exited. The other axes will continue to execute their profile.
Motion errors and an abrupt stop will also cause an exit from on-board RAM.
The length of the segment time depends on the type of profile and the application. The shorter that time the more memory
will be required. Movement along linear segments should use much longer segment times than circular motion. On circular
motion segment times of less than 2 milliseconds are hardly ever required.
What must be observed
When a motion profile in on-board RAM is executed it will eventual get to the end of the buffer with data which had been
allocated. If it does not find a SegmentTime of 0 it will wrap around to the starting position and continue with the
execution. This could be potentially dangerous. If the final axes positions are different from the profiles starting
positions it could cause an instant jump to these positions. To exit the on-board RAM profile mode the last segment must
contain a SegmentTime multiplier of 0 for each involved axis. The axes will then remain in a stationary mode. The selected
profile mode (SetProfileMode(axis, profile)) is still External (profile = 4) and must be set to the desired mode for further
execution.
Available Memory (RAM) not sufficient for program
The program length exceeds the available memory. This is no problem. Divide the motion sequences into shorter
segments. Load these shorter segments and send additional data (segments) to the on-board RAM after memory becomes
available. The memory is split in a part that is executing and the other for storing data to be executed. The functions
GetBufferReadIndex and SetBufferWriteIndex are the mechanism to determine the momentary read position within the
buffer to specify a new write position for new data. Once the original data gets to the end the read pointer wraps
automatically to the start position and continues executing the program.
Assume the following conditions, the total number of program positions in RAM required is 26,350, but only 10,000 are
available. Proceed as follows:



Load data into position 0 to 10,000



Start loading new data into RAM starting at the BufferWriteIndex = 0 up to RAM position = 4999
Start external profile mode
Set up a breakpoint which corresponds to some event as the BufferReadIndex passes the RAM position 5000 or check
the BufferReadIndex for >= 5000
C heck for wrap around until BufferReadIndex <= 10000
Start loading new data into RAM starting at the BufferWriteIndex = 5000 up to RAM position = 10000
C ontinue this method until all data is loaded and executed. Make sure to append one segment with a SegmentTime
406
© POSYS Motion Control GmbH & Co.KG, 2013
multiplier of 0 to exit External Profile mode.
-o-
407
© POSYS Motion Control GmbH & Co.KG, 2013
Limit Switches
Limit Switches
Refers to: all POSYS® Motion Controllers
All POSYS® series controllers support travel limit switches. These limit switches, there are two per axis, can be configured
to stop motion beyond a certain position of the machine. The switch is activated as the machine tries to move beyond it.
This is an important safety feature and should not be by-passed.
This note describes how to program the limit switch functions and what to do once a limit switch has been activated and
the machine has stopped.
The following functions apply to the use of limit switches:
Function
Action
SetLimitSwitchMode
enables or disables the limit switch for the specified axis
GetLimitSwitchMode
returns the programmed mode
SetSignalSense
set selected limit switch to be active high or active low
GetSignalSense
returns the programmed or default values
GetEventStatus
returns the event status including limit switches
ResetEventStatus
resets selected event bits
The following example demonstrates the steps required for using limit switches for the X-axis.
C onst
axis = 0; // X-Axis
on = 1;
off = 0;
F unction
Action
SetLimitSwitchMode(axis, on);
Turns on limit switch sensing for the desired axis
Use SetSignalSense to program limit switch sensing to be active high or active low; the default is active low
If during a move a limit switch is activated, the motor will come to an abrupt stop by automatically setting the velocity to
zero, no deceleration is used. If the positive limit switch was activated, then no further motion will be possible in the
positive direction. Unless this was intended as a normal operation, make sure the cause of the event is investigated and
appropriate safety corrections are made.
As the next step clear (reset) the limit switch bit(s) in the event status register by issuing the ResetEventStatus for the
appropriate axis. For the example issue
Function
Action
ResetEventStatus(axis,0);
this command would clear all pending bits in the event status register
If only the bit of the positive limit switch should be cleared issue
Function
Action
ResetEventStatus(axis, 0x48DF);
this only resets bit 5, ‘In Positive Limit’ 0 in the mask resets the event,
a value of 1 has no affect
Now a move should be made in a direction opposite to the one that caused the limit switch event, in this case in the
negative direction. Trying to move into the positive direction would re-trigger the limit switch event.
F unction
Action
SetProfileMode(axis, trapezoidal);
other modes like velocity are also possible only required if a different
mode is desired from the active one when the limit switch was
activated
SetVelocity(axis, speed);
a limit switch activation sets the speed to zero, so before a new move
408
© POSYS Motion Control GmbH & Co.KG, 2013
F unction
Action
is possible a new value must be programmed
SetPosition(axis, GetPosition(axis)-5000); this command sequence would get the present absolute position and
move the motor–5000 counts away from it. The move distance chosen
should be sufficient to get it off the limit switch
Update(axis)
this starts the actual move
If an occasion occurs in which both limit switches (positive and negative) are active at the same time, for example both
limit switch bits would be set in the activity status register, motion in either direction would be disabled. In this case use
F unction
SetLimitSwitchMode(axis, off);
To disable limit switch processing temporarily until the motor is moved off the switches..
The limit switch inputs of the POSYS® motion controllers are equipped with digital filtering to avoid false triggering due to
electrical noise.
When a limit switch event occurs the motor will always stop without a deceleration ramp. This is normally the desired
action since the purpose of the limit switch is to prevent further travel. However, due to mechanical characteristics of some
equipment (e.g. large inertia loads or heavy weights being moved) a smooth stop may be preferable.
This can be achieved using the breakpoint or interrupt system. In both cases the default action of the chip must be
disabled. Here is a description of using a breakpoint, interrupts are similar but the SetInterruptMask must be set to
SetInterruptMask(axis, bpNo).
Programming the BreakPoint system is done as follows:
F unction
Action
SetLimitSwitchMode(axis, off);
This prevents the motion controller from setting the positive/negative
bits in the Activity- and Event Status registers and from stopping the
motors
Using a BreakPoint to stop a motor:
SetBreakpointValue(axis, bpNo, (NEGLIM+POSLIMIT <<16) | (NEGLIM+POSLIM))
// << = shift left, | = or
SetBreakpoint(axis, bpNo, sourceAxis, action, trigger)
// bpNo = BreakPoint number 1 or 2
// sourceAxis = axis
// action = SmoothStop
// trigger = SignalStatus
Once a limit switch event occurs the motor will stop using the programmed deceleration for that axis.
For more details of the various commands please refer to the POSYS® manual.
IMPORTANT NOTE: This note applies to drivers without a handle. If the new POSYSPci drivers are used a handle must be
included with every command, the handle is the first parameter to be passed as shown in the following example:
SetLimitSwitchMode(hPosys, axis, off)
hPosys is the handle (integer) returned that was returned when opening the driver:
hPosys = OpenDevice(deviceNo)
Date: 06.09.2002
Revision:
E-mail: [email protected]
POSYS® is a registered trade mark of servo-Halbeck
-o-
409
© POSYS Motion Control GmbH & Co.KG, 2013
410
© POSYS Motion Control GmbH & Co.KG, 2013
Microstep Mode Setup
Sinusoidal Commutation and Microstep Mode Setup
Refers to: POSYS® 84x-B/86x-B/87x-B/88x-B; 94x/96x/97x/98x; 182x; 192x
On the main menu select Commutation/Microstep / Setup
From the Axis Selection box click on the selected axis. For each axis you need to repeat this procedure
From the upper left combo box select the desired motor output mode (DAC, PWM (S/M), etc.
The next combo box serves for the selection of number of phases, select 2
Into the next edit field enter the number of microsteps/full step. For example for 64 microsteps enter 64 x 4 = 256, for
256 microsteps enter 256 x 4 = 1024 (this is the maximum)
The last edit field is used for limiting the output. You must enter a value larger than 0 or no output will happen. The value
32767 represents the maximum output.
No other entries are required for the Microstep (MC240000xx) motion controller.
Now click on the button Set Microsteps. This will load the parameters. Repeat the above steps for all axes that you want
to use.
Now return to the Main Menu and go to the Stop On Motion Error selection box. Select the Radio Button Off.
411
© POSYS Motion Control GmbH & Co.KG, 2013
If you selected for the Motor Output DAC it is very important to select in the ±10 Volt Outputs box the check button
On, otherwise there will be no analog outputs.
You are now ready to enter move parameters, click on Send Data and Start Motion and your motors should start
turning.
For general information the source that is executed when clicking on Set Microsteps is included:
procedure TForm10.Button7C lick(Sender: Tobject);
var
ioerror :string[4];
index :integer;
//Button Set Microsteps
begin
Imp900.GetHostIOError(hPosys);
index:=C omboBox1.ItemIndex;
if index=-1 then
index:=0;
Imp900.SetOutputMode(hPosys,SelAxis,index);
index:=C omboBox2.ItemIndex;
if index=-1 then
index:=0;
Imp900.SetNumberPhases(hPosys,SelAxis,index +2);
//number of phases
Imp900.SetPhaseC ounts(hPosys,SelAxis,StrToInt(Edit1.Text));
//phase counts
Imp900.SetMotorC ommand(hPosys,SelAxis,StrToInt(Edit2.Text));
if (motioncontroller and $28000000)=$28000000 then
//max motor output
Imp900.SetC ommutationMode(hPosys,SelAxis,2);
//this command is only
//valid and required for the
//MC280000xx chip
if (Imp900.GetProcessorStatus(hPosys) and $2000)=$2000 then begin
ioerror:=IntToHex(Imp900.GetHostIOError(hPosys),2);
ShowMessage('Host IO error: '+ioerror);
exit;
end;
end;
Rev. Date: 08.01.2004
added comments for ±10 Volt Outputs box
-o-
412
© POSYS Motion Control GmbH & Co.KG, 2013
Mixed Motor Mode
Mixed Motor Mode
Subject: POSYS® 800-B and POSYS® 900 Series
The POSYS® 800-B and the POSYS® 900 Series motion controllers are identical with the exception of the bus system to
the host. The POSYS® 800-B is a PC-104 bus based controller, the POSYS® 900 is a PCI bus based controller.
Both types can be operated in the so-called mixed motor mode. To use this mode the controllers must be a fully featured
POSYS® 972/974 (including Synch POSYS® 982/984) or POSYS® 872-B/874-B (including Synch POSYS® 882-B/884-B).
This mode allows the operation of any axis in the brushed servo mode, brushless servo mode, brushless servo mode with
on-board sinusoidal commutation or in the microstepping mode. The axes can be mixed in any combination like for
example X-axis = brushed, Y- and W-Axis = brushless (sinusoidal) and Z-Axis = microstepping.
When the system starts up or after a Reset, all axes wake-up in the brushless servo mode with number of phases set to 3
and the output mode is set to 2.
To set an axis to brushed, brushless or microstepping the following commands must be issued:
Command
Brushed Servo
Brushless Servo
Microstepping
SetNumberPhases(axis(see Note 1, phase)1
2 or 3 (see note 2)
2
SetC ommutationMode(axis,mode)
n/a
0, 1 or 2
2
SetOutputMode(axis,mode)
0, 1 or 2
0, 1 or 2
0, 1 or 2
SetPhaseC ounts(axis, counts)
n/a
see manual
(Microsteps/Full Step) x 4
Note 1: Axis refers to the addressed axis 0, 1, 2 or 3 (X, Y, Z or W)
Note 2: PWM Sign/Magnitude only possible with number of phases set to 1 or 2.
PWM 5050 output mode is possible with number of phases set to 1, 2 or 3.
When using the controller in the brushless mode with on-board commutation it is important to observe the programming
requirements for Sinusoidal Commutation.
An excellent tool to sinusoidal setup is the document PhaseInitialization.pdf with a step by step guide .
Date: 04.12.2003
Last Rev.: servo-Halbeck GmbH & Co. KG
Tel: +49 (0)9158-1612
Fax: +49 (0)9158-1642
www.servo-halbeck.com
-o-
413
© POSYS Motion Control GmbH & Co.KG, 2013
Multiple Cards
Multiple Cards (only PCI)
Subject: POSYS® Series, PCI bus, multiple cards
This TN describes the usage of the new PCI drivers for single and multiple cards installed in the same computer. The new
driver requires a handle to identify the addressed card. This also requires the new POSYS900 DLL, version 3.0 and higher.
Instructions
Install the POSYS® 900 motion control cards in the PC PCI slots. The driver will support a maximum of 16 cards (0 to 15).
Now restart the computer. The newly installed POSYS® motion controllers will be detected and you will be asked for the
directory of the drivers.
Locate the directory containing the drivers and the POSYS900.INF file.
It should contain the following files: POSYS900.INF
POSYSPCI.DLL
POSYSPCI.SYS
POSYS900.DLL
These files will be automatically installed in the correct directories of Windows 98/ME or 2000/XP. Depending on the
operating system you may be asked to restart your computer.
It is now possible to communicate with all installed POSYS® cards. Here is a list of the applicable commands (Delphi).
Function DetectPosysDevices:word;stdcall;
//returns the number of installed cards, 0 if none were found
Function OpenDevice(device:byte):Thandle;stdcall;
//returns the handle of device, device starts at 0 for first card, 1 for second ,etc.
//OpenDevice returns –1 if the driver could not be opened
Procedure CloseDevice(hPosys:Thandle);stdcall;
//The device should be closed at the end of the program
Example:
Type
Thandle = integer;
Var
hPosys0,
hPosys1 :Thandle
if DetectPosysDevices= 0 then begin
ShowMessage('No Motion Controller found on PCI-bus!');
C lose;
end;
hPosy0 := OpenDevice(0); //opens the driver and returns the handle of card 1
if hPosys0 = -1 then begin
ShowMessage('Driver could not be started!');
C lose;
end;
InitializePOSYS(0,0);
hPosys1 := OpenDevice(1) //opens the driver and returns the handle of card 2
if hPosys1 = -1 then begin
ShowMessage('Driver could not be started!');
414
© POSYS Motion Control GmbH & Co.KG, 2013
C lose;
end;
//If there are more cards, then continue with hPosysx := OpenDevice(x)
It is now possible to communicate with the cards, the card is chosen by passing the handle to the functions and procedures
in addition to the addressed axis and the values.
Example:
SetPosition(hPosys0, axis, position)
//sets the target position of card 1 with the hPosys0 handle
SetPosition(hPosys1, axis, position)
//sets the target position of card 2 with the hPosys1 handle
//all other commands are called in the same manner
C loseDevice(hPosys0) //close instance for card 1
C loseDevice(hPosys1) //close instance for card 2
//Before terminating the program all instances of opened drivers should be closed
Date: 20.04.2004
Revision: 1.0
E-mail: [email protected]
POSYS® is a registered trade mark of POSYS Motion Control GmbH & Co.KG
-o-
415
© POSYS Motion Control GmbH & Co.KG, 2013
PCI ScanForPOSYS
PCI ScanForPOSYS
Subject: POSYS® 900/1900 Series only , PCI Scan
This Technical Note applies to the POSYS® 900/1900 series motion controllers only.
The addresses and interrupt number of PCI devices are assigned by the computer’s BIOS during start up. The user cannot
assign addresses to the card like customary and required for ISA bus cards. The POSYS® 900 PCI bus cards do not
provide any DIP-switch or jumpers for address and interrupt setting. As long as the card is not changed to a different slot
the address and interrupt number assignment will not change from one power on to the next.
The POSYS900.dll library makes available a function that will scan the PCI bus and detect the first POSYS® 900 series
motion controller on the bus.
var
C S0, CS1 : word;
success : Boolean;
DLL Function: GetAddresses(CS0,CS1,success)
Returns: Base Address 1 in CS0 and Base Address2 in CS1
success = true if a POSYS® 900 series motion controller was found
success = false if no PSYS 900 series motion controller was located
To assign all used addresses a call to
InitializePOSYS(CS0, CS1)
(actually this call could be skipped since it is already called by GetAddresses if a POSYS® 900 controller was located) is
required. After these two calls all POSYS900.dll functions can be used.
If no PCI scan is desired after every program start, or if more than one card are installed, it is necessary to run the utility
FindPOSYS900
A window will open up and after clicking on the Start PCI Scan button the following information will be displayed.
In this example, Card 1, a 4 axes card (POSYS® 914) was located at Base Address 0 =7400H and Base Address 1=7800H
and Interrupt No. 05H.
C ard2, a 2 axes card (POSYS® 902) was located at Base Address 0=8000H and Base Address 1=8400H and Interrupt No.
0AH
416
© POSYS Motion Control GmbH & Co.KG, 2013
ScanForPosys Window
Four options are available. Click on the Close button and exit the program without saving any information. After clicking
on Save to File the following dialog box opens up allowing selection of directory and name of the file for saving.
The next window displays the information saved in the file Posys900.pci:
417
© POSYS Motion Control GmbH & Co.KG, 2013
The first line reports the number of POSYS900 PCI motion controllers found during the scan, in this case 2. The second line
starts with information about Card 1. Information is stored for:







BS0: Assigned Base Address 0
BS1: Assigned Base Address 1
Slot No.: Slot Number of the card
Function No.: Function Number of the card
Interrupt No.: Assigned Interrupt Number of the card
MC Version: Motion Control version and revision
PLD Version: Version number of the FPGA
C ard No2: This line starts information for Card 2
A user program can use this information after a program start to initialize the card of his choice or initialize all cards
installed. To do this the user program must open the file and extract base address and interrupt information.
C licking on the Save to Registry button will save the same information to the following registry locations:
C ard 1:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\IMC\900\Card1
and
C ard 2:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\IMC\900\Card2
Additional cards would be located at Card3 and Card4.
418
© POSYS Motion Control GmbH & Co.KG, 2013
The number of cards found is written to the key Cards in location ..\IMC\900.
The values for each card are written to the various keys in locations ..\IMC\900\Card1
and to ..\IMC\900\Card2
The user program can extract this information from the registry and initialize the POSYS® 900 series motion controllers
using the Base Address 0, Base Address 1 and Interrupt No. data.
The fourth option ‘Read Registry’ will return and display data that was stored in the registry. If no information was found
the user will be advised and asked to run ‘Start PCI Scan’ first.
Important
If cards are moved from one slot to another the PC I scan must be repeated and the data saved again to file or registry.
The Tech Note ‘Programmers Info’ provides additional information for writing user programs in any language.
Date: 07.11.2002
419
© POSYS Motion Control GmbH & Co.KG, 2013
Revision: 19.12.2002
E-mail: [email protected]
POSYS® is a registered trade mark of POSYS Motion Control
-o-
420
© POSYS Motion Control GmbH & Co.KG, 2013
Programmer's Info
Programmer's Info
POSYS® 700/800/800-B/1800 Series
Please refer to paragraph 2 for POSYS® 900/1900 specific information.
This information is provided for programmers who want to write their own motion control program in a language of their
choice and operating system of their choice (DOS, Windows, Linux, etc.).
Items needed:
Motion Processor Programmer’s Reference
Motion Processor User’s Guide
The newest versions of these manuals can be downloaded from our web site: http://www.POSYS Motion Control.com
The base address for the POSYS® 700/800/ is set using dip switches (description in the corresponding hardware manual).
The card occupies N+7 address spaces (bytes), where N is the selected base address.
Example: Base Address N = 300H, so the card uses 300H to 307H. The address for a second card could start at 308H.
Name
Address setting 7xx/8xx
Address setting 8xx-B
Base Address
N
N
Data Address
N
N
C ommand Address
N+2
N+2
DAC On
N+4
N+4
DAC Off
N+5
N+6
HardReset
N+6
N + 5 and N + 7 (By te)
Name
Address setting 7xx/8xx
Address setting 8xx-B
Base Address
300H
300H
Data Address
300H
300H
C ommand Address
302H
302H
DAC On
304H
304H
DAC Off
305H
306H
HardReset
306H
305H
Example:
To communicate with the card these addresses must be assigned before writing or reading data.
Example:
The example functions are written in Delphi (Pascal) but could easily be translated to C.
Procedure InitializePOSYS(BaseAddress:word);
begin
if (BaseAddress < 512) or (BaseAddress > 1016) then // outside this range not recommended
exit;
DataAddress:=BaseAddress;
C ommandAddress:=BaseAddress+2;
ResetAddress:=BaseAddress+6; (for 700/800) :=BaseAddress + 5 (for 800-B);
DACOn:=BaseAddress+4;
DACOff:=BaseAddress+5; // works only with PLD versions 0392 (700 series) and 3104 (800 series)
DACOff:=BaseAddress+6; //works only with PLD versions 3205 (800B series)
421
© POSYS Motion Control GmbH & Co.KG, 2013
end;
To read user inputs or write user outputs or amplifier enable outputs the commands ReadIO and WriteIO are used. To
address the appropriate devices the correct IDs must be used.
Addresses for user IO:
Name
Address 700/800
Address 8xx-B
Description
amp_enable
02H
01H
WriteIO and ReadIO
write_user_output
00H
00H
only WriteIO
read_user_output
03H
00H
only ReadIO
user_input
00H
00H
only ReadIO
axis_in_out
01H
02H
only ReadIO
serial port
n/a
03H
Read/Write
watchdog
n/a
04H
only WriteIO
watchdog value
n/a
5562H
Value to write to watchdog
For an example let us assume your language command to write a word to the port is OUTPW(PortAddress, Value) and to
read a word from the port is INPW(PortAddress). Reading and writing the port are motion processor commands requiring a
check on the motion processors busy bit. Only if this bit is set (1) can communication take place. WaitIfBusy is an example
for such a routine.
C onst
readybit = $8000;
var
timeout : boolean;
count : word;
Procedure WaitIfBusy;
var
temp:word;
begin
count:=0;
timeout:=false;
repeat
inc(count); // increment count by one
temp := INPW(CommandAddress); // read one word from command address
until (((temp and $8000) = readybit) or (count = 2000));
if count = 2000 then timeout:=true; // make sure the loop ends if a timeout occurs
end;
Depending on the computer, operating system and programming language used the number of wait loops vary. On the
average they will vary between 3 and 12.
Example:
C oding required to read the user inputs (8 lines)
Var
InputData : word;
WaitIfBusy;
OUTPW(CommandAddress,83H); // ReadIO
WaitIfBusy;
OUTPW(DataAddress,user_input);
WaitIfBusy;
InputData := INPW(DataAddress); //returns 16 bits (word)
This will return the status of the 8 input lines.
Example:
C oding required to write to the user output (8 lines)
OutputData := ffH (turn all 8 outputs on)
WaitIfBusy;
OUTPW(CommandAddress,82H); // WriteIO
WaitIfBusy;
422
© POSYS Motion Control GmbH & Co.KG, 2013
OUTPW(DataAddress,write_user_output);
WaitIfBusy;
OUTPW(DataAddress,OutputData); // writes 16 bits (word) to DataAddress
Here are more examples reading and writing motion control data.
The first example shows how to read the encoder position (Command: GetActualPosition).
Function GetActualPosition(axis:word):longint; // axis = 0, 1, 2, or 3 for the 4 axes
var
temp1:word;
begin
temp1:=(axis shl 8) + $037; // shift axis left by 8 bits and add command code 037h
WaitIfBusy;
OUTPW(CommandAddress,temp1);
GetActualPosition:=GetDoubleWord; // reads the high and low order parts of the long
end;
Function GetDoubleWord:longint; // returns a 32 bit signed integer
var
temp:longint;
begin
WaitIfBusy;
with Long2Word(temp) do begin
wordHi:=INPW(DataAddress);
WaitIfBusy;
wordLo:=INPW(DataAddress);
end;
GetDoubleWord:=temp;
end;
Type
Long2Word = Record
wordLo, wordHi:word;
End;
The next example shows the required steps to turn off servoing and output an analog voltage to the servo amplifier.
Var
axis, mode : word;
axis := 0 ;
mode := 0 ; // 0= off, 1 = on
SetMotorMode(axis, mode)
SetMotorCommand(axis, value) // value range: –32768 to 32767 for full ±10 volts
Update(axis) // moves the buffered command to working registers
Depending on the magnitude of value an analog voltage will be output to the amplifier. This is in the open loop mode, no
servoing, so extreme caution should be used. The processor will capture the encoder position which could be read
using GetActualPosition(axis).
The POSYS® card provides a safety feature, after power on or an external reset, the torque demand outputs (16 bits
analog ±10 volts) are connected to ground using optical switches. They must be connected to the ±10 volt outputs by the
software command DACOutputsOn before any voltage can be sent to the amplifier inputs.
The coding for this command is:
OUTPW(DACOn); // DACOn = N + 4 (BaseAddress + 4)
POSYS® 7xx/8xx series only:
OUTPW(DacOff);
// DacOff = N + 5 (BaseAddress + 5) turns the optical switches OFF
// DacOff works only with PLD versions 0392 (700 series) and 3104 (800 series)
POSYS® 8xx-B series only:
OUTPW(DacOff);
// DacOff = N + 6 (BaseAddress + 6) turns the optical switches OFF
// DacOff works only with PLD versions 3205 (800B series)
Do not use WaitIfBusy with these commands or with the HardReset command.
The HardReset command will do just that, it will do an actual hard reset of the hardware. After this command all
423
© POSYS Motion Control GmbH & Co.KG, 2013
parameters must be reloaded just like after a power on.
The coding for this command is:
POSYS® 7xx/8xx series only:
OUTPW(HardReset);
// HardReset = N + 6 (BaseAddress + 6);
POSYS® 8xx-B series only:
OUTPW(HardReset);
// HardReset = N + 5 (BaseAddress + 5) or
// HardReset = N + 7 (BaseAddress + 7)
Do not use WaitIfBusy with this command.
Examples for setting and resetting the amplifier enable outputs:
700/800 Series
WriteIO(amp_enable, 0x00)
WriteIO(amp_enable, 0x0f)
WriteIO(amp_enable, 0x03)
// sets all 4 outputs to low level
// sets all 4 outputs to high level
// sets outputs 1 and 2 to high level, 3 and 4 to low level
800B Series, applies also to the POSYS 900 series
The 800B series can set and reset each amplifier output individually or any combination.
WriteIO(amp_enable, 0xffff)
// sets all 4 outputs to high level
WriteIO(amp_enable,0x0300) // resets outputs 1 and 2 to low level
WriteIO(amp_enable,0xff00 ) // resets outputs 1, 2, 3 and 4 to low level
WriteIO(amp_enable,0x0404) // sets output 3 to high level
WriteIO(amp_enable,0x0400) // resets output 3 to low level
ReadIO(amp_enable)
(1 = ON, 0 = OFF)
// returns the status of the amplifier enable outputs. Bit 7 reflects the status of the DACOutputs
A HardReset command would return all set outputs and amplifier enable outputs and DACOutputs to the OFF state.
Please make sure to read the manual’s description referring to the Reset command. This is also the motion processors
status after an external reset and power on. The user must then configure the processor using for example a configuration
file to his requirements.
After assigning the correct addresses for the card the following should be done. This only serves as an example.
Command
Description
InitializePosys(BaseAddress)
this assigns the addresses based on BaseAddress
WriteIO(write_user_output, 0)
set all outputs to 0 or to some other value
SetOutputMode(axis,mode)
mode: 0=16 bit analog, 1=PWM Sign/Magnitude
SetKp(axis, value)
value: 0 to 32767, suggested default is 100
SetKd(axis, value)
value: 0 to 32767, suggested default is 800
SetKi(axis, value)
value: 0 to 32767, suggested default is 40
SetIntegrationLimit(axis, value)
value: 0 to 32767, suggested default is 2000
SetPositionErrorLimit(axis, value)
value: 0 to 2 147 483 647 counts, suggested value is 2000
SetAutoStopMode(axis, mode)
mode: 0 = disable, 1 = enable, suggested value is 1
SetProfileMode(axis, value)
value: 0 to 3, suggested 0 = trapezoidal move
SetAcceleration(axis, value)
value: 0 to 2 147 483 647, suggested value 26214
SetDeceleration(axis, value)
value: 0 to 2 147 483 647, suggested value 26214
SetVelocity(axis, value)
value: 0 to 2 147 483 647, suggested value 26214
Update(axis)
updates all parameters
DAC OutputsOn
connects analog outputs to amplifiers
coding is OUTPW(DAC On), see above for more detail
424
© POSYS Motion Control GmbH & Co.KG, 2013
The motion processor and the card are now initialized and it is possible to send target positions and move to those after
issuing an update command for that axis. Be aware that adjustments may have to be made in filter and other parameters.
For safety reasons the SetAutoStopMode should be enabled.
Interrupts
Only the motion processor will generate interrupts. The available interrupt sources are listed for GetEventStatus. The
interrupt source is selected using a 16 bit mask and passed to the motion processor using the command.
SetInterruptMask(axis, interruptMask)
After an interrupt has occurred the host must determine the source by reading GetEventStatus(axis) and process it. The
host must then reset the bit that caused the interrupt using the command.
ResetEventStatus(axis,mask)// a 0 in the mask clears the corresponding bits
The host must then send to the motion processor the command.
ClearInterrupt
C oding is:
WaitIfBusy;
OUTPW(command) // command = ACh (decimal = 172)
to clear the interrupt line and re-enable interrupt processing. If another interrupt is pending the interrupt line will only be
cleared momentarily and then reasserted.
There is another very POSYS® specific command, called GetAxis_In_Out_Home. It provides information on the 4 AxisIn
inputs, the 4 AxisOut outputs, the 4 Home inputs and the status of the optical switches (16 bit analog voltage outputs).
GetAxis_In_Out_Home(axis_in_out) // axis_in_out = 1
The coding is as follows:
WaitIfBusy;
ReadIO(axis_in_out); // this function returns 16 bits
The bits reflect the following:
Bits 0 – 3
Status of Home inputs for axes 0– 3
Bits 4 - 7
Status of AxisIn inputs for axes 0– 3
Bits 8 – 11
Status of AxisOut outputs for axes 0– 3
Bit 12
Status of optical output switches (1 = enabled, 0 = disabled)
Bits 13 – 15
no meaning
POSYS® 900/1900 Series
The POSYS® 900/1900 motion controllers are for the PCI-bus and require no port address settings. These cards are
Plug&Play compatible and require no DIP switch settings. If the system is used with the supplied drivers and DLL, the card
will be automatically detected and addresses assigned. If experienced software engineers want to write programs close to
the hardware then attention must be paid to the following:
Windows– for Windows 95/98, ME, NT, 2000 and XP use the supplied driver and follow the installation instruction.
Run the FindPCI program. It will locate installed POSYS® 900/1900 cards and display a window with information in regard
to Card No., Slot, Function, Version, Base Address0, Base Address1 and Interrupt No. Version, Base Address and Interrupt
Numbers are displayed in hexadecimal.
425
© POSYS Motion Control GmbH & Co.KG, 2013
Results of a PCI scan
In the above example two POSYS® cards were located, a POSYS® 904 (Version 21400022) and a POSYS® 902 (Version
212000022).
Programmers can now use this information in writing their own drivers. The following addresses are used. Please note,
these addresses deviate from the ones used for the POSYS® 700/800 series.
Assignment of addresses:
Name
Address
Base Address
Base Adr0
Data Address
Base Adr0
C ommand Address
Base Adr0 + 2
DAC On
Base Adr0 + 4
DAC Off
Base Adr0 + 6
HardReset
Base Adr1
Example:
Name
Address
Base Address
7400H
Data Address
7400H
C ommand Address
7402H
DAC On
7404H
DAC Off
7406H
HardReset
7800H
Addresses for user IO:
Name
Address
Description
amp_enable
01H
WriteIO and ReadIO
write_user_output
00H
only WriteIO
426
© POSYS Motion Control GmbH & Co.KG, 2013
Name
Address
Description
read_user_output
00H
only ReadIO
user_input
00H
only ReadIO
axis_in_out
02H
only ReadIO
serial_port
03H
read/write the serial port
watchdog_adr
04H
write to watchdog register
watchdog_value
5562H
value to write to watchdog
pld_adr
FFH
address at which to read the PLD
To read back the status of user IO and to get the status of the inputs and outputs use
ReadIO(user_input) or you may use
ReadIO(read_user_output)
The return value is 16 bits, the lower 8 bits [0..7] reflect the status of the programmable user outputs, the upper 8 bits
[8..15] reflect the status of the 8 input lines.
To set the outputs use
WriteIO(write_user_output, value)
This writes a word to the userIO. The lower 8 bits [0..7] will set the 8 outputs. The upper 8 bits are ‘don’t care’.
The amplifier enable outputs are set and reset using the following scheme:
WriteIO(amp_enable, value)
Sets the 4 amplifier enable outputs bits [0..3], bits [4..6] are ‘don’t care’, bit [7] reflects the DACOn/Off status, bits [8..1]
must be set with change mask reflecting the bits [0..3], bits [12..14] are ‘don’t care’ and bit [15] is the change mask for
DACOn/Off.
To obtain the status of the amplifier enable outputs use
ReadIO(amp_enable)
This will return the status of the amplifier enable outputs in bits [0..3, bits [4..6] are fixed at 0, bit [7] returns the
DACOn/Off status and bits [8..15] are fixed at 0.
Example for Amp Enable:
Assume you want to enable output 1 and 3 (from low to high)
Var
amps: integer=0;
Begin
amps:= amps or $101 // output 1
amps:= amps or $404 // output 3
WriteIO(amp_enable, amps)
End
Now assume you want to disable output 3
Begin
amps:=amps and not $04 or $400
WriteIO(amp_enable, amps)
End
To obtain the status of the axis specific inputs, outputs and home status use
ReadIO(axis_in_out)
This returns the status of the 4 Home inputs in bits[0..3], the status of the 4 AxisIn inputs in bits [4..7], the status of the 4
AxisOut outputs in bits [8..11] and the Reset cause in
427
© POSYS Motion Control GmbH & Co.KG, 2013
Bit
Bit
Bit
Bit
[12]
[13]
[14]
[15]
Reset
Reset
Reset
Reset
Cause:
Cause:
Cause:
Cause:
Software
Under voltage
External
Watchdog
A write to address axis_in_out WriteIO(axis_in_out, 0) will reset the reset cause flags.
To activate the watchdog timer write
WriteIO(watchdog_adr, watchdog_value)
The watchdog times out after 104 milliseconds. It must be re-triggered before timeout. A timeout causes a reset of the
board and the watchdog would have to be reactivated. The watchdog can only be deactivated by a reset.
The Mode jumper default setting is 1-2 for limited use of the serial port. Only Get instructions and the SetBufferReadIndex
are permitted. Setting the Mode Jumper to 2-3 allows the Full instruction set to be executed. In both cases a special serial
cable is required from POSYS Motion Control.
A read of
ReadIO(serial_port)
Returns the default data transmission parameters and the slave address in bits [0..15]. Refer to the manual’s
SetSerialPortMode/GetSerialPortMode command description for an explanation.
New parameters can be written using
WriteIO(serial_port, value)
Value is the mask for the transmission parameters.
Status of out puts after power-on and a HardReset:
All outputs are low (0)
Amplifier enable outputs are low (0)
Axes specific outputs (AxisOut) are high (1)
The user’s program must assign addresses to call the POSYS® functions. If the Kithara drivers are used these calls must
be made to the POSYS900.dll functions:
A function assigning addresses could look like this Delphi example:
Procedure InitializePOSYS(BaseAddr0, BaseAddr1:word);
begin
DataAddress:=BaseAddr0;
C ommandAddress:=BaseAddr0 + 2;
ResetAddress:=BaseAddr1;
DACOn:=BaseAddr0 + 4;
DACOff:=BaseAddr0 + 6;
end;
The next DLL-function calls open the driver and allow access to the port addresses specified:
OpenDriver
EnableIO( BaseAdr0, 16)
EnableIO( BaseAdr1, 16)
When shutting down the program call
CloseDevice
These are the only differences in programming for the POSYS® 700/800, 800-B and the POSYS® 900/1900 series motion
controllers. For additional information refer back to paragraph 1 (POSYS® 700/800).
Date: 04 May 2001
428
© POSYS Motion Control GmbH & Co.KG, 2013
Revised:
Revised:
Revised:
Revised:
18
12
18
01
June 2001
July 2002
December 2002
March 2005
POSYS Motion Control GmbH & Co. KG
E-mail: [email protected]
-o-
429
© POSYS Motion Control GmbH & Co.KG, 2013
Resistor Networks for TTL or Inverted Encoder Signals
Encoder Line Receiver and Terminating Resistors
All of the POSYS motion controllers use line receivers. They are equipped with 150 Ohm terminating resistors for RS 422
operation. The encoder signals are connected to the A+ and A- (B+, B- and I+, I-) inputs. The 150 Ohm network resistors
are connected across these inputs.
POSYS® 700/800/800-B/1800/900/1900
RS1, RS2, RS3
POSYS® 1800-B
RS604, RS608, RS613
If single ended (TTL level) encoders are used, these network resistors should be removed. The resistor networks are
socketed and can just be pulled out.
If mixed operation is desired with TTL level encoders and others with inverted signals some manual work is required. The
150 Ohm resistors on the TTL level inputs need to be selectively removed by clipping off the terminals. The table shows the
resistor to encoder relationship.
RS1/RS604 Pins Encoder Signals RS2/RS608 Pins Encoder Signals RS3/RS613 Pins Encoder Signals
1–2
A1 (X axis)
1–2
I1 (X axis)
1–2
B2 (Y axis)
3–4
A3 (Z axis)
3–4
I3 (Z axis)
3–4
B4 (W axis)
5-6
B3 (Z axis)
5–6
A4 (W axis)
5–6
I2 (Y axis)
7–8
B1 (X axis)
7-8
A2 (Y axis)
7-8
I4 (W axis)
Date: 30.03.2005
Revised: 29.09.2010
-o-
430
© POSYS Motion Control GmbH & Co.KG, 2013
Serial Interface
Serial Interface
Subject: POSYS® 800-B/900 Series, Serial Interface
The POSYS® 800-B/900 Series motion controllers are equipped with a parallel and serial interface. Since the POSYS®
800-B is a ISA-Bus based card and the 900 is a PCI-bus card it will normally be operated using the parallel bus. The
asynchronous serial connection can be used for diagnostics or stand-alone operation of the controller.
The default configuration is for parallel operation. For serial communication the only jumper (JP4., marked Mode) on the
POSYS® card needs to be changed to pins 2-3.
Mode
1 – 2 Parallel
2 – 3 Serial
A special serial link cable, available upon request from POSYS Motion C ontrol, needs to be plugged into the connector
marked Serial I/F. Two types of cable are available, the standard is a RS232 cable with a 9-pin SUBD male or female
connector. If the female connector is used it can connect directly to PC’s serial input without a null modem.
The optional cable is for RS422/485 data transmission. The mating connector of the host must match the pinout of the
supplied POSYS® connector.
RS232, Mode Setting 2-3
With this setting the motion controller powers up in the serial communication mode. At this point default parameters are
active:
9600 Baud
No Parity
One Stop Bit
Point-to-Point Mode
The following commands apply to the serial communications mode:
SetDiagnosticPortMode / GetDiagnosticPortMode
SetSerialPort / GetSerialPort
Both commands are explained in detail in the manual. This will just outline the purpose of every command. Get commands
return programmed values.
SetDiagnosticPortMode:
When set to LIMITED only limited access is possible like for all Get.. instructions and SetBufferReadIndex
When set to FULL, all instructions may be executed.
SetSerialPort:
Five parameters are passed to this function, they are:
Transmission rate: 1200, 2400, 9600, 19200, 57600, 115200, 250000, or 416667
Parity: NONE, ODD or EVEN
Stop Bits: 1 or 2
Protocol: Point-to-Point, Multi-drop (address bit), Multi-drop (idle line mode)
Multi-drop Address: Address 0, Address 1, …, Address 31
C hecksums are needed for serial communication. A complete and detailed description of the following important subjects
can be found in the NAVIGATORTM User’s Guide:
C ommand Format
Checksums
Transmission Protocols
Point-to-Point Mode
Multi-drop Protocols
Idle-line Mode
431
© POSYS Motion Control GmbH & Co.KG, 2013
Address Bit Mode
It is important to adhere to these protocols for an error free communication. The power-on default serial port parameter
can be changed. In most cases this would be in regard to transmission rate and number of stop bits.
Important Note
For stand-alone operation without a computer and it’s associated power supply it is possible to supply the POSYS®
800-B/900 series motion controller with external power using either the 2x 50-position cable or the 100-position high
density connector. The best way is to use it in conjunction with IO700/800 interconnect module.
The POSYS® 800-B motion controller card must be connected to the IO700/800 using the 2x 50-position cable.
Screw Terminals 7, 57, 25 and 75: 5VDC Input, any of these inputs can be used
Screw Terminals 12, 62: GND, any of these can be used for GND connection
As an alternative the card could be used with a PC/104-bus connector and only 5 VDC and GND connected to the ISA-bus
connector.
The POSYS® 900 motion control card must be connected to the IO700/800 using the shielded cable.
Screw Terminals 7, 57, 25 and 75: 5VDC Input, any of these inputs can be used
Screw Terminals 12, 62: GND, any of these can be used for GND connection
As an alternative the card could be used with a PCI-bus connector and only 5 VDC and GND connected to the PCI-bus
connector.
Date: 24.03.2003
Revision:
E-Mail: [email protected]
POSYS® is a registered trademark of POSYS Motion Control GmbH & Co.KG
-o-
432
© POSYS Motion Control GmbH & Co.KG, 2013
Status Read Operation
Status Read Operation
Subject: POSYS® 700/800/800B/900/1800/1900
All above POSYS motion controllers provide a Status Read function. This function returns a status word. The execution of
this function can take place anytime and does not require checking of any busy flags which would cause delays. The Status
Read function (POSYS function GetProcessorStatus()) returns a word containing the following information:
Bit Number
Description
0 - 12
Unused, set to 0
13
Holds value of HostIOError signal, this bit will be high if a HostIOError occurred. This bit
is reset after reading the actual HostIOError.
14
This bit holds the value of HostInterrupt signal. A high indicates an active host interrupt
output.
15
This bit holds the value of the HostReady signal. A high indicates ready.
Bit 14 requires some special attention. It can be used in a polling setup to determine if an interrupt condition, as set with
SetInterruptMask(), has occurred. It can also be used to check if an interrupt was caused by the POSYS motion controller
or another device.
No specific additional attention is required for all POSYS® 700/800B/900 motion controllers using the Navigator version
1.x (for example 21400018), where 18 represents version 1.8, and 20, 21, 22, 23 those with version numbers 2.0 to 2.3.
All POSYS 700/800B/900 motion controllers using the Navigator with versions 2.4 and up require an additional read or
write command to assure an update of the Host Interrupt bit. The following is an example of an interrupt handler
implementing such a read:
void DLLC ALLCONV POSYS_IntHandlerRoutine(POSYS_HANDLE hPosys, POSYS_INT_RESULT *intResult)
{
ignore_result=GetEventStatus(hPosys,0);
//inserted command for status word update
POSYS_Status=GetProcessorStatus(hPosys);
if ((POSYS_Status & 0x4000)==0x00)
//not a POSYS interrupt
return;
printf("Status Word: %x\n",POSYS_Status);
if ((POSYS_Status & 0x2000)==0x2000)
printf("HOST IO Error: %x\n",GetHostIOError(hPosys));
printf ("Got interrupt number %d\n", intResult->dwC ounter);
ResetEventStatus(hPosys,0,0);
ClearInterrupt(hPosys);
ignore_result=GetEventStatus(hPosys,0);
POSYS_Status=GetProcessorStatus(hPosys);
//inserted command for status word update
//Bit 14 should now be reset
printf("Status Word: %x\n",POSYS_Status);
}
POSY_STATUS contains the value of the status read. The POSYS generated the interrupt if Bit 14 is set, if not then the
interrupt source is a different one.
For the POSYS 1800 and POSYS 1900 motion controllers the same requirements apply as shown in the example of the
POSYS_IntHandlerRoutine above. A command must be sent to the POSYS prior to calling GetProcessorStatus() if the
present state of bit 14 (interrupt) is to be returned.
It is also important to note that prior to calling C learinterrupt() all bits set with SetInterruptMask() must be cleared by
calling ResetEventStatus.
The relevant interrupt commands are:
SetInterruptMask(axis)
GetInterruptAxis(axis)
433
© POSYS Motion Control GmbH & Co.KG, 2013
ResetEventStatus(axis)
C learInterrupt()
GetProcessorStatus()
Ignore_result = GetEventStatus(axis)
GetProcessorStatus()
// dummy routine to assure that
// Bit 14 in the status word returned by
// (GetProcessorStatus())is updated
// returns the updated status
POSYS® 900 and 1900 only
The PC I motion controllers provide an additional function to check the hardware for an active interrupt line. The command
is
INT P9050_ReadReg(hPlx, P9050_INTC SR)
INT POSYS_ReadReg(hPlx, POSYS_INTC SR)
or
INT POSYS_ReadReg(hPlx, POSYS_INTC SR)
or depending on the software used
for the POSYS 900 series
depending on the software used
These functions address the PLX interface directly and return the status of the Interrupt C ontrol Service Register of the
PLX. Bit 2 indicates if the interrupt line 1 is active (1=active, 0=not active). Interrupt line 1 is connected to the interrupt
output of the motion control processor.
Date: 26.09.2006
Revised: 05.10.2006, 09.10.2006
-o-
434
© POSYS Motion Control GmbH & Co.KG, 2013
Synchronization of Multple Cards (POSYS® 8xx-B/9xx w/ Sync-Feature and 18xx/19xx)
Synchronization of Multiple Cards (POSYS® 8xx-B/9xx w/
Sync-Feature and 18xx/19xx)
Subject: POSYS® 800-B/9xx/18xx/19xx Series, Synchronization of multiple cards
The POSYS® motion controllers 8xx-B/18xx and 9xx/19xx are available with a synchronization feature. Synchronization
must be specified with the order (8xx-B and 9xx) since a different motion control processor is required. When this feature
is installed and activated by software it will allow a synchronized update between multiple cards to within 10 microseconds.
This feature is specified by increasing the second digit in the part number by 1. For example a POSYS® 904 becomes a
POSYS® 914 signaling the synch feature. The synch feature includes additional hardware (connectors and cable) and
additional firmware with two more commands. Up to 128 axes on the adequate amount of cards (1, 2 and 4 axes cards
can be combined) can be synchronized, one card would be the master and the other ones the slaves. The POSYS®
18xx/19xx can combine up to 128 cards/512 axes to be synchronized. Synchronization between 8xx-B/9xx and 18xx/19xx
is not possible due to different cycle times of the motion processors
The two additional commands are:
SetSynchronizationMode (mode)
mode
= 0 (Disabled)
= 1 (Master)
= 2 (Slave)
mode = GetSynchronizationMode
mode will return the synchronization state of the selected card.
To allow proper use of this feature the following steps should be observed:


Default configuration of all installed cards after power on or reset is DISABLED

The sample times of cards used for synchronization must be the same. So assuming one 4 axes and one 2 axes card
are installed. The default sampling times would be 400 and 200 microseconds. In this case the sampling time of the 2
axes card has to be adjusted to the same value as the 4 axes card. The command to use is SetSampleTime(time),
where time would be in microseconds, in this case 400.

Only one card can be the master in a chain. If 3 cards are installed and connected via the synch cable, one card will be
the master and the other two will be slaves.

The slaves must be set before the master. This ensures that the slave or slaves cycle if more than one starts at
precisely the moment that the master assumes its state as master.
Assure that all cards are connected using the supplied 2-lead cables. The connectors can only be connected one way.
The two synch connectors on each card are in parallel, so it does not matter which one is used for input or output.
Example: For example assume two cards are installed, card1 will be the master, card2 will be the slave. The code is for
Visual Basic.
Dim
Dim
Dim
Dim
Dim
disabled as integer
slave as integer
master as integer
time1 as long
time2 as long
disabled = 0
master = 1
slave = 2
C all CardHandle(1) //this is the handle to card1, all data will go to this card
C all SetSynchronizationMode(disabled) //make sure the card is not in synchronization mode
time1 = GetSampleTime
C all CardHandle(2) //handle to card2, all data will go to this card
time2 = GetSampleTime
if time2 <> time1 then
C all SetToEqualTime //this calls a subroutine for adjusting the slave s sample
End If //time to the same value as the master s. This routine is not //shown as part of this example
435
© POSYS Motion Control GmbH & Co.KG, 2013
C all
C all
C all
C all
CardHandle(2) //switch to card2
SetSynchronizationMode(slave) //set card2 to slave
CardHandle(1) //switch to card1
SetSynchronizationMode(master) //set card1 to master
The two cards are now synchronized.
The following sequence of commands serves as an example for starting a synchronized move across two cards.
C all CardHandle(1) //switch to card1
C all SetPosition(axis1, 50000) //buffer a new target position for axis1 of card1
C all CardHandle(2) //switch to card2
C all SetPosition(axis1, 25000) //buffer a new target position for axis1 of card2
C all CardHandle(1) //switch to card1
time1 = GetTime //use the master's node time to set breakpoints for both //boards that will start motion 20 servo cycles
from now
C all SetBreakpointValue(axis1, Breakpoint1, time + 20)
C all SetBreakpoint(axis1, Breakpoint1, axis1, update, breakpointtime)
C all CardHandle(2) //switch to card2
C all SetBreakpointValue(axis1, Breakpoint1, time + 20)
C all SetBreakpoint(axis1, Breakpoint1, axis1, update, breakpointtime)
When the breakpoint triggers 20 servo cycles from now, both axes will start to move.
The master node outputs a synchronization pulse once every 50 microseconds. Applications can use this pulse to
synchronize external equipment to the internal cycle of the motion processor.
Date: 02.05.2003
Revision:
E-mail: Europe: [email protected]
POSYS® is a registered trade mark of POSYS Motion Control GmbH & Co.KG
-o-
436
© POSYS Motion Control GmbH & Co.KG, 2013
Velocity, Acceleration and Jerk Calculation
Velocity, Acceleration and Jerk Calculation
Subject: POSYS® Series, Programming Velocity and Acceleration
DLL Functions
All of the POSYS® motion controllers work with a servo cycle (for servo motors) or a cycle time (for stepping motors).
These cycle times determine the update rate of the controller. This time is typically 100 µseconds per enabled axis (exact
value is 102.4 µseconds). Some versions have a cycle time of 150 µseconds. Please refer to the appropriate data sheet.
Programming speed and acceleration as well as jerk must take this into consideration. Let us assume the following:
Motion Controller Type POSYS® 852 (2 axes stepping motor)
Fastest cycle time 2 x 102.4 µseconds = 204.8 µseconds for 2 enabled axes
The rate is 1/204.8 = 4882.81 updates/second
To program a velocity of 1000 steps/second we need to convert this to steps/update rate.
Steps/sec = (1000/4882.81) * 65536 = 13423.73, rounded this gives 13424
This would be the value sent to the card using the DLL function
SetVelocity(axis, 13424)
The easiest way to proceed would be to set up a constant like
vel_factor = 13.4217728 and write the following
SetVelocity(axis, round(1000 * vel_factor))
If the cycle time is changed the value of the constant has to be changed too.
Programming acceleration/deceleration follows a similar scheme. Assuming we want to accelerate linearly to 1000
steps/sec in 20 milliseconds. This requires an acceleration of 1000/0.020 = 50000 steps/sec². The value that needs to be
loaded is calculated as follows:
Steps/sec/sec = (50000/4882.81/4882.81) * 65536 = 137.45, this is rounded to 138 and loaded using the DLL function
SetAcceleration(axis, 138)
Again we could set up a constant
accel_factor = 0.002748779 and write the following
SetAcceleration(axis, round(50000 * accel_factor))
If the cycle time is changed the value of the constant has to be changed too.
The multiplier 65536 in the above examples is needed to take care of the fractional part. For example velocity
(counts/cycle) has a range of –32768 to 32767 with a resolution of 1/65536 counts/cycle.
The easiest way to set up the constants for velocity and acceleration is to use the
GetSampleTime function
It returns the servo cycle time in microseconds. Assuming a servo motor controller with 4 axes enabled would return as
the default value
410 microseconds.
To obtain the correct multiplier for programming speed and acceleration per second proceed as follows:
437
© POSYS Motion Control GmbH & Co.KG, 2013
Velocity vel_factor = (GetSampleTime/1000000) * 65536
Acceleration/Deceleration accel_factor = (GetSampleTime/1000000)² * 65536
Jerk jerk_factor = (GetSampleTime/1000000)³ * 65536
To program a speed of 10355 counts/sec. send the following command to the controller:
SetVelocity(axis, round(vel_factor * 10355)
The actual value loaded would be SetVelocity(axis, 278236)
This way the speed in counts/sec would be independent of the servo cycle time assuming that the factors would always be
recalculated after a change in servo cycle time.
Example: Four axes controller with a servo cycle time of 410 µsec (exact 409,6 µsec)
C alculate factors to program in units/second.
vel_factor = (409.6/1000000) * 216 = 0.268435456
accel_factor = (409.6/1000000)² * 216 = 0.010995116
jerk_factor = (409.6/1000000)³ * 232 = 0.295147905
Now program: SetVelocity(axis, round(speed * vel_factor))
SetAcceleration(axis, round(acceleration * accel_factor))
SetJerk(axis, round(jerk * jerk_factor))
Date: 09.04.2002
Revised: 09.07.2002
Revised: 05.11.2003
-o-
438
© POSYS Motion Control GmbH & Co.KG, 2013
MotionScript®
Overview; MotionScript®
Overview; MotionScript®
MotionScript® for POSYS® is a Basic-like script language. Practically all of the GW-Basic/Quick Basic functionality with
certain extensions is available. All mathematical functions can be used and user functions can be written and called from
the program. One of the main features is that all of the POSYSxxx.DLL functions can be called from the script.
What is the purpose of MotionScript®?
MotionScript® allows the user to test the POSYS® motion controller hardware and write some code using POSYSxxx.DLL
functions literally in a matter of minutes. Fundamental knowledge of program flow would be helpful but there is no need to
be an expert C/C++ or Delphi programmer.
Portability
The program functions from the POSYSxxx.DLL are used the same way in the MotionScript® as they would be used in
C /C++, Delphi or Visual Basic.
Simple Setup
PCI Bus
After the drivers for the POSYS® 9xx/19xx PC I motion controller are installed it is possible to start immediately to
communicate with the motion controller. The required code is minimal:
if DetectPosysDevices
() = 0 then
Print "No POSYS® controllers found!"
end
endif
hPosys# = OpenDevice(0)
Print "Version: "; Hex$(
G etVersion(hPosys#))
C loseDevice(hPosys#)
Only valid for POSYS® 900/1900 (PC I-bus)
REM program terminates
REM
REM
REM
REM
REM
opens driver instance 1 for controller 1
hPosys is the handle to this controller
returns as hex number the motion processor version
always close the driver when program terminates
program terminated
End
ISA/PC-104 Bus
For the POSYS® 800/800B/1800 and POSYS® 700 motion controllers the installed boards and their addresses are set
using the DIP switches, must first be registered. To do this use the supplied utility program called POSYSDriverXSetup.
Select the card number to register, pick the address set on this board and click on Store Data. This needs to be done only
once since the data is written to the Window's registry. It will be automatically loaded after a restart or boot of the
computer. It is now possible to communicate with the motion controllers, provided there are no address conflicts.
if RegisteredPosysDevices
() = 0 then
Print "No POSYS® controllers found!"
end
endif
if OpenDevice() = 0 then
Print "Driver could not be opened."
Print "END"
end
endif
# hPosys = EnableIO(1, 8)
if hPosys# = -1 then
Print "IO range could not be enabled."
Print "END"
end
endif
Only valid for POSYS® 800/800B (ISA/PC -104 bus)
REM program terminates
REM open the driver
REM if return equals 0
enable ISA bus IO for the first card and get handle;
no
longer needed with Windriver driv er
If return equals -1 IO range could not be enabled
REM returns as hex number the motion processor version
REM always close the driver when program terminates
REM program terminated
439
© POSYS Motion Control GmbH & Co.KG, 2013
Print "Version: "; Hex$(
G etVersion(hPosys#))
C loseDevice(hPosys#)
End
C omments can be added with the keyword REM or the character '. They are valid until the end-of-line.
Additional Information
The description of POSYS® functions in this help file may refer to hPosys, the handle being returned by a call to
OpenDevice(). This is only true for the PCI bus motion controllers. For the ISA/PC-104 bus motion controllers we like to
refer to the handle as hPosys, the handle being returned by a call to InitializePOSYS(hPosys, Cardaddress). The actual call
to the function does not care it remains the same.
Examples:
Other POSYSxxx.DLL and specific MotionScript® functions and calculations can follow.
That is all there is to it.
-oPOSYSDriverXSetup
POSYSDriverXSetup Program
The utility program POSYSDriverXSetup will enter base address and address range for up to 16 motion control cards into
the Window's registry. The utility program can be used to enter or modify setup information or remove it.
The program will detect the installed operating system (Windows 98/Me or 2000/XP) and display this. Pick the address
(Hex value) from the combo box Base Address that matches the address set on the POSYS® motion control card already
installed or to be installed in your computer. Select the card number from the combo box to be associated with your
motion control card. Interrupt handling is presently not supported. Address conflicts are not detected.
440
© POSYS Motion Control GmbH & Co.KG, 2013
Pick your cards address from this box.
Pick the associated motion control card from this box.
If interrupt handling is enabled in your driver you can pick an interrupt number from this box.
If this value is defined and set to Yes (1) then the driver will ignore resource conflicts when the device is created.
Normally, device creation is aborted on any resource conflict.
C licking on Store Data will write the entries to the registry, clicking on Retrieve Data will display the saved data. If no data
is available the following message will be displayed:
If you click on Remove for a card that had been registered you will be asked to confirm the removal of the data.
441
© POSYS Motion Control GmbH & Co.KG, 2013
C licking on the Exit button will close the program.
The data written to the registry is needed by the driver to enable the IO range to communicate with the motion control
board.
-oProgram Use
Program Use
After a successful installation the program can be started immediately unless you were instructed by the operating system
to shut down and restart the computer first. MotionScript® for the POSYS® is available as a stand-alone program called
MotionScript® or as a menu option of the POSYSxxxVx program.
The program displays two windows, an input window which is the program editor and an output window to which all
program outputs with Print statements will be directed.
Program instructions cannot extend over a several lines, they must all fit into a single line. The length of a line is not
limited. It is possible to write several instructions on a single line. Instructions must be separated by a colon (:). The
following example shows how:
hPosys = OpenDevice(0)
#hPosys = EnableIO(1, 8)
axis = 0
readPos = GetActualPosition(hPosys#,axis) : Print
"Actual Position: "; readPos
Rem opens driver and returns the handle in hPosys
This call is only needed for the ISA bus , it returns the
handle in hPosys; no longer needed with Windriver
driver
Rem defines the addressed axis (0 - 3)
Rem returns the actual position of axis 0
Screen shot of MotionScript®
442
© POSYS Motion Control GmbH & Co.KG, 2013
C licking on this button will compile the program displayed in
the input window and if there are no errors execute it.
Most syntax errors are flagged and the line number with the
error will be displayed.
The line the cursor is on is shown in the left hand corner of the
bottom status bar. Correct any errors and click Run! again.
C licking on this button opens a dialog and allows saving the
contents (source code) of the input (editor) window.
C licking on this button opens a dialog and loads a source file
into the input (editor) window. The data will not be appended
but replace existing data. The source code may be written in
any text editor and then loaded for compilation and execution.
C licking on this button displays this Help file.
C licking on this button will terminate MotionScript®. Make
sure all open drivers are closed and resources are freed.
-oExamples
443
© POSYS Motion Control GmbH & Co.KG, 2013
Examples
In order to write code that can communicate with the POSYS® motion controller certain steps need to be observed.
1. Proper installation of the hardware.
2. C orrect installation of the POSYS® drivers for Windows 98/ME or 2000/XP
It is very easy to initialize the POSYS® motion controller. After power-on or a reset the unit will be initialized with certain
defaults. Please refer to the information contained under Reset.
The program code follows the information in the Programmer's Manual which details all POSYS® functions of the
POSYSx00.DLL (POSYS1x00.DLL). These functions can be called from the programming language of your choice like
C /C++, Delphi, VB, C++ Builder or Visual C++ or from the MotionScript® program. MotionScript® also imports POSYS®
functions from the POSYSx00.DLL (POSYS1x00.DLL).
Write your code in any text editor or use the MotionScript® input (editor) window. The MotionScript® editor supports most
of the standard key stroke edit functions. The code written is not case sensitive. The variable AbC is the same as abc or
aBc. Any text following Rem or ' is being treated as a comment.
If the program must communicate with more than one card then open an instance of the driver for every card. A different
handle will be returned for every card which will be used to address just that card. Do the following
PCI Bus
hPosys1# = OpenDevice(0) Rem returns handle to card 1
hPosys2# = OpenDevice(1) Rem returns handle to card 2
hPosys3# = OpenDevice(2) Rem returns handle to card 3
.. etc.
First steps to start driver for communication with a single POSYS® PCI card.
C LS
found = DetectPosysDevices
()
if found = 0 then
Print "No POSYS® controllers found."
Print "Program terminates."
end
endif
hPosys1# = OpenDevice(0)
if hPosys1# = -1 then
Print "Driver could not be opened."
Print "The program terminates."
end
endif
InitializePOSYS(0,0)
Print "Version: ";Hex$(GetVersion(hPosys1#))
Rem clears the output window
Rem searches the PC I bus for installed POSYS® motion controllers
Rem if 0 is returned than no POSYS® motion controllers are
installed
Rem terminate the program
Rem end of if block
Rem opens driver instance for card 1, up to 16 instances (boards)
can be opened
Rem no communication is possible with the card
Rem if OpenDevice(x) returns hPosys1 = -1 then the driver could
not be opened
Rem the program must be aborted! This is a reserved key word of
MotionScript®
Rem end of if block
Rem this instruction could be omitted, it is only included for
backward compatibility
Rem print the version number of the installed motion processor to
the output window
Rem Hex$ is a MotionScript® function converting a decimal to
hexadecimal presentation
All POSYS900.DLL functions can now be added to the program and combined with other MotionScript® commands. It is
also possible to write MotionScript® functions and call them as sub routines
Example of a user function
Function SetMoveParameters(hPosys#, axis,
vel, accel, pos)
SetVelocity(hPosys#, axis, vel)
SetAcceleration(hPosys#, axis, accel)
SetPosition(hPosys#, axis, pos)
EndFunc
Rem no local parameters are required
Assuming in your program you want to set move parameters for axis = 0 and axis = 1
444
© POSYS Motion Control GmbH & Co.KG, 2013
SetMoveParameters(hPosys#, 0, 100000,
20000,12345)
SetMoveParameters(hPosys#, 1, 200000,
40000,67890)
Rem for axis = 0
Rem for axis = 1
hPosys is the handle to the card being addressed.
User functions can also contain local variables. They must be declared in the body of the function.
FUNCTION intpower(a,b) LOC AL t,r
r=1
for t = 1 to b
r=r*a
next
return r
ENDFUNC
Rem t and r exist only in this function
Rem return defines the returned result of the function
Loop Instructions
Loop instructions can be used to react to status information or waiting for an event to take place. For example the next
move should not start until the one being executed has finished.
Repeat
Until
While
EndWhile
Rem Bit 10 is cleared when In-position or alternatively you may
use a While loop
Rem Bit 10 is set when motor in motion
ISA/PC-104 Bus
Please note the differences to the PCI. For the ISA bus you call OpenDevice() only once. It does NOT return a handle. If
the call is successful it returns 1 otherwise 0. You must enable the IO range for each card installed and get a handle to
those cards. To do this call hPosys[No] = EnableIO(cardNo, portCount). portCount is always 8, cardNo ranges from 1
to 16. hPosys[No] will hold the handles for cards 1 to 16. If hPosys returns -1 the call was not successful. For example if
you want to initialize three POSYS® 800 boards you must first call POSYSDriverXSetup, enter the addresses, store the
data and go to the MotionScript® program. Enter the following:
OpenDevice()
hPosys1# = EnableIO(1, 8)
hPosys2# = EnableIO(2, 8)
hPosys3# = EnableIO(3, 8)
No error checking was done in this example. You can now communicate with the three boards using the three handles
hPosys1, hPosys2 and hPosys3.
Print "Version Card 1: ";Hex$(GetVersion(hPosys1#))
Print "Version Card 2: ";Hex$(GetVersion(hPosys2#))
Print "Version Card 3: ";Hex$(GetVersion(hPosys3#))
These 3 commands will write the version numbers of the three motion control boards to the MotionScript® output window.
Any POSYS® function or procedure can now be called. The first parameter passed is always the handle defining which card
is addressed.
-oVariables
Supported Variables
Types
MotionScript® supports three types: numbers, pointers, and strings.
445
© POSYS Motion Control GmbH & Co.KG, 2013
In Basic there is no need to define variables, they are automatically defined by the compiler.
Basic recognizes a variable as a string if its name ends with a dollar ($) and a pointer if its name ends with a # character.
See Identifiers
Numbers
A numeric variable contains a number. The number is internally represented by a floating point value with double precision
(64 bit, 15 significant digits).
Numeric variables are used with operators to perform numeric expressions and are used as counters in loop instructions.
Pointers
A pointer variable contains a 32 bit pointer.
Strings
A string variable contains text. This text may be a single row or a multi-line text. The maximum theoretical size of a string
variable is 2 Gbyte.
Example:
a$ = "Hello" + " World" + "!"
The value of the variable "a$" is now "Hello World!"
String variables are used with operators to perform string expressions and are used with some functions to Open and Save
data from text files.
A single row of a multi-line string can be read using square brackets, example:
if a$ contains:
" This is a
text placed on
three rows "
b$ = a$[2] ; Now b$ contains: "text placed on"
Arrays
MotionScript® does not support arrays. It is still possible though to store and retrieve array data by using three
MotionScript® specific functions to implement Lists, Stacks, Queues, VarArray, Files and standard Arrays as well.
v# = alloc#( elements )
elements = number of elements of type double, v# is the pointer to the allocated memory
v# = alloc#( 10 ) reserves memory for 10 elements of the type double and returns the pointer to this array in v#
To store data into this memory use
set( v#, offset, value) will store value at offset in memory pointed to by v#
To retrieve data from memory use
data = get(v#, offset) will return the data from offset in memory pointed to by v#, data is of the type double
-oReserved Words
Reserved Words
This is a list of reserved MotionScript® key words.
They have the same meaning as in traditional Basic.
446
© POSYS Motion Control GmbH & Co.KG, 2013
if, or, to, and, end, mod, cls, rem
for, not, else, then, goto, step, break, endif
local, while, gosub, until, print, input, repeat
return, endfunc, endwhile, continue, function
Comments
C omments can be added with the keyword REM or the character '
They are valid until the end-of-line. Examples:
REM this is a comment
' and this is too
' but shorter
-oMotionScript® Utility Functions
MotionScript® Utility Functions
The following functions serve as an extension of the Basic programming language which serves as the basics for this script
language. They are required to support the motion control functions.
result = BitTest(TestValue, BitMask)
This function is useful for testing the condition of a Repeat or While loop. The following example shows its use:
hPosys# is the handle to the POSYS® motion controller returned by OpenDevice( n )
axis = 0
Repeat
Print "Actual Position: "; GetActualPosition( hPosys#, axis)
Print "Signal Status : "; GetSignalStatus(hPosys#, axis)
Until BitTest(GetActivityStatus(hPosys#, axis), 1024)) = 0
Bit 10 (=1024 , 0x400) of the Activity Status register is tested, if it is set the motor is in motion (=1024), if the motor is at
rest it is cleared.
As the above example demonstrates, the TestValue could be a POSYS900.DLL function returning status information.
Two additional functions are used to set and reset selected bits.
BitSet(testVar, bitToSet )will set to 1 bitToSet in testVar
BitReset(testVar, bitToReset )will set to 0 bitToReset in testVar
There are 3 additional functions which kind of duplicate the functionality of BitTest but are limited to the Activity Status,
Reset Event and Signal Status registers.
result = CompareActivity(hPosys#,axisID,mask) //checks the Activity Status register
Example:
hPosys# is the handle to the POSYS® motion controller
axisID = 0
mask = 1024 (bit 10)
Repeat
Until CompareActivity(hPosys#,axisID,mask) = 0 Print Axis "; axisID, "in position."
result = CompareEvent(hPosys#,axisID,mask) //checks the Event Status register
result = CompareSignal(hPosys#,axisID,mask) //checks the Signal Status register
-oOther MotionScript® Functions
447
© POSYS Motion Control GmbH & Co.KG, 2013
Other MotionScript® Functions
The following functions are integrated in the MotionScript® language.
Numeric functions
ABS(n)
LN(n)
LOG10(n)
LOG2(n)
EXP(n)
RND()
RND(n)
INT(n)
FIX(n)
ROUND(n)
FRAC(n)
SQR(n)
SGN(n)
SIN(n)
C OS(n)
TAN(n)
ASIN(n)
ACOS(n)
ATAN(n)
ATAN2(n,m)
SINH(n)
C OSH(n)
TANH(n)
ASINH(n)
ACOSH(n)
ATANH(n)
DEGTORAD(n)
RADTODEG(n)
ASC($)
LEN($)
VAL($)
Absolute value
Natural logarithm, base e
Logarithm, base 10
Logarithm, base 2
Exponential
Random number in the range 0..1
Random number in the range 0..n
Integer part of n
Integer part rounded toward zero
Rounding of n
Fractional part of n
Square root
Sign of n, +1 0 -1
Sine of number, radians
C osine
Tangent
Inverse sine
Inverse cosine
Inverse tangent
Inverse tangent of n/m with right quadrant
Hyperbolic sine
Hyperbolic cosine
Hyperbolic tangent
Inverse hyperbolic sine
Inverse hyperbolic cosine
Inverse hyperbolic tangent
Degrees to radians conversion
Radians to degrees conversion
Ascii code of char
Length of string
String to number conversion
String functions
LCASE$($)
UCASE$($)
LTRIM$($)
RTRIM$($)
C HR$(n)
STR$(n)
HEX$(n)
MID$($,n,[n])
LTAB$($)
RTAB$($)
LEFT$($,n)
RIGHT$($,n)
Lowercase conversion
Uppercase conversion
Left blanks deletion
Right blanks deletion
Ascii to char conversion
Number to string conversion
Number to hexadecimal
Substring extraction
Left insertion of a Tab
Right insertion of a Tab
Left part of a string
Right part of a string
String functions, multi-rows
C OUNT($)
OPENTEXT$($)
SAVETEXT$($)
C OPYTEXT$($)
PASTETEXT$($)
FINDFILE$($,$)
FINDDIR$($,$)
C ount rows in a multi-row string
Open a text file into a string
Save the string as a text file
C opy the string to the clipboard
Paste text from clipboard into the string
Get a list of files in the directory (dir,extension)
Get a list of directories
Miscellaneous functions
NUMBER(#)
POINTER(n)
PAUSE(n)
Pointer to number conversion
Number to pointer conversion
Suspend execution for n seconds
448
© POSYS Motion Control GmbH & Co.KG, 2013
MESSAGE($)
Show a message in a dialog window.
-oLoop Instructions
Loop Instructions
MotionScript® supports three kinds of loop instructions.
For, While and Repeat.
The easiest way to understand a Loop instruction is to look at an example. The following program prints the numbers 1 to
10, "a" is the control variable:
FOR a = 1 to 10
PRINT a
NEXT a
The BREAK instruction:
terminates instantly a cycle, so in this case the cycle stops when "a" becomes greater than 5.
FOR a = 1 to 10
PRINT a
IF a>5 then BREAK
NEXT a
The CONTINUE instruction:
acts as a NEXT instruction; the variable "a" is incremented and a new iteration is started immediately.
FOR a = 1 to 10
PRINT a
IF a>5 then CONTINUE
PRINT "hello"
NEXT a
FOR-NEXT instruction:
The complete syntax for this command is:
FOR = to [step ]
...
...
NEXT [ (ignored)]
examples:
FOR angle = 1+ASIN(0.4) to 1+ASIN(0.75) step 0.1
PRINT angle
NEXT
FOR y = 1 to 200
FOR x = 1 to 320
s = s + x*y
NEXT
NEXT
REPEAT-UNTIL instruction:
This instruction repeats a series of instructions until the condition is True. The block begins with the REPEAT command and
ends with the UNTIL command followed by the condition that is evaluated.
Example:
449
© POSYS Motion Control GmbH & Co.KG, 2013
a=1
REPEAT
PRINT a
a = a+1
UNTIL a>10
The Repeat instruction evaluates the condition at the end of the loop, this means that the instructions inside the loop are
executed at least once. The Break and C ontinue instructions can be used in REPEAT-UNTIL cycles just like in the FOR-NEXT
cycles.
WHILE-ENDWHILE instruction:
This instruction evaluates a condition at the beginning of the loop. If the condition is false then the cycle stops and
execution continues after the EndWhile instruction.
Example:
a=1
WHILE a <= 10
PRINT a
a = a+1
ENDWHILE
Since the While command evaluates the condition at the beginning of the loop, the instructions inside the loop may never
be also executed. The Break and C ontinue instructions can be used in WHILE-ENDWHILE cycles just like in the FOR-NEXT
cycles.
-oWriting MotionScript® Functions
Writing MotionScript® Functions
A function is defined as set of instructions that computes and returns a value.
The result can be discarded (like C and Delphi) or simply not returned, making it a procedure. Local variables can be
defined to support recursive functions.
Syntax:
Function ( parameters ) [ Local ]
...
[Return ]
...
Endfunc
Examples:
FUNCTION sum(a,b)
return a+b
ENDFUNC
FUNCTION intpower(a,b) LOCAL t,r
r=1
for t = 1 to b
r=r*a
next
return r
ENDFUNC
FUNCTION hello$(a$)
return "Hello to you " + a$
ENDFUNC
MotionScript® fully supports recursive functions.
450
© POSYS Motion Control GmbH & Co.KG, 2013
Example:
FUNCTION factorial(n)
if n <= 1 then return 1
return n*factorial(n-1)
ENDFUNC
-oPOSYS® Functions and Procedures
POSYS® Functions and Procedures
This is a list of all available POSYS® functions for the MotionScript® language. These functions are imported from the
POSYS900.DLL for the POSYS® 900 series and from the POSYS1900.DLL for the POSYS® 1900 series. The listing is from
the import file Imp900.pas for Delphi. MotionScript® itself does not require an import file, it is an integral part of the
program.
Explanation:
Procedure is a Function without a return value.
Function is a Function with a return value.
hPosys refers to the card handle regardless of talking to a PC I bus or ISA/PC-104 bus card. The only difference is in the
way of getting the handle. For the PCI bus hPosys = OpenDevice(deviceNo) returns the handles for deviceNo 0-15. For the
ISA/PC-104 bus hPosys# = EnableIO(deviceNo, 8) returns the handles for deviceNo 1-16. You may use any name of your
choice for the variable hPosys. In C/C++ and Delphi they need to be declared as integers. In MotionScript® no prior
declaration to first use is required.
Parameters:
type
Thandle : integer
Delphi
C/C++
Visual Basic
integer = 32 bits
INT
LONG
word = 16 bits
SHORT
INTEGER
byte = 8 bits
C HAR
BYTE
Example for the different calling conventions:
hPosys is in all of the examples the handle to the POSYS® motion control card returned by OpenDevice (device)
hPosys = OpenDevice(device1)
//for example device1 = 0 for the first instance
For the ISA/PC-104 bus motion controllers the handle is returned by a call to
hPosys = EnableIO(device1, 8)
//device range: 1 - 16, for example device1 = 1
In the POSYS® DLLs hPosys was chosen to declare the handle for PC I bus communication. It could also be used for the
ISA bus communication but will hold an entire different value (ISA bus address) than in the PCI bus communication. To
make the difference clear this manual will always refer to the ISA bus handle as hPosys
hPosys = EnableIO(device1, 8)
MotionScript® Syntax
axis = 1
position = 12345
returnResult = 0
'calling a Procedure without a return value:
AdjustActualPosition(hPosys#, axis, position)
'or for the example
AdjustActualPosition(hPosys#, 1, 12345)
451
© POSYS Motion Control GmbH & Co.KG, 2013
'calling a Function with a return value:
returnResult = GetPositionError(hPosys#, axis)
'or for the example
returnResult = GetPositionError(hPosys#, 1)
Delphi
Var
axis :word = 1;
position :integer = 12345;
returnResult :integer = 0;
// calling a Procedure without a return value:
AdjustActualPosition(hPosys, axis, position);
//or for the example
AdjustActualPosition(hPosys, 1, 12345);
// calling a Function with a return value:
returnResult := GetPositionError(hPosys, axis);
//or for the example
returnResult := GetPositionError(hPosys, 1);
C/C++
SHORT axis = 1;
INT position = 12345;
INT returnResult = 0;
// calling a Procedure without a return value:
AdjustActualPosition(hPosys, axis, position);
//or for the example
AdjustActualPosition(hPosys, 1, 12345);
// calling a Function with a return value:
returnResult = GetPositionError(hPosys, axis);
//or for the example
returnResult = GetPositionError(hPosys, 1);
Visual Basic
Dim Axis as Integer
Dim position as Long
Dim returnResult as Long
axis = 1
position = 12345
returnResult = 0
' calling a Procedure without a return value:
C all AdjustActualPosition(hPosys, axis, position)
'or for the example
C all AdjustActualPosition(hPosys, 1, 12345)
' calling a Function with a return value:
returnResult = GetPositionError(hPosys, axis);
'or for the example
returnResult = GetPositionError(hPosys, 1);
POSYS® Functions and Procedures
MotionScript® requires for the parameters the type DOUBLE and if a value is returned it is also returned as a DOUBLE.
By default all numeric MotionScript® variables are of the type DOUBLE, in fact that is the only numeric type
Card Initialization & Addressing
Procedure InitializePOSYS(cardAddress0, cardAddress1:word);stdcall;
Function OpenDevice(device:byte):Thandle;stdcall;
Function OpenDevice:word;
Function C loseDevice(hPosys :integer) :integer;stdcall;
Function DetectPosysDevices:word;stdcall;
Function RegisteredPosysDevices:word;stdcall;
452
© POSYS Motion Control GmbH & Co.KG, 2013
Breakpoints & Interrupts
Procedure C learInterrupt(hPosys:Thandle);stdcall;
Function GetInterruptAxis(hPosys:Thandle):word;stdcall;
Procedure SetBreakpoint(hPosys:Thandle;axis,breakpoint,sourceAxis,action,trigger:word);stdcall;
Function GetBreakpoint(hPosys:Thandle;axis,breakpoint:word):word;stdcall;
Procedure SetBreakpointValue(hPosys:Thandle;axis,breakpoint:word;value:integer);stdcall;
Function GetBreakpointValue(hPosys:Thandle;axis,breakpoint:word):integer;stdcall;
Procedure SetInterruptMask(hPosys:Thandle;axis,interruptMask:word);stdcall;
Function GetInterruptMask(hPosys:Thandle;axis:word):word;stdcall;
Commutation
Function GetPhaseCommand(hPosys:Thandle;axis:word):integer;stdcall;
Procedure InitializePhase(hPosys:Thandle;axis:word);stdcall;
Procedure SetCommutationMode(hPosys:Thandle;axis,mode:word);stdcall;
Function GetCommutationMode(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetNumberPhases(hPosys:Thandle;axis,phases:word);stdcall;
Function GetNumberPhases(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetPhaseAngle(hPosys:Thandle;axis,angle:word);stdcall;
Function GetPhaseAngle(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetPhaseCorrectionMode(hPosys:Thandle;axis,mode:word);stdcall;
Function GetPhaseCorrectionMode(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetPhaseCounts(hPosys:Thandle;axis,count:word);stdcall;
Function GetPhaseCounts(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetPhaseInitializeMode(hPosys:Thandle;axis,mode:word);stdcall;
Function GetPhaseInitializeMode(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetPhaseInitializeTime(hPosys:Thandle;axis,time:word);stdcall;
Function GetPhaseInitializeTime(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetPhaseOffset(hPosys:Thandle;axis,offset:word);stdcall;
Function GetPhaseOffset(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetPhasePrescale(hPosys:Thandle;axis,mode:word);stdcall;
Function GetPhasePrescale(hPosys:Thandle;axis:word):word;stdcall;
Digital Servo Filter
Procedure C learPositionError(hPosys:Thandle;axis:word);stdcall;
Procedure DACOutputsOff(hPosys:Thandle);stdcall;
Procedure DACOutputsOn(hPosys:Thandle);stdcall;
Function GetAmpEnable(hPosys:Thandle;ampID:word):word;stdcall;
Function GetDerivative(hPosys:Thandle;axis:word):word;stdcall;
Function GetIntegral(hPosys:Thandle;axis:word):integer;stdcall;
Function GetPositionError(hPosys:Thandle;axis:word):integer;stdcall;
Procedure SetAmpDisable(hPosys :integer; disable :word);stdcall;
Procedure SetAmpEnable(hPosys :integer; enable :word);stdcall;
Procedure SetAutoStopMode(hPosys:Thandle;axis,mode:word);stdcall;
Function GetAutoStopMode(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetBiQuadCoefficient(hPosys:Thandle;axis,coefficientID,filterID,value:word);stdcall;
Function GetBiQuadCoefficient(hPosys:Thandle,axis:word);stdcall;
Procedure SetDerivativeTime(hPosys:Thandle;axis,time:word);stdcall;
Function GetDerivativeTime(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetIntegrationLimit(hPosys:Thandle;axis:word;limit:integer);stdcall;
Function GetIntegrationLimit(hPosys:Thandle;axis:word):integer;stdcall;
Procedure SetKaff(hPosys:Thandle;axis,Kaff:word);stdcall;
Function GetKaff(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetKd(hPosys:Thandle;axis,Kd:word);stdcall;
Function GetKd(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetKi(hPosys:Thandle;axis,Ki:word);stdcall;
Function GetKi(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetKp(hPosys:Thandle;axis,Kp:word);stdcall;
Function GetKp(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetKout(hPosys:Thandle;axis,Kout:word);stdcall;
Function GetKout(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetKvff(hPosys:Thandle;axis,Kvff:word);stdcall;
Function GetKvff(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetMotorBias(hPosys:Thandle;axis,bias:word);stdcall;
Function GetMotorBias(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetMotorLimit(hPosys:Thandle;axis,limit:word);stdcall;
Function GetMotorLimit(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetPositionErrorLimit(hPosys:Thandle;axis:word;limit:integer);stdcall;
Function GetPositionErrorLimit(hPosys:Thandle;axis:word):integer;stdcall;
453
© POSYS Motion Control GmbH & Co.KG, 2013
Piezo (Ceramic) Motor Functions
Procedure SetpzOffsetPos(hPosys:Thandle;axis:word;offset:word);stdcall;external DLL;
Function GetpzOffsetPos(hPosys:Thandle;axis:word):word;stdcall;external DLL;
Procedure SetpzOffsetNeg(hPosys:Thandle;axis:word;offset:word);stdcall;external DLL;
Function GetpzOffsetNeg(hPosys:Thandle;axis:word):word;stdcall;external DLL;
Procedure SetpzIntLimitStl(hPosys:Thandle;axis:word;limit:longword);stdcall;external DLL;
Function GetpzIntLimitStl(hPosys:Thandle;axis:word):longword;stdcall;external DLL;
Procedure SetpzWindow(hPosys:Thandle;axis:word;window:word);stdcall;external DLL;
Function GetpzWindow(hPosys:Thandle;axis:word):word;stdcall;external DLL;
Procedure SetpzKp(hPosys:Thandle;axis:word;kp:word);stdcall;external DLL;
Function GetpzKp(hPosys:Thandle;axis:word):word;stdcall;external DLL;
Procedure SetpzKi(hPosys:Thandle;axis:word;ki:word);stdcall;external DLL;
Function GetpzKi(hPosys:Thandle;axis:word):word;stdcall;external DLL;
Procedure SetpzKd(hPosys:Thandle;axis:word;kd:word);stdcall;external DLL;
Function GetpzKd(hPosys:Thandle;axis:word):word;stdcall;external DLL;
Procedure SetpzKvff(hPosys:Thandle;axis:word;kvff:word);stdcall;external DLL;
Function GetpzKvff(hPosys:Thandle;axis:word):word;stdcall;external DLL;
Procedure SetpzKaff(hPosys:Thandle;axis:word;kaff:word);stdcall;external DLL;
Function GetpzKaff(hPosys:Thandle;axis:word):word;stdcall;external DLL;
Procedure SetpzIntLim(hPosys:Thandle;axis:word;intlim:longword);stdcall;external DLL;
Function GetpzIntLim(hPosys:Thandle;axis:word):longword;stdcall;external DLL;
Procedure SetpzKdPeriod(hPosys:Thandle;axis:word;kdperiod:word);stdcall;external DLL;
Function GetpzKdPeriod(hPosys:Thandle;axis:word):word;stdcall;external DLL;
Procedure SetpzWindow2(hPosys:Thandle;axis:word;window2:word);stdcall;external DLL;
Function GetpzWindow2(hPosys:Thandle;axis:word):word;stdcall;external DLL;
Procedure SetpzKvff2(hPosys:Thandle;axis:word;kvff2:word);stdcall;external DLL;
Function GetpzKvff2(hPosys:Thandle;axis:word):word;stdcall;external DLL;
Encoder
Procedure AdjustActualPosition(hPosys:Thandle;axis:word;position:integer);stdcall;
Function GetAbsoluteSSIPosition(hPosys:Thandle;axisID:word):integer;stdcall;
Function GetActualVelocity(hPosys:Thandle;axis:word):integer;stdcall;
Function GetCaptureValue(hPosys:Thandle;axis:word):integer;stdcall;
Function GetSSIVersion(hPosys:Thandle):word;stdcall;
Procedure WriteSSIRegister(hPosys:Thandle;axisID:word; resolution, frequency:word);stdcall;
Procedure ReadSSIRegister(hPosys:Thandle;axisID:word;var resolution:word;var frequency:word);stdcall;
Procedure WriteSSIResolution(hPosys:Thandle;axisID:word;var resolution:word);stdcall;
Procedure ReadSSIResolution(hPosys:Thandle;axisID:word;var resolution:word);stdcall;
Procedure WriteSSIFrequency(hPosys:Thandle;axisID:word;var resolution:word);stdcall;
Procedure ReadSSIFrequency(hPosys:Thandle;axisID:word;var resolution:word);stdcall;
Procedure ResetSSI(hPosys:Thandle);stdcall;
Procedure SetActualToAbsolutePosition(hPosys:Thandle;axisID:word);stdcall;
Procedure SetActualPosition(hPosys:Thandle;axis:word;pos:integer);stdcall;
Function GetActualPosition(hPosys:Thandle;axis:word):integer;stdcall;
Procedure SetActualPositionUnits(hPosys:Thandle;axis,mode:word);stdcall;
Function GetActualPositionUnits(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetAuxiliaryEncoderSource(hPosys:Thandle;axis,mode,auxiliaryAxis:word);stdcall;
Function GetAuxiliaryEncoderSource(hPosys:Thandle;axis:word);stdcall;
Procedure SetCaptureSource(hPosys:Thandle;axis,source:word);stdcall;
Function GetCaptureSource(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetEncoderModulus(hPosys:Thandle;axis,modulus:word);stdcall;
Function GetEncoderModulus(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetEncoderSource(hPosys:Thandle;axis,source:word);stdcall;
Function GetEncoderSource(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetEncoderToStepRatio(hPosys:Thandle;axis,encodercounts,steps:word);stdcall;
Function GetEncoderToStepRatio(hPosys:Thandle;axis:word):integer;stdcall;
On-Board RAM
Procedure EnableDPRam(hPosys:P1800_Handle);stdcall; //only valid for POSYS® 1800 series equipped with Dual Port
RAM
Procedure DisableDPRam(hPosys:P1800_Handle);stdcall; //only valid for POSYS® 1800 series equipped with Dual Port
RAM
Function ReadBuffer(hPosys:Thandle;bufferID:word):integer;stdcall;
Procedure SetBufferFunction(hPosys:Thandle;axis:word;funct:integer;bufferID:word);stdcall;
Function GetBufferFunction(hPosys:Thandle;axis:word;funct:word):word;stdcall;
Procedure SetBufferLength(hPosys:Thandle;bufferID:word;length:integer);stdcall;
Function GetBufferLength(hPosys:Thandle;bufferID:word):integer;stdcall;
Procedure SetBufferReadIndex(hPosys:Thandle;bufferID:word;index:integer);stdcall;
Function GetBufferReadIndex(hPosys:Thandle;bufferID:word):integer;stdcall;
Procedure SetBufferStart(hPosys:Thandle;bufferID:word;address:integer);stdcall;
Function GetBufferStart(hPosys:Thandle;bufferID:word):integer;stdcall;
454
© POSYS Motion Control GmbH & Co.KG, 2013
Procedure SetBufferWriteIndex(hPosys:Thandle;bufferID:word;index:integer);stdcall;
Function GetBufferWriteIndex(hPosys:Thandle;bufferID:word):integer;stdcall;
Procedure WriteBuffer(hPosys:Thandle;bufferID:word;value:integer);stdcall;
Function ReadDPRamLong(hPosys:Thandle;offset:dword):integer;stdcall;
Procedure WriteDPRamLong(hPosys:Thandle;offset:dword;value:dword);stdcall;
Motor Output
Function GetCurrentMotorCommand(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetMotorCommand(hPosys:Thandle;axis,value:word);stdcall;
Function GetMotorCommand(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetMotorMode(hPosys:Thandle;axis,mode:word);stdcall;
Function GetMotorMode(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetMotorType(hPosys:Thandle;axis:word):word;stdcall;
Function GetMotorType(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetOutputMode(hPosys:Thandle;axis,mode:word);stdcall;
Function GetOutputMode(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetPWMFrequency(hPosys:Thandle;axis,frequency:word);stdcall;
Function GetPWMFrequency(hPosys:Thandle;axis:word);stdcall;
Procedure SetStepRange(hPosys:Thandle;axis,frequency:word);stdcall;
Function GetStepRange(hPosys:Thandle;axis:word):word;stdcall;
Profile Generation
Function GetCommandedAcceleration(hPosys:Thandle;axis:word):integer;stdcall;
Function GetCommandedPosition(hPosys:Thandle;axis:word):integer;stdcall;
Function GetCommandedVelocity(hPosys:Thandle;axis:word):integer;stdcall;
Procedure MultiUpdate(hPosys:Thandle;mask:word);stdcall;
Procedure SetAcceleration(hPosys:Thandle;axis:word;accel:integer);stdcall;
Function GetAcceleration(hPosys:Thandle;axis:word):integer;stdcall;
Procedure SetDeceleration(hPosys:Thandle;axis:word;deceleration:integer);stdcall;
Function GetDeceleration(hPosys:Thandle;axis:word):integer;stdcall;
Procedure SetGearMaster(hPosys:Thandle;axis,masterAxis,source:word);stdcall;
Function GetGearMaster(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetGearRatio(hPosys:Thandle;slaveAxis:word;ratio:integer);stdcall;
Function GetGearRatio(hPosys:Thandle;slaveAxis:word):integer;stdcall;
Procedure SetJerk(hPosys:Thandle;axis:word;jerk:integer);stdcall;
Function GetJerk(hPosys:Thandle;axis:word):integer;stdcall;
Procedure SetPosition(hPosys:Thandle;axis:word;position:integer);stdcall;
Function GetPosition(hPosys:Thandle;axis:word):integer;stdcall;
Procedure SetProfileMode(hPosys:Thandle;axis,mode:word);stdcall;
Function GetProfileMode(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetStartVelocity(hPosys:Thandle;axis:word;velocity:integer);stdcall;
Function GetStartVelocity(hPosys:Thandle;axis:word):integer;stdcall;
Procedure SetStop(hPosys:Thandle;axis,mode:word);stdcall;
Function GetStop(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetStopMode(hPosys:Thandle;axis,mode:word);stdcall;
Function GetStopMode(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetVelocity(hPosys:Thandle;axis:word;velocity:integer);stdcall;
Function GetVelocity(hPosys:Thandle;axis:word):integer;stdcall;
Procedure Up_date(hPosys:Thandle;axis:word);stdcall;
Procedure Update(hPosys:Thandle;axis:word);stdcall;
Servo Loop Control
Function GetTime(hPosys:Thandle):integer;stdcall;
Procedure SetAxisMode(hPosys:Thandle;axis,mode:word);stdcall;
Function GetAxisMode(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetLimitSwitchMode(hPosys:Thandle;axis,mode:word);stdcall;
Function GetLimitSwitchMode(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetMotionCompleteMode(hPosys:Thandle;axis,mode:word);stdcall;
Function GetMotionCompleteMode(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetSampleTime(hPosys:Thandle;time:word);stdcall;
Function GetSampleTime(hPosys:Thandle):word;stdcall;
Procedure SetSettleTime(hPosys:Thandle;axis,time:word);stdcall;
Function GetSettleTime(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetSettleWindow(hPosys:Thandle;axis,window:word);stdcall;
Function GetSettleWindow(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetTrackingWindow(hPosys:Thandle;axis,window:word);stdcall;
Function GetTrackingWindow(hPosys:Thandle;axis:word):word;stdcall;
Status Registers and AxisOut Indicator
455
© POSYS Motion Control GmbH & Co.KG, 2013
Function GetActivityStatus(hPosys:Thandle;axis:word):word;stdcall;
Function GetAxis_In_Out_Home(hPosys:Thandle;statID:word):word;stdcall;
Function GetEventStatus(hPosys:Thandle;axis:word):word;stdcall;
Function GetSignalStatus(hPosys:Thandle;axis:word):word;stdcall;
Procedure ResetEventStatus(hPosys:Thandle;axis,mask:word);stdcall;
Procedure SetAxisOutSource(hPosys:Thandle;axis:word;sourceAxis,bit,reg:word);stdcall;
Function GetAxisOutSource(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetSignalSense(hPosys:Thandle;axis,mask:word);stdcall;
Function GetSignalSense(hPosys:Thandle;axis:word):word;stdcall;
Traces
Function GetTraceCount(hPosys:Thandle):integer;stdcall;
Function GetTraceStatus(hPosys:Thandle):word;stdcall;
Procedure SetTraceMode(hPosys:Thandle;mode:word);stdcall;
Function GetTraceMode(hPosys:Thandle):word;stdcall;
Procedure SetTracePeriod(hPosys:Thandle;period:word);stdcall;
Function GetTracePeriod(hPosys:Thandle):word;stdcall;
Procedure SetTraceStart(hPosys:Thandle;triggerAxis,condition,triggerBit,triggerState:word);stdcall;
Function GetTraceStart(hPosys:Thandle):word;stdcall;
Procedure SetTraceStop(hPosys:Thandle;triggerAxis,condition,triggerBit,triggerState:word);stdcall;
Function GetTraceStop(hPosys:Thandle):word;stdcall;
Procedure SetTraceVariable(hPosys:Thandle;variableNumber,traceAxis,variable:word);stdcall;
Function GetTraceVariable(hPosys:Thandle;variableNumber:word):word;stdcall;
Miscellaneous (Controller Reset, Communication Mode aso)
Function EnableIO(deviceNo, portCount:word):word
Function GetChecksum(hPosys);stdcall;
Function GetHostIOError(hPosys:Thandle):word;stdcall;
Function GetProcessorStatus(hPosys:Thandle):word;stdcall;
Function Get_Version(hPosys:Thandle):integer;stdcall;
Function GetVersion(hPosys:Thandle):integer;stdcall;
Procedure HardReset(hPosys:Thandle);stdcall;
Procedure MCReset(hPosys:Thandle);stdcall;
Procedure NoOperation(hPosys:Thandle);stdcall;
Function PortInW(hPosys:Thandle;address:word):word;stdcall;
Procedure PortOutW(hPosys:Thandle;address,outword:word);stdcall;
Procedure PortOutB(hPosys:Thandle;address:word;value:byte);stdcall;
Function ReadAnalog(hPosys:Thandle;portID:word):word;stdcall;
Function ReadIO(hPosys:Thandle;ioID:word):word;stdcall;
Function ReadPLD(hPosys:Thandle;pld_adr:word):word;stdcall;
Procedure SoftReset(hPosys:Thandle);stdcall;
Procedure SetCANMode(hPosys:mask);stdcall;
Function GetCANMode(hPosys);stdcall;
Procedure SetDiagnosticPortMode(hPosys:Thandle;mode:word);stdcall;
Function GetDiagnosticPortMode(hPosys:Thandle):word;stdcall;
Procedure SetSerialPort(hPosys:Thandle;baudrate,parity,stopbits,protocol,mdaddress:word);stdcall;
Function GetSerialPort(hPosys:Thandle):word;stdcall;
Procedure SetSerialPortMode(hPosys:Thandle;baudrate,parity,stopbits,protocol,mdaddress:word);stdcall;
Function GetSerialPortMode(hPosys:Thandle):word;stdcall;
Procedure SetSynchronizationMode(hPosys:Thandle;mode:word);stdcall;
Function GetSynchronizationMode(hPosys:Thandle):word;stdcall;
Procedure SetWatchDog(hPosys:Thandle;watchdog_adr:word;watchdog_value:word);stdcall;
Procedure WriteIO(hPosys:Thandle;ioID,data:word);stdcall;
Additional MotionScript® Functions
Procedure
Procedure
Procedure
Procedure
Procedure
Procedure
BitReset(hPosys:Thandle;testVar,bitToReset:integer);stdcall;
BitSet(hPosys:Thandle;testVar,bitToReset:integer);stdcall;
BitTest(hPosys:Thandle;testVar,bitToReset:integer);stdcall;
C ompareActivity(hPosys:Thandle;axis:word;mask:integer);stdcall;
C ompareEvent(hPosys:Thandle;axis:word;mask:integer);stdcall;
C ompareSignal(hPosys:Thandle;axis:word;mask:integer);stdcall;
-o-
456
© POSYS Motion Control GmbH & Co.KG, 2013
POSYS® GUI for Windows 98/ME/2000/XP
Introduction
Introduction
The POSYS® program for Windows 98/ME/2000/XP offers many examples what the POSYS® is capable to do. To avoid
misunderstanding right at the beginning - the POSYS® GUI ist not designed for use as a standard application software for
everydays use, it was actually designed to show the potentials of the POSYS® and offer the possibility to start right off
including output to the amplifiers/motors, encoder feedback, setting and resetting IOs aso....
Depending on whether which card and which motor type the software is supposed to be used, can result in slight
differences that are pointed out at the corresponding place. An example is the use of servo or stepping motors. Depending
on whether which card type is installed, one of the two "Motor Output Mode" Boxes appear:
servo motor
-
stepper motor
Further changes that occur, represented as in this example, are the deactivation of the PID filter parameter box and the
DACOutputs ON/OFF function if stepping motor cards are recognized.
Furthermore the extended PID filter parameter setup is no longer accessible in the main menu
457
© POSYS Motion Control GmbH & Co.KG, 2013
and instead following message appears when trying to access it:
On the following pages the individual functions and possibilities of the POSYS® GUI are described nearer and illustrated.
-oThe POSYS® GUI Main Window
The Main Window of the POSYS® GUI Program
458
© POSYS Motion Control GmbH & Co.KG, 2013
Before this program can be started and used, the program POSYSDriverXSetup (cards based on ISA-bus; POSYS®
700/800/800-B/1800) must be used to have entered the driver in the Windows' registry. PCI-Bus based cards (POSYS®
900/1900) are pnp-compatible and while booting "new hardware is detected" is reported. You are requested to the position
of the drivers for the card(s). Select the corresponding driver (either for POSYS® 900 or 1900) and follow the screen
messages for installing hardware in Windows. The delivered program PCI ScanforPOSYS helps you to determine the
assigned base addresses for the PC I-Bus cards. In addition it is necessary to also execute the batch file "registerOCX.bat",
located in the subdirectory /OCX of the CD, which should have been copied to the harddisk before. It contains several
components needed for the graphical output for the Windows GUI. Depending on the type of Windows it may be necessary
to confirm two pop-up windows.
After this it is possible to execute above program. In order to be able to build up a communication with the POSYS®, the
driver must now be loaded and the card to be initialized. As already said - this is a Demo program. These steps can be
automized in your own application. Our first intention was to offer the programmer a program showing as many functions
and potentials as possible, even to visualize those functions which actually run automatically in the background.
-oInitialization
Initialization
In the lower left corner of the main GUI window is a box called "Registered Drivers". Depending on how many cards were
registered (ISA-Based) respectively recognized (PC I-based) they will be shown in the list box when clicking on the arrow
which opens a list box. Assumeing only one card was registered then two possibilities are available, "None" and "Posys1".
The default is always "None", why now "Posys1" should be selected and visuable in the window. A further click on the
button "Select Driver" opens the driver and reserves the necessary address area for the chosen card.
459
© POSYS Motion Control GmbH & Co.KG, 2013
After a click on the button "Initialize Card" In the box "Base Addresses" the reserved base address is shown. In this case it
is the address 0x300h.
C ommunication with the motion controller has now started and can be verified when taking a look at the following box
"Version". After the click on the button "Initialize Card" additional commands were sent to the controller and one of the
results is shown here. The type of motion controller is presented in the first row (motion processor type = 2140 and
software revision = 0024). A further click on the button "Get Version" retreives additional information as for example for
the installed PLD. The PLD and the Motion Controller version together allow the identification of type of card installed which
is shown in the last window in the "Version" box.
If everything run smoothly up to here, then the communication with the POSYS® was built up successfully!
-oDescription of further Program Functions
Description of further Program Functions
In the following the windows and boxes and their importance and use are explained nearer.
-oController Status Box
Controller Status Box
460
© POSYS Motion Control GmbH & Co.KG, 2013
This box delivers information about the status of the motion processor, about possible HostIOErrors, the number of Counts
(should always be 1 with the exception of Navigator based cards with a version below 2.0) and the number of Trace Counts
during/after a trace.
-oPower-On Defaults Box
Power-On Defaults Box
Additional information for the POSYS® motion controllers is shown here which are loaded after power-on. These settings
can be overwritten. For example the data transfer rate for the C AN-Bus, Motortype and the settings for the serial interface.
Depending on the type of card you have the one or other setting may be accessible for change or not.
-oMotor Output Mode Box
Motor Output Mode Box
Depending on the type of card respectively which axis is active, there are certain motor relevant settings possible. For
servo motors you can select the type of motor command output mode (16 bit analog output or PWM output).
Additional settings for PWM mode are available with the commands Set/GetMotorType and Set/GetPWMFrequency for 2or 3-phase brushless servo motors.
Additional settings for stepper motors are the different Step Ranges. Depending on the maximum amount of output pulses
the next value above that should be selected.
461
© POSYS Motion Control GmbH & Co.KG, 2013
-oFilter Parameter Box
Filter Parameter Box
This box is only accessible if a servo motor card is installed or if an axis is set to servo mode and active. It is not accessible
with a stepper card or if an active axis is set to stepper mode. At power-on these values are loaded to the motion
processor as defaults (other defaults are possible and can even be hardcoded to the motion controller). Other defaults are
set up when clicking on the button "Load Defaults" and become valid at once for all axes (as far as they are in servo
mode). A click on the button Update loads the values for the active axis only. A click on the button "Get Data" retreives the
values for the active axis. The selection of the active axis is done in the box "Select Axis/Card" as shown in the second
picture. Further settings can be accessed when choosing "PID -> PID-Filter" in the menu and further information can be
found in the programmer's manual in the section Digital Servo Filter.
If these values are suitable for your application or motors must be determined by yourself. servo-Halbeck
GmbH & Co.KG can not be held responsible for values not fitting your motors or application which may result
in unpredictable behaviour of the motors. Therefore we heavily recommend that these values are first proven
if they are suitable or not without motors connected to the controller.
The PID filter setting menu accessible thru the menu offers more setting options. A click on "PID -> PID Filter" opens
following window:
462
© POSYS Motion Control GmbH & Co.KG, 2013
Here all relevant filter parameters can be tuned for every axis individually.
-oAmplifier Enable and DACOutputs ON/OFF
Amplifier Enable and DACOutputs ON/OFF
As at the filter parameter settings the amplifier enable and DACOutput ON/OFF functions are only for servo cards or axes
in servo mode. Where hereby another restriction is relevant for the DACOutputs as they are only available for servo axes
running with analog motor command output. Servo axes running with PWM motor command output are not affected.
The Amplifier Enable Box makes the selective selection possible which ones of the axes are supposed to be enabled. Axes
with PWM motor command output are servoing immediately. Axes with 16 bit motor command analog output are internally
servoing but the motors are still not being controlled because the DACOutputs are not ON yet. This is an additional safety
feature.
On stepper motor cards or axes running in stepper mode the amplifier enable output signals can be used as additional
custom or application specific outputs. Basically this is also possible with servo cards and axes in servo mode if an external
circuitry is being used to enable the amplifier.
-o-
463
© POSYS Motion Control GmbH & Co.KG, 2013
Output Torque Box
Output Torque Box
The output of certain values in this window are again subject and dependant on the type of card you use. These values are
only valid for servo motion controllers or for axes running in servo mode. The actual value output by the trajectory
generator is shown in this window which is used for servoing the axes. This value is shown in both modes, analog motor
command output mode and PWM motor command output mode.
-oUpdate Periods Box
Update Periods Box
This function allows to query the actual cycle time respectively the change of it. The default after power-on is the shortest
possible cycle time for the installed type of card.
C licking on the arrows allows to change the value in steps allowed by the type of card installed.
A click on the button GetTime will show the actual values.
-oStatus Activity/Event/Signal
Status Activity/Event/Signal
In this box continuously specific activity, event and signal status messages are shown.
464
© POSYS Motion Control GmbH & Co.KG, 2013
For example in the area Activity you are informed if an axis is in-motion or not or in the area Signals which status the
encoder signals have right now and in the Event area if an axis hit a limit switch or not. Further information can be
retreived from the boxes "Status" and "Set Output Bits" (ReadIO/WriteIO), which, when changes occur, show this
separately. Depending on certain circumstances further actions may be taken and can be defined in the customer's
application software. By defining Breakpoints it is possible to react on almost anykind of event or condition.
-oSignal Sense
Signal Sense
An additional function of the POSYS® is the possibility to define if signals should be interpreted as "active low" or "active
high". To change the sense open the menu "Signal Sense -> Set Signal Sense" and a new window opens in which for each
signal can be determined how the POSYS® should interpret them.
465
© POSYS Motion Control GmbH & Co.KG, 2013
-oEnter Data Box
Enter Data Box
In order to program a movement, specific further parameters are necessary next to the filter parameters for servo motors.
In this box velocity, negative and positive acceleration, target position and optionally jerk are defined.
466
© POSYS Motion Control GmbH & Co.KG, 2013
Further parameters that can be programmed are the trajectory (Linear, S-curve, Velocity, Electronic Gearing and (not
shown) External Profile Mode) and the position error.
After input of the desired values these for the respectively active axis can be loaded with a click on "Send Data" (see
parameter filter box further above). A click on "Motion Start" is tantamount an update for the respectively active axis and
the programmed movement would start. Before further axes with these or other values are supposed to be programmed,
first the axis to be programmed must be activated. A click on "Start All Axes" starts all programmed axes.
In order to stop an axis, it must be marked as active and a click on "Stop" would stop the axis with ramp. In order to stop
all axes a click on "Stop All Axes" would stop all axes with ramp. A click on "Abort Motion" would stop all axes immediately
without ramp.
In the right box "Type of Profile" can be selected, which kind of trajectory is supposed to be active. When s-curve is
selected also the value for "S-Jerk/s³" must be programmed. If "Electronic Gearing" is selected additional settings can be
made when selecting in the main menu "Options -> Master/Slave Mode".
In this case selection can be made which axis acts as the Master and which axes act as slaves, if the servoing is
determined by the actual or commanded position and the ratio (velocity and direction) to follow the master.
-oCommanded and Actual Position Box
467
© POSYS Motion Control GmbH & Co.KG, 2013
Commanded and Actual Position Box
Of course the display of commanded and actual position at a given time is necessary. For this purpose the two boxes
"Commanded Position" and "Actual Position" are used.
After input of a motion profile and an update of the parameters a motion is initiated. The controller calculates depending on
the actual parameters for each update rate a commanded position and compares it with the actual position returned by the
feedback device. Outputting a corresponding torque demand value for servo motors or pulse & direction signals for stepper
motors the controllers effort is to keep actual and commanded position together as near as possible during each update
period. A restriction for stepper motors is that the controller is not able to control stepper motors but able to detect stall (
Stall Detection; stuck motor or lost pulses). The user has the possibility to take whatever action when stall detection
occurs. How far actual and commanded position differ depends on the filter parameters and of course if the selected
amplifiers/motors are suitable for the desired application. Note that the stiffer a motor is the more identical become
commanded and actual position.
The button "Zero Position" allows to zero the position of the active axis.
The index can be shown in the output window "Capture" with a click on the button "Get" which is captured each revolution.
This functions only for the active axis and when the encoder provides and index signal.
-oSSI Feedback
SSI Feedback
The POSYS® default feedback type are incremental encoders with or without inverted signals. Optionally it is possible to
use absolute encoders with SSI interface. Possible input code can be gray code or binary code.
In case the SSI-option is being used the POSYS® GUI software allows to make software adjustments which can overwrite
hardware jumper settings on the SSI-board. For further information please look-up section SSI800/900 option card.
468
© POSYS Motion Control GmbH & Co.KG, 2013
Each axis can be individually setup for the one or other type of feedback. During operation when motors are at a standstill
respectively are turned off it is possible to switch between the two modes of feedback, which actually only makes sense
when both types of feedback are being used on the same axis. It is absolutely necessary that before switching from one
type to another that the differences between commanded and actual position are cleared with the command
C learPositionError. For further information please go to section Motor Interfacing in the User's Guide and to the
Programmer's Reference/Encoder.
-oAnalog Inputs
Analog Inputs
The POSYS® supports x8 10 bit analog inputs. The command ReadAnalog allows reading the value. Depending on the type
of controller board used different input values are allowed as these are values from 0 to 2.048 VDC, 0 to 2.5 VDC or 0 to
4.096 VDC depending on model. For additional information please look-up the information about the analog inputs in the
POSYS® Versions Specifications.
469
© POSYS Motion Control GmbH & Co.KG, 2013
-o-
470
© POSYS Motion Control GmbH & Co.KG, 2013
Single Port RAM / Dual Port RAM
Single Port RAM / Dual Port RAM
Depending on the model each POSYS® supports different kinds of memory. The POSYS® 700/800 support 256 kb SPRAM,
the POSYS® 800-B/900/1800/1900 support 512 kb SPRAM. The POSYS® 1800/1900 also support 16k x 16, 32k x 16 or
64k x 16 DPRAM.
The following table shows which boards are equipped with which standard RAM modules and which RAM types and sizes
are possible as an alternative.
POSYS® model
256 KB SPRAM
512 KB SPRAM
16 KB x 16
DPRAM
32 KB x 16
DPRAM
64 KB x 16 DPRAM
standard
n/a
n/a
n/a
n/a
800-B/900
option
standard
n/a
n/a
n/a
1800
option
option
standard
option
option
1900/1950
option
option
option
standard
option
1920
option
option
option
standard
option
700/800
Depending on the type of RAM the POSYS® GUI allows accordingly the type of access to SPRAM only, DPRAM only or
mixed usage of DPRAM in SPRAM-Mode.
Note: POSYS® 1800
Due to the restrictions of the ISA-Bus based systems, the usage of Dual Port RAM is difficult to realize. Therefore the
POSYS® 1800 has some restrictions and needs some settings before the Dual Port RAM can be accessed after power-on.
This is not an issue of addressing the RAM but the way the on-board RAM is accessed (SPRAM-mode or DPRAM-mode). The
SPRAM-mode works always, even if the board is equipped with DPRAM and in this case it is also as slow as SPRAM. This is
necessary because some PC -systems do not accept the required address area for the memory mapped DPRAM at boot-up
and hang-up. To avoid this the DPRAM mode via the ISA-Bus is deactivated. This allows the user to find out available
address areas for the DPRAM which can be set by setting the dip-switches on-board the POSYS®. The other reason why
the DRPAM is deactivated is because some ISA-Bus based systems would not accept external ISA-devices with activated
DPRAM at power-on no matter if the dip-switch settings are correct or not or if the BIOS setting were previously set or not,
even if the addressing is correct. But after boot-up all systems were able to run and to recognize the DPRAM with first
deactivated and later-on activated DPRAM.
To activate the DPRAM mode after power-on the GUI program offers a menu point "Select Ram -> Enable Dual Port Ram"
which you must click to activate the DPRAM. Afterwards the menu "Select Ram -> Dual Port Ram" needs to be activated to
tell the motion processor how access to the RAM is organized. To deactivate the DPRAM again it is sufficient to click the
menu "Select Ram -> Disable Dual Port Ram" and "Select Ram -> Single Port Ram" to activate the SPRAM mode again.
These points need to be taken into consideration when programmers are writing their own frontends. More information on
this point can be found in the section Usage of the On-Board Dual Port RAM with the POSYS® 1800.
-oTrace Mode
Trace Mode
471
© POSYS Motion Control GmbH & Co.KG, 2013
The Trace Mode allows the use of the on-board RAM for the intermediate storage of certain collected data respectively can
be used to store profile data without host intervention. Both can be done simultaneously. This function is available in the
menu when clicking on "Options -> Trace Mode".
The upper windows shows a typical application how it may look like for diagnostic purposes. Before the on-board RAM can
be accessed it must be initialized. Buffer length, buffer start and the number of samples need to be setup. POSYS® boards
with Navigator chip set (POSYS® 700/800/800-B/900) is the lowest value for buffer start 512. The Magellan-based
POSYS® 1800/1900 can also have zero as a valid start value. The buffer length must not exceed the maximum amount of
physically available RAM.
In the window "Set/Up Trace Mode" further adjustments for the data acquisition can be done. Trace Mode and Trace Period
need to be specified. The Trace Mode determines if the data should be collected continuously or for a one-time period.
When choosing continuous the controller would wrap-around at the end of the buffer and start to store data at the
beginning of the specified buffer again. Previously stored data will be overwritten. If this data is needed for further use, it
must be read and stored externally before it is overwritten. When set to one-time the trace stops at the end of the buffer
or when the maximum number of samples were collected.
In the window "Trace Start" can be determined under which conditions a trace should start.
In the window "Trace Stop" you can optionally determine under which conditions a trace can be stopped.
In the window "Trace Variable" must be determined which data should be traced. If setting up less than four variables the
last variable must always be set to "None".
472
© POSYS Motion Control GmbH & Co.KG, 2013
A click on "Close" closes this window again.
Opening in the menu "Options -> Display Trace Data" following window appears. In this window stored data can be read
from the on-board RAM and displayed (button "Read Buffer"), with "Clear Display" the values in the window are cleared
(not from the on-board RAM, here they stay available), and with "Save Buffer" you can optionally save the collected data
to a file.
After a trace the stored data can be visualized in a new window. For this, click on the button "Graph" and following window
opens:
473
© POSYS Motion Control GmbH & Co.KG, 2013
C licking on the button "Zoom On" turns on the zoom function. Subsequently clicking into the area with the right mouse
button allows to zoom in to the selected area by pulling up a square which covers the area to enlarge. This will allow to
show details which were not visible before. A click on the button "Reset Zoom" returns you back to the previous screen. A
click on "Close" closes this window again.
In the menu (File - Edit) several additional functions are available to store or printout hardcopies of the graph.
-oSetup Menu for Sinusoidal Commutation and Microstepping Mode
Setup Menu for Sinus Commutation and Microstepping Mode
The menu "Commutation/Microstep" opens the following window. This window will only appear if the appropriate type of
card is used or if the active axis is setup for brushless servo motor with internal commutation or for microstepping mode.
474
© POSYS Motion Control GmbH & Co.KG, 2013
On the left side the type of motor command signal, number of phases aso. can be setup. On the lower left side you can
determine for which axis these values are valid. For additional information please go to the technical note Sinusoidal
C ommutation and Microstepping Motor Mode Setup.
-o-
475
© POSYS Motion Control GmbH & Co.KG, 2013
Index
-116 Bit DAC Motor Command Output 165
-550/50 PWM Motor Command Output 165
-AAC Induction Motor Control 196
Activity Status Register 135
AdjustActualPosition 271
Adjusting the Commutation Angle 185
Aktual Position Register 154
Amplifier Enable and DACOutputs ON/OFF
Analog Input 152
Analog Input Pinout Description; POSYS®
Analog Input Pinout Description; POSYS®
Analog Input Pinout Description; POSYS®
Analog Inputs 469
AtRest Indicator 192
AxisIn Input 151
AxisOut Output 151
463
19xx 66, 78, 55, , , 40
8xx-B 66, 78, 55, , , 40
9xx 66, 78, 55, , , 40
-BBiQuad Output Filter 125
BitReset 381
BitSet 382
BitTest 383
Breakpoint Actions 119
Breakpoint Examples 120
Breakpoint Triggers 118
Breakpoints 118, 399
Brushed Servo Version Pinout Description 72, 48, 63, 37
Brushed Servo Version Pinout Description 72, 48, 63, 37
Brushless Servo and Microstepping Motor Pinout Description 50
Brushless Servo/Microstepping Version Pinout Description , , 73
Brushless Servo/Microstepping Version Pinout Description , , 73
Bürstenlose Servo- und Mikroschrittmotor Pinout Beschreibung 50
-CCAN 2.0B 47, 71
CAN Event Notification 172
Changes to previous manuals 21
ClearInterrupt 211
ClearPositionError 230
Closed Loop and Open Loop Control Modes 129
Command Summary 196
Commanded and Actual Position Box 467
Commutation Error Detection 181
Commutation Parameters 180
Commutation Waveforms 179
CompareActivity 384
CompareEvent 385
CompareSignal 386
476
© POSYS Motion Control GmbH & Co.KG, 2013
Configuring the CAN 2.0B Interface 172
Control Flow Overview 96
Controller Area Network CAN2.0B 171
Controller Status Box 460
Coordinated Motion with POSYS® Contouring Library 391
Coordinated Moves using POSYS® 900 Motion Controller 395
-DDAC & PWM Motor Output (POSYS® Microstepping Mode only) 193
DACOutputs 231
Defining a Breakpoint; Overview 118
Description of Additional Program Functions 460
DetectPosysDevices 209
Digital Filtering 155
Digital Inputs & Outputs 397
Digital IO Specification POSYS® 7xx/8xx/8xx-B/9xx 396
DisableDPRam 288
Disabling and Enabling Position Loop Modules 98
Disclaimer, Safety Notice, Warranty 12
Dual Encoder Support 124
-EElectrical Diagrams for CAN Interface 173
Electronic Gear Profile 110
EnableDPRam 289
Enabling and Disabling Control Modules 97
Encoder Feedback 189
Encoder Pre-Scalar 186
Enter Data Box 466
Error Code 403
Event Status Register 134
Examples 443
Extension Port Connector J6 (POSYS® 700, ISA-Bus) 389
External Memory Commands 176
External Profile Mode 111
-FFilter Parameter Box 462
-GGetAbsoluteSSIPosition 272
GetActiveMotorCommand 300
GetActiveOperatingMode 311
GetActivityStatus 315
GetActivityStatus 341
GetActualVelocity 273
GetAmpEnable 232
GetAxis_In_Out_Home 343
GetCaptureValue 274
GetChecksum 363
GetCommandedAcceleration 319
GetCommandedPosition 320
GetCommandedVelocity 321
GetCurrentMotorCommand 300
GetDerivative 233
GetDriveStatus 344
GetEventStatus 345
GetHostIOError / GetInstructionError 364
477
© POSYS Motion Control GmbH & Co.KG, 2013
GetIntegral 234
GetInterruptAxis 212
GetPhaseCommand 219
GetPositionError 235
GetPositionLoopValue 236
GetProcessorStatus 365
GetSignalStatus 346
GetSSIVersion 275
GetTime 332
GetTraceCount 353
GetTraceStatus 354
GetVersion 366
GP CON Connector 79
-HHardReset/MCReset 367
Hardware & Driver Installation 27
Hardware & Treiber Installation: Rapid Driver 30
Hardware Signals; Overview 150
High Speed Position Capture 155
Host Interrupts 138
How to use this manual 199
-IImpressum 11
In-Motion Indicator 139
Incremental Encoder Input 154
Index Pulse Referencing 180
Initialization 459
InitializePhase 220
InitializePOSYS 206
Instruction Error 135
Introduction 457
Introduction 18xx/19xx 13
Introduction 7xx/8xx-B/9xx 14
IO700/800-1 80
IO700/800-2 83
-LLimit Switches 408
List of available commands 201
Loop Instructions 449
-MMain POSYS® GUI Window 458
Memory Configuration 174
Memory Page Pointer 174
Microstep Mode Setup 411
Microstep Motor Command Output Signals 195
Microstepping Waveform Generation 194
Mixed Motor Mode 413
Models 16
Motion Complete Indicator 140
Motion Error 139
MotionScript® Utility Functions 447
Motor Bias 129
Motor Command Control 195
Motor Command Output 163
478
© POSYS Motion Control GmbH & Co.KG, 2013
Motor Driver Configurations 197
Motor Mode 114
Motor Mode Configuration 47
Motor Output Configuration 186
Motor Output Mode Box 461
Motor Output Signal Interpretation 193
Multi-Turn Systems 156
Multiple Cards 414
MultiUpdate 312
-NNoOperation 370
-OOn-Board Memory Buffer 176
On-Board Memory Read 175
On-Board Memory Signal Decoding 175
On-Board Memory Write 175
On-Board RAM 405
OpenDevice/CloseDevice 207
OPTON CON 86
Other MotionScript® Functions 447
Output Limit 128
Output Torque Box 464
Overview 122, 134, 154, 167, 178, 189, 89
Overview; MotionScript® 439
-PParallel Communication Port 167
Parallel Device I/O 158
Parallel-word Device Interfacing 156
Parallel-word Position Input (option) 155
Parameter Buffering 116
PCI ScanForPOSYS 416
Peripheral Device Read 160
Peripheral Device Write 162
Phase Initialization 181
PID Loop Algorithm 122
Piezo (Ceramic) Motor Functions 131
PMW Decoding 193
PortInOutW 371
POSYSDriverXSetup 440
POSYS® 8xx-B/18xx 89
POSYS® 9xx/19xx 91
POSYS® Functions and Procedures 451
Power-On Defaults Box 461
Program Use 442
Programmer´s Info 421
Programming the Phase Initialization 184
Pulse & Direction Signal Generation 191
Pulse Generation Control 192
-RRead/WriteSSIFrequency 276
Read/WriteSSIRegister 277
Read/WriteSSIResolution 278
ReadAnalog 372
ReadBuffer 289
479
© POSYS Motion Control GmbH & Co.KG, 2013
ReadDPRamLong 291
Reading Position Loop Values 99
ReadIO 373
ReadIO / WriteIO 387
ReadPLD 374
RegisteredPosysDevices 210
Reserved Words 446
ResetEventStatus 347
ResetSSI 279
Resistor Networks for TTL or inverted Encoder Signals 430
RestoreOperatingMode 313
-SS-curve Point-to-Point Profile 107
Selecting Single Phase Output for the POSYS® 178
Serial Communication Port 167
Serial Interface 36, 62, 70, 46
Serial Interface 431
Set/GetAcceleration 322
Set/GetActualPosition 281
Set/GetActualPositionUnits 282
Set/GetAutoStopMode 239
Set/GetAuxiliaryEncoderSource 240
Set/GetAxisMode 333
Set/GetAxisOutMask 348
Set/GetAxisOutSource 350
Set/GetBiQuadCoefficient 241
Set/GetBreakpoint 213
Set/GetBreakpointUpdateMask 215
Set/GetBreakpointValue 216
Set/GetBufferFunction 292
Set/GetBufferLength 293
Set/GetBufferReadIndex 294
Set/GetBufferStart 295
Set/GetBufferWriteIndex 296
Set/GetCANMode 375
Set/GetCaptureSource 283
Set/GetCommutationMode 221
Set/GetDeceleration 323
Set/GetDerivativeTime 243
Set/GetDiagnosticPortMode 376
Set/GetEncoderModulus 284
Set/GetEncoderSource 285
Set/GetEncoderToStepRatio 286
Set/GetEventAction 314
Set/GetGearMaster 324
Set/GetGearRatio 325
Set/GetHoldingCurrent 302
Set/GetIntegrationLimit 244
Set/GetInterruptMask 218
Set/GetJerk 326
Set/GetKaff 245
Set/GetKd 246
Set/GetKi 247
Set/GetKout 248
Set/GetKp 249
Set/GetKvff 250
Set/GetLimitSwitchMode 334
Set/GetMotionCompleteMode 335
Set/GetMotorBias 303
480
© POSYS Motion Control GmbH & Co.KG, 2013
Set/GetMotorCommand 304
Set/GetMotorLimit 251
Set/GetMotorMode 305
Set/GetMotorType 306
Set/GetNumberPhases 222
Set/GetOperatingMode 315
Set/GetOutputMode 307
Set/GetPhaseAngle 223
Set/GetPhaseCorrectionMode 224
Set/GetPhaseCounts 225
Set/GetPhaseInitializeMode 226
Set/GetPhaseInitializeTime 227
Set/GetPhaseOffset 228
Set/GetPhasePrescale 229
Set/GetPosition 327
Set/GetPositionErrorLimit 252
Set/GetPositionLoop 253
Set/GetProfileKp 256
Set/GetProfileMode 328
Set/GetPWMFrequency 308
Set/GetpzIntLim 258
Set/GetpzIntLimStl 259
Set/GetpzKaff 260
Set/GetpzKd 261
Set/GetpzKdPeriod 262
Set/GetpzKi 263
Set/GetpzKp 264
Set/GetpzKvff 265
Set/GetpzKvff2 266
Set/GetpzOffsetNeg 267
Set/GetpzOffsetPos 267
Set/GetpzWindow 269
Set/GetpzWindow2 270
Set/GetSampleTime 336
Set/GetSerialPortMode 377
Set/GetSettleTime 338
Set/GetSettleWindow 339
Set/GetSignalSense 352
Set/GetStartVelocity 329
Set/GetStepRange 309
Set/GetStopMode 330
Set/GetSynchronizationMode 378
Set/GetTraceMode 355
Set/GetTracePeriod 356
Set/GetTraceStart 357
Set/GetTraceStop 359
Set/GetTraceVariable 361
Set/GetTrackingWindow 340
Set/GetUpdateMask 317
Set/GetVelocity 331
SetActualToAbsolutePosition 280
SetAmpDisable 237
SetAmpEnable 238
SetEventAction Processing 148
SetMotionCompleteMode 451
SetStop Command 113
Setting the Cycle Time 114
Settled Indikator 141
Setup Menu for Sinusoidal Commutation and Microstepping Motor Mode 474
SetWatchDog 379
481
© POSYS Motion Control GmbH & Co.KG, 2013
Sign/Magnitude PWM Output 164
Signal Sense 465
Signal Sense Mask 137
Signal Status Register 136
Single Port RAM / Dual Port RAM 471
Smoothing Factor 103
SSI Feedback 468
Stall Detection 190, 390
Status Activity/Event/Signal 464
Status Read Operation 433
Stepper Motor Pinout Description , , 38, 64, 76, 53
SYNC IO , , 70, 46
Synchronization of Multple Cards (POSYS® 8xx-B/9xx w/ Sync-Feature and 18xx/19xx) 435
System Overview 15
-TThe SYNC IO - Multiple Controller Synchronization 152
Trace Capture 142
Trace Mode 471
Tracking Window 147
Trajectories, profiles, and parameters 100
Trajectory Control Units 189
Trajectory Parameter Representation 100
Trajectory Point-to-Point Profile 101
Travel Limit Switches 150
-UUpdate 318
Update Periods Box 464
Usage of the On-Board Dual Port RAM with POSYS® 1800 55
User Settable components , , 33, 60, 68, 41
-VVariables 445
Velocity Contouring Profile 109
Velocity, Acceleration and Jerk Calculation 437
Versions 18xx 41
Versions 19xx 68
Versions 9xx 60
-WWriteBuffer 297
WriteDPRAMLong 298
WriteIO 380
Writing MotionScript® Functions 450
482
© POSYS Motion Control GmbH & Co.KG, 2013
www.halbeck.com
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement