Elmo HARmonica Bedienungsanleitung

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220

Zur Seite of

Richtige Gebrauchsanleitung

Die Vorschriften verpflichten den Verkäufer zur Übertragung der Gebrauchsanleitung Elmo HARmonica an den Erwerber, zusammen mit der Ware. Eine fehlende Anleitung oder falsche Informationen, die dem Verbraucher übertragen werden, bilden eine Grundlage für eine Reklamation aufgrund Unstimmigkeit des Geräts mit dem Vertrag. Rechtsmäßig lässt man das Anfügen einer Gebrauchsanleitung in anderer Form als Papierform zu, was letztens sehr oft genutzt wird, indem man eine grafische oder elektronische Anleitung von Elmo HARmonica, sowie Anleitungsvideos für Nutzer beifügt. Die Bedingung ist, dass ihre Form leserlich und verständlich ist.

Was ist eine Gebrauchsanleitung?

Das Wort kommt vom lateinischen „instructio”, d.h. ordnen. Demnach kann man in der Anleitung Elmo HARmonica die Beschreibung der Etappen der Vorgehensweisen finden. Das Ziel der Anleitung ist die Belehrung, Vereinfachung des Starts, der Nutzung des Geräts oder auch der Ausführung bestimmter Tätigkeiten. Die Anleitung ist eine Sammlung von Informationen über ein Gegenstand/eine Dienstleistung, ein Hinweis.

Leider widmen nicht viele Nutzer ihre Zeit der Gebrauchsanleitung Elmo HARmonica. Eine gute Gebrauchsanleitung erlaubt nicht nur eine Reihe zusätzlicher Funktionen des gekauften Geräts kennenzulernen, sondern hilft dabei viele Fehler zu vermeiden.

Was sollte also eine ideale Gebrauchsanleitung beinhalten?

Die Gebrauchsanleitung Elmo HARmonica sollte vor allem folgendes enthalten:
- Informationen über technische Daten des Geräts Elmo HARmonica
- Den Namen des Produzenten und das Produktionsjahr des Geräts Elmo HARmonica
- Grundsätze der Bedienung, Regulierung und Wartung des Geräts Elmo HARmonica
- Sicherheitszeichen und Zertifikate, die die Übereinstimmung mit entsprechenden Normen bestätigen

Warum lesen wir keine Gebrauchsanleitungen?

Der Grund dafür ist die fehlende Zeit und die Sicherheit, was die bestimmten Funktionen der gekauften Geräte angeht. Leider ist das Anschließen und Starten von Elmo HARmonica zu wenig. Eine Anleitung beinhaltet eine Reihe von Hinweisen bezüglich bestimmter Funktionen, Sicherheitsgrundsätze, Wartungsarten (sogar das, welche Mittel man benutzen sollte), eventueller Fehler von Elmo HARmonica und Lösungsarten für Probleme, die während der Nutzung auftreten könnten. Immerhin kann man in der Gebrauchsanleitung die Kontaktnummer zum Service Elmo finden, wenn die vorgeschlagenen Lösungen nicht wirksam sind. Aktuell erfreuen sich Anleitungen in Form von interessanten Animationen oder Videoanleitungen an Popularität, die den Nutzer besser ansprechen als eine Broschüre. Diese Art von Anleitung gibt garantiert, dass der Nutzer sich das ganze Video anschaut, ohne die spezifizierten und komplizierten technischen Beschreibungen von Elmo HARmonica zu überspringen, wie es bei der Papierform passiert.

Warum sollte man Gebrauchsanleitungen lesen?

In der Gebrauchsanleitung finden wir vor allem die Antwort über den Bau sowie die Möglichkeiten des Geräts Elmo HARmonica, über die Nutzung bestimmter Accessoires und eine Reihe von Informationen, die erlauben, jegliche Funktionen und Bequemlichkeiten zu nutzen.

Nach dem gelungenen Kauf des Geräts, sollte man einige Zeit für das Kennenlernen jedes Teils der Anleitung von Elmo HARmonica widmen. Aktuell sind sie genau vorbereitet oder übersetzt, damit sie nicht nur verständlich für die Nutzer sind, aber auch ihre grundliegende Hilfs-Informations-Funktion erfüllen.

Inhaltsverzeichnis der Gebrauchsanleitungen

  • Seite 1

    HARmonica Software Manual June 2002 www.e lm om c. co m[...]

  • Seite 2

    Important Notice This guide is deliv ered subject to th e following conditions and restrictions: This guide con tains proprietary information belonging to Elmo Motion C ontrol Ltd. Such information is s upplied solely fo r the purpose of as sisting users of the HARmon ica servo amplifier. The text and graph ics included in this manual are for the p[...]

  • Seite 3

    HARSF EN0602 Table of Contents: 1 ABOUT T HIS M A NUAL .............................................................................................................. ................... 10 1.1 Scope .......................................................................................................................... ............................[...]

  • Seite 4

    HARSF EN0602 4.2.2 Mathematical And L o gical Operators............................................................................................. ....................... 19 4.2.3 General rules for operators .................................................................................................... ................................ 20 4.2[...]

  • Seite 5

    HARSF EN0602 6.4 The program execution .......................................................................................................... .................................. 62 6.4.1 Initiating a Program........................................................................................................... ................................[...]

  • Seite 6

    HARSF EN0602 7.7.28 RSLTE – Relational Operator (==) ............................................................................................... .................... 87 7.7.29 RSLTNE – Relational Operator (! =) .............................................................................................. ................... 87 7.7.30 RSLTOR[...]

  • Seite 7

    HARSF EN0602 10 THE CURRENT CONTROLLER ......................................................................................................... ......... 115 10.1.1 Current li miting ............................................................................................................... ............................... 116 10.1.2 The torque [...]

  • Seite 8

    HARSF EN0602 13.5.2 Homing Programmin g ............................................................................................................. ....................... 176 13.5.3 Homing the auxiliary en coder ................................................................................................... ...................... 176 13.5.4 O[...]

  • Seite 9

    HARSF EN0602 16.1 Main partitions ................................................................................................................ ....................................... 204 16.2 The firm ware partition ......................................................................................................... ........................[...]

  • Seite 10

    HARSF EN0602 List of Ta bles: Tab le 2-1: Analog sa mpled sig nals .................................................................................................... ..................... 15 Tab le 3-1 – RS232 Rx I tem Description ................................................................................................................. 1[...]

  • Seite 11

    HARSF EN0602 List of Figures: Figure 1 - Slope and windo w trigger ty pes ...................................................................................... ....................... 98 Figure 2 – P re trig ger delay ................................................................................................... .............................[...]

  • Seite 12

    HARSF EN0602 1 A bout Th is Manua l 1.1 Scope This specification presents relevant data for understanding and using the Harmonica software. The Software Specification complem ents the Comm and Reference Manual. T he Com mand Reference Manual lists each single com mand with all its options. The Software Specification Manual is designed to g ive wide[...]

  • Seite 13

    HARSF EN0602 2 T he Harmonica 2.1 Introduction The Harmonica a sophisticated and capable netw ork -oriented single- axis am plifier, with: - State of the art control algorithm s, including high order filters and gain scheduling - State of the art reference generation alg orithm, including absolute timed interpolated motion, auxiliary signal follow [...]

  • Seite 14

    HARSF EN0602 The personality data is loaded to the serial flash mem ory. The personality data includes a file allocation table and several files. The pe rsonality files include data about the Harm onica. A partial list is: List of supported comm and List of error code CAN EDS All these data item s enable an ID E to deal with the Harm onica. The Fil[...]

  • Seite 15

    HARSF EN0602 mechanical rev olution. CA[23] For linear motors, CA[23] stores th e number of counts per user unit (Meter, or any other unit the user m ay select). CA[ 23] is stored only for convenience – the Harmonica software does not use this num ber for any internal calculation. For rotary m otors, set CA[23]=0. YA[1],YA [3] YA[1] is the auxili[...]

  • Seite 16

    HARSF EN0602 The internal representation of phase currents is by A/D bits. Torque comm ands, and the active and the reactiv e parts of the current have another representation, since the coordinate transforma tions from phase current to torque introduce scaling. The relation between internal phase currents, internal torque, and Amperes is g iven by [...]

  • Seite 17

    HARSF EN0602 a decoder is 20mH z, without input filter. If input filter is applied, the m aximum pulse rate is reduced, as explained at the EF[N] comm and in the Command Reference Manual. The encoder input is not protected. There is no hardware to identify illegal transitions. Exceeding the m axim al pulse rate will cause loss of counts that cannot[...]

  • Seite 18

    HARSF EN0602 3 Commu nication With th e Host 3.1 General 3.2 RS232 Communications The Harmonica can com municate by RS232 with baud rates up to 115200baud/sec. The maxim um baud rate depends in the sampling time. The baud rate of 115200baud/sec works only when TS equals or is less th an 70. The comm unication rate of 57600 baud/sec work s with all [...]

  • Seite 19

    HARSF EN0602 Sets the value of 1 to the MO variable. CA[2]=1; Sets the value of the C A[2] variable . CA[N] denotes a v ector of paramete rs that can be accessed by their index. The free evaluation (5+sin(PX))*sqrt(abs(VX)) Returns a num erical value to the term inal. More detail about text interpreting is g iven in the chapter "The Interprete[...]

  • Seite 20

    HARSF EN0602 4 The Interpre ter La nguage The amplifier has a lang uage that enables the user to com municate w ith the Am plifier. Using this lang uage, the user can Setup the Am plifier Comm and the Amplifier what to do Inquire the Am plifier status There are two methods for com municating with the Amplifier. The first of them is to use the com m[...]

  • Seite 21

    HARSF EN0602 4.1 The command line The Interpreter ev aluates input strings, called “expressions”. An expression is a sequence of characters, terminated by a semicolon ‘; ’, a line feed, or a carriag e return. A com mand line m ay include the “Comm ent marker” – two consecutiv e asterisks. All the text from the comm ent marker to the n[...]

  • Seite 22

    HARSF EN0602 + Add two operands. 9 - Subtract the right operand from the left one. 9 * Multiply two operands. 10 / Divide the left operand by the rig ht one. 10 % Rem ainder after division two integ ers 10 ^ XOR 1 ~ Bitwise NOT of an operand. 11 & Bitwise AND between two operands . 5 | Bitwise OR betw een two operands. 4 << Bitwise Shift [...]

  • Seite 23

    HARSF EN0602 4.2.4.1 A ddition Notation + Description Arithm etic addition Number of argum ents 2 Output type According to the section Prom otion to float and truncation to integer Example 4+5=9 3.45+2.78=6.23 4.2.4.2 Subt raction Notation - Description Arithmetic subtraction Number of argum ents 2 Output type According to the section Prom otion to[...]

  • Seite 24

    HARSF EN0602 Output type 32 bit long integer. Example if x=1 as x^3=2 4.2.4.7 B itwise NOT Notation ~ Description Bitwise N OT Number of argum ents 1 Output type 32 bit long integer. Exam ple ~3 is 0xfffffffc, which is actually –4 ~3.2 is the same as ! 3 4.2.4.8 B itwise OR Notation | Description Bitwise O R Number of argum ents 2 Output type 32 [...]

  • Seite 25

    HARSF EN0602 Notation > Description Logical g reater than Number of argum ents 2 Output type 0 or 1 (0 equals to false, 1 equals to true) Example if x=3 and y=3 as x>y y ields 0 if x=3 and y=2 as x>y yields 1 if x=1 and y=2 as x>y yields 0 4.2.4.13 Logi cal Greater than or equal Notation >= Description Logical greater than or equal N[...]

  • Seite 26

    HARSF EN0602 Notation | | Description Logical OR. The result is 1 if any of the arg uments is nonz ero, 0 if both are zero. The argum ents are not truncated to integers before ev aluations Number of argum ents 2 Output type 0 or 1 Example 1 || 0 yield 1 0 || 0 is 0. 4.2.4.18 Logical NOT Notation ! Description Log ical NOT. The result is 1 if the ar[...]

  • Seite 27

    HARSF EN0602 sin Sine Floating point cos Cosine Floating point abs Absolute value Same ty pe as input argum ent sqrt Square root, or zero if arg ument is negativ e Floating point fix Truncate to integer. fix(3.8) is 3 fix(-3.8) is - 3 Int e ger rnd Truncate to nearest integer. rnd(3.8) is 4 rnd(-3.8) is –4 Int e ger tdif Time difference x=TM tdif[...]

  • Seite 28

    HARSF EN0602 sp=sp*2/5+ac op=ip|5 If the v ariable or the comm and is a vector, the assi gnment is allowable only for its single m ember. The syntax of the v ector mem ber assignment is: <Parameter or com mand name>[ index]=<sim ple expression> The index is an index of the relevant m emb er vector. I ndices are enumerated from z ero. Ex[...]

  • Seite 29

    HARSF EN0602 4.2.6.6 User Function Calls The XQ comm and enables a user function call. See Running of a User Program A user function cannot be called from the com mand line without the XQ com mand. 4.3 Comments Com ments are texts that are w ritten into the code to enhance its readability. A double asterisk m arks com m ents. The comm ent st arts i[...]

  • Seite 30

    HARSF EN0602 5 The Harmonica Us er Progr a mming Language This chapter describes the Harmonica user lang uage in detail. This chapter is somewhat out of place, since the user prog ram lang uage is not really a feature of the Harmonica. The Harmonica can only understand virtual assem bly com mands – see com mands at the chapter The Virtual Machine[...]

  • Seite 31

    HARSF EN0602 X=0; In itialize for k=0:10 Iterate X = x + 1 ; D o something end End of iteration exit End of program directive ##Moo ... More code The program defines two variables nam ed x and k. ##Foo is an entry point. After compilation, it is possible to run this piece of code by comm anding XQ ##Foo to the interpreter. When the program starts a[...]

  • Seite 32

    HARSF EN0602 A user program may contai n too long line and its representation at the screen may be not conv enient, because not all sym bols are shown at the screen. I n or der to improv e readability of the program , a user may continue this expression at the next line. Three point s at the end of line indicates that this line will be continued. E[...]

  • Seite 33

    HARSF EN0602 5.3.4 Operat or details The description and syntax is the sam e as in the Interpreter Lang uage. See Operator details of the I nterpreter Language 5.3.5 M athematical functions The description and syntax is the sam e as in the Interpreter Lang uage. See Mathematical functions of the Interpreter L anguag e 5.3.6 Expressions 5.3.6.1 Simp[...]

  • Seite 34

    HARSF EN0602 The names of v ariables may include ASCII letters, digits (not leading) and underscores (not leading) only . It’s case sensitiv e. The maxim al variable name leng th is 12 characters. A variable nam e cannot be a keyw ord. The list of the key words is as follows: “int”, “float“, "if", "else", "elseif&[...]

  • Seite 35

    HARSF EN0602 Consider some exam ples using system comm ands. Example Explanation a = AC This expression assigns value of th e sy stem com m and AC to the variable ‘a’. This expression is valid if the AC comm and is allo wed to ‘g et value’, i.e. it has PreProcess flag AC = a This expression assigns value of the v ariable ‘a’ to the syst[...]

  • Seite 36

    HARSF EN0602 Com ments are texts that are w ritten into the code to enhance its readability. There are three methods to w rite comm ents. A double asterisk m arks com m ents. The comm ent st arts in a double asterisk comm ent marker, and terminates at the next end of line. The Amplifier ig nores the comm ents when runni ng a prog ram or ev aluating[...]

  • Seite 37

    HARSF EN0602 wai t : I t erate (suspend the execution of the program ) until a specified time is elapsed. for - end : Iterate counted tim es break : Break an iteration or a switch expression ( for, while, sw itch ) if – else – elseif – end : Conditional expression. switch - case - otherwise - end : Case selection goto – Go to some point in [...]

  • Seite 38

    HARSF EN0602 Perform an indexed iteration in a prog ram. Syntax: for k=N 1:N2:N3 … end or for k=N1 :N2 … end where N1, N2, and N3 are numbe rs or sim ple expressions. The syntax: for k=N 1:N2:N3 … end iterates k from N1 to N3 with a step of N2. The syntax: for k=N1 :N2 … end iterates k from N1 to N2 with a step of 1. Notes: 1. If the iterat[...]

  • Seite 39

    HARSF EN0602 Syntax: while( expression ) … statement … end The while keyw ord executes statement repeatedly until expression becomes 0. The expression can be logical or/and numerical. Note: expression may be within r ound parentheses or without ones. Example: OB[1]=0 Digital output 1 is OFF while(I B[1]) OB[1]=1 While the digital input 1 is ON,[...]

  • Seite 40

    HARSF EN0602 … Do some work … IsF irstFinished = 1 ; **Signal that som e work is comp leted The code of the second thread will include … Prior to suspension code until (IsFirstFinished) ; **The second thread suspended until **signal … Continue program . If we want to suspend thread without term inating it, we can use unti l with a false exp[...]

  • Seite 41

    HARSF EN0602 Example: if (IB [4]) PR=1000; PR=1000 only if digital input 4 is ON elseif(IB [3]) PR=5000; PR=5000 only if digital input 3 is ON elseif(IB [2]) PR=3000; PR=3000 only if digital input 2 is ON else PR=500; PR=500 only if di gital input 2,3 and 4 are OFF end 5.5.7 Switch selection Syntax: switch( expression ) case (case_expression1) stat[...]

  • Seite 42

    HARSF EN0602 switch (k) For example, k=2 case 1 PA=1000; case 2 PA=2000; This statement will be perform ed otherwise PA=500; If k doesn’t equal to 1 or 2 , pa=500 end 5.5.8 Break Syntax: break The break statement term inates the execution of the nearest enclosing for , switch or while statement in which it appears. Control passes to the statem en[...]

  • Seite 43

    HARSF EN0602 For example, 2 function func2 (struct float x1) This func tion is named func2, it g ets the only input argum ent of float type and doesn’t return any output. 3 [int y1] = func3 (int x1) This function declaration is illegal, because k eyword fun ct io n is absent 4 function y1 = func5 This function prototype is illegal, because ty pe [...]

  • Seite 44

    HARSF EN0602 y1 = x1; ** Function body y2 = x2; if x2 > 0 ** If block return ** return inside block is not the end of the function end ** End of if block y2 = y 1 + y2 ; ** Some executable code return ** Function end Before function call, it must be declared. I t may be either function prototype or function definition. For example, 13 function [[...]

  • Seite 45

    HARSF EN0602 If som e function does not return any output by its defin ition, then zero value as output will be inserted to the stack actually . Assume that the function fo o is declared with no output argum ents. So the following expression: foo () + 3 is legal, because foo returns zero by default. Example: float vec[11], RA[100]; Declare the glob[...]

  • Seite 46

    HARSF EN0602 exits, the value of the autom atic variables is not sav ed. Automatic v ariable cannot be a vector. Example: I n the example of the STATI STIC function, variable k is the automatic variable 5.6.5 Global v ariables A function can refer a persistent variable. I n this case the referred persistent variable must be declared global inside f[...]

  • Seite 47

    HARSF EN0602 The goto comm and may be specified only for destinati ons within the present function scope. It is not possible to jum p to labe ls that are inside another function. The jump to the g lobal label from w ithin som e function is illegal. Example: … **Working code if (PX>1000) **Condition for jump goto##LAB EL1; **Go to LABEL1 if the[...]

  • Seite 48

    HARSF EN0602 Example: function factorial() ; **Function prototype … IA [1]=3 IA [2]=1 factorial() **Function call BG … function factorial() **Function for factorial global int I A[] ; **Definition of array as g lobal inside function IA [2]=IA [2]*IA [1] **Recursive alg orithm IA [1]=IA [1]-1 if ( IA [1] > 1 ) factorial() ; end **Recursive ca[...]

  • Seite 49

    HARSF EN0602 5.6.8 Killing The Call Stack In som e rare situations, it is desirable to exit a function without re turning to its return address. The reset instruction solves this problem by em ptying the call stack before m aking a jump. Syntax: rese t <JUM P_NAME> The valid jump after the ‘reset’ keyw ord is one of the following: 1. labe[...]

  • Seite 50

    HARSF EN0602 according to sy stem ev ents. These routines will be executed only when their inv ocation condition is satisfied. These automatic routines doesn’t have output and input arg uments. Syntax: There are two options to define an auto rou tine: either as a function or as a label. If it’s defined as a function, then all sy ntax ru les for[...]

  • Seite 51

    HARSF EN0602 AUTO_ I6 12 Called when a digital input #6 config ured to the “GPI (General purpose I nput)” function is activated. Refer the I L com mand. 4096 Table 5 - 1 – Automatic subroutines and their prio rit y All the automatic routines, except AUTOEXEC, are activated only if a program is running. Example: Consider the program ##LOOP got[...]

  • Seite 52

    HARSF EN0602 goto ##LOOP; **Endless loop #@TEST_PARS **Subroutine op=2; **Set output 2 wait 2000; **Wait 2 seconds for testing the part mi=0; **Enable autom atic handling of digital in #1 goto ##LOOP; return **End of the autoexec function #@AUTO_I1 **Autom atic handl er for dig ital input #1 op=3; **Set output 3 to indicate din 1 sensed. **Subrouti[...]

  • Seite 53

    HARSF EN0602 6 Pro gram Dev elopment and Executio n The process of program developm en t includes the following steps: Program editing – Writingediting the program . Compilation – Let the Com piler process the program and find errors Program loading – Lo ad the program to the Am plifier Flash mem ory. Debugg ing – Observe the prog ram beha[...]

  • Seite 54

    HARSF EN0602 There is empty expression inside round brackets k = 1:2:20 Colon expression is used out of ‘for’ statement 2 Em pty expression Expected ri ght hand expression is absent For example, a = ; After assignm ent symbol the ri gh t hand expression is absent 3 Stack is full Stack ov erflows its depth 4 Bad index expression This error appea[...]

  • Seite 55

    HARSF EN0602 11 Nam e is too long Variable or function name exceeds 12 characters. For example, int iuyuafdsf_876234 ; 12 No such v ariable Left hand side error: left valu e is recogniz ed neither as variable nor as sy stem comm a nd. For example, de = sin(0.5) de is neither variable nor function. 13 Too many dim ensions Dimension of array ex ceeds[...]

  • Seite 56

    HARSF EN0602 them in the database 24 Nam e is key word Variable or function name is the same as som e keyword. This error m ay appear if variable nam e is identical to some auto routine nam e. For example, int switch; ‘switch’ is key word, so its use as v ariable name is illeg al. 25 Nam e is not distinct This error occurs if so me variable or [...]

  • Seite 57

    HARSF EN0602 float c, d; The definition of float variables ‘c’ and ‘d’ is illegal, because it occurs after executable code ‘b = a’ 30 Variable is undefined This error appears if iterati on variable at ‘for’ statem ent is not defined before it. For example, function foo (int a) ** Function definition for k = 1 : 10 ** Start ‘for’[...]

  • Seite 58

    HARSF EN0602 39 Code is too com plex User prog ram contains very com plex code that includes too many nested levels (actually this expression contains more than 100 nested lev els). Nested expression means one flow control block inside other, e.g. ‘if’ block inside ‘while’ loop. 40 Line com pilation is failed General error during attem pt t[...]

  • Seite 59

    HARSF EN0602 error occurs. For example, if a < 0 break ; end ‘break’ from ‘if’ statement is illegal. 50 Too many outputs This error appears when num ber actual output arg uments during function call exceeds the number of output arg u ments during function definition. For example, function [int b] = foo (int a) ** Function definition … [...]

  • Seite 60

    HARSF EN0602 body For example, function foo (int a) wait 2000 return ; … function foo (int a) until a end This text is illegal, because the function ‘foo’ has m ultiple bodies. 62 Opcode is not supported by the Harmonica This error occurs if the specified version of the Harm onica does not support some v irtual comm and. 63 I nternal com pile[...]

  • Seite 61

    HARSF EN0602 4. Attem pt to jump to local label at ‘reset’ statem ent For example, function foo () ** Function definition … ** Function body return ** Function end … goto ##foo The last expression is illegal: foo is not label. 75 I llegal narg out The keyw ord ‘nar gout’ is used outside function For example, ##START ** Label if nargout [...]

  • Seite 62

    HARSF EN0602 6.3.1 Binary data The Flash is interfaced with binary data. Sending bi nary data on the RS232 lines is a problem, since they complex the differentiation between data and delim iters. The characters that are problematic to send on the RS232 lines are: - All the high num bers, 128 to 255. - All possible terminators: 0, <CR>, <LF[...]

  • Seite 63

    HARSF EN0602 6.3.2.2 The CP command The CP com mand clears the entire user area in the serial flash. I t may take a sig nificant tim e. In special, CP sets the Prog ram Valid flag to –1. Possible Execution Failures: 1) Motor is on. 2) Prog ram is running. 6.3.2.3 The CC command The comm and CC=xxxx does as follows: Read the actual length of the u[...]

  • Seite 64

    HARSF EN0602 In order to download a prog ram im age to the Dama, follow the steps below. - Read the location (loc) and the length (len) of the user code partition from the main TOC. For this, use the LP[3] and the LP[4] com mands. - Verify that y our imag e block will fit inside the allocated space. - Clear the program flash, using CP - Download yo[...]

  • Seite 65

    HARSF EN0602 6.4.1 Initiating a Program A program is initiated by the XQ comm and. The XQ comm and states at which label the execution shall start. The XQ com m and resets all the program v ariables. I n particular, it clears the call stack (refer the chapter the Functions and the Call Stack ), it k ills any pending automatic routines, and it clear[...]

  • Seite 66

    HARSF EN0602 HP; XQ##TASK2; 6.4.3 A utomatic program running w ith pow er up If the user prog ram includes the autoexec function, the next prog ram line after function declaration w ill be performed with powering up. 6.4.4 Sav e to Flash Since a program is downloaded to a non- volatile m emory, it is alway s saved. I nformation isn’t lost in case[...]

  • Seite 67

    HARSF EN0602 set and remov e break points get inform ation about existing VAC m achines get running status of the program ask for or chang e a value of local v ariables get call stack of the program The DB comm and is designed for the I DE Manager use. The sy ntax of this comm and is strict, namely the spaces and white characters are not allowed to[...]

  • Seite 68

    HARSF EN0602 When any error occurs inside a specified VAC m achine, it returns with error to the main loop that m anages the running of the entire set of VAC m achines. This manager stops all other VAC m achines with the error ABORTED_BY_OT HER_THREAD. In or der to define in which VAC m achine the error occurred, find the error code different from [...]

  • Seite 69

    HARSF EN0602 The treatment of Run to Cursor is v ery easy : the ID E sets at the relevant line fake break point with the number of repetitions as one. When a break point is re ached, it has to be remov ed from the break point list. There is no need to define special debug com mand. 6.5.7.2 St ep Over The DB##SO com mand executes the treatm ent of S[...]

  • Seite 70

    HARSF EN0602 If the current base pointer is less than the save d base pointer, the step is out - j ump to the end the loop, otherwise go to the start of the loop. End of the loop When the nearest end of line is reached and the current base pointer is less than the saved base pointer, then the VAC machine enters to the halted state. Otherwise it jus[...]

  • Seite 71

    HARSF EN0602 BP-4 Return address Program counter of the next program line after the function call BP-3 Index of the current function in the Function Sym bol Table See 3.5.5 BP-2 Number of input argum ents BP-1 Number of actual output argum e nts Number of left hand side values during function call Let’s try to understand how this inform ation can[...]

  • Seite 72

    HARSF EN0602 1. Don’t analyz e current state of the stack and ju st access to the relevant stack entries and g et garbag e. Try to analyz e current program counter to find out whether the LIN K was executed. If access to local variable occurred before LI NK, then return e rror (som ething like VARI ABLE_NOT _INI T I ALIZ ED).[...]

  • Seite 73

    HARSF EN0602 7 T he Virtu al Machines 7.1.1 Introduction A lla please complete w here necessary The Harmonica can run a user prog ra m, as explained in the Chapter "The Harm onica User Program ming Languag e". Although the user program runs syntactica lly the same statem ents as the interpreter, the processing m echanism is totally differ[...]

  • Seite 74

    HARSF EN0602 [x,y] = f (a,b,c,d) ; Assume that BP before function call is 12 and SP is 15 (just number not better and not worse than ev ery other). Before the opcode USRSUBJ is ex ecuted the stack contains: 2. n entries for actual output argum ents (according to the function call, not prototype) 3. n entries for input argum ents (a number of input [...]

  • Seite 75

    HARSF EN0602 The virtual m achine supports the following data types: - INTEGER: 32 BIT SIGNED INTEGER - Float: 32 bit I EEE floating point number (24 bit mantissa, 8 bit si gn) Logical operators yield Boolean results – True or False. True is equivalent to the integer 1. False is equivalent to the integ er 0. 7.5 Op code structure and addressing m[...]

  • Seite 76

    HARSF EN0602 REM Reminder from division of the number below top of stack by the top of stack. RSLTAND Check if number at t op of stack and number below are non z ero than condition is true otherwise condition is false RSLTOR Check if num be r at top of stack or num ber below are non zero than condition is true otherwise condition is false XOR B itw[...]

  • Seite 77

    HARSF EN0602 function table is given as an arg ument GET_COMM Call to function service of a ‘g et’ comm and whose index in the function table is given as an arg ument SYSSUBJ Call to sy stem function whose index in function table is g iven as an argum ent USRSUBJ Call to user subroutine whose i ndex in the sym bol function table is given as an [...]

  • Seite 78

    HARSF EN0602 Attributes Attribute Value Com ment Op code May chang e in future versions Number of arg uments None Argum ent types N.A. Both argum ents types m ust be integer (set according to stack m em bers flags) Addressing m odes Absent Promotion N.A. Output ty pe Int & I nt In t Im poses end of line No 7.7.3 CMP – Compare Purpose: Com par[...]

  • Seite 79

    HARSF EN0602 flags Addressing m odes Absent Promotion I nt / Float Executes as (float) In t / Float Output ty pe Int / I nt In t In t / Float Float Float / Float Float Im poses end of line No 7.7.5 EOL – End Of Line Purpose: Indicate this is end of line to the Harmonic a env ironment. Algorithm: Zeroes line execution flag . Attributes: Attribute [...]

  • Seite 80

    HARSF EN0602 loop Addressing m ode2 Mem _Dir ect , BP_Relativ e Iterator v ariable address, depend on the addressing mode. Promotion N.A. Output type N.A. Im poses end of line Only if jump address is out of the present executing line. 7.7.7 FREE_VA C - Free Virtual Machine Purpose: Stop program execution. Algorithm: Zeroes prog ram execution flag .[...]

  • Seite 81

    HARSF EN0602 DataSeg + Op1 Arr (array address) (SP) Ind (array index) Arr[I nd] (SP) (return value) Attributes Attribute Value Com ment Op code May chang e in future versions Number of arg um ents 1 Argum ent type Signed short integer Addressing m odes Mem_Direct Location of v ariable (index) in the variable sy mbol table. Address of array v ariabl[...]

  • Seite 82

    HARSF EN0602 PC Im mediate value Attributes Attribute Value Com ment Op code May chang e in future versions Number of arg um ents 1 Argum ent type Sig ned short integer J ump Address Addressing m odes Im mediate2 Promotion N.A. Output type N.A. Im poses end of line Only if jump address is out of the present executing line. 7.7.12 JMP_EOL – Jump P[...]

  • Seite 83

    HARSF EN0602 Promotion N.A. Output type N.A. Im poses end of line Only if jump address is out of the present executing line. 7.7.14 JNZ – Jump Not Zero Purpose: Jump to if v alue is not zero (change PC to different location in prog ram). Algorithm: PC IM MEDIATE VALUE Attributes Attribute Value C omm ent Op code May change in future versions Numb[...]

  • Seite 84

    HARSF EN0602 the present executing line. 7.7.16 JZ – Jump If Zero Purpose: Jump to if v alue is zero (change PC to different location in prog ram). Algorithm: PC IM MEDIATE VALUE Attributes Attribute Value C omm ent Op code May change in future versions Number of arg um ents 2 Argum ent type1 Unsig ned short integer Jump Address Argum ent type2 I[...]

  • Seite 85

    HARSF EN0602 Purpose: Increase stack pointer with the value given as an arg ument and z eroes the new entries to stack. Algorithm: SP SP + OP1 Attributes Attribute Value Com ment Op code May chang e in future versions Number of arg um ents 1 Argum ent type Unsig ned char integer Addressing m odes Im mediate1 Number of new entries to stack Promotion[...]

  • Seite 86

    HARSF EN0602 Attributes Attribute Value Com ment Op code May chang e in future versions Number of arg um ents 2 Argum ent type1 Int or Float If arg um ent is from stack , type is set according to stack memb er f la g Argum ent type2 Int or Float Addressing m ode1 Absent, I mm ediate, Mem_Direct , Stack_I m mediate, BP _Relative Assigned v alue (sou[...]

  • Seite 87

    HARSF EN0602 stack m em bers flags) Addressing m odes Absent Promotion N.A. Output ty pe Int % I nt Int Im poses end of line No 7.7.23 RSLTA – Relational Operator (>) Purpose: Compare two num bers, if the first number is bigg er condition is true otherwise it’s false (numbers are at top two entries of the stack) . Algorithm: ((SP- 1) > (S[...]

  • Seite 88

    HARSF EN0602 7.7.25 RSLTA ND – Logical A ND Operator (&&) Purpose: If both num bers are non-zero condition is true. Otherwise it is false (num bers are at top two entries of the stack). Algorithm: (SP-1) && (SP) (SP-1) SP SP – 1 Attributes Attribute Value Com ment Op code May chang e in future versions Number of arg uments None [...]

  • Seite 89

    HARSF EN0602 Attribute Value Com ment Op code May chang e in future versions Number of arg uments None Argum ent types N.A. Both argum ents types are set according to stack mem bers flags Addressing m odes Absent Promotion N.A. Output ty pe Int C om pare result is always integer Im poses end of line No 7.7.28 RSLTE – Relational Operator (= =) Pur[...]

  • Seite 90

    HARSF EN0602 Addressing m odes Absent Promotion N.A. Output ty pe Int C om pare result is always integer Im poses end of line No 7.7.30 RSLTOR – Logical OR Operator ( || ) Purpose: If one of the num bers or both are non-zero condition is true otherwise it’s false (numbers are at top tw o entries of the stack). Algorithm: (SP-1) || ( SP) (SP-1) [...]

  • Seite 91

    HARSF EN0602 Im poses end of line No 7.7.32 SETINDEX Purpose: Set value to array variable defined in data seg ment. Algorithm: DataSeg + Op1 Arr (array address) (SP) Ind (array index) (SP –1) V al (a ssi gn val ue ) Arr[I nd] = val ; (enter v alue to array) Attributes Attribute Value Com ment Op code May chang e in future versions Number of arg u[...]

  • Seite 92

    HARSF EN0602 Shift left the number below top of stack by the num ber at the top of stack. Algorithm: (SP-1) << (SP) (SP-1) SP SP – 1 Attributes Attribute Value Com ment Op code May chang e in future versions Number of arg uments None Argum ent types N.A. Both argum ents types m ust be integer (set according to stack m em bers flags) Address[...]

  • Seite 93

    HARSF EN0602 Addressing m odes Absent Promotion I nt - Float Executes as (float) In t - Float Output ty pe Int - int int Int - Fl o at Float Float - Float Float Im poses end of line No 7.7.37 SYSSUBJ – Jump To Sy stem Subroutine Purpose: Call to system function. Algorithm: FuncTable (list of functions handlers) FuncTable[Op1]() (SP) (put return v[...]

  • Seite 94

    HARSF EN0602 7.7.39 USRSUBJ – jump To U ser Subroutine Purpose: Call to user subroutine (push relevant function data to stack ). SEE 8.2 Algorithm: BP (SP) (save base pointer) SP SP + 1 OP2 (SP) (save return address) SP SP + 1 FuncIndex (SP) (save function index) SP SP + 1 NArgIn (SP) (save num ber of input argum ents) 7.7.39.1. 1.1.1.1 SP SP + 1[...]

  • Seite 95

    HARSF EN0602 Attributes Attribute Value Com ment Op code May chang e in future versions Number of arg uments None Argument types N.A. Addressing m odes N.A. Promotion N.A. Output type N.A. Im poses end of line Yes Jump address is out of the present executing line. 7.7.41 XOR – Bitwise XOR Operator Purpose: Bitwise XOR operator – top two entries[...]

  • Seite 96

    HARSF EN0602 8 T he Record er The recorder mechanism enables the user to record various sig nals that exist in the Harmonica, up to 8 sig nals sim ultaneously. The r ecorded signals can be uploaded to the host by com munication, for the purpose of presentation and analysis. The following section details how to define the recorder parameters to the [...]

  • Seite 97

    HARSF EN0602 8.2 Signal mapping The recorder can record many different signals. The first 16 signals that m ay be recorded are com patible with older am plifiers. They are listed is in the table below. Signal ID Signal Name (Command) Length – Type Description 1 Main Speed (VX) Long – Float Speed of main feedback sensor in counts/sec 2 Main Posi[...]

  • Seite 98

    HARSF EN0602 Integ er revolution, with origin at the electrical angle of zero. 21 Filtered torque comm and Short The command to the Q current controller, at the output of the comm and filter. 45 Motor DC supply voltage Short Samp le Motor DC supply voltag e. 64 External position reference Long - Int e ger The part of the position reference g enerat[...]

  • Seite 99

    HARSF EN0602 RG=1 means that a new sam ple shall be taken once per time quantum . If TS=60, and RP[0]=0, the recorder will sam ple once per 240usec. RG=2 means that a new sam ple shall be taken once per two time quanta. I f TS=60, and RP[0]=1, the recorder will sam ple once per 120usec. Similarly , RG=N means that a new sam ple shall be taken once [...]

  • Seite 100

    HARSF EN0602 Figure 1 - Slo pe a nd w indow tr ig ger types - T rigg ered by a digital signal: The H armonica will support this only in the future, T BD. Trigger delay The trigg er defines when the recorder is to start. The recorder can be told to start before the trigg er event, so that the trig ger ev ent can be caught in “the middle of the pic[...]

  • Seite 101

    HARSF EN0602 0 2 4 6 8 10 0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000 S peed C omman d Ti m e T r igger ed on BG wi t h 0% pr e- t r igger del ay T r igger ed on B G w i t h 20% pr e- t r igger del ay Figure 2 – Pre trigger del ay The trigg er parameters are listed in the table below . . RP[N] Definition RP[0]: Recorder time quanta 0: The [...]

  • Seite 102

    HARSF EN0602 numbers. 8.6 Launching the recorder The recorder is launched (or killed) using the R R com mand. RR also reports the recorder status. The RR comm and has the following options: RR Value Me aning -1 Kill the recorder if active, and invalidate any recorded data. 0 Kill the recorder (Do nothing if the recorder is not activ e) 1 Launch the[...]

  • Seite 103

    HARSF EN0602 The BH comm and is used to upload the values r ecorder by the recorder to a host. The BH comm and is designed to optim iz e the data tran sfer from the Harmonica to the host, assuming that the host has the computing power to analyz e the Harm onica messag e. The basic condition for executing a BH com mand is th at valid data is stored [...]

  • Seite 104

    HARSF EN0602 Byte Number Value Type 0-1: Variable type for user. This field does not have any practical significance. 0 for integer 1 for real Byte 2-3: Data width – number of hex character of a single transm itted data item . 4 for short integer, 8 for long integ er. By te 4-7: Data length – The actual number of transm itted data items. Word 8[...]

  • Seite 105

    HARSF EN0602 9 Commut ation 9.1 General The harmonica driv es fixed mag net m otors. The principle of all the fixed mag net motors is the same: A winding creates a mag netic field. If the m agnet is directed along the field lines of the winding, the m agnet is in its steady state, and the winding exerts no power on the mag net. If the m agnet is no[...]

  • Seite 106

    HARSF EN0602 In the stepper com mutation policy, the winding s field is set to point at the desired rotor position. The comm utating dev ice doesn't hav e to know where the rotor is – it just assumes that the rotor will com e to rest at the field position. The stepper comm utation has the advantages of sim plicity and reliability . The main [...]

  • Seite 107

    HARSF EN0602 WS[20] Stator field angle, in 1024 counts/rev units. Stator field angle (deg) = WS[20] (360/1024) WS[21] Com mutation counter. WS[21] c ounts the m ain high- resolution position sensor, modulo CA[18]. 9.3 Commutation sensors For BLDC com mutation, rotor position sensors are required. The comm utation sensors divide into two m ain group[...]

  • Seite 108

    HARSF EN0602 Hal l A Hal l B Hal l C 270 deg 330 deg 30 deg 90 deg 150 deg 210 deg 270 deg Figure 6: Digital Hall sens ors readout The crude division to six draws rough torque from the motor, and requires hard switching of the motor winding currents. The digital Hall sensors are used, in m any a pplications, tog ether with higher resolution positio[...]

  • Seite 109

    HARSF EN0602 At that very instance the Hall sensors read the electrical angle accurately . After the first Hall sensor switch, the com mutation is kept accurate by updating the comm utation counter incrementally using the shaft position sensor. 9.3.3.2 Detecting commut ation errors (loss of feedback) After com mutation by the encoder starts, ther e[...]

  • Seite 110

    HARSF EN0602 hardly noticeable in low speed, sig nifican tly looses m otor torque at high speed. If Hall sensors are not present, and if the com mu tation is performed using an incremental encoder, then upon motor start the Harm onica must first find the electri cal direction of the mot or . If dig ital Hall sensors are not present (CA[20]=0 ), the[...]

  • Seite 111

    HARSF EN0602 full electrical cycles possible for that m oto r. Enter the "encoder counts in revolution" CA[18] parameter as the num ber of encoder counts for CA[19] electrical cycles. The encoder parameters are listed in the follow ing table. CA[18] Encoder bits per revolution, after resolution m ultiplication by 4, in the rang e [24..10,[...]

  • Seite 112

    HARSF EN0602 microseconds, which is about 160Hz . The frequency is frequency basic 2 ] 15 [ CA ⋅ for CA[15] in the range [- 4..4]. For example, with CA[15]=2 the frequency is about 40 Hz, whereas with CA[15]=- 2 the frequency is about 640Hz The selection rules for the parameters I and f are few and sim ple. The torque I must be as larg e as possi[...]

  • Seite 113

    HARSF EN0602 The method described here can work in reliably m any practical situations, although it does not fit ev ery application. If the param eters of the method are not tuned properly, or the method is not g ood for the application, the motor starting process will fail. After setting MO =1, the algorithm will try to oscillate the motor and fin[...]

  • Seite 114

    HARSF EN0602 -1 00 -5 0 0 50 100 0 20 40 60 80 100 Com m utation m is s a ngle , degrees Los t torque, % Figure 7: Loss of torque du e to com m utation m iss Two principal methods are used to k eep ε near zero. The first is called "S ix-Steps" comm utation, and the other is the continuous commutation. 9.5.1 Six- step commutation With Six[...]

  • Seite 115

    HARSF EN0602 With continuous comm utation all the three moto r coils are powered sim ultaneously to yield a mag netic field exactly at the direction of the rotor. This bring s ε near zero continuously, with minim al torque losses and ripple torques. The continuous comm utation m ode is native for the Harm onica and is used m ost of the time. The c[...]

  • Seite 116

    HARSF EN0602 Figure 9: Winding sha pe function for sinusoida l motor In order to optim ize the Harmonica to as m any m otors as possible, the Harmonica can be program med to any winding shape functi on. The Harm onica comes from the factory program med by default for sinusoidal motors, but using a tool in the Composer prog ram the motor wav eform m[...]

  • Seite 117

    HARSF EN0602 10 Th e current co ntroller This section describes the current controller and its parameteriz ation. In addition, it describes the current limiting process and the am plifier protections. The comm ands relevant to the current controller are: Comm and Description TS Current controller sam pling tim e KP[1] Proportional gain of current c[...]

  • Seite 118

    HARSF EN0602 ) 240 ( h I ) 120 ( h I ) ( h I IQ c b a + θ + + θ + θ = and ) 330 ( h I ) 210 ( h I ) 90 ( h I ID c b a + θ + + θ + + θ = Above, is the commutation ang le and ) ( h θ is the input winding function. The output coordinate transform predicts the v ariation of the phase voltag es during the motor rotation: ) 90 ( g V ) ( g V VA D Q[...]

  • Seite 119

    HARSF EN0602 adapt to the specific amplifier m odel you bought. Units". Program PL[1] smaller then MC if you don' t want to utilize the full power of the am plifier – because the amplifier is ov ersized w ith respect to the application, or because the line voltage is not enough to driv e MC amperes into the m otor. Do not specify M B R [...]

  • Seite 120

    HARSF EN0602       − − = MC CL PL ] 1 [ 1 log ] 2 [ τ With this selection, when PL[2] is set to MC, and after the current demand has been z ero for a long tim e, the am plifier will perm it a maxim um of PL[2] seconds of peak current, and then switch to continuous current lim iting. For other settings of P L[1], the maxim um [...]

  • Seite 121

    HARSF EN0602 Torque comm and filter bandwidth = 32768 ] 6 [ XP log TS 2 10 6 ⋅ π − Hz w here TS is the sam pling tim e in usec. The output of the filter cannot change in steps greater than XP[5]. The units of XP[5] are internal torque comm and units, not Amperes. The ratio between the internal torque comm ands and Amperes is given by WS[22]. T[...]

  • Seite 122

    HARSF EN0602 0 2 4 6 8 10 12 14 16 0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000 Cur rent Contro ller S am pling T im es Amp T or que Cm d V s . T or que Con tro ller I nput X P [5]= 400 X P [5 ]= 1 00 0 X P [5]= 5000 Figure 13: Ra t e limiting for the to rque input f ilter We recomm end not to change the factory se tting of XP[5] and XP [6] i[...]

  • Seite 123

    HARSF EN0602 Feedback I Q ID Outpu t VQ VD The saturation is given by 0.5TS/ 3 10 25 ⋅ , where TS is the current controller sam pling tim e in usec and 3 10 25 ⋅ is the period of the 40mHz PWM generator clock in usec. The division of the proportional and the integral g ains by the DC vo ltage is since the output of the current controller is PWM[...]

  • Seite 124

    HARSF EN0602 model – please refer product user m anual. Under Voltage 0x3000 The power supply is shut down, or it ha s too hig h output impedance. The under voltage threshold differs with the power stag e model – please refer product user m anual. Short circuit 0xb000 A large, fast current pulse has been detected. The motor or its wiring may be[...]

  • Seite 125

    HARSF EN0602 11 Un it Modes The feedback structure of the am plifier can be arrang ed in sev eral options. Those options are called "unit modes" and prog ramm ed by the parameter UM. Switching the unit mode is possible only with the m otor off, since the feedback structure need be re- arranged. The following unit m odes are available: Val[...]

  • Seite 126

    HARSF EN0602 11.2 Speed mode: Unit mode 2 In this m ode the amplifier controls the m otor speed by feedback. The speed controller dem ands torque from the current controller. The reference to the speed controller is summ e d from a software comm ands, and an auxiliary speed comm and. T he auxiliary speed com mand is derived using the analog input, [...]

  • Seite 127

    HARSF EN0602 Comm and Description SF Smooth Factor: The tim e in milliseconds re quired to dev elop the full acceleration of AC and deceler ation of DC. ST Stop comm and, activate profiler st op mode with Deceleration=SD VH[2] Maximum speed com mand. Units counts/sec. VL[2] Minimum speed com mand (bound on speed comm and from below, negative value)[...]

  • Seite 128

    HARSF EN0602 Example: This example dem onstrates the smoothing filter and the sm oothing factor SF. Let us MO=1; JV=4000; AC=100000; DC=100000; SD=10 6 ; PM=1; RM=0; BG; with three different values of SF. 1. The SF=0 graph displays sharp corners, since smoothing is ig nored, therefore non- continuity of acceleration is allowed. 2. The SF=10 graph t[...]

  • Seite 129

    HARSF EN0602 Auxi li ary i nput Analog i nput 1 (- 10 to 10 Vol ts) AG[ 2] Count/ sec/ Vol t A u xilia ry s peed com m and AS[ 1] ` - Speed es tim a tor FR[ 2] Figure 19: Auxiliary speed co mm and generat io n The analog input is m ost useful when th e Harmonica serv es as an inner controller, embedded in an external control loop. The auxiliary enc[...]

  • Seite 130

    HARSF EN0602 limiting the rate of reference change to SD counts/sec 2 . When the Stop Manager stops the m otor due to a switch action, the reference generator is replaced by a z ero comm and at the input to the Stop Manager. The Stop Manager uses the SD param eter to decelerate the mo tor comm a nd from the output of the reference generator to a co[...]

  • Seite 131

    HARSF EN0602 The stepper unit mode enables the rotation of a m otor without feedback control. The motor field is rotated to the desired direction, and the rotor mag net is believed to follow. The user mu st not rotate the field too abruptly in order that the rotor will be able to track its desired direction. If the rotor m isses a full electrical r[...]

  • Seite 132

    HARSF EN0602 The comm utation accuracy will be limited by backlash and gear com pliance The motor speed can be m easured with better resolution and less delay because the motor rotates m uch faster than the load. In addition, the speed sensor is not subject to dead zones caused by back lash. The block diagram of the dual feedb ack mode UM=4 is depi[...]

  • Seite 133

    HARSF EN0602 The details of the speed and the position controllers are given in the chapter " Error! Reference source not f ound. ". 11.5 The single feedback mode: UM=5 The single feedback m ode is used when the sam e sensor is used for speed, comm utation and for position. This is a comm on situation where only one position sensor is ins[...]

  • Seite 134

    HARSF EN0602 12 Th e positio n reference gen erator The position reference signal is generated by the following components: Software com ma nd generator Auxiliary com mand generator Stop manag er. This section describes the components of the position reference g enerator in detail. 12.1 The softw are reference generator The Harmonica supports fiv e[...]

  • Seite 135

    HARSF EN0602 is on. Care must be tak en if the smooth factor (SF) is nonzer o. Upon switching from interpolated motion to P TP or jogging, th e PTP or the Jogg ing will start un- smoothed. Smoothing will g radually build up. After SF m illiseconds, the motion shall be fully smoothed. Care is required, however, when switching to the tabulated (PT an[...]

  • Seite 136

    HARSF EN0602 MS Value Description 0 The position reference generator is idle . Moreover, the Motor position stabiliz ed within the target radius for long enough tim e. 1 The position reference generator is idle, or the motor is off (MO=0). 2 The position reference generator is active in one of the optional m otion profilers – PTP, J og, PT, or PV[...]

  • Seite 137

    HARSF EN0602 The largest PTP m otion available is XM/2 (or 30 2 if XM=0). This is since with modulo calculations, the PTP motion will alw ays g o th e short way. For exam ple, if XM=1000, the present position reference is 490, and the comm and PA=-490;BG is entered, then the position reference will increase and go throug h 499 to –500 and then to[...]

  • Seite 138

    HARSF EN0602 0 0. 01 0. 02 0. 03 0. 04 0. 05 0. 06 0 1000 2000 0 0. 01 0. 02 0. 03 0. 04 0. 05 0. 06 0 50 100 S peed A cce l e r at io n (A C ) C o ns ta nt s p e e d ( SP) De c e l e r a t i o n ( DC) Pos i t i on With shorter mov ement, the deceleration begins before the lim it speed is reached, so that the SP speed limit is not effective. This s[...]

  • Seite 139

    HARSF EN0602 St a rt W ill s t e a d y de cele rati on at DC s t o p mot i on be for e t a r g et? Sp ee d > SP? Sp ee d = SP? Ye s No Ye s Ap pl y AC M a in t a in S P Ap pl y D C Ap pl y D C Figure 24 – PTP Deci sions Fl ow Chart All the parameters of the abov e fl ow chart, including AC,DC, SP, a nd the position target are updated by a BG c[...]

  • Seite 140

    HARSF EN0602 0 0. 05 0. 1 0. 15 0. 2 0. 25 0. 3 0. 35 - 10000 - 5000 0 5000 0 0. 05 0. 1 0. 15 0. 2 0. 25 0. 3 0. 35 - 400 - 200 0 200 C ou n t s/ se c C o unts Ti m e (S e c ) Ti m e (s e c ) P o s i ti o n r e fe re nc e T ar ge t pos it ion AC DC DC AC 12.1.5 Jogging In a jogg i ng m otion, the motor is com manded to m ove in a fixed speed. The [...]

  • Seite 141

    HARSF EN0602 Jog mo tions can continue forever. The position reference jumps when it arriv es the modulo boundary (+/-2 30 for XM=0 or +/- XM/2) but the speed is kept constant The parameters of Jog m otion are summariz ed in the table below. Param eter Action AC A cceleration in counts/ 2 sec DC D eceleration in counts/ 2 sec SF Smooth factor, in m[...]

  • Seite 142

    HARSF EN0602 0 0. 1 0. 2 0. 3 0. 4 - 2000 0 2000 4000 0 0. 0 5 0. 1 0. 15 0. 2 0. 25 - 200 - 100 0 100 Ti m e (s e c ) Ti m e (s e c ) P o s i ti o n re fe r e nc e P o s i ti o n T a rg e t C ou n t s/ se c C o unts 12.1.6 PVT: Position-Velocity -Time interpolated motion 12.1.6.1 What is PVT? PVT stands for Position Velocity Time. In a PVT m otion[...]

  • Seite 143

    HARSF EN0602 The user provides, for each m otion interval, the boundary positions and speeds. Mathematically , the user provides the following data: The starting position and speed, denoted by P0 and V0, respectiv ely The end position and speed, denoted by PT and VT, respectively. Let 0 t denote the starting tim e, and let T denote the length of th[...]

  • Seite 144

    HARSF EN0602 -4 -2 0 2 4 x 1 0 4 -4 -3 -2 -1 0 1 2 3 4 x 1 0 4 N o m i na l e lli p s e E l l ipse P VT poin t s M o ti o n s ta r ts a nd te m i n a te s he re The next figure tak es a closer look at the error betwee n the true ellipse and the Am plifier interpolated path. 0 500 1000 1500 200 0 2500 0 1 2 3 4 5 6 7 8 D if f er en ce (c o unt s ) m[...]

  • Seite 145

    HARSF EN0602 The next figure display s the interpolated trajectories generated by the A m plifiers for the x- axis and for the y- axis. 0 500 1000 1500 2000 2500 -6 -4 -2 0 2 4 6 x 1 0 4 mse c Co u n t s X a xi s tr a je c to r y Y a xi s tr a je c to r y Example The Amplifier norm ally produces maxim ally smooth interpolating trajectories. For thi[...]

  • Seite 146

    HARSF EN0602 Starting speed 100000cnt/sec End position 1200cnt End speed 190000cnt/sec Time 6m sec The interpolated path for the data of the table is depict ed in the figure below, fo r a controller with a sam pling time of 160 µ s ec. The + sym bols show the points at integ er multiples of the controller sam pling tim e. At these points, the Am p[...]

  • Seite 147

    HARSF EN0602 The speeds in the table are limited to +/- 23 2 counts/second. The times in the table are in the rang e [1,255] msec. If the position feedback sensor counts modulo, the PVT data must be so that the rang e of the interpolated data is [-XM...XM- 1] (Set YM instead of XM here and in the next sentences if UM=4). Interpolated results in the[...]

  • Seite 148

    HARSF EN0602 Motion segment complet ed ? N >= MP[2]-1 Increm ent read pointer Read the N+1 row of the PVT table and calculate the paramet er s of the nex t motion segment Initial conditions: PVT read pointer equals N Interpolate position comm and Go to position controller MP[3]==1 Exit PVT m ode: Set Stop m otion, using the SD deceleration Set t[...]

  • Seite 149

    HARSF EN0602 A PVT m otion is initiated by stating PV=N with 64 N 1 , and BG. The comm and PV=N sets the read pointer of the table to N and specifies that the next BG will start a PVT motion. BG starts the m otion. The PVT table may be w ritten on-line w hile PVT motion is on. An infinite- time non- periodic motion can be generated in the cy clical[...]

  • Seite 150

    HARSF EN0602 12.1.6.5.1 The PVT Mot ion Programming Message An entire row of the PVT table may be prog ramm ed by a single PDO. The PDO used is 0x300+ID where I D is the node ID of the Am plifier. Note that before using PDO 0x300+I D it m ust be mapped to the object 0x2001. The mapping of this PDO for the PVT mode is listed in the table below. Obje[...]

  • Seite 151

    HARSF EN0602 Motion segment complete d ? N >= MP[2]-1 Increment read pointer Read the read pointer row of the PV T t able and calculate the parameters of the next motion segment Initial conditions: PVT re ad pointer equals N Interpolate position command Go to position controller Exit P VT mode: Set S t op motion, using the SD deceleration Set t [...]

  • Seite 152

    HARSF EN0602 12.1.6.5.2 Programming Sequence for The A uto Increment PVT Mode PVT mo tion must start w ith initial program ming of the PVT arrays. Set MP[1] = First valid line in the P VT table MP[2] = Last v alid array in the PVT table MP[3] = 1 for cyclical m ode. MP[4] = Not relev ant for PVT (PT only ) MP[5] = Number of left prog ramm ed motion[...]

  • Seite 153

    HARSF EN0602 Stop Deceleration (SD) The ra te of deceleration in the case where m otion is killed by queue underflow or by an exception. The rate off acceleration to catch up if PVT is started with bad initial conditions. Position/Velocity /Time (PV) Set a PVT motion com mand PVT table entries: QP[N], QV[N], QT[N] Set values to the PVT table The PV[...]

  • Seite 154

    HARSF EN0602 The following CAN em ergencies are s upported, all as manufacturer specific: Error code (Hex) Error code (Dec) Reason Data field 0x56 86 The queue is low: The number of y et unexecuted PVT table rows dropped below the value stated in MP[4] Field 1: Write pointer Field 2: Read pointer 0x5b 91 The write pointer is out of the physical [1,[...]

  • Seite 155

    HARSF EN0602 12.1. 7 PT Motion 12.1.7.1 What Is PT PT stands for Position-Time. In a PT m otion, the user specifies a sequence of absolute positions to be visited by the A mplifier w ith equal time spaces. The tim e space must be an integer m ultiple of the Amplifier sam pling tim e. Between the user specified positions, the Amplifie r interpolates[...]

  • Seite 156

    HARSF EN0602 . . . . . - - - - - I n t er polat ed pat h P vt P l a n o ut p ut T i me ( secon ds) Mo ti o n pa th i n co unts 12.1.7.3 PT Motion Programming – The Basic Mode 12.1.7.3.1 The PT Table The vector QP[N] defines th e position points for PT m otion. Each element of the v ector defines the position at a giv en time. The QP vector has 10[...]

  • Seite 157

    HARSF EN0602 0: Motion is to stop if the read pointer reaches MP[2] MP[3] 1: Motion is to continue when the read pointer reaches MP[2]. The next row of the table is MP[1]. Cyclical behav ior definition. MP[4] The number of controller sam pling tim es in each PT motion seg ment. Table 12-10 – PT M o tion Parameters The flow chart of the basic PT m[...]

  • Seite 158

    HARSF EN0602 BG starts the motion. The QP vector m ay be written on-line while a PT m otion is on, as long as you don' t program presently executing PT elem ents. 12.1.7.5 Mode Termination The PT motion term inates upon one of the following cases: The motor is shut down, either by program ming MO=0 or by an exception. Another mode of m otion i[...]

  • Seite 159

    HARSF EN0602 Motion segment completed ? N >= MP[2]- 1 Increment read pointer Read the read pointer to the QP vector and calculate the parameters of the next mot ion segment Initial conditions: PT read pointer equals N Interpolate position command Go to position controller Exit PT m ode: Set Stop m ot ion, using the SD deceleration Set the read p[...]

  • Seite 160

    HARSF EN0602 PT motion m ust start with initial program ming of the PT arrays. First set MP[1] = First valid line in the P T table MP[2] = Last valid array in the PT table MP[3] = 1 for cyclical m ode. MP[4] = the ration between the leng th of the PT time interval and the sam pling time of the position controller MP[5] = Number of y et unused QP[N][...]

  • Seite 161

    HARSF EN0602 MP[4] = Ratio between the comm and sampling tim e and the position controller samp ling tim e MP[5] = Tim e for queue low alarm MP[6] = I nitial value for write pointer WS[29] Sampling tim e, in microseconds, of the position controller. A read only param eter. WS[29] is an integer m ultiple of the basic sampling time as set by TS. Tabl[...]

  • Seite 162

    HARSF EN0602 PTP or PVT. T he position of the convey er is not known in advance, and it m ust be measured on line, for exam ple by using the auxiliary encoder input. The reading of the auxiliary input is scaled by the follower ratio (FR[3]) parameter, and added to the software comm and. Driving the am plifier as a slave in a larg er arrang ement. F[...]

  • Seite 163

    HARSF EN0602 Example: This example illustrates w orking on a mov ing object. Consider the application depicted below: X axi s Y ax i s M ov i ng c onvey er Cak e C ircle to draw 10000 In this application, an x- y stage draws a choc olate picture on a cake while the cak e travels on a convey er. The drawing has to be accurate with respect to the cak[...]

  • Seite 164

    HARSF EN0602 12. 2.1 ECAM ECAM is an acrony m for “Electronic Cam ”. It means that the position reference to the Amplifier is not directly proportional to the summ ed external inputs, but is a function of them. The ECAM related com mands are as follows: EM[1] Asserts whether the ECAM function is active. 1 for active EC AM. 0 for direct external[...]

  • Seite 165

    HARSF EN0602 EC AM tabl e out put EC AM tabl e i nput EM[ 3] EM [ 4] ET[ 3] EM[ 4] ET[ 1] ET[ 2] ET[ 4] EM[ 4] E M [3 ]+ 3 E M [4] Example: Suppose that we want the following functiona l relationship between the voltag e of the analog input and the m otor position: 1 1. 5 2 2. 5 3 3. 5 4 1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000 A n al[...]

  • Seite 166

    HARSF EN0602 is equivalent to 1000 counts EM[5]=1 First index of the table ET[1]=1000 ET[2]=2000 ET[3]=1000 ET[4]=2000 ECAM table v alues EM[1]=1 Activ ate ECAM. - For every input voltag e less than 1v, the external position com mand w ill be 1000. - For input voltag e of 1.5v the external position com mand w ill be 1500. - For input voltag e of 2.[...]

  • Seite 167

    HARSF EN0602 The initial program m ing of the Am plifier includes: EM[1]=1 Enable ECAM EM[2]=200 Length of the ECAM v ector EM[3]=0 Starting position EM[4]=100 Convey er encoder c ounts between two consecutive ECAM table entries ET[1]=…;ET[2]=…;ET [100]= …; Program the numeric data of the ECAM table UM=5 Set single sensor position m ode RM=1 [...]

  • Seite 168

    HARSF EN0602 Cake Dr awi ng x -y m ani pul ator st ati on Next cake Camer a s t at i on C A N Camer a Assum e that the amplifiers at the x- y mani pulator station runs th e ECAM table entries ET[1]...ET[100]. In the meantim e, the system cont roller program s the next shape to run into ET[101] ...ET[200]. T he preferred way to do that is by using t[...]

  • Seite 169

    HARSF EN0602 The elements to be prog ramm ed are specified by a “w rite pointer”. The value of the write pointer m ay be set by the parameter MP[6]. 12.2.4 Initializing the exter nal reference parameters. This section details what happens when the external reference generator is initializ ed. The external reference generator is initialized at M[...]

  • Seite 170

    HARSF EN0602 The software comm and to the roller is set as point to poi nt, to correct the roller position for the next arriving box. That way the printing is sy nchronized to the box. Figure 31: Print On A Moving Box Appl ication At the tim e of auxiliary hom ing (when a new box arrives at the sensor), the external reference jumps by PY*FR[3]. The[...]

  • Seite 171

    HARSF EN0602 The comm ands relevant to the stop m anager are: Comm and Description SD The maxim um rate that the motor can accelerate/decelerate. IL [N] Input log ic – define the functi ons associated to digital inputs. VH[N],VL[N ] The maxim um allowed controller com mand XM,YM Modulo count for the main and the auxiliary sensors 12.3.2 Stop Mana[...]

  • Seite 172

    HARSF EN0602 This block stops the desired position reference to its present position if a hard- stop switch is sensed. Right Limit Switch (Marked as 3 in the F igure) This block stops the desired position reference to its present position if an RLS switch is sensed, and if the output of the position reference generator is less than the controller&a[...]

  • Seite 173

    HARSF EN0602 0 0.5 1 1. 5 2 2.5 3 -8 -6 -4 -2 0 2 4 6 8 x 1 0 4 Se c Counts Figure 33: Positi on output of th e stop m anager 0 0.5 1 1. 5 2 2.5 3 -2 -1 . 5 -1 -0 . 5 0 0.5 1 1.5 2 x 1 0 7 Se c Counts / s ec Figure 34: Speed output of the Stop Manager[...]

  • Seite 174

    HARSF EN0602 13 Sensors , I/O, and Event s The Harmonica has two encoder inputs for feedback, com mutation, and auxiliary reference g eneration. In addition, it has an analog input, Ha ll sensor inputs, and digital I /O. The digital inputs and the encoder index sign als can generate events that m ay register the m otor position, or reload the posit[...]

  • Seite 175

    HARSF EN0602 RLS and FLS can be read by the user prog ram and activ ate their corresponding autom atic routines, but they do not affect the m otion imm ediately. The position referencing lim its VH[3] and VL[3] become ineffective. ! If the m odulo value is selected low, and the sensor speed is high, m ore than one full revolution of the position co[...]

  • Seite 176

    HARSF EN0602 (AOK) indication, or brakes output. The association of output pins to functions is described in detail in the Comm and Reference Manual, the OL[] comm and. 13.4 Events, and response methods The Harm onica identifies the following ev ents 6 : Change of a GPI (General Purpose digital I nput) Change of a limit switch Change of a "Hom[...]

  • Seite 177

    HARSF EN0602 Host logics only. 13.4.3 A utomatic routines Many ev ents can be tied to automatic handler rou tines in the user program . To learn more about automatic user prog ram routines, refer the section "Automatic subroutines". The table below summ arizes som e of the properties off automatic routines. Topic Comm ent Capture probabil[...]

  • Seite 178

    HARSF EN0602 Absolute position control in the single- feedback position- control mode. Relative work in the single- feedback position- control mode. For exam ple, an axis in a machine may be homed by a sensor of the edge of the product the m achine works on. The position referencing of the axis becom es relative to the product. Homing of the main p[...]

  • Seite 179

    HARSF EN0602 of PY, not PX. 13.5.4 On the fly position counter updates The updating of a position sensor during hom ing process has no effect in UM=1,2,3 since these modes do not use position feedback . The implications of position sensor (PY in UM=4, PX in UM=5) update by a hom ing process depend in the mode. In PTP m otions, the remaining m otion[...]

  • Seite 180

    HARSF EN0602 Figure 35 – Switches location The following user program does the algorithm: Note that the function above uses MI to preven t RLS from activating the AU TO_RLS routine. A nother possible approach would be to use I L[] to change the functionality of the switch to GPI 7 , and then hom e on the GPI. With the latter approach, howev er, t[...]

  • Seite 181

    HARSF EN0602 13.5.5.1 Example: Double homi ng corrects backl ash offsets This example dem onstrates hom ing on th e hom e switch without using the index. In m any gear system s, the index signal ca nnot be used for homing. The reason m ay be: Motor or gear repairs should not require the t uning of the index position or the A mplifier. Backlash and [...]

  • Seite 182

    HARSF EN0602 Progra m Example 1 - Double Sided Homing. 13.5.6 Capturing Capturing is a special case of hom ing, in which we program that the event will only register the counters value, but not affect m otion a nd not update the position counters. Capturing is efficient in sy nchronizing the mo tion orig in to objects in the working space. The Ampl[...]

  • Seite 183

    HARSF EN0602 14 Limit s, Prote c tions, Faults, and Diagnosis This chapter discusses the limits and the protections im plem ented by the Harm onica. Limits are software restrictions that prev ent the Harmonica from running into dang erous situations. Exam ples for limits are: Limiting the torque com mand prev ents the burning of the m otor or the H[...]

  • Seite 184

    HARSF EN0602 VL[N] Com mand low lim its for position and speed Table 14-1: Comm ands relevant to lim its, protection, an d diagnos is CAN users have an added protection lev el. The Harmonica issues Em ergency objects in the case of errors or applied protections – refer the CAN manual. 14.1 Current limiting The Amplifier protects the m otor from o[...]

  • Seite 185

    HARSF EN0602 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 Appl ic at ion cu r r en t deman d m o to r c urre nt comman d Fil t er st at e L C c urre nt lim i t I n dicat ion 14.2 Speed Protection The reference to the speed controller is lim ited to be in the rang e [VL[2]...VH[2]]. The limiting (applied on the sum of the software reference and the external re[...]

  • Seite 186

    HARSF EN0602 0 W i t hi n speed com m an d and f e edback l i m i t s V L [2 ] VH[ 2] LL[ 2] H L [2 ] W i t hi n s pee d f eed back l i m i t s, out of c o m m a n d lim it s . Abo r t Ar ea Ab o r t Ar e a Ov e r - sho ot Ar ea Ov e r - sho ot Ar ea Figure 36: Speed com mand and feedback lim it s ! Rem ember that w hen the amplifier shuts dow n by[...]

  • Seite 187

    HARSF EN0602 The position comm and and feedback limits are illust rated in the figure below . The amplifier normally operates in the area ma rked "Within com mand and feedback limits". I t may, however, v isit instantaneously the areas m arked "Ov ershoot area" due to an overshoot, and this is Ok. I f the position feedback reach[...]

  • Seite 188

    HARSF EN0602 attempts are m ade 10msec after the last mo tor shutdown, or 10msec after the last failure of MO=1. For safety reasons, w e recommend to program the Inhibit f unction as "active low". That prevents incidental motor starts w hen the input pin is disconnected, or i ts driving source is powered-dow n. 14.5 Limit sw itches The Ha[...]

  • Seite 189

    HARSF EN0602 MO Bra ke 1 Released BP[ 2] BP[ 1] Ti me (msec) Mot or c on tro lle d to s top Mot or c on tro lle d to s to p Mot i on Com m ands N. A. Ac c ord ing tom otion progr am m ing N. A. Figure 39: Norm al Brake Activation T im ing At the brake activ ation times (B P[2] msec to diseng age, BP [1] msec to eng age) the m otor is controlled to [...]

  • Seite 190

    HARSF EN0602 When the amplifier shuts down by exception, the m oto r will continue to run by its ow n inertia unless brakes are used (refer the section Connecting an external brake). We recomm end the use of automatic brake activ ation upon motor shut down (refer the OL comm and) for all safety critical application. An amplifier exception shut down[...]

  • Seite 191

    HARSF EN0602 14.9 Diagnosis 14.9.1 Monitoring motion faults You can monitor m otion faults by: Continuously polling the am plifier status Observing an "AOK" digital outputs. Trapping CAN Emerg ency objects. The CAN Em ergency objects are covered in the CAN manual. 14.9.1.1 Polling the amplifier status The amplifier can be polled using the[...]

  • Seite 192

    HARSF EN0602 RM=1 with a m odulo-counting position feedback. 14.9.3 Dev ice failures, and the CPU dump Humans hav e program med the Am plifier. T he prog ra mm ers, however hard they try , cannot com pletely avoid bug s in their code. Program ming bugs m ay lead to CPU exceptions, lik e an attempt to div ide in zero, or an attempt to access a v ari[...]

  • Seite 193

    HARSF EN0602 taken since alm ost every m otion system applies high to rques for short acceleration periods while the speed is slow. CL[2] defines the tested torque level as a per centag e of the continuous current limit CL[1]. CL[3] states the absolute threshold main sensor speed under which the m otor is considered not mov ing. Do not set CL[3] to[...]

  • Seite 194

    HARSF EN0602 In this situation, the direction of the stator field is constant, and if torque is comm anded, the rotor seeks equilibrium, alig ned to the m agnetic field. If the m otor is driven by an external speed or pos ition controller, it will be com manded to full- torque, and dissipate the corresponding heat, without generating any m otion. T[...]

  • Seite 195

    HARSF EN0602 15 T he Controller 15.1 General This Section details the speed and position control al gorithms. For m any applications, the details of this document are of no concern. People do not hav e to understand the internals of a motion controller in order to tune it with the Composer prog ram. This chapter is aimed for the adv anced user who [...]

  • Seite 196

    HARSF EN0602 N=3: Outer loop gain (UM=4 and UM=5) KI[N] N=2: Inner speed loop I ntegral gain, I . KV[N] Coefficients for the high -order filter. The parameter KV[0] asserts if these filters are used at all – if KV[0] is z ero, then the advanced filter is not used. GS[N] Gain scheduling param eters. More details see chapter “ Error! Reference so[...]

  • Seite 197

    HARSF EN0602 DV[2] Speed com m and - Torquecomm and ( DV[ 1] , Amp) Speed contr ol ler: KP, KI High or der filte r FF[ 1] d/dt A uto m atic Contro l ler Sel ec t or 0 Fix ed i f G S [2]=0 Posit ion se nsor Speed E stim ator Encoder pul se tim e r Speed feedback Figure 40 – A Block Diagram of the S peed Controlle r 15.2.2 The Parameters of the Spe[...]

  • Seite 198

    HARSF EN0602 The scheduled case is explained in the section on “Gain Scheduling”. The parameter G S[0] helps stabilizing the motion in v ery slow speeds. It cuts the proportional g ain of the speed controller after enough controller sam pling tim es elapsed without a change in the encoder readout. Consider for example a 200- count/sec, speed re[...]

  • Seite 199

    HARSF EN0602 DV[3] Pos i ti on c omma nd - Speed com m and ( DV[2 ], Am p) Pos it i on Contr ol ler KP[ 3] , GS[ 9] FF[ 2] d/dt A uto m atic Control ler Sel ect or 0 Fix ed i f G S [2]= 0 Mai n Po si ti on sensor A u xilia ry P o s itio n Sensor Posit ion f eedback UM=4 UM=5 Com m andPi ePos Figure 41 – Block Diagram of The Dual Loop Controller 1[...]

  • Seite 200

    HARSF EN0602 For UM=5 the position feedback is tak en from the m ain encoder. … All the parameters of the speed controller 15.4 The High Order Filter 15.4.1 B lock Ty pes Several block s chained in series mak e the high order filter. The block types are listed in the table below. Block type Block structure Number of parameters Comment 12 Double l[...]

  • Seite 201

    HARSF EN0602 where α − α − β = 1 p , β − = 1 q , i.e. q − = 1 β , p 1 q 1 − − = α . Order Parameter Description Comment 1 p Float, represented by 2 long v alues 2 q Float, represented by 2 long v alues 15.4.1.3 Second order block (Block Ty pe=15) The basic continuous time second order elem ent is filter D Cs Es B As Es B D 2 2 + +[...]

  • Seite 202

    HARSF EN0602 For more details about g ain scheduling, refer the section " The Gain- Scheduling Algorithm ". 15.4.2 U ser Interface The parameters defined by an array of long integer values set by the KV comm and. If KV[0]=0, hig h order filter is not used and the vector is ignored. If KV[0] is not z ero, the KV[2]..KV[n] defines the f ilt[...]

  • Seite 203

    HARSF EN0602 KV [0] 100 KV[1] 19 Last index used KV[2] 15 1 st block, 2- order KV[3] 1734476372 Param eter 1 (k1), m an KV[4] - 32 Param eter 1 (k1), exp KV[5] 1480626866 Param eter 2 (k2), m an KV[6] - 32 Param eter 2 (k2), exp KV[7] - 1592218865 Parameter 3 (k3), m an KV[8] - 31 Param eter 3 (k3), exp KV[9] 2104573671 Param eter 4 (k4), m an KV[1[...]

  • Seite 204

    HARSF EN0602 Table 1 5 -3: Programm ing sets of cont ro ller parameters for gain schedulilng Only a subset of the controller param eters can be schedualed. The KG[] parameters can prog ram sets of KP,KI gains, as well as one scheduled double- lead block at the hig h order filter. The other elements of the hig h orde r filter cannot be gain schedule[...]

  • Seite 205

    HARSF EN0602 comm ands are accepted slowly to guarantee stability . Limit the schedulink below Y = max (Y , MinSpeed ) Get the index to the gains table by interpolating the indexing function ] 15 [ GS / ]) 15 [ GS mod 16 / Y ( q ] 4096 / Y [ n = = q n Table SpeedIndex n Table SpeedIndex n Table SpeedIndex k ⋅ − + + = ]) [ ] 1 [ ( ] [ Get the ga[...]

  • Seite 206

    HARSF EN0602 16 A ppendix A : The Harmonica Fla sh Memory Or ganization This Appendix describes the internal partitioning of the internal serial Flash m emory of the Harmonica. For normal use of the H armonica, y ou don’t need to re ad this appendix, since the Com poser ID E will deal with it for you. To learn how to upload and downl oad flash da[...]

  • Seite 207

    HARSF EN0602 Start of Text1 unsigned short 0 L e ngth of Text1 unsigned short 2 Start of Text2 unsigned short 4 L e ngth of Text2 unsigned short 6 Start of Text3 unsigned short 8 L e ngth of Text3 unsigned short 10 Start of Text4 unsigned short 12 L e ngth of Text4 unsigned short 14 Start of Text5 unsigned short 16 L e ngth of Text5 unsigned short [...]

  • Seite 208

    HARSF EN0602 16.2.5 Contents of Text4- Text7 This text specifies which op-codes a specific the Harm onica supports, and also the limitations: Siz e of available flash space (m ay v ary with H armonica g rades), size of data seg ment in RA M, maxim al number of variables, m axim um num ber of f unctions, and Maxim um stack depth. The text4 file spec[...]

  • Seite 209

    HARSF EN0602 0x20 Not used 0x40 FLAG_Assig n Sy stem param eter can be assigned a v alue 0x80 Not used 0x100 FLAG_Operator Virtual A ssem by Code or operator 0x200 FLAG_SysFunc System function 0x400 FLAG_Mnemonic System comm and - Mnemonic 0x800 FLAG_String Indicate th is is a string com mand 0x1000 FLAG_Array Command is not executed autom atically[...]

  • Seite 210

    HARSF EN0602 Entry Meaning Rem arks TextSpace The space (in characters) to store user program backup. This num bers specifies the entire space – including ov erhead, such as text-opcode m a tching data. The net text length is sm aller that this number. CodeSpace T he space (in characters) to store com piled op- code. NameLeng th The maxim um leng[...]

  • Seite 211

    HARSF EN0602 If the priority is –1 if the Harmonica can’t serv ice this function. 16.2.8 Contents of Text10 This file lists all the possible run-tim e errors of a sp ecific Harm onica, including their codes. Text10 has the following form at: 1 , motor m ust be off 2 , out of range In each line the num ber is the error code and the string follow[...]

  • Seite 212

    HARSF EN0602 The user code partition can be read by the LS com mand. The data in this partition is: A TOC (Table of Contents) A "Compilation done" flag A virtual m achine code segment A text backup seg ment. The text backup in cludes v irtual code counter references. A function sym bol table A variable sy mbol table An automatic function [...]

  • Seite 213

    HARSF EN0602 If the com pilation flag is zero, program is ready. Other values indicate not ready program . The comm and CP sets the compilation flag to –1. The Comp ilation Flag is checked w hen: DL com mand – I f the flag is zero, DL will not execute (C P must be issued before D L). XQ comm and – If the flag is nonzero, the comm and retur ns[...]

  • Seite 214

    HARSF EN0602 16.5.6 The Variable Symbol Table The variable sym bol table states what variables are a ccessible through the user program . Its first 34 bytes of the variables sy mbol table is dev oted to statistics: - Number of v ariables in the table (signed short) For each variable, the following data 34 bytes record is set: Nam e (24 bytes long, [...]

  • Seite 215

    HARSF EN0602 17 A ppend ix B: H armonica Intern als This chapter summ arises som e of the Harmonica internals. The chapter to give som e deeper insights. It is not required for the standard Harmonica user. 17.1 Software Structure The firmw are is built from an initialisation block and from a run time block . The run-tim e block is built by (event) [...]

  • Seite 216

    HARSF EN0602 - Decide if to use the peak current lim it or the continuous current limit. - Match digital hall readout to encoder data, to detect loss of com m utation - Detect "Motor stuck" condition 17.1.3 The Idle Loop The term "I dle loop" describes the repetitive task perform ed filling the entire tim e when the processor is[...]

  • Seite 217

    HARSF EN0602 Read any addit ional c hars fr om R S232 buff er Message com pl eted? Rout e m essage to inte rprete rr Long Record i n tr ansm i ssion? Present buff er done? Las t da ta loade d? Reload buf fer Ro ut e tra ns m ittte r to in terpre te r outp ut A uto rou tine wait ing f or execu ti on? Set pr ogr am counter of t hread 0 t o auto rout [...]

  • Seite 218

    HARSF EN0602 18 A ppendix C: Conv ert ing Clarine t/Saxophone programs t o the Har monica langua ge 18.1 The Converter The user program syntax for the Saxophone or Clarin et is different from the Harmonica’s sy ntax. T he converter prog ram prov ides an easy m ethod to conv ert Saxophone/Clarinet style prog rams to the Harm onica syntax. The conv[...]

  • Seite 219

    HARSF EN0602 comm and AF 2 WT command The keyw ord ‘wait is used instead the comm and WT WT=xxx wait xxx 3 JP comm and without condition The keyw ord ‘goto’ is used for jump to the label JP##LABEL goto##LABEL 4 JP comm and with condition The ‘if’ statement is used for condition J P##LABEL,cond if cond goto##LABEL end 5 JS comm and without[...]

  • Seite 220

    HARSF EN0602 PX=0;UM=2;AC=60000000; PX=0; UM=2; AC=60000000; IA [1]=2000;IA [2]=-2000 ; IA [1]=2000; IA [2]=-2000 ; MO=1;**Motor On MO=1;**Motor On BG;**Begin BG;**Begin ##LOOP1 ##LOOP1 JP##LOOP1,PX<IA[1] ; if PX<IA[1] goto##LOOP1 end ; ##LOOP2 ##LOOP2 JZ##LOOP2,PX>IA[2]; if PX>IA[2] reset LOOP2 end #@AUTOEX EC #@AUTOEXEC WT=200 wait 20[...]