Saia PCD2.H31x, PCD2.H310, PCD2.H311 User Manual

Page 1
SAIAPCD
Process Control Devices
PCD2.H31x Motion control modules for servo drives
Page 2
SAIA-Burgess Electronics Ltd.
Bahnhofstrasse 18 CH-3280 Murten (Switzerland) http;//www.saia-burgess.com
BA: Electronic Controllers Telephone 026 / 672 72 72
Telefax 026 / 672 74 99
___________________________________________________________________________________________________________________________
SAIA-Burgess Companies
Switzerland SAIA-Burgess Electronics AG
Freiburgstrasse 33 CH-3280 Murten 026 672 77 77, Fax 026 670 19 83
France SAIA-Burgess Electronics Sàrl.
10, Bld. Louise Michel F-92230 Gennevilliers 01 46 88 07 70, Fax 01 46 88 07 99
Germany SAIA-Burgess Electronics GmbH
Daimlerstrasse 1k D-63303 Dreieich 06103 89 060, Fax 06103 89 06 66
Nederlands SAIA-Burgess Electronics B.V.
Hanzeweg 12c NL-2803 MC Gouda 0182 54 31 54, Fax 0182 54 31 51
Austria SAIA-Burgess Electronics Ges.m.b.H.
Schallmooser Hauptstrasse 38 A-5020 Salzburg 0662 88 49 10, Fax 0662 88 49 10 11
Belgium SAIA-Burgess Electronics Belgium
Avenue Roi Albert 1er, 50 B-1780 Wemmel 02 456 06 20, Fax 02 460 50 44
Italy SAIA-Burgess Electronics S.r.l.
Via Cadamosto 3 I-20094 Corsico MI 02 48 69 21, Fax 02 48 60 06 92
Hungary SAIA-Burgess Electronics Automation Kft.
Liget utca 1. H-2040 Budaörs 23 501 170, Fax 23 501 180
Representatives
Great Britain Canham Controls Ltd.
25 Fenlake Business Centre, Fengate Peterborough PE1 5BQ UK 01733 89 44 89, Fax 01733 89 44 88
Portugal INFOCONTROL Electronica e Automatismo LDA.
Praceta Cesário Verde, No 10 s/cv, Massamá P-2745 Queluz 21 430 08 24, Fax 21 430 08 04
Denmark Malthe Winje Automation AS
Håndværkerbyen 57 B DK-2670 Greve 70 20 52 01, Fax 70 20 52 02
Spain Tecnosistemas Medioambientales, S.L.
Poligono Industrial El Cabril, 9 E-28864 Ajalvir, Madrid 91 884 47 93, Fax 91 884 40 72
Norway Malthe Winje Automasjon AS
Haukelivn 48 N-1415 Oppegård 66 99 61 00, Fax 66 99 61 01
Czech Republic
ICS Industrie Control Service, s.r.o. Modranská 43 CZ-14700 Praha 4 2 44 06 22 79, Fax 2 44 46 08 57
Sweden Malthe Winje Automation AB
Truckvägen 14A S-194 52 Upplands Våsby 08 795 59 10, Fax 08 795 59 20
Poland SABUR Ltd.
ul. Druzynowa 3A PL-02-590 Warszawa 22 844 63 70, Fax 22 844 75 20
Suomi/ Finland
ENERGEL OY Atomitie 1 FIN-00370 Helsinki 09 586 2066, Fax 09 586 2046
Australia
Siemens Building Technologies Pty. Ltd. Landis & Staefa Division 411 Ferntree Gully Road
AUS-Mount Waverley, 3149 Victoria
Argentina
MURTEN S.r.l. Av. del Libertador 184, 4° “A” RA-1001 Buenos Aires
054 11 4312 0172, Fax 054 11 4312 0172
3 9544 2322, Fax 3 9543 8106
After sales service
USA SAIA-Burgess Electronics Inc.
1335 Barclay Boulevard Buffalo Grove, IL 60089, USA 847 215 96 00, Fax 847 215 96 06
___________________________________________________________________________________________________________________________ Issue : 22.11.2000
Subjet to change without notice
Page 3
SAIA- Bur gess Electronics Ltd.
SAIA® Process Con trol Devi ces
Moti on cont r ol modul es for servo dr i ves
PCD2.H31x
SAIA-Burgess Electronics Ltd. 1999. All rights reserved. Edition 26/762 E2 - 11.99
Subject to technical changes
Page 4
SAIA- Bur gess Electronics Ltd.
Updates
Manual : PCD2.H31x - Motion control modules for servo drives - Edition E2
Date Chapter Page Description
12.05.2000 Appendix A A-36 divers corrections
Page 5
PCD2.H31x Contents
26/762 E2 (2H3-00-E.DOC) SAIA-Burgess Electronic s Ltd. Page 1
Contents
Page
1. Introduction
1.1 General 1-1
1.2 Function and application 1-2
1.3 Main characteristics 1-3
1.4 Typical areas of use 1-4
1.5 Programming 1-5
1.6 Operating modes 1-6
1.7 Commissioning 1-7
2. Technical data
2.1 Hardware technical data 2-1
2.2 Electrical specifications 2-3
2.3 Function-specific data 2-4
3. Presentation
4. Terminals and meaning of LEDs
5. Function description
5.1 Operating modes 5-1
5.2 Generator for the velocity profile 5-2
5.3 PID controller 5-4
5.4 Position decoder and input circuit 5-5
5.5 D/A converter 5-8
5.6 Complementary information: homing (FB Home) 5-9
6. Quick start
6.1 Getting started with IL programming 6-2
6.1.1 Entry-level example in IL with wait loop 6-3
6.1.2 Entry-level example in GRAFTEC 6-6
6.1.3 Simple commissioning program 6-11
6.2 Getting started with FUPLA programming 6-13
Page 6
Contents PCD2.H31x
Page 2 SAIA- Bur gess Electronics Ltd. (2H3-00-E.DOC) 26/762 E2
Page
7. Programming
7.1 Programming in IL with FBs 7-2
7.1.1 The IL package (installation of FB) 7-2
7.1.2 Individual FBs 7-5
7.2 Programming in FUPLA with FBoxes 7-9
7.3 Programming in GRAFTEC with FBoxes 7-10
8. Error handling and diagnosis
8.1 Definition error checked by assembler 8-1
8.2 Error handling in RUN 8-2
8.2.1 Incorrect parameters 8-2
8.2.2 Error during homing 8-3
9. Installation and commissioning
9.1 Introduction 9-1
9.2 Installation and wiring 9-2
9.3 Commissioning drive without motion control module 9-3
9.4 Drive with motion control module 9-4
9.4.1 Switching on the supply voltage 9-4
9.4.2 Preparing the user program 9-5
9.4.3 Determining machine data 9-6
9.4.4 Direction, path measurement (encoder) 9-8
9.4.5 PID controller 9-10
9.4.6 Effect of individual factors on controller behaviour 9-14
9.4.7 Simple commissioning program 9-15
10. Commissioning tool
11. Security aspects
12. Application examples
12.1 Example: 1 axis with homing 12-1
12.2 Example: 1 axis with two velocities 12-9
Page 7
PCD2.H31x Contents
26/762 E2 (2H3-00-E.DOC) SAIA-Burgess Electronic s Ltd. Page 3
Page
Appendix A: Summary of all function blocks (FB)
Init: Initialization FB A-1 Home: Home position FB A-3 Exec: Execution FB A-5
StartMot Start motion A-7 StopUrg Stop motion in urgency A-8 Stop Stop motion A-9 MotOff Motor regulation off A-10 RdActPos Read Actual Position A-11 RdActVel Read Actual Velocity A-12 RdIntSum Read Integration Sum A-13 RdIndexRg Read Index Register A-14 RdStatRg Read Status Register A-15 RdTargPos Read Target Position A-16 RdTargVel Read Target Velocity A-17 GoForw Go Forwards A-18 GoBackw Go Backwards A-19 SgStpFor Single Step Forwards A-20 SgStpBak Single Step Backwards A-21 LdDestAbs Load Destination Absolute A-22 LdDestRel Load Destination Relative A-23 LdVelAbs Load Velocity Absolute A-24 LdVelRel Load Velocity Relative A-25 LdAccAbs Load Acceleration Absolute A-26 LdAccRel Load Acceleration Relative A-27 LdPropG Load Proportional Gain A-28 LdIntG Load Integrative Gain A-29 LdDerG Load Derivative Gain A-30 LdSampInt Load derivative Sampling interval A-31 LdIntLim Load Interactive Limit A-32 ActRegFact Activate Regulation Factors A-33 LdBrkPtAbs Load Breakpoint Absolute A-34 LdBrkPtRel Load Breakpoint Relative A-35 ResStatRg Reset Status Register A-36 SetIdxPos Set Index Position A-37 SetZero Set Home position A-38 MotConf Motion Configuration A-39 SetPosTol Set Position Tolerance A-40
Appendix B: Summary of all function boxes (FBox)
Page 8
Contents PCD2.H31x
Page 4 SAIA- Bur gess Electronics Ltd. (2H3-00-E.DOC) 26/762 E2
Notes
Page 9
PCD2.H31x Contents
26/762 E2 (2H3-00-E.DOC) SAIA-Burgess Electronic s Ltd. Page 5
Important note:
Many detailed manuals have been created to ensure perfect operation of the SAIA PCD. These are for use by technically qualified staff, who may also have successfully completed our workshops.
The diverse performance features of the SAIA
PCD best become appa­rent only by following closely all the information and guidelines con­tained in these manuals regarding assembly, wiring, programming and commissioning.
Doing this will enable you to join the large group of enthusiastic SAIA
PCD users.
Summary
Hardware PCD4
Hardware PCD6
PCD 4 .H1 ..
PCD4.H 2 ..
PCD4 .H3..
Reference Guide (PG3)
PCD8.P1..
PCD 7.D1 .. PCA2 .D1.. PCD 7.D2 ..
Installation Components for RS 485­Networks
FUPL A/ KOP L A function families
PCD1/2 series PCD4 series PCD6 series
General Manuals
*)
*)
*)
*) Adapter module 4'717'4828'0 allows H modu les to be used with th e PCD6.
User's Guide
- PG4
- Modem
- S-Bu s
- PROFIBUS
- Remote I/O
PCD4 .H 4 ..
Hardware PCD1 PCD2 Serie xx7
PCD2.M220
PCD2.H110 PCD2.H150 PCD2.H210
PCD2.H31x
Page 10
Contents PCD2.H31x
Page 6 SAIA- Bur gess Electronics Ltd. (2H3-00-E.DOC) 26/762 E2
Reliability and safety of electronic controllers
SAIA-Burgess Electronics Ltd. is a company which devotes the greatest care to the design, development and manufacture of its products:
state-of-the-art technology
compliance with standards
ISO 9001 certification
international approvals: e.g. Germanischer Lloyd, UL,
Det Norske Veritas, CE mark ...
choice of high-quality componentry
quality control checks at various stages of production
in-circuit tests
run-in (burn-in at 85°C for 48h)
Despite every care, the excellent quality which results from this does have its limits. It is therefore necessary, for example, to reckon with the natural failure of components. For this reason SAIA-Burgess Electronics Ltd. provides a guarantee according to the "General terms and conditions of supply".
The plant engineer must in turn also contribute his share to the reliable operation of an installation. He is therefore responsible for ensuring that controller use conforms to the technical data and that no excessive stres­ses are placed on it, e.g. with regard to temperature ranges, overvoltages and noise fields or mechanical stresses.
In addition, the plant engineer is also responsible for ensuring that a faulty product in no case leads to personal injury or even death, nor to the damage or destruction of property. The relevant safety regulations should always be observed. Dangerous faults must be recognized by ad­ditional measures and any consequences prevented. For example, outputs which are important for safety should lead back to inputs and be monito­red from software. Consistent use should be made of the diagnostic ele­ments of the PCD, such as the watchdog, exception organization blocks (XOB) and test or diagnostic instructions.
If all these points are taken into consideration, the SAIA
PCD will pro­vide you with a modern, safe programmable controller to control, regu­late and monitor your installation with reliability for many years.
Page 11
PCD2.H31x Introduction
26/762 E2 (2H3-01-E.DOC) SAIA-Burgess Electronic s Ltd. Page 1-1
1. In troduction
1.1 General
The PCD2.H3.. motion control module is an intelligent I/O module from the PCD2 series. This module is used for positioning an independent axis with a variable speed control drive (servomotor). The servomotor can be any adjustable DC or AC motor having a power stage and incremental shaft encoder for the registration of position and speed.
PCD1/2-BUS
PROCESSOR PCD1/2
BUS
INTERFACE
M
+
POWER
AMPLIFIER
INCREM.
INPUTS
DIGITAL INPUTS
ANALOG
DIGITAL
POSITION DECODER
PID
REGULATOR
24 V or 5 V
±
10 V
24 V
SET-
POINT
PCD2.H3..
Block diagram of a servo drive for 1 axis
v1
v2
v
s1s
2
s
Destination position
Position control operation with constant acceleration, delay and slow ad­vance to approach destination position
Y
X
Coordinated, quasi-synchronous operation of 2 axes
Page 12
Introduction PCD2.H31x
Page 1-2 SAIA-Burgess El ectronics Ltd. (2H3-01-E.DOC) 26/762 E2
1.2 Function and application
The ..H3.. module is used to position a single axis with variable speed control DC or AC servomotors. This requires the drive unit to have a power stage and incremental shaft encoder for capturing position or speed. In a PCD1 system up to 4 motion control modules (4 axes) and in a PCD2 up to 8 ..H3.. modules (8 axes) can be plugged anywhere on the I/O bus and operated together with all base units.
The motion control module contains a single-chip processor that inde­pendently directs and PID controls every movement according to pa­rameters supplied by the user program (velocity, acceleration and desti­nation position). This enables each axis to be controlled independently. It is possible to program the linkage of several axes (point-to-point) in co­ordinated, quasi-synchronous mode. Linear motion is thereby achieved with cartesian axes.
PCD2.H31x motion control modules should be plugged into the PCD2.M1xx base unit and not the PCD2.C1xx expansion unit. This is to take account of the relatively high current consumption.
Page 13
PCD2.H31x Introduction
26/762 E2 (2H3-01-E.DOC) SAIA-Burgess Electronic s Ltd. Page 1-3
1.3 Main characteristics
Ideal for compact or economical machines
PID controlled regulation of servomotor position and speed
Velocity, destination position and PID parameters can be modified,
even during motion
Analogue ±10V output with 12 bits inc. sign bit for triggering the
motor power stage
Digital input for reference switch with the .. H310
Encoder signal inputs of 24 VDC (source operation) or
5 V/RS 422 (antivalent line driver)
Other axis-specific inputs and outputs (such as the limit switches, the
reference switch for the PCD2.H311 module, ENABLE for the driver) must be monitored or controlled with a standard I/O module (e.g. PCD2.B100, PCD2.E110/E111 or PCD2.A410).
Page 14
Introduction PCD2.H31x
Page 1-4 SAIA-Burgess El ectronics Ltd. (2H3-01-E.DOC) 26/762 E2
1.4 Typical areas of use
Handling robots
Automatic placement and assembly machines
Automatic palletizers
Packing machines
Sheet metal working machines
Automatic drilling machines
etc.
Page 15
PCD2.H31x Introduction
26/762 E2 (2H3-01-E.DOC) SAIA-Burgess Electronic s Ltd. Page 1-5
1.5 Programming
The availability of practical function blocks (FBs and FBoxes) means that only the desired parameters need to be entered for the various motion and travel functions. The present detailed manual contains descriptions of each function block, complemented with practical application examples. Programming is via the standard PG4 programming tool from version V2.0.70, either in IL (Instruction List) or graphically (FUPLA).
Initialization instruction
INIT FB. When it is called, 11 parameters are given with it.
See section 7.1.2 and appendix A, pages A1/2
Execution instruction
EXEC FB, always including 3 parameters. Over 30 different in-
structions can be executed.
See section 7.1.2 and appendix A, pages A5/40
Home instruction
HOME FB for automatically seeking the reference switch. This
FB has 7 parameters.
See section 7.1.2 and appendix A, pages A3/4
Diagnostics and error handling
Recognition of incorrect FB parameters (diagnostic register) Timeout monitoring for FB 'Home'.
See chapter 8.
Page 16
Introduction PCD2.H31x
Page 1-6 SAIA-Burgess El ectronics Ltd. (2H3-01-E.DOC) 26/762 E2
1.6 Operating modes
When solving motion control tasks with a servo drive, two different oper­ating modes are fundamentally available:
position control mode
speed control mode
In position control mode various parameters are entered (PID factors, ac­celeration, velocity, etc.) after which a preset destination position is ap­proached in a controlled manner
In speed control mode the desired velocity is attained with a preset rate of acceleration. Travel continues at this velocity in a controlled manner until there is a stop instruction. The desired velocity can be changed even during motion.
v1
v2
v
s1s
2
s
Destination position
Position control mode with constant acceleration and delay, plus reduced speed on approach to destination position
Page 17
PCD2.H31x Introduction
26/762 E2 (2H3-01-E.DOC) SAIA-Burgess Electronic s Ltd. Page 1-7
1.7 Commissioning
Convenient commissioning software is available in the form of a FUPLA program. This tool offers a simple method whereby all tests and adjust­ments required during commissioning can be carried out or checked on­line.
This commissioning tool is available on diskette, order reference: PCD8.H31.
See chapter 10 for more details.
Page 18
Introduction PCD2.H31x
Page 1-8 SAIA-Burgess El ectronics Ltd. (2H3-01-E.DOC) 26/762 E2
Notes
Page 19
PCD2.H31x Technical data
26/762 E2 (2H3-02-E.DOC) SAIA-Burgess Electronic s Ltd. Page 2-1
2. Technical data
2.1 Hardware technical data
Digital inputs of the PCD2.H310 module
Number of inputs: 1 encoder A, B, IN
1 reference input Input voltage: typically 24 V "Low" range: 0 ... +4 V "High" range: +15 ... +30 V Source operation only (pos. logic) Input current at 24 VDC: 6 mA (typical) Circuit type electronically connected Reaction time 30 µs
Digital inputs of the PCD2.H311 module
Number of inputs: 1 encoder A, /A, B, /B, IN, /IN
(no reference input) Input voltage: typically 5 V Signal level: Antivalent inputs according to RS 422 Hysteresis: max. 200 mV Line termination resistance: 150
Analogue output for the PCD2.H310/311 modules
Analogue controller output 12 bit resolution (with sign bit) Short-circuit protection yes Electrical isolation no Output voltage *) ± 10 V, accuracy of adjustment ± 5 mV Logic positive (positive switching) Minimum load impedance 3 k
5 V supply of 5 V encoder for the PCD2.H311 module
5 V output 5 V supply of encoder Short-circuit protection yes Electrical isolation no Output voltage 5 V Max. load current 300 mA Short-circuit current 400 mA (This current additionally loads the 5 V bus of the PCD1/2)
*) Balancing output voltage is carried out in the factory. You are there-
fore strongly advised not to adjust the tuning potentiometer.
Page 20
Technical data PCD2.H31x
Page 2-2 SAIA-Burgess El ectronics Ltd. (2H3-02-E.DOC) 26/762 E2
Operating conditions
Ambient temperature Operation: 0 ...+50°C without forced ven-
tilation
Storage: -20 ... +85°C Noise immunity CE mark, compliant with EN 50081-1 and
EN 50082-2
LED displays and possibilities for querying from software
Total 5
LED "A" Status of encoder input "A" LED "B" Status of encoder input "B" LED "IN" Status of index input LED "Ref" Status of reference switch (H310) LED "Pw 5V" Encoder 5 V supply (H311) LED "Power" ± 15 V supply
Querying from software
Input Power (addr. 08) Enables software monitoring of supplies Input Ref (addr. 11) Enables the logic status of the reference
switch to be queried (H310) Input Pw5V (addr. 11) Enables software monitoring of the 5 V
supply (H311) Input Version (addr. 12) Enables module type to be queried H310
or H311 (H = H310, L = H311)
General
Processor LM 628 Programming Based on PCD user program (PG4) and
supported by a library of FBs and FBoxes.
Ordering details
PCD2.H310 1 axis for encoder 24 VDC PCD2.H311 1 axis for encoder 5 V/RS 422 PCD9.H31E Software library with function blocks (FBs)
for programming in IL. PCD8.H31 Commissioning tool in FUPLA
Page 21
PCD2.H31x Technical data
26/762 E2 (2H3-02-E.DOC) SAIA-Burgess Electronic s Ltd. Page 2-3
2.2 Electri cal specifications
Internal power consumption (without encoder)
+5 V typically 125 mA, max. 150 mA Uext typically 10 mA, max. 15 mA
External supply Terminals +/-: 24 V (19 ... 32 V) smoothed,
max. permissible ripple: 10%
Digital inputs
4 or 6 respectively (see section 2.1)
Analogue output
1 (see section 2.1)
Important :
The maximum current that can be supplied to the 5V is 1600 mA for a PCD2 or 750 mA for a PCD1.
Users of PCD2.H310 and/or PCD2.H311 modules are urged to check the overall current consumption of all modules in a PCD2/1 and in any C100 or C150 expansion units, and to ensure that this maximum is not ex­ceeded. (The current provided to supply the 5V encoder also comes from this source and must equally be taken into consideration).
When working with an expansion unit, care should be taken to place the PCD2.H31x modules in the base unit and only to plug “normal” I/O modules into the expansion unit, otherwise the potential drop on the con­necting cable might take on excessively high values.
Page 22
Technical data PCD2.H31x
Page 2-4 SAIA-Burgess El ectronics Ltd. (2H3-02-E.DOC) 26/762 E2
2.3 Function-specific data
Number of systems 1
Motion parameters
(31-bit registers are used for destination position, velocity and accelera­tion, numerical range ± 2
30
)
Position Resolution selectable (depending on machine
factor)
Velocity Resolution selectable (depending on machine
factor)
Acceleration Resolution selectable (depending on machine
factor)
PID controller Sample time 341 µs, programmable proportional,
integral and differential factors. Sample time for differential part can be programmed separately
Counting frequency up to 50 kHz
Page 23
PCD2.H31x Presentation
26/762 E2 (2H3-03-E.DOC) SAIA-Burgess Electronic s Ltd. Page 3-1
3. Presentation
Assembled module with terminals PCD2.H310 (24V encoder)
9876543210
BINOut
Ref IN B APower
Ref nc Anc nc
Bus connector Addressing circuit Connector for address program­ming (not for user) Processor Potentiometer for balancing output voltage (not for user)
DAC (D/A converter)
Supply
LEDs
Terminals
−−−− and + are the external supply terminals: V
ext
Ref is the digital input for the reference switch Out is the analogue controller output A, B, IN are the 3 encoder signals nc terminals are not used (not connected)
Assembled module with terminals PCD2.H311 (5V encoder)
9876543210
BINOut
Pw 5V IN B APower
5V
/IN A/B /A
LEDs
Terminals
and + are the external supply terminals: V
ext
5V is the output for the encoder’s 5V supply (300 mA max.) Out is the analogue controller output A, B, IN are the encoder’s 3 non-inverted signals /A, /B, /IN are the encoder’s 3 inverted signals
Page 24
Presentation PCD2.H31x
Page 3-2 SAIA-Burgess El ectronics Ltd. (2H3-03-E.DOC) 26/762 E2
Simple block diagram
Other axis-specific inputs and outputs (such as limit switches, the PCD2.H311 module’s reference switch, the driver’s ENABLE) must be monitored or controlled with a standard I/O module (e.g. PCD2.B100, PCD2.E110/E111 or PCD2.A410).
A
/A
B
/B
/IN
IN
A B
IN
5V encoder24V encoder
LS ref
(H310)
PID
regulator
Trajector
generator
Out (+/- 10V) to amplifier
Bus interface
PCD1/2 bus
Position counter
Page 25
PCD2.H31x Terminals
26/762 E2 (2H3-04-E.DOC) SAIA-Burgess Electronic s Ltd. Page 4-1
4. Terminals and meaning of LEDs
Terminals and LEDs of the PCD2.H310 (24V encoder)
The picture shows the labelling of the printed circuit board. The I/O con­nector block has standard 0 .. 9 numbering (right to left)
Inputs:
Number 4 Terminal 0 = "A": Encoder signal "A"
Terminal 1 = nc: not used *) Terminal 2 = "B": Encoder signal "B" Terminal 3 = nc: not used *) Terminal 4 = "IN": Encoder signal "IN" Terminal 5 = nc: not used *)
Terminal 7 = "Ref": Digital input for reference switch
Ausgang:
Terminal 6 = "Out": Analogue controller output
Speisung:
Terminal 8 = + + 24 VDC, smoothed Terminal 9 = - GND
*) Do not wire – not for use as a restart point
Ref Out nc IN nc B nc A
ABINRefPower
9876543210
Page 26
Terminals PCD2.H31x
Page 4-2 SAIA-Burgess El ectronics Ltd. (2H3-04-E.DOC) 26/762 E2
Terminals and LEDs of PCD2.H311 (5V encoder)
The picture shows the labelling of the printed circuit board. The I/O con­nector block has standard 0 .. 9 numbering (right to left)
Inputs:
Number 6 Terminal 0 = "A": Encoder signal "A"
Terminal 1 = "/A": Encoder signal "/A" Terminal 2 = "B": Encoder signal "B" Terminal 3 = "/B": Encoder signal "/B" Terminal 4 = "IN": Encoder signal "IN" Terminal 5 = "/IN": Encoder signal "/IN"
Outputs:
Terminal 6 = "Out": Analogue controller output
Terminal 7 = "5V": 5V supply for encoder
(max. 300 mA)
Supply:
Terminal 8 = + + 24 VDC, smoothed Terminal 9 = - GND
5V Out /IN IN /B B /A A
ABINPw 5 VPower
9876543210
Page 27
PCD2.H31x Terminals
26/762 E2 (2H3-04-E.DOC) SAIA-Burgess Electronic s Ltd. Page 4-3
Meaning of LEDs
LED Ref shows the logic state of the reference switch. This LED is "on" when a reference is requested or when the switch has not been wired. (Applies to PCD2.H310 only).
LED Pw5V represents the supply of a connected encoder. This LED is "on" when the 5V are OK (no short-circuit). (Applies to PCD2.H311 only).
LED Power shows the presence of ±15V . This LED is "on" when both 15V supplies are OK.
LEDs A, B represent the encoder inputs. These LEDs are "on" when the logic state is "H".
LED IN represents the encoder’s index input. This LED is "on" in the active state (negative logic with H310).
Caution: This module includes components that are
sensitive to electrostatic discharges.
Page 28
Terminals PCD2.H31x
Page 4-4 SAIA-Burgess El ectronics Ltd. (2H3-04-E.DOC) 26/762 E2
Notes
Page 29
PCD2.H31x Function description
26/762 E2 (2H3-05-E.DOC) SAIA-Burgess Electronic s Ltd. Page 5-1
5. Function description
5.1 Operating modes
Two fundamentally different operating modes are available :
position control operation
speed control operation
Position control operation (Initiation with instruction: 'StartMot') Motion control instructions follow the pattern below:
1. Position and parameter entry for velocity profile
2. Start motion control
3. Await signal for "Destination position reached". In position control mode various parameters are entered (PID factors, ac-
celeration, velocity, etc.) after which a preset destination position is ap­proached in a controlled manner. During the motion, velocity, PID fac­tors and destination position can be changed.
Speed control operation
(Initiation with instructions 'GoForw' or 'GoBackw') Pattern of instructions :
1. Parameter entry for the velocity profile
2. Start motion
3. Stop motion by entering a stop instruction In speed control mode the desired velocity is attained with a defined rate
of acceleration. Travel continues at this velocity in a controlled manner until there is a stop instruction. The desired velocity can be changed even during motion.
Function units
As the block diagram shows (page 3-2) the motion control module essen­tially consists of the following function units:
Generator for velocity profile
PID controller
Position decoder and input circuit
Bus interface (CPLD) to PCD bus
D/A converter for the analogue controller output
Page 30
Function description PCD2.H31x
Page 5-2 SAIA-Burgess El ectronics Ltd. (2H3-05-E.DOC) 26/762 E2
5.2 Generator for the velocity profile
The profile generator calculates theoretical speed according to the accel­eration and velocity presets and as a function of time in position or speed control mode. In position control operation, the difference between de­sired and actual positions is fed to the PID controller during motion. Very accurate positioning of the motion is thereby achieved.
Standard velocity profile
Velocity profile with desired velocity and destination position changed during motion.
Velocity and destination position can be changed at any point along the mo­tion and the controller will accelerate or brake accordingly at the defined rate of acceleration. Acceleration and braking ramps are symmetrical.
In speed control mode, the controller accelerates to the user-defined desired speed and runs on at a constant velocity until there is a stop command.
Operating principle of speed control: The destination position is continuously augmented (according to the re-
quired velocity). The difference between destination and actual position (captured with the encoder) is again conveyed to the PID controller. The latter immediately compensates for speed fluctuations (caused by what­ever disturbance) by making the controller output greater or smaller.
Preset velocity
Constant
acceleration
and delay
Destination position
v
t
v
t
+
v = velocity t = time
Page 31
PCD2.H31x Function description
26/762 E2 (2H3-05-E.DOC) SAIA-Burgess Electronic s Ltd. Page 5-3
If the motor fails to reach the desired speed (e.g. due to a blocked rotor) the difference between the destination and actual positions is very large. This generates a position error message, which can trigger an interrupt or automatic motor stop. The maximum allowable position error is a pro­grammable value.
Page 32
Function description PCD2.H31x
Page 5-4 SAIA-Burgess El ectronics Ltd. (2H3-05-E.DOC) 26/762 E2
5.3 PID controller
The PID controller can be used to help the motor to approach the desti­nation position accurately and keep it in that position, as the controller remains active until a stop command occurs. The controller utilizes the following algorithm:
where: U(n) Controller output for the motor
e(n) Position error at the n'th sampling n Sampling for the integral portion n' Sampling for the differential portion kp Proportional factor ki Integral factor kd Differential factor
User programmable parameters:
Control factors kp, ki, kd
Differential sampling time
Integration limit (IL) for the integral portion
Control factors kp, ki and kd can be changed during motion. The sampling time for the proportional and for the integral factor is
341 µs. This means, that the value of the controller output is refreshed any 341 µs.
The sampling time of the differential portion can be adjusted in steps of 341 µs (max. 256*341 µs). For operation at slow speeds, a greater sampling time should be selected.
Integration limit IL : limitation applies to the amount of the expression
Page 33
PCD2.H31x Function description
26/762 E2 (2H3-05-E.DOC) SAIA-Burgess Electronic s Ltd. Page 5-5
5.4 Position decoder and input circuit
Position and velocity capture
The precise position and/or speed of the motor is captured with an incre­mental shaft encoder. The following encoder signals can be connected:
PCD2.H310: A, B, IN (terminals)
24V signals in source mode
PCD2.H311: A, /A; B, /B; IN, /IN (terminals
5V RS422 inputs (antivalent line driver)
Inputs A, B, /IN :
Status diagram of signals A, B, /IN at position decoder :
Inputs A, B:
Whenever signals A or B change status (0 → 1 and 1 → 0) the internal position register is incremented or decremented by 1. In this way the quadruple resolution of encoder division is achieved. Correspondingly, the entry for destination position must also be multiplied by four when working with encoder impulses.
For the position decoder, signals must demonstrate the exact sequence illustrated in the figure above.
A
B
IN
12341234
1 Encoder-
division
Status
Ind e x = A & B & IN
Impulses to position reg ister
12341234
Direction
neg. pos.
Status
A B
IIII
III
OO OO
OO
OO
I
Page 34
Function description PCD2.H31x
Page 5-6 SAIA-Burgess El ectronics Ltd. (2H3-05-E.DOC) 26/762 E2
Input IN:
With modules for 24V encoders (type H310) input IN can be used as an index impulse input (zero signal from the encoder) or reference point input.
- Use as index impulse input: Whenever all 3 encoder signals have a status of zero and the "SetIdx-
Pos" (Set Index Position) function block has been called, the absolute motion position is written to the index position register .
- Use as reference point input: A reference switch can be connected, e.g. to define the zero position.
Modules for the connection of 5V encoder signals
The PCD2.H311 module is used. Shielded cable must be used for connec­tion to the 5V encoder:
- max. cable length: 20m
- min. line cross section: 0.25 mm
2
e.g. cable types PCD2.K271 or PCD2.K273
Reference switch
Only the PCD2.H310 has the 'Ref' input (24 VDC, source mode). The sig­nal for this switch is carried directly to the PCD2 bus. This means that the input should be monitored from the user program to trigger any necessary action.
With the PCD2.H311, any reference switch should be wired to a "normal" digital I/O module.
The 'reference switch' is used in combination with the 'limit switches' for the 'Home' FB. In both modules (H310 and H311) these limit switches should be carried to a digital I/O module.
Page 35
PCD2.H31x Function description
26/762 E2 (2H3-05-E.DOC) SAIA-Burgess Electronic s Ltd. Page 5-7
Input wiring diagrams and connections
PCD2.H310
PCD2.H311
+5V
+5V
A
B
IN
A
B
IN
+5V
A
B
A
IN
/A
B
/B
IN
/IN
Page 36
Function description PCD2.H31x
Page 5-8 SAIA-Burgess El ectronics Ltd. (2H3-05-E.DOC) 26/762 E2
5.5 D/A converter
Both PCD2.H310 and H311 modules have an analogue output for the motor’s controller output.
A 12 bit D/A converter has been used.
Analogue output connection:
Page 37
PCD2.H31x Function description
26/762 E2 (2H3-05-E.DOC) SAIA-Burgess Electronic s Ltd. Page 5-9
5.6 Complementary information: homing (FB Home)
With the 'Home' FB, independent homing can take place. Seven parame­ters are required for definition of the home travel. The use of the 'Home' FB is described in section 12.1.
The axis to be referenced must have been initialized (FB Init). (The fol­lowing description refers to the figure on the next page). For successful use of the 'Home' FB, the axis and reference switch must be located be­tween 'LS1' and 'LS2'.
1.
The search for the reference switch is undertaken at the velocities de-
fined in parameter 5 (Vmax). The search direction is defined in parame­ter 2. If the reference switch is not found and the axis meets a limit switch, the search direction is inverted.
2.
The digital input to which the reference switch is wired is defined in pa-
rameter 7. For a PCD2.H310 module this address is the module base ad­dress plus 11. For a PCD2.H311 module any address can be chosen ("normal" digital input module).
3.
When the reference switch has been found free travel commences. The
direction of free travel is defined in parameter 3; the velocity for free travel is Vmin (parameter 4).
4.
When the reference switch has been released, the axis travels as far as
the next encoder index signal and stops. This position is now defined as the zero position.
5.
The module is configured with the original settings (from FB Init) and FB
Home is exited.
Page 38
Function description PCD2.H31x
Page 5-10 SAIA-Burgess Electronics Ltd. (2H3-05-E.DOC) 26/762 E2
Instructions:
Several modules can be referenced on one PCD at the same time.
The 'fEndHome_x' flag must be =L for the start of the homing proce-
dure.
Flags 'fLS1_x' and 'fLS2_x' are representations of the limit switches.
The logic states of both flags are the result of querying both digital in­puts to which these LSs are connected.
Break contacts should be used for the switches.
During the homing procedure, limit switches are switched off inter-
nally and are only used for reversing the direction of travel.
If no reference switch is found, the error flag
'fHomeErr_x' (x = module no.) is set and the 'Home' FB is exited.
When the 'Home' FB has finished (successfully or broken off by an
error) the 'fEndHome_x' flag is set automatically.
Since the 'Home' FB is only exited when homing has been success-
fully completed or an error has been detected, the FB can be broken off with a timeout (parameter 6). Its value corresponds to the time in seconds after which the 'Home' FB will be abandoned. In this case, as well as the error flag 'fHomeErr_x', the diagnostic register 'rDiag' is loaded with code 6 (for parameter 6) in the third byte (for FB Home). Parameter checking takes place as described in chapter 8.
A
1.
3.
Reference switch released
"LS 1"
"LS 2"
LS emerg. off
LS emerg. off
Reference switch
Axis
Stop pos. after free travel from the reference switch
Reference switch addressed
2.
Reference position
Page 39
PCD2.H31x Quick start
26/762 E2 (2H3-06-E.DOC) SAIA-Burgess Electronic s Ltd. Page 6-1
6. Quick start
Minimal arrangement for position control using a PCD2.H310 or PCD2.H311, not including reference switch and limit switches.
The individual elements are:
PCD1 or PCD2, equipped at least with 1 PCD2.H310/311
with F510/530 display 1 PCD2.E110
Motion model with DC motor, spindle and incremental shaft encoder
DC Motor with gears: approx. 500 rev/min at 10 VDC
Spindle gradient: 1 mm/revolution Incremental shaft encoder: 1000 signals per revolution
4-quadrant servo amplifier
e.g. with Op-Amp LM 12 (National Semiconductor) for details see: http://www.national.com/pf/LM/LM12.html
PG4 from version V2.0.70 and FBs PCD9.H31E
Carriage
Shaft encode
DC
Motor
9876543210
5V Out /IN IN /B B /A A
H311
E110
24V
0V
0V
Servo
amplifier
Start
PCD2
+/-10V
0163248
648096112
Page 40
Quick start PCD2.H31x
Page 6-2 SAIA-Burgess El ectronics Ltd. (2H3-06-E.DOC) 26/762 E2
6.1 Entry with programming in IL
The basic program shown below is proposed as the simplest way of com­missioning a regulated position controller:
A properly written user program should not contain any wait loops. Despite this, our first example has been de­signed with wait loops to demonstrate the main instruc­tions for driving a PCD2.H31x. In practice a GRAFTEC or (in future) a FUPLA structure should always be chosen for this type of program. (See second example and chapter
10).
Task: After switching on the PCD’s 'Start' input, the carriage is to
travel first in one direction and then, after a pause, back again to the starting position. It is assumed that, at the start, the carriage will be located roughly in the middle of the axis.
The purpose of this example is to demonstrate the principle and possible user program structures. Above all note the be­ginning of the program with its assembler directives '$include ' and '$group'.
The meaning and definition of individual parameters require some knowledge of control technique and are explained in chapter 9: 'Installation and commissioning'.
This first example (with wait loops) is entitled 'Intro-1.src'. The same example shown subsequently in GRAFTEC is called 'Intro-2.sfc'
The FBs (IL for PG4 from version V2.0.70) are on the PCD9.H31E diskette. To install the FBs on the PC, follow the instructions in chapter 7 below and the README.TXT file. This file can also be found on the diskette.
The number of modules (1) and the address of the PCD2.H311 module (ad­dress 80) must be entered in the file D2H310_B.MBA:
NbrModules EQU 1 ; No. of H31x modules used (0...16)
BA_1 EQU 80 ; Base address of module 1
This file (D2H310_B.MBA) must be located in the project directory for the example, i.e. the file should be copied manually from the diskette into the current project directory.
Page 41
PCD2.H31x Quick start
26/762 E2 (2H3-06-E.DOC) SAIA-Burgess Electronic s Ltd. Page 6-3
6.1.1 Entry-level example in IL with wait loop: INTRO-1.SRC
$include D2H310_B.equ $group H310
xob 16
LD R 1000
4.0 ; Mechanical factor
LD R 1001
8000 ; Initial absolute speed
LD R 1002
10000 ; Initial absolute acceleration
CFB Init ; Initialization FB
K 1 ; Module number
250 ; Proportional factor (regulator) 0 ; Integrative factor (regulator) 0 ; Derivative factor (regulator) 4000 ; Integrative limit value 5 ; Derivative term sampling interval 500 ; Position tolerance
0 ; Behaviour in case of position error R 1000 ; Mechanical factor register R 1001 ; Initial velocity register R 1002 ; Initial acceleration register
exob
; ---------------------------------------------------------------
cob 0
0
start: sth i 0
CFB Exec ; Executable FB
K 1 ; Module number
RdActPos ; Command: Read Actual Position R 90 ; Actual Position register
DSP R 90 ; Display register
jr l start ; If Start is not done, wait
LD R 100 ; Target Position
20000 ; Absolute value
CFB Exec ; Executable FB
K 1 ; Module number
LdDestAbs ; Command: Load Absolute Destination R 100 ; Absolute Destination register
CFB Exec ; Executable FB
K 1 ; Module number
StartMot ; Command: Start motion
rNotUsed ; Dummy register
Page 42
Quick start PCD2.H31x
Page 6-4 SAIA-Burgess El ectronics Ltd. (2H3-06-E.DOC) 26/762 E2
pos1: CFB Exec ; Executable FB
K 1 ; Module number
RdActPos ; Command: Read Actual Position R 90 ; Actual Position register
DSP R 90 ; Display register
CFB Exec ; Executable FB
K 1 ; Module number
RdStatRg ; Command: Read Status Register R 0 ; Value of Status Register
STH fOnDest_1 ; Position reached? jr l pos1 ; if no - wait (loop)
ld t 0 ; load timer for pause
50 ; 5 sec
pause1: sth t 0 ; pause elapsed?
jr h pause1 ; if no - wait (loop)
LD R 100 ; Target Position
0 ; Absolute value
CFB Exec ; Executable FB
K 1 ; Module number
LdDestAbs ; Command: Load Absolute Destination R 100 ; Absolute Destination register
CFB Exec ; Executable FB
K 1 ; Module number
StartMot ; Command: Start motion
rNotUsed ; Dummy register
pos2: CFB Exec ; Executable FB
K 1 ; Module number
RdActPos ; Command: Read Actual Position R 90 ; Actual Position register
DSP R 90 ; Display register
CFB Exec ; Executable FB
K 1 ; Module number
RdStatRg ; Command: Read Status Register R 0 ; Value of Status Register
STH fOnDest_1 ; Position reached? jr l pos2 ; if no - wait (loop)
ld t 0 ; load timer for pause
50 ; 5 sec
pause2: sth t 0 ; pause elapsed?
jr h pause2 ; if no - wait (loop)
ecob
$endgroup
Page 43
PCD2.H31x Quick start
26/762 E2 (2H3-06-E.DOC) SAIA-Burgess Electronic s Ltd. Page 6-5
Description of programs:
The directive '$include' is used to integrate file 'D2H310_B.equ'. (This file in turn integrates the 'D2H310_B.mba' file with information about the number of H31x modules and their base addresses. This happens auto­matically. The user has nothing to do with it.)
The directive '$group H310' declares the program code up to '$endgroup' as belonging to PCD2.H31x.
In XOB 16 (coldstart block) module initialization takes place. Before FB INIT the 3 registers for machine factor, velocity and acceleration should be loaded. The choice of individual values is explained in chapter 9: 'In­stallation and commissioning'.
FB INIT is then called. Choosing the 11 parameters is also described in chapter 9.
The actual motion program occurs in COB 0. Start is awaited with PCD input 0. To enable current position to be cap-
tured even during this phase and appear on the display, the instruction 'RdActPos' is incorporated in the wait loop. This means that, if the start condition is not met, the position will be read continuously.
The absolute destination position is loaded into PCD register R 100. This value is transferred to the module with 'LdDestAbs'. The 'StartMot' com­mand starts the motion. (20 mm traverse)
In a program loop the position is continuously read with 'RdActPos' and output to the display via PCD register R 90. Motion takes place accord­ing to the parameters selected in FB INIT, i.e. the motion is travelled in the best way, controlled by the module itself, uninfluenced by the user program, up to the destination point. To allow the program sequence to continue correctly, it is necessary to determine when motion has con­cluded. This is done by querying the 'fOnDest_x' flag (fOnDest_1 for module no. 1 in our case). However, before this flag can be queried, it must be activated with the 'RdStatRg' instruction.
The program loop that reads or displays current position and activates or queries the position flag is in a constant cycle until the destination posi­tion has been reached.
When the destination position has been reached a pause of, e.g. 5 sec­onds is loaded and waited through. The new destination position (zero) is then loaded and motion travels back to the starting point.
In order to know the real, current position even during pauses (stabiliza­tion of final position), it would also be necessary to incorporate the com­mands 'RdActPos' and 'DSP R 90' into wait loops for these pauses.
Page 44
Quick start PCD2.H31x
Page 6-6 SAIA-Burgess El ectronics Ltd. (2H3-06-E.DOC) 26/762 E2
6.1.2 Entry-level example in GRAFTEC: INTRO-2.SFC
Same example as under section 6.1.1, but in a proper GRAFTEC struc­ture without any program jumps or wait loops. Individual steps and tran­sitions have been edited in IL.
Page 45
PCD2.H31x Quick start
26/762 E2 (2H3-06-E.DOC) SAIA-Burgess Electronic s Ltd. Page 6-7
Program code for "intro-2.sfc"
(To obtain this representation, file "intro-2.sfc should be renamed as “intro-2.src").
SB 0
;-------------------------------
IST 10 ;Initialization
O50
$include D2H310_B.equ $group H310
LD R 1000
4.00 ; Mechanical factor
LD R 1001
8000 ; Initial absolute speed
LD R 1002
10000 ; Initial absolute acceleration
CFB Init ; Initialization FB
K 1 ; Module number
250 ; Proportional factor (regulator) 0 ; Integrative factor (regulator) 0 ; Derivative factor (regulator) 4000 ; Integrative limit value 5 ; Derivative term sampling interval 500 ; Position tolerance
0 ; Behaviour in case of position error R 1000 ; Mechanical factor register R 1001 ; Initial velocity register R 1002 ; Initial acceleration register
EST ;10
;-------------------------------
ST 11
I50 I 55 ;Pause 2 elapsed ? O 51 ;Start OK ?
EST ;11
;-------------------------------
ST 12 ;Move forwards
I 51 ;Start OK ? O 52 ;Move forwards ended ?
LD R 100 ; Target Position
20000 ; Absolute value
CFB Exec ; Executable FB
K 1 ; Module number
LdDestAbs ; Command: Load Absolute Destination R 100 ; Absolute Destination register
CFB Exec ; Executable FB
K 1 ; Module number
StartMot ; Command: Start motion
rNotUsed ; Dummy register
EST ;12
Page 46
Quick start PCD2.H31x
Page 6-8 SAIA-Burgess El ectronics Ltd. (2H3-06-E.DOC) 26/762 E2
;-------------------------------
ST 13 ;Pause 1
I 52 ;Move forwards ended ? O 53 ;Pause 1 elapsed ?
ld t 0
50
EST ;13
;-------------------------------
ST 14 ;Move backwards
I 53 ;Pause 1 elapsed ? O 54 ;Move backwards ended ?
LD R 100 ; Target Position
0 ; Absolute value
CFB Exec ; Executable FB
K 1 ; Module number
LdDestAbs ; Command: Load Absolute Destination R 100 ; Absolute Destination register
CFB Exec ; Executable FB
K 1 ; Module number
StartMot ; Command: Start motion
rNotUsed ; Dummy register
EST ;14
;-------------------------------
ST 15 ;Pause 2
I 54 ;Move backwards ended ? O 55 ;Pause 2 elapsed ?
ld t 0
50
EST ;15
;-------------------------------
TR 50
I 10 ;Initialization O11
ETR ;50
;-------------------------------
TR 51 ;Start OK ?
I11 O 12 ;Move forwards
CFB Exec ; Executable FB
K 1 ; Module number
RdActPos ; Command: Read Actual Position R 90 ; Actual Position register
DSP R 90 ; Display register
sth i 0
ETR ;51
Page 47
PCD2.H31x Quick start
26/762 E2 (2H3-06-E.DOC) SAIA-Burgess Electronic s Ltd. Page 6-9
;-------------------------------
TR 52 ;Move forwards ended ?
I 12 ;Move forwards O 13 ;Pause 1
CFB Exec ; Executable FB
K 1 ; Module number
RdActPos ; Command: Read Actual Position R 90 ; Actual Position register
DSP R 90 ; Display register
CFB Exec ; Executable FB
K 1 ; Module number
RdStatRg ; Command: Read Status Register R 0 ; Value of Status Register
STH fOnDest_1 ; Position reached? ETR ;52
;-------------------------------
TR 53 ;Pause 1 elapsed ?
I 13 ;Pause 1 O 14 ;Move backwards
stl t 0 ETR ;53
;-------------------------------
TR 54 ;Move backwards ended ?
I 14 ;Move backwards O 15 ;Pause 2
CFB Exec ; Executable FB
K 1 ; Module number
RdActPos ; Command: Read Actual Position R 90 ; Actual Position register
DSP R 90 ; Display register
CFB Exec ; Executable FB
K 1 ; Module number
RdStatRg ; Command: Read Status Register R 0 ; Value of Status Register
STH fOnDest_1 ; Position reached? ETR ;54
;-------------------------------
TR 55 ;Pause 2 elapsed ?
I 15 ;Pause 2 O11
stl t 0
$endgroup
ETR ;55
ESB ;0
Page 48
Quick start PCD2.H31x
Page 6-10 SAIA-Burgess Electronics Ltd. (2H3-06-E.DOC) 26/762 E2
Explanatory notes to the program
Knowledge of the PG4 in general and GRAFTEC in particular is as­sumed.
During assembly, sequential block SB 0 is called automatically from a COB.
The course of the GRAFTEC program can be viewed online.
Initialization of the H310 module takes place in IST 10. In the arrange­ment chosen, this IST is only processed when the SB is called for the first time, like XOB 16. It makes sense if initialization of the H310 module takes place in the IST of whichever SB deals with the module, so that the whole program routine stays together. XOB 16 is preferred for carrying out initializations that apply to the whole PCD.
In ST 12 and ST 14 the absolute destination position is loaded via PCD register R 100 into the H310 module and motion is started.
In TR 52 and TR 54 the end of a motion is queried from software so that the program can be released to continue its course. Motion itself is con­trolled directly by the module. Before querying the continuation condi­tion (sth fOnDest_1) the current position is read and output to the dis­play, and the 'fOnDest_1' flag is refreshed with 'RdStatRg'. In accordance with GRAFTEC rules, for every unfulfilled TR (e.g. destination position not yet reached) the program returns to the calling COB and continues working. At the next program cycle the unfulfilled TR is processed again in full. This ensures that the position is read and displayed automatically each time and that the 'fOnDest_1' flag is refreshed.
To be correct, the position in an experimental set-up should also be read and displayed during pauses, so that carriage status can be viewed even during stabilization.
Page 49
PCD2.H31x Quick start
26/762 E2 (2H3-06-E.DOC) SAIA-Burgess Electronic s Ltd. Page 6-11
6.1.3 Simple commissioning program *)
To try out the different parameters for achieving optimal motion, the fol­lowing program "test-par.sfc" is proposed. (It has been derived from the previous example "intro-2.sfc").
Function:
I 0: Start of backwards and forwards motion (as "intro-2.sfc") I 1: Adoption of new parameters, which were changed online in the
debugger. By activating I 1, motion can also be stopped abruptly.
I 2: From the resting position, the carriage can be moved forward
with the chosen parameters for as long as I 2 remains switched on.
I 3: From the resting position, the carriage can be moved backward
with the chosen parameters for as long as I 3 remains switched on.
Parameters can be modified online in the debugger. To identify the ab­solute addresses of parameters, the IST should be displayed or even printed out with <Display> <Program> <Step> <10> <CR>.
*) A more convenient commissioning program (commissioning
tool) in FUPLA is presented in chapter 10.
Page 50
Quick start PCD2.H31x
Page 6-12 SAIA-Burgess Electronics Ltd. (2H3-06-E.DOC) 26/762 E2
LD R 1000
4.0 ; Mechanical factor
LD R 1001
8000 ; Initial absolute speed
LD R 1002
10000 ; Initial absolute acceleration
CFB Init ; Initialization FB
K 1 ; Module number
250 ; Proportional factor (regulator)
0 ; Integrative factor (regulator)
0 ; Derivative factor (regulator)
4000 ; Integrative limit value
5 ; Derivative term sampling interval
500 ; Position tolerance
0 ; Behaviour in case of position error R 1000 ; Mechanical factor register R 1001 ; Initial velocity register R 1002 ; Initial acceleration register
EST ;10
For example, if initial absolute acceleration is to be increased from 10 000 to 30 000, absolute program line 19 should be processed:
<Write> <Program> <19> <CR> <30000> <CR> <Esc>
When motion is resting: Switch PCD input I 1 on and off. This means that the modified parameters are adopted. By switching on I 0 the new be­haviour can be tried out, etc.
Page 51
PCD2.H31x Quick start
26/762 E2 (2H3-06-E.DOC) SAIA-Burgess Electronic s Ltd. Page 6-13
6.2 Entry with programming in FUPLA
In preparation
Page 52
Quick start PCD2.H31x
Page 6-14 SAIA-Burgess Electronics Ltd. (2H3-06-E.DOC) 26/762 E2
Notes
Page 53
PCD2.H31x Programming
26/762 E2 (2H3-07-E.DOC) SAIA-Burgess Electronic s Ltd. Page 7-1
7. Programming
The PCD is programmed to use the PCD2.H.. counting and motion con­trol modules via the PCD user program with the standard PG4 program­ming tool from version V2.0.70. (For applications with the older PG3 programming tool, use FBs for the PCD4.H3.. module).
Programming takes place either in IL (Instruction List) with FBs (Func­tion Blocks) or in FUPLA with FBoxen (in preparation). FBs are avail­able on diskette under reference PCD9.H31E.
Since motion control tasks are always sequential processes, it is prefer­able if user programs are written in GRAFTEC, editing the individual steps and transitions in IL with FBs or, in FUPLA, FBoxes. However, user programs can also be written in straight BLOCTEC or FUPLA.
Page 54
Programming PCD2.H31x
Page 7-2 SAIA-Burgess El ectronics Ltd. (2H3-07-E.DOC) 26/762 E2
7.1 Programming in IL wit h FBs
7.1.1 The IL package (Installation of FB)
This diskette has order reference PCD9.H31E. It contains the following directories:
APPSDIR : containing all helps
FB : containing the .SRC and .EQU files of the H31x
FBOX : containing FBoxes for the H31x
PG3_FB : containing all FB files for the PG3
PG4_FB : containing examples and the .MBA file
Readme : containing general information
This package is provided for use with SAIA PG4 from version V2.0.70. Consult the 'Readme' file for all other PG4 versions. (The package also contains FBs for use with the earlier PG3, see 'Readme').
FBoxes for FUPLA are not yet available.
Installation of package for the PG4
The easiest method of installation is with the PG4 'Setup Extra Files' pro­gram:
Insert diskette PCD9.H31E into drive A: <Start> <Programs> <SAIA PG4> <Setup Extra Files>. FBs and the 'Help' file are installed on the hard disk in directory 'PG4'.
The following files are installed:
D2H310_B.SRC FB source code read-only file D2H310_B.EQU FB definitions read-only file
These 2 files are copied from the diskette into PG4 directory ...\PG4\FB.
FB_LIB.HLP FB library data D2H310_B.HLP FB help file
This file is located in directory A:\APPSDIR and is copied into the PG4 directory ...\PG4.
The file D2H310_B.MBA (module base addresses) must be copied manually from the diskette, directory PG4_FB, into the relevant proj­ect directory.
Page 55
PCD2.H31x Programming
26/762 E2 (2H3-07-E.DOC) SAIA-Burgess Electronic s Ltd. Page 7-3
File 'D2H310_B.MBA' is important for the user and is shown below:
File: D2H310_B.MBA (MBA = Module Base Address)
; ; This file can be modified by the user ; ; Base addresses defined by the user ; ----------------------------------­$group H310 NbrModules EQU 1 ; No. of H310 modules used (0...16)
; ; Module base addresses (only the used modules must be defined)
BA_1 EQU 32 ;Base address of module 1 BA_2 EQU 0 ;Base address of module 2 BA_3 EQU 0 ;Base address of module 3 BA_4 EQU 0 ;Base address of module 4 BA_5 EQU 0 ;Base address of module 5 BA_6 EQU 0 ;Base address of module 6 BA_7 EQU 0 ;Base address of module 7 BA_8 EQU 0 ;Base address of module 8 BA_9 EQU 0 ;Base address of module 9 BA_10 EQU 0 ;Base address of module 10 BA_11 EQU 0 ;Base address of module 11 BA_12 EQU 0 ;Base address of module 12 BA_13 EQU 0 ;Base address of module 13 BA_14 EQU 0 ;Base address of module 14 BA_15 EQU 0 ;Base address of module 15 BA_16 EQU 0 ;Base address of module 16 $endgroup
The number of PCD2.H31x modules should be specified. The hardware base addresses of PCD2.H31x modules utilized should then be entered.
Since the '.mba' file does not appear in the Project Manager, a text editor is required for any adjustments, e.g. SEDIT32.
Modules should be numbered consecutively, starting from 'BA_1'. For example, if 3 x H310 modules are used in a project, use 'BA_1', 'BA_2' and 'BA-3'. Module sockets can be assigned as desired, for example:
NbrModules EQU 3 ; No. of H310 modules used (0...16) ; ; Module base addresses (only the used modules must be defined)
BA_1 EQU 64 ;Base address of module 1 BA_2 EQU 208 ;Base address of module 2 BA_3 EQU 112 ;Base address of module 3 BA_4 EQU 0 ;Base address of module 4 BA_5 EQU 0 ;Base address of module 5
The base addresses of registers, flags and FBs are assigned automatically and can be consulted in the resource list under 'View' - 'Resource List'.
Page 56
Programming PCD2.H31x
Page 7-4 SAIA-Burgess El ectronics Ltd. (2H3-07-E.DOC) 26/762 E2
Arrangement of files and procedure when writing a user program. The proj­ect created is to be entitled "TEST-H3" and the actual user program should have the name "move-01.sfc".
C:\PG4 \FB \D2H310_b.equ
\D2H310_b.src \... \FBOX \... \GALEP3 \... \PROJECTS \FUP_E (Demo example PG4)
\GRAF_E (Demo example PG4)
\TEST-H3 \D2H310_b.mba
\move-01.sfc \... \D2H310_b.hlp
The user program for the H310 section has the following presentation:
$include D2H310_b.equ $group H310
XOB 16
PCD-Code
ecob $endgroup
If the program is written in GRAFTEC, the assembler directives "$include" and "$group" will usually be located in the first step (ST), normally the initial step (IST). "$endgroup" comes at the end of the last transition (TR).
If everything has been correctly installed, the user program edited and all parameters defined, it is possible with 'Project' - 'Build' to process the program and load it into the PCD.
Page 57
PCD2.H31x Programming
26/762 E2 (2H3-07-E.DOC) SAIA-Burgess Electronic s Ltd. Page 7-5
7.1.2 Individual FBs
The whole package basically consists of 2 (3) FBs with parameters:
INIT Initialization FB with 11 parameters
EXEC Execution FB with 3 parameters
HOME Home position FB with 7 parameters
Calling FB "INIT" always has the following presentation: (values entered serve as examples only)
CFB init ; Intitialization of a PCD2.H31x module
k 1 ; Par. 1: Module number (k1-k16)
250 ; Par. 2: Proportional factor 150 ; Par. 3: Integral factor 10 ; Par. 4: Differential factor 4000 ; Par. 5: Integration limit 5 ; Par. 6: Sample time of D factor 500 ; Par. 7: Position tolerance
0 ; Par. 8: Behaviour under position error r 1000 ; Par. 9: Mechanical factor *) r 1001 ; Par. 10: Velocity *) r 1002 ; Par. 11: Acceleration *)
*) Registers for parameters 9, 10 and 11 should be loaded with the
correct values before processing FB INIT.
Calling FB 'EXEC' has the following presentation for some typical exam­ples:
CFB exec
k 1 ; Par. 1: Module number (k1–k16)
LdDestRel ; Par. 2: Function (instruction) r 777 ; Par. 3: Value (from source register)
CFB exec
k 1 ; Par. 1: Module number (k1-k16)
start ; Par. 2: Function (instruction)
rNotUsed ; Par. 3: not used
CFB exec
k 1 ; Par. 1: Module number (k1-k16)
RdActPos ; Par. 2: Function (instruction) r 1000 ; Par. 3: Value (in dest. register)
Three parameters must always be specified, even if only 2 are required for a function. For the third parameter, specify 'rNotUsed', or any register.
A list with all instructions follows on the next page.
Page 58
Programming PCD2.H31x
Page 7-6 SAIA-Burgess El ectronics Ltd. (2H3-07-E.DOC) 26/762 E2
Instructions (functions) for FB 'Exec' (Parameter 2):
No. Symbol Instruction Page
----------------------------------------------------------------------------------------------------­01 Start M ot Start M ot ion A-7 02 StopUrg Stop motion in Urgency A-8 03 Stop Stop motion A-9 04 MotOff Motor regulation Off A-10
05 RdActPos Read Actual Position A-11 06 RdActVel Read Actual Velocity A-12 07 RdIntSum Read Integrat ion Sum A-13 08 RdIndexRg Read Index Register A-14 09 RdStatRg Read Status Register A-15 10 RdTargPos Read Target Posit ion A-16 11 RdTargVel Read Target Velocity A-17
12 GoForw G o For w ar ds A-18 13 GoBackw G o Backwar ds A-19 14 SgStpFor Single Step Forwards A-20 15 SgStpBak Single Step Backwards A-21
16 LdDestAbs Load Destination Absolute A-22 17 LdDestRel Load Destination Relative A-23 18 LdVelAbs Load Velocity Absolute A-24 19 LdVelRel Load Velocity Relative A-25 20 LdAccAbs Load Acceleration Absolute A-26 21 LdAccRel Load Acceleration Relative A-27 22 LdPropG Load Proportional Gain A-28 23 LdIntG Load Integrat ive Gain A-29 24 LdDerG Load Derivative Gain A-30 25 LdSampInt Load derivative Sampling Interval A-31 26 LdIntLim Load Integrative Limit A-32
27 ActRegFact Act ivate Regulation Factors A-33 28 LdBrkPtAbs Load Breakpoint Absolute A-34 29 LdBrkPtRel Load Breakpoint Relative A-35
30 ResStatRg Reset Stat us Register A-36 31 SetIdxPos Set Index Position A-37 32 SetZero Set Zer o posit ion A-38 33 MotConf M ot ion Configuration A-39 34 SetPosTol Set Position Tolerance A-40
The figure in the first column (0 - 34) is the absolute value of parameter no. 2 in FB 'Exec'. This figure can be used to interpret the function of FB 'Exec' when viewing the user program in the debugger.
Page 59
PCD2.H31x Programming
26/762 E2 (2H3-07-E.DOC) SAIA-Burgess Electronic s Ltd. Page 7-7
Calling FB "HOME" always has the following presentation: (values entered serve as examples only)
CFB home ; Intitialization of reference position
k 1 ; Par. 1: Module number (k1-k16)
1 ; Par. 2: Search direction
0 ; Par. 3: Free travel direction r 990 ; Par. 4: Minimum velocity r 991 ; Par. 5: Maximum velocity
1000 ; Par. 6: Timeout i 7 ; Par. 7: Reference input
Elements that can be queried by the user:
Element Description
fHomeErr_x When error with 'Home', element = H.
(Timeout, home position not found) fLS1_x H on arrival at limit switch 1 fLS2_x H on arrival at limit switch 2 fEndHome_x Always = H, except during home procedure fBrkPt_x H, when breakpoint reached fOnDest_x H, when destination position reached
fPosErr_x H, in case of major position error
fPar_Err Parameter error (outside range) fTimeout Read/write (with hardware problem)
Ref_1 Representation of reference input
'_x' corresponds to the module number
Effective element addresses should be taken from the resource list: from Project Manager 'View' - 'Resource List'. A complete, detailed list ap­pears.
Page 60
Programming PCD2.H31x
Page 7-8 SAIA-Burgess El ectronics Ltd. (2H3-07-E.DOC) 26/762 E2
A clear list with absolute addresses, which ought to be adequate for de­bugging, is supplied by the project .map file:
SAIA PCD LINKER SP 2.0.83 FILE: test-2h3.pcd LINKED: 06/30/99 10:57 PAGE 3
FOR SAIA'S INTERNAL USE ONLY
SYMBOL TYPE VALUE DEFINED REFERENCED
H310.Exec FB 1 D2H310_B 2-speed H310.fBrkPt_1 F 7517 D2H310_B H310.fEndHome_1 F 7516 D2H310_B H310.fHomeErr_1 F 7513 D2H310_B H310.Flag_base F 7502..7528 D2H310_B 2-speed H310.fLS1_1 F 7514 D2H310_B H310.fLS2_1 F 7515 D2H310_B H310.fOnDest_1 F 7518 D2H310_B H310.fPar_Err F 7502 D2H310_B H310.fPosErr_1 F 7528 D2H310_B H310.fTimeout F 7512 D2H310_B H310.Home FB 2 D2H310_B H310.Init FB 0 D2H310_B 2-speed H310.rDiag R 3500 D2H310_B H310.Reg_base R 3500..3524 D2H310_B 2-speed H310.rIniVel_1 R 3524 D2H310_B H310.rMecFac_1 R 3522 D2H310_B H310.rSampInt_1 R 3523 D2H310_B
Linkage complete. 0 errors, 0 warnings.
Assignment of addresses on the bus
Each module occupies 16 addresses as inputs (readable) and 16 addresses as outputs (writeable).
Bit no. DATA In (read) DATA Out (write)
0 Bus dat a (LSB) Bus data ( L SB) 1 Bus data B us da ta 2 Bus data B us da ta 3 Bus data B us da ta 4 Bus data B us da ta 5 Bus data B us da ta 6 Bus data B us da ta 7 Bus dat a (MSB) Bus data ( M SB) 8 Supply *) Wr ite ( W R LM628)
9 - Read (RD LM628) 10 - Port select ( PS LM628) 11 Ref. Switch **)/ Pw5V ***) ­12 Version ****) -
13 - 15 - -
*) Monitoring ±15V (H: Supply OK; L: Supply not OK). **) Ref Switch. For H310 only. (H: RS active; L: RS not active). ***) Monitoring 5V. H311 only. (H. 5V OK; L: 5V not OK). ****) Module version (H: H310; L: H311).
Page 61
PCD2.H31x Programming
26/762 E2 (2H3-07-E.DOC) SAIA-Burgess Electronic s Ltd. Page 7-9
7.2 Programming in FUPLA with FBox es
in preparation
Page 62
Programming PCD2.H31x
Page 7-10 SAIA-Burgess Electronics Ltd. (2H3-07-E.DOC) 26/762 E2
7.3 Programming in G RAFTEC with F Box es
in preparation
Page 63
PCD2.H31x Error handling and diagnosis
26/762 E2 (2H3-08-E.DOC) SAIA-Burgess Electronic s Ltd. Page 8-1
8. Error handling and diagnosis
8.1 Definition error checked by assembler
The following definition errors in file D2H310_b.MBA are checked du­ring assembly:
If the number of modules (NbrModules) is < 1, no code is assembled
and the following warning is written in the 'Make' window:
"Remark: No H310 used (NbrModules = 0 in D2H310_B.MBA)"
If the number of modules (NbrModules) is > 16, no code is assembled
and the following error message is written in the 'Make' window:
"Error : more than 16 Modules H310 defined (NbrModules = 0...16)"
If an incorrect instruction code is used for FB 'Exec' (e.g. RdIdenti in-
stead of RdIdent), the assembler reports an error:
"Symbol not defined 'H310.RdIdenti'"
(where the expression 'H310' is generated by $group h310)
If the definition $group H310 is missing, the assembler reports:
"Symbol not defined"
for every instruction and every register/flag used in the program.
Page 64
Error handling and diagnosis PCD2.H31x
Page 8-2 SAIA-Burgess El ectronics Ltd. (2H3-08-E.DOC) 26/762 E2
8.2 Er ror handling in Run
8.2.1 Incorrect parameter
In FB 'Exec' the instruction code only is checked. Parameters 1 (module no.) and 3 (source/destination register) are not checked, to avoid making the execution time longer.
In FBs 'Init' and 'Home' the values of all parameters are checked to ensu­re they are within the premitted range. If a parameter lies outside a range it is brought to the minimum value, the error flag 'fPar_Err' is set and the diagnostic register 'rDiag' is loaded with the relevant error code.
The 'fPar_Err' flag is not reset within FBs. This should take place in XOB 16 or the 'Init' step.
The error code is made up as follows:
rDiag bit 31 . . . . . . . 24 23 . . . . . . . 16 15 . . . . . . . 8 7 . . . . . . . 0
\ Reserve / \ FB no. / \ Par. no. / \ Mod. no./
(Init = FB 1) (Exec = FB 2) (Home = FB 3)
Example: If the sample time (parameter 6) in FB 'Init' of module 2
is incorrectly defined (>255), 'rDiag' is loaded with the hex value 00 01 06 02.
At each incorrect parameter, the diagnostic register is overwritten and always contains the last error. It should therefore be evaluated as soon as the 'fPar_Err' flag signals a range error. The absolute addresses of 'rDiag' and 'fPar_Err' can be seen in the 'project.MAP' file (see section 7.1.2, pa­ge 7-8). This can be userful during commissioning with the debugger to locate an error:
- Run until flag 'fPar_Err' = H
- Display register 'rDiag' hex
- Delete flag 'fPar_Err'
Page 65
PCD2.H31x Error handling and diagnosis
26/762 E2 (2H3-08-E.DOC) SAIA-Burgess Electronic s Ltd. Page 8-3
8.2.2 Error during homing
If it has not been possible to find the reference position (e.g. due to a faulty reference switch), the 'fHomeErr_x' error flag is set, motion is stopped, the absolute position is zeroed and FB 'Home' is broken off.
Reference switch absent or incorrectly wired:
If FB 'Home' has been broken off because the specified timeout has elap­sed, the diagnostic register 'rDiag' is additionally loaded with code 6 as the parameter number (the timeout is parameter 6).
The 'fHomeErr_x' flag is defined for each module (_x is the module no.) and is reset at the start of FB 'Home'. This flag should be queried each ti­me FB 'Home' is called, to ensure that the axis is correctly referenced:.
Example:
CFB Home ; Homing axis 3
k 3 ; Module number
0 ; search direction r 1010 ; min. speed r 1011 ; max. speed
50 ; timeout i 64 ; input reference switch
STH fHomeErr_3 ; Query home error flag
; of axis 3
CFB h Errorhandl ; Call (user specific)
; FBs, in case fHomeErr_3 = H
CFB Exec ; Motion 1
LS1 LS2
1
2
3
- Error flag "fhomeErr_x"
- Absolute position at 0
Page 66
Error handling and diagnosis PCD2.H31x
Page 8-4 SAIA-Burgess El ectronics Ltd. (2H3-08-E.DOC) 26/762 E2
Notes
Page 67
PCD2.H31x Installation and commissioning
26/762 E2 (2H3-09-E.DOC) SAIA-Burgess Electronic s Ltd. Page 9-1
9. Installation and commissioning
9.1 Introduction
The following description shows the procedure for commissioning a ser­vodrive with the PCD2.H3.. motion control module. To guarantee fault­free operation of the H3 module, during commissioning the steps de­scribed below should be executed in the same sequence.
Selection criteria for a servo-drive with the PCD2.H3.. module
A motion control unit always comprises the following parts:
A motion controller for setting the motion control parameters (position,
velocity and acceleration) and for position control. This task is per­formed by the PCD1/2 with the H3 module.
A servo-amplifier for triggering the servomotor.
A servomotor for converting electrical into mechanical energy.
A position transmitter, in the form of an incremental shaft encoder.
A mechanical drive unit.
Selection of servo-amplifier and servomotor: Regardless of whether a DC or AC servodrive is used, special attention
should be paid to the following points.
Amplifier and motor must match each other (power, voltage and cur-
rent).
For precise position and speed control, a four-quadrant power output
stage is required with integral speed governor.
The greatest possible governing range for amplifier and motor speed,
so that the necessary torque can be applied even at low speeds.
The H3 module supplies an analogue ±10V signal as the speed set-
point.
For position capture, the H3 module needs an incremental shaft en-
coder that supplies at least two square-wave signals in phase quadra­ture.
Block diagram of a motion control drive with the H3 module
1 2 3 4 5 6
M
POWER
AMPLIFIER
PCD2.H31x
POSITION COUNTER
PID REGULATOR
10V
DISPLAY (fak.)
Page 68
Installation and commissioning PCD2.H31x
Page 9-2 SAIA-Burgess El ectronics Ltd. (2H3-09-E.DOC) 26/762 E2
9.2. Installation and wiri ng
When installing the PCD2 system particular attention should be paid to the points listed below. Before powering up the system, a visual check of the installation and wiring should be made as follows:
Has the overall PCD1/2 system suffered any damage during trans-
portation or assembly?
Is the H3 module plugged into the space provided on the PCD1/2
bus and is the wiring complete on the relevant bus module?
Wiring and connection of user supply:
The H3 module must have a smoothed, +24 V DC supply voltage (19..32 V, max. ripple 10%) at the "+" and "-" terminals.
System earth
For fault-free operation, a perfect earth to divert external noise volt­age is indispensable. The PCD1/2 system should be connected to the "GND" terminal (24 VDC -) with the largest possible cross-section on the earth rail of the control box. It should further be ensured that all earth lines have been laid without loops.
Laying the cables
Regulations prescribe the laying of high-voltage cables and control cables in separate cable channels.
Motor controller output (±±±± 10V analogue)
Check connections as described in manual, chapter 5.5. The cable must be shielded.
Enable for the driver is triggered through a "normal" digital output of
the PCD1/2.
Encoder connections
For special attention with the 5V encoder:
Cable must be shielded and lines must be in twisted pairs.
Max. cable length 20m, min. conductor cross-section 0.25mm2. In
addition, check that encoder is correctly mounted (no slippage in coupling), check type and technical data (impulses per revolution).
Ref (for PCD2.H310) wire directly
LS1 / LS2, for PCD2.H311 also Ref, wire to "normal" digital inputs of
PCD1/2.
Page 69
PCD2.H31x Installation and commissioning
26/762 E2 (2H3-09-E.DOC) SAIA-Burgess Electronic s Ltd. Page 9-3
9.3 Commissioning drive without mot ion control module
The drive alone (power stage and motor) is commissioned first, without the motion controller. The following measures are necessary:
Release connection of the H3 module’s controller output "Out" (+
10V) to the power stage at terminals 6 and "-" (minus) of the H3 module.
The PCD1/2 and H3 module have been switched off. If this is not
possible, execute point 9.4.1 first (switching on the supply voltages).
The drive’s emergency stop limit switches should be set to prevent
any damage arising from uncontrolled axis motion.
Commissioning of the power stage and motor can now take place ac­cording to the supplier’s instructions.
Page 70
Installation and commissioning PCD2.H31x
Page 9-4 SAIA-Burgess El ectronics Ltd. (2H3-09-E.DOC) 26/762 E2
9.4 Drive with motion control module
9.4.1 Switching on the supply voltages
This step can also take place before commissioning the power stage and motor, however, it is necessary to ensure that the axis cannot make any uncontrolled movements (power stage off-voltage, controller release in­terrupted).
When the supply voltage of the PCD1 or PCD2 and H310 or H311 mod­ule is powered up for the first time (programming unit disconnected) the control LEDs should be noted
on the PCD1:
Meaning LED Behaviour
24 VDC yellow 'Supply voltage present': must be on Run yellow 'CPU in Run': not on, as no program has been
loaded
Error yellow should not be on
on the PCD2:
Meaning LED Behaviour
24 VDC yellow 'Supply voltage present': must be on Battery red 'Battery' (fail): should not be on Watch Dog yellow Watch Dog inactive: not on (as no program has
been loaded).
Run yellow 'CPU in Run': not on, as no program has been
loaded Halt red 'CPU in Halt' is on, as no program is present Error yellow should not be on
on the motion control module PCD2.H310:
Meaning LED Behaviour
Power yellow
shows the presence of ± 15V: must be on Ref (H310) yellow Reference switch
on the motion control module PCD2.H311:
Meaning LED Behaviour
Power yellow
shows the presence of ± 15V: must be on Pw 5V yellow 5V supply for encoder: must be on
Page 71
PCD2.H31x Installation and commissioning
26/762 E2 (2H3-09-E.DOC) SAIA-Burgess Electronic s Ltd. Page 9-5
9.4.2 Preparing a basic user program
For commissioning a drive with the H3 module, a basic user program should be loaded into the PCD1/2 so that all checks and adjustments can be made. The "simple commissioning program" in section 6.1.3 can be used for initial trials. A comprehensive tool (Commissioning Tool), in­cluding limit and reference switches, is described in chapter 10.
Preparation of the user program comprises the following steps:
Installation of the PCD9.H31E programming package, according to
section 7.1.1.
Opening a new project.
Copying in the D2H310_B.MBA file.
Adjusting the D2H310_B.MBA file with the number of H31x
modules and their base addresses.
Definition of the machine data.
Adjusting (parameters in FB INIT and path to travel back and forth)
and loading the commissioning program
Evaluation of 'fPar_Err' flag
Evaluation of this flag is particularly recommended for commissioning. This flag is only present once for all axes in a project.
After the flag has responded it is possible to view the cause of the error in the PCD register 'rDiag'. See section 8.2.1.
The user is responsible for resetting the 'fPar_Err' flag.
Page 72
Installation and commissioning PCD2.H31x
Page 9-6 SAIA-Burgess El ectronics Ltd. (2H3-09-E.DOC) 26/762 E2
9.4.3 Determining machine data
Before commissioning for the first time, various parameters for FB 'Init' should be determined, some of which are already fixed by the machine, whereas other are recommended as test values.
Position tolerance → see FB 'Init', par. 7, manual page A-1/2
Recommended value 1 encoder revolution
When an encoder has 500 imp./revolution, this parameter has the value 2000 = 4 * 500 imp./revolution (evaluation of encoder impulse edges).
PID factors → see FB 'Init' manual page A-1/2 Recommended start values:
Proportional factor (Parameter 2): 10 Integral factor (Parameter 3): 0 Differential factor (Parameter 4): 0 Integration limit (Parameter 5): 30000 Sample time D portion (Parameter 6): 15 (= 5.61 msec.)
Machine factor FB 'Init', PCD register for parameter 9 (floating-
point format)
This factor results from the resolution of the encoder used, the spindle gradient and any gears.
Important: The unit of measurement chosen here (m, cm, mm, 1/10mm,
1/100mm, µm) must also be used for the velocity (par. 10), acceleration (par. 11) and all values relating to path, break­point, velocity and acceleration throughout the user program for this axis.
4 x In
Assume: k = ------- [impulses/unit of measurement]
s
where In: impulses/revolution (encoder resolution)
s: path/revolution (spindle gradient and gears)
Page 73
PCD2.H31x Installation and commissioning
26/762 E2 (2H3-09-E.DOC) SAIA-Burgess Electronic s Ltd. Page 9-7
Example: In = 1000 impulses per revolution
s = 2 mm (spindle gradient) (no gears)
4 x 1000
k = ----------- = 2000 impulses/for 1 mm
2
= 2 impulses for 1 µm
If the chosen unit of measurement is 1 mm, a value of 2000.0 (floating­point format) should be written in the PCD register for parameter 9. If the chosen unit of measurement is 1 µm, a value of 2.0 (floating-point format) should be entered.
Velocity FB 'Init', PCD register for parameter 10 When commissioning for the first time, it is advisable to work with a low
velocity. The value should be entered as an integer in the PCD register provided, using the same unit of measurement as the machine factor.
Recommendation: 0.05 m/s 50 mm/s or 50000 µm/s
Ensure that the chosen drive can actually achieve the velocity of its pa­rameter, otherwise the controller continuously detects a deviation from the target velocity and adds up these deviations. This will then lead to an incorrect braking ramp or to an abrupt halt of the motion.
Acceleration FB 'Init', PCD register for parameter 11 When commissioning for the first time, it is advisable to work with a low
acceleration. The value should be entered as an integer in the PCD reg­ister provided, using the same unit of measurement as the machine factor.
Recommendation: 0.01 m/s
2
10 mm/s2 or 10000 µm/s
2
Before starting any motion, check encoder function by manually moving the axis (amplifier powered off). See also section 9.4.5.
Page 74
Installation and commissioning PCD2.H31x
Page 9-8 SAIA-Burgess El ectronics Ltd. (2H3-09-E.DOC) 26/762 E2
9.4.4 Direction, path measurement (encoder)
To check direction of rotation and path measurement, the following pre­conditions must be met:
The connection between the H3 module’s controller output (+ 10V)
and the power stage has been released at terminals 6 and GND for the H3 module’s axis.
The PCD1/2 has been switched on (commissioning program loaded)
and is in "Run".
The programming unit is connected and the commissioning software
has been started. All the necessary adjustments have been made in the "Configure" menu. These settings must agree with definitions in the D2H310_B.MBA file.
For the following tests, a display of actual position is viewed.
Checking the direction:
1. Rotate drive shaft in a positive direction
actual position must increment
2. Rotate drive shaft in a negative direction
actual position must decrement
If this is possible, the drive shaft can be turned by hand. Otherwise it must be moved by applying a set value (using a voltage source of + 0.5 .. 10V) to the power stage.
Definition of positive and negative directions:
Positive direction corresponds to the direction moved when a positive
setpoint voltage is applied (0...+10V) at the power stage.
Negative direction corresponds to the direction moved when a negative
setpoint voltage is applied (0...-10V) at the power stage.
If behaviour is the reverse, both phase signals A and B of the encoder
should be exchanged.
Page 75
PCD2.H31x Installation and commissioning
26/762 E2 (2H3-09-E.DOC) SAIA-Burgess Electronic s Ltd. Page 9-9
Checking path measurement:
Turn drive shaft through one revolution and observe display of actual po­sition.
A path value corresponding to the machine factor k (parameter 9 in FB 'Init') must be displayed as the actual position. If the display is incor­rect, recheck the calculation and entry of machine factor 'k'.
Checking the index signal IN:
This check is only necessary if the index signal (also called zero impulse) is evaluated by the encoder to define the zero position.
Procedure: (All the following actions are carried out manually by commands from the commissioning program.)
1. Observe display of index position register → any value is dis-
played.
2. Execute the instruction 'SetIdxPos'.
When the next index impulse is captured, the actual position is written in the index position register.
3. Turn the axis until the actual position is written in the index posi­tion register. The position must be written to the register once within an en­coder revolution.
4. Execute the instruction "SetIdxPos" again and check whether, during a revolution, the current position is written once only to the register.
If the check produced another result, this may be due to the following:
Faulty encoder
Encoder signals A, B and IN are not in the order required at the H3
module’s position decoder input.
If the order of encoder signals is not known, it must be established with the help of an oscilloscope.
Page 76
Installation and commissioning PCD2.H31x
Page 9-10 SAIA-Burgess Electronics Ltd. (2H3-09-E.DOC) 26/762 E2
9.4.5 PID controller
To check and tune the PID controller, the following preconditions must be met:
With the controller powered off, the control circuit is closed by re-
connecting the setpoint cable of the power stage to terminals 6 and GND of the H3 module.
Power up the controller:
CAUTION: Activate emergency stop if the axis should proceed out of control.
The programming unit is connected and commissioning software has
been started.
Checks:
1. Load destination position 0 and execute start instruction. The H3 module regulator is switched on and the axis is held in its position by the regulator.
2. Load a destination position that is located within the allowed trav­elling range and start motion. The axis runs towards the fixed destination position.
Incorrect behaviour:
The axis runs at maximum velocity.
Possible cause
Position control circuit (H3 module) or speed control
circuit (power stage) incorrectly poled. This means that, when the setpoint voltage is posi­tive (= positive destination position) motion in the axis is in a negative direction.
The H3 module’s analogue output is faulty and sup-
plies a constant, maximum voltage of approx. +12V or –12V to the controller output.
Remedy
Check direction, execute section 9.4.4 once again
and make the necessary changes to poling.
Change the H3 module.
Page 77
PCD2.H31x Installation and commissioning
26/762 E2 (2H3-09-E.DOC) SAIA-Burgess Electronic s Ltd. Page 9-11
The axis runs at a constantly slow velocity (drift).
Possible cause
The setpoint is not reaching the power stage, regula-
tion is not active in the H3 module.
Remedy
Check wiring.
Check whether, after the 'StartMot' instruction, the
profile generator in the H3 module outputs a target velocity (instruction 'RdTargVel'), which means that the regulator in the H3 module is working correctly.
The axis starts running briefly, and stops again.
Possible cause
Position error monitoring has responded and stopped
the drive. (The motor cannot follow the motion de­fined)
Remedy
Correct possible mechanical problems.
Adjust velocity and acceleration.
Increase max. value for position error.
The axis runs jerkily to an incorrect destination position.
Possible cause
Loose mechanical connection of encoder and motor
(coupling).
Remedy
Correct possible mechanical problems.
When approaching the destination position a persistent position error is noticeable. This is accounted for by the permanent control deviation in a straight P controller (I and D factors are 0).
In a subsequent step, therefore, control factors must be determined which achieve the desired quality of regulation (accuracy and hardness).
The set-up rules indicated below have arisen from experience in practical applications and tests.
Page 78
Installation and commissioning PCD2.H31x
Page 9-12 SAIA-Burgess Electronics Ltd. (2H3-09-E.DOC) 26/762 E2
Setting the proportional factor (kp):
1. Set a small proportional factor (experience recommends 10). Integral and differential factors must be 0 ( straight P control­ler).
2. Travel slowly with the axis (approach destination position or use the 'GoForw'/'GoBackw' functions)
3. Increase the kp factor gradually until the control circuit starts to pulse. Then reduce that value by approx. 30% and load it as the kp factor. This sets the proportional factor and should not be changed further for the time being.
Setting the integral factor (ki):
The ki factor is gradually increased until the desired settling time is achieved for the position error. This sets the integral factor and should not be changed further for the time being.
If excessive overshoot is noticed when approaching the destination posi­tion, this may be due to the following:
The chosen rate of acceleration or braking is too high. The motor
cannot follow the setpoint. Reduce acceleration.
The same behaviour can also result when the chosen velocity is too
high.
The chosen ki factor is too high.
Practice has shown that, if the integral factor is increased and the dif-
ferential factor is left at zero, the tendency of the controller to pulse rises. The differential factor should be increased simultaneously with the integral factor to reduce overshoot.
Observing the integration sum (instruction 'RdIntSum') is a good way of tracking such behaviour. During motion, if the integration sum adds up to a high value, overshoot can be expected.
Action: - Reduce the above parameters.
- Limit the integration sum (instruction 'LdIntLim').
Page 79
PCD2.H31x Installation and commissioning
26/762 E2 (2H3-09-E.DOC) SAIA-Burgess Electronic s Ltd. Page 9-13
Setting the differential factor (kd):
The kd factor is gradually increased until the desired overshoot width or settling time is achieved for the position error. This also sets the differen­tial factor.
Set-up rule for sample time (instruction 'LdSampInt') in the D portion: For operation at low velocities, opt for a rather large sample time. Experience shows that sample time values generally lie between 2 ms and 9 ms. This corresponds to values 5 and 25 in the instruction 'LdSampInt'.
Optimization of settings:
If regulation does not proceed satisfactorily after values have been set as above, a further attempt must be made to vary individual parameters, so that a satisfactory result is achieved.
Page 80
Installation and commissioning PCD2.H31x
Page 9-14 SAIA-Burgess Electronics Ltd. (2H3-09-E.DOC) 26/762 E2
9.4.6 Effect of individual factors on controller behaviour
Increasing the kp factor heightens the tendency to overshoot but equally reduces the permanent control deviation and increases controller hard­ness.
Raising the ki factor heightens the tendency to overshoot, but simultane- ously ensures faster settling of the position error.
A correctly adjusted kd factor stabilizes the system and ensures less overshoot and a shorter settling time. If the kd factor is too high, it pro­duces pulsing in the system.
Page 81
PCD2.H31x Installation and commissioning
26/762 E2 (2H3-09-E.DOC) SAIA-Burgess Electronic s Ltd. Page 9-15
9.4.7 Simple commissioning program
A convenient, graphical commissioning tool in FUPLA is described in chapter 10.
The following is an extremely simple user program for forward and back­ward motion with actual position display, using a single axis. The parameters suggested above have been applied:
(Explanatory notes on this user program can be referred to in section
6.1.1: "Entry-level example in IL with wait loops").
$include D2H310_B.equ $group H310
xob 16
LD R 1000
2.0 ; Mechanical factor
LD R 1001
50000 ; Initial absolute speed
LD R 1002
10000 ; Initial absolute acceleration
CFB Init ; Initialization FB
K 1 ; Module number
10 ; Proportional factor (regulator) 0 ; Integrative factor (regulator) 0 ; Derivative factor (regulator) 30000 ; Integrative limit value 15 ; Derivative term sampling interval 2000 ; Position tolerance
1 ; Behaviour in case of position error R 1000 ; Mechanical factor register R 1001 ; Initial velocity register R 1002 ; Initial acceleration register
exob ; --------------------------------------------------------­;
cob 0
0
start: sth i 0 ; 'Start' OK?
CFB Exec ; Executable FB
K 1 ; Module number
RdActPos ; Command: Read Actual Position
R 90 ; Result register
DSP R 90 ; Display register
jr l start ; if 'Start' not OK, wait
LD R 100 ; Target Position
10000 ; Absolute value
CFB Exec ; Executable FB
K 1 ; Module number
LdDestAbs ; Command: Load Absolute Destination
R 100 ; Absolute Destination register
Page 82
Installation and commissioning PCD2.H31x
Page 9-16 SAIA-Burgess Electronics Ltd. (2H3-09-E.DOC) 26/762 E2
pos1: CFB Exec ; Executable FB
K 1 ; Module number
StartMot ; Command: Start motion rNotUsed ; Dummy register
CFB Exec ; Executable FB
K 1 ; Module number
RdActPos ; Command: Read Actual Position
R 90 ; Actual Position register
DSP R 90 ; Display register
CFB Exec ; Executable FB
K 1 ; Module number
RdStatRg ; Command: Read Status Register
R 0 ; Value of Status Register
STH fOnDest_1 ; Position reached?
jr l pos1 ; if no, wait
ld t 0
50
pause1: sth t 0
jr h pause1
LD R 100 ; Target Position
0 ; Absolute value
CFB Exec ; Executable FB
K 1 ; Module number
LdDestAbs ; Command: Load Absolute Destination
R 100 ; Absolute Destination register
CFB Exec ; Executable FB
K 1 ; Module number
StartMot ; Command: Start motion rNotUsed ; Dummy register
pos2: CFB Exec ; Executable FB
K 1 ; Module number
RdActPos ; Command: Read Actual Position
R 90 ; Result register
DSP R 90 ; Display register
CFB Exec ; Executable FB
K 1 ; Module number
RdStatRg ; Command: Read Status Register
R 0 ; Value of Status Register
STH fOnDest_1 ; Position reached?
jr l pos2 ; if no, wait
ld t 0
50
pause2: sth t 0
jr h pause2
ecob
$endgroup
Page 83
PCD2.H31x Commissioning tool
26/762 E2 (2H3-10-E.DOC) SAIA-Burgess Electronic s Ltd. Page 10-1
10. Commissioning Tool
The PCD8.H31 diskette includes a programming tool for use during commissioning entitled 'comtool-fup'. This tool offers a moderate level of user comfort and is based on the PG4’s FUPLA program from version V2.0.70.
The program consists of an organization FBox, an FBox for the initializa­tion of a PCD2.H31x, an FBox with a simple path program enabling the online modification of all PID parameters (for the purpose of optimizing control behaviour) and all path parameters, plus a final FBox that allows the creation and online modification of a path program with any 4 se­quences. The optimum PID parameters determined in this way are trans­ferred to the final user program (FB 'Init' and possibly an additional FB 'Exec' to adjust individual PID parameters).
This is how the tool appears on the screen. The adjust window for the FBox with the simple path program is open.
PID parameters are set individually, transferred separately and then acti­vated together with 'Update'.
Page 84
Commissioning tool PCD2.H31x
Page 10-2 SAIA-Burgess Electronics Ltd. (2H3-10-E.DOC) 26/762 E2
The following keys are used to activate a single path (Start Step), back­and-forth path (Start Cycle) or continuous back-and-forth path (Start for­ever). The 'Waiting time' parameter can be used to define a pause after each sequence in the path program. It is also possible to travel forwards or backwards as desired (Go forward or Go backward) and to stop travel smoothly (Stop smooth) or abruptly (Stop abrupt). With 'Set Zero' any position can be declared as the new zero position. It is also possible to switch off the motor control (Motor off) or find the next index position.
Page 85
PCD2.H31x Commissioning tool
26/762 E2 (2H3-10-E.DOC) SAIA-Burgess Electronic s Ltd. Page 10-3
The adjust window of the previously described FBox for simple back­and-forth travel by the carriage is shown below in full size.
As before, PID parameters are set individually, transferred separately and then activated together with 'Update'.
Parameters in the lower section, i.e. those for the path program, are trans­ferred immediately after confirmation.
Page 86
Commissioning tool PCD2.H31x
Page 10-4 SAIA-Burgess Electronics Ltd. (2H3-10-E.DOC) 26/762 E2
Adjust window of the initialization FBox.
Parameters are only transferred after a download. The parameters of this adjust window, therefore, should be set before compiling and before downloading to the PCD.
Page 87
PCD2.H31x Commissioning tool
26/762 E2 (2H3-10-E.DOC) SAIA-Burgess Electronic s Ltd. Page 10-5
The last of the 4 FBoxes can be used to create a path program with any 4 desired sequences. In each sequence all parameters can be set individu­ally and modified online.
Operation is the same as for the simple 'back-and-forth' program. With the 'Start Step' button, individual sequences are set off one after the other. 'Start Cycle' is used to start a single complete sequence and 'Start for ever' keeps the cycle of sequences moving until 'Stop ...' or 'Motor Off' interrupts it. The 'Waiting time' parameter can be used to define a pause after each sequence. It is also possible to move back or forth as de­sired (Go forward or Go backward) and to bring the path to a halt smoothly (Stop smooth) or abruptly (Stop abrupt). 'Set Zero' enables any position to be declared as the new zero position. It is also possible to switch the motor control off (Motor off) or to seek the next index posi­tion (Backwards or Forwards). Positions, velocity and acceleration can be set with 'Absolute' or 'Relative' parameters.
Page 88
Commissioning tool PCD2.H31x
Page 10-6 SAIA-Burgess Electronics Ltd. (2H3-10-E.DOC) 26/762 E2
The adjust window for the FBox with a 4-sequence cycle appears as fol­lows: (The values entered serve only as an example, but work well with the V-PCX 24 demonstration model).
Page 89
PCD2.H31x Commissioning tool
26/762 E2 (2H3-10-E.DOC) SAIA-Burgess Electronic s Ltd. Page 10-7
(Adjust window, continued)
For the best possible commissioning, a storage oscilloscope to display the ±10V control voltage should also be available, as this is the only way of viewing controller behaviour under the various loads and optimizing its settings. Unfortunately, the present commissioning tool does not include this display.
Page 90
Commissioning tool PCD2.H31x
Page 10-8 SAIA-Burgess Electronics Ltd. (2H3-10-E.DOC) 26/762 E2
Description of the commissioning tool’s individual FBoxes
The commissioning tool appears as follows:
The delay time on the lower margin is not present in the original tool. It is advisable not to release the motor control until the CPU’s self diagnostic is completed. This prevents the carriage from making any uncontrolled jump when the controller is switched on.
FBox 'H31-Library'
Organization FBox. Must be located at the beginning of a tool page. This FBox has no inputs or outputs and no adjust window either.
FBox 'H31-Module'
Initialization of PCD2.H31x module. The module base address should be written in the 'Add' window, e.g. O 80.
FBox outputs: 'PEr' binary Position error 'PAc' integer Actual position
Adjust window: see page 10-4
Page 91
PCD2.H31x Commissioning tool
26/762 E2 (2H3-10-E.DOC) SAIA-Burgess Electronic s Ltd. Page 10-9
FBox 'H31-Tuning'
Simple back-and-forth path program to seek and optimize the best possi­ble parameters.
FBox outputs: 'OnD' binary On destination 'PEr' binary Position error 'PAc' integer Actual position (in units of length) 'PIm' integer Actual position (in impulses) *) 'Vel' integer Actual velocity 'IdX' integer Index register 'Sta' integer Status register
Adjust window: see page 10-3
FBox 'H31-Tuning-Exp.'
FBox with path program comprising any 4 sequences, whose parameters can be set individually.
FBox outputs: 'OnD' binary On destination 'PEr' binary Position error 'PAc' integer Actual position (in units of length) 'PIm' integer Actual position (in impulses) *) 'Vel' integer Actual velocity 'IdX' integer Index register 'Sta' integer Status register
adjust window: see page 10-6/7
*) The 'PIm' output shows the result of multiplying the 'PAc' output
value by the 'Mechanical Factor'.
Page 92
Commissioning tool PCD2.H31x
Page 10-10 SAIA- Burgess Electronics Ltd. (2H3-10-E.DOC) 26/762 E2
Notes
Page 93
PCD2.H31x Security aspects
26/762 E2 (2H3-11-E.DOC) SAIA-Burgess Electronic s Ltd. Page 11-1
11. Security aspects
If a drive unit is triggered with a PCD2.H31x module, particular attention should be paid to the following points:
Drive power-up phase
When the main supply for the PCD has been switched on, it takes max. 2 seconds before all input/output modules are initialized, the CPU is in RUN and the user program can therefore be processed.
During this power-up phase (max. 2 seconds), the analogue controller output of the H3 module have any value between -10V and +l0V. For this reason it is absolutely necessary that the power section of the drive should either be switched on or released by the user program through a digital output. This guarantees that the drive does not proceed out of control during this power-up phase.
Monitoring the position error
(See flag 'fPosErr_x')
Exceeding the permitted position error signals serious problems and should therefore always be monitored.
The following causes can result in exceeding the position error:
1. Connection fault in the H3 installation. Examples: - loose connection
- directional mismatch in rotation of motor and incremental shaft encoder.
2. Badly adjusted PID parameters
3. The size of drive (amplifier and/or motor) is not strong enough.
4. Wrong choice of motion parameters. The servo-amplifier or motor cannot follow the acceleration or velocity ordered by the H3 module.
5. Blocked rotor in servomotor due to mechanical problems.
6. Hardware error in H3 module (e.g. faulty analogue controller output).
7. Hardware error in servo-amplifier.
If points 1 to 4 account for the position error being exceeded, this is usually discovered during commissioning and can be remedied immediately.
Page 94
Security aspects PCD2.H31x
Page 11-2 SAIA-Burgess Electronics Ltd. (2H3-11-E.DOC) 26/762 E2
If points 5 to 7 account for the position error being exceeded, this can also occur after commissioning. To avoid damaging the machine, the fol­lowing measures are necessary:
Permanently monitor the 'fPosErr_x' flag (which signals that the position error has been exceeded) from the user program and, in case of error, disconnect the drive via a digital output.
There are different ways of disconnecting the drive. With some drives it is enough to withdraw the controller release at the power section. With others again it is necessary to reduce drive speed as quickly as possible by braking (shorting out the setpoint input at the power section) and to disconnect the main supply with a time delay (of a few milliseconds). However this disconnection can or must take place depends on the ma­chine concerned and must be decided on a case by case basis.
Limit Switches
These can be used in different ways:
in connection with the 'Home' function to find the zero position
when the installation is powered up
as an alarm message in the user program to signal that the posi-
tion has been exceed (if appropriately located and programmed)
Security limit switches
The security limit switches (emergency-off limit switches) should always disconnect the drive directly. (Cut main supply to drive.)
Watchdog
Always activate the PCD’s watchdog and use the watchdog contact to disconnect the drive directly.
X0Bs for PCD hardware errors
Program XOBs 0 to 5 and, if necessary, disconnect the drive directly via a digital output.
Page 95
PCD2.H31x Application examples
26/762 E2 (2H3-12-E.DOC) SAIA-Burgess Electronic s Ltd. Page 12-1
12. Application ex amples
12.1 Example: 1 axis with homing
This example concerns the simple backward and forward motion of a car­riage as already described in chapter 6: "Quick start". The present exam­ple additionally includes the reference switch and both limit switches at either end of the range of travel for automatic homing.
The hardware is based on workshop model V-PCX 24 and consists of the slide with DC motor, reference switch, limit switches and final limit switches, the servo-amplifier with emergency switch, the supply and a PCD2 with 6-digit display.
When fully assembled and wired up, the model has the following presen­tation:
H311
E110
Start
PCD2
0163248
648096112
B100
9876543210
A7 A6 E /A5 E/A4 E/A3 E/A2 E1 E0
9876543210
5V Out /IN IN / B B / A A
Carriage
Shaft encoder
DC
motor
0VServo amplifier
Enable +/-10V
EOFF2EOFF1
LS2
LS1 Ref
Supply 24 VDC
230 VAC
Emergency
stop
Page 96
Application examples PCD2.H31x
Page 12-2 SAIA-Burgess Electronics Ltd. (2H3-12-E.DOC) 26/762 E2
Data for carriage:
Encoder: 500 impulses/revolution Spindle: gradient 2 mm Maximum velocity: 100 mm/s Max. permissible acceleration: 50 mm/s
2
After homing, directly following system power-up, the following motion sequence should be executed:
Homing
Before presenting the overall user program, homing should be looked at more closely.
The arrangement of switches on the model is roughly in line with the above drawing. During normal program execution the carriage is in the position illustrated.
Pos. = 0 Pos. = 150 mm
Pos. = 0
t = 5 sec
100 mm/s
+V
+V
- V
t
400 mm/s2
LS1 Ref LS2
Carriage
forwards (+ V)
backwards (- V)
Page 97
PCD2.H31x Application examples
26/762 E2 (2H3-12-E.DOC) SAIA-Burg ess Electronics Ltd. Page 12-3
An assumption is made that, in normal cases, the carriage is located be­tween the positions 'Ref' and 'LS2'. For homing, the carriage should travel in the direction of the reference switch, i.e. searching in a 'backwards' di­rection. On reaching the reference switch it should travel freely in a for­wards direction until it arrives at the next index signal of the incremental shaft encoder. This means that the reference position has been reached and the travel program can start.
For this purpose, the following parameters should be set for FB 'Home':
LD R 1010 ; PCD register with velocity for free
500 ; travel of the reference switch (slow)
LD R 1011 ; PCD register with velocity for seeking
5000 ; the reference switch (fast)
CFB Home ; Call FB 'Home'
K 1 ; Par 1: Module number
0 ; Par 2: Search backwards
1 ; Par 3: Free travel forwards R 1010 ; Par 4: Velocity for free travel R 1011 ; Par 5: Velocity for search
30 ; Par 6. Timeout 30s I 64 ; Par 7: Reference input address
Behaviour under various starting positions:
a) Starting position 'normal' (carriage between 'Ref' position and
'LS2'): Behaviour as described above. If the reference point is not found within a defined timeout, homing is halted. If the ref­erence switch is activated on power-up (carriage located on ref­erence switch), free travel only takes place and travel to the next index signal.
b) Starting position with carriage between 'LS1' and 'Ref': The car-
riage first travels backwards to 'LS1', then forwards to reference switch 'Ref'. The reference switch is travelled over at the veloc­ity of free travel. After this free travel, it again travels on until it reaches the next index signal of the incremental shaft encoder. This means that the home position has been reached and the travel program can start.
c) Starting position located to the right of 'LS2': Homing proceeds
as with a). 'LS2' is travelled over and does not affect homing.
d) Starting position located to the left of 'LS1'. The carriage travels
backwards as defined until the final limit switch. The home po­sition cannot be found. If the final limit switch is not reached within the defined timeout, homing is halted.
Page 98
Application examples PCD2.H31x
Page 12-4 SAIA-Burgess Electroni cs Ltd . (2H3-12-E.DOC) 26/762 E2
User program in GRAFTEC (int-home.sfc)
Initialization occurs in IST. Homing is then executed (ST 1). ST 1 will run through continuously until homing is complete. The end of homing is sig­nalled by the 'fEndHome_x' flag. Before calling the 'Home' FB, limit switches 'LS1' and 'LS2', which are wired to digital PCD inputs, must be read into flags 'fLS1_x' and 'fLS2_x'.
After completion of homing the program goes to TR 53, where the start condition of the actual travel program is awaited.
Consult section 6.1.2 for a description of the travel program.
Page 99
PCD2.H31x Application examples
26/762 E2 (2H3-12-E.DOC) SAIA-Burg ess Electronics Ltd. Page 12-5
Program code for "int-home.sfc"
(To obtain this representation, rename the file "int-home.sfc" as "int-home.src").
SB 0
;-------------------------------
IST 10 ;Initialization
O50
$include D2H310_B.equ $group H310
LD R 1000
1.00 ; Mechanical factor
LD R 1001
100000 ; Initial absolute speed
LD R 1002
400000 ; Initial absolute acceleration
CFB Init ; Initialization FB
K 1 ; Module number
250 ; Proportional factor (regulator) 0 ; Integrative factor (regulator) 60 ; Derivative factor (regulator) 4000 ; Integrative limit value 5 ; Derivative term sampling interval 500 ; Position tolerance 0 ; Behaviour in case of position error R 1000 ; Mechanical factor register R 1001 ; Initial velocity register R 1002 ; Initial acceleration register
ld t 0 ; Delay for Enable
20 ; 2 sec
EST ;10
Page 100
Application examples PCD2.H31x
Page 12-6 SAIA-Burgess Electroni cs Ltd . (2H3-12-E.DOC) 26/762 E2
;-------------------------------
ST 11 ;Home
I50 I 52 ;Home running ? O 51 ;Home ended ? O 52 ;Home running ?
set o 71 ; Enable res fEndHome_1
stl i 65 out fLS1_1
stl i 66 out fLS2_1
ld r 1010
1000
ld r 1011
10000
cfb home
k 1 ; Module number
0 ; search direction
1 ; free run direction r 1010 ; min. speed r 1011 ; max. speed
50 ; timeout i 64 ; input reference switch
EST ;11
;-------------------------------
ST 12
I 51 ;Home ended ?
I 57 ;Pause 2 elapsed ?
O 53 ;Start OK ?
EST ;12
;-------------------------------
ST 13 ;Move forwards
I 53 ;Start OK ?
O 54 ;Move forwards ended ?
LD R 100 ; Target Position
60000 ; Absolute value
CFB Exec ; Executable FB
K 1 ; Module number
LdDestAbs ; Command: Load Absolute Destination R 100 ; Absolute Destination register
CFB Exec ; Executable FB
K 1 ; Module number
StartMot ; Command: Start motion
rNotUsed ; Dummy register
EST ;13
;-------------------------------
ST 14 ;Pause 1
I 54 ;Move forwards ended ?
O 55 ;Pause 1 elapsed ?
ld t 0
50
EST ;14
Loading...