Instruction/ maintenance manual of the product HARmonica Elmo
Go to page of 220
HARmonica Software Manual June 2002 www.e lm om c. co m.
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.
HARSF EN0602 Table of Contents: 1 ABOUT T HIS M A NUAL .............................................................................................................. ................... 10 1.1 Scope ....................................................
HARSF EN0602 4.2.2 Mathematical And L o gical Operators............................................................................................. ....................... 19 4.2.3 General rules for operators .........................................
HARSF EN0602 6.4 The program execution .......................................................................................................... .................................. 62 6.4.1 Initiating a Program.........................................
HARSF EN0602 7.7.28 RSLTE – Relational Operator (==) ............................................................................................... .................... 87 7.7.29 RSLTNE – Relational Operator (! =) ................................
HARSF EN0602 10 THE CURRENT CONTROLLER ......................................................................................................... ......... 115 10.1.1 Current li miting ...................................................................
HARSF EN0602 13.5.2 Homing Programmin g ............................................................................................................. ....................... 176 13.5.3 Homing the auxiliary en coder ....................................
HARSF EN0602 16.1 Main partitions ................................................................................................................ ....................................... 204 16.2 The firm ware partition ...............................
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 ................
HARSF EN0602 List of Figures: Figure 1 - Slope and windo w trigger ty pes ...................................................................................... ....................... 98 Figure 2 – P re trig ger delay ..............................
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.
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 .
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.
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.
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.
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.
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.
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.
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.
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.
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 .
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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 .
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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).
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".
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.
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.
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 c.
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 funct.
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.
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.
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.
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.
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.
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).
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 Attribut.
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 i.
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 stac.
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) .
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).
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.
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).
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 (.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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 .
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.
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.
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.
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.
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.
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.
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.
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.
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 .
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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 ].
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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 Figu.
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.
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.
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.
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.
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.
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.
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.
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.
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 re.
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.
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.
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:.
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.
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.
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 PV.
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.
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.
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.
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.
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 r.
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.
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.
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.
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.
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.
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.
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.
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 co.
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] .
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.
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].
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.
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 posi.
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 .
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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].
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 .
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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 .
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.
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.
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.
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].
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.
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.
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.
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 uns.
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.
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 F.
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.
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.
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.
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).
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 .
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 .
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.
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 .
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.
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##LAB.
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&l.
An important point after buying a device Elmo HARmonica (or even before the purchase) is to read its user manual. We should do this for several simple reasons:
If you have not bought Elmo HARmonica yet, this is a good time to familiarize yourself with the basic data on the product. First of all view first pages of the manual, you can find above. You should find there the most important technical data Elmo HARmonica - thus you can check whether the hardware meets your expectations. When delving into next pages of the user manual, Elmo HARmonica you will learn all the available features of the product, as well as information on its operation. The information that you get Elmo HARmonica will certainly help you make a decision on the purchase.
If you already are a holder of Elmo HARmonica, but have not read the manual yet, you should do it for the reasons described above. You will learn then if you properly used the available features, and whether you have not made any mistakes, which can shorten the lifetime Elmo HARmonica.
However, one of the most important roles played by the user manual is to help in solving problems with Elmo HARmonica. Almost always you will find there Troubleshooting, which are the most frequently occurring failures and malfunctions of the device Elmo HARmonica along with tips on how to solve them. Even if you fail to solve the problem, the manual will show you a further procedure – contact to the customer service center or the nearest service center