Handbuch für POSYS® Positioniersteuerungen

Handbuch für POSYS® Positioniersteuerungen
© servo-Halbeck GmbH & Co.KG, 2006
Motion Controller for
ISA-, PCI-Bus,
PC/104 Embedded Systems
and
Standalone Operation
User and Programmer's Manual
for
POSYS® 7xx/8xx/8xx-B/9xx/18xx/19xx
servo-Halbeck GmbH & Co.KG
Hinterhaslach 8 • 91238 Offenhausen
Telefon +49 9158 1612 • Fax +49 9158 1642
E-mail: [email protected]
Url: www.servo-halbeck.com
© servo-Halbeck GmbH & Co.KG, 2006
1
© servo-Halbeck GmbH & Co.KG, 2006
2
© servo-Halbeck GmbH & Co.KG, 2006
Table of Contents
User's Manual
Impressum
Disclaimer, Safety Notice, W arranty
Introduction POSYS® 18xx/19xx
Introduction POSYS® 7xx/8xx/8xx-B/9xx
System Overview
Models
Changes to previous manuals
Hardware & Driver Installation
Hardware & Driver Installation
POSYS® Versions Specifications
POSYS® 7xx
Versions 7xx
User settable Components; POSYS® 7xx
Pinout Description Brushed Servo Version POSYS® 70x
Stepper Version Pinout Description
Analog Input Pinout Description; POSYS® 700
POSYS® 8xx
Versions 8xx
User settable components; POSYS® 8xx
Servo Pinout Description
Stepper Version Pinout Description
Analog Input Pinout Description; POSYS® 800
POSYS® 8xx-B
Versions 8xx-B
User settable components; POSYS® 8xx-B
SYNC IO
Serial Port
Brushed Servo Mode Pinout Description
Brushless Servo/Microstepping 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
SYNC IO
Serial Port
Brushed Servo Mode Pinout Description
Brushless Servo/Microstepping Mode Pinout Description
Stepper Version Pinout Description
Analog Input Pinout Description; POSYS® 900
POSYS® 19xx
Versions 19xx
User settable components; POSYS® 19xx
SYNC IO
3
11
12
13
14
15
16
18
25
29
30
34
35
35
35
38
39
41
43
43
43
48
49
50
52
52
54
57
57
58
60
62
64
65
65
66
72
72
73
73
75
77
79
81
82
87
87
88
90
91
92
93
95
98
99
99
100
101
© servo-Halbeck GmbH & Co.KG, 2006
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
SSI800/900 Interface Module
SSI Description
SSI Specifications
SSI800/900; Installation
Default Parameters
Software Requirements
Connections to the SSI 800/900
Program Considerations
List of supported Absolute Encoders w/ SSI Interface
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
Closed Loop and Open Loop Control Modes
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 W indow
Hardware Signals
Overview; Hardware Signals
Travel Limit Switches
4
102
103
103
105
106
108
111
112
112
112
113
114
114
116
117
120
123
123
123
124
127
131
133
134
136
138
139
139
142
142
144
144
144
144
146
146
149
149
149
151
152
155
157
157
157
158
158
160
160
162
162
163
163
165
166
167
172
173
173
173
© servo-Halbeck GmbH & Co.KG, 2006
AxisOut Output
AxisIn Input
Analog Input
The SYNC IO - Multiple Controller Synchronization
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 W rite
Motor Command Output
Sign/Magnitude PW M
50/50 PW M 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 & PW M Motor Output (POSYS® Microstepping Mode only)
Motor Output Signal Interpretation
PMW Decoding
5
174
175
175
176
177
177
177
177
178
178
178
179
180
181
183
186
188
189
190
191
192
192
192
192
197
198
199
200
201
201
202
202
202
203
203
204
206
206
206
207
208
208
209
210
212
214
215
216
219
219
219
219
220
221
222
223
224
224
224
224
© servo-Halbeck GmbH & Co.KG, 2006
Microstepping W aveform Generation
Microstepping W aveforms
Motor Command Control
AC Induction Motor Control
Command Summary
Motor Drive Configurations
GP CON Connector
GP CON Connector
Interconnect Module
IO700/800-1
IO700/800-2
OPTON CON
Connection Overview - Amplifiers
Overview; Connection Summary - Motor Amplifiers
POSYS® 7xx
POSYS® 8xx/8xx-B/18xx
POSYS® 9xx/19xx; Connections Summary - Motor Amplifiers
Command Overview - ReadIO/WriteIO
ReadIO / W riteIO
Environmental and Electrical Ratings
Environmental and Electrical Ratings
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/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
SetAmpDisable
SetAmpEnable
Set/GetAutoStopMode
Set/GetBiQuadCofficient
Set/GetDerivativeTime
6
225
226
227
227
227
228
230
230
231
231
234
238
242
242
242
243
245
250
250
253
253
256
256
257
258
262
263
264
266
267
268
268
269
270
272
274
276
276
277
278
279
280
281
282
284
285
286
287
288
288
289
290
291
292
293
294
295
296
297
299
© servo-Halbeck GmbH & Co.KG, 2006
Set/GetIntegrationLimit
Set/GetKaff
Set/GetKd
Set/GetKi
Set/GetKout
Set/GetKp
Set/GetKvff
Set/GetMotorBias
Set/GetMotorLimit
Set/GetPositionErrorLimit
Set/GetProfileKp
Encoder
AdjustActualPosition
GetAbsoluteSSIPosition
GetActualVelocity
GetCaptureValue
GetSSIVersion
Read/W riteSSIFrequency
Read/W riteSSIRegister
Read/W riteSSIResolution
ResetSSI
SetActualToAbsolutePosition
Set/GetActualPosition
Set/GetActualPositionUnits
Set/GetAuxiliaryEncoderSource
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
W riteBuffer
W riteDPRAMLong
Motor Output
GetCurrentMotorCommand
Set/GetMotorCommand
Set/GetMotorMode
Set/GetMotorType
Set/GetOutputMode
Set/GetPWMFrequency
Set/GetStepRange
Profile Generation
GetCommandedAcceleration
GetCommandedPosition
GetCommandedVelocity
MultiUpdate
Set/GetAcceleration
Set/GetDeceleration
Set/GetGearMaster
Set/GetGearRatio
Set/GetJerk
Set/GetPosition
300
301
302
303
304
305
306
307
308
309
310
311
311
312
313
314
315
316
317
318
319
320
321
323
324
325
326
327
328
329
330
331
331
333
334
335
336
337
338
339
340
341
341
342
343
344
346
347
348
349
349
350
351
352
353
355
356
357
358
359
7
© servo-Halbeck GmbH & Co.KG, 2006
Set/GetProfileMode
Set/GetStartVelocity
Set/GetStopMode
Set/GetVelocity
Update
Servo Loop Control
GetTime
Set/GetAxisMode
Set/GetLimitSwitchMode
Set/GetMotionCompleteMode
Set/GetSampleTime
Set/GetSettleTime
Set/GetSettleW indow
Set/GetTrackingWindow
Status Register and AxisOut Indicator
GetActivityStatus
GetAxis_In_Out_Home
GetEventStatus
GetSignalStatus
ResetEventStatus
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
SetW atchDog
W riteIO
Additional MotionScript® Functions
BitReset
BitSet
BitTest
CompareActivity
CompareEvent
CompareSignal
FAQ
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
8
360
361
362
363
364
365
365
366
367
368
369
371
372
373
374
374
377
378
380
382
383
385
387
387
388
389
390
391
394
397
399
399
400
401
402
403
406
407
408
409
410
411
412
413
415
416
417
418
418
419
420
421
422
423
424
424
426
427
432
434
© servo-Halbeck GmbH & Co.KG, 2006
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
Synchronization of Multple Cards (POSYS® 8xx-B/9xx w/ Sync-Feature and
18xx/19xx)
Velocity, Acceleration and Jerk Calculation
MotionScript®
Overview; MotionScript®
Hardware & Driver Installation
POSYSDriverXSetup
Program Use
Examples
Variables
Reserved Words
MotionScript® Utility Functions
Other MotionScript® Functions
Loop Instructions
W riting MotionScript® Functions
POSYS® Functions and Procedures
POSYS® GUI for Windows 98/ME/2000/XP
Introduction
The POSYS® GUI Main W indow
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
9
435
438
443
446
449
452
454
455
457
462
472
473
475
477
479
479
480
482
484
486
488
490
490
491
492
494
494
502
502
503
504
505
506
506
506
507
508
509
509
509
510
511
513
513
514
516
517
519
© servo-Halbeck GmbH & Co.KG, 2006
10
© servo-Halbeck GmbH & Co.KG, 2006
User's Manual
11
© servo-Halbeck GmbH & Co.KG, 2006
Impressum
Manual
for
POSYS® Motion Controller
Series
7xx/8xx/8xx-B/9xx/18xx/19xx
servo-Halbeck GmbH & Co.KG
Hinterhaslach 8
D-91238 Offenhausen
Tel: +49 9158 1612
Fax: +49 9158 1642
E-mail: [email protected]
Url: http://www.servo-halbeck.com
Geschäftsführer: Reinhold Halbeck
HRA: 12622 Amtsgericht Nürnberg
Revision: 2.51
Date: 11.04.2006
-o-
12
© servo-Halbeck GmbH & Co.KG, 2006
Disclaimer, Safety Notice, Warranty
Warranty
servo-Halbeck warrants performance to its products to the specifications applicable at the time of
sale in accordance with servo-Halbeck´s standard warranty. Testing and other quality control
techniques are utilized to the extent servo-Halbeck deems necessary to support this warranty.
Specific testing of all parameters of each device is not necessarily performed, except those
mandated by government requirements.
servo-Halbeck 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
Certain 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 servo-Halbeck 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
servo-Halbeck 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
servo-Halbeck covering or relating to any combination, machine or process in which such products
or services might be or are used. servo-Halbeck's publication of information regarding any third
party's products or services does not constitute servo-Halbeck's approval, warranty or
endorsement thereof.
-o-
13
© servo-Halbeck GmbH & Co.KG, 2006
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 PW M, 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.
Optional software packages for G-code translation including circular and linear interpolation for
continuous moves further enhance this motion controller. A tuning 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 the
TunePOSYS® software lets the user find the right filter by observing the servo systems response
on the computer's monitor.
-o-
14
© servo-Halbeck GmbH & Co.KG, 2006
Introduction POSYS® 7xx/8xx/8xx-B/9xx
Introduction
The POSYS® 7xx/8xx/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 PCI-Bus (POSYS®
9xx) card plug directly into an empty slot of an IBM-PC or compatible computer and the POSYS®
8xx is a fully compliant (100%) PC/104 embedded systems module. Each card is available in
typical configurations for 1, 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 PW M, 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 µsec sample rate per axis.
The POSYS® 7xx/8xx/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.
Optional software packages for G-code translation including circular and linear interpolation for
continuous moves further enhance this motion controller. A tuning 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 the
TunePOSYS® software lets the user find the right filter by observing the servo systems response
on the computer`s monitor.
-o-
15
© servo-Halbeck GmbH & Co.KG, 2006
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 PW M or DAC
signals.
For the stepping motor the output of the trajectory generator is converted to pulse and direction
signals and then output accordingly.
Communication 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.
Communication 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
16
© servo-Halbeck GmbH & Co.KG, 2006
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-
17
© servo-Halbeck GmbH & Co.KG, 2006
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
Stepper Motor Card
1
1921
1901
1951
2
1922
1902
1952
3
1923
1903
1953
4
1924
1904
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
Stepper Motor Card
1
1821
1801
1851
2
1822
1802
1852
3
1823
1803
1853
4
1824
1804
1854
Bus
PC/104
# axes/motor
Models equipped with PMD Navigator Chip Set*
Bus
ISA
PC/104
# axes/Motor
Brushed
Servo
Stepper
Brushed
Servo
w/wo SYNC IO
Brushless
Servo
w/wo SYNC IO
Stepper
Combination
of Brushed
and Brushless
Servo and
microstepping
w/wo SYNC IO
1
701
751
801/811
821/831
851
n/a
2
702
752
802/812
822/832
852
872/882
4
704
754
804/814
824/834
854
874/884
18
© servo-Halbeck GmbH & Co.KG, 2006
Bus
PCI
# axes/Motor
Brushed
Servo
w/wo SYNC IO
Brushless
Servo
w/wo SYNC IO
Stepper
Combination of Brushed
and Brushless Servo and
microstepping
w/wo SYNC IO
1
901/911
921/931
951
n/a
2
902/912
922/932
952
972/982
4
904/914
924/934
954
974/984
*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:
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
PW M
PW M 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
PW M 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®
19
© servo-Halbeck GmbH & Co.KG, 2006
70x//80x/80x-B/81x-B/87x-B/88x-B/90x/91x/97x/98x/180x/190x/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® 82x-B/83x-B/87x-B/88x-B/92x/93x/97x/98x/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/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 PW M or DAC-compatible motor
command signal to directly drive the windings of a stepping motor. This feature is only available
for the versions POSYS® 84x-B/86x-B/87x-B/88x-B/94x/96x/97x/98x/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.
Customized Cards
Customization of the Multiple Motor Motion Controller Card is possible to accomplish customer´s
needs for a high-end 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
# of axes
POSYS® 182x/192x
POSYS® 180x/190x
POSYS®
185x/195x
1, 2, 3, 4
1, 2, 3, 4
1, 2, 3, 4
20
© servo-Halbeck GmbH & Co.KG, 2006
Specification
POSYS® 182x/192x
POSYS® 180x/190x
POSYS®
185x/195x
Servo (incl. internal
commutation for
DC brushless),
Microstepping,
Pulse & Direction
Servo (w/o internal
commutation for
DC brushless),
Pulse & Direction
Pulse & Direction
PW M,
DAC,
Pulse & Direction
PW M,
DAC,
Pulse & Direction
Pulse & Direction
Parallel communication
+
+
+
Serial communication
+
+
+
CAN 2.0B communication
+
+
+
Incremental encoder input
+
+
+
Parallel word device input
+
+
+
Index & Home input
+
+
+
Position capture
+
+
+
Directional limit switches
+
+
+
PW M 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)
Supported motor versions
Output format
21
© servo-Halbeck GmbH & Co.KG, 2006
Specification
POSYS® 182x/192x
POSYS® 180x/190x
POSYS®
185x/195x
Analog input (8x)
+
+
+
Programmable bit output
+
+
+
Software-invertible signals
+
+
+
User-defined I/O
+
+
+
On-board RAM support
+
(single port RAM =
option;
dual port RAM =
default)
+
(single port RAM =
default;
dual port RAM =
option)
+
(single port RAM
= default;
dual port RAM =
option)
Multiple card
synchronization support
+
(except if axis is being
used in stepper mode)
+
(except if axis is being
used in stepper mode)
W atchdog Timer
+
+
+
Interrupt
+
+
+
POSYS 7xx/8xx/8xx-B/9xx
Available configurations (ISA,
PC/104, PCI; Servo or Stepper)
4 Axes:
ISA:
PC/104:
PCI:
2 Axes:
ISA:
PC/104:
PCI:
1 Axis:
ISA:
PC/104:
PCI:
704, 754
804/804-B, 814-B, 824-B, 834-B, 854/854-B,
874-B, 884-B
904, 914, 924, 934, 954, 974, 984
702, 752
802/802-B, 812-B, 822-B, 832-B, 852/852-B,
872-B, 882-B
902, 912, 922, 932, 952, 972, 982
701, 751
801/801-B, 811-B, 821-B, 831-B, 851/851-B
901, 911, 921, 931, 951
Operation modes
Closed loop (torque demand control; PID controlled)
Open loop (user-specified, programmable register)
Communication 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 negative)
-32,768 to +32,767 counts/sample² with a resolution of
1/65,536 counts/sample²
Jerk range
0 to ½ counts/sample³, with a resolution of
1/4,294,967,296 counts/sample³
22
© servo-Halbeck GmbH & Co.KG, 2006
Profile modes
S-curve point-to-point ramp (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 W indow (allows setting of flags if an axis
exceeds a defined programmed positioning window for a
defined time after end of motion
Output signals
Servo:
Max. Encoder rate
Incremental (up to 4,98 Mhz.); OPTION: Parallel (up to
160 Mhz.)
Parallel encoder word size
16 Bit OPTION
Parallel encoder read frequency
20 KHz (reads all axes all 50 µsec) OPTION
Servo loop update rate
100 µsec nominal (exact time is 102,4 µsec) per
activated Axis (Stepper and brushed Servo versions)
150 µsec. nominal (exact time is 153.6 µsec.) per
activated Axis (Microstepping and brushless Servo
versions)
Limit Switches
2 per Axis: 1 for each direction
Position Capture 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)
DAC (16 Bit) ±10V output
PWM (10 Bit Resolution @ 20 Khz)
Stepper:
Pulse & Direction
Microstepping: DAC (16 Bit) ±10V output
PWM (10 Bit Resolution @ 20 Khz)
23
© servo-Halbeck GmbH & Co.KG, 2006
Analog input
8 x 10-Bit analog inputs
Trace Modes
once
continuously
Max. # of Trace variables usable at
the same time
4
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 Check
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-
24
© servo-Halbeck GmbH & Co.KG, 2006
Changes to previous manuals
Changes to previous manuals
W ith 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 there change.
25.8.2004
ClearInterrupt
Argument AXIS added for use with POSYS®
when used in CAN 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 NOTICE: W arning Note added
26.8.2004
Set/GetCommutationMode
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/GetSettleW indow
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 for POSYS®
800-B
W ith the exception of the jumper selection for
the interrupt 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
W ith the exception of the jumper selection for
changed for POSYS® 1800 the interrupt 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, CAN Interface,
Motor Mode Jumpers and SYNC I/O were added
and corrected.
25
© servo-Halbeck GmbH & Co.KG, 2006
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
CAN interface (POSYS®
1800, 1900)
In the sections describing the usage with CAN
the explanation was CANOpen. This was wrong
and has been corrected to CAN 2.0B.
4.11.2004
Dimensions of POSYS®
1800
added
4.11.2004
Memory base address
setting for POSYS® 1800
when equipped with dual
port RAM
The dip switch (SW 2) base address setting for
the POSYS® 18xx when equipped with dual
port RAM was added
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, W arranty and Disclaimer added
1.4.2005
Program description for
the GUI version of the
POSYS® test program for
W indows
added
4.11.2004
Serial and CAN 2.0B
Setup and connection information added for
POSYS® 8xx-B/18xx/9xx/19xx
27.1.2005
Changed jumper
description for motor
configuration (POSYS
18xx)
The jumper configuration was referring to the
wrong jumpers. This was corrected. Instead of
JP2 for stepper 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
26
© servo-Halbeck GmbH & Co.KG, 2006
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 POSYS® 700/800/
800-B/1800
Exact information of placement of jumpers for
IRQ setting added
10.5.2005
User settable components
for POSYS® 1800
Descrition for usage of POSYS® 1800 with Dual
Port RAM on the ISA-Bus added.
17.6.2005
Dual Port RAM Mode
activation/deactivation
The dual Port RAM on the POSYS® 1800 needs
to be activated or can be deactivated before
access can take place
17.6.2005
List of all POSYS®
commands
A list of all POSYS® commands is now also
available right at the beginning of the
Prgrammer's manual
5.7.2005: Change 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 (W inDriver) which is now the actual driver for Windows
and Linux based operating systems.
5.7.2005
Change of all POSYS®
cards to the same driver
(W inDriver)
All POSYS® motion controllers now use the
same driver module designed for the bus (ISA
or PCI) and operating system (W indows
98/2000/XP and Linux) they are used on.
5.7.2005
Change of card
initialization
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
PCI-based cards is now also the same (except
parameters) for the ISA-based cards. For details
please refer to the command
OpenDevice/CloseDevice
5.7.2005
Commands added for
access to Dual Port RAM
Following commands were added for easier
access to Dual Port RAM (enable, disable, read
and write)
26.7.2005
Command
Set/GetProfileKp added
The command Set/GetProfileKp is 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/CloseDevice
The english manual was not completed correctly
in the version 2.1 from 27.07.2005
12.10.2005
Analog Inputs
Corrections made to definition (reference
voltage) and pinout positions of analog inputs.
see various models for details.
27
© servo-Halbeck GmbH & Co.KG, 2006
28.10.2005
Sample Description of
setting of DPRAM address
for POSYS® 1800
corrected
The sample setting of the memory address
setting for the DPRAM of the POSYS® 1800 was
corrected. It was showing incorrectly the
opposite setting for the address D0000. This
effected only the english manual.
09.11.2005
Usage of On-Board Dual
Port RAM with POSYS®
1800
Some information added for use of DPRAM with
POSYS® 1800 PC/104 motion controllers
09.11.2005
Single Port Ram / Dual
Port RAM
POSYS® GUI program for POSYS® 1800
translation finalized
07.04.2006
minor formatting
adjustments
just 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 PCI-Bus based POSYS®
and PC104-Bus based POSYS® added
-o-
28
© servo-Halbeck GmbH & Co.KG, 2006
Hardware & Driver Installation
29
© servo-Halbeck GmbH & Co.KG, 2006
Hardware & Driver Installation
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. PCI 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 (W indows 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
POSYS900W D.INF
POSYS1900W D.INF
W INDRVR6.SYS
W INDRVR6.INF
WDREG16.EXE
WDREG.EXE
W DREG_GUI.EXE
W INDRVR6.VXD
W D_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 W indows 95/98/ME
for W indows NT/2000/XP
for W indows (all versions)
for W indows 95/98/ME
for W indows (all versions)
for W indows (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 /W D Driver
Setup directory and run the batch-file "registerOCX.bat". Depending on the type of W indows
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 m akefile
is supplied too. It is also mandatory to have the kernel sources and the GNU C/C++ compiler
installed.
30
© servo-Halbeck GmbH & Co.KG, 2006
Driver Installation:
open a terminal window and login as root or with su passwd.
decompress the zip-file to the/usr/local directory. A new directory will be made with name
/WinDriver.
CD to the directory/usr/local/WinDriver/redistand check if the files configure, setup_inst_dir
and wdreg are all executable. If not execute the commandchm od file 755
afterwards execute sh ./configure or just ./configure. The makefile for the compilation of the
driver file is made.
If no errors occurred then executem ake and m ake install to install the driver.
The driver should finally be loaded which can be checked by executinglsm od. A file named
windrvr6 should be listed within all the loaded modules
If everything ran well until now then the driver was successfully loaded and communication
with the POSYS® can take place
In the boot script a new entry should be made to load the driver automatically when booting
the computer
Software I nstallation:
Decompress the ZIP-fileDistribute to the subdirectory /usr/local/POSYS.
You will see additional subdirectories now listed as following:
/source
/test1900
/test900
/include
/object
/m odule
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 m ake and m ake 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 m ake and m ake install to recompile a version which can run on your computer.
The subdirectory /include contains all include files.
The subdirectory/object contains all object files
ISA/PC-104 Bus
Windows
Go to the directory /W D Driver Setup and run the program W DREG_GUI.EXE as required for your
W indows operating system (read the README.TXT). This will install all of the required driver
files and driver DLLs into the proper directories of W indows 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.
31
© servo-Halbeck GmbH & Co.KG, 2006
README.TXT
W INDRVR6.SYS
W INDRVR6.INF
WDREG16.EXE
WDREG.EXE
W DREG_GUI.EXE
W INDRVR6.VXD
W D_UTILS.DLL
Important Installation Information for installing on different
Windows operating systems. PLEASE READ!!!
Driver
Inf-file
for W indows 95/98/ME
for W indows NT/2000/XP
for W indows (all versions)
for W indows 95/98/ME
for W indows (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 /W D Driver Setup directory and run the batch-file "registerOCX.bat".
Depending on the type of W indows 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 W inDriverwindrvr6 module. This requires root 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.
Copy all files to the directory /usr/local.
Make sure that the kernel sources and the gnu (g++) compiler are installed on the target
system.
Change to the folder WinDriver/redist in the directory usr/local/.
Open a terminal window and execute the command ./configure.
If configure finishes without reporting an error execute the command m ake install.
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.
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
32
© servo-Halbeck GmbH & Co.KG, 2006
displayed and the program will be terminated.
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-
33
© servo-Halbeck GmbH & Co.KG, 2006
POSYS® Versions Specifications
34
© servo-Halbeck GmbH & Co.KG, 2006
POSYS® 7xx
Versions 7xx
List of available versions
POSYS® 70x for brushed servo motors
The POSYS® 70x can be used as well for brushless servo motors when the appropriate type of
amplifier is used.
Model
# of Axes
POSYS® 701
1
POSYS® 702
2
POSYS® 704
4
POSYS® 75x for stepper motors
The POSYS® 75x can be used as well for microstepping when the appropriate type of driver is
used.
Model
# of Axes
POSYS® 751
1
POSYS® 752
2
POSYS® 754
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: 704-I).
-oUser settable Components; POSYS® 7xx
User settable Components; POSYS® 7xx
The figure below shows the locations of the principal components of the POSYS® 7xx cards. The
component side of the board is shown, with the ISA-slot connector at the bottom. 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
Dip switch and jumper settings
35
© servo-Halbeck GmbH & Co.KG, 2006
picture shows: POSYS® 7xx
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.
Dip Switches and Jumper Settings
The POSYS® 7xx have dip switches for address settings and jumpers for other certain purposes.
These settings are described in the following tables:
36
© servo-Halbeck GmbH & Co.KG, 2006
Item
How to set
Description
SW1
S1-1
S1-2
S1-3
S1-4
S1-5
S1-6
S1-7
S1-8
Switch SW 1 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:
8 (hex)
10 (hex)
20 (hex)
40 (hex)
80 (hex)
100 (hex)
200 (hex)
400 (hex)
300 (hex) is the default
base address
S1-1
S1-2
S1-3
S1-4
S1-5
S1-6
S1-7
S1-8
on
on
on
off
on
off
off
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.
Jumpers 13, 14,
15
Not jumpered
No analog inputs
this is the default setting
All jumpered 1-2
W hen the analog reference voltage will be
derived internally from the card (giving a 0-2.5V
input range) these jumpers should all be set
1-2.
13 jumpered 1-2
W hen the high analog reference voltage will be
provided externally, jumper 13 should be set
1-2, and jumpers 14 and 15 should be set 2-3.
14, 15 jumpered 2-3
All jumpered 2-3
W hen the low analog reference voltage will be
provided externally, jumper 13, 14, and 15
should be set 2-3.
37
© servo-Halbeck GmbH & Co.KG, 2006
Item
How to set
Description
Jumper 17
Connect none,
Jumper number 17 selects the specific IRQ
signal that will be active on the ISA bus.
Connect 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. Check 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.
no connection is default
J17 Designation
ISA IRQ No.
0
1
2
3
4
5
6
7
3
5
7
10
11
12
14
15
-oPinout Description Brushed Servo Version POSYS® 70x
Pinout description brushed servo or brushless servo w/
external commutation
POSYS® 70x
Pin
Connection Description
Pin
Connection Description
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
BPWM1
PWM magnitude (X)
64
BPWM3
15
BPWMS1
PWM sign (X)
65
BPWMS3
16
AXIN1
User programmable input (X)
66
AXIN3
38
PWM magnitude (Z)
PWM sign (Z)
User programmable input (Z)
© servo-Halbeck GmbH & Co.KG, 2006
Pin
Connection Description
Pin
Connection Description
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)
PWM magnitude (Y)
81
BPWM4
PWM sign (Y)
82
BPWMS4
31
BPWM2
32
BPWMS2
PWM magnitude (W)
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
Ainput2
analog input channel (1)
48
Ainput3
analog input channel (2)
98
Ainput4
analog input channel (3)
49
Ainput5
analog input channel (4)
99
Ainput6
analog input channel (5)
50
Ainput7
analog input channel (6)
100
Ainput8
analog input channel (7)
PWM sign (W)
Amplifier enable (Z) or user
programmable output
-oStepper Version Pinout Description
Pinout description stepper/microstepping* version
POSYS® 75x
Pin
1
Connection Description
A1+
C hannel A+ encoder signal (X)
Pin
51
39
Connection Description
A3+
C hannel A+ encoder signal (Z)
© servo-Halbeck GmbH & Co.KG, 2006
Pin
Connection Description
Pin
Connection Description
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
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
32
DIR2
Direction (Y)
82
DIR4
User programmable input (Y)
83
AXIN4
At Rest (Y)
84
ATREST4
User programmable input (Z)
At Rest (Z)
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)
40
User programmable input (W)
At Rest (W)
Amplifier enable (Z) or user
programmable output
© servo-Halbeck GmbH & Co.KG, 2006
Pin
Connection Description
Pin
Connection Description
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
Ainput2
analog input channel (1)
48
Ainput3
analog input channel (2)
98
Ainput4
analog input channel (3)
49
Ainput5
analog input channel (4)
99
Ainput6
analog input channel (5)
50
Ainput7
analog input channel (6)
100
Ainput8
analog input channel (7)
*Microstepping with appropriate type driver
-oAnalog Input Pinout Description; POSYS® 700
Analog Input Pinout description (only valid for POSYS®
700/800)
J9 Pin-Out
Description
Explanation
1
Analog Input 1
Analog input for channel (0)
2
Analog Input 2
Analog input for channel (1)
3
Analog Input 3
Analog input for channel (2)
4
Analog Input 4
Analog input for channel (3)
5
Analog Input 5
Analog input for channel (4)
6
Analog Input 6
Analog input for channel (5)
7
Analog Input 7
Analog input for channel (6)
8
Analog Input 8
Analog input for channel (7)
13
EXTANHI
External reference high voltage input
Jumper JP15: 2-3 for external, 1-2 uses internal Analog GND
14
EXTANLO
External reference low voltage input
Jumper JP13: 2-3 for external, 1-2 uses internal Analog GND
15
ANGND
Analog GND
16
ANGND
Analog GND
17
EXTANVCC
Analog VCC, 5VDC
Jumper JP14: 2-3 for external analog VCC, 1-2 uses internal
analog VCC (5VDC)
Example: Using only internal settings set jumpers JP13, JP14 and JP15 all to 1-2.
These settings provide the internal analog GND, internal analog VCC at 5V and an internal
reference voltage of 2.5VDC with a very close tolerance.
Using these settings the analog input voltage for the 8 channels can range from 0-2.5 VDC, the
resolution is 10 bits.
If an analog input range of 0-5 VDC is desired, then attach an external voltage supply to
EXTANHI (Pin 14) <- max. 5VDC, external
ANGND (Pin 15/16) <- GND, external
41
© servo-Halbeck GmbH & Co.KG, 2006
Set the jumper of JP15 to position 2-3.
To read the analog input voltage use the Posys700.dll function
ReadAnalog(channel)
Channel = 0-7 for the 8 inputs.
To display the returned value in volts, use the following conversion:
AnalogInputVoltage = (ReadAnalog(channel) / 65536) * 2.5
This scales the returned value to the correct voltage. If the reference voltage is other than 2.5,
then substitute that voltage with the chosen reference voltage.
-o-
42
© servo-Halbeck GmbH & Co.KG, 2006
POSYS® 8xx
Versions 8xx
List of available versions
POSYS® 80x for brushed servo motors
The POSYS® 80x can be used as well for brushless servo motors when the appropriate type of
amplifier is used.
Model
# of Axes
POSYS® 801
1
POSYS® 802
2
POSYS® 804
4
POSYS® 85x for stepper motors
The POSYS® 85x can be used as well for microstepping when the appropriate type of driver is
used.
Model
# of Axes
POSYS® 851
1
POSYS® 852
2
POSYS® 854
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-I).
-oUser settable components; POSYS® 8xx
User settable components; POSYS® 8xx
The figures below show the locations of the principal components of the POSYS® 8xx cards. The
component side of the board is shown, with the PC/104 connector at the bottom and the backside
at the top.
The important user-accessible components of the card are:
Resistor Packs RS1, RS2, and RS3 set the Encoder termination
Dip switch and jumper settings
43
© servo-Halbeck GmbH & Co.KG, 2006
44
© servo-Halbeck GmbH & Co.KG, 2006
picture shows: POSYS® 8xx
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.
Dip Switches and Jumper Settings
The POSYS® 8xx have dip switches for address settings and jumpers for other certain purposes.
These settings are described in the following tables:
45
© servo-Halbeck GmbH & Co.KG, 2006
Item
How to set
Description
SW1
S1-1
S1-2
S1-3
S1-4
S1-5
S1-6
S1-7
S1-8
Switch SW 1 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:
8 (hex)
10 (hex)
20 (hex)
40 (hex)
80 (hex)
100 (hex)
200 (hex)
400 (hex)
300 (hex) is the default
base address (as shown
on the picture)
S1-1
S1-2
S1-3
S1-4
S1-5
S1-6
S1-7
S1-8
on
on
on
off
on
off
off
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.
Jumpers 13, 14,
15
Not jumpered
No analog inputs
this is the default setting
All jumpered 1-2
W hen the analog reference voltage will be
derived internally from the card (giving a 0-2.5V
input range) these jumpers should all be set
1-2.
13 jumpered 1-2
W hen the high analog reference voltage will be
provided externally, jumper 13 should be set
1-2, and jumpers 14 and 15 should be set 2-3.
14, 15 jumpered 2-3
All jumpered 2-3
W hen the low analog reference voltage will be
provided externally, jumper 13, 14, and 15
should be set 2-3.
46
© servo-Halbeck GmbH & Co.KG, 2006
Item
How to set
Description
Jumper 17
Connect none,
Jumper number 17 selects the specific IRQ
signal that will be active on the ISA bus.
Connect 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. Check 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.
no connection is default
J17 Designation
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
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-
47
© servo-Halbeck GmbH & Co.KG, 2006
Pin No.
Description
Pin No.
Description
37
WE-
38
VCC
39
R/W
40
PS-o-
Servo Pinout Description
Pinout description brushed servo brushless servo w/ external
commutation
POSYS® 80x: Pin 1-50 = J7, Pin 51-100 = J1)
Pin
Connection Description
Pin
Connection Description
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)
PWM magnitude (X)
64
BPWM3
PWM sign (X)
65
BPWMS3
14
BPWM1
15
BPWMS1
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)
48
PWM magnitude (Z)
PWM sign (Z)
© servo-Halbeck GmbH & Co.KG, 2006
Pin
29
Connection Description
Pin
HOME2
Home signal (Y) or high speed
latch
79
30
OUT2
User programmable output (Y)
31
BPWM2
PWM magnitude (Y)
32
BPWMS2
33
AXIN2
34
Connection Description
HOME4
Home signal (W) or high speed
latch
80
OUT4
User programmable output (W)
81
BPWM4
PWM sign (Y)
82
BPWMS4
User programmable input (Y)
83
AXIN4
User programmable input (W)
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
Ainput2
analog input channel (1)
48
Ainput3
analog input channel (2)
98
Ainput4
analog input channel (3)
49
Ainput5
analog input channel (4)
99
Ainput6
analog input channel (5)
50
Ainput7
analog input channel (6)
100
Ainput8
analog input channel (7)
-oStepper Version Pinout Description
Pinout description stepper/microstepping* version
POSYS® 85x Pin 1-50 = J7, Pin 51-100 = J1
Pin
Connection Description
Pin
Connection Description
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)
49
© servo-Halbeck GmbH & Co.KG, 2006
Pin
Connection Description
14
PULSE1
15
DIR1
Pin
Connection Description
Pulse (X)
64
PULSE3
Direction (X)
65
DIR3
User programmable input (X)
66
AXIN3
At Rest (X)
67
ATREST3
Pulse (Z)
Direction (Z)
16
AXIN1
17
ATREST1
User programmable input (Z)
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
At Rest (Y)
84
ATREST4
At Rest (Z)
Pulse (W)
32
DIR2
33
AXIN2
Direction (W)
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
Ainput2
analog input channel (1)
48
Ainput3
analog input channel (2)
98
Ainput4
analog input channel (3)
49
Ainput5
analog input channel (4)
99
Ainput6
analog input channel (5)
50
Ainput7
analog input channel (6)
100
Ainput8
analog input channel (7)
User programmable input (W)
At Rest (W)
Amplifier enable (Z) or user
programmable output
*Microstepping with appropriate type driver
-oAnalog Input Pinout Description; POSYS® 800
Analog Input Pinout description (only valid for POSYS® 800)
50
© servo-Halbeck GmbH & Co.KG, 2006
J9 Pin-Out
Description
Explanation
1
Analog Input 1
Analog input for channel (0)
2
Analog Input 2
Analog input for channel (1)
3
Analog Input 3
Analog input for channel (2)
4
Analog Input 4
Analog input for channel (3)
5
Analog Input 5
Analog input for channel (4)
6
Analog Input 6
Analog input for channel (5)
7
Analog Input 7
Analog input for channel (6)
8
Analog Input 8
Analog input for channel (7)
13
EXTANHI
External reference high voltage input
Jumper JP15: 2-3 for external, 1-2 uses internal Analog GND
14
EXTANLO
External reference low voltage input
Jumper JP13: 2-3 for external, 1-2 uses internal Analog GND
15
ANGND
Analog GND
16
ANGND
Analog GND
17
EXTANVCC
Analog VCC, 5VDC
Jumper JP14: 2-3 for external analog VCC, 1-2 uses internal
analog VCC (5VDC)
Example: Using only internal settings set jumpers JP13, JP14 and JP15 all to 1-2.
These settings provide the internal analog GND, internal analog VCC at 5V and an internal
reference voltage of 2.5VDC with a very close tolerance.
Using these settings the analog input voltage for the 8 channels can range from 0-2.5 VDC, the
resolution is 10 bits.
If an analog input range of 0-5 VDC is desired, then attach an external voltage supply to
EXTANHI (Pin 14) <- max. 5VDC, external
ANGND (Pin 15/16) <- GND, external
Set the jumper of JP15 to position 2-3.
To read the analog input voltage use the Posys700.dll function
ReadAnalog(channel)
Channel = 0-7 for the 8 inputs.
To display the returned value in volts, use the following conversion:
AnalogInputVoltage = (ReadAnalog(channel) / 65536) * 2.5
This scales the returned value to the correct voltage. If the reference voltage is other than 2.5,
then substitute that voltage with the chosen reference voltage.
-o-
51
© servo-Halbeck GmbH & Co.KG, 2006
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® 801-B
1
POSYS® 802-B
2
POSYS® 804-B
4
POSYS® 81x-B w/ SYNC I/O for brushed servo motors.
The POSYS® 81x-B can be used as well for brushless servo motors when the appropriate type of
amplifier is used.
The POSYS® 81x-B provides an additional SYNC IO to synchronize multiple cards within the
system to the same working cycle.
Model
# of Axes
POSYS® 811-B
1
POSYS® 812-B
2
POSYS® 814-B
4
POSYS® 82x-B for brushless servo motors (obsolete; please use POSYS® 87x-B)
The POSYS® 82x-B can be used only for brushless servo motors.
Model
# of Axes
POSYS® 821-B
1
POSYS® 822-B
2
POSYS® 824-B
4
POSYS® 83x-B w/ SYNC I/O for brushless servo motors (obsolete; please use POSYS®
88x-B)
The POSYS® 83x-B can be used only for brushless servo motors.
The POSYS® 83x-B provides an additional SYNC IO to synchronize multiple cards within the
system to the same working cycle.
Model
# of Axes
POSYS® 831-B
1
POSYS® 832-B
2
POSYS® 834-B
4
POSYS® 84x-B for microstepping motors (obsolete; please use POSYS® 87x-B)
The POSYS® 84x-B can be used only for microstepping motors.
52
© servo-Halbeck GmbH & Co.KG, 2006
Model
# of Axes
POSYS® 841-B
1
POSYS® 842-B
2
POSYS® 844-B
4
POSYS® 86x-B w/ SYNC I/O for microstepping motors (obsolete; please use POSYS®
88x-B)
The POSYS® 86x-B can be used only for microstepping motors.
The POSYS® 86x-B provides an additional SYNC IO to synchronize multiple cards within the
system to the same working cycle.
Model
# of Axes
POSYS® 861-B
1
POSYS® 862-B
2
POSYS® 864-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® 851-B
1
POSYS® 852-B
2
POSYS® 854-B
4
POSYS® 87x-B for brushed/brushless servo motors and microstepping motors
The POSYS® 87x-B can be used for brushed and brushless servo motors and microstepping
motors.
Model
# of Axes
POSYS® 872-B
2
POSYS® 874-B
4
POSYS® 88x-B for brushed/brushless servo motors and microstepping motors
The POSYS® 88x-B can be used for brushed and brushless servo motors and microstepping
motors.
The POSYS® 88x-B provides an additional SYNC IO to synchronize multiple cards within the
system to the same working cycle.
Model
# of Axes
POSYS® 882-B
2
POSYS® 884-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).
-o-
53
© servo-Halbeck GmbH & Co.KG, 2006
User 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
54
© servo-Halbeck GmbH & Co.KG, 2006
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.
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
PCI 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 Signals for 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:
55
© servo-Halbeck GmbH & Co.KG, 2006
Item
How to set
Description
SW1
S1-1
S1-2
S1-3
S1-4
S1-5
S1-6
S1-7
S1-8
Switch SW 1 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:
8 (hex)
10 (hex)
20 (hex)
40 (hex)
80 (hex)
100 (hex)
200 (hex)
400 (hex)
300 (hex) is the default
base address
S1-1
S1-2
S1-3
S1-4
S1-5
S1-6
S1-7
S1-8
on
on
on
off
on
off
off
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
Connect none,
no connection is default
"Interrupt" selects the specific IRQ signal that will
be active on the ISA bus. Connect 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. Check 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
56
© servo-Halbeck GmbH & Co.KG, 2006
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
VCC
39
R/W
40
PS-o-
SYNC 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. W ith
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.: 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).
Set/GetSynchronizationMode, Sync IO Description
-oSerial Port
Serial Port
57
© servo-Halbeck GmbH & Co.KG, 2006
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 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-0590) 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 and 18xx
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
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/81x-B/87x-B/88x-B:
Pin 1-50 = J7, Pin 51-100 = J1)
Connectors on the board:
TSM-125-01-T-DV (Samtec)
Mating with: IDSD-25-S
58
© servo-Halbeck GmbH & Co.KG, 2006
Pin
Connection Description
Pin
Connection Description
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)
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)
PWM magnitude (Y)
81
BPWM4
PWM sign (Y)
82
BPWMS4
31
BPWM2
32
BPWMS2
PWM magnitude (W)
PWM sign (W)
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)
59
© servo-Halbeck GmbH & Co.KG, 2006
Pin
Connection Description
40
AMPEN1
41
42
Pin
Connection Description
Amplifier enable (X) or user
programmable output
90
AMPEN3
Amplifier enable (Z) or user
programmable output
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
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)
-oBrushless Servo/Microstepping Mode Pinout Description
Pinout description brushless servo w/ internal commutation,
microstepping and multiple motor version
POSYS® 82x-B/83x-B/87x-B/88x-B:
Pin 1-50 = J7, Pin 51-100 = J1
Connectors on the board:
TSM-125-01-T-DV (Samtec)
Mating with: IDSD-25-S
Pin
Connection Description
Pin
Connection Description
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
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
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+
60
C hannel A+ encoder signal (W)
© servo-Halbeck GmbH & Co.KG, 2006
Pin
Connection Description
Pin
Connection Description
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
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)
Amplifier enable (Z) or user
programmable output
Pinout Description brushless servo w/ internal commutation,
microstepping and multiple motor version Option Connector
PC/104
NOTE: only POSYS® 82x-B/83x-B/87x-B/88x-B (Option Con: 50-position)
Pin
1
Connection Description
Pin
Connection Description
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
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)
61
Ground
© servo-Halbeck GmbH & Co.KG, 2006
Pin
Connection Description
Pin
Connection Description
6
BPWM2A
PWM magnitude Phase A (Y)
31
HALL3C
7
BPWM2B
PWM magnitude Phase B (Y)
32
GND
Phase C Hall Sensor input (Z)
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)
Phase C Hall Sensor input (W)
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
14
BPWMS3A
PWM sign Phase A (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 Phase A (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
Ground
-oStepper Version Pinout Description
Pinout description stepper/microstepping* version
POSYS® 85x-B
Pin 1-50 = J7, Pin 51-100 = J1
Connectors on the board:
TSM-125-01-T-DV (Samtec)
Mating with: IDSD-25-S
Pin
Connection Description
Pin
Connection Description
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
62
Limit switch positive direction
(Z)
© servo-Halbeck GmbH & Co.KG, 2006
Pin
Connection Description
Pin
Connection Description
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
15
DIR1
Direction (X)
65
DIR3
16
AXIN1
User programmable input (X)
66
AXIN3
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
At Rest (Y)
84
ATREST4
Pulse (Z)
Direction (Z)
User programmable input (Z)
At Rest (Z)
Pulse (W)
32
DIR2
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)
50
Ainput4
analog input channel (3)
100
Ainput8
analog input channel (7)
*Microstepping with appropriate type driver
63
Direction (W)
User programmable input (W)
At Rest (W)
Amplifier enable (Z) or user
programmable output
© servo-Halbeck GmbH & Co.KG, 2006
-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)
Channel = 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-
64
© servo-Halbeck GmbH & Co.KG, 2006
POSYS® 18xx
Versions 18xx
List of available versions
POSYS® 180x for brushed servo and brushless servo motors w/ external commutation,
microstepping and stepper motors.
The POSYS® 180x can be used as well for brushless servo motors when the appropriate type of
amplifier is used.
The POSYS® 180x can be used with microstepping motors when the appropriate type driver is
used.
Model
# of Axes
POSYS® 1801
1
POSYS® 1802
2
POSYS® 1803
3
POSYS® 1804
4
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® 1821
1
POSYS® 1822
2
POSYS® 1832
3
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® 1851
1
POSYS® 1852
2
POSYS® 1853
3
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. W hen
ordering please add the type of RAM desired otherwise standard versions will be delivered.
For example:
POSYS® 1803 with 32KB DPRAM = 1803-32
POSYS® 1803 with 64KB DPRAM = 1803-64
65
© servo-Halbeck GmbH & Co.KG, 2006
POSYS® 1803 with 32KB DPRAM for extended temperature range = 1803-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 (SW 1, SW 2)
Jumper settings for interrupt (J17)
Jumper settings for motor type per axis (JP1 and JP2, 182x, 180x, 185x)
Connectors for cables (J1/J7 (extension port), J2 (serial port), J3/J4 (SYNC I/O), J5/J6/J9 (3x
50-position main connectors), J8 (CAN 2.0B), J12 (inverted signal output for steppers)
66
© servo-Halbeck GmbH & Co.KG, 2006
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
If you are using differential connections leave
these resistor packs installed.
This is the default
setting of resistor packs
RS1-RS3
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:
67
© servo-Halbeck GmbH & Co.KG, 2006
Item
How to set
Description
SW1
S1-1
S1-2
S1-3
S1-4
S1-5
S1-6
S1-7
S1-8
Switch SW 1 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:
8 (hex)
10 (hex)
20 (hex)
40 (hex)
80 (hex)
100 (hex)
200 (hex)
400 (hex)
300 (hex) is the default
base address
S1-1
S1-2
S1-3
S1-4
S1-5
S1-6
S1-7
S1-8
on
on
on
off
on
off
off
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
S2-2
S2-3
S2-4
S2-5
S2-6
S2-7
S2-8
1000 (hex)
2000 (hex)
4000 (hex)
8000 (hex)
10000 (hex)
20000 (hex)
40000 (hex)
80000 (hex)
D0000 (hex) is the
default m em ory 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 SW 2.
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
S2-2
S2-3
S2-4
S2-5
S2-6
S2-7
S2-8
on
on
on
on
off
on
off
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).
68
© servo-Halbeck GmbH & Co.KG, 2006
Item
How to set
Description
Interrupt
Connect none,
"Interrupt" selects the specific IRQ signal that will
be active on the ISA bus. Connect 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. Check your PCs
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.
no connection is default
J17 Designation
ISA IRQ No.
0
1
2
3
4
5
6
7
3
5
7
10
11
12
14
15
SYNC I/O
These two connectors allow to synchronize multiple 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 256 µsec after a 4 axis card. W ith 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 SYNC I/O 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 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).
CAN 2.0B
This connector allows to communicate via CAN 2.0B with the motion controller card. In this
communication mode the POSYS® 1900 can actually be used as a standalone controller without
host computer. Only 5V power supply are needed. To use the POSYS® in the CAN 2.0B mode we
can offer special ipc micro boxes with PCI-slots which provide the 5V power to the boards. Two
boards can be installed which allows a maximum of 8 axes to be controlled. If a larger number of
axes is required, then we can also offer larger ipc chassis' with additional PCI-slots (up to 14 slots
which allow a maximum of 56 axes to be controlled). Each card is configured separately as a node
within the CAN 2.0B network area.
The same procedure is valid for the POSYS® 1800. This PC/104 card can also be used as a
standalone controller card. There are various suppliers of PC/104 power supplies which can be
attached directly to the POSYS® 1800.
Field busses now do not offer that high-speed communication to allow precise interpolation. The
combination of multiple axes on a single board which communicates via CAN 2.0B with the host
now offers this possibility, precise circular and linear interpolation on a field bus.
The CAN 2.0B cable is optional. Please contact us if you wish to connect via CAN 2.0B to the
69
© servo-Halbeck GmbH & Co.KG, 2006
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).
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-5-SMD style connector (Molex part no.: 53398-0590). The counter
connector for the cable is a female connector from Molex (Molex part no.: 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
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 Type
Jumper setting
DC Brushed
JP1
DC Brushless
JP1
Microstepping
JP1
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 Configuration, POSYS®
70
© servo-Halbeck GmbH & Co.KG, 2006
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
71
© servo-Halbeck GmbH & Co.KG, 2006
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-
"J7" Connector
Con 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. W ith
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.: 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).
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®.
72
© servo-Halbeck GmbH & Co.KG, 2006
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-0590) 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 and 18xx. 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 no.: 53621-0590 or lead-free: 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 CAN 2.0B network and will coexist (but not
communicate) with CAN 2.0B nodes on that network. The POSYS® 18xx/19xx uses CAN to receive
commands, send responses and (optionally) send asynchronous event notifications.
The CAN 2.0B connector is a 2-position Molex PicoBlade (part no.: 53621-0290 or lead-free:
53261-0271) SMD style connector. The counter connector's part no. is: 51021-0200
For more information please refer to the pages: CAN (Controller Area Network, Konfiguration der
CAN2.0B Schnittstelle, CAN Ereignis Benachrichtigung and Set/GetCanMode)
-oMotor Mode Configuration; POSYS® 18xx
Motor Mode Jumpers „JP1“ and „JP2“
73
© servo-Halbeck GmbH & Co.KG, 2006
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 type
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® 180x
The POSYS® 180x can be setup for use with DC brushed servo motors, DC brushless with external
commutation, stepper motors and microstepping motors with appropriate type of driver. The
following table describes the positions of the jumpers on JP1 and JP2 for use with the one or other
motor type:
Achse
Motor type
DC Brushed Servo Motor
DC Brushless Servo Motor (w/
external Commutation)
Stepper- or
Microstepping Motor
(w/ Microstepping Drive)
1
JP2 short (first from left); JP1 open
JP1 short (erste von left); JP2 open
2
JP2 short (second from left); JP1 open
JP1 short (second von left); JP2 open
3
JP2 short (third from left); JP1 open
JP1 short (third von left); JP2 open
4
JP2 short (fourth from left); JP1 open
JP1 short (fourth from left); JP2 open
POSYS® 182x
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:
74
© servo-Halbeck GmbH & Co.KG, 2006
Achse
Motor type
DC Brushed Servo Motor
DC Brushless Servo Motor
(w/ internal/external
Commutation) or
Microstepping Motor
Stepper or
Micostepping Motor
(w/ Microstepping Driver)
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 type
DC Brushed Servo Motor
DC Brushless Servo Motor
(w/ internal/external
Commutation) or
Microstepping Motor
Stepper or
Micostepping Motor
(w/ Microstepping Driver)
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® 180x/182x:
Pin 1-50 = J5, Pin 51-100 = J6)
Connectors on the board:
TSM-125-01-T-DV (Samtec)
Mating with: IDSD-25-S
Pin
Connection Description
Pin
Connection Description
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)
75
© servo-Halbeck GmbH & Co.KG, 2006
Pin
Connection Description
Pin
Connection Description
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)
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)
76
PWM magnitude (Z)
PWM sign (Z)
PWM magnitude (W)
PWM sign (W)
Amplifier enable (Z) or user
programmable output
© servo-Halbeck GmbH & Co.KG, 2006
Pin
Connection Description
Pin
Connection Description
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)
Ainput3
analog input channel (2)
99
Ainput7
analog input channel (6)
analog input channel (3)
100
Ainput8
analog input channel (7)
49
50
Ainput4
-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
Connectors on the board:
TSM-125-01-T-DV (Samtec)
Mating with: IDSD-25-S
Pin
Connection Description
Pin
Connection Description
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
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
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)
77
© servo-Halbeck GmbH & Co.KG, 2006
Pin
Connection Description
Pin
Connection Description
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
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)
Amplifier enable (Z) or user
programmable output
Pinout description brushless servo and multiple motor mode:
Option Connector PC/104
NOTE: only POSYS® 182x (J9)
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
4
BPWMS1A
PWM sign Phase A (X)
29
HALL3A
Phase A Hall Sensor input (Z)
Ground
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 Phase A (Y)
34
HALL4B
Phase B Hall Sensor input (W)
78
Ground
© servo-Halbeck GmbH & Co.KG, 2006
Pin
Connection Description
Pin
Connection Description
10
GND
Ground
35
HALL4C
11
BPWM3A
PWM magnitude Phase A (Z)
36
GND
Phase C Hall Sensor input (W)
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
14
BPWMS3A
PWM sign Phase A (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 Phase A (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
24
GND
Ground
49
Vc1
+5V
25
HALL2A
Phase A Hall Sensor input (Y)
50
Vc1
+5V
Ground
-oStepper Mode Pinout Description
Pinout description stepper/microstepping* version
POSYS® 180x/182x/185x: Pin 1-50 = J5, Pin 51-100 = J6
Connectors on the board:
TSM-125-01-T-DV (Samtec)
Mating with: IDSD-25-S
Pin
Connection Description
Pin
Connection Description
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)
79
© servo-Halbeck GmbH & Co.KG, 2006
Pin
Connection Description
14
PULSE1
15
DIR1
Pin
Connection Description
Pulse (X)
64
PULSE3
Direction (X)
65
DIR3
User programmable input (X)
66
AXIN3
At Rest (X)
67
ATREST3
Pulse (Z)
Direction (Z)
16
AXIN1
17
ATREST1
User programmable input (Z)
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
At Rest (Y)
84
ATREST4
At Rest (Z)
Pulse (W)
32
DIR2
33
AXIN2
Direction (W)
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)
50
Ainput4
analog input channel (3)
100
Ainput8
analog input channel (7)
User programmable input (W)
At Rest (W)
Amplifier enable (Z) or user
programmable output
*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.
80
© servo-Halbeck GmbH & Co.KG, 2006
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
-o-
Analog 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
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)
Channel = 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.
81
© servo-Halbeck GmbH & Co.KG, 2006
-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 DW ORDS (16k x 16). Applications requiring fast data transfer and access should use units
with dual port RAM. W riting and reading the dual port RAM is much faster, requiring
approximately 2 microseconds to read or write a DW ORD. 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. W hen 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
C000 : 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
First 16K
Second 16K
Third 16K
Fourth 16K
(x0000h-x3FFFh) (x4000h-x7FFFh) (x8000h-xBFFFh) (xC000h-xFFFFh)
A0000AFFFFh
VGA Graphics Mode Video RAM
B0000BFFFFh
VGA Monochrome Text Mode Video RAM
C0000CFFFFh
VGA Video BIOS ROM
VGA Color Text Mode Video RAM
IDE Hard Disk
BIOS ROM
82
Optional Adapter
ROM BIOS or RAM
UMBs
© servo-Halbeck GmbH & Co.KG, 2006
Address
First 16K
Second 16K
Third 16K
Fourth 16K
(x0000h-x3FFFh) (x4000h-x7FFFh) (x8000h-xBFFFh) (xC000h-xFFFFh)
D0000DFFFFh
Optional Adapter ROM BIOS or RAM UMBs
E0000hEFFFFh
System BIOS Plug and Play Extended Information
F0000FFFFFh
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
C0000 – 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 W indows 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 W indows operating system.
The matching base memory address must be set using DIP switch SW 2. 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:
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
C0000 – C7FFF
ON
ON
ON
OFF
OFF
C8000 - 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
83
© servo-Halbeck GmbH & Co.KG, 2006
Base Memory Range
(Hex)
SW2-S4
SW2-S5
SW2-S6
SW2-S7
SW2-S8
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 DW ORD locations:
ofs=0;
for (ii=0; ii<(finalpos+1); ii++)
{
poke(base_memory,ofs,((W ORD2LONG*)&value)->wordhi);
ofs=ofs+2;
poke(base_memory,ofs,((W ORD2LONG*)&value)->wordlo);
ofs=ofs+2;
}
writes first the high word and then the low word to base_memory + ofs to store a DW ORD.
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=GetDW ORD(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 W ORD values to a DW ORD
LONG GetDW ORD(unsigned short val_1,unsigned short val_2)
{
LONG temp;
temp=0;
((W ORD2LONG*)&temp)->wordhi=val_1;
((W ORD2LONG*)&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. 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
84
//DOS
//W indows DLL
© servo-Halbeck GmbH & Co.KG, 2006
It can be disabled again anytime by using the function
DisableDPRam(void)
DisableDPRam(hPosys:P1800_Handle);stdcall
//DOS
//W indows 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
//W indows DLL
will re-enable the dual port RAM functionality after a hardware Reset or an ISA-Bus Reset.
In a W indows operating system the above routines will not work since the processor is in protected
mode direct IO and memory access is not possible. For W indows 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 (
[email protected]).
85
© servo-Halbeck GmbH & Co.KG, 2006
If you wish to avoid the effort determining available memory space then we can offer the POSYS®
1800 with 512 KB Single Port RAM. W hen 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.
-o-
86
© servo-Halbeck GmbH & Co.KG, 2006
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® 901
1
POSYS® 902
2
POSYS® 904
4
POSYS® 91x w/ SYNC I/O for brushed servo motors.
The POSYS® 91x can be used as well for brushless servo motors when the appropriate type of
amplifier is used.
The POSYS® 91x provides an additional SYNC IO to synchronize multiple cards within the system
to the same working cycle.
Model
# of Axes
POSYS® 911
1
POSYS® 912
2
POSYS® 914
4
POSYS® 92x-B for brushless servo motors (obsolete; please use POSYS® 97x-B)
The POSYS® 92x-B can be used only for brushless servo motors.
Model
# of Axes
POSYS® 921
1
POSYS® 922
2
POSYS® 924
4
POSYS® 93x w/ SYNC I/O for brushless servo motors (obsolete; please use POSYS®
98x-B)
The POSYS® 93x can be used only for brushless servo motors.
The POSYS® 93x provides an additional SYNC IO to synchronize multiple cards within the system
to the same working cycle.
Model
# of Axes
POSYS® 931
1
POSYS® 932
2
POSYS® 934
4
POSYS® 94x for microstepping motors (obsolete; please use POSYS® 97x-B)
The POSYS® 94x can be used only for microstepping motors.
87
© servo-Halbeck GmbH & Co.KG, 2006
Model
# of Axes
POSYS® 941
1
POSYS® 942
2
POSYS® 944
4
POSYS® 96x w/ SYNC I/O for microstepping motors (obsolete; please use POSYS®
98x-B)
The POSYS® 96x can be used only for microstepping motors.
The POSYS® 96x provides an additional SYNC IO to synchronize multiple cards within the system
to the same working cycle.
Model
# of Axes
POSYS® 961
1
POSYS® 962
2
POSYS® 964
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® 951
1
POSYS® 952
2
POSYS® 954
4
POSYS® 97x for brushed/brushless servo motors and microstepping motors
The POSYS® 97x can be used for brushed and brushless servo motors and microstepping motors.
Model
# of Axes
POSYS® 972
2
POSYS® 974
4
POSYS® 98x w/ SYNC I/O for brushed/brushless servo motors and microstepping
motors
The POSYS® 98x can be used for brushed and brushless servo motors and microstepping motors.
The POSYS® 98x provides an additional SYNC IO to synchronize multiple cards within the system
to the same working cycle.
Model
# of Axes
POSYS® 982-B
2
POSYS® 984-B
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
88
© servo-Halbeck GmbH & Co.KG, 2006
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 the serial interface port mode to be selected
Sync I/O for multiple card synchronization
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
If you are using differential connections leave
these resistor packs installed.
This is the default
setting of resistor packs
RS1-RS3
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.
89
© servo-Halbeck GmbH & Co.KG, 2006
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, PCI and serial. This jumper is only on the PC/104 8xx-B-series and PCI cards.
Item
What to set
Description
Mode Jumper - JP4 1-2
Sets PCI bus to be main communications channel.
This is the default
setting of mode jumper
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
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-o-
SYNC IO
SYNC I/O
90
© servo-Halbeck GmbH & Co.KG, 2006
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. W ith
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.: 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).
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 PicoBlade SMD style connector (Molex part no.: 53398-0590) for the PCI cards
POSYS® 9xx, 19xx and for the new PC/104 card POSYS® 18xx 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.: 53621-0590 or lead-free: 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
91
© servo-Halbeck GmbH & Co.KG, 2006
Pin
Connection
Description
3
SrlRcv
Serial receive input
4
GND
Ground
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/91x/97x/98x
Pin
Connection Description
Pin
Connection Description
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)
PWM magnitude (X)
64
BPWM3
PWM sign (X)
65
BPWMS3
14
BPWM1
15
BPWMS1
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
92
PWM magnitude (Z)
PWM sign (Z)
© servo-Halbeck GmbH & Co.KG, 2006
Pin
Connection Description
Pin
Connection Description
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
PWM magnitude (W)
PWM sign (W)
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
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)
-oBrushless Servo/Microstepping Mode Pinout Description
Pinout description brushless servo w/ internal commutation,
microstepping and multiple motor version
POSYS® 92x/93x/94x/96x/97x/98x
Pin
Connection Description
Pin
Connection Description
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
93
Limit switch positive direction
(Z)
© servo-Halbeck GmbH & Co.KG, 2006
Pin
Connection Description
Pin
Connection Description
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
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
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
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)
94
Amplifier enable (Z) or user
programmable output
© servo-Halbeck GmbH & Co.KG, 2006
Pinout Description brushless servo and multiple motor version
Option Connector 900 PCI
POSYS® 92x/93x/94x/96x/97x/98x (68-position SCSI)
Pin
Connection Description
Pin
Connection Description
1
BPWM1A
PWM magnitude Phase A (X)
35
BPWM1B
PWM magnitude Phase B (X)
2
BPWM1C
PWM magnitude Phase C (X)
36
GND
Ground
3
BPWMS1B
PWM sign Phase B (X)
37
GND
Ground
4
BPWM2A
PWM magnitude Phase A (Y)
38
BPWM2B
5
BPWM2C
PWM magnitude Phase C (Y)
39
GND
Ground
6
BPWMS2B
PWM sign Phase B (Y)
40
GND
Ground
PWM magnitude Phase B (Y)
7
BPWM3A
PWM magnitude Phase A (Z)
41
BPWM3B
8
BPWM3C
PWM magnitude Phase C (Z)
42
GND
PWM magnitude Phase B (Z)
Ground
9
BPWMS3B
PWM sign Phase B (Z)
43
GND
Ground
10
BPWM4A
PWM magnitude Phase A (W)
44
BPWM4B
11
BPWM4C
PWM magnitude Phase C (W)
45
GND
PWM magnitude Phase B (W)
Ground
12
BPWMS4B
PWM sign Phase B (W)
46
GND
Ground
13
HALL1A
Phase A Hall Sensor input (X)
47
HALL1B
14
HALL1C
Phase C Hall Sensor input (X)
48
GND
15
HALL2A
Phase A Hall Sensor input (Y)
49
HALL2B
16
HALL2C
Phase C Hall Sensor input (Y)
50
GND
17
HALL3A
Phase A Hall Sensor input (Z)
51
HALL3B
18
HALL3C
Phase C Hall Sensor input (Z)
52
GND
19
HALL4A
Phase A Hall Sensor input (W)
53
HALL4B
20
HALL4C
Phase C Hall Sensor input (W)
54
GND
21
Pulse1+
Pulse+ (X)
55
Pulse1-
Pulse- (X)
22
Pulse2+
Pulse+ (Y)
56
Pulse2-
Pulse- (Y)
23
Pulse3+
Pulse+ (Z)
57
Pulse3-
Pulse- (Z)
24
Pulse4+
Pulse+ (W)
58
Pulse4-
Pulse- (W)
25
Direction1+
Direction+ (X)
59
Direction1-
Direction- (X)
26
Direction2+
Direction+ (Y)
60
Direction2-
Direction- (Y)
27
Direction3+
Direction+ (Z)
61
Direction3-
Direction- (Z)
28
Direction4+
Direction+ (W)
62
Direction4-
Direction+ (W)
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
29
Vc1
+5V
63
Vc1
+5V
30
GND
Ground
64
GND
Ground
31
DAC1B
Motor command (X), ±10V
signal, Phase B
65
AGND
Ground for motor command
32
DAC2B
Motor command (Y), ±10V
signal, Phase B
66
AGND
Ground for motor command
33
DAC3B
Motor command (Z), ±10V
signal, Phase B
67
AGND
Ground for motor command
34
DAC4B
Motor command (W), ±10V
signal, Phase B
68
AGND
Ground for motor command
-oStepper Version Pinout Description
Pinout description stepper/microstepping* version
POSYS® 95x
95
© servo-Halbeck GmbH & Co.KG, 2006
Pin
Connection Description
Pin
Connection Description
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
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
Ground
User programmable output (Z)
Pulse (Z)
Direction (Z)
16
AXIN1
17
ATREST1
User programmable input (Z)
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
At Rest (Y)
84
ATREST4
At Rest (Z)
Pulse (W)
32
DIR2
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
96
Direction (W)
User programmable input (W)
At Rest (W)
Amplifier enable (Z) or user
programmable output
uncommitted output (4)
© servo-Halbeck GmbH & Co.KG, 2006
Pin
Connection Description
Pin
Connection Description
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)
*Microstepping with appropriate type driver
Pinout Description stepper version Option Connector 900 PCI
POSYS® 95x (68-position SCSI)
Pin
Connection Description
Pin
Connection Description
1
n.c.
No C onnection
35
n.c.
No C onnection
2
n.c.
No C onnection
36
GND
Ground
3
n.c.
No C onnection
37
GND
Ground
4
n.c.
No C onnection
38
n.c.
No C onnection
5
n.c.
No C onnection
39
GND
Ground
6
n.c.
No C onnection
40
GND
Ground
7
n.c.
No C onnection
41
n.c.
No C onnection
8
n.c.
No C onnection
42
GND
Ground
9
n.c.
No C onnection
43
GND
Ground
10
n.c.
No C onnection
44
n.c.
No C onnection
11
n.c.
No C onnection
45
GND
Ground
12
n.c.
No C onnection
46
GND
Ground
13
n.c.
No C onnection
47
n.c.
No C onnection
14
n.c.
No C onnection
48
GND
Ground
15
n.c.
No C onnection
49
n.c.
No C onnection
16
n.c.
No C onnection
50
GND
Ground
17
n.c.
No C onnection
51
n.c.
No C onnection
18
n.c.
No C onnection
52
GND
Ground
19
n.c.
No C onnection
53
n.c.
No C onnection
20
n.c.
No C onnection
54
GND
Ground
21
Pulse1+
Pulse+ (X)
55
Pulse1-
Pulse- (X)
22
Pulse2+
Pulse+ (Y)
56
Pulse2-
Pulse- (Y)
23
Pulse3+
Pulse+ (Z)
57
Pulse3-
Pulse- (Z)
24
Pulse4+
Pulse+ (W)
58
Pulse4-
Pulse- (W)
25
Direction1+
Direction+ (X)
59
Direction1-
Direction- (X)
26
Direction2+
Direction+ (Y)
60
Direction2-
Direction- (Y)
27
Direction3+
Direction+ (Z)
61
Direction3-
Direction- (Z)
28
Direction4+
Direction+ (W)
62
Direction4-
Direction+ (W)
29
Vc1
+5V
63
Vc1
+5V
30
GND
Ground
64
GND
Ground
31
n.c.
No C onnection
65
n.c.
No C onnection
32
n.c.
No C onnection
66
n.c.
No C onnection
33
n.c.
No C onnection
67
n.c.
No C onnection
34
n.c.
No C onnection
68
n.c.
No C onnection
97
© servo-Halbeck GmbH & Co.KG, 2006
-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)
The analog input voltage for the 8 channels can range from 0-2.048 VDC, the resolution is 10 bits.
ReadAnalog(channel)
Channel = 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-
98
© servo-Halbeck GmbH & Co.KG, 2006
POSYS® 19xx
Versions 19xx
List of available versions
POSYS® 190x for brushed servo and brushless servo motors w/ external commutation,
microstepping and stepper motors.
The POSYS® 190x can be used as well for brushless servo motors when the appropriate type of
amplifier is used.
The POSYS® 190x can be used with microstepping motors when the appropriate type driver is
used.
Model
# of Axes
POSYS® 1901
1
POSYS® 1902
2
POSYS® 1903
3
POSYS® 1904
4
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® 1921
1
POSYS® 1922
2
POSYS® 1932
3
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® 1951
1
POSYS® 1952
2
POSYS® 1953
3
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. W hen
ordering please add the type of RAM desired otherwise standard versions will be delivered.
For example:
POSYS® 1903 with 32KB DPRAM = 1903-32
POSYS® 1903 with 64KB DPRAM = 1903-64
99
© servo-Halbeck GmbH & Co.KG, 2006
POSYS® 1903 with 32KB DPRAM for extended temperature range = 1903-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
CAN 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:
picture shows: POSYS® 19xx
Resistor Packs RS1, RS2, RS3
The following table shows the function of the RS1-RS3 resistor packs
100
© servo-Halbeck GmbH & Co.KG, 2006
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
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-o-
SYNC IO
SYNC I/O
These two connectors allow to synchronize additional cards in one system to work within the same
101
© servo-Halbeck GmbH & Co.KG, 2006
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. W ith
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.: 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).
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-0590) for the PCI cards
POSYS® 9xx, 19xx and for the new PC/104 card POSYS® 18xx 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.: 53621-0590 or lead-free: 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
102
© servo-Halbeck GmbH & Co.KG, 2006
Pin
Connection
Description
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 CAN 2.0B network and will coexist (but not
communicate) with CAN 2.0B nodes on that network. The POSYS® 18xx/19xx uses CAN to receive
commands, send responses and (optionally) send asynchronous event notifications.
The CAN 2.0B connector is a 2-position Molex PicoBlade (part no.: 53621-0290 or lead-free:
53261-0271) SMD style connector. The counter connector's part no. is: 51021-0200
For more information please refer to the pages: CAN (Controller Area Network, Konfiguration der
CAN2.0B Schnittstelle, CAN 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 type
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.
103
© servo-Halbeck GmbH & Co.KG, 2006
POSYS® 190x
The POSYS® 190x can be setup for use with DC brushed servo motors, DC brushless with external
commutation, stepper motors and microstepping motors with appropriate type of driver. The
following table describes the positions of the jumpers on JP1 and JP2 for use with the one or other
motor type:
Achse
Motor type
DC Brushed Servo Motor
DC Brushless Servo Motor (w/
external Commutation)
Stepper- or
Microstepping Motor
(w/ Microstepping Drive)
1
JP2 short (first from left); JP1 open
JP1 short (erste von left); JP2 open
2
JP2 short (second from left); JP1 open
JP1 short (second von left); JP2 open
3
JP2 short (third from left); JP1 open
JP1 short (third von left); JP2 open
4
JP2 short (fourth from left); JP1 open
JP1 short (fourth from left); JP2 open
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 the one or other motor type:
Achse
Motor type
DC Brushed Servo Motor
DC Brushless Servo Motor
(w/ internal/external
Commutation) or
Microstepping Motor
Stepper or
Micostepping Motor
(w/ Microstepping Driver)
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 type
DC Brushed Servo Motor
DC Brushless Servo Motor
(w/ internal/external
Commutation) or
Microstepping Motor
Stepper or
Micostepping Motor
(w/ Microstepping Driver)
104
© servo-Halbeck GmbH & Co.KG, 2006
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 Description
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
13
AXISOUT1
User programmable output (X)
63
AXISOUT3
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)
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
105
Ground
User programmable output (Z)
PWM magnitude (Z)
PWM sign (Z)
© servo-Halbeck GmbH & Co.KG, 2006
Pin
Connection Description
Pin
Connection Description
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
PWM magnitude (W)
PWM sign (W)
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
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)
-oBrushless Servo/Microstepping Mode Version Pinout Description
Pinout description brushless servo w/ internal commutation,
microstepping and multiple motor version
POSYS® 192x
Pin
Connection Description
Pin
Connection Description
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
106
Limit switch positive direction
(Z)
© servo-Halbeck GmbH & Co.KG, 2006
Pin
Connection Description
Pin
Connection Description
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
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
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
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)
107
Amplifier enable (Z) or user
programmable output
© servo-Halbeck GmbH & Co.KG, 2006
Pinout Description brushless servo and multiple motor version
Option Connector PCI
POSYS® 192x (68-position SCSI)
Pin
Connection Description
Pin
Connection Description
1
BPWM1A
PWM magnitude Phase A (X)
35
BPWM1B
PWM magnitude Phase B (X)
2
BPWM1C
PWM magnitude Phase C (X)
36
GND
Ground
3
BPWMS1B
PWM sign Phase B (X)
37
GND
Ground
4
BPWM2A
PWM magnitude Phase A (Y)
38
BPWM2B
5
BPWM2C
PWM magnitude Phase C (Y)
39
GND
Ground
6
BPWMS2B
PWM sign Phase B (Y)
40
GND
Ground
PWM magnitude Phase B (Y)
7
BPWM3A
PWM magnitude Phase A (Z)
41
BPWM3B
8
BPWM3C
PWM magnitude Phase C (Z)
42
GND
PWM magnitude Phase B (Z)
Ground
9
BPWMS3B
PWM sign Phase B (Z)
43
GND
Ground
10
BPWM4A
PWM magnitude Phase A (W)
44
BPWM4B
11
BPWM4C
PWM magnitude Phase C (W)
45
GND
PWM magnitude Phase B (W)
Ground
12
BPWMS4B
PWM sign Phase B (W)
46
GND
Ground
13
HALL1A
Phase A Hall Sensor input (X)
47
HALL1B
14
HALL1C
Phase C Hall Sensor input (X)
48
GND
15
HALL2A
Phase A Hall Sensor input (Y)
49
HALL2B
16
HALL2C
Phase C Hall Sensor input (Y)
50
GND
17
HALL3A
Phase A Hall Sensor input (Z)
51
HALL3B
18
HALL3C
Phase C Hall Sensor input (Z)
52
GND
19
HALL4A
Phase A Hall Sensor input (W)
53
HALL4B
20
HALL4C
Phase C Hall Sensor input (W)
54
GND
21
Pulse1+
Pulse+ (X)
55
Pulse1-
Pulse- (X)
22
Pulse2+
Pulse+ (Y)
56
Pulse2-
Pulse- (Y)
23
Pulse3+
Pulse+ (Z)
57
Pulse3-
Pulse- (Z)
24
Pulse4+
Pulse+ (W)
58
Pulse4-
Pulse- (W)
25
Direction1+
Direction+ (X)
59
Direction1-
Direction- (X)
26
Direction2+
Direction+ (Y)
60
Direction2-
Direction- (Y)
27
Direction3+
Direction+ (Z)
61
Direction3-
Direction- (Z)
28
Direction4+
Direction+ (W)
62
Direction4-
Direction+ (W)
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
29
Vc1
+5V
63
Vc1
+5V
30
GND
Ground
64
GND
Ground
31
DAC1B
Motor command (X), ±10V
signal, Phase B
65
DAC1A
Motor command (X), ±10V
signal, Phase A
32
DAC2B
Motor command (Y), ±10V
signal, Phase B
66
DAC2A
Motor command (Y), ±10V
signal, Phase A
33
DAC3B
Motor command (Z), ±10V
signal, Phase B
67
DAC3A
Motor command (Z), ±10V
signal, Phase A
34
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
108
© servo-Halbeck GmbH & Co.KG, 2006
Pin
Connection Description
Pin
Connection Description
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
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
Ground
User programmable output (Z)
Pulse (Z)
Direction (Z)
16
AXIN1
17
ATREST1
User programmable input (Z)
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
At Rest (Y)
84
ATREST4
At Rest (Z)
Pulse (W)
32
DIR2
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
109
Direction (W)
User programmable input (W)
At Rest (W)
Amplifier enable (Z) or user
programmable output
uncommitted output (4)
© servo-Halbeck GmbH & Co.KG, 2006
Pin
Connection Description
Pin
Connection Description
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)
*Microstepping with appropriate type driver when using 190x or 195x
Pinout Description stepper motor version Option Connector
1900 PCI
POSYS® 192x (68-position SCSI)
Pin
Connection Description
Pin
Connection Description
1
n.c.
No C onnection
35
n.c.
No C onnection
2
n.c.
No C onnection
36
GND
Ground
3
n.c.
No C onnection
37
GND
Ground
4
n.c.
No C onnection
38
n.c.
No C onnection
5
n.c.
No C onnection
39
GND
Ground
6
n.c.
No C onnection
40
GND
Ground
7
n.c.
No C onnection
41
n.c.
No C onnection
8
n.c.
No C onnection
42
GND
Ground
9
n.c.
No C onnection
43
GND
Ground
10
n.c.
No C onnection
44
n.c.
No C onnection
11
n.c.
No C onnection
45
GND
Ground
12
n.c.
No C onnection
46
GND
Ground
13
n.c.
No C onnection
47
n.c.
No C onnection
14
n.c.
No C onnection
48
GND
Ground
15
n.c.
No C onnection
49
n.c.
No C onnection
16
n.c.
No C onnection
50
GND
Ground
17
n.c.
No C onnection
51
n.c.
No C onnection
18
n.c.
No C onnection
52
GND
Ground
19
n.c.
No C onnection
53
n.c.
No C onnection
20
n.c.
No C onnection
54
GND
Ground
21
Pulse1+
Pulse+ (X)
55
Pulse1-
Pulse- (X)
22
Pulse2+
Pulse+ (Y)
56
Pulse2-
Pulse- (Y)
23
Pulse3+
Pulse+ (Z)
57
Pulse3-
Pulse- (Z)
24
Pulse4+
Pulse+ (W)
58
Pulse4-
Pulse- (W)
25
Direction1+
Direction+ (X)
59
Direction1-
Direction- (X)
26
Direction2+
Direction+ (Y)
60
Direction2-
Direction- (Y)
27
Direction3+
Direction+ (Z)
61
Direction3-
Direction- (Z)
28
Direction4+
Direction+ (W)
62
Direction4-
Direction+ (W)
29
Vc1
+5V
63
Vc1
+5V
30
GND
Ground
64
GND
Ground
31
n.c.
No C onnection
65
n.c.
No C onnection
32
n.c.
No C onnection
66
n.c.
No C onnection
33
n.c.
No C onnection
67
n.c.
No C onnection
110
© servo-Halbeck GmbH & Co.KG, 2006
Pin
Connection Description
34
n.c.
No C onnection
Pin
Connection Description
68
n.c.
No C onnection
-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)
Channel = 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-
111
© servo-Halbeck GmbH & Co.KG, 2006
SSI800/900 Interface Module
SSI Description
Introduction
The SSI 800/900 is a Synchronous Serial Interface for absolute encoders. Unlike incremental
encoders, optical encoders always give the exact absolute position. After power-on the encoder
will report the exact position it is at. This means there is no need to for the machine to locate a
so-called machine reference.
Absolute encoders are grouped into two categories, single turn and multi-turn encoders. Encoders
with a resolution of up to
360 degrees are called single turn encoders,
Encoders which can resolve several turns (normally up to 4096) are called multi-turn encoders.
The parts of an absolute encoder consist of an
Optical Code Disc
Opto-electronic Sensor System
Pulse Shaping Circuitry and Amplification
The code discs of most absolute encoders generate position data in Gray Code. This is different
from Binary and BCD presentation. Gray code guarantees higher reliability for accurate data
transmission.
To transmit absolute position data normally requires one data line for every bit of information. An
encoder with 13 bits of resolution would therefore require 13 data lines, an encoder with 25 bits of
resolution would require 25 data lines. A system with 4 encoders would require alone 4 x 25 = 100
data lines to transmit the data to the controller. The SSI interface requires only 4 data lines,
irrespective of the encoder’s resolution. This is accomplished by taking the parallel data and
converting it to serial data. Every bit of the parallel data is sent on the data lines +/synchronously to the +/- clock lines. The clock speed of the SSI 800/900 is programmable
between 1.1 MHz and 137.5 kHz. The clock speed depends on the length of the data cables
between encoder and controller.
The SSI800/900 supports Binary or Gray code input. In case of Gray Code input the SSI 800/900
converts the received Gray code to Binary code serial data and stores it in parallel format in
registers. This data can then be read by the motion processor.
For a system with 4 absolute encoders and a cable length of up to 50 meters, the position of every
encoder is read 20 000 times/second by the motion processor of the POSYS® controller. This
guarantees always up-to-date data.
The SSI 800/900 can be programmed for encoder resolutions of 10, 12, 13 and 25 bits. The
transmission speed can be programmed to accommodate cable length of more than 300 meters. It
is possible to use single-turn encoders and multi-turn encoders. The POSYS® motion controller
will capture the absolute position of single-turn encoders for a full 32 bits. When a roll-over occurs
it will be detected by the motion processor and the correct position will be stored. The direction
motion will also be correctly detected.
-oSSI Specifications
Specifications
112
© servo-Halbeck GmbH & Co.KG, 2006
SSI 800/900 Option Board for the POSYS® 800/800-B/1800 and
POSYS® 900/1900
Dimensions: 55 mm x 65 mm
supports SSI absolute encoders with 10, 12, 13 and 25 bit resolution
supports singleturn and multiturn encoders
supports encoders with Gray or Binary code output
40-position mating connector for POSYS® 800/800-B/1800/900/1900
2 stand-offs with screws for mounting to POSYS® boards
Connector for +5 VDC and +12 VDC supply for encoders. This is a mating connector for the PC
power supply connector
Jumper for selecting 5 V or 12 V supply voltage for the encoders
26-position IDC connector
PC slot bracket with 4 Binder 711 connectors (1 per axis), mating connectors are included
DIP-switch for setting encoder resolution for each axis
4 position registers (1 for each axis) maintain absolute positions. These positions can be read
by the POSYS® anytime
4 read and write registers (1 for each axis) for programmatically setting resolution and clock
speed
Resolution and clock speed settings can be different for every axis
Register with SSI 800/900 version number
-oSSI800/900; Installation
Installation
You need a POSYS® 800/800-B/1800 or a POSYS® 900/1900 board and one SSI 800/900
board
The motion control boards should not already be installed in a computer when mounting the
SSI 800/900 interface board
POSYS® 800/800-B:
o The SSI 800/900 plugs directly into the 40-position connector identified as J6. Secure
the SSI 800/900 by placing the two supplied screws into the stand-offs.
o Attach the supplied cable with the 26-position IDC to the mating connector on the SSI
800/900. Pin 1 (red lead) is next to the 3-position jumper. Please refer to the detail
POSYS® 1800/900/1900:
o The SSI 800/900 plugs directly into the 40-position connector identified as "Extension"
or "Extension Port".
o Secure the SSI 800/900 by placing the two supplied screws into the stand-offs.
o Attach the supplied cable with the 26-position IDC to the mating connector on the SSI
800/900. Pin 1 (red lead) is next to the 3-position jumper. Please refer to the detail.
POSYS® 800/800-B/1800 and 900/1900:
o Set the jumper to 5 VDC or 12VDC for the encoder supply voltage, depending on the
encoder’s specification.
o If you use the optional slot-bracket with 4 binder connectors, please attach them
accordingly to the backside of your PC
o Attach the connector for the encoder’s supply voltage to the 4-prong white connector.
This connector will accept a connector like the 3.5” floppy power connector.
o Attach the absolute encoders to the corresponding input connectors. Anschlussschema
-o-
113
© servo-Halbeck GmbH & Co.KG, 2006
Default Parameters
Default Parameters
After power-on or a reset the system will be reset to the following parameters:
Clock: 1.1 MHz
Resolution: settings of the DIP-switches
Switches [0..1]
Resolution
00
10 Bits
01
12 Bits
10
13 Bits
11
25 Bits
ON = 1, OFF = 0
Dip-switches 1, 2
= X-axis
Dip-switches 3, 4
= Y-axis
Dip-switches 5, 6
= Z-axis
Dip-switches 7, 8
= W -axis
These values can be overwritten by software commands.
Read/W riteSSIFrequency, Read/W riteSSIRegister, Read/W riteSSIResolution
-oSoftware Requirements
Software Requirements
The POSYS® 800/800-B/1800 and POSYS® 900/1900 can be operated in mixed mode. Out of the
4 axes any number and combination can be set to incremental or absolute mode. Great care must
be taken that no runaway condition will occur when switching from one mode to the other. The
following commands are needed to setup the absolute encoder mode for the POSYS®
800/800-B/1800 and POSYS® 900/1900.
SetEncoderSource
// This command sets the mode
GetEncoderSource
// This command returns the programmed value
axis = 0, 1, 2 or 3
mode = 0 or 1
// 0 = incremental, 1 = absolute (parallel)
Setting the mode to absolute (parallel) deactivates the incremental mode and setting to
incremental deactivates the absolute (parallel) mode.
SetEncoderModulus
// This command sets the modulus
GetEncoderModulus
// This command returns the programmed value
114
© servo-Halbeck GmbH & Co.KG, 2006
axis = 0, 1, 2 or 3
modulus = 0 to 65535
The modulus is needed for single-turn absolute encoders in order to capture the full position when
the encoder exceeds a full turn. The POSYS® will capture the full 32 bits for the position. The
modulus must always be ½ the encoder’s resolution. Assuming an encoder with 12 bits (4096) the
modulus to be programmed would be 2048.
There are additional functions required to program the SSI 800/900 interface’s clock, resolution
and to return the encoder’s actual position by reading the SSI’s registers.
W riteSSIRegister
// This functions sets the values
ReadSSIRegister
// This function returns resolution and frequency in the
variables
write only
axisID
axisID
axisID
axisID
=
=
=
=
0
1
2
3
// X-axis
// Y-axis
// Z-axis
// W -axis
write and read
resolution
resolution
resolution
resolution
=
=
=
=
25
13
12
10
//
//
//
//
25
13
12
10
bits
bits
bits
bits
//
//
//
//
1.1 MHz
550 kHz
275 kHz
137.5 kHz
write and read
frequency
frequency
frequency
frequency
=
=
=
=
1100
550
275
137
GetAbsoluteSSIPosition
// returns a 32 bit integer representing the encoder’s
absolute position as reported by the encoder
axisID
axisID
axisID
axisID
// X-axis
// Y-axis
// Z-axis
// W -axis
=
=
=
=
0
1
2
3
SetActualToAbsolutePosition
// Sets the POSYS® position counter to the value of the SSI
register
axisID
axisID
axisID
axisID
// X-axis
// Y-axis
// Z-axis
// W -axis
=
=
=
=
0
1
2
3
GetSSIVersion
// returns the version number of the SSI 800/900
ResetSSI
// resets the SSI 800/900 to its defaults, the default
resolution will be the DIP-switch setting
A new menu point (SSI Setup) has been added to the POSYS® GUI test and evaluation programs.
This allows testing of the SSI board as well as use the other test functions of these programs.
-o-
115
© servo-Halbeck GmbH & Co.KG, 2006
Connections to the SSI 800/900
Connections to the SSI 800/900
The following connections must be made to the SSI 800/900:
Jumper: 1-2 jumpered for 12 VDC supply to the encoder
2-3 jumpered for 5 VDC supply to the encoder (default setting)
Connect the 26-position flat ribbon cable to the IDC connector. The red lead of the cable marks
the position for PIN 1 of the connector
Connect the cable from the PC’s power supply to the connector identified as POWER SUPPLY
This connector accepts the same plug as is normally attached to the floppy drive.
Connections to BINDER 711 flange connectors
X-Axis
Y-Axis
Z-Axis
W-Axis
Description
Pin 1
Pin 1
Pin 1
Pin 1
5 VDC
Pin 2
Pin 2
Pin 2
Pin 2
Clock+
Pin 3
Pin 3
Pin 3
Pin 3
Clock-
Pin 4
Pin 4
Pin 4
Pin 4
GND
Pin 5
Pin 5
Pin 5
Pin 5
Data+
Pin 6
Pin 6
Pin 6
Pin 6
Data-
Pin 7
Pin 7
Pin 7
Pin 7
No Connection
The standard connector supplied with the POSYS® series is a 26-position IDC to connect to the
SSI800/900 and open to the other side. The cable is 20 cm long.
The BINDER connector is only available on special request. The pinout of the IDC is described
below.
Pinout Description of 26-position IDC
IDC Pin No.
Description
Axis
SUBD Pin No.
1
+5 or +12 VDC to Encoder
X
1
2
Clock1+
X
14
3
Clock1-
X
2
4
GND
X
15
116
© servo-Halbeck GmbH & Co.KG, 2006
IDC Pin No.
Description
Axis
SUBD Pin No.
5
DIN1+
X
3
6
DIN1-
X
16
7
+5 or +12 VDC to Encoder
Y
4
8
Clock2+
Y
17
9
Clock2-
Y
5
10
GND
Y
18
11
DIN2+
Y
6
12
DIN2-
Y
19
13
No Connection
14
No Connection
15
+5 or +12 VDC to Encoder
Z
7
16
Clock3+
Z
20
17
Clock3-
Z
8
18
GND
Z
21
19
DIN3+
Z
9
20
DIN3-
Z
22
21
+5 or +12 VDC to Encoder
W
10
22
Clock4+
W
23
23
Clock4-
W
11
24
GND
W
24
25
DIN4+
W
12
26
DIN4-
W
25
The user will have to make connections to the 26-position flat ribbon to the SSI board.
For the POSYS® series round BINDER connectors are available on request.
-oProgram Considerations
Program Considerations
Certain points need to be considered in order to make the program start a safe one.
Make all electrical connections WITHOUT applied power
Make sure the servo amplifiers are DISABLED
Make sure the phasing of encoder counting and motor command signal is correct
Start the POSYS® GUI Test Program and check all functions
Go to the SSI-Setup function and select the axes with absolute encoder inputs
Set resolution, frequency and encoder modulus to the desired values
Set the following error to a low value (< 500 counts) and make sure the Off-On-Error function
is active
There must be an EMERGENCY OFF switch in close proximity to be able to turn off the
complete system if required. There is always the danger of a RUN-AWAY condition
If the computer is powered and the encoder cable is attached to the BINDER connector,
amplifiers MUST BE OFF, the displays of the test program should now show the absolute
117
© servo-Halbeck GmbH & Co.KG, 2006
positions of all attached encoders. Two values will be displayed, the actual position in the main
screen and the absolute positions of the SSI-registers in the SSI-screen. A manual change in
encoder position should be shown in up or down counts on the screens
The main screen shows the actual position of the motion processor, it will deviate from the
encoders absolute position. The absolute encoders position as shown by the SSI-registers will
only display positive values. If 25 bits of position are exceeded it will start at zero again. If the
encoder is moved towards and passed its zero position the counters will roll over to 25 bits and
start to count down.
The motion processors counters can be synchronized to the same values as the SSI-registers
using the function SetActualToAbsolutePosition(axisID). The motion processors actual
position counters can be set to any value using the commands SetActualPosition(axis) or
AdjustActualPosition(axis). It is important that actual and commanded positions as
displayed on the main screen are the same or at least do not deviate by more than a few
counts. If they are off, then do the following: click on MOTORS OFF and then on MOTORS
ON. This should synchronize the two values.
If everything has been followed carefully so far, then enable the amplifier output of the
appropriate axis and click on the button ON in the ±10 Volt Output box. If the encoder and
the amplifier output voltage to the motor are correct, the motor should be servoing. The filter
parameters will probably need to be adjusted for optimum performance.
If the phasing is wrong or no encoder feedback is received, the motor will run-away at high
speed. Shut off your system immediately. Now correct the wiring!
Required Program Functions
This is a short explanation of the POSYS® 900-SSI initialization requirements. Please refer to the
other documentation for more details on the standard initialization.
The POSYS® 900 is a PCI-bus device and the program must locate the card and determine its
base address first.
Type
Thandle = integer;
Var
hPosys :Thandle;
found : word;
found:=DetectPosysDevice;
//returns number of installed POSYS® PCI
cards
hPosys:=OpenDevice(0)
//opens first driver instance (range 0 – 15)
//returns card handle in hPosys
//reports success=true if found
InitializePOSYS(0,0)
//redundant, no longer needed
Control:=GetVersion(hPosys)
//returns the type of motion card found
//do required initializations
for axis:=0 to 3 do
SetOutputMode(hPosys,axis,0)
//PW M or 16 bit DAC, 0=16 bits
//all 4 axes to DAC
for axis:=0 to 3 do begin
SetKp(hPosys,axis, value)
SetKi(hPosys,axis, value)
SetKd(hPosys,axis,value)
SetIntegrationLimit(hPosys,axis, value)
SetPositionErrorLimit(hPosys,axis, value) //suggested value<=500
SetAutoStopMode(hPosys,axis, enable)
//motor off on follow error, enable=1
end
118
© servo-Halbeck GmbH & Co.KG, 2006
MultiUpdate(hPosys, (1+2+4+8))
//update for all 4 axes =15 (0x0f)
SetMotorMode(hPosys,axis, OFF)
//make sure motor is OFF, before switching to
parallel (SSI)
W riteSSIResolution(hPosys,axis,25)
//overwrites the default resolution with 25 bits
SetEncoderSource(hPosys, axis, value)
//specify the axes for parallel (SSI)
//encoder feedback value=1 for parallel,
//value=0 for incremental, incremental is
//default
SetActualToAbsolutePosition(hPosys, axis)
//this sets the motion processor actual
//position counter to the encoder’s
//absolute value
ClearPositionError(hPosys,axis)
//clears following error of specified axis
SetMotorMode(hPosys,axis, ON)
//turn servoing of the parallel (SSI) axis ON
again
The above example is repeated in the MotionScript language.
In MotionScript all variables passed by POSYS® functions and returned POSYS® function values
are of type DOUBLE. Variables do not need to be declared in advance. Commands on the same line
are separated by a colon ( : ). Comments can be written using ‘ or REM.
REM This is a comment
‘ This is a comment also
Rem Programmstart
found = 0 : OFF = 0 : ON = 1
found = DetectPosysDevices;
//returns the number of found POSYS® cards
Print” Detected POSYS® Controllers:”;found
//outputs the number to the monitor
hPosys =OpenDevice(0)
//opens the first driver instance (range 0 –
//15) and returns the card handle back in
//hPosys; returns success=true if found
InitializePOSYS(0,0)
//redundant, no longer used
Control=GetVersion(hPosys)
//returns back the type of card
Print “Version Number: “;Hex$(Control)
//returns the installed version number as a
//hex value and outputs it on the monitor
for axis = 0 to 3
SetOutputMode(hPosys,axis,0)
next
//starts the necessary amount of
//initializations
//PW M or 16 bit DAC, 0=16 bits
//all 4 axes to DAC
for axis = 0 to 3
SetKp(hPosys,axis, value)
SetKi(hPosys,axis, value)
SetKd(hPosys,axis,value)
SetIntegrationLimit(hPosys,axis, value)
SetPositionErrorLimit(hPosys,axis,
value)
SetAutoStopMode(hPosys,axis, enable)
next
MultiUpdate(hPosys, (1+2+4+8))
//suggested value; value<=500
//Motor OFF when position error; enable=1
//Update for all 4 axes =15 (0x0f)
119
© servo-Halbeck GmbH & Co.KG, 2006
SetMotorMode(hPosys,axis, OFF)
//taking care Motor is OFF, before switching
//to SSI-Mode
W riteSSIResolution(hPosys,axis,25)
//overwrites the default values with 25 Bit
SetEncoderSource(hPosys, axis, value)
//defines which axes run with parallel word
//encoder feedback (SSI)
//value=1 for parallel, value=0 for
//incremental, incremental is default
SetActualToAbsolutePosition(hPosys, axis)
//this defines the actual position of the
//counter of the POSYS® to the absolute
//value of the encoder
ClearPositionError(hPosys,axis)
//clears the position error
SetMotorMode(hPosys,axis, ON)
//turns ON the controlling of the axis with
//SSI feedback again
Additional commands may be needed depending on the type of command output selected. For
example:
DACOutputsOn(hPosys)
//turns on the analog output mode ON
//(±10 V)
SetAmpEnable(hPosys,15)
//Amplifier Enable for all 4 axes
etc.
Date: 09.09.2002
Revision: 24.03.2003
03.06.2004 – adapted to new drivers, added MotionScript program example.
-oList of supported Absolute Encoders w/ SSI Interface
Compatible SSI Absolute Encoders for Use with POSYS®
800/800-B/900/1800 and 1900 series with SSI800/900
The SSI 800/900 supports the following resolutions: 10, 12, 13 and 25 Bit. Other resolutions are
possible, please contact servo-Halbeck GmbH & Co.KG for details. 4 different resolutions are
possible and can be defined by setting the appropriate jumpers on the SSI 800/900. Jumper
settings can be overwritten by software commands. It is possible to switch between incremental
and absolute encoder input, defined in user software.
Manufacturer
Model
Code
Resolution
Type
Single-/
Multiturn
URL
BEI
SHA5
B&G
25 Bit
Rotary
Multiturn
www.bei-ideacod.com
BEI
SHU9
B&G
25 Bit
Rotary
Multiturn
www.bei-ideacod.com
BEI
SHM5
B&G
25 Bit
Rotary
Multiturn
www.bei-ideacod.com
BEI
SHM9
B&G
25 Bit
Rotary
Multiturn
www.bei-ideacod.com
BEI
C HU9
B&G
13 Bit
Rotary
Singleturn
www.bei-ideacod.com
BEI
C HM5
B&G
13 Bit
Rotary
Singleturn
www.bei-ideacod.com
BEI
C HM9
B&G
13 Bit
Rotary
Singleturn
www.bei-ideacod.com
Eltra
EA
B&G
10 Bit, 12 Bit, 13
Bit, 25 Bit
Rotary
Singleturn
www.eltra.it
120
© servo-Halbeck GmbH & Co.KG, 2006
Manufacturer
Model
Code
Resolution
Type
Single-/
Multiturn
URL
Eltra
EAM
B&G
10 Bit, 12 Bit, 13
Bit, 25 Bit
Rotary
Multiturn
www.eltra.it
Heidenhain
EC N 413
G
13 Bit
Rotary
Singleturn
www.heidenhain.de
Heidenhain
EQN 425
G
25 Bit
Rotary
Multiturn
www.heidenhain.de
Heidenhain
ROC 410
G
10 Bit
Rotary
Singleturn
www.heidenhain.de
Heidenhain
ROC 412
G
12 Bit
Rotary
Singleturn
www.heidenhain.de
Heidenhain
ROC 413
G
13 Bit
Rotary
Singleturn
www.heidenhain.de
Heidenhain
ROQ 425
G
25 Bit
Rotary
Multiturn
www.heidenhain.de
Heidenhain
EC N 113
B
13 Bit
Rotary
Singleturn
www.heidenhain.de
Hengstler /
Danaher Motion
Acuro
B&G
Industry
SSI AC 110
10 Bit, 12 Bit, 13
Bit
Rotary
Singleturn
www.hengstler.com
Hengstler /
Danaher Motion
Acuro
Industry
SSI AC58
B&G
10 Bit, 12 Bit, 13
Bit, 25 Bit
Rotary
Multiturn
www.hengstler.com
Hengstler /
Danaher Motion
ACURO
Drive
AD36
G
25 Bit
Multiturn
www.hengstler.com
Kübler
5850
G &B
10 Bit, 12 Bit, 13
Bit
Rotary
Singleturn
www.kuebler.com
Kübler
5862
B&G
25 Bit
Rotary
Multiturn
www.kuebler.com
Kübler
5870
B&G
10 Bit, 12 Bit, 13
Bit
Rotary
Singleturn
www.kuebler.com
Kübler
5876
B&G
10 Bit, 12 Bit, 13
Bit
Rotary
Singleturn
www.kuebler.com
Kübler
5882
B&G
25 Bit
Rotary
Multiturn
www.kuebler.com
Kübler
7031
B&G
10 Bit, 12 Bit, 13
Bit
Rotary, ex-proof
Singleturn
www.kuebler.com
Kübler
9081
B&G
25 Bit
Rotary
Multiturn
www.kuebler.com
Stegmann
ARS 60
G
12 Bit, 13 Bit
Rotary
Singleturn
www.stegmann.de
Stegmann
ATM 60
SSI
B&G
25 Bit
Rotary
Multiturn
www.stegmann.de
Stegmann
ATM 90
SSI
B&G
25 Bit
Rotary
Multiturn
www.stegmann.de
Thalheim
ATD 3S
B&G
12 Bit, 13 Bit, 25
Bit
Rotary
Single- &
Multiturn
www.thalheim.de
Thalheim
ATD 4S
B&G
13 Bit, 25 Bit
Rotary
Single- &
Multiturn
www.thalheim.de
Thalheim
ATD 5S
B&G
13 Bit, 25 Bit
Rotary
Single- &
Multiturn
www.thalheim.de
Thalheim
ATD 6S
B&G
13 Bit, 25 Bit
Rotary
Single- &
Multiturn
www.thalheim.de
TR Electronic
various
models
B&G
10 Bit, 12 Bit, 13
Bit, 25 Bit
Rotary, Linear,
Linear Absolute
LASER, Linear
High Precision,
Barcode-based
Linear
Measurement
Single- &
Multiturn
www.tr-electronic.de
TWK
C B 58, CB
65, C B
66, C B
105
B&G
10 Bit, 12 Bit, 13
Bit
Rotary
Singleturn
www.twk.de
TWK
C BE 58,
C BE 65,
C BE 66
G
13 Bit
Rotary
Singleturn
www.twk.de
121
© servo-Halbeck GmbH & Co.KG, 2006
Manufacturer
Model
Code
Resolution
Type
Single-/
Multiturn
URL
TWK
C RE 58,
C RE 65,
C RE 66
B&G
25 Bit
Rotary
Multiturn
www.twk.de
TWK
C RF
C RF
C RF
C RF
B&G
25 Bit
Rotary
Multiturn
www.twk.de
TWK
TME 50
B&G
25 Bit
Rotary
Multiturn
www.twk.de
TWK
IWE 250
B
12 Bit
Linear
Singleturn
www.twk.de
TWK
KBE 58
B&G
13 Bit
Rotary
Singleturn
www.twk.de
TWK
KRE 58
B&G
25 Bit
Rotary
Multiturn
www.twk.de
TWK
MPE
B
25 Bit
Magnetostrictive
linear
Singleturn
www.twk.de
TWK
MSE
B
25 Bit
Magnetostrictive
linear
Singleturn
www.twk.de
TWK
TBE 50
B&G
10 Bit, 12 Bit, 13
Bit
Rotary
Singleturn
www.twk.de
58,
65,
66,
105
-o-
122
© servo-Halbeck GmbH & Co.KG, 2006
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.
W ith 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:
123
© servo-Halbeck GmbH & Co.KG, 2006
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).
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).
124
© servo-Halbeck GmbH & Co.KG, 2006
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.
125
© servo-Halbeck GmbH & Co.KG, 2006
-o-
126
© servo-Halbeck GmbH & Co.KG, 2006
Smoothing Factor
Filtered Trapezoidal Profile
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. W hen set to
32767 the gain is “unity” and results in no filtered output. For values below 32767 the trajectory is
filtered accordingly.
Commanded 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. W ithout activated Smoothing Factor you can see clear overshooting when
running into position. W ith 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.
127
© servo-Halbeck GmbH & Co.KG, 2006
Total movement without Smoothing Factor
First stop without Smoothing Factor. Overshooting is visible. After in-position the motion continues
to new target position
128
© servo-Halbeck GmbH & Co.KG, 2006
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.
129
© servo-Halbeck GmbH & Co.KG, 2006
Complete motion with Smoothing Factor
First stop with Smoothing Factor. Overshooting is no longer visible. After in-position the motion
continues to new target position
130
© servo-Halbeck GmbH & Co.KG, 2006
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:
131
© servo-Halbeck GmbH & Co.KG, 2006
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
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
132
© servo-Halbeck GmbH & Co.KG, 2006
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".)
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
133
© servo-Halbeck GmbH & Co.KG, 2006
Profile
Parameter
Word
size
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²
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:
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 which
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:
134
© servo-Halbeck GmbH & Co.KG, 2006
Profile
Parameter
Word 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
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
135
© servo-Halbeck GmbH & Co.KG, 2006
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 POSYS® Series controllers are equipped with on-board RAM which in this document will be
referred to as on-board RAM. Depending on the model the controllers they make 256k x 8
(700/800) available and the POSYS® 800-B/900/1800/1900 series makes 512k x 8 Single Port
RAM and the POSYS 1820 and 1920 makes 32k x 16 Dual Port RAM available.
This RAM serves two purposes, one is to use it as a trace buffer, the other is to use it 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 variables 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 (POSYS 1800/1900) or minus 512 words (POSYS 700/800/800-B and 900) for the system.
If memory is needed for program storage and execution, again it could be the full length minus
512 words (again exception POSYS 1800/1900 which can use the full memory length) 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.
The POSYS 1800/1900 series are also available with Dual Port RAM (POSYS 182x and 192x are
equipped with 32K x 16 as a standard, 64k x 16 is an option; POSYS 180x/185x/190x and 190x
are equipped with 512k x 16 Single Port RAM as a standard; Dual Port RAM is available for these
versions as an option).
Relevant On-board RAM Functions
Functions which are relevant to the use of the on-board RAM are:
Profile Mode
GetBufferFunction
GetBufferLength
GetBufferReadIndex
GetBufferStart
GetBufferW riteIndex
GetStopMode
ReadBuffer
SetBufferFunction
SetBufferLength
SetBufferReadIndex
136
© servo-Halbeck GmbH & Co.KG, 2006
SetBufferStart
SetBufferW riteIndex
SetStopMode
W riteBuffer
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
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 External 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
137
© servo-Halbeck GmbH & Co.KG, 2006
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
W hen 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 SetBufferW riteIndex 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 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
Start loading new data into RAM starting at the BufferW riteIndex = 0 up to RAM position =
4999
Check for wrap around until BufferReadIndex <= 10000
Start loading new data into RAM starting at the BufferW riteIndex = 5000 up to RAM position =
10000
Continue this method until all data is loaded and executed. Make sure to append one segment
with a SegmentTime multiplier of 0 to exit External Profile mode.
-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.
138
© servo-Halbeck GmbH & Co.KG, 2006
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.
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
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:
139
© servo-Halbeck GmbH & Co.KG, 2006
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 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.
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 µ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
w/ trace
capture
time per
axis
51.2 µs
102.4 µs
51.2 µs /
102.4 µs
19.53 kHz
(9.76 w/ trace capture)
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
1
maximum cycle
frequency
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
140
© servo-Halbeck GmbH & Co.KG, 2006
than the specified minimums from the table above.
-o-
141
© servo-Halbeck GmbH & Co.KG, 2006
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.”
142
© servo-Halbeck GmbH & Co.KG, 2006
W hichever 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
ClearPositionError
SetMotorCommand
SetAcceleration
SetIntegrationLimit
SetJerk
SetKaff
SetVelocity
SetKd
SetPosition
SetKi
SetDeceleration
SetKp
SetGearRatio
SetKvff
SetKaff
-o-
143
© servo-Halbeck GmbH & Co.KG, 2006
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:
144
© servo-Halbeck GmbH & Co.KG, 2006
Trigger Condition
Level or
Threshold
Description
Positive Commanded
Position
Threshold
Is satisfied when the current commanded
position is equal to or greater than the
programmed compare value
Negative Commanded
Position
Threshold
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
Commanded Position
Crossed
Threshold
Is satisfied when the current commanded
position crosses (is equal to) the programmed
compare value
Actual Position Crossed
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. W hen 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
145
© servo-Halbeck GmbH & Co.KG, 2006
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 m ax velocity indicator) assumes the value 1, or bit 10 (the in
motion indicator) assumes the value.
-oBreakpoint Actions
Breakpoint actions
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:
146
© servo-Halbeck GmbH & Co.KG, 2006
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,1, 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
SetBreakpoint (Axis1,1, Axis3,
AbruptStop, SignaIStatus)
Specify a breakpoint to monitor the signal status register
of axis 3 to 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
147
© servo-Halbeck GmbH & Co.KG, 2006
Commands
Description
SetBreakpoint (Axis1, 2, Axis4,
Update,
PositiveCommandedPosition)
Specify a positive commanded position breakpoint on
axis 4 which will 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-
148
© servo-Halbeck GmbH & Co.KG, 2006
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 PW M 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
K
d
K
K
K
I
P
aff
vff
is the Integral Gain
is the Derivative Gain
is the Proportional Gain
is the Acceleration feed-forward
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:
149
© servo-Halbeck GmbH & Co.KG, 2006
Terminus
Name
Representation & Range
Ilim Integration Limit
unsigned 32 Bit (0 to
2.124.483.647)
KI Integral Gain
unsigned 16 Bit (0 to 32.767)
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
W hen 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
150
© servo-Halbeck GmbH & Co.KG, 2006
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.
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
W hen 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:
W here
E1n are the accumulated error terms from the main encoder
Pn Is the position of the auxiliary encoder
151
© servo-Halbeck GmbH & Co.KG, 2006
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 the output command
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. W hen 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 which is greater than or equal to
the resolution of the main encoder. This will avoid potentially unstable operating
conditions.
-oBiQuad Output Filter
152
© servo-Halbeck GmbH & Co.KG, 2006
Bi-Quad Ausgangsfilter
A bi-quad is a generic digital filter structure. W ith 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
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
= 0.020083
= 0.040167
= 0.020083
= 1.56102
153
© servo-Halbeck GmbH & Co.KG, 2006
a2 = -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:
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 Command 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:
SetBiQuadCoefficient
// Disable the filter
SetBiQuadCoefficient
// Set K
SetBiQuadCoefficient
// Set B0
SetBiQuadCoefficient
// Set B1
154
© servo-Halbeck GmbH & Co.KG, 2006
SetBiQuadCoefficient
// Set B2
SetBiQuadCoefficient
// Set A1
SetBiQuadCoefficient
// Set A2
SetBiQuadCoefficient
// Enable the filter
Upon completion of this command sequence, the filter begins altering the output value of axis 1
immediately.
-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 W ith 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
Closed-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.
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.
155
© servo-Halbeck GmbH & Co.KG, 2006
-o-
156
© servo-Halbeck GmbH & Co.KG, 2006
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
Capture
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
8, 9, 10 Reserved
Set when an instruction error occurs
May contain 1 or 0
157
© servo-Halbeck GmbH & Co.KG, 2006
Bit
Name
Description
11
Commutation
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.
-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. W hile 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.
158
© servo-Halbeck GmbH & Co.KG, 2006
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
W indow. Cleared (0) when it is not.
3, 4, 5
Current 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
Axis-settled
Set (1) when the axis has remained within the Settle W indow for a
specified period of time. Cleared (0) if it has not.
7
Reserved
May contain 1 or 0
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 servo loop is
operating. W hen 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. W hile 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.
159
© servo-Halbeck GmbH & Co.KG, 2006
Bit
Name
Description
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-1
5
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).
-oSignal Sense Mask
160
© servo-Halbeck GmbH & Co.KG, 2006
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. Clear (0) for no inversion.
1
B encoder
Set(1) to invert quadrature B input signal. Clear (0) for no inversion.
2
Index
encoder
Set(1) to invert Index signal. Clear (0) for no inversion.
3
Home
Set(1) to invert home signal. Clear (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. Clear (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. Clear (0) for active low.
6
Axisln
Set (1) to invert AxisID signal. Clear (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. Clear (0) for no inversion.
11-1 Reserved
5
The command SetSignalSense sets the signal sense mask value. The command GetSignalSense
retrieves the current signal sense mask.
-o-
161
© servo-Halbeck GmbH & Co.KG, 2006
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
W rap-around
The axis position wraps
2
Breakpoint 1
Breakpoint 1 condition has been satisfied
3
Capture 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
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. W hen 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.
162
© servo-Halbeck GmbH & Co.KG, 2006
Once the host has completed processing the interrupt, it should send a ClearInterrupt 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
A bitmask identifying all interrupting axes is
Sends GetEventStatus instruction, detects
returned by the POSYS®. This value
motion error and limit switch flags are set.
identifies one axis as generating the interrupt. Issues a ResetEventStatus command to clear
both bits. Returns the axis to closed loop
mode by issuing SetMotorMode On command.
Issues a ClearInterrupt 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-m otion 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.
163
© servo-Halbeck GmbH & Co.KG, 2006
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 a (SetMotorMode 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).
Issue a SetMotorMode axis, On command followed by anUpdate 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.
164
© servo-Halbeck GmbH & Co.KG, 2006
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.
W hen 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.
W hen 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.
W hen 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
SetSettleW indow. This same value may be read back using the commandGetSettleW indow.
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 commandGetSettleTime.
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.
-o-
165
© servo-Halbeck GmbH & Co.KG, 2006
Settled 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, GetSettleW indow, SetSettleTime, GetSettleTime.
Figure 7.5-1. The Tracking Window
Figure 7.5-2. The Settle Window
166
© servo-Halbeck GmbH & Co.KG, 2006
-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.
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.
W hile 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.
167
© servo-Halbeck GmbH & Co.KG, 2006
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
W hen 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
The supported parameter ID values 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
Commanded
Position
The instantaneous commanded position output from the profile
generator.
3
Commanded
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
Commanded motor torque (output of the servo filter).
8
Cycle Time
The chipset time (units of servo cycles).
9
Capture 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.
168
© servo-Halbeck GmbH & Co.KG, 2006
ID
Name
Description
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 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.
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-tim e 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.
169
© servo-Halbeck GmbH & Co.KG, 2006
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.
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. W hen 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. W hen 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. W hen 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.
W hen 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
170
© servo-Halbeck GmbH & Co.KG, 2006
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. W hen 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 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.
171
© servo-Halbeck GmbH & Co.KG, 2006
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 SetTrackingW indow is used. The command GetTrackingW indow retrieves
this same value.
W hen the position error is less than or equal to the window value the tracking bit in the Activity
Status Register is set. W hen the position error exceeds the tracking window value, the tracking bit
is cleared.
-o-
172
© servo-Halbeck GmbH & Co.KG, 2006
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
173
© servo-Halbeck GmbH & Co.KG, 2006
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.
W hen 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. W riting 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.
174
© servo-Halbeck GmbH & Co.KG, 2006
Bits
Name
Description
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
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.
W hich input voltages are available and allowed can be found in the descriptions of the POSYS®
Versions Specifics.
-o-
175
© servo-Halbeck GmbH & Co.KG, 2006
The 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 m otor 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.
W hen 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-
176
© servo-Halbeck GmbH & Co.KG, 2006
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. W hen 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
177
© servo-Halbeck GmbH & Co.KG, 2006
power-up, using a homing procedure to reference the actual position to a physical hardware
location.
-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. W hether 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.
W hen 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-arm ed, 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,
178
© servo-Halbeck GmbH & Co.KG, 2006
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
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
179
© servo-Halbeck GmbH & Co.KG, 2006
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:
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-
180
© servo-Halbeck GmbH & Co.KG, 2006
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 Converter) 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 ~W riteEnbl. 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 of
SSI-compatible absolute encoders.
181
© servo-Halbeck GmbH & Co.KG, 2006
-o-
182
© servo-Halbeck GmbH & Co.KG, 2006
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
Device
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 Interval
Tn
Minimum
Maximum
Address Setup Delay Time
T30
7 nsec
Data Access Time
T31
71 nsec
Data Hold Time
T32
2 nsec
Read to W rite Delay Time
T40
PeriphSlct Low to Strobe Low
T55
1 nsec
PeriphSlct High to Strobe High T56
4 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%.
183
© servo-Halbeck GmbH & Co.KG, 2006
POSYS 1800/1900
Timing Interval
Tn
Minimum
Maximum
External Memory Read
ClockOut low to control valid
T20
4nsec
ClockOut low to address valid
T21
8nsec
Address valid to ~ReadEnable low
T22
ClockOut high to ~ReadEnable low
T23
5nsec
Data access time from Address valid
T24
40nsec
Data access time from ~ReadEnable T25
low
31nsec
Data hold time
T26
ClockOut low to control inactive
T27
Address hold time after ClockOut low T28
31nsec
0nsec
5nsec
2nsec
ClockOut low to Strobe low
T29
5nsec
ClockOut low to Strobe high
T30
6nsec
W /~R low to R/~W rising delay time T31
5nsec
Peripheral Device Read
Address valid to ~ReadEnable low
T45
56nsec
Data access time from Address valid
T46
65nsec
Data access time from ~ReadEnable T47
low
56nsec
184
© servo-Halbeck GmbH & Co.KG, 2006
-o-
185
© servo-Halbeck GmbH & Co.KG, 2006
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 ~W riteEnbl 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 Interval
Tn
Minimum
Maximum
Address Setup Delay Time
T33
Address Setup to W riteEnable High
T34
PeriphSlct Low to W riteEnable High
T35
Address Hold Time
T36
17 nsec
W riteEnable Pulse W idth
T37
89 nsec
Data Setup Time
T38
3 nsec
Data Setup before W rite High Time
T39
92 nsec
W riteEnable Low to Strobe Low
T53
1 nsec
W riteEnable 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
186
© servo-Halbeck GmbH & Co.KG, 2006
Timing Interval
Tn
Minimum
Maximum
External Memory Write
ClockOut high to control valid
T32
4nsec
ClockOut high to address valid
T33
10nsec
Address valid to ~W riteEnable low
T34
ClockOut low to ~W riteEnable low
T35
Data setup time before
~W riteEnable high
T36
33nsec
Data bus driven from ClockOut low
T37
-3nsec
Data hold time
T38
2nsec
ClockOut high to control inactive
T39
Address hold time after ClockOut
low
T40
ClockOut low to Strobe low
T41
6nsec
ClockOut low to Strobe high
T42
6nsec
R/~W low to W /~R rising delay time T43
ClockOut high to control valid
T44
5nsec
6nsec
29nsec
6nsec
5nsec
-5nsec
Peripheral Device Write
Address valid to ~W riteEnable low
T48
54nsec
Data setup time before
~W riteEnable high
T49
58nsec
187
© servo-Halbeck GmbH & Co.KG, 2006
-oMotor Command Output
Motor Command Output
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 type
POSYS® series
DC-Brush
POSYS®
70x
80x
80x-B, 81x-B, 87x-B,
88x-B
90x, 91x, 97x, 98x
180x, 182x
190x, 192x
Phases per axis Available output format
1
188
Sign/Magnitude PW M
50/50 PWM
16-bit DAC
© servo-Halbeck GmbH & Co.KG, 2006
Motor type
POSYS® series
Brushless DC
POSYS®
70x
80x
80x-B, 81x-B, 87x-B,
88x-B
90x, 91x, 97x, 98x
180x, 182x
190x, 192x
1
Sign/Magnitude PW M
50/50 PWM
16-bit DAC
POSYS®
82x-B, 83x-B, 87x-B,
88x-B
92x, 93x, 97x, 98x
182x
192x
2 or 3
Sign/Magnitude PW M*
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 PW M*
50/50 PWM
16-bit DAC
Stepper
POSYS®
75x
85x
85x-B
95x
180x, 182x, 185x
190x, 192x, 195x
(w/ external
commutation)
Brushless DC
(internal
commutation)
Phases per axis Available output format
1
Pulse & Direction
* only when 2 phases are selected. This format is not supported for 3-phases motors.
Sign/Magnitude PW M, 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 PW M 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.
189
© servo-Halbeck GmbH & Co.KG, 2006
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 PW M 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 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 PW M 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 PW M 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 PW M signal much like the magnitude signal for sign magnitude PW M. This PW M 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 PW M output is used with two different types of amplifiers. W hen driving a
brushless PM (permanent magnet) motor the magnitude signal is connected to a half bridge
190
© servo-Halbeck GmbH & Co.KG, 2006
driver. W hen 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
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-
191
© servo-Halbeck GmbH & Co.KG, 2006
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 CAN 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 C ommunication 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 asynchrone serielle Verbindung. 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:
192
© servo-Halbeck GmbH & Co.KG, 2006
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
1
2
3
None
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
193
© servo-Halbeck GmbH & Co.KG, 2006
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 processor followed by a response packet sent by the POSYS®.
Command 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.
194
© servo-Halbeck GmbH & Co.KG, 2006
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
The axis number contained in the upper bits of the instruction word
is not supported by this chip.
4
Invalid
parameter
The parameter value sent to the POSYS® was out of its acceptable
range.
5
Trace running
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.
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 SetBufferW riteIndex 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.
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.
195
© servo-Halbeck GmbH & Co.KG, 2006
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.
W hen 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. W hen 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.
W hen 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
196
© servo-Halbeck GmbH & Co.KG, 2006
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.
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
W hen 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
W hen 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 CAN 2.0B network and will coexist (but not
communicate) with CAN 2.0B nodes on that network. The POSYS® 18xx/19xx uses CAN to receive
commands, send responses and (optionally) send asynchronous event notifications. Each message
type has an address, as follows:
Message type
CAN Address
Command receive
0x600 + nodeID
Command response
0x580 + nodeID
Event notification
0x180 + nodeID
CAN nodes communicate via messages. Each message can carry a data payload of up to 8 bytes.
The CAN interface layer automatically corrects transmission errors, so a checksum is not a part of
the motion IC s CAN interface protocol as it is with serial or parallel.
197
© servo-Halbeck GmbH & Co.KG, 2006
The data formats for the three message types are expressed in terms of the byte sequences for
the parallel interface. Commands have varying data lengths; see the POSYS® Programmer´s
Command 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 CAN protocol for the 3 message types are as follows:
Command received
Message data byte
Required?
Corresponding parallel byte
1
Y
Command word, high byte
2
Y
Command 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
Command response
Message data byte
Required?
Corresponding parallel byte
1
Y
Command word, high byte
2
Y
Command 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
-o-
Configuring 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
198
© servo-Halbeck GmbH & Co.KG, 2006
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
CAN 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
CAN Event Notification
W hen communicating via the CAN 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® Event
Mask Bit
Motion complete
0001h
W rap-around
0002h
Breakpoint 1
0004h
Capture received
0008h
199
© servo-Halbeck GmbH & Co.KG, 2006
POSYS® Event
Mask Bit
Motion error
0010h
In positive limit
0020h
In negative limit
0040h
Instruction error
0080h
Commutation error
0800h
Breakpoint 2
4000h
-o-
Electrical Diagrams for CAN Interface
Electrical Diagrams for CAN Interface
CAN 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-
200
© servo-Halbeck GmbH & Co.KG, 2006
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 CP.
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:
201
© servo-Halbeck GmbH & Co.KG, 2006
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 CP.
-o-
Memory Page Pointer
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 ~W riteEnbl. 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, W riteBuffer
202
© servo-Halbeck GmbH & Co.KG, 2006
-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 ~W riteEnbl 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, W riteBuffer
-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.
W hen 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.
W hen 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 (corresponding to physical location 400h that falls just after the 1K reserved block) to
3FFFFFFFh (corresponding to physical address 7FFFFFFEh). 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. W hen 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
-o-
203
© servo-Halbeck GmbH & Co.KG, 2006
External Memory Commands
External memory commands
This section details host I/O commands which setup, access, and monitor the on-board memory.
Commands
Description
SetBufferStart bufferID, 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 adds address 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.
GetBufferStart buffered
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 0–15. 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.
GetBufferLength buffered
Returns the length of the specified buffer.
SetBufferReadIndex bufferID,
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. If index is not in this range, it is
not set, and an instruction error is generated.
GetBufferReadIndex bufferID
Returns the value of the read index for the specified buffer.
SetBufferW riteIndex bufferID,
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. If index is not in this range, it is
not set, and an instruction error is generated.
GetBufferW riteIndex bufferID
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.
W riteBuffer bufferID, value
W rites 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.
204
© servo-Halbeck GmbH & Co.KG, 2006
-o-
205
© servo-Halbeck GmbH & Co.KG, 2006
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
206
© servo-Halbeck GmbH & Co.KG, 2006
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)
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
-o-
Commutation 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 (PW M 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
PW M5050
3 (A, B, C)
3-phase
PW MSign/Mag
2 (A, B)
3-phase
DAC16
2 (A, B)
2-phase
PW M5050
2 (A, B)
2-phase
PW MSign/Mag
2 (A, B)
2-phase
DAC16
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.
207
© servo-Halbeck GmbH & Co.KG, 2006
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:
Counts_per_cycle = Counts_per_rot/Electrical_cycles
where:
Counts_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
208
© servo-Halbeck GmbH & Co.KG, 2006
pulse during the phase calculations any long term loss of encoder counts which might otherwise
affect the accuracy of the commutation are automatically eliminated.
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.
W hen 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.
Conversely, 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
W ith 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.
W hen 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.
209
© servo-Halbeck GmbH & Co.KG, 2006
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.
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.
210
© servo-Halbeck GmbH & Co.KG, 2006
The Hall-Sensor signals are fed back to the controller through the signals Hall1A-C (axis #1) and
Hall2A-C (axis #2), etc. Care 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).
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.
W hen in microstepping mode each trajectory count corresponds to 1/256 of a full electrical cycle.
211
© servo-Halbeck GmbH & Co.KG, 2006
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.
-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
SetNumberPhases p
Set the number of phases or the
Motor Type depending on the type of controller
SetPhaseCounts uuuu
Set # of encoder counts per electrical cycle.
SetPhaseInitializeMode Algorithmic Set phase initialization method to algorithmic.
SetMotorMode Off
Turn motor off so it doesn't conflict with initialization
procedure.
SetPhaseInitializeTime wwww
Set algorithmic phase init duration.
SetMotorCommand yyyy
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.
212
© servo-Halbeck GmbH & Co.KG, 2006
Hall-based Initialization Sequence
Command
Description
SetOutputMode m
Set the output mode
SetNumberPhases p
Set the number of phases or the
Motor Type depending on the type of controller
SetPhaseCounts uuuu
Set # of encoder counts per electrical cycle.
SetSignalSense vvvv
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
SetNumberPhases p
Set the number of phases or the
Motor Type depending on the type of controller
SetPhaseCounts 512
Set # of encoder counts per electrical cycle.
SetCommutationMode
Microstepping
Set controller for microstepping mode.
SetCaptureSource Index
Set capture mode to index (not necessary if already so
set).
ResetEventStatus 0
Clear axis status.
GetCaptureValue
Clear out any previous captures.
SetMotorMode On
Turn motor on (not necessary if already on).
SetMotorCommand xxxx
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.
SetAcceleration zzzz
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
213
© servo-Halbeck GmbH & Co.KG, 2006
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
SetNumberPhases p
Set the number of phases or the
Motor Type depending on the type of controller
SetPhaseCounts xxxx
Set the number of encoder counts per electrical cycle (hex).
SetPhaseAngle yyyy
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.
214
© servo-Halbeck GmbH & Co.KG, 2006
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. W ith 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.
215
© servo-Halbeck GmbH & Co.KG, 2006
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
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 PW M
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:
W hen 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
216
© servo-Halbeck GmbH & Co.KG, 2006
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.
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 PW M 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 PW M 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 PW M 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 PW M scheme has been chosen to allow convenient interfacing to half bridge type amplifiers
by connecting the PW M output to a level shifter circuit, and using this output to drive the high and
217
© servo-Halbeck GmbH & Co.KG, 2006
low side drivers of the bridge.
Set/GetNumberPhases, Set/GetMotorType
-o-
218
© servo-Halbeck GmbH & Co.KG, 2006
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
GetCommandedPosition
counts
micro-steps
Steps
GetCommandedVelocity
counts/cycle
micro-steps/cycle
steps/cycle
GetCommandedAcceleration
counts/cycle²
micro-steps/cycle²
steps/cycle²
Set/GetPositionErrorLimit
counts
micro-steps
Steps
GetPositionError
counts
micro-steps
steps
-oEncoder Feedback
Encoder feedback
219
© servo-Halbeck GmbH & Co.KG, 2006
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:
Command
Position Units = counts
Position Units = steps
Set/GetActualPosition
counts
steps/micro-steps
AdjustActualPosition
counts
steps/micro-steps
GetCaptureValue
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
220
© servo-Halbeck GmbH & Co.KG, 2006
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 counts per revolution
SetPositionErrorLimit
Set the desired error window in units of
steps/micro-steps
ClearPositionError
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.
221
© servo-Halbeck GmbH & Co.KG, 2006
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 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
222
© servo-Halbeck GmbH & Co.KG, 2006
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-
223
© servo-Halbeck GmbH & Co.KG, 2006
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, PW M 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 PW M 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
PWM Decoding
224
© servo-Halbeck GmbH & Co.KG, 2006
The PW M 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 PW M 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 PW M 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 PW M
cycle has a frequency of 78.124 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
225
© servo-Halbeck GmbH & Co.KG, 2006
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.
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
PW MSign/Mag
2 (A, B)
2-phase
DAC
2 (A, B)
3-phase
PW M50/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.
226
© servo-Halbeck GmbH & Co.KG, 2006
See the "Motor Output" section for more information.
-oMotor Command Control
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.
Changing 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.
W hen 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:
227
© servo-Halbeck GmbH & Co.KG, 2006
Commands
Function
Set/GetOutputMode
Sets the output to either PWM or DAC
Set/GetNumberPhases,
Set/GetMotorType
Sets the number of motor phases
Set/GetMotorCommand
Sets the amplitude of the output waveform. This is a
buffer command and requires an Update
Set/GetPhaseCounts
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.
-oMotor Drive Configurations
Motor Drive Configurations
Shown below is a typical amplifier configuration for a 2-phase stepper motor using either the PW M
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 PW M output mode is used the PW M 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 PW M output mode, a common method is to pass the PW M 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 PMW Mag signal from controller) as well
228
© servo-Halbeck GmbH & Co.KG, 2006
as a sign bit (PW MSign signal from controller). The amplifier in-turn performs current control
typically, using a fixed-off time PW M drive scheme.
The diagram below shows this amplifier scheme:
Relative to the DAC output method the PW M 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.
W hen 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-
229
© servo-Halbeck GmbH & Co.KG, 2006
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-175887-9 (Champ)
3M: 102A0-6212VC (Mini D-ribbon)
Right angle
connector
AMP: 2-178238-9 (Champ)
Shielded cable
connector
AMP: 1-176793-9 champ (shell)
AMP: 2-175677-9 champ (plug)
3M: N102A0-52E2VC
3M: 103A0-A200-00 (shell)
3M: 101A0-6000EL (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, POSYS® 8xx-B,
POSYS® 18xx, POSYS® 9xx and POSYS® 19xx.
-o-
230
© servo-Halbeck GmbH & Co.KG, 2006
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.
231
© servo-Halbeck GmbH & Co.KG, 2006
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.
The mechanical dimensions of the interconnect module are:
W ith enclosure for rail mounting: 162x112x50 mm
W ithout enclosure for rail mounting: 160x108x28 mm
The jumpers JP1, JP2, JP3 and JP4 must be inserted on pins 2-3.
The pins 101, 102, 103, 104 and 105 output 5 VDC with 1 Amp. max.
Connections 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
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
Pin
Pin
232
© servo-Halbeck GmbH & Co.KG, 2006
J1
J3
Description
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-
233
© servo-Halbeck GmbH & Co.KG, 2006
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:
234
© servo-Halbeck GmbH & Co.KG, 2006
Connector Description
s:
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/800-B/1800
J4, J5
2 x 50-position IDC connector, parallel to J1, for the POSYS® 800/800-B/1800. J4 is
for axes 1+2 (X/Y) and J5 is for axes 3+4 (Z/W).
The connectors of J4 (Pins 1-50) are connected parallel to those with the connectors
1-50 of J1.
The connectors of J5 (Pins 1-50) are connected parallel to those with the connectors
51-100 of J1.
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
VCC
VCC
VCC
VCC
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
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
235
© servo-Halbeck GmbH & Co.KG, 2006
Connector Description
s:
J21
J21 is a screw-type terminal with 36 connections. The connections are as following:
Connector Name
Description
1
5VDC/out
5 V output from the computer can be
connected with connector 4 to supply
encoders with 5V
2
DACV1
±10 V motor command output (only for
servo motors, X-axis)
3
XPLIM1-HV
positive limit switch input, X-axis, 24VDC
4
5VDC/in
VCC input for encoder supply voltage (5
VDC or 12 VDC)
5
DACV2
±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
DACV3
±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
DACV4
±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
236
© servo-Halbeck GmbH & Co.KG, 2006
Connector Description
s:
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 DACV1 to DACV4 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.
F1 and F2 are 1 Ampere fuses. The 5 VDC from the host and the external 5VDC and 12VDC are
being secured.
-o-
237
© servo-Halbeck GmbH & Co.KG, 2006
OPTON CON
Option CON with POSYS® PCI
W hen 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®
92x/93x/94x/95x/96x/97x/98x. 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 AW G 30, 0,635mm flat ribbon)
Plug
Harting: 60 03 068 52
Shell
Harting: 60 03 068 0155
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
PW M Magnitude 1A
1
35
PW M Magnitude 1B
PW M Magnitude 1C
2
36
GND
PW M Sign 1
3
37
GND
PW M Magnitude 2A
4
38
PW M Magnitude 2B
PW M Magnitude 2C
5
39
GND
PW M Sign 2
6
40
GND
PW M Magnitude 3A
7
41
PW M Magnitude 3B
PW M Magnitude 3C
8
42
GND
PW M Sign 3
9
43
GND
PW M Magnitude 4A
10
44
PW M Magnitude 4B
PW M Magnitude 4C
11
45
GND
PW M 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
238
© servo-Halbeck GmbH & Co.KG, 2006
Description
Pin number
Pin number
Beschreibung
Hall 3C
18
52
GND
Hall 4A
19
53
Hall 4B
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-
VCC (5V) Output
29
63
VCC (5V) Output
GND
30
64
GND
DACB1 (X-Axis)
31
65
DACA1 (X-Axis)
DACB2 (Y-Axis)
32
66
DACA2 (Y-Axis)
DACB3 (Z-Axis)
33
67
DACA3 (Z-Axis)
DACB4 (W-Axis)
34
68
DACA4 (W-Axis)
OPTION CON and OPTION CON "J9" with POSYS® PC/104
(only POSYS® 8xx-B/18xx)
W hen 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®
82x-B/83x-B/84x-B/85x-B/86x-B/87x-B/88x-B and for the POSYS® 182x/185x:
Part description
Manufacturer and part number
POSYS® PC/104:
female IDC with
cable 50-position
Samtec: ASP-53116-02
Pin
Connection Description
Pin Connectio
n
Description
1
BPWM1A
26
Phase B Hall Sensor input
(Y)
PW M magnitude Phase A (X)
239
HALL2B
© servo-Halbeck GmbH & Co.KG, 2006
Pin
Connection Description
Pin Connectio
n
Description
2
BPWM1B
PW M magnitude Phase B (X)
27
HALL2C
Phase C Hall Sensor input
(Y)
3
BPW M1C
PW M magnitude Phase C (X)
28
GND
Ground
4
BPWMS1A
PW M 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
PW M magnitude Phase A (Y)
31
HALL3C
Phase C Hall Sensor input
(Z)
7
BPWM2B
PW M magnitude Phase B (Y)
32
GND
Ground
8
BPW M2C
PW M magnitude Phase C (Y)
33
HALL4A
Phase A Hall Sensor input
(W)
9
BPWMS2A
PW M 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
PW M magnitude Phase A (Z)
36
GND
Ground
12
BPWM3B
PW M magnitude Phase B (Z)
37
AGND
Ground for motor command
13
BPW M3C
PW M magnitude Phase C (Z)
38
DAC1A
Motor command (X), ±10V
signal, Phase A
14
BPWMS3A
PW M sign Phase A (Z)
39
DAC2A
Motor command (Y), ±10V
signal, Phase A
15
GND
Ground
40
DAC3A
Motor command (Z), ±10V
signal, Phase A
16
BPWM4A
PW M magnitude Phase A (W ) 41
DAC4A
Motor command (W ), ±10V
signal, Phase A
17
BPWM4B
PW M magnitude Phase B (W ) 42
DAC1B
Motor command (X), ±10V
signal, Phase B
18
BPW M4C
PW M magnitude Phase C (W ) 43
DAC2B
Motor command (Y), ±10V
signal, Phase B
19
BPWMS4A
PW M sign Phase A (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
240
© servo-Halbeck GmbH & Co.KG, 2006
Pin
Connection Description
Pin Connectio
n
Description
24
GND
Ground
49
Vc1
+5V
25
HALL2A
Phase A Hall Sensor input (Y) 50
Vc1
+5V
-o-
241
© servo-Halbeck GmbH & Co.KG, 2006
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
PW M Sign / Magnitude
Pulse-width modulated signals with separate magnitude and sign
signals per output phase.
PW M 50/50
Pulse-width modulated square-wave signals with a single PW M 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® 7xx
POSYS® 7xx; Connections Summary - Motor Amplifiers
POSYS® 70x Series, in 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)
GP CON J6, 100-position Connector
Motor Command
Method
Signal
Connect to
Amp.
X-Axis
Y-Axis
Z-Axis
W-Axis
16 Bit DAC (±10
Volt)
DACV 1-4
Ref+ or V+
17
34
67
84
Analog Ground
AGND
Ref- or GND
18
35
68
85
PW M Sign +
Magnitude or
50/50 Output
BPW M 1-4
PW M
Magnitude
14
31
64
81
PW M Sign
BPWMS 1-4
PW M Sign
15
32
65
82
Digital Ground for
50/50
GND
GND
12
26
62
76
POSYS® 75x Series, Stepping Motor mode ONLY possible or microstepping with
appropriate type of drivers
GP CON J6, 100-position Connector
242
© servo-Halbeck GmbH & Co.KG, 2006
Motor Command
Method
Signal
Connect to
Amp.
X-Axis
Y-Axis
Z-Axis
W-Axis
Pulse (TTL)
Pulse 1-4
Pulse or Clock
14
31
64
81
Direction (TTL)
Dir 1-4
Direction input 15
32
65
82
In–Position (TTL)
AtRest 1-4
Standby
Current
34
67
84
17
-oPOSYS® 8xx/8xx-B/18xx
POSYS® 8xx/8xx-B; 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
PW M Sign / Magnitude
PW M signals for Sign/Magnitude mode per phase.
PW M 50/50
PW M 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
POSYS® 80x-B/81x-B/87x-B/88x-B
POSYS® 180x/182x (for correct interpretation: J7 = J5 and J1 = J6)
Connection
Motor output
method
POSYS®
8xx-B
connection
name
Amplifier
connection
Axis 1
Axis 2
Axis 3
Axis 4
DAC
DAC1-4A
Ref+ or V+
J7-17
J7-34
J1-17
J1-34
AGND
Ref- or Gnd
J7-18
J7-35
J1-18
J1-35
PW M
magnitude
J7-14
J7-31
J1-14
J1-31
PW MSign1-4A
PW M direction J7-15
J7-32
J1-15
J1-32
GND
Gnd
J7-26
J1-8
J1-26
PW M
PW MMag1-4A
sign/magnitude
PW M 50/50
J7-8
unused
243
© servo-Halbeck GmbH & Co.KG, 2006
DC Brushless Motor Connections (internal commutation)
POSYS® 82x-B/83x-B/87x-B/88x-B
POSYS® 182x (for correct interpretation: J7 = J5 and J1 = J6)
Connection
Motor output
method
POSYS®
8xx-B
connection
name
Amplifier
connection
DAC
DAC1-4A
PW M 50/50
Axis 1
Axis 2
Axis 3
Axis 4
Ref1+ or V1+ Option
Con-38
Option
Con-39
Option
Con-40
Option
Con-41
DAC1-4B
Ref2+ or V2+ Option
Con-42
Option
Con-43
Option
Con-44
Option
Con-45
AGND
Ref- or Gnd
Option
Con-37
Option
Con-46
Option
Con-37
Option
Con-46
PW MMag1-4A
PW M phase 1
Option
Con-1
Option
Con-6
Option
Con-11
Option
Con-16J131
PW MMag1-4B
PW M phase 2
Option
Con-2
Option
Con-7
Option
Con-12
Option
con-17
PW MMag1-4C
PW M phase 3
Option
Con-3
Option
Con-8
Option
Con-13
Option
Con-18
GND
Gnd
Option
Con-5
Option
Con-10
Option
Con-15
Option
Con-20
Axis 2
Axis 3
Axis 4
PW M
unused
sign/magnitude
Microstepping Motor Connections
POSYS® 84x-B/86x-B/87x-B/88x-B
POSYS® 182x (for correct interpretation: J7 = J5 and J1 = J6)
Connection
Motor output
method
POSYS®
8xx-B
connection
name
Amplifier
connection
Axis 1
DAC
DAC1-4A
Ref1+ or V1+ Option
Con-38
Option
Con-39
Option
Con-40
Option
Con-41
DAC1-4B
Ref2+ or V2+ Option
Con-42
Option
Con-43
Option
Con-44
Option
Con-45
AGND
Ref- or Gnd
Option
Con-46
Option
Con-37
Option
Con-46
Option
Con-37
244
© servo-Halbeck GmbH & Co.KG, 2006
Connection
Motor output
method
POSYS®
8xx-B
connection
name
Amplifier
connection
Axis 1
Axis 2
Axis 3
Axis 4
PW M
magnitude
Option
Con-1
Option
Con-6
Option
Con-11
Option
Con-16
PW MSign1-4A
PW M direction Option
Con-4
Option
Con-9
Option
Con-14
Option
Con-19
PW MMag1-4B
PW M
magnitude
Option
Con-2
Option
Con-7
Option
Con-12
Option
Con-17
PW MSign1-4B
PW M sign
Option
Con-3
Option
Con-8
Option
Con-13
Option
con-18
GND
Gnd
Option
Con-5
Option
Con-10
Option
Con-15
Option
Con-20
PW M
PW MMag1-4A
sign/magnitude
PW M 50/50
unused
Pulse & Direction Motor Connections or microstepping with appropriate type drivers
POSYS® 85x
POSYS® 85x-B
POSYS® 180x/182x/185x (for correct interpretation: J7 = J5 and J1 = J6)
Connection
Motor output
method
POSYS®
8xx-B
connection
name
Amplifier
connection
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
AtRest 1-4
Standby
Current
J7-17
J7-34
J1-17
J7-34
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
PW M Sign / Magnitude
PW M signals for Sign/Magnitude mode per phase.
PW M 50/50
PW M signals for 50/50 mode per phase.
Pulse & Direction
Pulse & Direction output signals
245
© servo-Halbeck GmbH & Co.KG, 2006
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) DACV 1-4
Ref+ or V+
17
34
67
84
Analog Ground
AGND
Ref- or GND
18
35
68
85
PW M Sign +
Magnitude oder
50/50 Output
BPW M 1-4
PW M Magnitude
14
31
64
81
PW M Sign
BPWMS 1-4
PW M 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
Motor command
method
Signal
connection to
amplifier
X-Axis
Y-Axis
Z-Axis
W-Axis
Pulse (TTL)
Pulse 1-4
Pulse or Clock
14
31
64
81
Direction (TTL)
Dir 1-4
Direction input
15
32
65
82
In –Position (TTL)
AtRest 1-4
Standby Current 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 with „Option Con“ J5.
OPTION CON J5, 68-position connector
246
© servo-Halbeck GmbH & Co.KG, 2006
Motor command
method
Signal
Connection to
amplifier
X-Axis
Y-Axis
Z-Axis
W-Axis
Pulse, (TTL)
Pulse 1-4
Pulse oder Clock
1
4
7
10
Direction, (TTL)
Dir 1-4
Direction input
3
6
9
12
Pulse+, Line Driver
Pulse+
1-4
Pulse+ oder
Clock+
21
22
23
24
Pulse- , Line Driver
Pulse – 1-4 Pulse– oder
Clock-
55
56
57
58
Direction+, Line
Driver
Dir+ 1-4
Direction+
25
26
27
28
Direction-
59
60
61
62
Standby Current
2
5
8
11
Direction-, Line Driver DirIn-Position, TTL
1-4
AtRest 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
DACV 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
DACB1-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
DACA1-4
Ref+ or V+
65
66
67
68
Analog Ground
AGNDA
(1-4)
Ref- or GND
64
64
64
64
247
© servo-Halbeck GmbH & Co.KG, 2006
Motor command
method
Signal
Connection to
amplifier
X-Axis
Y-Axis
Z-Axis
W-Axis
PW M 50/50
PW M
Magnitude
nA
PW M Phase 1
1
4
7
10
PW M 50/50
PW M
Magnitude
nB
PW M Phase 2
35
38
41
44
PW M 50/50
PW M
Magnitude
nC
PW M Phase 3
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
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
DACV 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
DACB 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
DACVA1-4
Ref+ or V+
65
66
67
68
Analog Ground
AGNDA
(1-4)
Ref- or GND
64
64
64
64
248
© servo-Halbeck GmbH & Co.KG, 2006
Motor command
method
Signal
Connection to
amplifier
X-Axis
Y-Axis
Z-Axis
W-Axis
PW M Magnitude
PW M
Magnitude
nA
PW M Magnitude
1
4
7
10
PW M Sign
PW M Sign
nA
PW M Direction
3
6
9
12
PW M Magnitude
PW M
Magnitude
nB
PW M Magnitude
35
38
41
44
PW M Sign
PW M Sign
nB
PW M Direction
2
5
8
11
PW M 50/50
PW M
Magnitude
nA
PW M Phase 1
1
4
7
10
PW M 50/50
PW M
Magnitude
nB
PW M Phase 2
35
38
41
44
PW M 50/50
PW M
Magnitude
nC
PW M Phase 3
2
5
8
11
Connections not specifically listed in these tables would be common to all models for the J5 and J6
connectors.
-o-
249
© servo-Halbeck GmbH & Co.KG, 2006
Command Overview - ReadIO/WriteIO
ReadIO / WriteIO
ReadIO, WriteIO
Valid only for POSYS® 7xx/8xx/8xx-B/18xx/9xx/19xx
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 W riteIO 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.
Card-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 W riteIO 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/W riteIO).
The following table shows the overall address map for the ReadIO and W riteIO functions supported
by the POSYS® cards.
I/O space
address offset
Register
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
Card 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 +2)
The following table details the +1 address amplifier & DAC enable register.
250
© servo-Halbeck GmbH & Co.KG, 2006
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
Change mask for bits 0-3: amplifier enable outputs
(1= change; 0 = don’t change)
12-14
unused
15
Change mask for DAC enable
(1= change; 0 = don’t change)
Reset Monitor control register (I/O space address +6)
The following table details the +6 address reset monitor register.
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
W atchdog 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)
251
© servo-Halbeck GmbH & Co.KG, 2006
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-
252
© servo-Halbeck GmbH & Co.KG, 2006
Environmental and Electrical Ratings
Environmental and Electrical Ratings
Environmental and Electrical Ratings
POSYS® 19xx
Dimensions:
PCI-Bus card; half size; (171.45 x 111.76 mm)
Storage temperature:
-40° to +125° C
Operating temperature:
0° to +70° C (default)
-40° to +85° C (extended temperature range as an option)
Power requirements:
4.8V to 5.25V operating range, 1 Amp
no load current: 0.6 A (no outputs on)
Supply voltage limits:
-0.3V to +7V
Analog Output Range:
-10.0V to +10.0V,
±5 mA min./Axis,
±20 mA max./Axis
Analog Input Range:
0V to 2.048V
Digital outputs drive
capacity:
DC output source or sink current: ±50 mA
Under voltage detection:
The under voltage supervisory device used is a MCP120T-475I.
Under voltage specs are Min: 4.50 V, Max: 4.75 V, Typical:
4.625 V .
POSYS® 9xx
Dimensions:
PCI-bus card, half-size (175 mm x 112 mm)
Storage temperature:
-40° to +125° C
Operating temperature:
0° to +70° C (default)
-40° to +85° C (extended temperature range as an option)
Power requirement:
4.8V to 5.25V operating voltage, 1 A (DACOutputs ON): 0.6 A
(DACOutputs OFF)
Supply voltage limits:
-0.3V to +7V
Analog output range:
-10.0 V to +10.0V, ±5 mA/axis, ±20 mA max./axis
Analog input range:
0 - 4.096V
Digital outputs drive
capacity:
DC output source or sink current: +/- 50 mA
Under voltage detection:
The under voltage supervisory device used is a MCP120T-475I.
Under voltage specs are Min: 4.50V, Max: 4.75V, Typical:
4.625V.
POSYS® 18xx
Dimensions:
standard PC/104 (96mm x 115.5mm) including overhang
Storage temperature:
-40° to +125° C
253
© servo-Halbeck GmbH & Co.KG, 2006
Operating temperature:
0° to +70° C (default)
-40° to +85° C (extended temperature range as an option)
Power requirement:
4.8V to 5.25 V operating voltage, 1 A (DACOutputs ON): 0.6 A
(DACOutputs OFF)
Supply voltage limits:
-0.3V to +7V
Analog output range:
-10.0V to +10.0V, ±5 mA/axis, ±20 mA max./axis
Analog input range:
0 - 2.048V
Digital outputs drive
capacity:
DC output source or sink current: +/- 50 mA
Under voltage detection:
The under voltage supervisory device used is a MCP120T-475I.
Under voltage specs are Min: 4.50V, Max: 4.75V, Typical:
4.625V.
POSYS® 8xx-B
Dimensions:
standard PC/104 (96mm x 115.5mm) including overhang
Storage temperature:
-40° to +125° C
Operating temperature:
0° to +70° C (default)
-40° to +85° C (extended temperature range as an option)
Power requirement:
4.8V to 5.25 V operating voltage, 1 A (DACOutputs ON): 0.6 A
(DACOutputs OFF)
Supply voltage limits:
-0.3V to +7V
Analog output range:
-10.0V to +10.0V, ±5 mA/axis, ±20 mA max./axis
Analog input range:
0 - 4.096V
Digital outputs drive
capacity:
DC output source or sink current: +/- 50 mA
Under voltage detection:
The under voltage supervisory device used is a MCP120T-475I.
Under voltage specs are Min: 4.50V, Max: 4.75V, Typical:
4.625V.
POSYS® 8xx
Dimensions:
PC/104 card, (96 x 90 mm)
Storage temperature:
-40° to +125° C
Operating temperature:
0° to +70° C (default)
-40° to +85° C (extended temperature range as an option)
Power supply voltage:
4.8V to 5.25V operating voltage, 1 A (DACOutputs ON): 0.6 A
(DACOutputs OFF)
Supply voltage limits:
-0.3V to +7V
Analog output range:
-10.0V to +10.0V, ±5 mA/axis, ±20 mA max./axis
Analog input range:
0 - 2.5V
Digital outputs drive
capacity:
DC output source or sink current: +/- 50 mA
254
© servo-Halbeck GmbH & Co.KG, 2006
Under voltage detection:
The under voltage supervisory device used is a MCP120T-475I.
Under voltage specs are Min: 4.50V, Max: 4.75V, Typical:
4.625V.
POSYS® 7xx
Dimensions:
ISA-bus card, half-size; (160 x 122 mm)
Storage temperature:
-40° to +125° C
Operating temperature:
0° to +70° C (default)
-40° to +85° C (extended temperature range as an option)
Power supply voltage:
4.8V to 5.25V operating voltage, 1 A (DACOutputs ON): 0.6 A
(DACOutputs OFF)
Supply voltage limits:
-0.3V to +7V
Analog output range:
-10.0V to +10.0V, ±5 mA/axis, ±20 mA max./axis
Analog input range:
0 - 2.5V
Digital outputs drive
capacity:
DC output source or sink current: +/- 50 mA
Under voltage detection:
The under voltage supervisory device used is a MCP120T-475I.
Under voltage specs are Min: 4.50V, Max: 4.75V, Typical:
4.625V.
-o-
255
© servo-Halbeck GmbH & Co.KG, 2006
Programmer's Manual
How to use this manual
Instruction Reference
How to use this reference
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
Types
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
Certain 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-
256
© servo-Halbeck GmbH & Co.KG, 2006
Commands
257
© servo-Halbeck GmbH & Co.KG, 2006
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:DW ORD):P1800_HANDLE;stdcall;
//only valid for POSYS 1800 equipped with Dual Port RAM
Function OpenDevice:word;
Function CloseDevice(hPosys :integer) :integer;stdcall;
Function DetectPosysDevices:word;stdcall;
Function RegisteredPosysDevices:word;stdcall;
Breakpoints & Interrupts
Procedure ClearInterrupt(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 ClearPositionError(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;
258
© servo-Halbeck GmbH & Co.KG, 2006
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;
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 W riteSSIRegister(hPosys:Thandle;axisID:word; resolution, frequency:word);stdcall;
Procedure ReadSSIRegister(hPosys:Thandle;axisID:word;var resolution:word;var
frequency:word);stdcall;
Procedure W riteSSIResolution(hPosys:Thandle;axisID:word;var resolution:word);stdcall;
Procedure ReadSSIResolution(hPosys:Thandle;axisID:word;var resolution:word);stdcall;
Procedure W riteSSIFrequency(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;
259
© servo-Halbeck GmbH & Co.KG, 2006
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 SetBufferW riteIndex(hPosys:Thandle;bufferID:word;index:integer);stdcall;
Function GetBufferW riteIndex(hPosys:Thandle;bufferID:word):integer;stdcall;
Procedure W riteBuffer(hPosys:Thandle;bufferID:word;value:integer);stdcall;
Function ReadDPRamLong(hPosys:Thandle;offset:dword):integer;stdcall;
Procedure W riteDPRamLong(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 SetPW MFrequency(hPosys:Thandle;axis,frequency:word);stdcall;
Function GetPW MFrequency(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;
260
© servo-Halbeck GmbH & Co.KG, 2006
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 GetSettleW indow(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetTrackingW indow(hPosys:Thandle;axis,window:word);stdcall;
Function GetTrackingW indow(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)
261
© servo-Halbeck GmbH & Co.KG, 2006
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;
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 W riteIO(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;
CompareActivity(hPosys:Thandle;axis:word;mask:integer);stdcall;
CompareEvent(hPosys:Thandle;axis:word;mask:integer);stdcall;
CompareSignal(hPosys:Thandle;axis:word;mask:integer);stdcall;
-o-
Card Initializing and Addressing
262
© servo-Halbeck GmbH & Co.KG, 2006
InitializePOSYS
InitializePOSYS
only valid for ISA-Bus and PC/104 cards (POSYS® 7xx, 8xx, 8xx-B and 18xx)
Syntax
InitializePOSYS(hPosys, cardAddress) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
CardHandle
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-
263
© servo-Halbeck GmbH & Co.KG, 2006
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)
CloseDevice(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® PCI 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.
CloseDevice(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).
264
© servo-Halbeck GmbH & Co.KG, 2006
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
CloseDevice(hPosys)
for all cards
-o-
265
© servo-Halbeck GmbH & Co.KG, 2006
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® PCI 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-
266
© servo-Halbeck GmbH & Co.KG, 2006
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
RegisteredPosysDevices will find all registered POSYS® ISA/PC-104 motion
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-
267
© servo-Halbeck GmbH & Co.KG, 2006
Breakpoints und Interrupts
ClearInterrupt
ClearInterrupt
Syntax
ClearInterrupt(hPosys) 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
Description
Pulse & Direction
ClearInterrupt resets 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.
W hen communicating using CAN, this command resets the interrupt message
sent flag. W hen 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.
W hen 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
ClearInterrupt(hPosys)
-o-
268
© servo-Halbeck GmbH & Co.KG, 2006
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
Pulse & Direction
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++, VB
Refer to the various import files (imp*.*)
MotionScript®
language
calling
convention
GetInterruptAxis(hPosys)
-o-
269
© servo-Halbeck GmbH & Co.KG, 2006
Set/GetBreakpoint
SetBreakpoint
GetBreakpoint
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
CardHandle
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
MotorOff
0
1
2
3
4
trigger
(none)
GreaterOrEqualCommandedPosition
LesserOrEqualCommandedPosition
GreaterOrEqualActualPosition
LesserOrEqualActualPosition
CommandedPositionCrossed
ActualPositionCrossed
Time
EventStatus
ActivityStatus
SignalStatus
0
1
2
3
4
5
6
7
8
9
Ah
270
Pulse & Direction
© servo-Halbeck GmbH & Co.KG, 2006
Description
SetBreakpoint establishes 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
no action
Update axis
SetStop axis, AbruptStop, Update axis
SetStop axis, SmoothStop, Update axis
SetMotorMode axis, Off, Update axis
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. W hen a breakpoint occurs the trigger
value will be reset to none. The CommandedPositionCrossed and the
ActualPositionCrossed 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) ALW AYS
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.
see
Set/GetBreakpointValue
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-
271
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
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
SetBreakpointValue sets 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
-231 to 231-1
counts
LesserOrEqualCommandedPosition
signed 32 bit
-231 to 231-1
counts
GreaterOrEqualActualPosition
signed 32 bit
-231 to 231-1
counts
LesserOrEqualActualPosition
signed 32 bit
-231 to 231-1
counts
CommandedPositionCrossed
signed 32 bit
-231 to 231-1
counts
ActualPositionCrossed
signed 32 bit
-231 to 231-1
counts
Time
unsigned 32 bit
0 to 232-1
cycles
EventStatus
2 word mask
-
Boolean
status values
ActivityStatus
2 word mask
-
Boolean
status values
SignalStatus
2 word mask
-
Boolean
status values
272
© servo-Halbeck GmbH & Co.KG, 2006
Description
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.
GetBreakpointValue returns 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*.*)
MotionScript®
language
calling
convention
SetBreakpointValue(hPosys, axis, breakpoint, value)
GetBreakpointValue(hPosys, axis, breakpoint)
-o-
273
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
value returned by call to OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
InterruptMask
Motion complete
0001h
W rap-around
0002h
Breakpoint 1
0004h
Capture received
0008h
Motion error
0010h
In positive limit
0020h
In negative limit
0040h
Instruction error
0080h
Commutation
error
0800h
Breakpoint 2
4000h
Description
Pulse & Direction
SetInterruptMask determines 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.
GetInterruptMask returns 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. W henever 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
ClearInterrupt, GetInterruptAxis
DLL: Delphi,
C++, VB
Refer to the various import files (imp*.*)
MotionScript®
language
calling
convention
SetInterruptMask(hPosys, axis, interruptMask)
GetInterruptMask(hPosys, axis)
-o-
274
© servo-Halbeck GmbH & Co.KG, 2006
275
© servo-Halbeck GmbH & Co.KG, 2006
Commutation
GetPhaseCommand
GetPhaseCommand
Syntax
GetPhaseCommand(hPosys, axis, phase) 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
phase
PhaseA
PhaseB
PhaseC
0
1
2
Name
Type
motor command
signed 16 bits
Returned Data
Description
Range
-215 to 215-1
Scaling
100/215
Units
% output
GetPhaseCommand returns 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-
276
© servo-Halbeck GmbH & Co.KG, 2006
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-
277
© servo-Halbeck GmbH & Co.KG, 2006
Set/GetCommutationMode
SetCommutationMode
GetCommutationMode
Syntax
SetCommutationMode(hPosys, axis, mode) stdcall
GetCommutationMode(hPosys, axis) stdcall
Motor type
Arguments
Description
DC Brushless
Name
Instance
Encoding
hPosys
CardHandle
value returned by call to
OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
mode
sinusoidal
hall-based
microstepping
0
1
2
SetCommutationMode sets the phase commutation mode for the specified
axis.
W hen set tosinusoidal, 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.
W hen set toHall-based the hall effect sensor inputs are used to commutate
the motor windings using a six-step or trapezoidal waveform method.
W hen set tomicrostepping the 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.
W hen 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-
278
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
value returned by call to
OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
mode
1Phase
2Phases
3Phases
1
2
3
SetNumberPhases establishes the number of phases, 1, 2 or 3, for
commutation of the specifiedaxis.
GetNumberPhases returns the number of phases set for the axis.
Restriction
In PW M Sign/Magnitude output mode, the number of phases can be set to 1
or 2.
In PW M 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-
279
© servo-Halbeck GmbH & Co.KG, 2006
Set/GetPhaseAngle
SetPhaseAngle
GetPhaseAngle
Syntax
SetPhaseAngle(hPosys, axis, angle) stdcall
GetPhaseAngle(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
Type
angle
Description
unsigned 16 bits
Range
0 to 215-1
Scaling
unity
Units
counts
microsteps
SetPhaseAngle sets the instantaneous commutation angle for the specified
axis.
GetPhaseAngle returns 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-
280
© servo-Halbeck GmbH & Co.KG, 2006
Set/GetPhaseCorrectionMode
SetPhaseCorrectionMode
GetPhaseCorrectionMode
Syntax
SetPhaseCorrectionMode(hPosys, axis, mode) stdcall
GetPhaseCorrectionMode(hPosys, axis) stdcall
Motor type
Arguments
Description
DC Brushless
Name
Instance
Encoding
hPosys
CardHandle
value returned by call to
OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
mode
disable
enable
0
1
SetPhaseC orrectionMode sets the phase correction mode for the specified
axis to either 0 (disabled) or 1 (enabled). W hen 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-
281
© servo-Halbeck GmbH & Co.KG, 2006
Set/GetPhaseCounts
SetPhaseCounts
GetPhaseCounts
Syntax
SetPhaseCounts(hPosys, axis, counts) stdcall
GetPhaseCounts(hPosys, axis) stdcall
Motor type
Arguments
DC Brushless
Microstepping
Name
Instance
Encoding
hPosys
CardHandle
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 215-1
Scaling
unity
Units
counts
steps
POSYS® 8xx-B/9xx:
Description
Range
0 to 215-1
Scaling
unity
Units
counts
steps
For POSYS® axes configured for DC Brushless motor types,
SetPhaseC ounts
sets 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 SetPhaseCorrectionMode
command).
For POSYS® axes configured for microstepping motor types, the number of
microsteps per full step is set using the commandSetPhaseC ounts. 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 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)
282
© servo-Halbeck GmbH & Co.KG, 2006
-o-
283
© servo-Halbeck GmbH & Co.KG, 2006
Set/GetPhaseInitializeMode
SetPhaseInitializeMode
GetPhaseInitializeMode
Syntax
SetPhaseInitializeMode(hPosys, axis, mode) stdcall
GetPhaseInitializeMode(hPosys, axis) stdcall
Motor type
Arguments
Description
DC Brushless
Name
Instance
Encoding
hPosys
CardHandle
value returned by call to
OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
mode
Algorithmic
Hall-based
0
1
SetPhaseInitializeMode establishes 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-
284
© servo-Halbeck GmbH & Co.KG, 2006
Set/GetPhaseInitializeTime
SetPhaseInitializeTime
GetPhaseInitializeTime
Syntax
SetPhaseInitializeTime(hPosys, axis, time) stdcall
GetPhaseInitializeTime(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
Type
time
Description
unsigned 16 bits
Range
0 to 215-1
Scaling
unity
Units
cycles
SetPhaseInitializeTime sets 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-
285
© servo-Halbeck GmbH & Co.KG, 2006
Set/GetPhaseOffset
SetPhaseOffset
GetPhaseOffset
Syntax
SetPhaseOffset(hPosys, axis, offset) stdcall
GetPhaseOffset(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
Type
time
unsigned 16 bits
POSYS® 18xx/19xx:
Range
-1 to 215-1
Scaling
unity
Units
counts
POSYS® 8xx-B/9xx:
Description
Range
0 to 215-1
Scaling
unity
Units
counts
SetPhaseOffset sets 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.
GetPhaseOffset returns 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-
286
© servo-Halbeck GmbH & Co.KG, 2006
Set/GetPhasePrescale
SetPhasePrescale
GetPhasePrescale
Syntax
SetPhasePrescale(hPosys, axis, scale) stdcall
GetPhasePrescale(hPosys, axis) stdcall
Motor type
Arguments
Description
DC Brushless
Name
Instance
Encoding
hPosys
CardHandle
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)
SetPhasePrescale controls scaling of the encoder counts before they are
used to calculate a commutation angle for the specified axis. W hen 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-
287
© servo-Halbeck GmbH & Co.KG, 2006
Digital Servo Filter
ClearPositionError
ClearPositionError
Syntax
ClearPositionError(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
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
ClearPositionError is 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
ClearPositionError(hPosys,axis)
-o-
288
© servo-Halbeck GmbH & Co.KG, 2006
DACOutputs
DACOutputsOn
DACOutputsOff
Syntax
DACOutputsOn(hPosys) stdcall
DACOutputsOff(hPosys) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
CardHandle
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 PW M outputs. The PW M 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-
289
© servo-Halbeck GmbH & Co.KG, 2006
GetAmpEnable
GetAmpEnable
Syntax
GetAmpEnable(hPosys) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
CardHandle
value returned by call to
OpenDevice
Name
Type
enabled1
enabled2
enabled3
enabled4
none
signed 16 bits
Returned Data
Description
Range
0 - 15
Returned Value
1
2
4
8
0
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-
290
Pulse &
Direction
© servo-Halbeck GmbH & Co.KG, 2006
GetDerivative
GetDerivative
Syntax
GetDerivative(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Arguments
Name
Instance
Encoding
hPosys
CardHandle
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
-215 to 215-1
Scaling
unity
Units
counts/cycle
GetDerivative returns 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-
291
© servo-Halbeck GmbH & Co.KG, 2006
GetIntegral
GetIntegral
Syntax
GetIntegral(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Arguments
Name
Instance
Encoding
hPosys
CardHandle
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
-231 to 231-1
Scaling
1/28
Units
counts*cycle
GetIntegral returns 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-
292
© servo-Halbeck GmbH & Co.KG, 2006
GetPositionError
GetPositionError
Syntax
GetPositionError(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
Name
Type
position error
signed 32 bits
Returned Data
Description
Pulse &
Direction
Range
-231 to 231-1
Scaling
unity
Units
counts
steps
GetPositionError returns 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).
W hen 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-
293
© servo-Halbeck GmbH & Co.KG, 2006
SetAmpDisable
SetAmpDisable
Syntax
SetAmpDisable(hPosys, disable) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
CardHandle
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-
294
© servo-Halbeck GmbH & Co.KG, 2006
SetAmpEnable
SetAmpEnable
Syntax
SetAmpEnable(hPosys, enable) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
CardHandle
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-
295
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
value returned by call to
OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
mode
Disable
Enable
0
1
Description
Pulse &
Direction
SetAutoStopMode determines the behavior of the specified axis when a
motion error occurs. W hen auto stop is enabled (SetAutoStopMode (enable)),
the axis goes into open-loop mode when a motion error occurs. W hen
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
W hen 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-
296
© servo-Halbeck GmbH & Co.KG, 2006
Set/GetBiQuadCofficient
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
CardHandle
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
-215 to 215-1
Scaling
unity
SetBiQuadCoefficient sets 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.
see
297
© servo-Halbeck GmbH & Co.KG, 2006
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-
298
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
value returned by call to
OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Type
time
Description
unsigned 16 bits
Range
0 to 215-1
Scaling
unity
Units
cycles
SetDerivativeTime sets 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-
299
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
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 231-1
Scaling
1/28
Units
counts*cycle
SetIntegrationLimit loads the integration-limit register of the digital servo
filter for the specified axis.
GetIntegrationLimit returns 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-
300
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
value returned by call to
OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Type
Kaff
Description
unsigned 16 bits
Range
0 to 215-1
Scaling
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-
301
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
value returned by call to
OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Type
Kd
Description
unsigned 16 bits
Range
0 to 215-1
Scaling
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-
302
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
value returned by call to
OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Type
Ki
Description
unsigned 16 bits
Range
0 to 215-1
Scaling
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-
303
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
value returned by call to
OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Type
Kout
Description
unsigned 16 bits
Range
0 to 216-1
Scaling
100/216
Units
% 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-
304
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
value returned by call to
OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Type
Kp
Description
unsigned 16 bits
Range
0 to 215-1
Scaling
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-
305
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
value returned by call to
OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Type
Kvff
Description
unsigned 16 bits
Range
0 to 215-1
Scaling
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-
306
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
value returned by call to
OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Type
bias
Description
signed 16 bits
Range
-215 to 215-1
Scaling
100/215
Units
% output
SetMotorBias sets the bias voltage of the digital servo filter for the specified
axis.
GetMotorBias reacts 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 0FCCDh.
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-
307
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
value returned by call to
OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Type
limit
Description
unsigned 16 bits
Range
0 to 215-1
Scaling
100/215
Units
% output
SetMotorLimit sets 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.
GetMotorLimit reads 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. W hen 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-
308
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
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 231-1
Scaling
unity
Units
counts
SetPositionErrorLimit sets 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-
309
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
value returned by call to
OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Type
Kp
Description
unsigned 16 bits
Range
0 to 215-1
Scaling
unity
This modified trapezoidal profile produces an S-Curve 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. W hen set to 32767 the gain is “unity” and results in no filtered output.
For values below 32767 the trajectory is filtered accordingly.
SetProfileKp sets this proportional acceleration gain parameter for the
specified axis. The command is available in trapezoidal, electronic geraing and
velocity mode.
GetProfileKp returns 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. 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-
310
© servo-Halbeck GmbH & Co.KG, 2006
Encoder
AdjustActualPosition
AdjustActualPosition
Syntax
AdjustActualPosition(hPosys, axis, position) 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
Type
position
Description
signed 32 bits
Range
-231 to 231-1
Scaling
unity
Units
counts
steps
The position specified as the parameter toAdjustActualPosition is 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-
311
© servo-Halbeck GmbH & Co.KG, 2006
GetAbsoluteSSIPosition
GetAbsoluteSSIPosition
Syntax
GetAbsoluteSSIPosition(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
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/W riteSSIResolution,
Read/W riteSSIRegister, Read/W riteSSIFrequency, SetActualToAbsolutePosition
DLL: Delphi,
C++, VB
Refer to the various import files (imp*.*)
MotionScript®
language
calling
convention
GetAbsoluteSSIPosition(hPosys, axis)
-o-
312
© servo-Halbeck GmbH & Co.KG, 2006
GetActualVelocity
GetActualVelocity
Syntax
GetActualVelocity(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
Name
Type
velocity
signed 32 bits
Returned Data
Description
Pulse &
Direction
Range
-231 to 231-1
Scaling
1/216
Units
counts/cycle
GetActualVelocity reads 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-
313
© servo-Halbeck GmbH & Co.KG, 2006
GetCaptureValue
GetCaptureValue
Syntax
GetCaptureValue(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
Returned Data
Type
captured position
Description
Pulse &
Direction
signed 32 bits
Range
-231 to 231-1
Scaling
unity
Units
counts
steps
GetCaptureValue returns the contents of the Position Capture 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-
314
© servo-Halbeck GmbH & Co.KG, 2006
GetSSIVersion
GetSSIVersion
Syntax
GetSSIVersion(hPosys) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
CardHandle
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/W riteSSIResolution, Read/W riteSSIRegister, Read/W riteSSIFrequency,
SetActualToAbsolutePosition
DLL: Delphi,
C++, VB
Refer to the various import files (imp*.*)
MotionScript®
language
calling
convention
GetSSIVersion(hPosys)
-o-
315
© servo-Halbeck GmbH & Co.KG, 2006
Read/WriteSSIFrequency
WriteSSIFrequency
ReadSSIFrequency
Syntax
W riteSSIFrequency(hPosys, axis, resolution) stdcall
ReadSSIFrequency(hPosys, axis, resolution) 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
frequency
1100 KHz
550 KHz
275 KHz
137.5 KHz
1100
550
275
137
Description
Pulse &
Direction
WriteSSIFrequency overwrites 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 system is running and motors and
drivers 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/W riteSSIResolution, Read/W riteSSIRegister, SetActualToAbsolutePosition
DLL: Delphi,
C++, VB
Refer to the various import files (imp*.*)
MotionScript®
language
calling
convention
W riteSSIFrequency(hPosys, axis, resolution)
ReadSSIFrequency(hPosys, axis, resolution)
-o-
316
© servo-Halbeck GmbH & Co.KG, 2006
Read/WriteSSIRegister
WriteSSIRegister
ReadSSIRegister
Syntax
W riteSSIRegister(hPosys, axis, resolution, frequency) stdcall
ReadSSIRegister(hPosys, axis, resolution, frequency) 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
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
WriteSSIRegister overwrites 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 system is running and motors and
drivers 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/W riteSSIResolution, Read/W riteSSIFrequency,
SetActualToAbsolutePosition
DLL: Delphi,
C++, VB
Refer to the various import files (imp*.*)
MotionScript®
language
calling
convention
W riteSSIRegister(hPosys, axis, resolution, frequency)
ReadSSIRegister(hPosys, axis, resolution, frequency)
-o-
317
© servo-Halbeck GmbH & Co.KG, 2006
Read/WriteSSIResolution
WriteSSIResolution
ReadSSIResolution
Syntax
W riteSSIResolution(hPosys, axis, resolution) stdcall
ReadSSIResolution(hPosys, axis, resolution) 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
resolution
25
13
12
10
25
13
12
10
Description
bits
bits
bits
bits
Pulse &
Direction
WriteSSIResolution overwrites 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 system is running and motors and
drivers 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/W riteSSIRegister, Read/W riteSSIFrequency, SetActualToAbsolutePosition
DLL: Delphi,
C++, VB
Refer to the various import files (imp*.*)
MotionScript®
language
calling
convention
W riteSSIResolution(hPosys, axis, resolution)
ReadSSIResolution(hPosys, axis, resolution)
-o-
318
© servo-Halbeck GmbH & Co.KG, 2006
ResetSSI
ResetSSI
Syntax
ResetSSI(hPosys) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
CardHandle
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/W riteSSIResolution, Read/W riteSSIRegister, Read/W riteSSIFrequency,
SetActualToAbsolutePosition
DLL: Delphi,
C++, VB
Refer to the various import files (imp*.*)
MotionScript®
language
calling
convention
ResetSSI(hPosys)
-o-
319
© servo-Halbeck GmbH & Co.KG, 2006
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
otherwise 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/W riteSSIResolution, Read/W riteSSIRegister, Read/W riteSSIFrequency,
SetActualToAbsolutePosition, Set/GetActualPosition
DLL: Delphi,
C++, VB
Refer to the various import files (imp*.*)
MotionScript®
language
calling
convention
SetActualToAbsolutePosition(hPosys, axis)
-o-
320
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
value returned by call to
OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Pulse &
Direction
Type
position
Description
signed 32 bit
Range
-231 to 231-1
Scaling
unity
Units
counts
steps
SetActualPosition loads 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.
SetActualPosition takes effect immediately, it is not buffered.
GetActualPosition reads 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*.*)
321
© servo-Halbeck GmbH & Co.KG, 2006
MotionScript®
language
calling
convention
SetActualPosition(hPosys, axis, position)
GetActualPosition(hPosys, axis)
-o-
322
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
value returned by call to
OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
mode
counts
steps
0
1
SetActualPositionUnits determines the units used by the GetActualPosition,
AdjustActualPosition and GetCaptureValue when it returns the axis position for
the specified axis. W hen set to Counts GetActualPosition returns the axis
position in encoder counts. W hen 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-
323
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
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-
324
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
value returned by call to
OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
source
index
home
0
1
Description
Pulse &
Direction
SetCaptureSource determines 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-
325
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
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 216-1
Scaling
unity
Units
counts
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-
326
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
value returned by call to
OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
source
incremental
parallel
none
loopback
0
1
2
3
Description
Pulse &
Direction
SetEncoderSource sets the type, of feedback (incremental quadrature
encoder or parallel-word (option)) for the specified axis. W hen incremental
quadrature is selected the POSYS® expects A and B quadrature signals to be
input at the I/O chip. W hen 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.
W hen motor type is set to Pulse & Direction and the encoder source is set to
Loopback, 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.
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-
327
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
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 215-1
Scaling
unity
Units
counts
Range
0 to 215-1
Scaling
unity
Units
steps
SetEncoderToStepRatio sets 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. Counts 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-
328
© servo-Halbeck GmbH & Co.KG, 2006
On-Board RAM
329
© servo-Halbeck GmbH & Co.KG, 2006
DisableDPRam
DisableDPRam
Syntax
DisableDPRam(hPosys) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
CardHandle
value returned by call to
OpenDevice
Pulse &
Direction
Result
Deactivates the Dual Port RAM Mode thru the ISA-Bus.
Description
DisableDPRam deactivates 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 PCs 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, W riteDPRamLong
DLL: Delphi,
C++, VB
Refer to the various import files (imp*.*)
MotionScript®
language
calling
convention
DisableDPRam(hPosys)
-o-
330
© servo-Halbeck GmbH & Co.KG, 2006
EnableDPRam
EnableDPRam
Syntax
EnableDPRam(hPosys) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
CardHandle
value returned by call to
OpenDevice
Pulse &
Direction
Result
Activates the Dual Port RAM Mode thru the ISA-Bus.
Description
EnableDPRam activates the DPRAM on the POSYS® 1800. The on-board
memory can then be accessed via the ISA-Bus as well thru the motion
processor. W ithout 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 PCs 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, W riteDPRamLong
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
CardHandle
value returned by call to
OpenDevice
Pulse &
Direction
Type
bufferID
unsigned 16 Bit
331
Range
0 to 31
Scaling
unity
Units
-
© servo-Halbeck GmbH & Co.KG, 2006
Returned Data
Type
data
signed 32 Bit
Range
-231 to 231-1
Scaling
unity
Units
-
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
see
Set/GetBufferReadIndex, W riteBuffer, Set/GetBufferStart, Set/GetBufferLength
DLL: Delphi,
C++, VB
Refer to the various import files (imp*.*)
MotionScript®
language
calling
convention
ReadBuffer(hPosys, bufferID)
-o-
332
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
value returned by call to
OpenDevice
offset
unsigned 32 Bit
Memory base address + offset
Returned Data
Pulse &
Direction
Type
data
signed 32 Bit
Range
-231 to 231-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
W riteDPRamLong, EnableDPRam, DisableDPRam
DLL: Delphi,
C++, VB
Refer to the various import files (imp*.*)
MotionScript®
language
calling
convention
ReadDPRamLong(hPosys,offset)
-o-
333
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
value returned by call to
OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
function
Position
Velocity
Acceleration
Jerk
Time
0
1
2
3
4
Type
Range
signed 16 bits
-1 to 31
bufferID
Description
Pulse &
Direction
SetBufferFunction sets 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-
334
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
value returned by call to
OpenDevice
Description
Type
Range
bufferID
unsigned 16 bit
0 to 31
length
unsigned 32 bit
1 to 230-1
Pulse &
Direction
SetBufferLength sets 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 beyond 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-
335
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
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
SetBufferReadIndex sets 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-
336
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
value returned by call to
OpenDevice
Type
Range
bufferID
unsigned 16 bit
0 to 31
address
unsigned 32 bit
29 to 231-1 for cards with more
than 32 KB DPRAM
Pulse &
Direction
0 to 231-1 for cards with 32 KB
DPRAM or 512 KB/1MB SPRAM
Description
SetBufferStart sets the starting address for the specified buffer.
The buffer
start address must be 200h or greaterfor POSYS® with more than 32
KB RAM. The start address for POSYS® with 32 KB RAM 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 beyond the end of physical 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-
337
© servo-Halbeck GmbH & Co.KG, 2006
Set/GetBufferWriteIndex
SetBufferWriteIndex
GetBufferWriteIndex
Syntax
SetBufferW riteIndex(hPosys, bufferID, index) stdcall
GetBufferW riteIndex(hPosys, bufferID) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
CardHandle
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
SetBufferWriteIndex sets 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
SetBufferW riteIndex(hPosys, bufferID, index)
GetBufferW riteIndex(hPosys, bufferID)
-o-
338
© servo-Halbeck GmbH & Co.KG, 2006
WriteBuffer
WriteBuffer
Syntax
W riteBuffer(hPosys, bufferID, value) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
CardHandle
value returned by call to
OpenDevice
POSYS® 18xx,
19xx
Type
Range
bufferID
unsigned 16 bits
0 to 31
value
signed 32 bits
-231 to 231-1
POSYS® 7xx,
8xx, 8xx-B, 9xx
Type
Range
bufferID
unsigned 16 bits
0 to 15
value
signed 32 bits
-231 to 231-1
Description
Pulse &
Direction
WriteBuffer writes 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
SetBufferW riteIndex). 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
W riteBuffer(hPosys, bufferID, value)
-o-
339
© servo-Halbeck GmbH & Co.KG, 2006
WriteDPRAMLong
WriteDPRamLong
only valid for POSYS® 18xx/19xx with Dual Port RAM
Syntax
W riteDPRamLong(hPosys,offset,value) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
CardHandle
value returned by call to
OpenDevice
offset
unsigned 32 Bit
memory base address + offset
value
signed 32 Bit
Range
-231 to 231-1
Scaling
Unity
Units
-
Pulse &
Direction
Description
W rites 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
W riteDPRamLong(hPosys,offset,value)
-o-
340
© servo-Halbeck GmbH & Co.KG, 2006
Motor Output
GetCurrentMotorCommand
GetCurrentMotorCommand
Syntax
GetCurrentMotorCommand(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
Name
Type
Motor output
command
signed 16 bits
Returned Data
Description
Range
-215 to 215-1
Scaling
100/215
Units
% 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 GetCurrentMotorCommand, 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-
341
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
value returned by call to
OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Type
value
Description
signed 16 bits
Range
-215 to 215-1
Scaling
100/215
Units
% output
SetMotorC ommand loads 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.
GetMotorCommand reads 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
SetMotorCommand 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-
342
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
value returned by call to
OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
mode
off
on
0
1
Description
Pulse &
Direction
SetMotorMode determines the mode of motor operation. W hen 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
ClearPositionError command.
W hen 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-
343
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
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
SetMotorType sets 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-
344
© servo-Halbeck GmbH & Co.KG, 2006
345
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
value returned by call to
OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
mode
Bipolar DAC
PW MSignMagnitude
PW M5050Magnitud
e
SPIDAC
Unipolar DAC
0
1
2
3 (only POSYS® 18xx/19xx)
4 (only POSYS® 18xx/19xx)
Description
SetOutputMode determines 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-
346
© servo-Halbeck GmbH & Co.KG, 2006
Set/GetPWMFrequency
SetPWMFrequency
GetPWMFrequency
only valid for POSYS® 18xx/19xx
Syntax
SetPW MFrequency(hPosys, axis, frequency) stdcall
GetPW MFrequency(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
Type
frequency
Description
unsigned 16 bits
Range
0 to 216-1
Scaling
1/28
Units
kHz
SetPWMFrequency sets the PW M 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 SetPW MFrequency 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
Controller.
see
Set/GetOutputMode
DLL: Delphi,
C++, VB
Refer to the various import files (imp*.*)
MotionScript®
language
calling
convention
SetPW MFrequency(hPosys, axis, frequency)
GetPW MFrequency(hPosys, axis)
-o-
347
© servo-Halbeck GmbH & Co.KG, 2006
Set/GetStepRange
SetStepRange
GetStepRange
Syntax
SetStepRange(hPosys, axis, frequency) stdcall
GetStepRange(hPosys, axis) stdcall
Motor type
Arguments
Description
Pulse &
Direction
Name
Instance
Encoding
hPosys
CardHandle
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
SetStepRange sets 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-
348
© servo-Halbeck GmbH & Co.KG, 2006
Profile Generation
GetCommandedAcceleration
GetCommandedAcceleration
Syntax
GetCommandedAcceleration(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
Name
Type
acceleration
signed 32 bits
Returned data
Description
Pulse &
Direction
Range
-231 to 231-1
Scaling
1/216
Units
counts/cycle²
steps/cycle²
GetCommandedAcceleration returns the commanded acceleration value for
the specified axis.
Commanded 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-
349
© servo-Halbeck GmbH & Co.KG, 2006
GetCommandedPosition
GetCommandedPosition
Syntax
GetCommandedPosition(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
Name
Type
position
signed 32 bits
Returned Data
Description
Pulse &
Direction
Range
-231 to 231-1
Scaling
unity
Units
counts
steps
GetCommandedPosition returns the current commanded position for the
specified axis. Commanded 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-
350
© servo-Halbeck GmbH & Co.KG, 2006
GetCommandedVelocity
GetCommandedVelocity
Syntax
GetCommandedVelocity(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
Name
Type
velocity
signed 32 bits
Returned Data
Description
Pulse &
Direction
Range
-231 to 231-1
Scaling
1/216
Units
counts/cycle
Steps/cycle
GetCommandedVelocity returns the current commanded velocity value for
the specified axis. Commanded 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-
351
© servo-Halbeck GmbH & Co.KG, 2006
MultiUpdate
MultiUpdate
Syntax
MultiUpdate(hPosys, mask) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
CardHandle
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: ClearPositionError.
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 Command parameter is buffered: MotorCommand
Restriction
see
Update
DLL: Delphi,
C++, VB
Refer to the various import files (imp*.*)
MotionScript®
language
calling
convention
MultiUpdate(hPosys, mask)
-o-
352
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
value returned by call to
OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Name
Type
acceleration
unsigned 32 bit
Description
Pulse &
Direction
Range
0 to 231-1
Scaling
1/216
Units
counts/cycle²
steps/cycle²
SetAcceleration loads the maximum acceleration buffer register for the
specified axis. This command is used with the Trapezoidal, Velocity
Contouring, and S-profiling modes.
GetAcceleration reads 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 C000h 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-
353
© servo-Halbeck GmbH & Co.KG, 2006
354
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
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 231-1
Scaling
1/216
Units
counts/cycle²
steps/cycle²
SetDeceleration loads the maximum deceleration buffer register for the
specified axis.
GetDeceleration reads 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-
355
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
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
SetGearMaster establishes the slave (axis) and master (masterAxis) axes for
the electronic-gearing profile, and sets the source, Actual or Commanded, 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-
356
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
value returned by call to
OpenDevice
slaveAxis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Pulse &
Direction
Type
ratio
Description
signed 32 bits
Range
-231 to 231-1
Scaling
1/216
Units
Slavecounts/
Mastercounts
SetGearRatio sets 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).
GetGearRatio returns 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-
357
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
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 231-1
Scaling
1/232
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
32
.012345 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-
358
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
value returned by call to
OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Pulse &
Direction
Type
position
Description
signed 32 bits
Range
-231 to 231-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-
359
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
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
SetProfileMode sets the profile mode, selecting Trapezoidal, Velocity
Contouring, 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-
360
© servo-Halbeck GmbH & Co.KG, 2006
Set/GetStartVelocity
SetStartVelocity
GetStartVelocity
Syntax
SetStartVelocity(hPosys, axis, velocity) stdcall
GetStartVelocity(hPosys, axis) stdcall
Motor type
Arguments
Microstepping
Pulse &
Direction
Name
Instance
Encoding
hPosys
CardHandle
value returned by call to
OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Type
velocity
Description
unsigned 32 bits
Range
0 to 231-1
Scaling
1/216
Units
counts/cycle
steps/cycle
SetStartVelocity loads the starting velocity buffer register for the specified
axis.
GetStartVelocity reads 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 C000h 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-
361
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
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
SetStopMode stops 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-
362
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
value returned by call to
OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Pulse &
Direction
Type
velocity
Description
signed 32 bits
Range
-231 to 231-1
Scaling
1/216
Units
counts/cycle
steps/cycle
SetVelocity loads the maximum velocity buffer register for the specified axis.
GetVelocity returns 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 C000h 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-Contouring 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-
363
© servo-Halbeck GmbH & Co.KG, 2006
Update
Update
Syntax
Update(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
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: ClearPositionError.
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-
364
© servo-Halbeck GmbH & Co.KG, 2006
Servo Loop Control
GetTime
GetTime
Syntax
GetTime(hPosys) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
CardHandle
value returned by call to
OpenDevice
Name
Type
time
unsigned 32 bits
Returned Data
Description
Pulse &
Direction
Range
0 to 232-1
Scaling
unity
Units
cycles
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-
365
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
value returned by call to
OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
mode
off
on
0
1
Description
Pulse &
Direction
SetAxisMode enables (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-
366
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
value returned by call to
OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
mode
off
on
0
1
Description
Pulse &
Direction
SetLimitSwitchMode enables (On) or disables (Off) limit-switch sensing for
the specified axis. W hen 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. W hen 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-
367
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
value returned by call to
OpenDevice
axis
Axis1
Axis2
Axis3
Axis4
0
1
2
3
mode
commanded
actual
0
1
Description
Pulse &
Direction
SetMotionC ompleteMode establishes the source for the comparison which
determines the motion-complete status for the specified axis. W hen 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.
W hen 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
W indow (SetSettleW indow 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/GetSettleW indow
DLL: Delphi,
C++, VB
Refer to the various import files (imp*.*)
MotionScript®
language
calling
convention
SetMotionCompleteMode(hPosys, axis, mode)
GetMotionCompleteMode(hPosys, axis)
-o-
368
© servo-Halbeck GmbH & Co.KG, 2006
Set/GetSampleTime
SetSampleTime
GetSampleTime
Syntax
SetSampleTime(hPosys, time) stdcall
GetSampleTime(hPosys) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
CardHandle
value returned by call to
OpenDevice
POSYS®
18xx/19xx
Type
time
unsigned 32 bits
Description
POSYS® 7xx,
8xx, 8xx-B, 9xx
Type
time
unsigned 16 bits
Pulse &
Direction
Range
51 to 220
Scaling
unity
Units
µsec/cycle
Range
1 to 215-1
Scaling
unity
Units
µsec/cycle
SetSampleTime sets 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 51.2 microseconds; the time value passed
to this command will be rounded up to the nearest increment of this base
value.
GetSampleTime returns 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
51.2 µ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
POSYS® 7xx, 8xx, 8xx-B and 9xx series
# enabled axes
Minimum cycle time
brushed and stepper
versions
Minimum cycle time
brushless DC and
microstepping versions
Maximum cycle
frequency brushed
and stepper versions
Maximum cycle
frequency
brushless 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
369
© servo-Halbeck GmbH & Co.KG, 2006
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
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++, VB
Refer to the various import files (imp*.*)
MotionScript®
language
calling
convention
SetSampleTime(hPosys, time)
GetSampleTime(hPosys)
-o-
370
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
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 215-1
Scaling
unity
Units
cycles
SetSettleTime sets 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/GetSettleW indow, GetActivityStatus
DLL: Delphi,
C++, VB
Refer to the various import files (imp*.*)
MotionScript®
language
calling
convention
SetSettleTime(hPosys, axis, time)
GetSettleTime(hPosys, axis)
-o-
371
© servo-Halbeck GmbH & Co.KG, 2006
Set/GetSettleWindow
SetSettleWindow
GetSettleWindow
Syntax
SetSettleW indow(hPosys, axis, window) stdcall
GetSettleW indow(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
Description
POSYS® 18xx,
19xx
Type
window
unsigned 16 bits
POSYS® 7xx,
8xx, 8xx-B, 9xx
Type
window
unsigned 16 bits
Pulse &
Direction
Range
0 to 216-1
Scaling
unity
Units
counts
Range
0 to 215-1
Scaling
unity
Units
counts
SetSettleWindow sets 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
SetSettleW indow(hPosys, axis, window)
GetSettleW indow(hPosys, axis)
-o-
372
© servo-Halbeck GmbH & Co.KG, 2006
Set/GetTrackingWindow
SetTrackingWindow
GetTrackingWindow
Syntax
SetTrackingW indow(hPosys, axis, window) stdcall
GetTrackingW indow(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
Description
POSYS®
18xx/19xx
Type
window
unsigned 16 bits
POSYS® 7xx,
8xx, 8xx-B, 9xx
Type
window
unsigned 16 bits
Pulse &
Direction
Range
0 to 216-1
Scaling
unity
Units
counts
Range
0 to 215-1
Scaling
unity
Units
counts
SetTrackingWindow sets 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. W hen 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
SetTrackingW indow(hPosys, axis, window)
GetTrackingW indow(hPosys, axis)
-o-
373
© servo-Halbeck GmbH & Co.KG, 2006
Status Register and AxisOut Indicator
GetActivityStatus
GetActivityStatus
Syntax
GetActivityStatus(hPosys, axis) stdcall
Motor type
DC Brush
DC Brushless
Arguments
Name
Instance
hPosys
CardHandle
Microstepping
Pulse & Direction
Encoding
value returned by call to
OpenDevice
axis
Returned Data
Axis1
Axis2
Axis3
Axis4
0
1
2
3
Type
status
unsigned 16 bits
374
see below
© servo-Halbeck GmbH & Co.KG, 2006
Description
GetActivityStatus reads 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
Current profile
mode
3-5
Contains trajectory mode encoded
as mode follows:
Bit 1
Bit 2
Bit 3
Profile
Mode
0
0
0
Trapezoid
al
0
0
1
Velocity
contourin
g
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 active
In negative limit
12
Set to 1 when the negative limit
switch is active
Profile segment
13-15
375
Only used during S-curve profile
mode. Contains value of 0 when the
profile is at rest. Contains phase
number 1-7 when profile is in
motion.
© servo-Halbeck GmbH & Co.KG, 2006
Restriction
see
GetEventStatus, GetSignalStatus, ResetEventStatus
DLL: Delphi,
C++, VB
Refer to the various import files (imp*.*)
MotionScript®
language
calling
convention
GetActivityStatus(hPosys, axis)
-o-
376
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
value returned by call to
OpenDevice
statID
InOutHomeStatus
01
Description
Pulse &
Direction
GetAxis_In_Out_Home returns 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 - W atchdog
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-
377
© servo-Halbeck GmbH & Co.KG, 2006
GetEventStatus
GetEventStatus
Syntax
GetEventStatus(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
Name
Type
Encoding
status
unsigned 16 bits
see below
Returned Data
Description
Pulse &
Direction
GetEventStatus reads 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.
W rap-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
Capture 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
Commutation 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
378
© servo-Halbeck GmbH & Co.KG, 2006
Restriction
All of the 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
DLL: Delphi,
C++, VB
Refer to the various import files (imp*.*)
MotionScript®
language
calling
convention
GetEventStatus(hPosys, axis)
-o-
379
© servo-Halbeck GmbH & Co.KG, 2006
GetSignalStatus
GetSignalStatus
Syntax
GetSignalStatus(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
Name
Type
see below
unsigned 16 bits
Returned Data
Description
Pulse &
Direction
GetSignalStatus returns 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. Conversely 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-
380
© servo-Halbeck GmbH & Co.KG, 2006
381
© servo-Halbeck GmbH & Co.KG, 2006
ResetEventStatus
ResetEventStatus
Syntax
ResetEventStatus(hPosys, axis, mask) 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
mask
Motion Complete
Wrap-Around
Breakpoint 1
Capture Received
Motion Error
In positive Limit
In negative Limit
Instruction Error
Commutation Error
Breakpoint 2
0001h
0002h
0004h
0008h
0010h
0020h
0040h
0080h
0800h
4000h
Description
Pulse &
Direction
ResetEventStatus clears (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.
Restriction
see
GetEventStatus
DLL: Delphi,
C++, VB
Refer to the various import files (imp*.*)
MotionScript®
language
calling
convention
ResetEventStatus(hPosys, axis, mask)
-o-
382
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
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
383
Pulse &
Direction
© servo-Halbeck GmbH & Co.KG, 2006
Description
SetAxisOutSource maps 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).
W hen
the AxisOutSource is set to disabled, the AxisOut signal can be set high or low
using SetSignalSense bit 10.
GetAxisOutSource reads 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
W rap-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
Commutation 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, bit, register)
GetAxisOutSource(hPosys, axis)
-o-
384
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
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
SetSignalSense establishes 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.
W hen 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.
385
© servo-Halbeck GmbH & Co.KG, 2006
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-
386
© servo-Halbeck GmbH & Co.KG, 2006
Traces
GetTraceCount
GetTraceCount
Syntax
GetTraceCount(hPosys) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
CardHandle
value returned by call to
OpenDevice
Value
Type
trace count
unsigned 32 bits
Returned Data
Pulse &
Direction
Range
0 to 232-1
Scaling
unity
Units
samples
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-
387
© servo-Halbeck GmbH & Co.KG, 2006
GetTraceStatus
GetTraceStatus
Syntax
GetTraceStatus(hPosys) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
CardHandle
value returned by call to
OpenDevice
Name
Type
see below
unsigned 16 bits
Returned Data
Description
Pulse &
Direction
GetTraceStatus returns 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
DataW rap
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-
388
© servo-Halbeck GmbH & Co.KG, 2006
Set/GetTraceMode
SetTraceMode
GetTraceMode
Syntax
SetTraceMode(hPosys, mode) stdcall
GetTraceMode(hPosys) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
CardHandle
value returned by call to
OpenDevice
mode
OneTime
RollingBuffer
0
1
Description
Pulse &
Direction
SetTraceMode sets 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-
389
© servo-Halbeck GmbH & Co.KG, 2006
Set/GetTracePeriod
SetTracePeriod
GetTracePeriod
Syntax
SetTracePeriod(hPosys, period) stdcall
GetTracePeriod(hPosys) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
CardHandle
value returned by call to
OpenDevice
POSYS®
18xx/19xx
Type
period
unsigned 16 bits
Description
POSYS® 7xx,
8xx, 8xx-B, 9xx
Type
period
unsigned 16 bit
Pulse &
Direction
Range
1 to 216-1
Scaling
unity
Units
cycles
Range
1 to 215-1
Scaling
unity
Units
cycles
SetTracePeriod sets 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-
390
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
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)
391
Pulse &
Direction
© servo-Halbeck GmbH & Co.KG, 2006
Description
SetTraceStart sets 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.
W hen 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.
GetTraceStart returns 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
W rap-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
In motion
0Bh
Commutation error
0Ch
In positive limit
In negative limit
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*.*)
392
© servo-Halbeck GmbH & Co.KG, 2006
MotionScript®
language
calling
convention
SetTraceStart(hPosys, triggerAxis, condition, triggerBit, triggerState)
GetTraceStart(hPosys)
-o-
393
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
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)
394
Pulse &
Direction
© servo-Halbeck GmbH & Co.KG, 2006
Description
SetTraceStop sets 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.
W hen 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.
GetTraceStop returns 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
W rap-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
Commutation error
0Ch
In positive limit
In negative limit
0Dh
0Eh
Breakpoint 2
0Fh
Restriction
see
GetTraceCount, Set/GetTraceStart, GetTraceStatus
DLL: Delphi,
C++, VB
Refer to the various import files (imp*.*)
395
© servo-Halbeck GmbH & Co.KG, 2006
MotionScript®
language
calling
convention
SetTraceStop(hPosys, triggerAxis, condition, triggerBit, triggerState)
GetTraceStop(hPosys)
-o-
396
© servo-Halbeck GmbH & Co.KG, 2006
Set/GetTraceVariable
SetTraceVariable
GetTraceVariable
Syntax
SetTraceVariable(hPosys, variableNumber, traceAxis, variable) stdcall
GetTraceVariable(hPosys, variableNumber) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
CardHandle
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
Commanded Position
Commanded Velocity
Commanded Acceleration
Actual Position
Actual Velocity
Motor Command
Chip Time
Capture Register
Integral
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
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
397
Pulse &
Direction
© servo-Halbeck GmbH & Co.KG, 2006
Description
SetTraceVariable assigns 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.
GetTraceVariable returns 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 5 would be sent. Finally a SetTraceVariable command with
traceID of 2 , axis of 2 and variable of 0Ch would be sent.
Restriction
W hen 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.
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-
398
© servo-Halbeck GmbH & Co.KG, 2006
Miscellaneous
GetChecksum
GetChecksum
Syntax
GetChecksum(hPosys) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
CardHandle
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-
399
© servo-Halbeck GmbH & Co.KG, 2006
GetHostIOError
GetHostIOError
Syntax
GetHostIOError(hPosys) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
CardHandle
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
GetHostIOError returns 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 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.
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
0
1
2
3
4
5
6
7
8
9
Ah
Bh
Ch
Dh
Eh
Restriction
see
GetEventStatus
DLL: Delphi,
C++, VB
Refer to the various import files (imp*.*)
MotionScript®
language
calling
convention
GetHostIOError(hPosys)
-o-
400
© servo-Halbeck GmbH & Co.KG, 2006
GetProcessorStatus
GetProcessorStatus
Syntax
GetProcessorStatus(hPosys) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
CardHandle
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-
401
© servo-Halbeck GmbH & Co.KG, 2006
GetVersion
GetVersion
Syntax
GetVersion(hPosys) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
CardHandle
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
GetVersion returns 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-
402
© servo-Halbeck GmbH & Co.KG, 2006
HardReset/MCReset
HardReset
MCReset
Syntax
HardReset(hPosys) stdcall
alternatively
MCReset(hPosys) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
CardHandle
value returned by call to
OpenDevice
403
Pulse &
Direction
© servo-Halbeck GmbH & Co.KG, 2006
Description
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. W ith 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 W riteIO(ioAddress, outputStatus). 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 call to
SoftReset followed by reloading filter and other parameters and a call to
DACOutputsOn 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 PW M 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.
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
ActualPositionUnits
AutoStopMode
AxisMode
AxisOutSource
BiQuadC oefficients
Breakpoint 1
Breakpoint 2
BreakpointValue 1
BreakpointValue 2
BufferLength
BufferReadIndex
BufferStart
BufferWriteIndex
C aptureSource
Deceleration
DerivativeTime
EncoderModulus
EncoderToStepRatio
GearMaster
GearRatio
IntegrationLimit
InterruptMask
Jerk
Kaff
Kd
Ki
Kout
Kp
0
0
0
1
1
0
*bi-quad filters disabled
0
0
0
0
0
0
see notes
0
0
0
1
0
00010001h
0
0
0
0
0
0
0
0
65535
0
Kvff
LimitSwitchMode
MotionC ompleteMode
MotorBias
MotorC ommand
MotorLimit
MotorMode
PhaseAngle
PhaseC ounts
PhaseInitializeMode
PhaseInitializeTime
PhaseOffset
PhasePrescale
Position
PositionErrorLimit
ProfileMode
SampleTime
SettleTime
SettleWindow
SignalSense
StopMode
TraceMode
TracePeriod
TraceStart
TraceStop
TraceVariable1
TraceVariable2
TraceVariable3
TraceVariable4
TrackingWindow
Velocity
0
1
0
0
0
see notes
1
0
1
0
0
65535
0
0
see notes
0
see notes
0
0
0
0
0
1
0
0
0
0
0
0
0
0
The motor-type dependant default values are listed below:
Variable
DC Brushed
DC Brushless
(3 phase)
DC Brushless
(2 phase)
n/a
0
0
EncoderSource
0
0
0
OutputMode
1
2
2
PhaseC orrectionMode
n/a
1
1
PWMFrequency (kHz)
0
n/a
n/a
Microstepping
(3 phase)
Microstepping
(2 phase)
Pulse & Direction
C ommutationMode
0
0
n/a
EncoderSource
2
2
3
1
n/a
n/a
n/a
C ommutationMode
Variable
OutputMode
PhaseC orrectionMode
PWMFrequency (kHz)
2
404
n/a
© servo-Halbeck GmbH & Co.KG, 2006
Restriction
PW MFrequency 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-
405
© servo-Halbeck GmbH & Co.KG, 2006
NoOperation
NoOperation
Syntax
NoOperation(hPosys) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
CardHandle
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-
406
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
value returned by call to
OpenDevice
Pulse &
Direction
Type
address
data
Description
unsigned 16 bits
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-
407
© servo-Halbeck GmbH & Co.KG, 2006
ReadAnalog
ReadAnalog
Syntax
ReadAnalog(hPosys, portID) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
CardHandle
value returned by call to
OpenDevice
Name
Type
portID
unsigned 16 bits
Returned Data
Description
Name
Type
value
unsigned 16 bits
Pulse &
Direction
Range
0 to 7
Scaling
unity
Units
-
Range
0 to 216-1
Scaling
100/216
Units
% 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-
408
© servo-Halbeck GmbH & Co.KG, 2006
ReadIO
ReadIO
Syntax
ReadIO(hPosys, address) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
CardHandle
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 216-1
Scaling
unity
Units
-
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
W riteIO
DLL: Delphi,
C++, VB
Refer to the various import files (imp*.*)
MotionScript®
language
calling
convention
ReadIO(hPosys, address)
-o-
409
© servo-Halbeck GmbH & Co.KG, 2006
ReadPLD
ReadPLD
Syntax
ReadPLD(hPosys) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
CardHandle
value returned by call to
OpenDevice
Name
Type
value
unsigned 16 bits
Returned Data
Description
Pulse &
Direction
Range
0 to 215-1
Scaling
unity
Units
-
Reads internal system data reflecting configuration and revision levels.
Restriction
see
DLL: Delphi,
C++, VB
Refer to the various import files (imp*.*)
MotionScript®
language
calling
convention
ReadPLD(hPosys)
-o-
410
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
value returned by call to
OpenDevice
Pulse &
Direction
Type
mask
Description
unsigned 16 bit
see below
SetCANMode sets the CAN 2.0B communication parameters for the POSYS®.
After completion of this command, the POSYS® will respond to a CAN receive
message addressed to 0x600 + nodeID. CAN responses are sent to 0x580 +
nodeID. The CAN 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
CAN 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-
411
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
value returned by call to
OpenDevice
Pulse &
Direction
Type
mode
Description
limited
full
0
1
SetDiagnosticPortMode determines the instruction set that can be executed
through the diagnostic port. W hen set to Limited, only the following
instructions may be executed:
all GET instructions
The SetBufferReadIndex instruction
W hen 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-
412
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
value returned by call to
OpenDevice
Name
Type
Encoding
mask
unsigned 16 bits
see unten
Description
Pulse &
Direction
SetSerialPortMode sets the configuration for the asynchronous serial port.
Note: It is recommended that two stop bits be used for baud rates greater
than 19200bps.
GetSerialPortMode returns 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)
413
© servo-Halbeck GmbH & Co.KG, 2006
see
Set/GetDiagnosticPortMode
DLL: Delphi,
C++, VB
Refer to the various import files (imp*.*)
MotionScript®
language
calling
convention
SetSerialPortMode(hPosys, mask)
GetSerialPortMode(hPosys)
-o-
414
© servo-Halbeck GmbH & Co.KG, 2006
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
CardHandle
value returned by call to
OpenDevice
mode
Disabled
Master
Slave
0
1
2
Description
SetSynchronizationMode 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-
415
© servo-Halbeck GmbH & Co.KG, 2006
SetWatchDog
SetWatchDog
Syntax
SetW atchDog(hPosys,address,value) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
CardHandle
value returned by call to
OpenDevice
Description
address
0x04
value
0x5562
Pulse &
Direction
SetWatchDog activates a POSYS® hardware timer which times out after
approximately 104 milliseconds unless it is refreshed before the timeout. A
timeout will cause a hardware reset. The W atch Dog Timer is deactivated after
a timeout.
Example:
address = 4
Rem 0x04
timeout = 21858
Rem 0x5562
SetW atchDog(hPosys,address, timeout)
This starts the Watch Dog Timer. It must be refreshed before timeout
or the motion control card will be reset!
Address and timeout values must not be changed!!!
Restriction
The W atch 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
SetW atchDog(hPosys,address,value)
-o-
416
© servo-Halbeck GmbH & Co.KG, 2006
WriteIO
WriteIO
Syntax
W riteIO(hPosys, address, data) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
CardHandle
value returned by call to
OpenDevice
POSYS® 18xx,
19xx
Type
Range
address
unsigned 16 bits
0 to 255
data
unsigned 16 bits
0 to 216-1
POSYS® 7xx,
8xx, 8xx-B, 9xx
Type
Range
address
unsigned 8 bits
0 to 255
data
unsigned 16 bits
0 to 216-1
Description
Pulse &
Direction
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
W riteIO(hPosys, address, data)
-o-
417
© servo-Halbeck GmbH & Co.KG, 2006
Additional MotionScript® Functions
BitReset
BitReset
Syntax
BitReset(hPosys, testVar, bitToReset) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
CardHandle
value returned by call to
OpenDevice
testVar
32 bits
bitToReset
32 bits
Pulse &
Direction
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, CompareActivity, CompareEvent, CompareSignal
DLL: Delphi,
C++, VB
not applicable
MotionScript®
language
calling
convention
BitReset(hPosys, testVar, bitToTest)
-o-
418
© servo-Halbeck GmbH & Co.KG, 2006
BitSet
BitSet
Syntax
BitSet(hPosys, testVar, bitToSet) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
CardHandle
value returned by call to
OpenDevice
testVar
32 bits
bitToTest
32 bits
Pulse &
Direction
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, CompareActivity, CompareEvent, CompareSignal
DLL: Delphi,
C++, VB
not applicable
MotionScript®
language
calling
convention
BitSet(hPosys, testVar, bitToTest)
-o-
419
© servo-Halbeck GmbH & Co.KG, 2006
BitTest
BitTest
Syntax
BitTest(hPosys, testVar, bitToTest) stdcall
Motor type
DC Brush
DC Brushless
Microstepping
Arguments
Name
Instance
Encoding
hPosys
CardHandle
value returned by call to
OpenDevice
testVar
32 bits
bitToTest
32 bits
Pulse &
Direction
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, CompareActivity, CompareEvent, CompareSignal
DLL: Delphi,
C++, VB
not applicable
MotionScript®
language
calling
convention
BitTest(hPosys, testVar, bitToTest)
-o-
420
© servo-Halbeck GmbH & Co.KG, 2006
CompareActivity
CompareActivity
Syntax
CompareActivity(hPosys, axis, mask) 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
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, CompareEvent, CompareSignal
DLL: Delphi,
C++, VB
not applicable
MotionScript®
language
calling
convention
CompareActivity(hPosys, axis, mask)
-o-
421
© servo-Halbeck GmbH & Co.KG, 2006
CompareEvent
CompareEvent
Syntax
CompareEvent(hPosys, axis, mask) 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
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, CompareActivity, CompareSignal
DLL: Delphi,
C++, VB
not applicable
MotionScript®
language
calling
convention
CompareEvent(hPosys, axis, mask)
-o-
422
© servo-Halbeck GmbH & Co.KG, 2006
CompareSignal
CompareSignal
Syntax
CompareSignal(hPosys, axis, mask) 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
mask
0 - 1024 (0x0400)
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, CompareActivity, CompareEvent
DLL: Delphi,
C++, VB
not applicable
MotionScript®
language
calling
convention
CompareSignal(hPosys, axis, mask)
-o-
423
Pulse &
Direction
© servo-Halbeck GmbH & Co.KG, 2006
FAQ
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-, W E-, 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-
424
© servo-Halbeck GmbH & Co.KG, 2006
425
© servo-Halbeck GmbH & Co.KG, 2006
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)
ClearPosition 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
ClearPositionError(axis) would copy the value 57 (228 / 4) to the Commanded Position register.
Date: 26.01.2004
Revised:
-o-
426
© servo-Halbeck GmbH & Co.KG, 2006
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 W indows 9x/ME/NT/2000/XP.
After installation change to the new created subdirectory /Driver Installation. Start the
program Ksetup.exe.
Change 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. Controls 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
427
© servo-Halbeck GmbH & Co.KG, 2006
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.
6. The Box “Linear” will be used for coordinated linear motion and for the desired velocity (Feed
Rate) in Millicounts/(Chip 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.
7. The Box Circle serves for the input of data for circular interpolation. Center 1 and Center 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 CCW motion is negative. For a CW circular arc of
15,54 degrees you must input 15540.
8. 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.
9. 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.
10. To save the data you can click the button Save. To load the data you can click the button Load.
11. 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. W ith Zoom ON and using the right button of the mouse you can choose an area of the path
428
© servo-Halbeck GmbH & Co.KG, 2006
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 Clear Array clears a programmed array, the button Clear 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 CCW ), radius 20000, center of circle (0,0),
Input as Center 1 and Center 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:
START PROFILE
Start Position 1 = 17321
Start Position 2 = 10000
Feed Rate = 1000
Center 1 = 0
Center 2 = 0
Arc = -1000 (equals 1 degree)
button Generate Array in Box Circle
APPEND PROFILE
Feed Rate = 2000
Center 1 = 0
Center 2 = 0
Arc = -1000 (equals 1 degree)
button Generate Array in Box Circle
Feed Rate = 3000
Center 1 = 0
Center 2 = 0
Arc = -1000 (equals 1 degree)
button Generate Array in Box Circle
Feed Rate = 4000
Center 1 = 0
Center 2 = 0
Arc = -1000 (equals 1 degree)
button Generate Array in Box Circle
Feed Rate = 5000
Center 1 = 0
Center 2 = 0
Arc = -1000 (equals 1 degree)
button Generate Array in Box Circle
Feed Rate = 6000
Center 1 = 0
Center 2 = 0
Arc = -1000 (equals 1 degree)
button Generate Array in Box Circle
Feed Rate = 7000
Center 1 = 0
Center 2 = 0
Arc = -1000 (equals 1 degree)
button Generate Array in Box Circle
429
© servo-Halbeck GmbH & Co.KG, 2006
Feed Rate = 8000
Center 1 = 0
Center 2 = 0
Arc = -1000 (equals 1 degree)
button Generate Array in Box Circle
Feed Rate = 9000
Center 1 = 0
Center 2 = 0
Arc = -1000 (equals 1 degree)
button Generate Array in Box Circle
Feed Rate = 10000
Center 1 = 0
Center 2 = 0
Arc = -102000 (equals 102 degrees with constant velocity)
button Generate Array in Box Circle
Feed Rate = 9000
Center 1 = 0
Center 2 = 0
Arc = -1000 (equals 1 degree)
button Generate Array in Box Circle
Feed Rate = 8000
Center 1 = 0
Center 2 = 0
Arc = -1000 (equals 1 degree)
button Generate Array in Box Circle
Feed Rate = 7000
Center 1 = 0
Center 2 = 0
Arc = -1000 (equals 1 degree)
button Generate Array in Box Circle
Feed Rate = 6000
Center 1 = 0
Center 2 = 0
Arc = -1000 (equals 1 degree)
button Generate Array in Box Circle
Feed Rate = 5000
Center 1 = 0
Center 2 = 0
Arc = -1000 (equals 1 degree)
button Generate Array in Box Circle
Feed Rate = 4000
Center 1 = 0
Center 2 = 0
Arc = -1000 (equals 1 degree)
button Generate Array in Box Circle
Feed Rate = 3000
Center 1 = 0
Center 2 = 0
Arc = -1000 (equals 1 degree)
button Generate Array in Box Circle
Feed Rate = 2000
Center 1 = 0
Center 2 = 0
Arc = -1000 (equals 1 degree)
button Generate Array in Box Circle
Feed Rate = 1000
Center 1 = 0
Center 2 = 0
Arc = -1000 (equals 1 degree)
button Generate Array in Box Circle
430
© servo-Halbeck GmbH & Co.KG, 2006
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:
E-mail:
Europe: [email protected]
USA : [email protected]
POSYS® is a registered trademark of servo-Halbeck
-o-
431
© servo-Halbeck GmbH & Co.KG, 2006
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.
Calculate speed and acceleration values for every axis and do a MultiUpdate(axes)
(simultaneous start).
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
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
1. 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.
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
432
© servo-Halbeck GmbH & Co.KG, 2006
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:
USA e-mail: [email protected]
Europe e-mail: [email protected]
-o-
433
© servo-Halbeck GmbH & Co.KG, 2006
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,
74ACT541MTC
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,
74ACT541MTC
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, 150 Ohm
terminating resistor
Line Receiver
SN75173, 150 Ohm
terminating resistor
Line Receiver
DS26LS32CM, 150 Ohm
terminating resistor
Digital Outputs
TTL, 74FCT244,
sink current: 48 mA,
source current: 12 mA
TTL, 74ACT244,
source/sink current:
±24 mA
TTL, 74ACT541,
source/sink current: ±24
mA (max. ±50)
Amplifier Enable
Outputs
TTL, 74FCT244,
sink current: 48 mA,
source current: 12 mA
TTL, 74ACT244,
source/sink current:
±24 mA
TTL, 74ACT541,
source/sink current: ±24
mA (max. ±50)
AxisOut Outputs
TTL, 74FCT244,
sink current: 48 mA,
source current: 12 mA
TTL, 74ACT244,
source/sink current:
±24 mA
TTL, 74ACT541,
source/sink current: ±24
mA (max. ±50)
Date: 24.06.2003
Revision:
E-mail:
Europe: [email protected]
USA : [email protected]
POSYS® is a registered trade mark of servo-Halbeck
-o-
434
© servo-Halbeck GmbH & Co.KG, 2006
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. W hen 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. W hen 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
435
© servo-Halbeck GmbH & Co.KG, 2006
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
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:
Europe: [email protected]
436
© servo-Halbeck GmbH & Co.KG, 2006
USA : [email protected]
POSYS® is a registered trade mark of servo-Halbeck
-o-
437
© servo-Halbeck GmbH & Co.KG, 2006
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:
Function
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, trigger)
This function establishes a breakpoint for the
specified 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. X-motor starts to move towards a target position
2. Solenoid # 1 turns on after X-motor has reached ¼ of the target position
3. Y-motor starts to move to its target position after X-motor has traveled ½ towards the target
position
4. Solenoid # 2 turns on when Y-motor is at ¾ of its target position
5. 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.
438
© servo-Halbeck GmbH & Co.KG, 2006
Const
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)
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
439
© servo-Halbeck GmbH & Co.KG, 2006
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
W hen 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 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
440
© servo-Halbeck GmbH & Co.KG, 2006
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
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:
Europe: [email protected]
USA : [email protected]
POSYS® is a registered trademark of servo-Halbeck
441
© servo-Halbeck GmbH & Co.KG, 2006
-o-
442
© servo-Halbeck GmbH & Co.KG, 2006
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
443
© servo-Halbeck GmbH & Co.KG, 2006
Code
Indication
Cause
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 –
7FFFFFFF
2. Either SetBufferReadIndex, or
SetBufferWriteIndex sent 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
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
444
© servo-Halbeck GmbH & Co.KG, 2006
Date: 24.10.2002
Revision:
E-mail:
Europe: [email protected]
USA : [email protected]
POSYS® is a registered trade mark of servo-Halbeck
-o-
445
© servo-Halbeck GmbH & Co.KG, 2006
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
GetBufferW riteIndex
ReadBuffer
SetBufferFunction
SetBufferFunction
SetBufferLength
SetBufferReadIndex
SetBufferStart
SetBufferW riteIndex
W riteBuffer
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
446
© servo-Halbeck GmbH & Co.KG, 2006
GetTraceStop
GetTraceVariable
SetTraceMode
SetTracePeriod
SetTraceStart
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
W hen 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
447
© servo-Halbeck GmbH & Co.KG, 2006
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 SetBufferW riteIndex 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 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
Start loading new data into RAM starting at the BufferW riteIndex = 0 up to RAM position =
4999
Check for wrap around until BufferReadIndex <= 10000
Start loading new data into RAM starting at the BufferW riteIndex = 5000 up to RAM position =
10000
Continue this method until all data is loaded and executed. Make sure to append one segment
with a SegmentTime multiplier of 0 to exit External Profile mode.
-o-
448
© servo-Halbeck GmbH & Co.KG, 2006
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.
Const
axis = 0; // X-Axis
on = 1;
off = 0;
Function
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
449
© servo-Halbeck GmbH & Co.KG, 2006
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.
Function
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 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
Function
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.
W hen 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:
Function
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))
450
© servo-Halbeck GmbH & Co.KG, 2006
// << = 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:
Europe: [email protected]
USA : [email protected]
POSYS® is a registered trade mark of servo-Halbeck
-o-
451
© servo-Halbeck GmbH & Co.KG, 2006
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.
452
© servo-Halbeck GmbH & Co.KG, 2006
Now return to the Main Menu and go to the Stop On Motion Error selection box. Select the Radio
Button Off.
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.Button7Click(Sender: Tobject);
var
ioerror :string[4];
index :integer;
//Button Set Microsteps
begin
Imp900.GetHostIOError(hPosys);
index:=ComboBox1.ItemIndex;
if index=-1 then
index:=0;
Imp900.SetOutputMode(hPosys,SelAxis,index);
index:=ComboBox2.ItemIndex;
if index=-1 then
index:=0;
Imp900.SetNumberPhases(hPosys,SelAxis,index +2);
//number of phases
Imp900.SetPhaseCounts(hPosys,SelAxis,StrToInt(Edit1.Text));
//phase counts
Imp900.SetMotorCommand(hPosys,SelAxis,StrToInt(Edit2.Text));
if (motioncontroller and $28000000)=$28000000 then
//max motor output
Imp900.SetCommutationMode(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-
453
© servo-Halbeck GmbH & Co.KG, 2006
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.
W hen 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 1
, phase)
2 or 3 (see
note 2)
2
SetCommutationMode(axis,mode)
n/a
0, 1 or 2
2
SetOutputMode(axis,mode)
0, 1 or 2
0, 1 or 2
0, 1 or 2
SetPhaseCounts(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: PW M Sign/Magnitude only possible with number of phases set to 1 or 2.
PW M 5050 output mode is possible with number of phases set to 1, 2 or 3.
W hen 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-
454
© servo-Halbeck GmbH & Co.KG, 2006
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 W indows 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!');
Close;
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!');
455
© servo-Halbeck GmbH & Co.KG, 2006
Close;
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!');
Close;
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
CloseDevice(hPosys0) //close instance for card 1
CloseDevice(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
Europe: [email protected]
USA : [email protected]
POSYS® is a registered trade mark of servo-Halbeck GmbH & Co.KG
-o-
456
© servo-Halbeck GmbH & Co.KG, 2006
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
CS0, 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.
Card2, a 2 axes card (POSYS® 902) was located at Base Address 0=8000H and Base Address
1=8400H and Interrupt No. 0AH
457
© servo-Halbeck GmbH & Co.KG, 2006
ScanForPosys Window
Four option 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:
458
© servo-Halbeck GmbH & Co.KG, 2006
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
Card 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.
Clicking on the Save to Registry button will save the same information to the following registry
locations:
Card 1:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\IMC\900\Card1
and
Card 2:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\IMC\900\Card2
Additional cards would be located at Card3 and Card4.
459
© servo-Halbeck GmbH & Co.KG, 2006
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 PCI scan must be repeated and the data saved
again to file or registry.
460
© servo-Halbeck GmbH & Co.KG, 2006
The Tech Note ‘Programmers Info’ provides additional information for writing user programs in any
language.
Date: 07.11.2002
Revision: 19.12.2002
E-mail:
Europe: [email protected]
USA : [email protected]
POSYS®is a registered trade mark of servo-Halbeck
-o-
461
© servo-Halbeck GmbH & Co.KG, 2006
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, W indows, 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.servo-halbeck.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
Command Address
N+2
N+2
DACOn
N+4
N+4
DACOff
N+5
N+6
HardReset
N+6
N + 5 and N + 7 (Byte)
Name
Address setting 7xx/8xx
Address setting 8xx-B
Base Address
300H
300H
Data Address
300H
300H
Command Address
302H
302H
DACOn
304H
304H
DACOff
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);
462
© servo-Halbeck GmbH & Co.KG, 2006
begin
if (BaseAddress < 512) or (BaseAddress > 1016) then // outside this range not recommended
exit;
DataAddress:=BaseAddress;
CommandAddress:=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)
end;
To read user inputs or write user outputs or amplifier enable outputs the commands ReadIO and
W riteIO 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
W riteIO and ReadIO
write_user_output
00H
00H
only W riteIO
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/W rite
watchdog
n/a
04H
only W riteIO
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. W aitIfBusy is an example for such a
routine.
Const
readybit = $8000;
var
timeout : boolean;
count : word;
Procedure W aitIfBusy;
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));
463
© servo-Halbeck GmbH & Co.KG, 2006
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:
Coding required to read the user inputs (8 lines)
Var
InputData : word;
W aitIfBusy;
OUTPW (CommandAddress,83H); // ReadIO
W aitIfBusy;
OUTPW (DataAddress,user_input);
W aitIfBusy;
InputData := INPW (DataAddress); //returns 16 bits (word)
This will return the status of the 8 input lines.
Example:
Coding required to write to the user output (8 lines)
OutputData := ffH (turn all 8 outputs on)
W aitIfBusy;
OUTPW (CommandAddress,82H); // WriteIO
W aitIfBusy;
OUTPW (DataAddress,write_user_output);
W aitIfBusy;
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
W aitIfBusy;
OUTPW (CommandAddress,temp1);
GetActualPosition:=GetDoubleW ord; // reads the high and low order parts of the long
end;
Function GetDoubleW ord:longint; // returns a 32 bit signed integer
var
temp:longint;
begin
W aitIfBusy;
with Long2W ord(temp) do begin
wordHi:=INPW (DataAddress);
W aitIfBusy;
wordLo:=INPW (DataAddress);
end;
GetDoubleW ord:=temp;
end;
464
© servo-Halbeck GmbH & Co.KG, 2006
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 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:
465
© servo-Halbeck GmbH & Co.KG, 2006
700/800 Series
W riteIO(amp_enable, 0x00)
W riteIO(amp_enable, 0x0f)
W riteIO(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.
W riteIO(amp_enable, 0xffff)
// sets all 4 outputs to high level
W riteIO(amp_enable,0x0300) // resets outputs 1 and 2 to low level
W riteIO(amp_enable,0xff00 ) // resets outputs 1, 2, 3 and 4 to low level
W riteIO(amp_enable,0x0404) // sets output 3 to high level
W riteIO(amp_enable,0x0400) // resets output 3 to low level
ReadIO(amp_enable)
// returns the status of the amplifier enable outputs. Bit 7 reflects the
status of the DACOutputs (1 = ON, 0 = OFF)
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
W riteIO(write_user_output, 0)
set all outputs to 0 or to some other value
SetOutputMode(axis,mode)
mode: 0=16 bit analog, 1=PW M 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
DACOutputsOn
connects analog outputs to amplifiers
coding is OUTPW (DACOn), see above for more detail
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
466
© servo-Halbeck GmbH & Co.KG, 2006
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
Coding 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:
467
© servo-Halbeck GmbH & Co.KG, 2006
Windows– for W indows 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 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.
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
Command Address
Base Adr0 + 2
DACOn
Base Adr0 + 4
DACOff
Base Adr0 + 6
HardReset
Base Adr1
Example:
468
© servo-Halbeck GmbH & Co.KG, 2006
Name
Address
Base Address
7400H
Data Address
7400H
Command Address
7402H
DACOn
7404H
DACOff
7406H
HardReset
7800H
Addresses for user IO:
Name
Address
Description
amp_enable
01H
W riteIO and ReadIO
write_user_output
00H
only W riteIO
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)
469
© servo-Halbeck GmbH & Co.KG, 2006
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
W riteIO(amp_enable, amps)
End
Now assume you want to disable output 3
Begin
amps:=amps and not $04 or $400
W riteIO(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
Bit
Bit
Bit
Bit
[12] Reset Cause: Software
[13] Reset Cause: Under voltage
[14] Reset Cause: External
[15] Reset Cause: Watchdog
A write to address axis_in_out W riteIO(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 servo-Halbeck.
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)
470
© servo-Halbeck GmbH & Co.KG, 2006
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;
CommandAddress:=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)
W hen 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
Revised: 18 June 2001
Revised: 12 July 2002
Revised: 18 December 2002
Revised: 01 March 2005
Servo Halbeck GmbH & Co. KG
Europe: [email protected]
USA : [email protected]
-o-
471
© servo-Halbeck GmbH & Co.KG, 2006
Resistor Networks for TTL or Inverted Encoder Signals
Encoder Line Receiver and Terminating Resistors
All of the POSYS motion controllers use line receivers (DS26LV32ATM). 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 (RS1, RS2 and RS3) are
connected across these inputs.
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 Pins
Encoder
Signals
RS2 Pins
Encoder
Signals
RS3 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)
Location of the resistors RS1, RS2 and RS3 on the POSYS 1900 series board. The pins with the
square designate location of pin 1.
Date: 30.03.2005
Revised:
-o-
472
© servo-Halbeck GmbH & Co.KG, 2006
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 servo-Halbeck, 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
W ith 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:
W hen set to LIMITED only limited access is possible like for all Get.. instructions and
SetBufferReadIndex
W hen 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)
473
© servo-Halbeck GmbH & Co.KG, 2006
Multi-drop Address: Address 0, Address 1, …, Address 31
Checksums are needed for serial communication. A complete and detailed description of the
following important subjects can be found in the NAVIGATORTM User’s Guide:
Command Format
Checksums
Transmission Protocols
Point-to-Point Mode
Multi-drop Protocols
Idle-line Mode
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:
Europe: [email protected]
USA : [email protected]
POSYS® is a registered trademark of servo-Halbeck
-o-
474
© servo-Halbeck GmbH & Co.KG, 2006
Synchronization of Multple Cards (POSYS® 8xx-B/9xx w/ Sync-Feature and 18xx/19xx)
Synchronisation 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. W hen 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
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.
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.
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
475
© servo-Halbeck GmbH & Co.KG, 2006
master = 1
slave = 2
Call CardHandle(1) //this is the handle to card1, all data will go to this card
Call SetSynchronizationMode(disabled) //make sure the card is not in synchronization mode
time1 = GetSampleTime
Call CardHandle(2) //handle to card2, all data will go to this card
time2 = GetSampleTime
if time2 <> time1 then
Call 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
Call CardHandle(2) //switch to card2
Call SetSynchronizationMode(slave) //set card2 to slave
Call CardHandle(1) //switch to card1
Call 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.
Call CardHandle(1) //switch to card1
Call SetPosition(axis1, 50000) //buffer a new target position for axis1 of card1
Call CardHandle(2) //switch to card2
Call SetPosition(axis1, 25000) //buffer a new target position for axis1 of card2
Call 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
Call SetBreakpointValue(axis1, Breakpoint1, time + 20)
Call SetBreakpoint(axis1, Breakpoint1, axis1, update, breakpointtime)
Call CardHandle(2) //switch to card2
Call SetBreakpointValue(axis1, Breakpoint1, time + 20)
Call SetBreakpoint(axis1, Breakpoint1, axis1, update, breakpointtime)
W hen 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]
USA : [email protected]
POSYS® is a registered trade mark of servo-Halbeck
-o-
476
© servo-Halbeck GmbH & Co.KG, 2006
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.
477
© servo-Halbeck GmbH & Co.KG, 2006
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:
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)
Calculate 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-
478
© servo-Halbeck GmbH & Co.KG, 2006
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 PCI 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)
Only valid for POSYS® 900/1900 (PCI-bus)
REM program terminates
REM opens driver instance 1 for controller 1
REM hPosys is the handle to this controller
Print "Version: "; Hex$(GetVersion(hPosys)) REM returns as hex number the motion
CloseDevice(hPosys)
processor version
REM always close the driver when program
terminates
End
REM program terminated
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 W indow'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.
479
© servo-Halbeck GmbH & Co.KG, 2006
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
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
driver
If return equals -1 IO range could not be
enabled
Print "IO range could not be enabled."
Print "END"
end
endif
Print "Version: "; Hex$(GetVersion(hPosys)) REM returns as hex number the motion
CloseDevice(hPosys)
processor version
End
REM always close the driver when program
terminates
REM program terminated
Comments 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 EnableIO(cardNo, portCount). 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.
-oHardware & Driver Installation
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. PCI 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.
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 (W indows 98/ME, 2000/XP) has initialized the new hardware will be found (plug
480
© servo-Halbeck GmbH & Co.KG, 2006
& pay) and you will be requested for the location of the driver. Select the location of the driver and
inf file.
PCI Bus
Windows
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
POSYS900W D.INF
POSYS1900W D.INF
W INDRVR6.SYS
W INDRVR6.INF
WDREG16.EXE
WDREG.EXE
W DREG_GUI.EXE
W INDRVR6.VXD
W D_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 W indows 95/98/ME
for W indows NT/2000/XP
for W indows (all versions)
for W indows 95/98/ME
for W indows (all versions)
for W indows (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 /W D Driver
Setup directory and run the batch-file "registerOCX.bat". Depending on the type of W indows
operating system you may be requested to confirm two pop-up windows or not.
Linux
ISA/PC-104 Bus
Windows
Go to the directory /W D Driver Setup and run the program W DREG_GUI.EXE as required for your
W indows operating system (read the README.TXT). This will install all of the required driver
files and driver DLLs into the proper directories of W indows 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.
481
© servo-Halbeck GmbH & Co.KG, 2006
README.TXT
W INDRVR6.SYS
W INDRVR6.INF
WDREG16.EXE
WDREG.EXE
W DREG_GUI.EXE
W INDRVR6.VXD
W D_UTILS.DLL
Important Installation Information for installing on different
Windows operating systems. PLEASE READ!!!
Driver
Inf-file
for W indows 95/98/ME
for W indows NT/2000/XP
for W indows (all versions)
for W indows 95/98/ME
for W indows (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 /W D Driver Setup directory and run the batch-file "registerOCX.bat".
Depending on the type of W indows operating system you may be requested to confirm two pop-up
windows or not.
Linux
DOS
For DOS no driver installation is required. IO and memory can be addressed directly from C,
Pascal or Basic.
-oPOSYSDriverXSetup
POSYSDriverXSetup Program
The utility program POSYSDriverXSetup will enter base address and address range for up to 16
motion control cards into the W indow's registry. The utility program can be used to enter or
modify setup information or remove it.
482
© servo-Halbeck GmbH & Co.KG, 2006
The program will detect the installed operating system (W indows 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.
Pick your cards address from this box.
Pick the associated motion control card from this box.
483
© servo-Halbeck GmbH & Co.KG, 2006
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.
Clicking 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.
Clicking 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
484
© servo-Halbeck GmbH & Co.KG, 2006
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)
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
axis = 0
Rem defines the addressed axis (0 - 3)
readPos = GetActualPosition(hPosys,axis) :
Print "Actual Position: "; readPos
Rem returns the actual position of axis 0
Screen shot of MotionScript®
Clicking on this button will compile the
program displayed in the input window and if
there are no errors execute it.
485
© servo-Halbeck GmbH & Co.KG, 2006
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.
Clicking on this button opens a dialog and
allows saving the contents (source code) of the
input (editor) window.
Clicking 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.
Clicking on this button displays this Help file.
Clicking on this button will terminate
MotionScript®. Make sure all open drivers are
closed and resources are freed.
-oExamples
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. Correct installation of the POSYS® drivers for W indows 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).
W rite 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
486
© servo-Halbeck GmbH & Co.KG, 2006
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.
CLS
found = DetectPosysDevices()
Rem clears the output window
Rem searches the PCI bus for installed POSYS®
motion controllers
Rem if 0 is returned than no POSYS® motion
controllers are installed
if found = 0 then
Print "No POSYS® controllers found."
Print "Program terminates."
end
Rem terminate the program
endif
Rem end of if block
Rem opens driver instance for card 1, up to 16
hPosys1 = OpenDevice(0)
instances (boards) can be opened
Rem no communication is possible with the card
if hPosys1 = -1 then
Rem if OpenDevice(x) returns hPosys1 = -1 then the
Print "Driver could not be opened."
driver could not be opened
Print "The program terminates."
end
Rem the program must be aborted! This is a reserved
endif
key word of MotionScript®
Rem end of if block
Rem this instruction could be omitted, it is only
InitializePOSYS(0,0)
included for backward compatibility
Rem print the version number of the installed motion
Print "Version: ";Hex$(GetVersion
processor to the output window
(hPosys1))
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, Rem no local parameters are required
axis, vel, accel, pos)
SetVelocity(hPosys, axis, vel)
SetAcceleration(hPosys, axis, accel)
SetPosition(hPosys, axis, pos)
EndFunc
Assuming in your program you want to set move parameters for axis = 0 and axis = 1
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.
487
© servo-Halbeck GmbH & Co.KG, 2006
FUNCTION intpower(a,b) LOCAL 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
W hile
EndW hile
Rem Bit 10 is cleared when In-position or
alternatively you may use a W hile 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.
488
© servo-Halbeck GmbH & Co.KG, 2006
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" + " W orld" + "!"
The value of the variable "a$" is now "Hello W orld!"
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
489
© servo-Halbeck GmbH & Co.KG, 2006
-oReserved Words
Reserved Words
This is a list of reserved MotionScript® key words.
They have the same meaning as in traditional Basic.
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
Comments 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 W hile 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.
490
© servo-Halbeck GmbH & Co.KG, 2006
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
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)
COS(n)
TAN(n)
ASIN(n)
ACOS(n)
ATAN(n)
ATAN2(n,m)
SINH(n)
COSH(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
Cosine
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
491
© servo-Halbeck GmbH & Co.KG, 2006
LCASE$($)
UCASE$($)
LTRIM$($)
RTRIM$($)
CHR$(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
COUNT($)
OPENTEXT$($)
SAVETEXT$($)
COPYTEXT$($)
PASTETEXT$($)
FINDFILE$($,$)
FINDDIR$($,$)
Count rows in a multi-row string
Open a text file into a string
Save the string as a text file
Copy 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)
MESSAGE($)
Pointer to number conversion
Number to pointer conversion
Suspend execution for n seconds
Show a message in a dialog window.
-o-
Loop 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:
492
© servo-Halbeck GmbH & Co.KG, 2006
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:
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 Continue 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 EndW hile instruction.
Example:
a=1
W HILE a <= 10
PRINT a
a = a+1
ENDWHILE
493
© servo-Halbeck GmbH & Co.KG, 2006
Since the W hile command evaluates the condition at the beginning of the loop, the instructions
inside the loop may never be also executed. The Break and Continue instructions can be used in
W HILE-ENDW HILE 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.
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
494
© servo-Halbeck GmbH & Co.KG, 2006
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 PCI 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
CHAR
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 PCI 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)
' calling a Function with a return value:
returnResult = GetPositionError(hPosys, axis)
'or for the example
495
© servo-Halbeck GmbH & Co.KG, 2006
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:
Call AdjustActualPosition(hPosys, axis, position)
'or for the example
Call 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
496
© servo-Halbeck GmbH & Co.KG, 2006
numeric type
Card Initialization & Addressing
Procedure InitializePOSYS(cardAddress0, cardAddress1:word);stdcall;
Function OpenDevice(device:byte):Thandle;stdcall;
Function OpenDevice:word;
Function CloseDevice(hPosys :integer) :integer;stdcall;
Function DetectPosysDevices:word;stdcall;
Function RegisteredPosysDevices:word;stdcall;
Breakpoints & Interrupts
Procedure ClearInterrupt(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 ClearPositionError(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;
497
© servo-Halbeck GmbH & Co.KG, 2006
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;
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 W riteSSIRegister(hPosys:Thandle;axisID:word; resolution, frequency:word);stdcall;
Procedure ReadSSIRegister(hPosys:Thandle;axisID:word;var resolution:word;var
frequency:word);stdcall;
Procedure W riteSSIResolution(hPosys:Thandle;axisID:word;var resolution:word);stdcall;
Procedure ReadSSIResolution(hPosys:Thandle;axisID:word;var resolution:word);stdcall;
Procedure W riteSSIFrequency(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
498
© servo-Halbeck GmbH & Co.KG, 2006
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 SetBufferW riteIndex(hPosys:Thandle;bufferID:word;index:integer);stdcall;
Function GetBufferW riteIndex(hPosys:Thandle;bufferID:word):integer;stdcall;
Procedure W riteBuffer(hPosys:Thandle;bufferID:word;value:integer);stdcall;
Function ReadDPRamLong(hPosys:Thandle;offset:dword):integer;stdcall;
Procedure W riteDPRamLong(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 SetPW MFrequency(hPosys:Thandle;axis,frequency:word);stdcall;
Function GetPW MFrequency(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;
499
© servo-Halbeck GmbH & Co.KG, 2006
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 GetSettleW indow(hPosys:Thandle;axis:word):word;stdcall;
Procedure SetTrackingW indow(hPosys:Thandle;axis,window:word);stdcall;
Function GetTrackingW indow(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
Function
Function
Function
Function
Function
EnableIO(deviceNo, portCount:word):word
GetChecksum(hPosys);stdcall;
GetHostIOError(hPosys:Thandle):word;stdcall;
GetProcessorStatus(hPosys:Thandle):word;stdcall;
Get_Version(hPosys:Thandle):integer;stdcall;
GetVersion(hPosys:Thandle):integer;stdcall;
500
© servo-Halbeck GmbH & Co.KG, 2006
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 W riteIO(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;
CompareActivity(hPosys:Thandle;axis:word;mask:integer);stdcall;
CompareEvent(hPosys:Thandle;axis:word;mask:integer);stdcall;
CompareSignal(hPosys:Thandle;axis:word;mask:integer);stdcall;
-o-
501
© servo-Halbeck GmbH & Co.KG, 2006
POSYS® GUI for Windows 98/ME/2000/XP
Introduction
Introduction
The POSYS® program for W indows 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
502
© servo-Halbeck GmbH & Co.KG, 2006
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
503
© servo-Halbeck GmbH & Co.KG, 2006
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 W indows'
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 W indows. The delivered program PCI ScanforPOSYS helps you to
determine the assigned base addresses for the PCI-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 W indows GUI. Depending on the type of W indows 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
504
© servo-Halbeck GmbH & Co.KG, 2006
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 (PCI-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.
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.
Communication 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
505
© servo-Halbeck GmbH & Co.KG, 2006
In the following the windows and boxes and their importance and use are explained nearer.
-oController Status Box
Controller Status Box
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 CAN-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 PW M output).
Additional settings for PW M mode are available with the commands Set/GetMotorType and
Set/GetPW MFrequency for 2- or 3-phase brushless servo motors.
506
© servo-Halbeck GmbH & Co.KG, 2006
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.
-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:
507
© servo-Halbeck GmbH & Co.KG, 2006
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. W here 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 PW M 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 PW M 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-
508
© servo-Halbeck GmbH & Co.KG, 2006
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.
Clicking 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.
509
© servo-Halbeck GmbH & Co.KG, 2006
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/W riteIO), 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.
510
© servo-Halbeck GmbH & Co.KG, 2006
-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.
511
© servo-Halbeck GmbH & Co.KG, 2006
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.
W hen 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
512
© servo-Halbeck GmbH & Co.KG, 2006
direction) to follow the master.
-oCommanded and Actual Position Box
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.
513
© servo-Halbeck GmbH & Co.KG, 2006
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
ClearPositionError. 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 epending on model. For
514
© servo-Halbeck GmbH & Co.KG, 2006
additional information please look-up the information about the analog inputs in the POSYS®
Versions Specifications.
-o-
515
© servo-Halbeck GmbH & Co.KG, 2006
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
700/800
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
standard
option
option
option
1920
option
option
option
standard
option
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.
516
© servo-Halbeck GmbH & Co.KG, 2006
-oTrace Mode
Trace Mode
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.
517
© servo-Halbeck GmbH & Co.KG, 2006
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. W hen 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".
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:
518
© servo-Halbeck GmbH & Co.KG, 2006
Clicking 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.
519
© servo-Halbeck GmbH & Co.KG, 2006
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 Commutation and Microstepping Motor Mode Setup.
-o-
520
© servo-Halbeck GmbH & Co.KG, 2006
Index
-116 Bit DAC Motor Command Output 191
-550/50 PWM Motor Command Output 190
-AAC Induction Motor Control 227
Activity Status Register 158
AdjustActualPosition 311
Adjusting the Commutation Angle 214
Aktual Position Register 177
Amplifier Enable and DACOutputs ON/OFF 508
Analog Input 175
Analog Input Pinout Description; POSYS® 19xx 98, 111, 81, 50, 41, 64
Analog Input Pinout Description; POSYS® 8xx-B 98, 111, 81, 50, 41, 64
Analog Input Pinout Description; POSYS® 9xx 98, 111, 81, 50, 41, 64
Analog Inputs 514
AtRest Indicator 223
AxisIn Input 175
AxisOut Output 174
-BBiQuad Output Filter 152
BitReset 418
BitSet 419
BitTest 420
Breakpoint Actions 146
Breakpoint Examples 146
Breakpoint Triggers 144
Breakpoints 144, 438
Brushed Servo Version Pinout Description 105, 75, 92, 58
Brushed Servo Version Pinout Description 105, 75, 92, 58
Brushless Servo/Microstepping Version Pinout Description 60, 93, 106
Brushless Servo/Microstepping Version Pinout Description 60, 93, 106
Bürstenlose Servo- und Mikroschrittmotor Pinout Beschreibung 77
-CCAN 2.0B 73, 103
CAN Event Notification 199
Changes to previous manuals 25
ClearInterrupt 268
ClearPositionError 288
Closed Loop and Open Loop Control Modes 155
Command Summary 227
Commanded and Actual Position Box 513
Commutation Error Detection 209
Commutation Parameters 208
Commutation W aveforms 207
CompareActivity 421
CompareEvent 422
CompareSignal 423
521
© servo-Halbeck GmbH & Co.KG, 2006
Configuring the CAN 2.0B Interface 198
Connections to the SSI 800/900 116
Controller Area Network CAN2.0B 197
Controller Status Box 506
Coordinated Motion with POSYS® Contouring Library 427
Coordinated Moves using POSYS® 900 Motion Controller 432
-DDAC & PW M Motor Output (POSYS® Microstepping Mode only) 224
DACOutputs 289
Default Parameters 114
Defining a Breakpoint; Overview 144
Description of Additional Program Functions 505
DetectPosysDevices 266
Digital Filtering 178
Digital Inputs & Outputs 435
Digital IO Specification POSYS® 7xx/8xx/8xx-B/9xx 434
DisableDPRam 330
Disclaimer, Safety Notice, W arranty 13
Dual Encoder Support 151
-EElectrical Diagrams for CAN Interface 200
Electronic Gear Profile 134
EnableDPRam 331
Encoder Feedback 219
Encoder Pre-Scalar 215
Enter Data Box 511
Environmental and Electrical Ratings 253
Error Code 443
Event Status Register 157
Examples 486
Extension Port Connector J6 (POSYS® 700, ISA-Bus) 424
External Memory Commands 204
External Profile Mode 136
-FFilter Parameter Box 507
-GGetAbsoluteSSIPosition 312
GetActivityStatus 374
GetActualVelocity 313
GetAmpEnable 290
GetAxis_In_Out_Home 377
GetCaptureValue 314
GetChecksum 399
GetCommandedAcceleration 349
GetCommandedPosition 350
GetCommandedVelocity 351
GetCurrentMotorCommand 341
GetDerivative 291
GetEventStatus 378
GetHostIOError 400
GetIntegral 292
GetInterruptAxis 269
GetPhaseCommand 276
GetPositionError 293
522
© servo-Halbeck GmbH & Co.KG, 2006
GetProcessorStatus 401
GetSignalStatus 380
GetSSIVersion 315
GetTime 365
GetTraceCount 387
GetTraceStatus 388
GetVersion 402
GP CON Connector 230
-HHardReset/MCReset 403
Hardware & Driver Installation 30
Hardware Signals; Overview 173
High Speed Position Capture 178
Host Interrupts 162
How to use this manual 256
-IImpressum 12
In-Motion Indicator 163
Incremental Encoder Input 177
Index Pulse Referencing 208
Initialization 504
InitializePhase 277
InitializePOSYS 263
Instruction Error 158
Introduction 502
Introduction 18xx/19xx 14
Introduction 7xx/8xx/8xx-B/9xx 15
IO700/800-1 231
IO700/800-2 234
-LLimit Switches 449
List of available commands 258
List of supported Absolute Encoders w/ SSI Interface 120
Loop Instructions 492
-MMain POSYS® GUI W indow 503
Memory Configuration 201
Memory Page Pointer 202
Microstep Mode Setup 452
Microstep Motor Command Output Signals 226
Microstepping W aveform Generation 225
Mixed Motor Mode 454
Models 18
Motion Complete Indicator 165
Motion Error 163
MotionScript® Utility Functions 490
Motor Command Control 227
Motor Command Output 188
Motor Driver Configurations 228
Motor Mode 139
Motor Mode Configuration 73
Motor Output Configuration 216
Motor Output Mode Box 506
Motor Output Signal Interpretation 224
523
© servo-Halbeck GmbH & Co.KG, 2006
Multi-Turn Systems 179
Multiple Cards 455
MultiUpdate 352
-NNoOperation 406
-OOn-Board Memory Buffer 203
On-Board Memory Read 202
On-Board Memory Signal Decoding 202
On-Board Memory W rite 203
On-Board RAM 446
OpenDevice/CloseDevice 264
OPTON CON 238
Other MotionScript® Functions 491
Output Torque Box 509
Overview 149, 157, 177, 192, 206, 219, 242
Overview; MotionScript® 479
-PParallel Communication Port 192
Parallel Device I/O 181
Parallel-word Device Interfacing 180
Parallel-word Position Input (option) 178
Parameter Buffering 142
PCI ScanForPOSYS 457
Peripheral Device Read 183
Peripheral Device W rite 186
Phase Initialization 210
PID Loop Algorithm 149
PMW Decoding 224
PortInOutW 407
POSYSDriverXSetup 482
POSYS® 7xx 242
POSYS® 8xx/8xx-B/18xx 243
POSYS® 9xx/19xx 245
POSYS® Functions and Procedures 494
Power-On Defaults Box 506
Program Use 484
Programmer´s Info 462
Programming Considerations 117
Programming the Phase Initialization 212
Pulse & Direction Signal Generation 221
Pulse Generation Control 222
-RRead/W riteSSIFrequency 316
Read/W riteSSIRegister 317
Read/W riteSSIResolution 318
ReadAnalog 408
ReadBuffer 331
ReadDPRamLong 333
ReadIO 409
ReadIO / W riteIO 250
ReadPLD 410
RegisteredPosysDevices 267
Reserved Words 490
524
© servo-Halbeck GmbH & Co.KG, 2006
ResetEventStatus 382
ResetSSI 319
Resistor Networks for TTL or inverted Encoder Signals 472
-SS-curve Point-to-Point Profile 131
Selecting Single Phase Output for the POSYS® 206
Serial Communication Port 192
Serial Interface 57, 91, 102, 72
Serial Interface 473
Set/GetAcceleration 353
Set/GetActualPosition 321
Set/GetActualPositionUnits 323
Set/GetAutoStopMode 296
Set/GetAuxiliaryEncoderSource 324
Set/GetAxisMode 366
Set/GetAxisOutSource 383
Set/GetBiQuadCofficient 297
Set/GetBreakpoint 270
Set/GetBreakpointValue 272
Set/GetBufferFunction 334
Set/GetBufferLength 335
Set/GetBufferReadIndex 336
Set/GetBufferStart 337
Set/GetBufferWriteIndex 338
Set/GetCANMode 411
Set/GetCaptureSource 325
Set/GetCommutationMode 278
Set/GetDeceleration 355
Set/GetDerivativeTime 299
Set/GetDiagnosticPortMode 412
Set/GetEncoderModulus 326
Set/GetEncoderSource 327
Set/GetEncoderToStepRatio 328
Set/GetGearMaster 356
Set/GetGearRatio 357
Set/GetIntegrationLimit 300
Set/GetInterruptMask 274
Set/GetJerk 358
Set/GetKaff 301
Set/GetKd 302
Set/GetKi 303
Set/GetKout 304
Set/GetKp 305
Set/GetKvff 306
Set/GetLimitSwitchMode 367
Set/GetMotionCompleteMode 368
Set/GetMotorBias 307
Set/GetMotorCommand 342
Set/GetMotorLimit 308
Set/GetMotorMode 343
Set/GetMotorType 344
Set/GetNumberPhases 279
Set/GetOutputMode 346
Set/GetPhaseAngle 280
Set/GetPhaseCorrectionMode 281
Set/GetPhaseCounts 282
Set/GetPhaseInitializeMode 284
Set/GetPhaseInitializeTime 285
525
© servo-Halbeck GmbH & Co.KG, 2006
Set/GetPhaseOffset 286
Set/GetPhasePrescale 287
Set/GetPosition 359
Set/GetPositionErrorLimit 309
Set/GetProfileKp 310
Set/GetProfileMode 360
Set/GetPW MFrequency 347
Set/GetSampleTime 369
Set/GetSerialPortMode 413
Set/GetSettleTime 371
Set/GetSettleW indow 372
Set/GetSignalSense 385
Set/GetStartVelocity 361
Set/GetStepRange 348
Set/GetStopMode 362
Set/GetSynchronizationMode 415
Set/GetTraceMode 389
Set/GetTracePeriod 390
Set/GetTraceStart 391
Set/GetTraceStop 394
Set/GetTraceVariable 397
Set/GetTrackingW indow 373
Set/GetVelocity 363
SetActualToAbsolutePosition 320
SetAmpDisable 294
SetAmpEnable 295
SetMotionCompleteMode 494
SetStop Command 138
Setting the Cycle Time 139
Settled Indikator 166
Setup Menu for Sinusoidal Commutation and Microstepping Motor Mode 519
SetW atchDog 416
Sign/Magnitude PW M Output 189
Signal Sense 510
Signal Sense Mask 160
Signal Status Register 160
Single Port RAM / Dual Port RAM 516
Smoothing Factor 127
Software Requirements 114
SSI Description 112
SSI Feedback 513
SSI Specifications 112
SSI800/900; Installation 113
Stall Detection 220, 426
Status Activity/Event/Signal 509
Stepper Motor Pinout Description 39, 49, 62, 95, 108, 79
SYNC IO 57, 90, 101, 72
Synchronization of Multple Cards (POSYS® 8xx-B/9xx w/ Sync-Feature and 18xx/19xx) 475
System Overview 16
-TThe SYNC IO - Multiple Controller Synchronization 176
Trace Capture 167
Trace Mode 517
Tracking W indow 172
Trajectories, profiles, and parameters 123
Trajectory Control Units 219
Trajectory Parameter Representation 123
Trajectory Point-to-Point Profile 124
526
© servo-Halbeck GmbH & Co.KG, 2006
Travel Limit Switches 173
-UUpdate 364
Update Periods Box 509
Usage of the On-Board Dual Port RAM with POSYS® 1800 82
User Settable components 35, 43, 54, 88, 100, 66
-VVariables 488
Velocity Contouring Profile 133
Velocity, Acceleration and Jerk Calculation 477
Versions 18xx 65
Versions 19xx 99
Versions 9xx 87
-WW riteBuffer 339
W riteDPRAMLong 340
W riteIO 417
W riting MotionScript® Functions 494
527
© servo-Halbeck GmbH & Co.KG, 2006
© servo-Halbeck GmbH & Co.KG, 2006
www.servo-halbeck.com
528
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