Maestro Software Manual September 2008 – Ver. Q www.elmomc.com
D.2.3 Top-level Error Codes:... D-2 D.3 CAN Communication Zone Errors...
Recipients of group commands All elements which are certain for the given group Only to switching-on nodes certain for the given group Command Contro
Figure 5-1: Creating a dynamic group Figure 5-2: Creating a dynamic group To create a dynamic group, select the appropriate “check-Represent
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) 5.9 Static Variables 5.9.1 Static Variable Definition Static Variable is a Maestr
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-
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) 2. Set Static Variable syntax [Static Variable Name] = [const value, expression]
For example: if(iVar == 10 ) … end if while(iArr[0] ) … end while 1. The Static Variable cannot be used in the for statement as
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) 5.10 Maestro User Program Priority Every Maestro User Program has an assigned pri
Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) The following code example compares how the Maestro Program Priority feature affect
Maestro Software Manual MAN-MASSW (Ver. Q) 6-1 Chapter 6: The Maestro API Abbreviations MAS/MAC – Multi Axes Supervisor/Multi Axes Controller synon
Return Value: int - initialization status: 0 OK; 1 The API library is already initialized; 2 The COM library is already initialized on this thread;
D.5.1.38 Error 0096... D-19 D.5.1.39 Error 0098...
6.3 MAC_CreateTCPConnection This function enables the user to initiate TCP/IP communication with the Multi-axes supervisor. Syntax: COMMUNICATION_HAN
6.4 MAC_CreateRS232Connection Note: This interface is not implanted yet. This function enables the user to initiate RS232 communication with the Mult
6.5 MAC_CloseConnection This function enables the user to close communication Syntax: int MAC_CloseConnection( COMMUNICATION_HANDLE hCommunication )
Output Parameter: LPTSTR szOut String for response receiving. Return Value: Int Error Value: 0 OK >0 Communication error codes, user may use M
6.8 MAC_GetDevice This function enables the user to get Multi-axes supervisor parameters Syntax: int MAC_GetDevice( UINT uNum, LPTSTR szIP, LPTSTR sz
6.10 MAC_IsDevicePresent This function enables the user to check Multi-axes controller IP address Syntax: int MAC_IsDevicePresent ( LPCTSTR cszHost,
Motion object types for the MAC_LocateObjects() function: MOT_NODE Node DS301 MOT_IO IO DS401 MOT_AXIS Axis MOT_VECTOR Vector MOT_GROUP
Motion object data structure for the MAC_GetObject() function: typedef struct _MOTION_OBJECT { BYTE btBusID; //CAN Bus ID for object BYTE btNo
6.13 MAC_DownloadTrajectory This function enables the user to download trajectory to Multi-axes supervisor A trajectory is a text file that contains
5 Remove Trajectory failed; Use MAC_GetLastError to retrieve the error string. Sample: int retVal = MAC_RemoveTrajectory( hCom, _T("MyTrj"
Maestro Software Manual MAN-MASSW (Ver. Q) Chapter 1: Introduction Elmo’s Maestro is a network-based multi-axis motion supervisor that operates in
int - Error value: 0 OK, > 0 communication error codes: 1 The API library is not initialized; 2 Zero Communication Handle; 3 Bad Communica
6.18 MAC_DownloadResourcesEx This function enables the user to define new resources for Multi-axes supervisor. Syntax: int MAC_DownloadResourcesEx( C
LPCTSTR cszLocalPath Path to log file on desktop computer. Return Value: int - Error value: 0 OK, > 0 communication error codes: 1 The API
4 Unable to create interface ITNElmoPublic; 5 SimpleIQ Firmware file downloading failed; 6 Unable to start firmware update process; Use MAC_GetLast
int nOk = MAC_InitEvents(); 6.23 MAC_DeinitEvents This function enables the user to close MAS Event mechanism Syntax: Void MAC_DeinitEvents(); Sample
int MAC_RegInterruptCallback ( COMMUNICATION_HANDLE hCommunication, MAC_ONUSER_INTERRUPT ptrCB); Input Parameters: COMMUNICATION_HANDLE hCommunica
0 OK, > 0 communication error codes: 1 The API library is not initialized; 2 Zero Communication Handle; 3 Bad Communication Handle; 4 Una
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
Return Value: int - Error value: 0 OK, > 0 communication error codes: 1. The API library is not initialized; 2. Zero Communication Handle; 3.
Chapter 7: RS-232 Protocol Specification 7.1 Send Command to Maestro The Maestro receives commands in the following format for RS-232 communication:
Maestro Software Manual Introduction MAN-MASSW (Ver. Q) 1.2 Supplementary Documents This manual is part of a documentation set that, together, can
Parsing of Maestro’s sample response: CString Input; // Maestro response string … //1 - new line removing int n = Input.Find( "\r\n" ); whil
Maestro Software Manual MAN-MASSW (Ver. Q) 8-1 Chapter 8: The Recorder Elmo's Recorder is used to record actions and events on the axes conne
Maestro Software Manual The Recorder MAN-MASSW (Ver. Q) 8-2 Once communications have been established, choose the signals to record from the pick li
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 wh
Maestro Software Manual The Recorder MAN-MASSW (Ver. Q) 8-4 Figure 8-7: Choosing the Type of Display The Scope is a graphic display tool that enab
Maestro Software Manual MAN-MASSW (Ver. Q) 9-1 Chapter 9: The CANopen Configurator The CAN bus configuration tools, listed below, are based on CiA
Maestro Software Manual The CANopen Configurator MAN-MASSW (Ver. Q) 9-2 Figure 9-1: Microsoft .NET Download Page When the File Download dialog box
Maestro Software Manual The CANopen Configurator MAN-MASSW (Ver. Q) 9-3 9.2 CANopen Configurator GUI After installing the CANopen Configurator, a n
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 t
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 u
1.3 Command Specification Commands for SimplIQ drives may be specified from the following sources: User program A program loaded to the servo dri
Maestro Software Manual The CANopen Configurator MAN-MASSW (Ver. Q) 9-6 9.4.3 Exporting a Node Set To store (export) a CAN node set, navigate to th
Node IDs, LSSincluded in thmade ma lly. Once the chan apbe verified with the Veri• Apply > Verify Configuration > Offline Verification addre
Maestro Software Manual The CANopen Configurator MAN-MASSW (Ver. Q) 9-8 Note: The Online Verification tool can be used to find a node that does n
Maestro Software Manual The CANopen Configurator MAN-MASSW (Ver. Q) 9-9 9.7 CANopen Configurator Options The CANopen Configurator adjustment param
Maestro Software Manual The CANopen Configurator MAN-MASSW (Ver. Q) 9-10 CAN bus baud rate (for bus 0 and bus 1) defines the baud rate for the L
Maestro Software Manual The CANopen Configurator MAN-MASSW (Ver. Q) 9-11 • Default CAN Nodes Set defines the path to file for a manually collected
Chapter 10: Axis DS402 Command Reference CiA DSP 402 is the device profile for drives and motion control. The profile defines the functional behavior
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) 10-2 Object Index and Subindex Full command Short command Elmo short command D
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) 10-3 10.1.1 Device State Machine Control The state of the device is controlled
Operation 2 - sdn, Shutdown command for all motion objects READY TO SWITCH ON To this state: Operation 2 - sdn, Shutdown command for all motion objec
Maestro Software Manual MAN-MASSW (Ver. Q) 2-1 Chapter 2: Functional Overview This chapter takes a look at the organization of Maestro software. 2
FAULT REACTION ACTIVE From this state: Operation 15 - far, FaultReset command for all motion objects User can send controlword by command cwd, Control
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
10.1.2 State Machine Operation Reactions The following state machine operation reactions are possible: • Shutdown operation reaction Object Index an
• Operation disable reaction Object Index and Subindex Full Command Short Command Elmo Short Command Description 0x605C, 0x00 OperationDisableReac
An action should be selected from the following: Value Description -32,768…-1 Manufacturer specific 0 Disable drive function 1 Slow down on slow-do
Object Index and Subindex Full Command Short Command Elmo Short Command Description 0x606E, 0x00 VelocityWindowTime pvwt - Velocity window time is
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) 10-11 For IP and PP operation modes psw(PositionWindow) and pswt(PositionWindowT
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) 10-12 10.2 Profile Position (PP) Mode This section describes how to set point-to
Object Index and Subindex Full Command Short Command Elmo Short Command Description 0x606C, 0x00 ProfileActualVelocity pav vx Profile actual veloci
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) 10-14 Vector properties connected to PP mode (see also description for axis): •
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 h
One of following command sequences can implement profile position motion. • Motion organization without callback using: Example 1.1 function run() i
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) 10-16 a1.pa=20000 //set absolute target position value a1.bg //start motio
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
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) 10-18 Figure 10-5: Profile Position Commands Time Diagram
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) 10-19 As shown in section A of the diagram above, all synch periods have two stag
10.3 Profile Velocity (PV) Mode This section describes how to set profile velocity movement when a target velocity is applied to the trajectory gener
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) 10-21 • vmc - motion completed callback control Group properties in PV mode: •
10.3.3 Profile Velocity Mode Commands Description The velocity controller calculates a torque variable. When a different value arrives, it is execute
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) 10-23 Figure 10-7: Profile Velocity Command Time Diagram The process is similar
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) 10-24 10.4 Interpolated Position (IP) Mode The Interpolated position mode is use
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
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) 10-25 Figure 10-9: Interpolation Position Mode States Diagram • Interpolation
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 a
Object Index and Subindex Full Command Short Command Elmo Short Command Description position 0x60C4, 0x06 InterpolationBufferAccess ipba - Interpo
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) 10-28 10.4.2 Using Interpolated Position Commands 10.4.2.1 Implementing Interp
a1.ipqp=100 //push position to IP queue a1.ipa=1 //IP mode activation for i=2:100 a1.ipqp = i*100 //push position to IP queue end a1.ipqp =
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) 10-30 10.4.2.2 Interpolated Position Mode Commands Description The DS402 Axis s
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) 10-31 In cubic spline interpolation, the user specifies both the position and the
Ring Buffer: If the buffer is structured as a ring, the host can place an interpolation data recordinto any valid position in the ring by changing the
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) 10-33 Data transfer from the DS402 Axis interpolation queue to the servo is carri
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) 10-34 Figure 10-14: IP motion CAN Messages Diagram Command ip (ipa, Interpolati
Maestro Software Manual MAN-MASSW (Ver. Q) 3-1 Chapter 3: Host Communications This chapter explains how to set up the Workspace to work with a spe
10.4.2.3 Features of Interpolated Position Operating Mode Using for Group (Vector) Interpolated position motion for Group (Vector) DS402 can be imple
• 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 H
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) 10-37 • ato - status word waiting timeout (for wswd command (or awm property), d
The following command sequences can implement homing motion: function run() sync( 0, 10 ) //work with DS402 motion object required sync mechanism a
a2.hof=-100 //homing offset definition for axis a2 g1.hom=1 //homing method definition g1.hm=1 //HM mode activation g1.awm //wait for motion
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) 10-40 Commands using: a1.mrc=1000 a1.pmxc=1000 a1.pts=500 a1.ptt=
Maestro Software Manual DS402 Command Reference MAN-MASSW (Ver. Q) 10-41 end while a1.ptt=0 //target torque 0 end function 10.6.2.2 Description
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
ope - operation enable OperationEnable - operation enable st - quick stop qst - quick stop QuickStop - quick stop far - fault reset Faul
DigitalInput - digital input psw - position window PositionWindow - position window pswt - position window time PositionWindowTime - positio
Maestro Software Manual Host Communications MAN-MASSW (Ver. Q) 3-2 3.3 Choosing the Host through the Composer Select Start/Programs/Elmo/Composer
ProfileMaxPosition - max position range limit pmnp - min position range limit ProfileMinPosition - min position range limit smxp - soft max po
HomingMethod - homing method hm - homing mode activate hma - homing mode activate HomingActive - homing mode activate ip - interpolation mod
ProfileMaxTorque - profile max torque pmxc - profile max current ProfileMaxCurrent - profile max current pdt - profile demand torque ProfileDema
DS402 Vector commands: opm - operation mode OperationMode - operation mode div - disable voltage DisableVoltage - disable voltage sdn - shut
qstr - quick stop reaction QuickStopReaction - quick stop reaction farr - fault reset reaction FaultResetReaction - fault reset reaction hlt
pmnp - min position range limit ProfileMinPosition - min position range limit smxp - soft max position range limit ProfileSoftMaxPosition - so
ip - interpolation mode activate ipa - interpolation mode activate InterpolationActive - interpolation mode activate ipsm - interpolation sub
TorqueProfileType - torque profile type pts - profile torque slope ProfileTorqueSlope - profile torque slope mrt - motor rate torque MotorRa
opd - operation disable OperationDisable - operation disable bg - operation enable ope - operation enable OperationEnable - operation enable
pvw - velocity window VelocityWindow - velocity window pvwt - velocity window time VelocityWindowTime - velocity window time pvt - velocity
Important Notice This guide is delivered subject to the following conditions and restrictions: This guide contains proprietary information belongin
Chapter 4: General and Motion Instructions; Configuration Tools This chapter describes the Maestro input/output and motion objects, instructions and
qsdc - quick stop deceleration QuickStopDeceleration - quick stop deceleration jv - profile target velocity ptv - profile target velocity Pr
InterpolationSyncCount - interpolation sync count ipqr - interpolation queue reset InterpolationQueueReset - interpolation queue reset ipqp -
10.8 DS402 PDO Mapping table PDO 1 2 3 4 Receive Transmit Receive Transmit Receive Transmit Receive Transmit PP Mode CW (255) SW (255) CW (1)
Maestro Software Manual MAN-MASSW (Ver. Q) 11-1 Chapter 11: Ethernet IP Communication “Ethernet Industrial Protocol”, or EtherNet/IP (EIP), defines
11.1 Terms and Abbreviations • Ethernet/IP device characterized by the unique network address (e.g. IP address) (include Ethernet/IP scanners and ad
Maestro Software Manual Ethernet/IP Communication MAN-MASSW (Ver. Q) 11-3 11.3 Product Classes The Maestro implements the Ethernet/IP Adapter and M
Maestro Software Manual Ethernet/IP Communication MAN-MASSW (Ver. Q) 11-4 Figure 11-3: Add a New Module 2. Select module type “Generic Ethernet M
Maestro Software Manual Ethernet/IP Communication MAN-MASSW (Ver. Q) 11-5 Figure 11-5: Set the Module Properties 4. Create appropriate controller
Maestro Software Manual Ethernet/IP Communication MAN-MASSW (Ver. Q) 11-6 11.4.2 Ethernet/IP Adapter (Maestro) Activation To conserve system resour
Maestro Software Manual Ethernet/IP Communication MAN-MASSW (Ver. Q) 11-7 Figure 11-10: Remove Adapter Tag 11.5 UCMM (Unconnected) Messaging 1
Table 4-1 Motion Properties and Functions Axis Properties Vector Properties Group Properties CAN Input Properties General Functions VAC flr ba
Maestro Software Manual Ethernet/IP Communication MAN-MASSW (Ver. Q) 11-8 5. Click on OK to complete the operation. The Workspace window of the EIP
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,
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 exampl
Maestro Software Manual Ethernet/IP Communication MAN-MASSW (Ver. Q) 11-11 Figure 11-14: Set Attribute Single Message Configuration(RSLogix5000) F
Maestro Software Manual Ethernet/IP Communication MAN-MASSW (Ver. Q) 11-12 Figure 11-17: Add Assembly Dialog with Members' Collection 7. Pr
Get Assembly member syntax is [Assembly Name] . [Member Name] = [const value, expression] [Assembly Name][Member Index] = [const value, expression] Fo
Maestro Software Manual Ethernet/IP Communication MAN-MASSW (Ver. Q) 11-14 The Maestro can call “@eipevent()” callback for Assembly data changing no
Maestro Software Manual Ethernet/IP Communication MAN-MASSW (Ver. Q) 11-15 Assembly objects can have one of following direction types: • Consuming-
Maestro Software Manual Ethernet/IP Communication MAN-MASSW (Ver. Q) 11-16 11.7 Class 3 (connected) messaging server Ethernet/IP Adapter implemen
Maestro Software Manual Ethernet/IP Communication MAN-MASSW (Ver. Q) 11-17 For removing Adapter Tag use context menu (Fig. 11-20). Figure 11-20
Axis Functions 2D, 3D & Group Vector Functions Group Functions CAN Configuration Tools (Functions) Maestro I/O Functions addcircle pl
11.7.2.2 Maestro Program Get Tag syntax is [Adapter Tag Name] [Adapter Tag Name][index] For example: int i, j, n … i = tINT j = iTag4[0] n = iTa
Maestro Software Manual MAN-MASSW (Ver. Q) 12-1 Chapter 12: MODBUS Implementation MODBUS Application Protocol Specification V1.1b (http://www.MODBU
Maestro Software Manual Ethernet/IP Communication MAN-MASSW (Ver. Q) 12-2 12.1 Master (Client) functionality implementation The MODBUS master objec
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 sendi
12.3.1 MODBUS Master Object Communication Control Functions NOTE: Here the iStaticArray – int static array is defined by the user To use Static Arra
Parameters: coilAddress – coil (discrete output) address (range: 1 - 65536) Returns: Content of selected coil (range: 0-1) Example: masterObj.readCoil
4. int retVal = writeMultipleCoils(int startReference, int ::iStaticArray , int num) MODBUS function code 15. Writes binary values into a sequence o
Returns: 0 on success or error code. Example: masterObj.readDiscreteInputs(1, ::iStaticArray, 10) 12.3.3 MODBUS Master Object 16-bit Access Functi
3. int retVal = writeSingleRegister(int address, int val) MODBUS function code 06. Writes a value into a single output register (holding register, 4:
6. int retVal = readWriteRegisters( int readAddress, int ::iStaticArrayToRead , int readNum, int writeAddress, int ::iStaticArrayToWri
4.1 General Functions Note: Entering a question mark from the terminal before any function name opens the help text for the function. (Terminal onl
Maestro Software Manual Ethernet/IP Communication MAN-MASSW (Ver. Q) 12-10 8. int retVal = readInputRegisters(int startAddress, ,::iStaticArray,
Maestro Software Manual Ethernet/IP Communication MAN-MASSW (Ver. Q) 12-11 • ASCII over Serial communication Parameters: o MODBUS address (view p
Example: slave.shutdownServer() int retVal = isStarted() Returns if server has been started up Example: if(slave.isStarted()) slave. shutdownServ
Parameters: address – input register reference (range: 1 - 65536) Example: intVal= slave.inputRegisters[i] Coils data access (Table 0:00000): Data Ac
Maestro Software Manual Ethernet/IP Communication MAN-MASSW (Ver. Q) 12-14 Below is a screenshot of the Workspace Window MODBUS View page (Figure 12
Maestro Software Manual Ethernet/IP Communication MAN-MASSW (Ver. Q) 12-15 12.5.3 MODBUS Serial Master MODBUS Serial Master can be added using the
Maestro Software Manual Ethernet/IP Communication MAN-MASSW (Ver. Q) 12-16 After setting the Communication Parameters and User’s Data Size, click O
After setting the Communication Parameters and User’s Data Size, click OK to create the appropriate members of the MODBUS slave: 1. coils 2. discre
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(cl
Error code Error message Possible error reason 67 Serial port already open The serial port defined for the open operation is already opened by anoth
Function dynamicip – configures the Maestro Network Parameters to work with a DHCP Server (dynamic IP addressing) Call Format dynamicip Return Value
Error code Error message Possible error reason occur if the slave device does not reply in time or does not reply at all. A wrong unit address will a
Chapter 13. Node DS301 Command Reference This chapter describes the Maestro object Node DS301, its functionality and the available CANopen objects. N
13.213.313.4 Sync and Timestamp This function is common to other protocols besides DS301. See section 5.6.3 Callback (interrupt) Functions. Emergen
13.513.6Maestro Software Manual Node DS301 Command Reference MAN-MASSW (Ver. Q) Initialization of Callback Functions: Receive PDO This function im
Example: node1. listenpdo (1,0,0,0)//listen only PDO1 ... // PDO handler calls then a new PDO Transmit message occurs. function @pdo(int address
13.813.9Maestro Software Manual Node DS301 Command Reference MAN-MASSW (Ver. Q) Download SDO - 16 bit This function implements SDO download data (
13.1013.11Maestro Software Manual Node DS301 Command Reference MAN-MASSW (Ver. Q) Upload SDO - 8 bit This function implements SDO upload data (8
13.1213.13Maestro Software Manual Node DS301 Command Reference MAN-MASSW (Ver. Q) Upload SDO - 32 bit This function implements SDO upload data (
Chapter 14: Maestro Message Queue In the user host program, messages can be retrieved from the Maestro Motion Controller via two different methods. O
Method Description Call Format and Parameters CheckSubscription: Check the subscription status CheckSubscription ([in]DWORD dwIP,[out]DWORD *pStatus)
Function hbperiod - set heartbeat control period Call Format hbperiod(int <bus_number>,int<period>) Parameters <bus_number> - t
3. Verify an IP address. typedef union IP_CONVERT { DWORD dw; BYTE bt[4]; } IP_CONVERT; //IP Address converting CString sIP; sIP.Format(_T(&quo
Maestro Software Manual MAN-MASSW (Ver. Q) A-1 Appendix A: Setting up the Demo Case The SimplIQ Demo & Training Case is an ideal tool for deve
Maestro Software Manual Appendix A: Setting up the Demo Case MAN-MASSW (Ver. Q) A-2 To ensure that the nodes are unique, connect to each Bassoon sep
Appendix B: Sample Programs The following sample programs are described in this appendix: • Graphic Primitives Page Line Line B-3 Circle
Page Arrays Array B-13 GroupAsArray B-13 IntArray2D B-13 VectorAsArray B-13 DrillMachine B-14 • Callbacks Functions Page Perror Callba
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 Po
v1.vdc = 28000000 //max deceleration v1.vsp=10000 // max velocity v1.circle(5000, 180, 90) // create circle v1.bg // start motion while (a1
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() a
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=100
Maestro Software Manual Appendix B: Sample Programs MAN-MASSW (Ver. Q) wait(10) end while end function function homing() int x_home_pos, y_ho
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 li
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 //Th
v1.addline ( -128000, 64000 ) v1.addcircle( 64000,180,-90 ) v1.vse = 0 v1.ends() //finish building trajectory wait(10) v1.bg //start mot
for i=10:-2:-10 //iterate i from 10 to -10 in -2 increments a=a+i*2 end for end function B.3.4 Global Variable Sample // File GlobalVar.maxl
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 func
B.3.10 Program Call // Homing with a Call function run() homing.x_pos = 0 homing.y_pos = 0 homing.run() v1.vtm=1 //enable PVT motion initiali
B.3.13 Array Samples B.3.13.1 Array // array declaration int arr[256] // Entry point of the application. function run() global int arr[] int i
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 arr
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( "Fin" ) end function // Heartbeat handler calls then a CAN node state was be changed. function @hbevent(int busId, int nodeId, int
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
Function message - post a message to the host computer (no timestamp) Call Format message(msgID, wParam, lParam) – posts a message without a times
lastData = m_din mask = 0x1 inputStatus=0 while(1) until (inputStatus==1) // wait until input interrupt is occur inputStatus=0 if (callba
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_
B.4.5.3 InputOutputTest2 //InputCallback function run() until(InputEvent.loop!=1) InputEvent.gEvent=-1 end function // Input handler calls then a
B.4.6 Motion Completed Callback Samples B.4.6.1 MCompleteCallback // AxisMotionComplete function run() global int motionStatus motionStatus=
function vectorHoming(VECTOR vector, int home_pos_x, int home_pos_y) global int motionStatus TRACE("homing vector %", vector.vid) vector
B.4.6.2 MotionCompleteTest int g_iMC // Entry point of the application. function run() // TODO: Global Variables Declaration inside the Function...
int Speed g_iAxisNum = 1 TimeOut = 5000000 Speed = -20000 if (g_iAxisNum==1) Homing (a1,TimeOut,Speed) else if (g_iAxisNum==2) Homing
init() // main loop while(test()) //move() moveTo() end while end function // Error handler calls then a runtime program // error occur. fun
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 i
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 e
Function restart - Restarts the Maestro and: • Closes all existing objects • Kills all virtual machines • Restarts the Maestro kernel • Appli
//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.
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() InitAx
v1.starts(stam) // begin trj v1.vsp = 70000 //max. velocity v1.vse = 0//70000 //end velocity v1.addline(0, -50000) //create
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.ad
B.8.4 Poin2Point function run() int count,position,multiply count=0 position = 10000 multiply = 5 // TODO: Add your specialized code here...
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
Maestro Software Manual MAN-MASSW (Ver. Q) Appendix C: Performance Considerations The Maestro can manage up to 252 axes on a standard application.
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
Maestro Software Manual MAN-MASSW (Ver. Q) D-1 Appendix D: Maestro System Errors D.1 Error Structure: Error ID structure: [error type, 2 symbols]
D.2 Common Zone Errors D.2.1 Root-level Error Codes: 0001 - Unknown Error; 0002 - Unable to create instance; 0003 - Unable to create interface; 0
Function rsauto - get (or set) the RS-232 autorun parameter Call Format rsauto() – to get the current autorun parameter rsauto(val) – to set the cu
0020 - Invalid Node Verification; 0022 - Invalid Axis Initialization; 0023 - Invalid Axis Verification; 0026 - Invalid Vector Verification; 0029 -
0080 - Target Velocity command failed; 0081 - Velocity Threshold command failed; 0082 - Velocity Threshold Time command failed; 0083 - Velocity Pol
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 f
1053 bad flow control expression in operator 'while' 29 1054 'for' without 'end' 30 1055 'while' without &
1097 illegal shift, right operand has type 'float' 73 1098 illegal bitwise operation, left operand has type 'float' 74 1099 il
1132 'switch' without 'end' 108 1133 more than one 'otherwise' 109 1134 missing label name 110 1135 bad array dime
D.4.4 Top-level Error Codes: Runtime Error Code Error description Compilation/Command Interpreter Error Code 2059 get object parameter failed 11 20
D.5.1.3 Error 0005 Message Text Input parameter error: PVT resolution undefined or inadequate: dT<1msec. Explanation The highest resolution (min
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 coor
D.5.1.11 Error 0017 Message Text Input parameter error: Smoothing mode parameter vsc undefined or inadequate. Explanation For the parameter vsc can b
Contents Chapter 1: Introduction...1-1
Function time - get (or set) the current time Call Format Time Limitations Terminal only Function tstamp - set the timestamp period Call Forma
D.5.1.14 Error 0023 Message Text Calculation error: Velocity was not calculated (line, FT, trapez. vel. profile). Explanation Line trajectory was c
D.5.1.18 Error 0041 Message Text Input parameter error: Vector velocity undefined or inadequate. Explanation Vector velocity received as input par
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
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
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 p
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 v
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
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 an
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
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
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 Comman
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 circle
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 necessar
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
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.
Property ADT - Axis Delay Time – delay the start of the "do trajectory" (dotrj) command Explanation The ADT property defines when to st
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 sp
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 dr
4.2.3 Axis Functions Motion functions apply to Maestro programs only. Axis related functions are listed below: • To call a function: <Return Val
Function error – to get motion object last error Call Format <Axis name>.isok Return Value OK: Ok () FAILED: Error message Example A2.error
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 o
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 w
Property VFP –number of lines downloaded in the first portion of a PVT trajectory Explanation SimplIQ drives work according to information that is i
5.1.4 Punctuators... 5-3 5.1.5 Operators...
Property VNT – low limit of calculated PVT trajectory step time Explanation Set/get PVT trajectory min step time Dimension Milliseconds Default 2 Lim
Property VSD – PVT trajectory smooth distance from the corner point Explanation When using VSC smoothing mode 3, VSD defines the distance from the &q
Property VTM – PVT motion initialization Explanation Used to prepare the vector for PVT motion when the trajectory is set for maximum velocity, fixed
Property VXT – high limit of the calculated PVT trajectory step time Explanation PVT trajectory maximum step time Dimension Milliseconds Default 10
Function addpoint - add PVT point to user's trajectory sequence to a Vector Call Format <Vector name>.addpoint(int <Pos X>,int <
Function clears - remove user's or polyline trajectory sequence in a vector motion object – erases previously sent commands before they are exec
Function ends - closes a polyline trajectory sequence and a sequence of user defined PVT points Call Format <Vector name>.ends() Return Value
Function splinee - closes a spline trajectory sequence for Vector2D and Vector3D objects Call Format <Vector name>.splinee() <Vector name&g
Function startp - begin user’s PVT vector trajectory sequence Call Format <Vector name>.startp() <Vector name>.startp(<Trajectory na
(counts), beginning of segment – current position Return Value OK or FAILED : Error message Example Vec1.addline(1000, 2000,400) Program examples
5.6 Functions ... 5-30 5.6.1 Function Defin
Return Value OK or FAILED : Error message Example Vec1.clears() Function detach – cancel Vector synchronization Explanation Sometimes t
Function error – request info about the last error Call Format <Vector name>.isok Return Value OK or FAILED : Error message Limitation Te
Function splinep - adds a point to the sequence of points that defines the spline trajectory Call Format <Vector name>.splinep(int <Pos X&
Parameters <Trajectory name> - name of Vector PVT table (trajectory) Return Value OK or FAILED : Error message Example v1.tr
Property GEH - CAN Encoder High Limit Explanation GEM is needed when Group works as CAN Encoder slave. The property provides Encoder limitations.
Property GTM – Group Tabulated Motion – used to initialize PVT motion for all members of a group Explanation Used to prepare the group for PVT mot
Function isok – to verify motion object status Call Format <Group name>.isok Return Value OK or FAILED : Error message Example Gr
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 bu
Return Value Vendor ID list list as CSVs or an error code Function plss_master_bt(busID,baudrate) - used to define the LSS Master bit timing busID
Function plss_sw_sel(busID,vendorID,productCode,revisionNum,serialNum) - used to switch the a specific LSS Slave to configuration mode. busID CAN
7.2 Receive Answer from Maestro ... 7-1 Chapter 8: The Recorder ...
Function m_dout – set all Maestro digital outputs (internal digital output) Call Format m_dout Parameters None Example int outputData outpu
Function m_dout.polarity, m_dout.plr – used to define polarity of Maestro digital output Call Format variable = m_dout.polarity - get polarity va
Property mlh (masklh) – input interrupt mask low-to-high change Default 0 Limitation 0 – 0xFFFFFFFF Type Unsigned integer Property msk (mask) – inpu
Chapter 5: MAXL Program Language This chapter describes how to write Maestro programs using the MAXL programming language. 5.1 Lexical Conventions T
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
5.1.4 Punctuators Punctuators in MAXL have syntactic and semantic meaning to the compiler but do not, of themselves, specify an operation that yield
Table 5-1 Operator Precedence and Associativity Operator Name or Meaning Associativity ( ) Function call Left to right . Member selection (objec
5.1.6 Literals Invariant program elements are called “literals” or “constants.” The terms “literal” and “constant” are used interchangeably here. Li
For example: i = 0x3fff; // Hexadecimal constant j = 0X3FFF; // Equal to i 5.1.6.2Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q
5.1.6.3Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) Floating-Point Constant Floating-point constants specify values that must
10.6 Profiled Torque (PT) Mode... 10-39 10.6.1 Profiled Torque (PT) Comman
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 (&quo
type name argument-list , type name type-specifier: int float Examples: int a,b // declaration global variables function run() // begin function decla
5.2.1.35.2.3.15.2.3.2Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) Definitions A definition is a unique specification of a func
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: f
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 facilitat
• 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 ‘%’(m
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.
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
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 i
Syntax multiplicative-expression : expression * expression expression / expression expression % expression expression: multiplicative-expression Th
12.5.5 MODBUS Serial Slave...12-16 12.6 MODBUS communication workflow...
5.4.1.4.4 MAXL Shift Operators The bitwise shift operators are: • Right shift (>>) • Left shift (<<) These binary operators have left-
5.4.1.4.5 MAXL Relational and Equality Operators The relational and equality operators determine equality, inequality, or relative values of their ope
5.4.1.4.5.2 Equality Operators The binary equality operators compare their operands for strict equality or inequality. Syntax equality-expression : ex
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 ar
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
5.4.2 Semantics of Expressions This section explains when, and in what order, expressions are evaluated. 5.4.2.1Maestro Software Manual MAXL Progra
5.5 Statements MAXL statements are the program elements that control how and in what order objects are manipulated. MAXL statements are executed se
5.5.1.25.5.2.1Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) Using Labels in the case Statement Labels that appear after the cas
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 expressio
otherwise TRACE (“Error attribute ”) end switch The preceding code fragment shows how switch statements can be nested. The switch statement that
B.3.8 Label and GoTo Sample...B-11 B.3.9 Order of Processing Sample ...
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 Na
break continue return goto identifier 5.5.4.15.5.4.25.5.4.35.5.4.4Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) The MAX
labeled-statement: ##identifier 5.5.4.5Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) Declaration Statements Declaration statem
declaration-statements statements Maestro Software Manual MAXL Program Language MAN-MASSW (Ver. Q) 5-31
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 >
5.6.2 Built-in Functions Table 5-7 MAXL has predefined functions. Function Name Input Argument(s) Return Argument(s) Remarks sin float float cos
sync_count SYNC messages. Default value 50. message int msgID, int data1, int data2 int Posts messages from the Maestro to the host computer. The us
• @emcy(int nodeID, int first4bytes, int second4bytes) o NodeID – CAN node identifier [1,127]. o First4bytes – first 4 bytes CAN message data. o S
Example: function @perror(int error_number) if(number == 1) TRACE (“Divided by zero! ”) end if restart end function 5.7 Virtual Machine Control
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 u
Comments to this Manuals