Maestro Software Manual September 2008 – Ver. Q www.elmomc.
Important Notice This guide is delivered subject to the following conditions and restrictions: This guide contains proprietary information belonging to Elmo Motion Control Ltd. Such information is supplied solely for the purpose of assisting users of Maestro motion supervisor. The text and graphics included in this manual are for the purpose of illustration and reference only. The specifications on which they are based are subject to change without notice.
Maestro Software Manual MAN-MAMSW (Ver. Q) Contents Chapter 1: Introduction..................................................................................................................1-1 1.1 Maestro Highlights ................................................................................................ 1-1 1.2 Supplementary Documents ................................................................................ 1-2 1.3 Command Specification .......................................................
Maestro Software Manual Contents MAN-MAMSW (Ver. Q) 5.2 5.3 5.4 5.5 5.1.4 Punctuators ............................................................................................... 5-3 5.1.5 Operators................................................................................................... 5-3 5.1.6 Literals ....................................................................................................... 5-5 5.1.6.1 Integer Constant......................................................
Maestro Software Manual Contents MAN-MAMSW (Ver. Q) 5.6 Functions ............................................................................................................ 5-30 5.6.1 Function Definition ................................................................................ 5-30 5.6.2 Built-in Functions ................................................................................... 5-33 5.6.3 Callback (interrupt) Functions ..............................................................
Maestro Software Manual Contents MAN-MAMSW (Ver. Q) 7.2 iv Receive Answer from Maestro ........................................................................... 7-1 Chapter 8: The Recorder ................................................................................................................8-1 8.1 Accessing the Recorder ....................................................................................... 8-1 Chapter 9: The CANopen Configurator.............................................
Maestro Software Manual Contents MAN-MAMSW (Ver. Q) 10.6 Profiled Torque (PT) Mode............................................................................. 10-39 10.6.1 Profiled Torque (PT) Commands........................................................ 10-39 10.6.2 Using Profiled Torque Commands..................................................... 10-40 10.6.2.1 Profiled Torque Implementation.....................................................10-40 10.6.2.
Maestro Software Manual Contents MAN-MAMSW (Ver. Q) 12.5.5 MODBUS Serial Slave .......................................................................... 12-16 12.6 MODBUS communication workflow............................................................. 12-17 12.7 MODBUS Protocol Errors ............................................................................... 12-18 Chapter 13. Node DS301 Command Reference ........................................................................13-1 13.
Maestro Software Manual Contents MAN-MAMSW (Ver. Q) B.4 B.5 B.6 B.7 B.8 B.3.8 Label and GoTo Sample.......................................................................... B-11 B.3.9 Order of Processing Sample ................................................................... B-11 B.3.10 Program Call ............................................................................................ B-12 B.3.11 Switch Sample..................................................................................
Maestro Software Manual Contents MAN-MAMSW (Ver. Q) D.2.3 Top-level Error Codes:............................................................................. D-2 CAN Communication Zone Errors ................................................................... D-4 D.3.1 Root-level Error Codes:............................................................................ D-4 D.3.2 Root-level Warning Codes: ..................................................................... D-5 D.3.3 Top-level Error Codes:.
Maestro Software Manual Contents MAN-MAMSW (Ver. Q) D.5.1.38 Error 0096......................................................................................... D-19 D.5.1.39 Error 0098......................................................................................... D-19 D.5.1.40 Error 0100......................................................................................... D-19 D.5.1.41 Error 0101.........................................................................................
Maestro Software Manual 1-1 MAN-MASSW (Ver. Q) Chapter 1: Introduction Elmo’s Maestro is a network-based multi-axis motion supervisor that operates in conjunction with Elmo intelligent servo drives to provide a full multi-axis motion control solution. The Maestro and the SimplIQ servo drives share the motion processing workload in a distributed motion control architecture. 1.
Maestro Software Manual Introduction MAN-MASSW (Ver. Q) 1.2 Supplementary Documents This manual is part of a documentation set that, together, can be used to set up and program the motion of any machine whose motors are controlled by Elmo SimplIQ servo drives. Before you can use this manual you will need to carefully follow the instructions in the Maestro Installation Guide to set up your Maestro.
Maestro Software Manual Introduction MAN-MASSW (Ver. Q) 1.3 Command Specification Commands for SimplIQ drives may be specified from the following sources: User program A program loaded to the servo drive via one of the communication options. After program execution begins, the program is managed by the drive. RS-232 Serial, point-to-point, short-range communication.
Maestro Software Manual 2-1 MAN-MASSW (Ver. Q) Chapter 2: Functional Overview This chapter takes a look at the organization of Maestro software. 2.1 Functional Block Diagram The Maestro’s functionality can be organized into the 5 groups shown below. The first group (Host Communications Services) contains the standard interfaces and protocols that enable the Maestro to communicates with the “outside world”.
Maestro Software Manual Functional Overview MAN-MASSW (Ver. Q) 2.2 Host Communications Services A host application can access the Maestro using either a TCP/IP or RS-232 services. Processes carried out through host communication include: Transfer of operating instructions (e.g.
Maestro Software Manual Functional Overview MAN-MASSW (Ver. Q) 2.5 Motion Manager The Motion Manager is the portion of the Kernel which provides services for the I/O and the following motion objects: Axis Group Vector 2.
Maestro Software Manual 3-1 MAN-MASSW (Ver. Q) Chapter 3: Host Communications This chapter explains how to set up the Workspace to work with a specific Maestro as a host. 3.1 Setting Up the Host through Elmo's Studio A Select Maestro pick list pops up when starting a new worksheet for the first time. The window contains a list of Maestros currently attached to the network. The IP Address of the Maestro and its name are listed. Select the Maestro you plan to work with and click OK.
Maestro Software Manual Host Communications MAN-MASSW (Ver. Q) 3.3 Choosing the Host through the Composer Select Start/Programs/Elmo/Composer to start Elmo's Composer and check the setup. 1. In the Welcome menu select the Open Communication Directly option. 2. In the Application Name and Communication Type dialog box check the TCP/IP Gateway option and click the Properties button. 3. In the Select Drive dialog you should see at least one Maestro in the Gateway list. Select it. 4.
Maestro Software Manual MAN-MASSW (Ver. Q) Chapter 4: General and Motion Instructions; Configuration Tools This chapter describes the Maestro input/output and motion objects, instructions and CAN configuration tools. The Maestro Multi-Axis Controller supports the following set of Input/Output Objects: • Internal Maestro I/O Objects: the Maestro has eight Digital Inputs, eight Digital Outputs and four Analog Inputs.
Maestro Software Manual General and Motion Instructions MAN-MASSW (Ver.
Maestro Software Manual General and Motion Instructions MAN-MASSW (Ver. Q) Axis Functions addpoint 2D, 3D & Group Vector Functions addcircle Group Functions plss_activate_bt m_din adddwell plss_config_bt m_din[] addline plss_config_nid m_dout addpoint plss_inq_addr m_dout[] plss_inq_nid m_ain[] plss_inq_product m_ain[].offset circle plss_inq_rev_num m_din.polarity, clears plss_inq_ser_num m_din.
Maestro Software Manual MAN-MASSW (Ver. Q) 4.1 General Functions Note: Entering a question mark from the terminal before any function name opens the help text for the function.
Maestro Software Manual General and Motion Instructions MAN-MASSW (Ver. Q) Function dynamicip – configures the Maestro Network Parameters to work with a DHCP Server (dynamic IP addressing) Call Format dynamicip Return Value EnableDHCP: 1 Limitations Terminal only.
Maestro Software Manual General and Motion Instructions MAN-MASSW (Ver. Q) Function hbperiod - set heartbeat control period Call Format hbperiod(int ,int) Parameters - the CAN bus number to use to send heartbeat messages - the interval between heartbeat messages in milliseconds (0– for cancel). Return Value OK or FAILED: Error message Example hbperiod(0,1000) – the system uses bus number 0 to send a heartbeat message every 1000 ms.
Maestro Software Manual General and Motion Instructions MAN-MASSW (Ver. Q) Function list - gets a list of all the Maestro objects. An object can be a motion object (axis, vector, etc.) or a virtual machine. Call Format list [-key:attribute] … [-key:attribute] Parameters: [-b:id] - get information for the specified CAN Bus [-n] - get information about nodes DS301 [-i] - get information about IO DS401 [-a[:attribute]] - get information about axes. Attributes: target object type.
Maestro Software Manual General and Motion Instructions MAN-MASSW (Ver. Q) Function message - post a message to the host computer (no timestamp) Call Format message(msgID, wParam, lParam) – posts a message without a timestamp Parameters msgID – user-defined message ID wParam, lParam – user’s message data (Unsigned integer type) Example message ( 0, a1.px, a2.
Maestro Software Manual General and Motion Instructions MAN-MASSW (Ver. Q) Function restart - Restarts the Maestro and: • Closes all existing objects • Kills all virtual machines • Restarts the Maestro kernel • Applies the sessions and objects according to the existing configuration file.
Maestro Software Manual General and Motion Instructions MAN-MASSW (Ver.
Maestro Software Manual General and Motion Instructions MAN-MASSW (Ver. Q) Function time - get (or set) the current time Call Format Time Limitations Terminal only Function tstamp - set the timestamp period Call Format tstamp(int ,int) Parameters which CAN bus sends the timestamp - specifies how many sync periods must pass before the new timestamp is set.
Maestro Software Manual General and Motion Instructions MAN-MASSW (Ver. Q) 4.2 Axis 4.2.1 Axis Motion Commands SimplIQ commands can be sent to the drive through the Maestro terminal or from a Maestro program. Motion Commands are described in detail in the SimplIQ Command Reference Manual. When a Motion Command is used to program the Maestro, its syntax is as follows: • To send a command to set a parameter value: .Command= • To receive a parameter: =.
Maestro Software Manual General and Motion Instructions MAN-MASSW (Ver. Q) Property ADT - Axis Delay Time – delay the start of the "do trajectory" (dotrj) command Explanation The ADT property defines when to start the trajectory and must be specified when dotrj commands are used. The default value is 20 ms. Dimension Milliseconds Default 20 Limitation 20-254 Type Unsigned integer Property AEL - CAN Encoder Low Limit Explanation AEL is needed when Axis works as a CAN Encoder slave.
Maestro Software Manual General and Motion Instructions MAN-MASSW (Ver. Q) Property AID – get axis ID Explanation Used to get the NodeID of an axis. For example, in a callback function the NodeID can be compared with a specific motion object so that something specific can be done in each case (event / NodeID). Limitation Read only Type Unsigned integer Example Function @input (BusID, NodeID, data) switch(NodeID) case a1.aid val=1 case a2.aid val=3 end end (see Appendix B.4.5.
Maestro Software Manual General and Motion Instructions MAN-MASSW (Ver. Q) Property APP – Axis Points in Portion - number of PVT points in portion of PVT trajectory Explanation Limits the number of PVT lines sent to a drive. The Maestro communicates with the drive first to see if space is available. Default 5 Limitation 3 – 10 Type Unsigned integer Property ATM – Axis Tabulated Motion– used to prepare the axis for PVT motion Explanation Prepares axis for PVT motion.
Maestro Software Manual General and Motion Instructions MAN-MASSW (Ver. Q) 4.2.3 Axis Functions Motion functions apply to Maestro programs only. Axis related functions are listed below: • To call a function: =.Function[([Parameters])] Function addpoint - add PVT point to user's trajectory sequence Call Format < Axis_name>.
Maestro Software Manual General and Motion Instructions MAN-MASSW (Ver. Q) Function error – to get motion object last error Call Format .isok Return Value OK: Ok () FAILED: Error message Example A2.error Function isok – used to verify motion object status Call Format .isok Return Value OK: Ok FAILED: Error status Example A2.
Maestro Software Manual General and Motion Instructions MAN-MASSW (Ver. Q) 4.3 Vector 4.3.1 Vector Motion Commands Vector commands can be sent simultaneously or serially according to VSM value simultaneously to a Vector or serially to individual axes (components of a vector). However, only the parcel sent serially to the axes provides a reliable check of operating performance results. When commands are sent individually, in a serial manner, the results of each motion can be checked.
Maestro Software Manual General and Motion Instructions MAN-MASSW (Ver. Q) Explanation Once the begin command is sent, the Vector motion begins after the delay specified by the VBT value. This command property is only valid when the sync command is used.
Maestro Software Manual General and Motion Instructions MAN-MASSW (Ver. Q) Property VFP –number of lines downloaded in the first portion of a PVT trajectory Explanation SimplIQ drives work according to information that is in their PVT table. If the table is empty they do not drive the motor. SimplIQ PVT tables have 64 lines. If the Maestro were to fill each drive serially, then motion could not start until after the last drive was loaded.
Maestro Software Manual General and Motion Instructions MAN-MASSW (Ver. Q) Property VNT – low limit of calculated PVT trajectory step time Explanation Set/get PVT trajectory min step time Dimension Milliseconds Default 2 Limitation 1–255 Type Unsigned integer See also VXT (max step time) Example (see Appendix B.1.6 Polygon Sample) Property VPE – calculated position error for PVT trajectory Explanation Difference between the theoretical trajectory and calculated trajectory.
Maestro Software Manual General and Motion Instructions MAN-MASSW (Ver. Q) Property VSD – PVT trajectory smooth distance from the corner point Explanation When using VSC smoothing mode 3, VSD defines the distance from the "corner" (point of change of trajectory) Dimension Counts Default 0 Example (see Appendix B.1.3.1 ) Property VSE – velocity at the end of a segment in a PVT trajectory Dimension Counts per second Default 0 Example (see Appendix B.1.3.
Maestro Software Manual General and Motion Instructions MAN-MASSW (Ver. Q) Property VTM – PVT motion initialization Explanation Used to prepare the vector for PVT motion when the trajectory is set for maximum velocity, fixed time or fixed velocity. VTM is used to initialize "ready-made" PVT tables as well as trajectories created with the Motion Library. Default 0 Limitation 0 – disable, 1 - enable Type Unsigned integer Example (see Appendix B.1.5.
Maestro Software Manual General and Motion Instructions MAN-MASSW (Ver. Q) Property VXT – high limit of the calculated PVT trajectory step time Explanation PVT trajectory maximum step time Dimension Milliseconds Default 10 Limitation 1–255 Type Unsigned integer See also VNT (min step time) Example (see Appendix B.1.6 Polygon Sample) 4.3.3 • Vector 2D Functions To call a function: =.
Maestro Software Manual General and Motion Instructions MAN-MASSW (Ver. Q) Function addpoint - add PVT point to user's trajectory sequence to a Vector Call Format .addpoint(int ,int ,int , int, int ) Parameters int , - position for PVT point (counts), int , - velocity for PVT point (counts per second), int - interpolation period for PVT point (milliseconds) 0 - 255 Return Value OK or FAILED : Error message Example Vec1.
Maestro Software Manual General and Motion Instructions MAN-MASSW (Ver. Q) Function clears - remove user's or polyline trajectory sequence in a vector motion object – erases previously sent commands before they are executed Call Format .clears() Return Value OK Example Vec1.
Maestro Software Manual General and Motion Instructions MAN-MASSW (Ver. Q) Function ends - closes a polyline trajectory sequence and a sequence of user defined PVT points Call Format .ends() Return Value OK or FAILED : Error message v1.startp(mytable) - begin the trajectory name mytable v1.addpoint(10, 1000, 20, 2000, 10) v1.addpoint(1000, 30000, 4000, 50000, 10) …………. v1.addpoint(5000, 1000, 4000, 2000, 10) v1.
Maestro Software Manual General and Motion Instructions MAN-MASSW (Ver. Q) Function splinee - closes a spline trajectory sequence for Vector2D and Vector3D objects Call Format .splinee() .splinee(int parameter) If parameter≠0 three PVT tables for axes X,Y and gear are built Return Value OK Example v1.splines(mytable) - begin the trajectory with file name mytable or FAILED : Error message v1.splinep(10, 1000) v1.splinep(1000, 30000) …………. v1.splinep(5000, 1000) v1.
Maestro Software Manual General and Motion Instructions MAN-MASSW (Ver. Q) Function startp - begin user’s PVT vector trajectory sequence Call Format .startp() .startp() Parameters - name of Vector PVT table (trajectory) to be saved Return Value OK Example V1.startp() - begin user’s PVT trajectory by saving the results in a file. or FAILED : Error message V1.
Maestro Software Manual General and Motion Instructions MAN-MASSW (Ver. Q) (counts), beginning of segment – current position Return Value OK or FAILED : Error message Example Vec1.addline(1000, 2000,400) Program examples can be found in Samples Tutorial – Motion Library Tutorial Examples – Vector 3D Function addpoint - add PVT point to user's trajectory sequence to a vector Call Format .
Maestro Software Manual General and Motion Instructions MAN-MASSW (Ver. Q) Return Value OK Example Vec1.clears() Function detach – cancel Vector synchronization Explanation Sometimes two vectors "share" an axis. If the axis was used simultaneously by both vectors, then errors will occur. Detach is used to free the axis from the vector with which it is working. Call Format < Vector name>.detach() or FAILED : Error message Return Value Ok or FAILED : Error message Example V1.
Maestro Software Manual General and Motion Instructions MAN-MASSW (Ver. Q) Function error – request info about the last error Call Format .isok Return Value OK or FAILED : Error message Limitation Terminal only Example V.error Function isok – used to verify if all is OK Call Format .isok Return Value OK Limitation Terminal only Example V.isok Function line - builds a linear trajectory from point to point Call Format .
Maestro Software Manual General and Motion Instructions MAN-MASSW (Ver. Q) Function splinep - adds a point to the sequence of points that defines the spline trajectory Call Format .
Maestro Software Manual General and Motion Instructions MAN-MASSW (Ver. Q) Parameters - name of Vector PVT table (trajectory) Return Value OK Example v1.trj(table); v1.bg or FAILED : Error message for vector name v1 run trajectory name “table ” Program examples can be found in Samples Tutorial – Motion Library Tutorial Examples – Vector 3D 4.4 Group 4.4.
Maestro Software Manual General and Motion Instructions MAN-MASSW (Ver. Q) Property GEH - CAN Encoder High Limit Explanation GEM is needed when Group works as CAN Encoder slave. The property provides Encoder limitations. Limitation 0-0x4000 Type Integer Property GEM - CAN Encoder interpolation time Explanation GEM is needed when Group works as CAN Encoder slave. The property provides mode initialization and interpolation (Sync) time definition.
Maestro Software Manual General and Motion Instructions MAN-MASSW (Ver. Q) Property GTM – Group Tabulated Motion – used to initialize PVT motion for all members of a group Explanation Used to prepare the group for PVT motion when the trajectory is set for maximum velocity, fixed time or fixed velocity. Send this before the PVT tables for each member of the group have been downloaded. Groups use "ready-made" PVT tables only (not trajectories created with the Motion Library).
Maestro Software Manual General and Motion Instructions MAN-MASSW (Ver. Q) Function isok – to verify motion object status Call Format .isok Return Value OK Example Grp.isok 4.4.
Maestro Software Manual General and Motion Instructions MAN-MASSW (Ver. Q) Function plss_config_bt(busID,baudrate) - sets the new bit timing on an LSS Slave … allows all LSS Slaves to be in configuration mode. busID CAN bus ID - possible value: 0, 1 Baud Rate bit timing period - possible value: 10,20,50,100,125,250,500,800,1000; Return Value "OK" or error code Function plss_config_nid(busID,nodeID) - used to configure the Node ID.
Maestro Software Manual General and Motion Instructions MAN-MASSW (Ver.
Maestro Software Manual General and Motion Instructions MAN-MASSW (Ver. Q) Function plss_sw_sel(busID,vendorID,productCode,revisionNum,serialNum) used to switch the a specific LSS Slave to configuration mode. busID CAN bus ID - possible value: 0, 1 vendorID Vendor ID of selected device (for Elmo - 154) productCode Product Code of selected device revisionNum Revision Number of selected device serialNum Serial Number of selected device Return Value “OK” or error code 4.
Maestro Software Manual General and Motion Instructions MAN-MASSW (Ver. Q) Function m_dout – set all Maestro digital outputs (internal digital output) Call Format m_dout Parameters None Example int outputData Function m_dout[] – set specific digital output (internal digital output) Call Format m_dout[output_num] Parameters output_num=0..
Maestro Software Manual General and Motion Instructions MAN-MASSW (Ver. Q) Function m_dout.polarity, m_dout.plr – used to define polarity of Maestro digital output Call Format variable = m_dout.polarity - get polarity value m_dout.
Maestro Software Manual General and Motion Instructions MAN-MASSW (Ver.
Maestro Software Manual MAN-MASSW (Ver. Q) Chapter 5: MAXL Program Language This chapter describes how to write Maestro programs using the MAXL programming language. 5.1 Lexical Conventions This section includes the fundamental elements of a MAXL (Multi Axis Language) program, as they are interpreted by the compiler. These elements, called “lexical elements” or “tokens”, are used to construct statements, definitions, declarations, and so on, which are used to make programs.
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) The preceding code will not compile because the compiler scans the input stream from the first /* to the first */ and considers it a comment. In this case, the first */ occurs at the end of the initial file string comment. The last */ is then no longer paired with an opening /*. Note that the single-line form (//) of a comment followed by end of line can have surprising effects.
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) 5.1.4 Punctuators Punctuators in MAXL have syntactic and semantic meaning to the compiler but do not, of themselves, specify an operation that yields a value. Syntax ! | % ^ & * ( ) - + = / [ ] ; : " < > , # The punctuators [ ] and ( ) must appear in pairs. 5.1.
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) Table 5-1 Operator Precedence and Associativity Operator Name or Meaning Associativity () Function call Left to right .
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) 5.1.6 Literals Invariant program elements are called “literals” or “constants.” The terms “literal” and “constant” are used interchangeably here. Literals fall into four major categories: integer, named constant, floating-point and string literals. Syntax literal : integer-constant named-constant floating-constant string-literal 5.1.6.
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) For example: i = 0x3fff; // Hexadecimal constant j = 0X3FFF; // Equal to i 5.1.6.2 Named Constant - #define and const. Constants must be declared in the “global declarations” section, i.e. before the first function. Named constants declared with #define are accessible only in the current program. Constants declared using const can be used by other programs. #define is used to declare named constants locally.
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) 5.1.6.3 Floating-Point Constant Floating-point constants specify values that must have a fractional part. These values contain decimal points (.) and can contain exponents. Syntax floating-constant : fractional-constant digit-sequence exponent-part // <> indicates option fractional-constant : . digit-sequence digit-sequence .
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) 5.1.6.4 String Literals A string literal consists of one or more characters from the source character set surrounded by double quotation marks ("). A string literal represents a sequence of characters that, taken together, form a null-terminated string. Syntax string-literal : "s-char-sequence" s-char-sequence : s-char s-char-sequence s-char s-char : any member of the source character set except the double quotation mark (") 5.
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) type name argument-list , type name type-specifier: int float Examples: int a,b // declaration global variables function run() // begin function declaration global int a // global variable declaration inside body of function int c // local variable declaration in function run() c=56 a=b+c // !!!error!!! variable b not declared in this function a=c+17 end function // end of function declaration 5.2.1.
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) 5.2.1.3 Definitions A definition is a unique specification of a function or callback. Because definitions must be unique, a program can contain only one definition for a given program element. 5.2.2 Program A program consists of one-translation unit. Execution, in concept, begins in the translation unit that contains the function run.
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) 5.2.3.2.2 return Operator Issuing a return operator from run is functionally equivalent to using the exit operator. Consider the following example: function run() int i …some code… if(i>2) exit return end if ...some code… end function The exit and return statements in the preceding example are functionally identical. 5.2.
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) MAXL supports two kinds of object attributes: • Command o Getter o Setter o Getter/Setter o Executer • Method 5.2.4.3 Debug string To facilitate the debugging process MAXL supports run-time debug messages. It is very similar to the TRACE macro in the MFC. The program places the TRACE operator inside MAXL program source code with formatted debug strings. This string will appear in the Elmo Studio when the program executes to this point.
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) • The type of result does not depend upon the type of operands. The result of a logical operation is either true (1) or false (0). • Operator ‘%’(modulo) is used only for integer operands. • Bitwise operators are used only for integer operands. 5.4 Expressions Expressions are sequences of operators and operands that are used for one or more of these purposes: • Computing a value from the operands.
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) An expression enclosed in parentheses is a primary expression whose type and value are identical to those of the unparenthesized expression. 5.4.1.1.1 Names In the MAXL syntax for primary-expression, a name is a primary expression that can appear only after the member-selection operators and names the attribute of an object. Syntax name : identifier object . attribute 5.4.1.
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) 5.4.1.2.1 Get Array Item Operator A postfix-expression followed by the "get array" element operator [ ], specifies array indexing. 5.4.1.2.2 Function-Call Operator A postfix-expression followed by the function-call operator, ( ), specifies a function call. The arguments to the function-call operator are zero or more expressions separated by commas — the actual arguments to the function. 5.4.1.
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) The following example illustrates the logical NOT operator (!): if( !(x < y) ) If x is greater than or equal to y, the result of the expression is 1 (true). If x is less than y, the result is 0 (false). Unary arithmetic operations on pointers are illegal. 5.4.1.4 Expressions with Binary Operators Binary operators act on two operands in an expression.
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) Syntax multiplicative-expression : expression * expression expression / expression expression % expression expression: multiplicative-expression The multiplicative operators take operands of arithmetic types. The modulo operator (%) has a stricter requirement in that its operands must be integer type. The multiplication operator yields the result of multiplying the first operand by the second.
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) 5.4.1.4.4 MAXL Shift Operators The bitwise shift operators are: • Right shift (>>) • Left shift (<<) These binary operators have left-to-right associativity. Syntax shift-expression : expression << expression expression >> expression expression: additive-expression Both operands of the shift operators must be integer types. The type of the result is the same as the type of the left operand.
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) 5.4.1.4.5 MAXL Relational and Equality Operators The relational and equality operators determine equality, inequality, or relative values of their operands. The relational operators are shown in the table below. Table 5-4 Relational and Equality Operators Operator Meaning == Equal to != Not equal to < Less than > Greater than <= Less than or equal to >= Greater than or equal to 5.4.1.4.5.
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) 5.4.1.4.5.2 Equality Operators The binary equality operators compare their operands for strict equality or inequality. Syntax equality-expression : expression == expression expression != expression expression: equality-expression The equality operators, equal to (==) and not equal to (!=), have lower precedence than the relational operators, but they behave similarly.
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) 5.4.1.4.6.2 Bitwise Exclusive OR Operator The bitwise exclusive OR operator (^) returns the bitwise exclusive OR of the two operands. All bits that are on (1) in either the left or right operand, but not both, are on in the result. Bits that are the same (either on or off) in both operands are off in the result.
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) 5.4.1.5.2 Logical OR Operator The logical OR operator (||) returns the integer value 1 if either operand is nonzero; otherwise, it returns 0. Logical OR has left-to-right associativity. Syntax logical-or-expression : expression || expression expression: logical-or-expression The operands to the logical OR operator must be an integer type. The operands are commonly relational or equality expressions.
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) 5.4.2 Semantics of Expressions This section explains when, and in what order, expressions are evaluated. 5.4.2.1 Order of Evaluation This section discusses the order in which expressions are evaluated but does not explain the syntax or the semantics of the operators in these expressions.
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) 5.5 Statements MAXL statements are the program elements that control how and in what order objects are manipulated. MAXL statements are executed sequentially, except when an expression statement, a selection statement, an iteration statement, or a jump statement specifically modifies that sequence. Syntax statement: declaration-statement labeled-statement expression-statement selection-statement iteration-statement jump-statement 5.5.
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) 5.5.1.2 Using Labels in the case Statement Labels that appear after the case keyword cannot also appear outside a switch statement. (This restriction also applies to the otherwise keyword.) The following code fragment shows the correct use of case labels: Syntax case (expression) Example: switch( cmd ) case(1) //begin motion axis.bg case(2) // motor On axis.mo = 1 case(3) // motor Off axis.mo = 0 otherwise // get motor status cmd = axis.
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) 5.5.2.2 The MAXL switch Statement The MAXL switch statement allows selection among multiple sections of code, depending on the value of an expression. The switch statement causes an unconditional jump to, into, or past the statement that is the “switch body,” depending on the value of the controlling expression, the values of the case labels, and the presence or absence of a otherwise label.
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) otherwise TRACE (“Error attribute ”) end switch The preceding code fragment shows how switch statements can be nested. The switch statement that selects on the value of cmdName is executed only if attribute is 1. The case labels for menu selections, 1 (BG) and 2 (MO=1), associate with the inner switch statement. 5.5.
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) 5.5.3.2 The MAXL for Statement The for statement can be divided into three separate parts, as shown in Table 5-6 Table for Loop Elements Syntax Name When Executed Contents Before any other element of the for statement or the substatement. Used to initialize loop indices. stepexpression Before execution of a given iteration of the loop, excluding the first iteration. Calculates iteration step.
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) break continue return goto identifier 5.5.4.1 The MAXL break Statement The break statement is used to exit an iteration statement. It transfers control to the statement immediately following the iteration statement. The break statement terminates only the most tightly enclosing loop. In loops, break is used to terminate before the termination criteria evaluate to 0.
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) labeled-statement: ##identifier 5.5.4.5 Declaration Statements Declaration statements introduce new names into the current function. Before using global variable inside function it must be declared by keyword global. Syntax declaration-statement: global type name-list type name-list type: int float name-list: name name-list , name Multiple declarations of the same name in the same function are illegal. 5.6 Functions 5.6.
Maestro Software Manual MAN-MASSW (Ver.
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) Examples: function int max_value = MAX_INT(int a, int b, int c) int max_a_b if(a>b) max_a_b = a else max_a_b = b end if if(max_a_b > c) max_value = max_a_b else max_value = c end if end function This function, named MAX_INT, has three integer input arguments (a, b, c) and one integer return argument (max_value). The function body includes one declarationstatement (local integer variable max_a_b) and two if-else statements.
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) 5.6.2 5-33 Built-in Functions Table 5-7 MAXL has predefined functions. Function Name Input Argument(s) Return Argument(s) Remarks sin float float cos float float tan float float asin float float acos float float atan float float exp float float Calculates the exponential function value of a floating-point number. pow float x, float y float Calculates the value of x raised to the power of y, x^y.
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) sync_coun t 5-34 SYNC messages. Default value 50. message int msgID, int data1, int data2 int Posts messages from the Maestro to the host computer. The user chooses the message ID according to logic of the application. Function returns 0 if the message was not accepted by even one listener. Otherwise returned value is equal to 1.
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) • • • @emcy(int nodeID, int first4bytes, int second4bytes) o NodeID – CAN node identifier [1,127]. o First4bytes – first 4 bytes CAN message data. o Second4bytes – last 4 bytes CAN message data. @emcy(int nodeID, int first4bytes) o NodeID – CAN node identifier [1,127]. o First4bytes – first 4 bytes CAN message data. @hbevent(int busID, int nodeID, int nodeState) – called when the CAN node state is changed.
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) Example: function @perror(int error_number) if(number == 1) TRACE (“Divided by zero! ”) end if restart end function 5.7 Virtual Machine Control Statements 5.7.1 wait control statement The wait keyword suspends the execution of the program until the specified time has elapsed. The expression may be within round parentheses or without parentheses. The expression specifies the waiting time in milliseconds.
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) 5.7.3 until control statement The until keyword suspends the execution of the program until the specified expression has a false value (0). Syntax until(expression) Example: function foo() // do something …… until(g_var>0) // program wait until g_var >0 end function 5.7.4 TRACE control statement To send messages from the virtual machine to Elmo Studio uses a program statement with a TRACE keyword.
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) Recipients of group commands All elements which are certain for the given group Only to switching-on nodes certain for the given group The same for both the Static and Dynamic group. The Maestro sends a command to all nodes, in the case of the Static Group, and to all switching-on nodes, in the case of Dynamic Group, and waits for a response. Command Control Initialization of several groups The same node can belong to various groups.
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver.
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) 5.9 5.9.1 Static Variables Static Variable Definition Static Variable is a Maestro Kernel Object for data encapsulation. Properties: 1. The Workspace is the Static Variable owner 2. The Scope of a Static Variable is all programs in the current Workspace 3. A Static Variable can be a simple variable or an n-dimension array 4. A Static Variable can be an INT and FLOAT type and can be up to 64 kBt (16000 INT or FLOAT members) 5.9.
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) 5-41 4. The following dialog box will open for a single Static Variable (Figure 5-4). The user can select a variable type – INT or FLOAT- and a unique variable name. For Static Array creation, the user can mark the “Create Array” check box (Figure 5-5) and select the array size in the list box at the bottom of dialog.
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) 2. Set Static Variable syntax [Static Variable Name] = [const value, expression] [Static Variable Name][index] = [const value, expression], where index need if Static Variable is qn array. For example: fVar = 5.23 iArr4[0] = 3 iArr34[1, 2] = a2.px 5.9.4 Working with Static Variables in the Maestro Program Interpreter 1.
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) For example: if(iVar == 10 ) … end if while(iArr[0] ) … end while 1. The Static Variable cannot be used in the for statement as a loop variable (to improve program performance). The Static Variable can use loop variable as index. 2. In the current version, the Static Variable can not be used in waitvar statement Static Array size can be obtained by property size: [Static Array Name] . size or [Static Array Name] .
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) 5.10 Maestro User Program Priority Every Maestro User Program has an assigned priority. By default, each Maestro User Program is assigned the Normal (2) priority. A Maestro User Program can have one of the priority values described in Table 5-9. Note: This feature does not impact the compatibility of previous Maestro versions.
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) The following code example compares how the Maestro Program Priority feature affects program scheduling. Entry point of Task1. Program with Task Priority Undefined When Maestro User Program Priorities are not defined for the tasks, the results are variable and unpredictable because Tasks 1 and 2 run simultaneously.
Maestro Software Manual 6-1 MAN-MASSW (Ver. Q) Chapter 6: The Maestro API Abbreviations MAS/MAC – Multi Axes Supervisor/Multi Axes Controller synonyms for the Maestro Interfaces: API – (Application Program Interface) Set of functions that enables a user’s program to have communication and other requests with the Maestro and the connected subset drives. PVT – Position Velocity Time, motion method commonly used by the Maestro to perform a movement.
Maestro Software Manual The Maestro API MAN-MASSW (Ver. Q) Return Value: int - initialization status: 0 OK; 1 The API library is already initialized; 2 The COM library is already initialized on this thread; 3 A previous COM initialization specified a different apartment model for this thread; 4 The COM library initialization failed; 5 The MAS Events mechanism initialization failed; Use MAC_GetLastError to retrieve the error string.
Maestro Software Manual The Maestro API MAN-MASSW (Ver. Q) 6.3 MAC_CreateTCPConnection This function enables the user to initiate TCP/IP communication with the Multi-axes supervisor.
Maestro Software Manual The Maestro API MAN-MASSW (Ver. Q) 6.4 MAC_CreateRS232Connection Note: This interface is not implanted yet. This function enables the user to initiate RS232 communication with the Multi-axes supervisor.
Maestro Software Manual The Maestro API MAN-MASSW (Ver. Q) 6.5 MAC_CloseConnection This function enables the user to close communication Syntax: int MAC_CloseConnection( COMMUNICATION_HANDLE hCommunication ) Input Parameters: COMMUNICATION_HANDLE hCommunication Return Value: int Close connection status: 0 OK; 1 The API library is not initialized; 2 Zero Communication handle; 3 Bad Communication handle; Use MAC_GetLastError to retrieve the error string.
Maestro Software Manual The Maestro API MAN-MASSW (Ver. Q) Output Parameter: String for response receiving. LPTSTR szOut Return Value: Int Error Value: 0 >0 OK Communication error codes, user may use MAC_GetLastError to retrieve the error string.
Maestro Software Manual The Maestro API MAN-MASSW (Ver. Q) 6.8 MAC_GetDevice This function enables the user to get Multi-axes supervisor parameters Syntax: int MAC_GetDevice( UINT uNum, LPTSTR szIP, LPTSTR szName ); Input Parameters: UINT uNum Device number in this search results Output Parameter: LPTSTR szIP - IP address of supervisor (string with length 16 bytes minimum). LPTSTR szName - Name of supervisor (string with length 32 bytes minimum).
Maestro Software Manual The Maestro API MAN-MASSW (Ver. Q) 6.10 MAC_IsDevicePresent This function enables the user to check Multi-axes controller IP address Syntax: int MAC_IsDevicePresent ( LPCTSTR cszHost, DWORD* pdwIP ); Input Parameters: LPCTSTR cszHost - Host name or IP Address of controller. Output Parameter: DWORD* pdwIP - IP address of controller (NULL, if is Host not found).
Maestro Software Manual The Maestro API MAN-MASSW (Ver.
Maestro Software Manual The Maestro API MAN-MASSW (Ver.
Maestro Software Manual The Maestro API MAN-MASSW (Ver. Q) 6.13 MAC_DownloadTrajectory This function enables the user to download trajectory to Multi-axes supervisor A trajectory is a text file that contains a sequence of PVT points, created by the user. Syntax: int MAC_DownloadTrajectory( COMMUNICATION_HANDLE hCommunication, LPCTSTR cszLocalPath ); Input Parameters: COMMUNICATION_HANDLE hCommunication Multi-axes supervisor communication handle.
Maestro Software Manual The Maestro API MAN-MASSW (Ver. Q) 5 Remove Trajectory failed; Use MAC_GetLastError to retrieve the error string. Sample: int retVal = MAC_RemoveTrajectory( hCom, _T("MyTrj") ); 6.15 MAC_DownloadProgram This function enables the user to download program to Multi-axes supervisor Syntax: int MAC_DownloadProgram( COMMUNICATION_HANDLE hCommunication, LPCTSTR cszLocalPath ); Input Parameters: COMMUNICATION_HANDLE hCommunication Multi-axes supervisor communication handle.
Maestro Software Manual The Maestro API MAN-MASSW (Ver. Q) int - Error value: 0 OK, > 0 communication error codes: 1 The API library is not initialized; 2 Zero Communication Handle; 3 Bad Communication Handle; 4 Unable to create interface ITNElmoPublic; 5 Remove Program failed ; Use MAC_GetLastError to retrieve the error string. Sample: int retVal = MAC_RemoveProgram( hCom, _T("*") ); 6.17 MAC_DownloadResources This function enables the user to define new resources for Multi-axes supervisor.
Maestro Software Manual The Maestro API MAN-MASSW (Ver. Q) 6.18 MAC_DownloadResourcesEx This function enables the user to define new resources for Multi-axes supervisor. Syntax: int MAC_DownloadResourcesEx( COMMUNICATION_HANDLE hCommunication, LPCTSTR cszLocalPath, LPCTSTR cszLocalMWDPath, BOOL bRestart ); Input Parameters: COMMUNICATION_HANDLE hCommunication - Multi-axes supervisor communication handle. LPCTSTR cszLocalPath Path to resources file on desktop computer.
Maestro Software Manual The Maestro API MAN-MASSW (Ver. Q) LPCTSTR cszLocalPath Path to log file on desktop computer. Return Value: int - Error value: 0 OK, > 0 communication error codes: 1 The API library is not initialized; 2 Zero Communication Handle; 3 Bad Communication Handle; 4 Unable to create interface ITNElmoPublic; 5 Upload Log failed; Use MAC_GetLastError to retrieve the error string. Sample: int retVal = MAC_UploadLog( hCom, szPath ); 6.
Maestro Software Manual The Maestro API MAN-MASSW (Ver. Q) 4 Unable to create interface ITNElmoPublic; 5 SimpleIQ Firmware file downloading failed; 6 Unable to start firmware update process; Use MAC_GetLastError to retrieve the error string. Sample: int retVal = DownloadSimpleIQFirmware( hCom, _T(“*”), szPath ); 6.
Maestro Software Manual The Maestro API MAN-MASSW (Ver. Q) int nOk = MAC_InitEvents(); 6.23 MAC_DeinitEvents This function enables the user to close MAS Event mechanism Syntax: Void MAC_DeinitEvents(); Sample: MAC_DeinitEvents(); 6.
Maestro Software Manual The Maestro API MAN-MASSW (Ver. Q) int MAC_RegInterruptCallback ( COMMUNICATION_HANDLE hCommunication, MAC_ONUSER_INTERRUPT ptrCB); Input Parameters: COMMUNICATION_HANDLE hCommunication Multi-axes supervisor communication handle. MAC_ONUSER_INTERRUPT ptrCB – interrupt user's callback.
Maestro Software Manual The Maestro API MAN-MASSW (Ver.
Maestro Software Manual The Maestro API MAN-MASSW (Ver. Q) 5. Unable to open SimpleIQ application file; 6. Application file is empty; 7. Unable to read application file; 8. Unable to find version; 9. Unable to read version; 10. Unable to find parameters; 11. Unable to read parameters; 12. Unable to verify versioning capability; 13. Incompatible versions; 14. Difference versions: need to call Application Editor; 15. Unable to load application; 200. Download SimpleIQ device parameters failed: 201.
Maestro Software Manual The Maestro API MAN-MASSW (Ver. Q) Return Value: int - Error value: 0 OK, > 0 communication error codes: 1. The API library is not initialized; 2. Zero Communication Handle; 3. Bad Communication Handle; 4. Unable to create interface ITNElmoPublic; 5. Unable to open SimpleIQ application file; 6. Application file is empty; 7. Unable to read application file; 8. Unable to find version; 9. Unable to read version; 10. Unable to find parameters; 11. Unable to read parameters; 12.
Maestro Software Manual 7-1 MAN-MASSW (Ver. Q) Chapter 7: RS-232 Protocol Specification 7.1 Send Command to Maestro The Maestro receives commands in the following format for RS-232 communication: [Command In] [’\r’] The command from the host to the Maestro consists of a command string and carriage return at the end. Definitions: [Command In] – ASCII character array (command string) includes a Maestro command [‘\r’] – Apply the command symbol (ASCII character code CR, hexadecimal value 0x0D) 7.
Maestro Software Manual RS-232 Protocol Specification MAN-MASSW (Ver. Q) Parsing of Maestro’s sample response: CString Input; // Maestro response string … //1 - new line removing int n = Input.Find( "\r\n" ); while( n != -1 ) { if( n == 0 ) { Input = Input.Right( Input.GetLength() - 2 ); } else { CString left = Input.Left( n ); CString right = Input.Right( Input.GetLength() - n - 2 ); Input = left + right; } n = Input.Find( "\r\n" ); } //2 - prompt ‘>’ removing Input = Input.Left( Input.
Maestro Software Manual MAN-MASSW (Ver. Q) Chapter 8: The Recorder Elmo's Recorder is used to record actions and events on the axes connected to SimplIQ drives. This is particularly useful with the Maestro, as the movements of several axes can be recorded simultaneously. The results can then be used to debug applications and to track performance. 8.1 Accessing the Recorder Before accessing the Recorder, the axes in the Maestro must be pre-defined. The Recorder can be started by clicking its icon.
Maestro Software Manual The Recorder MAN-MASSW (Ver. Q) Once communications have been established, choose the signals to record from the pick list that opens under each axis (as shown in the figure below) or for all axes (with using the Context menu). The next step is to choose the length of time to record and the resolution of the recording. These numbers are related as there is a limit to how much can be recorded. User can to change Signals for recording in the Mapping dialog box (see Fig. 8-3).
Maestro Software Manual The Recorder MAN-MASSW (Ver. Q) C) Window : Set the trigger and enable High and Low levels. The trigger will be recorded when the source signal crosses the chosen levels, as follows: • • • • The signal crosses the Low level twice. The signal crosses the High level twice. The signal crosses the Low level once and then crosses the High level. The signal crosses the High level once and then crosses the Low level. Start the recording by clicking the Record ( ) button.
Maestro Software Manual The Recorder MAN-MASSW (Ver. Q) Figure 8-7: Choosing the Type of Display The Scope is a graphic display tool that enables you to view the data that has been recorded by the motion monitor. It displays multiple recorded vectors in the same window or in separate windows, and can generate new data vectors by applying arithmetic operations on the existing data vectors. You may use the scope to view and analyze recorded motions, zooming in and out of the graphs.
Maestro Software Manual 9-1 MAN-MASSW (Ver. Q) Chapter 9: The CANopen Configurator The CAN bus configuration tools, listed below, are based on CiA DS305 CANopen Layer Setting Services (LSS) services and protocols. The tools were created to enable the following parameters to be read and changed through the network: • • The CANopen Node ID The CAN bus baud rate The CANopen Configurator can be used when the Maestro is the LSS Master and all the nodes that are on the CAN bus are LSS Slaves.
Maestro Software Manual The CANopen Configurator MAN-MASSW (Ver. Q) Figure 9-1: Microsoft .NET Download Page When the File Download dialog box (Figure 9-2) is displayed, select Run to load the program. Several windows open in sequence. Provide the relevant response for each query to load and run the program. Figure 9-2: Microsoft .
Maestro Software Manual The CANopen Configurator MAN-MASSW (Ver. Q) 9.2 CANopen Configurator GUI After installing the CANopen Configurator, a new icon will appear on your desktop. Click on the icon to open the CANopen Configurator. The CANopen Configurator User Interface is displayed: Figure 9-3: The CANopen Configurator User Interface 9.3 Connecting to a Maestro If a Maestro is connected to the same network as your PC, the CANopen Configurator is able to find it.
Maestro Software Manual The CANopen Configurator MAN-MASSW (Ver. Q) After choosing a Maestro, the bus baud rate of each bus can be changed. The CANopen Configurator obtains the LSS address and Node ID of all nodes on the bus and analyzes their settings. To change the CAN bus baud rate, 1. Click inside the Baud Rate field to obtain a drop-down list of baud rates. 2. Select a baud rate from the list. 3. Open the Apply menu and select the Apply Configuration option.
Maestro Software Manual The CANopen Configurator MAN-MASSW (Ver. Q) Adding and Deleting Nodes The CANopen Configurator Edit menu is used to add or delete nodes in the CAN nodes set. Nodes can be saved to a file ( ) or uploaded from a file ( ). The user must select the node type (with/without DS305 protocol support), CAN bus, node ID and LSS address. The reserved node option is used to create a table entry for a node that is not under the control of the Maestro device.
Maestro Software Manual The CANopen Configurator MAN-MASSW (Ver. Q) 9.4.3 Exporting a Node Set To store (export) a CAN node set, navigate to the File > Nodes Set Export option. Figure 9-11: Storing a CAN Node Set CAN node set file example:
Maestro Software Manual The CANopen Configurator MAN-MASSW (Ver. Q) Node IDs, LSS addresses and the CAN bus baud rate can be changed with the tools included in the CANopen Configurator. If a conflict or error is found, changes are made manually. Once the changes are applied via the Apply > Apply Configuration option, they can be verified with the Verify Configuration tools: • Apply > Verify Configuration > Offline Verification or, • Apply > Verify Configuration > Online Verification .
Maestro Software Manual The CANopen Configurator MAN-MASSW (Ver. Q) Note: The Online Verification tool can be used to find a node that does not have a current device ID configured. Example: In the case where a node is changed and the configuration file is loaded (File > Node Set Import), the Online Verification tool recognizes the node and marks it as invalid because it has not yet been defined in the current configuration.
Maestro Software Manual The CANopen Configurator MAN-MASSW (Ver. Q) 9.7 CANopen Configurator Options The CANopen Configurator adjustment parameters make it possible for the user to change the features via the Options dialog box (Figure 9-15). This dialog box is accessed from the Edit > Options menu , or via the Ctrl+P keystroke combination. Figure 9-15: CANopen Configurator Options 9.7.
Maestro Software Manual The CANopen Configurator MAN-MASSW (Ver. Q) • CAN bus baud rate (for bus 0 and bus 1) defines the baud rate for the LSS master initialization during auto connection with the device. The property is available only if the auto connect property is set to YES. Auto identification after connection to Maestro device defines the program behavior when communication with the target Maestro device is established.
Maestro Software Manual The CANopen Configurator MAN-MASSW (Ver. Q) • Default CAN Nodes Set defines the path to file for a manually collected set of reserved CAN nodes (without DS305 support) for user configuration. Figure 9-18: Contextual Menu for Default CNS File Path Browsing Path to CAN Nodes Set file specifies the path to a CAN Nodes Set (CNS) file (*.cns) with reserved CAN nodes.
Maestro Software Manual MAN-MASSW (Ver. Q) Chapter 10: Axis DS402 Command Reference CiA DSP 402 is the device profile for drives and motion control. The profile defines the functional behavior of controllers for servo drives, frequency inverters and stepper motors. The specification includes a state machine description of the drive. A single state represents a special internal or external behavior. The state of the drive also determines which commands are accepted.
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) Object Index and Subindex Full command Short command Elmo short command Description 0x6060, 0x00 OperationMode opm - Select operation mode. Command using: a1.
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) 10.1.1 Device State Machine Control The state of the device is controlled by the controlword and the status of the device is indicated by the statusword.
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver.
Maestro Software Manual DS402 Command Reference 10-5 MAN-MASSW (Ver. Q) FAULT REACTION ACTIVE From this state: Operation 15 - far, FaultReset command for all motion objects User can send controlword by command cwd, ControlWord.
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) Commands using: g1.cwd=0x0F, a1.div, a1.QuickStop, v1.bg Current device state transition can be obtained for the Axis by using the command swd, StatusWord. The command wswd, WaitStatusWord can be used while waiting for the statusword change.
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) 10-7 10.1.2 State Machine Operation Reactions The following state machine operation reactions are possible: • Shutdown operation reaction Object Index and Subindex Full Command Short Command Elmo Short Command 0x605B, 0x00 ShutdownReaction sdnr - Description Shutdown operation reaction Command using: a1.
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) • 10-8 Operation disable reaction Object Index and Subindex 0x605C, 0x00 Full Command Short Command Elmo Short Command OperationDisableReaction opdr - Description Operation disable reaction Command using: a1.
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) 10-9 An action should be selected from the following: Value Description -32,768…-1 Manufacturer specific 0 Disable drive function 1 Slow down on slow-down ramp 2 Slow down on quick-stop ramp 3 Slow down on current limit (tq mode only) 3…32,767 Reserved 10.1.
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver.
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) 10-11 For IP and PP operation modes psw(PositionWindow) and pswt(PositionWindowTime) parameters should be set before motor on operation. These parameters are necessary for the target reached event. For PV operation mode these parameters are pvt(VelocityThreshold), pvtt(VelocityThresholdTime), pvw(VelocityWindow) and pvwt(VelocityWindowTime). For more, see the CiA DS402 Manual. 10.1.
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) 10.2 10-12 Profile Position (PP) Mode This section describes how to set point-to-point (PTP) movement under a profiled position where a target position is applied to the trajectory generator. The trajectory generator input includes profiled velocity, acceleration, deceleration as well as selection of motion type, motion polarity and stopping option.
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) Object Index and Subindex 10-13 Full Command Short Command Elmo Short Command 0x606C, 0x00 ProfileActualVelocity pav vx Profile actual velocity (for Axis only) 0x6040, 0x00 - - pa Absolute target position macrocommand 0x6041, 0x00 The Control word and data record are sent by PDO4. (See Section 11.8 DS402 PDO Mapping Table).
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver.
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) One of following command sequences can implement profile position motion. • Motion organization without callback using: Example 1.1 function run() int val sync( 0, 10 ) a1.opm=1 //work with DS402 motion object required sync mechanism //select operation mode for axis a1 a1.ato=10000 a1.prv=2000 a1.pac=10000000 a1.pdc=10000000 a1.qsdc=10000000 a1.psw=100 a1.
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) a1.pa=20000 a1.bg //set absolute target position value //start motion until(g_nStatus != 0) //waiting for global variable a1.mo=0 end function //motor off command // motion completed callback function @motioncompleted(int busId, int objId) global int g_nStatus g_nStatus = objId //global variable value changing end function 10.2.2.
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) 10.2.2.3 Features of Profile Position Operating Mode Using for Group (Vector) Profile position motion for the DS402 Group (Vector) can be implemented by the following command sequence: function run() int val sync( 0, 10 ) //work with DS402 motion object required sync mechanism g1.opm=1 //select operation mode for group g1 g1.gto=10000 g1.prv=2000 g1.pac=10000000 g1.pdc=10000000 g1.qsdc=10000000 g1.psw=200 g1.
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver.
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) As shown in section A of the diagram above, all synch periods have two stages- CAN node operation time and synchronous command time. Section B shows that the Maestro can send asynchronous commands without synchronization. Section C shows how the Maestro sends synchronous commands. Section D shows the time sequence of group commands for profile position mode.
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) 10.3 10-20 Profile Velocity (PV) Mode This section describes how to set profile velocity movement when a target velocity is applied to the trajectory generator. For a more detailed description of DSP 402 PV Mode, see Profile Velocity of “Elmo CANopen DS 402 Implementation Guide”. 10.3.
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) • vmc - motion completed callback control Group properties in PV mode: • gnv - negative velocity polarity • gto - status word waiting timeout • gwm - motion completed waiting • gmc - motion completed callback control 10.3.
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) 10.3.3 Profile Velocity Mode Commands Description The velocity controller calculates a torque variable. When a different value arrives, it is executed immediately. When receiving the command a1.jv=newVelocity, the DS402 Axis immediately starts trying to reach the set speed. The direction can be reversed by the anv property (vnv, gnv for DS402 Vector and Group accordingly).
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) Figure 10-7: Profile Velocity Command Time Diagram The process is similar to the one described in the Profile Position Section except that the node begins to apply a new velocity profile after the new data is sent. Command ptv is a synchronous command but all members of the Group (Vector) can only receive the same value of target velocity.
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) 10.4 Interpolated Position (IP) Mode The Interpolated position mode is used to control multiple coordinated axis objects (DS402 Vector, Group) or a single axle objects (DS402 Axis) with the need for time interpolation of position data. The interpolated position mode normally uses time synchronization mechanisms like the sync mechanisms for time coordination between the related motion objects.
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) Figure 10-9: Interpolation Position Mode States Diagram • • Interpolation inactive- The device is in a state of OPERATION ENABLE and interpolated position mode is selected. The drive unit accepts input data and buffers it for interpolation calculations but it does not move the axles.
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) 10-26 10.4.1 Interpolated Position (IP) Commands Note: Set and get commands are allowed for Axis objects and only set commands are allowed for the Vector and Group objects.
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) Object Index and Subindex Full Command Short Command Elmo Short Command 10-27 Description position 0x60C4, 0x06 InterpolationBufferAccess ipba - Interpolation buffer access 0x60C3, 0x01 InterpolationSyncCount ipsc - Interpolation sync count 0x60C4, 0x06 InterpolationQueueReset ipqr - Interpolation queue reset. The command clears interpolation buffer of node and interpolation data queue of the motion object.
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) 10.4.2 Using Interpolated Position Commands 10.4.2.1 Implementing Interpolated Position Motion Figure 10-10: Interpolated Position Motion Algorithm One of following command sequences can implement profile position motion. • Motion organization without the last point automatically sends: #define ip_time 10 function run() int i sync( 0, ip_time ) a1.
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) a1.ipqp=100 a1.ipa=1 //push position to IP queue //IP mode activation for i=2:100 a1.ipqp = i*100 //push position to IP queue end a1.ipqp = (i - 1)*100 a1.awm a1.
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) 10.4.2.2 Interpolated Position Mode Commands Description The DS402 Axis supports two types of interpolation: • Linear interpolation (default) – ipsm=0 • Cubic spline interpolation – ipsm=-1 Linear interpolation requires only the position specified in the data record (can be defined by ipdr command or by DS402 using Axis interpolation queue).
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) In cubic spline interpolation, the user specifies both the position and the speed at each point in time. The drive constructs the motion path to be at the given time, position and speed as is shown in the figure below. Spline interpolation can yield a more accurate path specification with fewer time points but it requires care in constructing the speed data.
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) Ring Buffer: If the buffer is structured as a ring, the host can place an interpolation data record into any valid position in the ring by changing the pointer defined in the buffer position. If the buffer position is not changed, all data records are written in the same location. The drive reads the next entry out of the buffer using an internal ring pointer.
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) Data transfer from the DS402 Axis interpolation queue to the servo is carried out automatically with synchronization under Sync messages for all objects on the CAN bus.
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) Figure 10-14: IP motion CAN Messages Diagram Command ip (ipa, InterpolationActive) is a synchronous command so that the command performance (CW and data record sending) begins only during the next sync period. The next sync moves the current position to the interpolation mechanism of the servo drive. The first point from the Axis IP queue is located in the IP buffer of the drive.
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) 10.4.2.3 Features of Interpolated Position Operating Mode Using for Group (Vector) Interpolated position motion for Group (Vector) DS402 can be implemented by the following command sequence: #define ip_time 10 int g_nStatus, g_nPointX, g_nPointY function run() //global variable definition global int g_nStatus, g_nPointX, g_nPointY sync( 0, ip_time ) g1.
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) • 10-36 If the interpolation data is generated by the user, then the last point should be sent twice if the user wants to stop motion with speed 0. 10.5 Homing (HM) mode Homing mode gives an opportunity to a DS402 Axis to seek the home position (also called the datum, (reference point or zero point).
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver.
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) The following command sequences can implement homing motion: function run() sync( 0, 10 ) a1.opm=6 //work with DS402 motion object required sync mechanism //select operation mode for axis a1 a1.ato=10000 a1.psw=100 a1.pswt=2 //statusword waiting timeout //define position windows //define position windows time a1.mo=1 //motor on command a1.hac=5000000 //homing acceleration a1.hsv=5000 //speed during search for switch a1.
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) a2.hof=-100 g1.hom=1 g1.hm=1 g1.awm g1.mo=0 end function 10-39 //homing offset definition for axis a2 //homing method definition //HM mode activation //wait for motion completed (bit 10 of SW is ON) //motor off command HP mode activation (hp) command for compound motion objects is synchronous under Sync messages. 10.
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) Commands using: a1.mrc=1000 a1.pmxc=1000 a1.pts=500 a1.ptt=200 torq=a1.
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) end while a1.ptt=0 end function 10.6.2.2 //target torque 0 Description of the Profiled Torque Mode Command Profiled Torque mode implementation on the SimplIQ family of digital servo drives: • Works with linear ramp torque profile only (TorqueProfileType=0).
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) 10.6.2.3 Using the Profiled Torque Mode for a Group (Vector) Profiled Torque motion for the DS402 Group (Vector) can be implemented by the following command sequence: function run() sync( 0, 10 ) //work with DS402 motion object required sync mechanism g1.opm=4 //select operation mode for group g1 g1.mo=1 //motor on command g1.mrc=1000 //motor rate current g1.pmxc=1000 //profile max current g1.pts=500 //profile torque slot g1.
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver.
Maestro Software Manual MAN-MASSW (Ver.
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver.
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver.
Maestro Software Manual MAN-MASSW (Ver.
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver.
Maestro Software Manual MAN-MASSW (Ver.
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver.
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver.
Maestro Software Manual MAN-MASSW (Ver.
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver.
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver.
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver.
Maestro Software Manual MAN-MASSW (Ver.
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) 10.
Maestro Software Manual 11-1 MAN-MASSW (Ver. Q) Chapter 11: Ethernet IP Communication “Ethernet Industrial Protocol”, or EtherNet/IP (EIP), defines an open industrial standard that extends the classic Ethernet with an industrial protocol. EtherNet/IP was developed by ControlNet International (CI) and the Open DeviceNet Vendor Association (ODVA) in collaboration with the Industrial Ethernet Association (IEA). EtherNet/IP is an application level protocol implemented on top of EtherNet TCP/UDP/IP.
Maestro Software Manual Ethernet/IP Communication MAN-MASSW (Ver. Q) 11.1 Terms and Abbreviations • Ethernet/IP device characterized by the unique network address (e.g.
Maestro Software Manual Ethernet/IP Communication MAN-MASSW (Ver. Q) 11.3 Product Classes The Maestro implements the Ethernet/IP Adapter and Message class functionality over an Ethernet/IP network. The Adapter Class and Message Class Ethernet/IP implementation includes following features: 1. UCMM (unconnected) messaging from client to server 2. Class 1 (I/O) connection server (Assembly object) 3. Class 3 (connected) messaging server Figure 11-2: Message Transport Classes Supported by Ethernet/IP 11.
Maestro Software Manual Ethernet/IP Communication MAN-MASSW (Ver. Q) Figure 11-3: Add a New Module 2. Select module type “Generic Ethernet Module” (see Figure 11-3) Figure 11-4: Select a New Module Type 3.
Maestro Software Manual Ethernet/IP Communication MAN-MASSW (Ver. Q) Figure 11-5: Set the Module Properties 4.
Maestro Software Manual Ethernet/IP Communication MAN-MASSW (Ver. Q) 11.4.2 Ethernet/IP Adapter (Maestro) Activation To conserve system resources in cases where the protocol is not required, the Maestro systems power up without Ethernet/IP support by default. The user must specifically select his option from the user interface. After specifying the option, the Maestro must be re-started.
Maestro Software Manual Ethernet/IP Communication MAN-MASSW (Ver. Q) Figure 11-10: Remove Adapter Tag 11.5 11.5.1 UCMM (Unconnected) Messaging Server (Maestro) UCMM (Unconnected) Messaging Maestro client functionality allows sending unconnected messages to the scanner (Rockwell) device. In order to use it, the Ethernet/IP device resource and appropriate tags must be created. Tags have to be created with the same names defined on the scanner (Rockwell) device side. 11.5.1.
Maestro Software Manual Ethernet/IP Communication MAN-MASSW (Ver. Q) 5. Click on OK to complete the operation. The Workspace window of the EIP View page will appear as follows: Figure 11-12: EIP Adapter 6. To create device’s tags, use the context menu Add Tag. The following dialog box will open: 7. In the Tag Name field, enter the tag name used for Read/Write. 8. In the Tag Type field, select the appropriate type (BOOL, SINT, INT, DINT, REAL). Use the Tag Dimension field to define the tag as an array.
Maestro Software Manual Ethernet/IP Communication MAN-MASSW (Ver. Q) For example: >dev1.tINT >20 >dev1.iTag34[1,1] >5 >dev1.iTag4 >1,2,3,4 Set Tag syntax is [Device Name] . [Tag Name] = [const value, const value array, expression] [Device Name] . [Tag Name][index] = [const value, const value array, expression] where index need if tag is array. For example: >dev1.tINT = 5 >5 >dev1.iTag34[1,1] = ( a1.px * 2 ) / 10 >120 >dev1.iTag4=”1,2,3,4” >1,2,3,4 11.5.1.2.
Maestro Software Manual MAN-MASSW (Ver. Q) Ethernet/IP Communication 11-10 int i, j, n … dev1.tINT = 5 dev1.iTag4[0] = j dev1.iTag34[i, j] = n Device’s Tag can be used in logical operations if, switch, while, etc., for example: if( dev1.tINT == 10 ) … end if while( dev1.iTag[0] ) … end while 11.5.2 Client (Rockwell) Messaging Support The Maestro device implements a messaging server.
Maestro Software Manual Ethernet/IP Communication 11-11 MAN-MASSW (Ver. Q) Figure 11-14: Set Attribute Single Message Configuration(RSLogix5000) 11.5.2.1 Figure 11-15: Get Attribute Single Message Configuration(RSLogix5000) User interface to create communication objects To use the Assembly object, create an Ethernet/IP Assembly using ELMO Studio which offers the following user interface: 1. In the Workspace window, select the EIP View page. 2. Use context menu to Add Assembly as it shown Fig 11-6. 3.
Maestro Software Manual Ethernet/IP Communication 11-12 MAN-MASSW (Ver. Q) Figure 11-17: Add Assembly Dialog with Members' Collection 7. Press on the New* field in the Assembly Members' table for member parameter definitions: name, ID and type. If BITARR (bit array) is selected, enter the size of the array in bits. Offset is calculated automatically. 8. Press OK to add the current Assembly to Workspace To remove the Assembly, use the context menu shown below in Fig. 11-17.
Maestro Software Manual Ethernet/IP Communication 11-13 MAN-MASSW (Ver. Q) Get Assembly member syntax is [Assembly Name] . [Member Name] = [const value, expression] [Assembly Name][Member Index] = [const value, expression] For example: >assembly1.Param00 = 10 >10 > assembly1[1] = abs( a1.px – a2.px ) / 2 >30 11.5.2.2.2 Maestro Program Get Assembly member syntax is [Assembly Name] . [Member Name] [Assembly Name][Member Index] For example: int i, j … i = assembly1.
Maestro Software Manual MAN-MASSW (Ver. Q) Ethernet/IP Communication 11-14 The Maestro can call “@eipevent()” callback for Assembly data changing notification: function @eipevent(int event, int param1, int param2) // TODO: Add your Ethernet/IP event handling code here...
Maestro Software Manual MAN-MASSW (Ver. Q) Ethernet/IP Communication 11-15 Assembly objects can have one of following direction types: • • Consuming- an Assembly that consumes data from the network • Producing- an Assembly that produces data on the network Configuration- an Assembly used to store configuration data that comes with incoming Forward Open. It should be listed as Connection Configuration Instance in the incoming Forward Open and not used for originating connections. 11.6.
Maestro Software Manual Ethernet/IP Communication 11-16 MAN-MASSW (Ver. Q) 11.7 Class 3 (connected) messaging server Ethernet/IP Adapter implementation of the Maestro device supports registration of custom objects (Adaptor Tags) for processing by Maestro Commands and Program interpreters. Adapter Tags use CIP data Read/Write table services for data transfer between the scanner (Rockwell device) and the adapter (Maestro device).
Maestro Software Manual Ethernet/IP Communication 11-17 MAN-MASSW (Ver. Q) For removing Adapter Tag use context menu (Fig. 11-20). Figure 11-20: Remove Adapter Tag 11.7.2 11.7.2.1 Using syntax Command interpreter Get Tag syntax is [Adapter Tag Name] [Adapter Tag Name][index] where an index is needed if the tag is an array.
Maestro Software Manual Ethernet/IP Communication 11-18 MAN-MASSW (Ver. Q) 11.7.2.2 Maestro Program Get Tag syntax is [Adapter Tag Name] [Adapter Tag Name][index] For example: int … i = j = n = i, j, n tINT iTag4[0] iTag34[i, j] where an index is needed if the tag is an array. Set the Tag syntax to [Adapter Tag Name] = [const value, expression] [Adapter Tag Name][index] = [const value, expression] where an index is needed if the tag is an array.
Maestro Software Manual 12-1 MAN-MASSW (Ver. Q) Chapter 12: MODBUS Implementation MODBUS Application Protocol Specification V1.1b (http://www.MODBUS-IDA.org) defines an application layer messaging protocol providing client/server communications between devices connected on different types of buses or networks (Fig.12-1). Additionally, it standardizes a specific protocol on a serial line to exchange a MODBUS request between a master and one or more slaves.
Maestro Software Manual Ethernet/IP Communication MAN-MASSW (Ver. Q) 12.1 Master (Client) functionality implementation The MODBUS master object provides connectivity to MODBUS slave compatible devices and applications. The MODBUS Master can have one of following types (Fig.12-2): Figure 12-2: MODBUS Master types 12.1.1 12.1.1.
Maestro Software Manual Ethernet/IP Communication MAN-MASSW (Ver. Q) 12.2 Serial RS-232 media NOTE: Before using the Maestro serial port for MODBUS purposes, you MUST disconnect it from the command interpreter by sending the rsauto(0) command from the terminal and switching power supply to OFF/ON. 12.2.1 • • • • • • Communication parameters for ASCII or RTU MODBUS address (view paragraph 12.1.
Maestro Software Manual Ethernet/IP Communication MAN-MASSW (Ver. Q) 12.3.1 MODBUS Master Object Communication Control Functions NOTE: Here the iStaticArray – int static array is defined by the user To use Static Array as a function parameter, a ‘::’ symbol must be used before the Static Array name. 1- int retVal = openProtocol() Connects to a MODBUS slave (server) Returns: 0 on success or error code. Example: masterObj.
Maestro Software Manual Ethernet/IP Communication MAN-MASSW (Ver. Q) Parameters: coilAddress – coil (discrete output) address (range: 1 - 65536) Returns: Content of selected coil (range: 0-1) Example: masterObj.readCoil(10) Function using For command interpreter only 2. int retVal = readCoils(int startAddress, int ::iStaticArray , int num) MODBUS function code 01. Reads the status of the contiguous discrete outputs (coils, 0:00000 table). Up to 2000 coils.
Maestro Software Manual Ethernet/IP Communication MAN-MASSW (Ver. Q) 4. int retVal = writeMultipleCoils(int startReference, int ::iStaticArray , int num) MODBUS function code 15. Writes binary values into a sequence of discrete outputs (coils, 0:00000 table). Up to 800 coils. Parameters: startAddress – start coils address (range: 1 - 65536) iStaticArray – static integer array which contains the data to be sent num - number of coils to be written (range: 1-800) Returns: 0 on success or error code.
Maestro Software Manual Ethernet/IP Communication MAN-MASSW (Ver. Q) Returns: 0 on success or error code. Example: masterObj.readDiscreteInputs(1, ::iStaticArray, 10) 12.3.3 MODBUS Master Object 16-bit Access Functions For Modicon Register Table 4:00000 (Holding Registers) and Table 3:00000 (Input Registers) 1. readHoldingRegister(int address) MODBUS function code 03. Reads the content of a single output register (holding registers, 4:00000 table).
Maestro Software Manual Ethernet/IP Communication MAN-MASSW (Ver. Q) 3. int retVal = writeSingleRegister(int address, int val) MODBUS function code 06. Writes a value into a single output register (holding register, 4:00000 table). Parameters: reference – register address (range: 1 - 65536) val – new register value Returns:. 0 on success or error code. Example: masterObj.writeSingleRegister(4, 10) 4.
Maestro Software Manual Ethernet/IP Communication MAN-MASSW (Ver. Q) 6. int retVal = readWriteRegisters( int readAddress, int ::iStaticArrayToRead , int readNum, int writeAddress, int ::iStaticArrayToWrite , int writeNum) MODBUS function code 23. Combines reading and writing of the output registers in one transaction (holding registers, 4:00000 table). Up to 125 registers for reading and 100 registers for writing.
Maestro Software Manual Ethernet/IP Communication 12-10 MAN-MASSW (Ver. Q) 8. int retVal = readInputRegisters(int startAddress, ,::iStaticArray, int num) MODBUS function code 04. Read the contents of the input registers (3:00000 table). Up to 125 registers. Parameters: startAddress – start register address(range: 1 - 65536) iStaticArray – static integer array which will contain the data read num - number of registers to be read (range: 1-125) Returns: 0 on success or error code. Example: masterObj.
Maestro Software Manual MAN-MASSW (Ver. Q) Ethernet/IP Communication 12-11 • ASCII over Serial communication Parameters: o MODBUS address (view paragraph 1.1) o Serial port Serial port identifier (default port value "COM1", for information only) o Baud rate Port baud rate in bps (typically 38400) o Data bits Port data bits o Stop bits Port stop bits o Parity Port parity: no parity, odd parity or even parity MODBUS Slave Object functionality Figure 12-4: MODBUS Slave Data Model with separate blocks.
Maestro Software Manual MAN-MASSW (Ver. Q) Ethernet/IP Communication 12-12 Example: slave.shutdownServer() int retVal = isStarted() Returns if server has been started up Example: if(slave.isStarted()) slave. shutdownServer() end if int retVal = connectionStatus() Checks if a MODBUS master is polling periodically Example: if(slave.
Maestro Software Manual MAN-MASSW (Ver. Q) Ethernet/IP Communication 12-13 Parameters: address – input register reference (range: 1 - 65536) Example: intVal= slave.inputRegisters[i] Coils data access (Table 0:00000): Data Access Methods to support read and write of discrete outputs (coils) in table 0:00000. int retVal= coils[int address] coils[int address] = intVal Read and write single discrete output. Parameters: address – coil (output discrete) reference (range: 1 - 65536) Example: slave.
Maestro Software Manual Ethernet/IP Communication 12-14 MAN-MASSW (Ver. Q) Below is a screenshot of the Workspace Window MODBUS View page (Figure 12-5): Figure 12-5: MODBUS Window in Elmo Studio To create new MODBUS Master or MODBUS Slave object use context menu. 12.5.
Maestro Software Manual MAN-MASSW (Ver. Q) 12.5.3 Ethernet/IP Communication 12-15 MODBUS Serial Master MODBUS Serial Master can be added using the following dialog box: Figure 12-7: MODBUS Serial Master Window in Elmo Studio 12.5.
Maestro Software Manual MAN-MASSW (Ver. Q) Ethernet/IP Communication 12-16 After setting the Communication Parameters and User’s Data Size, click OK to create the appropriate members of the MODBUS slave: 1. coils 2. discreteInputs 3. inputRegisters 4. holdingRegisters 12.5.
Maestro Software Manual MAN-MASSW (Ver. Q) Ethernet/IP Communication 12-17 After setting the Communication Parameters and User’s Data Size, click OK to create the appropriate members of the MODBUS slave: 1. coils 2. discreteInputs 3. inputRegisters 4. holdingRegisters 12.6 MODBUS communication workflow Modbus Slave (Server) 1. Server initialization if( !server.isStarted() ) //server’s data initialization ... //start server process retval = server.
Maestro Software Manual Ethernet/IP Communication 12-18 MAN-MASSW (Ver. Q) Modbus Slave (Server) Modbus Master (Client) 2.2 Send data to the server //initialize data array for i=0:coilsNum-1 staticArr[i]=i%4 end for if(client.isOpen()) //write data array retval =client. writeMultipleCoils( 1, &staticArr, coilsNum ) //check results if( !retval ) TRACE(“Error %!!!”,retval) end if if( !client.writeSingleCoil( coilsNum-1, 1 ) TRACE(“Error!!!”) end if end if 3. Stop server server.shutdownServer() 12.
Maestro Software Manual Ethernet/IP Communication 12-19 MAN-MASSW (Ver. Q) Error code Error message Possible error reason 67 Serial port already open The serial port defined for the open operation is already opened by another application 68 TCP/IP connection error Signals that the TCP/IP connection could not be established. Typically this error occurs when a host does not exist on the network or the IP address or host name is incorrect. The remote host must also listen to the appropriate port.
Maestro Software Manual MAN-MASSW (Ver. Q) Error code Error message Ethernet/IP Communication 12-20 Possible error reason occur if the slave device does not reply in time or does not reply at all. A wrong unit address will also cause this error. On some occasions this exception is also produced if the characters received do not constitute a complete frame. 133 Error code Send time-out Error message Signals that fieldbus data sent a timed out.
Maestro Software Manual 13-1 MAN-MASSW (Ver. Q) Chapter 13. Node DS301 Command Reference This chapter describes the Maestro object Node DS301, its functionality and the available CANopen objects. Node DS301 – The CANopen device supports the CiA CAN DS301 protocol. The Maestro device provides the ability to work with the Elmo Motion Axis, DS402 Motion Axis, DS401 CAN I/O and simultaneously treat them as DS301 Node objects.
Maestro Software Manual Node DS301 Command Reference MAN-MASSW (Ver. Q) 13.2 Sync and Timestamp This function is common to other protocols besides DS301. See section 5.6.3 Callback (interrupt) Functions. 13.3 Emergency Handling This function is common to other protocols besides DS301. See section 5.6.3 Callback (interrupt) Functions. 13.4 Send PDO This function implements the sending of PDO Receive messages to the CAN node. Syntax: .
Maestro Software Manual Node DS301 Command Reference MAN-MASSW (Ver. Q) 13.5 Initialization of Callback Functions: Receive PDO This function implements initialization of PDO callback (@pdo). Syntax: .
Maestro Software Manual Node DS301 Command Reference MAN-MASSW (Ver. Q) Example: node1. listenpdo (1,0,0,0)//listen only PDO1 ... // PDO handler calls then a new PDO Transmit message occurs. function @pdo(int address, int wData, int lData, int length) // TODO: Add address decomposition int busId, nodeId, pdoNum busId = address&0x0100 nodeId = address&0x00FF pdoNum = address>>16 // TODO: Add your PDO Transmit handling code here... TRACE( "PDO% for node %", pdoNum, nodeId ) end function 13.
Maestro Software Manual Node DS301 Command Reference MAN-MASSW (Ver. Q) 13.8 Download SDO - 16 bit This function implements SDO download data (16 bits) to the CAN node. Syntax: .wsdo16(index, subindex, data) Input Parameters: index – CAN object index subindex – CAN object sub index data – new data value (16 bits) Return Value: None Example: node1. wsdo16 (0x1600,0,0xffff) 13.
Maestro Software Manual Node DS301 Command Reference MAN-MASSW (Ver. Q) 13.10 Upload SDO - 8 bit This function implements SDO upload data (8 bits) from the CAN node. Syntax: data8 = .rsdo8(index, subindex) Input Parameters: index – CAN object index subindex – CAN object sub index Return Value: Integer with 8 bits SDO data. Example: int data data = node1. rsdo8 (0x100B,0) 13.11 Upload SDO - 16 bit This function implements SDO upload data (16 bits) from the CAN node. Syntax: data8 = .
Maestro Software Manual Node DS301 Command Reference MAN-MASSW (Ver. Q) 13.12 Upload SDO - 32 bit This function implements SDO upload data (32 bits) from the CAN node. Syntax: data8 = .rsdo32(index, subindex) Input Parameters: index – CAN object index subindex – CAN object sub index Return Value: Integer with 32 bits SDO data. Example: int data data = node1. rsdo32 (0x1000,0) 13.13 Heartbeat Handling This function is common to other protocols besides DS301. See section 5.6.
Maestro Software Manual 14-1 MAN-MASSW (Ver. Q) Chapter 14: Maestro Message Queue In the user host program, messages can be retrieved from the Maestro Motion Controller via two different methods. One mechanism is defined in the Maestro API, for a system that includes a single Maestro Motion Controller. For a networked system that includes several Maestro devices, the Maestro Message Queue interface makes it possible to retrieve and analyze the messages sent by each device.
Maestro Software Manual Maestro Message Queue MAN-MASSW (Ver. Q) Method Description CheckSubscription: Check the subscription status Call Format and Parameters CheckSubscription ([in]DWORD dwIP,[out]DWORD *pStatus) dwIP - Maestro device IP address pStatus – pointer to the DWORD variable to retrieve the subscription status. When pStatus = 1, the subscription for the Maestro device is ready. When pStatus = 0, no subscription is available for the Maestro device. 14.
Maestro Software Manual Maestro Message Queue MAN-MASSW (Ver. Q) 3. Verify an IP address. typedef union IP_CONVERT { DWORD dw; BYTE } bt[4]; IP_CONVERT; //IP Address converting CString sIP; sIP.Format(_T("%u.%u.%u.%u"), _IP.bt[3], _IP.bt[2], _IP.bt[1], _IP.bt[0]); long lIP = 0; spLocator->IsPresentMaestro(CComBSTR(sIP), &lIP); if( _IP.dw == (DWORD)lIP ) {//IP successfully verified } else {//failure } 4. Create a subscription via the Subscribe method.
Maestro Software Manual MAN-MASSW (Ver. Q) Appendix A: Setting up the Demo Case The SimplIQ Demo & Training Case is an ideal tool for developing dual-axis applications. It contains two Bassoon digital servo drives, each connected to a servomotor. The Bassoons can be programmed directly with a standard RS-232 connection. The Maestro can be connected via the case’s CAN port. Figure A-1: The SimplIQ Demo and Training Case A.
Maestro Software Manual Appendix A: Setting up the Demo Case MAN-MASSW (Ver. Q) To ensure that the nodes are unique, connect to each Bassoon separately an check the CAN node with the PP[13] command (using the Composer’s Smart_Terminal). If the nodes need resetting, use the save command (SV) to store them in memory. Figure A-3: Node ID Inquiry A.
Maestro Software Manual B-1 MAN-MASSW (Ver.
Maestro Software Manual Appendix B: Sample Programs MAN-MASSW (Ver.
Maestro Software Manual Appendix B: Sample Programs MAN-MASSW (Ver. Q) • Etc. Page Add Dwell B-29 Elmo Logo B-30 Send Message B-31 Point to Point B-32 Vector Axis Move B-33 The Multi-Axis Language (MAXL) file examples listed below can be opened in Elmo Studio's Program Editor. These files can be modified, off-line, in File View. They can also be compiled off-line. However, they cannot be downloaded and run until they communicate with a Maestro that has the associated resources.
Maestro Software Manual Appendix B: Sample Programs MAN-MASSW (Ver. Q) v1.vdc = 28000000 //max deceleration v1.vsp=10000 // max velocity v1.circle(5000, 180, 90) // create circle v1.bg // start motion while (a1.ms==2)||(a2.ms==2)//wait until both axes have stopped wait(10) end while end function B.1.2.2 Add Point Sample float float float float float alfa,alfa0 px0,px1,py0,py1,vx,vy,t R PI Vmax function run() initialization() drawTrj() v1.bg while((a1.ms==2)||(a2.
Maestro Software Manual Appendix B: Sample Programs MAN-MASSW (Ver. Q) B.1.3 Line to Line Samples B.1.3.1 Line_to_Line Sample function run() a1.rm = 0 // The reference is generated by the interpreter // command or by the user program. a2.rm = 0 sync(0, 10) //send a sync signal to CAN bus 0 every 10ms v1.mo=0 v1.px=0 v1.mo=1 //motor off //call this "home" //motor on v1.vum=1 //build trajectory in max. velocity mode v1.vsc=3 //smoothed with fixed dist from the corner v1.
Maestro Software Manual Appendix B: Sample Programs MAN-MASSW (Ver. Q) v1.mo=0 // motor off a1.px=-10000 //x now at -10000 a2.px=10000 //y now at 10000 v1.mo=1 //motor on v1.vum=1 //build trajectory in max. velocity mode v1.vsc=1 //smooth intersection with max. velocity v1.vtm=1 //enable PVT motion initialization v1.vac = 28000000 //max acceleration v1.vdc = 28000000 //max deceleration v1.starts() // begin building trajectory v1.vsp = 30000 // maximum velocity of line v1.
Maestro Software Manual Appendix B: Sample Programs MAN-MASSW (Ver. Q) wait(10) end while end function function homing() int x_home_pos, y_home_pos x_home_pos = 0 y_home_pos = 0 v1.mo = 1 // homing a1 a1.hm[2] = x_home_pos a1.hm[3] = 0 a1.hm[4] = 0 a1.hm[5] = 0 a1.hm[1] = 1 // homing a2 a2.hm[2] = y_home_pos a2.hm[3] = 0 a2.hm[4] = 0 a2.hm[5] = 0 a2.hm[1] = 1 end function B.1.5 Circle to Line Samples B.1.5.1 Circle to Line function run() a1.
Maestro Software Manual Appendix B: Sample Programs MAN-MASSW (Ver. Q) B.1.5.2 Circle-to-Line with Homing Sample function run() a1.rm = 0 //The reference is generated by the interpreter command or by the user program. a2.rm = 0 sync(0, 10) //send a sync signal to CAN bus 0 every 10ms homing() v1.vum=1 //build trajectory in max. velocity mode v1.vsc=1 //smooth intersection with max. velocity v1.vtm=1 //enable PVT motion initialization v1.vac = 28000000 //max acceleration v1.
Maestro Software Manual Appendix B: Sample Programs MAN-MASSW (Ver. Q) v1.addline ( -128000, 64000 ) v1.addcircle( 64000,180,-90 ) v1.vse = 0 v1.ends() wait(10) v1.bg //finish building trajectory //start motion end function B.2 Motion Mathematics Refer to the Motion Library Tutorial which can be viewed on the Elmo web site at http://www.elmomc.com/support/Samples-Tutorial/MAN-MLT.pdf. B.3 Basic Programming B.3.
Maestro Software Manual Appendix B: Sample Programs MAN-MASSW (Ver. Q) for i=10:-2:-10 a=a+i*2 end for end function B.3.4 //iterate i from 10 to -10 in -2 increments Global Variable Sample // File GlobalVar.maxl // Global Variables Declaration... int a,b // Entry point of the application. function run() //Global variable declaration inside function body //specified by global keyword.
Maestro Software Manual MAN-MASSW (Ver. Q) B.3.6 If-Else Sample function run() int a, b a=7 b=10 if (a < b+5) a=a+2 else b=b-2 end if end function B.3.7 If-Else-If Sample function run() int a, b , c b=4 c=11 if ((b == 4)&&(c == 18)) a=1 // b is 4; c is 18 else if ((b == 4)&&(c == 11)) a=2 // b is 4; c is 11 else a=7 // any other cases end if end function B.3.
Maestro Software Manual Appendix B: Sample Programs MAN-MASSW (Ver. Q) B.3.10 B-12 Program Call int x_pos, y_pos function run() //this the homing program // Homing with a Call function run() homing.x_pos = 0 homing.y_pos = 0 homing.run() v1.vtm=1 //enable PVT motion initialization //create a line sync(0,10) v1.mo=1 v1.vsp=10000 v1.line(7000, 10000) v1.bg end function global int x_pos, y_pos // standard Maestro homing procedure a1.hm[2] = x_pos //receive position from calling //function a2.
Maestro Software Manual Appendix B: Sample Programs MAN-MASSW (Ver. Q) B.3.13 B.3.13.1 Array Samples Array // array declaration int arr[256] // Entry point of the application. function run() global int arr[] int i // fill array 0,1,2....254,255. for i=0:arr.size-1 arr[i]=i end for // fill array 256,255,254....2,1. for i=0:arr.size-1 arr[i]=arr.size-i end for end function B.3.13.2 GroupAsArray // Entry point of the application.
Maestro Software Manual Appendix B: Sample Programs MAN-MASSW (Ver. Q) B.3.13.5 Drill Machine //Axis X name a1 //Axis Y name a2 //Axis Z name a3 // TODO: Global Variables Declaration... //declaration of N dimension array ArrayName[size0,size1,....,sizeN] int arrX[10] //declaration of one dimension array //Arrayname[size] int arrY[10] int arrZ[10,10] //declaration of two dimension array //ArrayName[size0,size1] int speedXY int speedZ // Entry point of the application.
Maestro Software Manual Appendix B: Sample Programs MAN-MASSW (Ver. Q) B.4 Callbacks Functions B.4.1 PerrorCallBack int dev // Entry point of the application. function run() global int dev //default value - 0 int n TRACE( "Dev value %", dev ) n = 100 / dev TRACE( "Program OK" ) end function // Error handler calls then a runtime program // error occur.
Maestro Software Manual Appendix B: Sample Programs MAN-MASSW (Ver. Q) TRACE( "Fin" ) end function // Heartbeat handler calls then a CAN node state was be changed.
Maestro Software Manual MAN-MASSW (Ver. Q) global int go go=1 end function function init() if stamp.mo; stamp.mo = 0; end if stamp.um = 5 stamp.mo = 1 end function function home(AXIS a) a.pa = 0 a.bg until a.ms == 0 end function B.4.4.2 EmitCallback int emitCount int gTime function run() int i global int emitCount, gTime emitCount=0 a1.ape = 1 //map PDO1 if a1.ps != 1 a1.
Maestro Software Manual Appendix B: Sample Programs MAN-MASSW (Ver.
Maestro Software Manual Appendix B: Sample Programs MAN-MASSW (Ver. Q) B-19 B.4.5.2 InputOutputTest1 int loop int iData int gEvent function run() global int loop global int iData global int gEvent int input,tmp,i int m_input_old,a1_input_old,a2_input_old int input_num int input_level input_num = 0 input_level = 0 loop=1 a1.adi=1 a2.adi=1 input = -1 m_input_old = m_din a1_input_old = a1.IP a2_input_old = a2.
Maestro Software Manual Appendix B: Sample Programs MAN-MASSW (Ver. Q) B.4.5.3 InputOutputTest2 //InputCallback function run() until(InputEvent.loop!=1) InputEvent.gEvent=-1 end function input_level=0 tmp = a1_input_old - input end if a1_input_old = input case a2.aid input = iData & 0x3f input_num = 6 if(input > a2_input_old) input_level=1 tmp = input - a2_input_old else input_level=0 tmp = a2_input_old - input end if a2_input_old = input // Input handler calls then a input event occur.
Maestro Software Manual Appendix B: Sample Programs MAN-MASSW (Ver. Q) B.4.6 B-21 Motion Completed Callback Samples B.4.6.1 MCompleteCallback // AxisMotionComplete // VectorMotionComplete function run() global int motionStatus motionStatus=0 InitAxis(a3) InitAxis(a4) sync(0, 10) //send sync signal to CANbus0 every 10ms wait(10) axisHoming(a3, 0) axisHoming(a4, 0) end function int motionStatus function InitAxis(AXIS axis) axis.
Maestro Software Manual Appendix B: Sample Programs MAN-MASSW (Ver. Q) function vectorHoming(VECTOR vector, int home_pos_x, int home_pos_y) global int motionStatus TRACE("homing vector %", vector.vid) vector[0].px = home_pos_x vector[1].px = home_pos_y vector.mo = 1 vector[0].pa = home_pos_x vector[1].pa = home_pos_y vector.
Maestro Software Manual Appendix B: Sample Programs MAN-MASSW (Ver. Q) B.4.6.2 MotionCompleteTest int g_iMC // Entry point of the application. function run() // TODO: Global Variables Declaration inside the Function... global int g_iMC // TODO: Local Variables Declaration... int iTimes,i int T1,T2 int iPos1,iPos2 // TODO: Add your specialized code here...
Maestro Software Manual Appendix B: Sample Programs MAN-MASSW (Ver. Q) int Speed g_iAxisNum = 1 TimeOut = 5000000 Speed = -20000 if (g_iAxisNum==1) Homing (a1,TimeOut,Speed) else if (g_iAxisNum==2) Homing (a2,TimeOut,Speed) else TRACE("Error axis id: %", g_iAxisNum) end if end function function Homing (AXIS as,int TimeOut,int speed) int StartTime int delta float L_Current float Command as.mo=0 as.um=5 as.rm=0 as.sd=1000000000 as.ac=1000000 as.dc=as.ac as.sf=0 as.mo=1 as.jv=speed L_Current=as.cl[1]*.
Maestro Software Manual MAN-MASSW (Ver. Q) init() // main loop while(test()) //move() moveTo() end while end function // Error handler calls then a runtime program // error occur. function @perror(int error) // TODO: Add your error handling code here... TRACE( "Error %", error ) end function function [int retValue] = test() global int go if go == 0 retValue = 0 return end if retValue = 1 end function function init() global int go global float k go=1 k=2 // init axis a1 if(a1.mo); a1.mo=0; end if a1.
Maestro Software Manual MAN-MASSW (Ver. Q) if abs(m_ain[0]) < 100 position=0 else position = m_ain[0] * k end if if abs(a1.px-position) > 100 a1.pa = position a1.bg end if if abs(m_ain[1]) < 100 position=0 else position = m_ain[1] * k end if if abs(a2.px-position) > 100 a2.pa = position a2.bg end if end function // program to set zero value for analog input function run() float sum int i for i=1:100 sum=sum+m_ain[0] end for m_ain[0].offset = sum/100 sum = 0 for i=1:100 sum=sum+m_ain[1] end for m_ain[1].
Maestro Software Manual MAN-MASSW (Ver. Q) a2.px=1000 a1.sp = 10000 a2.sp = 20000 a1.mo=1 // Turn MOTOR ON a2.mo=1 // Turn MOTOR ON wait(10) a1.pa = 10000 a2.pa = 30000 G1.bg end function function InitGroup(GROUP group) int i // for each axes on the grope "G1" //using group as array of motion axis for i=0:G1.size-1 G1[i].rm = 0 //The reference is generated by the interpreter command or by the user program. G1[i].mo = 0 wait(10) G1[i].sf = 0 G1[i].um = 5 G1[i].ll[2] = -833333 G1[i].hl[2] = 833333 G1[i].
Maestro Software Manual MAN-MASSW (Ver. Q) //use group as array of axis for i=0:G1.size-1 G1[i].rm = 0 //The reference is generated by the interpreter command or by the user program. G1[i].mo = 0 wait(10) G1[i].sf = 0 G1[i].um = 5 G1[i].ll[2] = -833333 G1[i].hl[2] = 833333 G1[i].VH[2] = 750000 G1[i].VL[2] = -750000 G1[i].ll[3] = -1000000000 G1[i].hl[3] = 1000000000 G1[i].VL[3] = -999999990 G1[i].VH[3] = 999999990 end for end function B.7.1.3 GroupTrj function run() sync(0,30) InitGroup(G1) G1.
Maestro Software Manual Appendix B: Sample Programs MAN-MASSW (Ver. Q) end for end function B.8 Etc. B.8.1 Adddwell Sample Adddwell (Add Dwell) causes a pause at a specific point in a trajectory function run() InitAxis(a1) InitAxis(a2) sync(0, 10) //send a sync signal to CAN //bus 0 every 10ms homing(a1, 0) //set coor. x to 0 homing(a2, 0) //set coor. y to 0 setWorkMode() drawTrj() //wait until both axes have stopped while (a1.ms==2)||(a2.
Maestro Software Manual Appendix B: Sample Programs MAN-MASSW (Ver. Q) B-30 v1.starts(stam) // begin trj v1.vsp = 70000 //max. velocity v1.vse = 0//70000 //end velocity v1.addline(0, -50000) //create line from current point to coordinate v1.adddwell(1000) v1.vsd = 2000 //distance of tangent of arc from line intersection v1.vsp = 50000 //max. velocity v1.vse = 0 //end velocity v1.addline(-20000, 0) //create line from current point to //coordinate 0 on X and 50,000 on Y v1.
Maestro Software Manual Appendix B: Sample Programs MAN-MASSW (Ver. Q) v1.addline ( 50000*k_x, 0*k_y); v1.addline ( 50000*k_x, 15000*k_y); v1.addcircle( 5000*k_x, 180, -180); v1.vsp = 50000; v1.vse = 0; v1.addline ( 60000*k_x, 0*k_y); v1.addline ( 60000*k_x, 15000*k_y); v1.addcircle( 5000*k_x, 180, -180 ); v1.addline ( 70000*k_x, 0*k_y); //letter 'o' v1.addline ( 80000*k_x, 15000*k_y); v1.addcircle( 5000*k_x, 180, -180 ); v1.addline ( 90000*k_x, 5000*k_y); v1.addcircle( 5000*k_x, 0, -180 ); v1.
Maestro Software Manual Appendix B: Sample Programs MAN-MASSW (Ver. Q) B.8.4 Poin2Point function run() int count,position,multiply count=0 position = 10000 multiply = 5 // TODO: Add your specialized code here... InitAxis(a1) InitAxis(a2) sync(0, 10) //send a sync signal to CAN bus 0 every 10ms homing(a1, 0) homing(a2, 0) a1.sp = 8000 a2.sp = a1.sp*multiply while (count<10) count++ while (a2.ms==2||a1.ms==2) wait(10) end while a1.pa=abs(a1.pa-position) a2.pa=abs(a2.pa-position*multiply) v1.
Maestro Software Manual Appendix B: Sample Programs MAN-MASSW (Ver. Q) B.8.5 VectorAxisMove int trjPointsArr[10,2] int ind function run() global int trjPointsArr[] global int ind ind=1 InitAxis(a1) InitAxis(a3) sync(0, 10) //send a sync signal to CAN bus 0 every 10ms trjPointsArr[0,0]= 0 //set coor. x0 trjPointsArr[1,0]= 10000 //set coor. x1 trjPointsArr[2,0]= 0 //set coor. x2 trjPointsArr[3,0]= 15000 //set coor. x3 trjPointsArr[4,0]= 0 //set coor. x4 trjPointsArr[5,0]= 20000 //set coor.
Maestro Software Manual C-1 MAN-MASSW (Ver. Q) Appendix C: Performance Considerations The Maestro can manage up to 252 axes on a standard application. However, fewer axes can be managed on applications requiring fast updates. The Bus Load graphs show how many drives can be managed as a function of update time and bus speed. Figure C-1 : CAN Bus Load at 500Kbit/sec For example, the Maestro can manage 4 axes on an application that requires an update every 1 msec running at a 70% load on an 800 Kbit/s bus.
Maestro Software Manual Appendix C: Performance Considerations MAN-MASSW (Ver. Q) Figure C-3: CAN Bus Load at 1000Kbit/sec The graph above can be used as a yardstick to determine the number of updates needed to produce an acceptable path. In this case, the number of updates is a function of the diameter, speed and maximum allowable interpolation error.
Maestro Software Manual D-1 MAN-MASSW (Ver. Q) Appendix D: Maestro System Errors D.
Maestro Software Manual Appendix D: Maestro System Errors MAN-MASSW (Ver. Q) D.2 Common Zone Errors D.2.
Maestro Software Manual Appendix D: Maestro System Errors MAN-MASSW (Ver.
Maestro Software Manual Appendix D: Maestro System Errors MAN-MASSW (Ver.
Maestro Software Manual Appendix D: Maestro System Errors MAN-MASSW (Ver. Q) D.3.2 Root-level Warning Codes: 0014 - CAN Emergency; D.3.3 Top-level Error Codes: 0016 - Motion Event Failure; 0021 - Unable to map PDO Objects for PVT Motion; 0022 - Unable to unmap PDO Objects for PVT Motion; D.4 Virtual Machine Zone Errors D.4.
Maestro Software Manual Appendix D: Maestro System Errors MAN-MASSW (Ver.
Maestro Software Manual Appendix D: Maestro System Errors MAN-MASSW (Ver.
Maestro Software Manual Appendix D: Maestro System Errors MAN-MASSW (Ver. Q) 1132 'switch' without 'end' 108 1133 more than one 'otherwise' 109 1134 missing label name 110 1135 bad array dimension 111 1136 element of array can not used as iteration variable in operator 'for' 112 1137 callback stack overflow 113 1138 'until' operator constant argument 114 1139 bad operand of 'waitvar' 115 1140 I/O write fault 116 1141 I/O read fault 117 1142 bad constant declaration 118 D.
Maestro Software Manual Appendix D: Maestro System Errors MAN-MASSW (Ver. Q) D.4.
Maestro Software Manual Appendix D: Maestro System Errors MAN-MASSW (Ver. Q) D.5.1.3 Error 0005 Message Text Input parameter error: PVT resolution undefined or inadequate: dT<1msec. Explanation The highest resolution (minimal time step), supported by ELMO drives, is 1msec. Parameter vxt (or vnt) is less than 1msec. Action Check and revise input parameters vxt and vnt. D.5.1.4 Error 0006 Message Text Input parameter error: Segment end velocity not equal zero and parameter vsc = 0.
Maestro Software Manual Appendix D: Maestro System Errors MAN-MASSW (Ver. Q) D.5.1.7 Error 0012 Message Text Input parameter error: Line end point doesn’t fit drive position constraints. Explanation One of the end point coordinates, or both of them, do not fit drive’s position constraints. Action Check the X/Y coordinates of the end point. D.5.1.8 Error 0013 Message Text Input parameter error: Fixed velocity vsp for circle trajectory exceeds axis X max velocity.
Maestro Software Manual Appendix D: Maestro System Errors MAN-MASSW (Ver. Q) D.5.1.11 Error 0017 Message Text Input parameter error: Smoothing mode parameter vsc undefined or inadequate.
Maestro Software Manual Appendix D: Maestro System Errors MAN-MASSW (Ver. Q) D.5.1.14 Error 0023 Message Text Calculation error: Velocity was not calculated (line, FT, trapez. vel. profile). Explanation Line trajectory was calculated in fixed time (FT) mode with a trapezoidal velocity profile. In this mode the motion library calculates velocity for the fixed velocity segment of the trajectory. The trajectory is calculated for the general case where Vo ≠ 0, Vend ≠ 0 .
Maestro Software Manual Appendix D: Maestro System Errors MAN-MASSW (Ver. Q) D.5.1.18 Error 0041 Message Text Input parameter error: Vector velocity undefined or inadequate. Explanation Vector velocity received as input parameter vsp < 1. Action Set the vector velocity parameter value ≥ 1.0 (vsp≥1). D.5.1.19 Error 0047 Message Text Critical error: Type of the shape object differs from the type set for the object.
Maestro Software Manual Appendix D: Maestro System Errors MAN-MASSW (Ver. Q) D.5.1.23 Error 0062 Message Text Input parameter error: Circle’s right-most point doesn’t fit drive constraints. Explanation Circle’s right-most X/Y coordinates are outside the drive’s position constraints. Action Check the right most- X/Y coordinates and the position limits set for the drive. D.5.1.24 Error 0063 Message Text Input parameter error: Circle’s lower-most point doesn’t fit drive constraints.
Maestro Software Manual Appendix D: Maestro System Errors MAN-MASSW (Ver. Q) D.5.1.27 Error 0074 Message Text Switch arc can’t be built: angle between lines too small to calculate. Explanation The angle between the lines is too small to built a switch arc. In fact, the second line goes along the first line in the reverse direction. Action Set a value of zero for the vsc (smoothing type) parameter. D.5.1.
Maestro Software Manual Appendix D: Maestro System Errors MAN-MASSW (Ver. Q) D.5.1.30 Error 0077 Message Text Switch arc radius calculated by vsd too small for given end velocity and vector acceleration. Explanation Input parameter vsd incorrect. Switch arc radius (calculated as a function of given parameter vsd) does not fit necessary condition for uniform movement along the circle trajectory (vse2/vsr ≤ vac) where vse is end velocity, vsr is switch arc radius and vac is vector acceleration.
Maestro Software Manual Appendix D: Maestro System Errors MAN-MASSW (Ver. Q) Action If vnt was set to a value greater than the minimum PVT resolution supported by Elmo drives, then vnt should be decreased. In other cases the vsp and other trajectory parameters, should be verified. D.5.1.34 Error 0082 Message Text Input parameter error: Switch arc can’t be built with given switch arc radius – one of the line segments isn’t long enough.
Maestro Software Manual Appendix D: Maestro System Errors MAN-MASSW (Ver. Q) D.5.1.38 Error 0096 Message Text Input parameter error: Switch arc can’t be built – circle segment arc is not long enough for the switch arc radius.
Maestro Software Manual Appendix D: Maestro System Errors MAN-MASSW (Ver. Q) D.5.1.41 Error 0101 Message Text Input parameter error: Switch arc line-line can’t be built - distance from the corner doesn’t fit end velocity and vector acceleration. Explanation Switch arc parameters: end velocity vse, vector acceleration vac and distance from the corner vsd do not fit the condition vse2/R_switch = vse2/(vsd*tg(γ/2) < vac (where γ is the angle between the two lines).
Maestro Software Manual Appendix D: Maestro System Errors MAN-MASSW (Ver. Q) D.5.1.45 Error 0105 Message Text Input parameter error: Switch arc can’t be built - one of the line segments isn’t long enough for the predefined distance from the corner. Explanation Two lines that intersect when vsc is set to 3. The vsd (distance from the corner) was set to an inadequate value: vsd > L1 or vsd > L2 (where L1 and L2 are the lengths of the two lines. Action Check vsd, L1 and L2. D.5.
Maestro Software Manual Appendix D: Maestro System Errors MAN-MASSW (Ver. Q) D.5.2.4 Warning 0004 Message Text Switch arc can’t be built: zero velocity at the end point Explanation Switch arc is built if the first shape end velocity not equal zero - parameter vse ≠ 0. Action If velocity at the end point should be zero (vse = 0) parameter vsc should be also equal zero. In other case to parameter vse should be set nonzero value. D.5.2.
Maestro Software Manual Appendix D: Maestro System Errors MAN-MASSW (Ver. Q) D.5.2.9 Warning 0009 Message Text Switch arc can’t be built: Two circles have the same tangent at the intersection point. Explanation If two circles have the same tangent at the intersection point we do not need switch arc and it cannot be built. D.5.3 Additional Errors D.5.3.1 Error 0202 0007 Message text Input parameter error: Angle between vector velocity at start point and line direction > 90 degrees.
Maestro Software Manual Appendix D: Maestro System Errors MAN-MASSW (Ver. Q) D.5.3.4 Error 0202 0049 Message text Input parameter error: Circle trajectory can't be built (vsp*vsp)/R > vdc*vae. Explanation The necessary condition for the circular motion v2/r ≤ a is not satisfied. Action The values of the parameters vsp, R and vdc must be corrected to satisfy condition (vsp*vsp)/R > vdc*vae. D.5.3.
Maestro Software Manual Appendix D: Maestro System Errors MAN-MASSW (Ver. Q) D.5.3.8 Error 0202 0092 Message text Input parameter error: Switch arc circle-circle can't be built - calculated switch radius too long for the intersection geometry. Explanation Switch radius calculated as r = vsp2/(vac*vae) is too long for the intersection geometry. Action Verify and correct parameters vsp and vac or parameters that define intersection geometry (circle 1 radius, circle 2 radius, circle1 sweep angle,…). D.5.
Maestro Software Manual Appendix D: Maestro System Errors MAN-MASSW (Ver. Q) D.5.3.12 Error 0202 0113 Message text Input parameter error: Line segment length is not long enough for the requested switch velocity to be reached. Explanation Switch velocity defined by the input parameter vse cannot be achieved because the line segment length is not long enough. Action Verify and correct input parameter vse. D.5.3.13 Error 0016 Message Text Unable to add next PVT point.