12.07.2015 Views

DeviceNet Programmers Guide - Copley Controls

DeviceNet Programmers Guide - Copley Controls

DeviceNet Programmers Guide - Copley Controls

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>P/N 95-00658-000Revision 2June 2008


<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>.


TABLE OF CONTENTSAbout This Manual ............................................................................................................................................................................... iii1: Requirements and Operational Overview.................................................................................................................................. 11.1: Requirements ......................................................................................................................................................................... 21.2: <strong>DeviceNet</strong> and <strong>Copley</strong> <strong>Controls</strong> Amplifiers ............................................................................................................................. 32: Amplifier Configuration Using CME 2........................................................................................................................................ 52.1: Start CME 2............................................................................................................................................................................ 62.2: Download <strong>DeviceNet</strong> Firmware............................................................................................................................................... 72.3: Configure <strong>DeviceNet</strong> Address and Baud Rate ........................................................................................................................ 92.4: View the Amplifier Hardware Type for EDS Name ................................................................................................................ 103: I/O Messaging............................................................................................................................................................................ 113.1: Overview .............................................................................................................................................................................. 123.2: I/O Command Message (Scanner-to-Amplifier) .................................................................................................................... 133.3: I/O Response Message (Amplifier-to-Scanner)..................................................................................................................... 153.4: Handshaking ........................................................................................................................................................................ 163.5: Reading Amplifier Parameters.............................................................................................................................................. 173.6: The Monitor Fields................................................................................................................................................................ 174: I/O Messages and Basic Motion Tasks .................................................................................................................................... 194.1: Control the Indexer Program................................................................................................................................................. 204.2: Home an Axis ....................................................................................................................................................................... 224.3: Start an Absolute Trap Move ................................................................................................................................................ 234.4: Start a Relative S-Curve Move.............................................................................................................................................. 244.5: Start a Jog Move .................................................................................................................................................................. 254.6: Control Camming.................................................................................................................................................................. 26A: Explicit Messages and the <strong>DeviceNet</strong> Objects ........................................................................................................................ 29A.1: Explicit Messages ................................................................................................................................................................ 30A.2: The <strong>Copley</strong> <strong>DeviceNet</strong> Objects ............................................................................................................................................ 30A.3: The Error Log Object............................................................................................................................................................ 31A.4: The File System Object........................................................................................................................................................ 32A.5: The CVM Control Object ...................................................................................................................................................... 33A.6: The Data Trace Object......................................................................................................................................................... 34B: Homing Variables and Methods ............................................................................................................................................... 37B.1: Homing Methods Overview .................................................................................................................................................. 38B.2: Legend to Homing Method Descriptions............................................................................................................................... 38B.3: Homing Method Descriptions ............................................................................................................................................... 39C: I/O Message Amplifier Parameters........................................................................................................................................... 53Parameter Descriptions ............................................................................................................................................................... 54<strong>Copley</strong> <strong>Controls</strong> Corp.i


Table of Contents<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>ii<strong>Copley</strong> <strong>Controls</strong> Corp.


ABOUT THIS MANUALOverview and ScopeThis manual describes the use of <strong>Copley</strong> <strong>Controls</strong> amplifiers on a <strong>DeviceNet</strong> network.Related DocumentationDocuments of related interest include:• CME 2 User <strong>Guide</strong> (describes the use of CME 2 amplifier commissioning software toset up and tune the amplifier)• <strong>Copley</strong> Indexer Program User <strong>Guide</strong> (describes use of Indexer Program to createmotion control sequences)• <strong>Copley</strong> ASCII Interface Programmer’s <strong>Guide</strong> (describes how to send ASCII formatcommands over an RS232 serial bus to set up and control one or more amplifiers).Links to these publications, along with hardware manuals and data sheets, can be foundunder the Documents heading ofhttp://www.copleycontrols.com/Motion/Downloads/index.html.<strong>Copley</strong> <strong>Controls</strong> software and related information can be found on:http://www.copleycontrols.com/Motion/Products/Software/index.htmlFor <strong>DeviceNet</strong> specifications, see http://www.odva.org.Comments<strong>Copley</strong> <strong>Controls</strong> Corporation welcomes your comments on this manual. Seehttp://www.copleycontrols.com for contact information.CopyrightsNo part of this document may be reproduced in any form or by any means, electronic ormechanical, including photocopying, without express written permission of <strong>Copley</strong><strong>Controls</strong> Corporation.Xenus, Accelnet, and Stepnet are registered trademarks of <strong>Copley</strong> <strong>Controls</strong> Corporation.CME 2 is a registered trademark of <strong>Copley</strong> <strong>Controls</strong> Corporation.Windows NT, 2000, and XP are trademarks or registered trademarks of the MicrosoftCorporation.Document ValidityWe reserve the right to modify our products. The information in this document is subjectto change without notice and does not represent a commitment by <strong>Copley</strong> <strong>Controls</strong>Corporation. <strong>Copley</strong> <strong>Controls</strong> Corporation assumes no responsibility for any errors thatmay appear in this document.<strong>Copley</strong> <strong>Controls</strong> Corp.iii


Federalberghi6


<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>Requirements and Operational Overview1.2: <strong>DeviceNet</strong> and <strong>Copley</strong> <strong>Controls</strong> Amplifiers<strong>Copley</strong> <strong>Controls</strong> Xenus, AccelNet, and StepNet amplifiers can be operated over a<strong>DeviceNet</strong> network by PLCs and other controllers.<strong>DeviceNet</strong> messages can be used to issue basic motion commands, such as start moveand start homing sequence, and to read and write internal amplifier parameters.<strong>DeviceNet</strong> messages can also control the amplifier’s <strong>Copley</strong> Virtual Machine (CVM)Indexer Program. The Indexer Program provides fully programmable on-board control.Low-bandwidth <strong>DeviceNet</strong> I/O messages can select and initiate Indexer Program motionsequences and then pass data to and from the Indexer Program, distributing the bulk ofmotion control overhead to the amplifier.<strong>Copley</strong>’s <strong>DeviceNet</strong> implementation supports two explicit message objects and one polledI/O message.One of the explicit message objects is allocated as part of the predefined master/slaveconnection set as defined in the <strong>DeviceNet</strong> specification. The other may be allocatedusing the Unconnected Message Manager (UCMM) protocol. These objects can be usedto access any of the supported <strong>DeviceNet</strong> objects described in Explicit Messages and the<strong>DeviceNet</strong> Objects (p. 29). One of these, the Parameter object, provides access to allamplifier parameters.<strong>Copley</strong>’s I/O messaging is described in I/O Messaging (p. 11). For sample applications ofthe I/O message protocol, see I/O Messages and Basic Motion Tasks (p.19).For more information about <strong>DeviceNet</strong>, including the <strong>DeviceNet</strong> specifications, seehttp://www.odva.org.<strong>Copley</strong> <strong>Controls</strong> Corp. 3


Requirements and Operational Overview<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>4 <strong>Copley</strong> <strong>Controls</strong> Corp.


CHAPTER2: AMPLIFIER CONFIGURATION USINGCME 2<strong>Copley</strong> <strong>Controls</strong> CME 2 software allows fast and easy commissioning of <strong>Copley</strong> <strong>Controls</strong>amplifiers. CME 2 runs on a PC and connects over the amplifier’s RS-232 serial bus.CME 2 provides access to all amplifier configuration controls. In a typical application,basic amplifier setup and configuration is performed with CME 2, and <strong>DeviceNet</strong> is usedonly to modify those parameters which change during amplifier operation.This chapter shows how to use CME 2 to:1234Start CME 2 (p. 6).Download <strong>DeviceNet</strong> Firmware (p. 7).Configure <strong>DeviceNet</strong> Address and Baud Rate (p. 9).View the Amplifier Hardware Type for EDS Name (p. 10).For more information, see the CME 2 User <strong>Guide</strong>.<strong>Copley</strong> <strong>Controls</strong> Corp. 5


Amplifier Configuration Using CME 2<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>2.1: Start CME 21Double-click the CME 2 shortcut icon on the Windows desktop to start CME 2.2 If communications were set upalready……the CME 2 Main Screen opens. If there aremultiple ports, the <strong>Copley</strong> Neighborhood root will beselected as shown below:If communications were not set up……see the screen below:Select the desired amplifier. For instance:In this case, select Serial Ports and see the <strong>Copley</strong><strong>Controls</strong> CME 2 User <strong>Guide</strong> for more set upinstructions..After an amplifier has been selected, the CME 2 Main Screen looks similar to this:(Note that the <strong>DeviceNet</strong> Address will not appear until the <strong>DeviceNet</strong> firmware has been downloaded.)If the Basic Setup options have not been chosen, the Basic Setup screen opens.6 <strong>Copley</strong> <strong>Controls</strong> Corp.


<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong> Amplifier Configuration Using CME 22.2: Download <strong>DeviceNet</strong> FirmwareThe amplifier’s flash memory holds the amplifier’s firmware. As needed, perform thefollowing steps to download the appropriate <strong>DeviceNet</strong> firmware version to the amplifier’sflash memory.The <strong>DeviceNet</strong> firmware can be obtained from:http://www.copleycontrols.com/Motion/Downloads/firmware.html.NOTE: To check the firmware version currently loaded, click the Amplifier Propertiesbutton or choose HelpAbout.Download Firmware to the Amplifier1 On the Main screen choose ToolsDownload Firmware to open the DownloadFirmware window.2 To download new firmware without saving amplifier and motor data, click Noand then proceed to Step 4.3 To save amplifier and motor data for backup purposes before downloading firmware,click Yes. Choose whether to save to disk, flash, both, or neither. Click OK to save data and continue to select a firmware image,or click Cancel to continue without saving data. If Save Data to Disk was selected, use the Save Amplifier Data to Disk screen tobrowse to the folder where you want to save the .ccx file. Then enter a name in theName field. Then click Save.When the Firmware Images window appears, proceed to Step 4.Continued…<strong>Copley</strong> <strong>Controls</strong> Corp. 7


Amplifier Configuration Using CME 2<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>…Continued:4 Use the Firmware Images window to locate and select the firmware image file.The firmware file name shown below is an example. Contact Customer Support if youneed help determining which firmware version to load:5 Click Open to begin the download. A message window displays a series of progressmessages:When the message window closes, the firmware download is complete.8 <strong>Copley</strong> <strong>Controls</strong> Corp.


<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong> Amplifier Configuration Using CME 22.3: Configure <strong>DeviceNet</strong> Address and Baud RateA <strong>DeviceNet</strong> network can support up to 64 nodes. Each node must have a unique andvalid seven-bit address (Node ID) in the range of 0-63.1 Verify that the <strong>DeviceNet</strong> bus has been cabled and terminated. <strong>Copley</strong> <strong>DeviceNet</strong>cabling and connection is identical to <strong>Copley</strong> CAN cabling and connection. See theamplifier’s CAN cabling and connection documentation.2 On the CME 2 Main screen, choose AmplifierCAN/<strong>DeviceNet</strong> Configuration.(Note that options may vary based onamplifier model and configuration.)3 Choose a Bit Rate and choose any combination of address sources (Switch, Inputs, andProgrammed Value). The address is the sum of the values from these sources.4 For each source selected, perform the additional steps described below.SourceAdditional StepsUse SwitchUse InputsUse Programmed ValueVerify the S1 switch setting. (Assigns values for Bit 0 – Bit 3 of address.)Enter the Number of inputs. Choose the input that will represent eachaddress bit.Enter the Programmed value.5 Click OK to close the screen and save the changes to flash.NOTE: <strong>DeviceNet</strong> address and bit rate changes take effect only after power-up or reset.<strong>Copley</strong> <strong>Controls</strong> Corp. 9


Amplifier Configuration Using CME 2<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>2.4: View the Amplifier Hardware Type for EDS NameThe EDS file for an amplifier will have a file name based on the amplifier’s hardware type.Note the Hardware Type before downloading the EDS file at:http://www.copleycontrols.com/Motion/Downloads/firmware.html.On the Main screen click the Amplifier Properties button or chooseAmplifierProperties. View the hardware type.10 <strong>Copley</strong> <strong>Controls</strong> Corp.


CHAPTER3: I/O MESSAGINGThis chapter describes <strong>Copley</strong>’s support of <strong>DeviceNet</strong> I/O messaging. Contents include:123456Overview (p. 12).I/O Command Message (Scanner-to-Amplifier) (p. 13).I/O Response Message (Amplifier-to-Scanner) (p. 15).Handshaking (p. 16).Reading Amplifier Parameters (p. 17).The Monitor Fields (p. 17).<strong>Copley</strong> <strong>Controls</strong> Corp. 11


I/O Messaging<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>3.1: Overview<strong>Copley</strong> <strong>Controls</strong> <strong>DeviceNet</strong> firmware supports one polled I/O message format. Thismessage can be used to enable the amplifier, clear faults and errors, start and haltmoves, and home the amplifier. It also provides access to the amplifier parametersdescribed in I/O Message Amplifier Parameters (p. 53) and access to the amplifier'sIndexer Program registers.The I/O message is configured as part of the predefined master/slave connection set, a<strong>DeviceNet</strong> standard method for allocating I/O messages through the <strong>DeviceNet</strong> object.The amplifier is the slave, and the <strong>DeviceNet</strong> scanner is the master.12 <strong>Copley</strong> <strong>Controls</strong> Corp.


<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>I/O Messaging3.2: I/O Command Message (Scanner-to-Amplifier)3.2.1: Command Message FormatThe command message consists of 8 bytes of data formatted as follows:Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0Byte 1 Reserved ClearErrorHandshakeHalt move ClearFaultsEnableByte 2Byte 3Command CodeParameter IdentifierByte 4 Reserved Monitor IDByte 5 Data Value bits 0-7Byte 6 Data Value bits 8-15Byte 7 Data Value bits 16-23Byte 8 Data Value bits 24-31See Command Message Field Details (p. 14).<strong>Copley</strong> <strong>Controls</strong> Corp. 13


I/O Messaging<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>3.2.2: Command Message Field DetailsFieldEnableClear FaultsHalt MoveHandshakeClear ErrorCommandCodeParameter IDMonitor IDDescriptionEnable Bit clear: amplifier is disabled. Enable Bit set: amplifier is enabled unlessdisabled for some other reason (such as an inactive enable input pin).A 0-1 transition of the Clear Faults Bit clears all latched amplifier faults.Halt Move Bit set: 1) any move in progress is halted and the amplifier holdsposition; 2) no new moves may be started.Helps to properly time the transfer of I/O messages between the <strong>DeviceNet</strong>scanner and the amplifier. See Handshaking (p. 16).A 0-1 transition of the Clear Error Bit clears all latched command errors.This 8-bit code is used to initiate amplifier actions. Note that command codes areonly processed when the Handshake Bit changes state. The codes are:Code Description0 No action. Can be used in a command message whose only purpose is toget the value of a parameter.1 Start a new move. First, the 32-bit value in the data bytes is set as the movedestination position, and then the move is started.2 Start a homing sequence. Before starting a homing sequence, make surethe homing parameters have been configured. See Home an Axis (p. 22).3 Reset the amplifier.4 Write to an Indexer Program register. The 32-bit value passed in the databytes is written to one of the 32 Indexer Program registers. The registernumber (0-31) is passed in the Parameter ID field.See Control the Indexer Program (p. 20).5 Read an Indexer Program register. A register number (0-31) is passed in theParameter ID field. The value of the register is returned in the data bytes ofthe response message.See Control the Indexer Program (p. 20).6 Write an amplifier parameter. The value passed in the data bytes is writtento the parameter identified in Parameter ID. This command can be used towrite to the list of parameters described inI/O Message Amplifier Parameters (p. 53).NOTES:1. This command writes the parameter value to RAM only (not flash).2. There is no “read amplifier parameter” command code. See ReadingAmplifier Parameters (p. 17).7 Update a move in progress, or start a move without setting the destinationposition. Any changes that have been made to move parameters (velocity,acceleration, etc.) by other command messages during a move will not takeeffect until this command is entered. This allows multiple move parametersto be changed at the same time. Note: S-Curve moves in progress cannotbe updated.The function of this field depends on the command code, as described below:Code Parameter ID Function4 Identifies the Indexer Program register to write to.5 Identifies the Indexer Program register to read from.6 Identifies the amplifier parameter to write to.0-3,7 Identifies the amplifier parameter to read.Note that the amplifier does not recognize a change in the value of Parameter IDuntil the Handshake Bit has changed state.Identifies a source for the Monitor Data in the response message.See The Monitor Fields (p. 17). Note that the amplifier does not recognize achange in the value of Monitor ID until the Handshake Bit has changed state.Data Value The Data Value bytes hold the 32-bit data value used with command codes 1, 4,and 6.14 <strong>Copley</strong> <strong>Controls</strong> Corp.


<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>I/O Messaging3.3: I/O Response Message (Amplifier-to-Scanner)3.3.1: Response Message FormatThe amplifier sends a response message to every command message received.The response message consists of 8 bytes of data formatted as follows:Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0Byte 1 Error Pos Limit Neg Limit Warning Hand- Move Fault EnabledshakeByte 2 Reserved Tracking Trajectory HomedByte 3 Monitor Value bits 0-7Byte 4 Monitor Value bits 8-15Byte 5 Data Value bits 0-7Byte 6 Data Value bits 8-15Byte 7 Data Value bits 16-23Byte 8 Data Value bits 24-313.3.2: Response Message Field DetailsFieldEnabledFaultMoveHandshakeWarningNeg LimitPos LimitErrorHomedTrajectoryTrackingMonitor ValueData ValueDescriptionThe Enabled Bit is set when the amplifier is enabled and cleared when the amplifier isdisabled for any reason.The Fault Bit is set when the amplifier is in a faulted state.The Move Bit is set when the motor is in motion and cleared when the axis settles intoposition at the end of the move.The response message Handshake Bit echoes the value of the Handshake Bit in theprevious command message. Helps to properly time the transfer of I/O messagesbetween the <strong>DeviceNet</strong> scanner and the amplifier. See Handshaking (p. 16).The Warning Bit is set if a warning is present in the amplifier. Warning conditionsinclude: current limiting, voltage limiting, velocity or acceleration limiting, position trackingwindow exceeded, velocity window exceeded, and phase initialization in progress.The Neg Limit Bit is set when a negative limit switch is active or a negative software limithas been violated.The Pos Limit Bit is set when a positive limit switch is active or a positive software limit isviolated.The Error Bit is set when a command sent to the amplifier causes an error. It remains setuntil the error is cleared by a 0-1 transition of the command message Clear Error Bit.The error code can be read in parameter 37, Latched I/O Command Error Code (p. 59).The Homed Bit is set if the amplifier has been successfully homed.The Trajectory Bit indicates when the amplifier’s trajectory generator is running. It is setduring a move and cleared as soon as the trajectory generator reaches the end point ofthe move. The Move Bit (Bit 2) will usually be cleared shortly after the Trajectory Bitbecause the Move Bit indicates the axis has settled into position at the end of the move.The Tracking Bit is set if the position error exceeds the tracking/settling position window.The Monitor ID value in a previous command message selects one of several 16-bitvalues to display in this field. See The Monitor Fields (p. 17).The Data Value depends on the previous command code:Code Response Message Data Value0-3, 6, 7 Value of the parameter named in the command message Parameter ID.5 Value of the Register named in the command message Parameter ID.4 Not defined.<strong>Copley</strong> <strong>Controls</strong> Corp. 15


I/O Messaging<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>3.4: HandshakingThe I/O message handshake protocol supports the proper timing of I/O messagesbetween the <strong>DeviceNet</strong> scanner and the amplifier.The <strong>DeviceNet</strong> polled I/O messaging protocol is asynchronous. The PLC puts an I/Omessage into an output register on the scanner. The scanner sends the register contentsat the polling frequency. There is no guarantee that the contents of an output register willbe updated between any two scanning intervals. Thus, the same command messagecould be sent multiple times.The handshake protocol ensures that the amplifier responds only to new commands. Theprotocol employs a single Handshake Bit (Bit 3 of the I/O message Control Byte).Amplifier Handshaking Features• The amplifier always checks the Control Byte before processing the rest of themessage.• The amplifier executes the command code only if the Handshake Bit has changedstate since the previous command. Note that the other Control Byte functions (ClearFaults, Halt Move, Clear Error, and Enable) are processed regardless of theHandshake Bit state.• The Handshake Bit should be changed AFTER all other bytes in the commandmessage have been set. This ensures that the message processed by the amplifierwill include all of the updated information.• Parameter and Monitor Data values are updated in the response message regardlessof the Handshake Bit state. The amplifier does not recognize a change in the value ofParameter ID or Monitor ID until the Handshake Bit has changed state.• The amplifier’s response message always echoes the Handshake Bit from theprevious command message.Handshake Programming on the Control Side• When sending an I/O command message, always change the value of the HandshakeBit. Otherwise, the amplifier will not execute the command. (Note the amplifier willprocess the other Control Byte functions (Clear Faults, Halt Move, Clear Error, andEnable) and update Parameter and Monitor values regardless of the Handshake Bitstate.)• If acknowledgement is required, program the controller to send the commandmessage and then wait for a response message with the same Handshake Bit setting.16 <strong>Copley</strong> <strong>Controls</strong> Corp.


<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>I/O Messaging3.5: Reading Amplifier ParametersIn most cases the response message Data Value bytes return the value of the amplifierparameter identified in the command message Parameter ID field.For instance, to start a move and retrieve the Actual Motor Position, set the commandcode to 1 [Start a Move], set Parameter ID to 11 [Actual Motor Position], and change theHandshake Bit. The response message Data Value bytes will contain the Actual MotorPosition value.Note that this method of reading parameter values can NOT be used with commandcodes 4 [Write Indexer Program Register] or 5 [Read Indexer Program Register].To retrieve a parameter value without executing a command, send a message with thedesired Parameter ID and with command code set to 0 [No Action command], and changethe Handshake Bit.3.6: The Monitor FieldsThe response message’s 16-bit Monitor Data field is used to monitor the amplifier dataspecified in the Monitor ID field of the previous command message.ID Data Returned0 Bits 0-7: The currently selected parameter ID as of the last Handshake Bit change.Bits 8-16: The most recently accepted command code as of the last Handshake Bit change.1 The state of all input pins.2 The voltage on the analog command input (millivolts).<strong>Copley</strong> <strong>Controls</strong> Corp. 17


I/O Messaging<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>18 <strong>Copley</strong> <strong>Controls</strong> Corp.


CHAPTER4: I/O MESSAGES AND BASIC MOTIONTASKSThrough examples, this chapter describes how to use I/O messages for some basicmotion tasks.Contents include: Control the Indexer Program (p. 20). Home an Axis (p. 22). Start an Absolute Trap Move (p. 23). Start a Relative S-Curve Move (p. 24). Start a Jog Move (p. 25). Control Camming (p. 26).!DANGEREnable Amplifiers with Caution.Some of the examples in this chapter include instructions to enable the amplifier.In the examples, it is assumed that the instructions will be performed in a context inwhich enabling the amplifier is safe.Before enabling an amplifier make sure that the action will not cause unexpectedmotion.Failure to heed these warnings can cause equipment damage, injury, or death.<strong>Copley</strong> <strong>Controls</strong> Corp. 19


I/O Messages and Basic Motion Tasks<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>4.1: Control the Indexer ProgramThe <strong>Copley</strong> Virtual Machine (CVM) Indexer Program is an embedded controller that allowsusers to create up to 32 motion sequences. A sequence has one or more steps that cancombine homing instructions, moves, gains adjustments, and timed delays. Sequencesteps can also control the amplifier’s digital outputs and monitor the digital inputs.The Indexer also has 32 registers that can be programmed to select and executesequences and pass numeric parameters to the program. These registers can be readand written by <strong>DeviceNet</strong> I/O messages, as shown in the examples below.4.1.1: Write and Read Indexer Registers Send a command message to write the value 1400 to Indexer Program register 15.Byte Value Comments0 Control 0x09 Bit 0 [Enable] Set to 1 to enable the amplifier.Bit 3 [Handshake] Assume here that the previous handshake valuewas 0, so set the Handshake Bit to 1.*Binary 00001001 = 0x09.1 Command 0x04 Set Command to 4 [Write an Indexer Program Register]. 4 = 0x04.2 Parameter ID 0x0F ID of the Register to write to. In this example, 15. 15 = 0x0F.3 Monitor ID 0x-- Specifies values to monitor in the response message.***4 0x78 Set the register value.5 0x05 Example shows 1400. 1400 = 0x 00 00 05 78.Data6 0x0070x00 Send an I/O command message to read the value of Indexer Program register 16.Byte Value Comments0 Control 0x01 Bit 0 [Enable] Set to 1 to enable the amplifier.Bit 3 [Handshake] Assume here that the previous handshake valuewas 1, so set the Handshake Bit to 0.*Binary 00000001 = 0x01.1 Command 0x05 Set Command to 5 [Read an Indexer Program Register]. 5 = 0x05.2 Parameter ID 0x10 ID of the Register to write to. In this example, 16. 16 = 0x10.3 Monitor ID 0x-- Specifies values to monitor in the response message.**4 0x00 Data bytes are ignored.5 0x00Data6 0x0070x00* See Handshaking (p. 16). *** See The Monitor Fields (p.17).20 <strong>Copley</strong> <strong>Controls</strong> Corp.


<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>I/O Messages and Basic Motion Tasks4.1.2: Select a Sequence and Initiate the Go CommandAny Indexer Program register can be used to select a motion sequence, trigger the Gocommand that executes the selected sequence, or both. When a register is used for bothfunctions, the sequence is identified in Register bits 0-4 and the Go command is initiatedby setting Register Bit 15.The following example assumes that Indexer Program Register 11 was programmed toselect a sequence and initiate the Go command. The I/O message is used to select andrun sequence number 5.Send a command message to select sequence 5 and trigger the Go command.Byte Value Comments0 Control 0x09 Bit 0 [Enable] Set to 1 to enable the amplifier.Bit 3 [Handshake] Assume here that the previous handshake valuewas 0, so set the Handshake Bit to 1.*Binary 00001001 = 0x09.1 Command 0x04 Set Command to 4 [Write an Indexer Program Register]. 4 = 0x04.2 Parameter ID 0x0B ID of the Register to write to. In this example, 11. 11 = 0x0B.3 Monitor ID 0x-- Specifies values to monitor in the response message.***4 0x05 Bits 0-4 [Select Indexer Sequence]: 5.Bits 5-7: Reserved.Binary 00000101 = 0x05.5 0x80 Bits 8-14: Reserved.DataBit 15 [Go]: 1.Binary 10000000 = 0x80.6 0x0070x00* See Handshaking (p. 16). *** See The Monitor Fields (p.17).Note that the Indexer program clears the Go Register’s Bit 15 before executing thesequence, requiring the control application to reset the bit before the program will executeanother sequence.For more information, see the <strong>Copley</strong> Indexer Program User <strong>Guide</strong>, which includessections titled Use a Register to Select a Sequence and Use a Register to Initiate Go.<strong>Copley</strong> <strong>Controls</strong> Corp. 21


I/O Messages and Basic Motion Tasks<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>4.2: Home an AxisThe following example uses CME 2 to configure homing parameters and then uses an I/Ocommand message to start the homing sequence.Configure homing parameters using CME 2. See Homing in the CME 2 User <strong>Guide</strong>.Send an I/O command message to enable the amplifier and command the home action.Byte Value Comments0 Control 0x09 Bit 0 [Enable] Set to 1 to enable the amplifier.Bit 3 [Handshake] Assume here that the previous handshake valuewas 0, so set the Handshake Bit to 1.*Binary 00001001 = 0x09.1 Command 0x02 Set Command Code to 2 [Start Homing Sequence]. 2 = 0x02.2 Parameter ID 0x-- Specifies the parameter whose value is returned in the responsemessage Data Value bytes.**3 Monitor ID 0x-- Specifies values to monitor in the response message.***4 0x-- No data required for the Home command. Data bytes are ignored.5 0x--Data6 0x--70x--* See Handshaking (p. 16). ** See Reading Amplifier Parameters (p. 17). ***See The Monitor Fields (p.17).NOTE: If the application requires further homing configuration after the initial CME 2amplifier setup, I/O messages can access homing configuration parameters. These areI/O message parameters 18-24, as described in I/O Message Amplifier Parameters (p.53].)22 <strong>Copley</strong> <strong>Controls</strong> Corp.


<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>I/O Messages and Basic Motion Tasks4.3: Start an Absolute Trap MoveSet Trajectory Profile Type to absolute move, Trapezoidal Profile. (Not necessary if setin previous move.)Byte Value Comments0 Control 0x09 Bit 0 [Enable] Set to 1 to enable the amplifier.Bit 3 [Handshake] Assume here that the previous handshake valuewas 0, so set the Handshake Bit to 1.*Binary 00001001 = 0x09.1 Command 0x06 Set Command Code to 6 [Write Parameter]. 6 = 0x06.2 Parameter ID 0x19 Set Parameter ID to 25 [Trajectory Profile Type]. 25 = 0x19.3 Monitor ID 0x-- Specifies values to monitor in the response message.***4 0x00 Set the Trajectory Profile Type value to 0 [Absolute Move, Trap].5 0x00Data6 0x0070x00As necessary, use a series of messages to set Profile Velocity, Acceleration, andDeceleration. In this example, set Profile Velocity 1400 (Units: 0.1 counts/sec).Byte Value Comments0 Control 0x01 Bit 0 [Enable] Set to 1 to enable the amplifier.Bit 3 [Handshake] Assume here that the previous handshake valuewas 1, so clear the Handshake Bit (0).*Binary 00000001 = 0x01.1 Command 0x06 Set Command Code to 6 [Write Parameter]. 6 = 0x06.2 Parameter ID 0x1C Set Parameter ID to 28 [Maximum Velocity]. 28 = 0x1C.3 Monitor ID 0x-- Specifies values to monitor in the response message.***4 0x78 Set the velocity. Units: 0.1 counts/sec.5 0x05 Example shows 1400. 1400 = 0x 00 00 05 78.Data6 0x0070x00Send the Move Destination and start the move:Byte Value Comments0 Control 0x09 Bit 0 [Enable] Set to 1 to enable the amplifier.Bit 3 [Handshake] Assume here that the previous handshake valuewas 0, so set the Handshake Bit to 1.*Binary 00001001 = 0x09.1 Command 0x01 Set Command Code to 1 [Start a New Move]. 1 = 0x01.2 Parameter ID 0x-- Specifies the parameter whose value is returned in the responsemessage Data Value bytes.**3 Monitor ID 0x-- Specifies values to monitor in the response message.***4 0x98 Set the Move Destination. Units: counts.5 0x3A Example shows 15000. 15000 = 0x 00 00 3A 98.Data6 0x0070x00* See Handshaking (p. 16). ** See Reading Amplifier Parameters (p. 17). ***See The Monitor Fields (p.17).<strong>Copley</strong> <strong>Controls</strong> Corp. 23


I/O Messages and Basic Motion Tasks<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>4.4: Start a Relative S-Curve MoveSet Trajectory Profile Type to relative move, S-Curve Profile. (Not necessary if set inprevious move.).Byte Value Comments0 Control 0x09 Bit 0 [Enable] Set to 1 to enable the amplifier.Bit 3 [Handshake] Assume here that the previous handshake valuewas 0, so set the Handshake Bit to 1.*Binary 00001001 = 0x09.1 Command 0x06 Set Command Code to 6 [Write Parameter]. 6 = 0x06.2 Parameter ID 0x19 Set Parameter ID to 25 [Trajectory Profile Type]. 25 = 0x19.3 Monitor ID 0x-- Specifies values to monitor in the response message.***4 0x01 Set the Trajectory Profile Type value to 257 [Relative Move, S-Curve].5 0x01 257 = 0x 00 00 01 01.Data6 0x0070x00As necessary, use a series of messages to set Velocity, Accel, Decel, and Jerk. In thisexample, set Maximum Jerk Rate 750 (Units: 100 counts/ sec 3 ).Byte Value Comments0 Control 0x01 Bit 0 [Enable] Set to 1 to enable the amplifier.Bit 3 [Handshake] Assume here that the previous handshake valuewas 1, so clear the Handshake Bit (0).*Binary 00000001 = 0x01.1 Command 0x06 Set Command Code to 6 [Write Parameter]. 6 = 0x06.2 Parameter ID 0xCF Set Parameter ID to 31 [Maximum Jerk Rate]. 31 = 0xCF.3 Monitor ID 0x-- Specifies values to monitor in the response message.***4 0xEE Set the Maximum Jerk Rate. Units: 100 counts/ sec 3 .5 0x02 Example shows 750. 750 = 0x 00 00 02 EE.Data6 0x0070x00Set the Move Distance and start the move:Byte Value Comments0 Control 0x09 Bit 0 [Enable] Set to 1 to enable the amplifier.Bit 3 [Handshake] Assume here that the previous handshake valuewas 0, so set the Handshake Bit to 1.*1 Command 0x01 Set Command Code to 1 [Start a New Move]. 1 = 0x01.2 Parameter ID 0x-- Specifies the parameter whose value is returned in the responsemessage Data Value bytes.**3 Monitor ID 0x-- Specifies values to monitor in the response message.***4 0x98 Set the Move Distance. Units: counts.5 0x3A Example shows 15000. 15000 = 0x 00 00 3A 98.Data6 0x0070x00* See Handshaking (p. 16). ** See Reading Amplifier Parameters (p. 17). ***See The Monitor Fields (p.17).24 <strong>Copley</strong> <strong>Controls</strong> Corp.


<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>I/O Messages and Basic Motion Tasks4.5: Start a Jog MoveThis jog move uses the Velocity Profile mode. The Velocity profile resembles thetrapezoidal profile, but with no target position. The move obeys acceleration, deceleration,and velocity limits, but continues as though the target position were infinite.Set Trajectory Profile Type to Velocity. (Not necessary if set in previous move.)Byte Value Comments0 Control 0x09 Bit 0 [Enable] Set to 1 to enable the amplifier.Bit 3 [Handshake] Assume here that the previous handshake valuewas 0, so set the Handshake Bit to 1.*Binary 00001001 = 0x09.1 Command 0x06 Set Command Code to 6 [Write Parameter]. 6 = 0x06.2 Parameter ID 0x19 Set Parameter ID to 25 [Trajectory Profile Type]. ]. 25 = 0x19.3 Monitor ID 0x-- Specifies values to monitor in the response message.***4 0x025 0x00Data6 0x0070x00Set the Trajectory Profile Type value to 2 [Velocity Profile Move].2 = 0x02.As necessary, use a series of I/O messages to set Velocity, Accel, and Decel. In thisexample, set Profile Acceleration to 750 (Units: 10 counts/second 2 ).Byte Value Comments0 Control 0x01 Bit 0 [Enable] Set to 1 to enable the amplifier.Bit 3 [Handshake] Assume here that the previous handshake valuewas 1, so clear the Handshake Bit (0).*Binary 00000001 = 0x01.1 Command 0x06 Set Command Code to 6 [Write Parameter].2 Parameter ID 0x1D Set Parameter ID to 29 [Maximum Acceleration Rate]. 29 = 0x1D.3 Monitor ID 0x-- Specifies values to monitor in the response message.***4 0xEE Set the Maximum Acceleration Rate. Units: 10 counts/sec 2 .5 0x02 Example shows 750. 750 = 0x 00 00 02 EE.Data6 0x0070x00Set a positive move direction and start the move:Byte Value Comments0 Control 0x09 Bit 0 [Enable] Set to 1 to enable the amplifier.Bit 3 [Handshake] Assume here that the previous handshake valuewas 0, so set the Handshake Bit to 1.*1 Command 0x01 Set Command Code to 1 [Start a New Move]. 1= 0x01.2 Parameter ID 0x-- Specifies the parameter whose value is returned in the responsemessage Data Value bytes.**3 Monitor ID 0x-- Specifies values to monitor in the response message.***4 0x015 0x00Data6 0x0070x00Set the direction of movement by entering a target position value.Use any positive value for movement in the positive direction, and anynegative value for movement in the negative direction.Example uses a value of 1 for positive movement.* See Handshaking (p. 16). ** See Reading Amplifier Parameters (p. 17). ***See The Monitor Fields (p.17).<strong>Copley</strong> <strong>Controls</strong> Corp. 25


I/O Messages and Basic Motion Tasks4.6: Control Camming<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>Camming allows <strong>Copley</strong> amplifiers to synchronize the motion of an axis (the Cam Slave)to the motion or commands of an external device (the Cam Master). A Cam Master canbe an encoder, a PLC, or any device that generates electronic pulses to indicate theposition of the Master axis. A Cam Slave is an axis controlled by a <strong>Copley</strong> amplifier. Auser defines camming moves by populating Cam Tables. Each Cam Table line contains aCam Master Position and a corresponding Slave Position. The user also configures theCam Trigger and the source of the Master input. For more information, see the <strong>Copley</strong>Camming User’s <strong>Guide</strong>.<strong>DeviceNet</strong> I/O messages can access the Camming control parameters described as I/Omessage parameters 42-45 in I/O Message Amplifier Parameters (p. 53).4.6.1: Select CAM Table and TriggerThe following example uses CME 2 for basic configuration and then uses I/O messages atrun time to select the active Cam Table and set up the Cam Trigger.Use the CME 2 Basic Setup screen to set Operating Mode to Position andPosition Loop Input to Camming Single-ended or Camming Differential.See the <strong>Copley</strong> Camming User <strong>Guide</strong>.Use the CME 2 Camming screen to: Set the Master Control Input type as appropriate for the application. Set or clear the Invert Command field as appropriate. Set Increment Position On to Rising or Falling edge as appropriate. Set Offset Forward and Reverse as appropriate. Set Startup to Camming takes control on startup. In this example, ignore the CME 2 Cam Trigger settings. They will be configuredusing an I/O message in the next step.Send an I/O command message to write the active Cam Table number in the CammingConfiguration parameter. This parameter configures the Cam Trigger, so we will usethis I/O message to set up the Trigger as well. This message also enables the amplifier.Byte Value Comments0 Control 0x09 Bit 0 [Enable] Set to 1 to enable the amplifier.Bit 3 [Handshake] Assume here that the previous handshake valuewas 0, so set the Handshake Bit to 1.*Binary 00001001 = 0x09.1 Command 0x06 Set Command Code to 6 [Write Parameter]. 6 = 0x06.2 Parameter ID 0x2A Set Parameter ID to 42 [Camming Configuration]. 42 = 0x2A.3 Monitor ID 0x-- Specifies values to monitor in the response message.***4 0x08 The Camming Configuration parameter is bit-mapped:Bits 0-3: 8 to choose Cam Table 8.Bits 4, 5: 0 [Reserved].Bit 6: 0 to choose external Cam Master.Bit 7: 0 [Reserved].Binary 00001000 = 0x08.5 Data0x1B Bits 8-11: 11. Use programmable input 11 (IN11) as trigger.Bits 12-13: 1 to choose trigger type Use Input, Edge.Bits 14, 15:0 [Reserved].Binary 00011011 = 0x1B.6 0x00 Ignored.70x00 Ignored.* See Handshaking (p. 16). ***See The Monitor Fields (p.17).26 <strong>Copley</strong> <strong>Controls</strong> Corp.


<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>I/O Messages and Basic Motion Tasks4.6.2: Adjust Camming DelayThis example shows how to use an I/O message to set the Camming Delay Forwardparameter value to 750 (Units: Master Command Counts). Assume here that Camminghas already been configured.Send the I/O message:Byte Value Comments0 Control 0x09 Bit 0 [Enable] Set to 1 to enable the amplifier.Bit 3 [Handshake] Assume here that the previous handshake valuewas 0, so set the Handshake Bit to 1.*Binary 00001001 = 0x09.1 Command 0x06 Set Command Code to 6 [Write Parameter]. 6 = 0x06.2 Parameter ID 0x2B Set Parameter ID to 43 [Camming Delay Forward]. 43 = 0x2B.3 Monitor ID 0x-- Specifies values to monitor in the response message.***4 0xEE Set Camming Delay Forward. Units: Master Command Counts.5 0x02 Example shows 750. 750 = 0x 00 00 02 EE.Data6 0x0070x00* See Handshaking (p. 16). ***See The Monitor Fields (p.17).<strong>Copley</strong> <strong>Controls</strong> Corp. 27


I/O Messages and Basic Motion Tasks<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>28 <strong>Copley</strong> <strong>Controls</strong> Corp.


CHAPTERA: EXPLICIT MESSAGES AND THEDEVICENET OBJECTSContents include: Explicit Messages (p. 30). The <strong>Copley</strong> <strong>DeviceNet</strong> Objects (p. 30).<strong>Copley</strong> <strong>Controls</strong> Corp. 29


Explicit Messages and the <strong>DeviceNet</strong> Objects<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>A.1: Explicit MessagesOne of the explicit message objects is allocated as part of the predefined master/slaveconnection set as defined in the <strong>DeviceNet</strong> specification.The other may be allocated using the Unconnected Message Manager (UCMM) protocol.These objects can be used to access any amplifier parameter.A.2: The <strong>Copley</strong> <strong>DeviceNet</strong> ObjectsThrough the use of the explicit message protocol, the following standard <strong>DeviceNet</strong>objects can be accessed.Object Name ID DescriptionIdentity 1 Identifies the amplifier as a <strong>Copley</strong> <strong>Controls</strong> servo amplifier.<strong>DeviceNet</strong> 3 The <strong>DeviceNet</strong> object allows the baud rate and MAC ID of the amplifier to beread but not written. The baud rate and MAC ID can be changed through<strong>Copley</strong>’s CME 2 software, or by accessing the appropriate amplifier parametersusing the parameter object. After changing these parameters, reset or powercyclethe amplifier.Assembly 4 The <strong>Copley</strong> <strong>Controls</strong> <strong>DeviceNet</strong> firmware currently supports one Assemblyobject, which the amplifier employs to support the use of I/O messages.Connection 5 The <strong>Copley</strong> <strong>Controls</strong> <strong>DeviceNet</strong> firmware supports two connection objects. Onewhich is used for explicit messaging and the second is used for I/O messaging.Parameter 15 The <strong>Copley</strong> <strong>Controls</strong> <strong>DeviceNet</strong> firmware allows all amplifier parameters to beaccessed through the <strong>DeviceNet</strong> standard parameter object class. There is oneParameter object instance for each amplifier variable.For the complete list of amplifier parameters, see the <strong>Copley</strong> <strong>Controls</strong> AmplifierParameter Dictionary.When parameters are set through the <strong>DeviceNet</strong> parameter objects, their valuesare only set in RAM. To store all parameter settings in non-volatile flash memory,send the SAVE service code (0x16) to the class instance of the Parameterobject. (Note that I/O messages only write to RAM.)Error Log 100 This object class is used to read from the amplifier's error log.See The Error Log Object (p. 31).File System 101 This object class allows access to the file system present in the amplifier. Thisfile system is the location where CVM programs and cam tables are stored.See The File System Object (p. 32).CVM Control 102 This object class allows various aspects of the <strong>Copley</strong> Virtual Machine (CVM) tobe controlled. See The CVM Control Object (p. 33).Data Trace 103 This object class allows access to the internal data tracing feature of theamplifier. The trace may be used to capture internal amplifier parameters in realtime and download the captured data. See The Data Trace Object (p. 34).30 <strong>Copley</strong> <strong>Controls</strong> Corp.


<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>Explicit Messages and the <strong>DeviceNet</strong> ObjectsA.3: The Error Log ObjectThe Error Log object class (class ID 100) may be used to read from the amplifier’s internalerror log. It can also be used to clear the error log.Class Instance AttributesAttribute Description1 Object revision. This always reads the value 1.2 Read-only value giving the maximum number of instances of this object. Always reads thevalue 1.Object Instance AttributesAttribute Description1 Error counter totals. This read-only attribute returns an array of 32- byte values. Each valuegives the number of errors (up to 255) of the given error type since the drive wasmanufactured.2 Error counter totals. This read-only attribute returns an array of 32-byte values. Each valuegives the number of errors (up to 255) of the given error type since the last time the error logwas cleared.3 Total number of system resets. This read-only 16-bit attribute gives the number of power/resetcycles since drive was manufactured.4 Clear error log. Writing any value to this attribute causes the error log to be cleared.Note that the totals accessed by attributes 1 [Errors since amplifier manufacture date] and 3[Resets since amplifier manufacture date] are not cleared.5 Error log index. This 16-bit read/write attribute is used to access an index value used to readthe log (see attribute 6).6 Error log entry. This read-only attribute is used to read a single entry in the error log. The entryread is identified by a zero-based index which may be set using attribute 5. The index isautomatically incremented each time attribute 6 is read. The data returned is an 8-byte errorlog entry.<strong>Copley</strong> <strong>Controls</strong> Corp. 31


Explicit Messages and the <strong>DeviceNet</strong> Objects<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>A.4: The File System ObjectThe amplifier flash memory houses a small file system which may be used to store <strong>Copley</strong>Virtual Machine (CVM) programs and cam tables. The File System object class (class ID101) may be used to access files in this file system.Each file stored in the amplifier file system is allocated two blocks of memory. One, themain data area, is used by the amplifier when running the CVM code. The other, a headerarea, is typically used to store an ASCII file name.Class Instance AttributesAttr Description1 Object revision. A 16-bit read-only value. Always set at 1.2 Number of instances. This 16-bit read-only attribute gives the maximum number of files that can bestored in the file system. In the present version of firmware this is 32.8 File system information. This read-only attribute gives some basic information about the file system.The returned data is an array of 4 16-bit values. These values contain the:• Maximum number of files that the file system can hold.• Size of each block of memory used to implement the file system.• Total number of data blocks available in the amplifier.• Number of free blocks available for new files.9 Maximum transmit words. This read/write 16-bit attribute allows the maximum number of data wordsto be controlled when reading from the file system. The value programmed here gives the maximumnumber of 16-bit words that will be sent in a single transmission by the amplifier. Its default value isto send the maximum amount possible (200 words). There is no need to change this unless the hostsystem is unable to handle a transmission of this length.Object Instance AttributesThe file system has a limited number of directory entries used to store files of variablelength. Each of these entries has an object of this type associated with it. The attributes ofthese objects are used to allocate file space, read and write data, and delete files.Internal to the amplifier, the directory entries are numbered from 0 to 31. The objectinstance numbers used to access these directory entries range from 1 to 32. Objectinstance 1 accesses directory entry 0, object instance 2 accesses directory entry 1, etc.Attr Description1 File size. This read/write attribute accesses the current size of a file. Reading this attribute returnstwo 16-bit values:The first value gives the size of the data block reserved for the file header. The file header can storefile attributes such as the file name. The second value gives the size of the file’s data area.Writing to this object allocates space for the file. The amplifier first deletes the file and thenreallocates the file space using the two 16-bit values passed. The first value gives the size of fileheader. This is limited to 255 words max. The second gives the size (in words) of the file data area.2 Access file header. This attribute allows the programmer to read and write file header information.When writing, an even number of bytes must be passed in each access.When reading data from the file, the number of 16-bit words of data sent from the drive will belimited by the value of class attribute 9, Maximum transmit words (p. 32). This value may be adjustedto reduce the size of any individual transfer.On both reads and writes, the first word of data sent will be identified by the current value of the fileposition pointer. See instance attribute 4 File position pointer (p. 32) for details.3 Access file data. This attribute is used to read and write file data. It works in the same way asattribute 2 except that it accesses the data area of the file rather then the header area.4 File position pointer. The file system maintains a 16-bit file position pointer shared among all the filesin the file system. On the first access of a particular file, the position will be set to zero. Onsubsequent accesses, the position will be adjusted so consecutive words will be read or written.Instance attribute 4 allows the position pointer to be read. It is also possible to write to the positionpointer, but only to adjust the initial position for the file's data area (not the header area). Each time adifferent file or different area of the same file is accessed, the position pointer is reset to zero.On reads of file header or data, position pointer’s initial value may be passed as extra data alongwith the 'get attribute single' service code. Send the position pointer as a 16-bit word value.32 <strong>Copley</strong> <strong>Controls</strong> Corp.


<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>Explicit Messages and the <strong>DeviceNet</strong> ObjectsA.5: The CVM Control ObjectThe CVM Control Object (object class 102) may be used to access the <strong>Copley</strong> VirtualMachine (CVM).Object Class AttributesAttribute Description1 Object revision. A 16-bit read-only value. Always set at 1.2 Number of instances. This 16-bit read-only attribute gives the number of object instances ofthe CVM Control object class. This will always return zero since the CVM Control object classdoes not have any object instances.8 Status & control. This 16-bit read/write attribute can be used to query and control CVM status.The status value returned on a read will have its least significant bit set if the CVM is currentlyexecuting a program, and cleared if it is not. Other bits in this status word are reserved forinternal use by the amplifier (which may set and clear the bits for internal purposes).Writing a zero to this attribute will stop the CVM. Writing a one will start it again. Do not writeany other values to this attribute.9 Get / run current program. Reading this 16-bit attribute returns the current CVM programnumber. Writing to it causes the specified program to be loaded into the CVM and run. TheCVM program numbers are the same as their file system file numbers. Note that CVM programnumbers range from 0 to 31.10 Get / load current program. Like attribute 9 above, but when a value is written to this attributethe program will be loaded into CVM memory space, but not started. The program may belater started by writing a 1 to attribute 8.11-13 Reserved for use by <strong>Copley</strong> <strong>Controls</strong>.14 CVM startup program number. This 16-bit read/write attribute identifies the CVM programnumber (0-31) that will be loaded and run on power-up.Writing the value 0xFFFF to this attribute prevents any CVM program from runningautomatically on amplifier startup.<strong>Copley</strong> <strong>Controls</strong> Corp. 33


Explicit Messages and the <strong>DeviceNet</strong> Objects<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>A.6: The Data Trace ObjectThe Data Trace object (object class 103) is used to access the amplifier’s data tracemechanism. (This is the mechanism that is used to implement the oscilloscope display inthe CME 2 user interface program.)The data trace mechanism allows the amplifier to record some internal parameters in realtime to local memory. This data may later be downloaded over the network. All thefollowing attributes are 16-bit values unless specified otherwise.Object Class AttributesAttribute Description1 Object revision. A 16-bit read-only value. Always set at 1.2 Number of instances. This 16-bit read-only attribute gives the number of object instances ofthe Data Trace object class. This will always return zero since the Data Trace object classdoes not have any object instances.8 Trace variable 1. This attribute is used to program the first trace variable to collect. Tracevariable codes are listed in Trace Variables (p. 35).9 Trace variable 2. Second variable to collect (set to zero for none).10 Trace variable 3.11 Trace variable 4.12 Trace variable 5.13 Trace variable 6.14, 15 Reserved.16 This attribute is used to read or write the trace status. Write 1 to start a trace, write 0 to stop it.17 This 32-bit read-only attribute gives the fundamental trace period in units of nanoseconds. Thefundamental period defines the maximum frequency that the trace system can sample data.The actual trace period is set in integer multiples of this value by programming attribute 20.18 Samples available. This read-only attribute gives the number of trace samples collected so far.19 Max samples. This read-only attribute gives the maximum number of samples that the internaltrace memory buffer can hold. Note that the maximum number of samples is dependent on thenumber and type of active trace variables. For an accurate value, the trace variables should beset first, and then the maximum number of samples available may be requested.20 Sample period. This attribute sets the trace sample period between trace samples.The sample period is set in units of fundamental trace periods (see attribute 17).21 Trigger delay. This attribute gives the delay between the trigger occurring and the start ofcaptured data. The delay is given in units of trace sample periods (see attribute 20).Note that the delay may be either positive or negative. A negative delay means that the datacaptured will precede the trigger event by the specified number of cycles. Although any inputvalue is accepted, the number of samples preceding the trigger is limited to the length of thetrace buffer and the number (and size) of channels being captured.22 Trigger type. This attribute defines the type of trigger to be used with the trace. The datawritten to this attribute is 48 bits long. It consists of a 16-bit configuration value followed by a32-bit level. See Trace Trigger Types (p. 36).23 Read the collected trace data. This read-only attribute is used to read the array of collectedtrace data from the amplifier.Two additional words of data must be passed, the (zero based) index of the first sample, andthe number of samples requested. The requested samples will be returned limited to thenumber that will fit in the internal communications buffer.Each sample consists of N variables that are each 32-bits long where N is the number ofactive channels.34 <strong>Copley</strong> <strong>Controls</strong> Corp.


<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>Explicit Messages and the <strong>DeviceNet</strong> ObjectsTrace VariablesEach of Data Trace Class Attributes 8-13 can be configured to monitor one of the tracevariables described below by programming the attribute with the code.Trace Trace VariableCode0 No data. Setting a channel to this value disables it. Disabling unused channels saves space inthe trace buffer.3 Current reading winding A (0.01 A).4 Current reading winding B (0.01 A).5 Reference A/D reading (millivolts).6 High voltage reference (0.1 volts).7 Commanded torque.8 Limited torque.9 Commanded current (D rotor axis) (0.01 A).10 Commanded current (Q rotor axis) (0.01 A).11 Actual current (X stator axis) (0.01 A).12 Actual current (Y stator axis) (0.01 A).13 Actual current (D rotor axis) (0.01 A).14 Actual current (Q rotor axis) (0.01 A).15 Current Error (D rotor axis) (0.01 A).16 Current Error (Q rotor axis) (0.01 A).17 Current Integral (D rotor axis).18 Current Integral (Q rotor axis).19 Current loop output (D rotor axis).20 Current loop output (Q rotor axis).21 Current loop output (X stator axis).22 Current loop output (Y stator axis).23 Actual motor velocity (0.1 counts/sec or 0.01 RPM if using back EMF velocity estimate).24 Commanded motor velocity.25 Limited motor velocity command.26 Velocity loop error.27 Velocity loop integral.28 Actual load position (encoder counts).29 Commanded position.30 Position loop error.31 Motor encoder position (encoder counts).32 Position loop output velocity.33 Raw input pin readings (no debounce).34 Reserved.35 Reserved.Continued…<strong>Copley</strong> <strong>Controls</strong> Corp. 35


Explicit Messages and the <strong>DeviceNet</strong> Objects<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>…Continued:Trace Trace VariableCode36 Motor phase angle (1 degree units).37 Amplifier temperature (degrees C).38 Amplifier Status Register.39 Amplifier event latch word.40 Hall sensor state.41 Position capture status register42 Index capture register.43 Load encoder velocity (0.1 counts / second).44 Velocity command from trajectory generator (0.1 counts/sec).45 Acceleration command from trajectory generator (10 counts/sec 2 ).46 The analog encoder sine input. Only valid for amplifiers with analog encoder support.47 The analog encoder cosine input. Only valid for amplifiers with analog encoder support.48 The value of the digital inputs (after debounce).49 The destination position input to the trajectory generator.50 Actual motor velocity as seen by velocity loop. This is an unfiltered version of trace variable.Trace Trigger TypesData Trace Class Attribute 22 is programmed with one of the codes below to select atrace trigger type.Type Description0 No trigger in use.1 Trigger as soon as the selected channel's input is greater then or equal to the trigger level.2 Trigger as soon as the selected channel's input is less then or equal to the trigger level.3 Trigger when the selected channel's input changes from below to above the trigger level.4 Trigger when the selected channel's input changes from above to below the trigger level.5 Trigger when any selected bits in the channel value are set. The bits are selected using the triggerlevel value as a mask.6 Trigger when any selected bits in the channel value are clear. The bits are selected using the triggerlevel value as a mask.7 Trigger any time the selected channel value changes.8 The trigger level mask selects one or more bits in the Status Register. The trigger occurs when anyof these bits change from to 1. In this mode, the channel number selected by the trigger is not used.9 Like type 8, but the trigger occurs when the bit(s) change from 1 to 0.10 Trigger on the start of the next function generator cycle. This trigger type is only useful when runningin function generator mode. The trigger channel number is not used.36 <strong>Copley</strong> <strong>Controls</strong> Corp.


APPENDIXB: HOMING VARIABLES AND METHODSContents include:SectionPageB.1: Homing Methods Overview .................................................................................................................................................. 38B.2: Legend to Homing Method Descriptions............................................................................................................................... 38B.3: Homing Method Descriptions ............................................................................................................................................... 39B.3.1: Set Current Position as Home ................................................................................................................................. 39B.3.2: Next Index ............................................................................................................................................................... 39B.3.3: Limit Switch............................................................................................................................................................. 40B.3.4: Limit Switch Out to Index......................................................................................................................................... 41B.3.5: Hardstop.................................................................................................................................................................. 42B.3.6: Hardstop Out to Index ............................................................................................................................................. 43B.3.7: Home Switch........................................................................................................................................................... 44B.3.8: Home Switch Out to Index....................................................................................................................................... 45B.3.9: Home Switch In to Index.......................................................................................................................................... 46B.3.10: Lower Home.......................................................................................................................................................... 47B.3.11: Upper Home.......................................................................................................................................................... 48B.3.12: Lower Home Outside Index ................................................................................................................................... 49B.3.13: Lower Home Inside Index...................................................................................................................................... 50B.3.14: Upper Home Outside Index ................................................................................................................................... 51B.3.15: Upper Home Inside Index...................................................................................................................................... 52<strong>Copley</strong> <strong>Controls</strong> Corp. 37


Homing Variables and Methods<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>B.1: Homing Methods OverviewThere are several homing methods. Each method establishes the:• Home reference (limit or home switch transition or encoder index pulse)• Direction of motion and, where appropriate, the relationship of the index pulse to limitor home switches.The Homing Method can selected using CME 2 or by using <strong>DeviceNet</strong> explicit or I/Omessages to write the parameter Homing Method (p. 57).As illustrated in the example Home an Axis (p. 22), the preferred method is to use CME 2for this and other configuration tasks.B.2: Legend to Homing Method DescriptionsAs highlighted in the example below, each homing method diagram shows the startingposition on a mechanical stage. The arrow line indicates direction of motion, and thecircled H indicates the home position. Solid line stems on the index pulse line indicateindex pulse locations. Longer dashed lines overlay these stems as a visual aid. Finally,the relevant limit switch is represented, showing the active and inactive zones andtransition.Mechanical Stage LimitsAxisStarting positionIndex pulse locationHome positionHHDirection of motionStarting positionIndex PulsePositive LimitSwitchSw itch inactiveSw itch activeSw itch transitionNote that in the homing method descriptions, negative motion is leftward and positivemotion is rightward.38 <strong>Copley</strong> <strong>Controls</strong> Corp.


<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>Homing Variables and MethodsB.3: Homing Method DescriptionsB.3.1: Set Current Position as Home(Homing Method Value: 512)The current position is the home position.B.3.2: Next IndexDirection of Motion: Positive (Homing Method Value: 544)Home is the first index pulse found in the positive direction. Direction of motion is positive.If a positive limit switch is activated before the index pulse, an error is generated.Index PulseHDirection of Motion: Negative (Homing Method Value: 560)Home is the first index pulse found in negative direction. Direction of motion is negative. Ifa negative limit switch is activated before the index pulse, an error is generated.Index PulseH<strong>Copley</strong> <strong>Controls</strong> Corp. 39


Homing Variables and Methods<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>B.3.3: Limit SwitchDirection of Motion: Positive (Homing Method Value: 513)Home is the transition of the positive limit switch. Initial direction of motion is positive if thepositive limit switch is inactive.Positive LimitSwitchHDirection of Motion: Negative (Homing Method Value: 529)Home is the transition of negative limit switch. Initial direction of motion is negative if thenegative limit switch is inactive.Negative LimitSwitchH40 <strong>Copley</strong> <strong>Controls</strong> Corp.


<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>Homing Variables and MethodsB.3.4: Limit Switch Out to IndexDirection of Motion: Positive (Homing Method Value: 545)Home is the first index pulse to the negative side of the positive limit switch transition.Initial direction of motion is positive if the positive limit switch is inactive (shown here aslow).HPositive LimitSwitchHIndex PulseDirection of Motion: Negative (Homing Method Value: 561)Home is the first index pulse to the positive side of the negative limit switch transition.Initial direction of motion is negative if the negative limit switch is inactive (shown here aslow).HNegative LimitSwitchHIndex Pulse<strong>Copley</strong> <strong>Controls</strong> Corp. 41


Homing Variables and Methods<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>B.3.5: HardstopDirection of Motion: Positive (Homing Method Value: 514)Home is the positive hard stop. Direction of motion is positive. The hard stop is reachedwhen the amplifier outputs the homing Current Limit continuously for the amount of timespecified in the Delay Time. If a positive limit switch is activated before the hard stop, anerror is generated.HDirection of Motion: Negative (Homing Method Value: 530)Home is the negative hard stop. Direction of motion is negative. The hard stop is reachedwhen the amplifier outputs the homing Current Limit continuously for the amount of timespecified in the Delay Time. If a negative limit switch is activated before the hard stop, anerror is generated.H42 <strong>Copley</strong> <strong>Controls</strong> Corp.


<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>Homing Variables and MethodsB.3.6: Hardstop Out to IndexDirection of Motion: Positive (Homing Method Value: 546)Home is the first index pulse on the negative side of the positive hard stop. Initial directionof motion is positive. The hard stop is reached when the amplifier outputs the homingCurrent Limit continuously for the amount of time specified in the Delay Time. If a positivelimit switch is activated before the hard stop, an error is generated.Index PulseHDirection of Motion: Negative (Homing Method Value: 562)Home is the first index pulse on the positive side of the negative hard stop. Initial directionof motion is negative. The hard stop is reached when the amplifier outputs the homingCurrent Limit continuously for the amount of time specified in the Delay Time. If anegative limit switch is activated before the hard stop, an error is generated.Index PulseH<strong>Copley</strong> <strong>Controls</strong> Corp. 43


Homing Variables and Methods<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>B.3.7: Home SwitchDirection of Motion: Positive (Homing Method Value: 610)Home is the home switch transition. Initial direction of motion is positive if the home switchis inactive. If a limit switch is activated before the home switch transition, an error isgenerated.HHome SwitchDirection of Motion: Negative (Homing Method Value: 626)Home is the home switch transition. Initial direction of motion is negative if the homeswitch is inactive. If a limit switch is activated before the home switch transition, an error isgenerated.Home SwitchH44 <strong>Copley</strong> <strong>Controls</strong> Corp.


<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>Homing Variables and MethodsB.3.8: Home Switch Out to IndexDirection of Motion: Positive (Homing Method Value: 516)Home is the first index pulse to the negative side of the home switch transition. Initialdirection of motion is positive if the home switch is inactive. If a limit switch is activatedbefore the home switch transition, an error is generated.Home SwitchIndex PulseHDirection of Motion: Negative (Homing Method Value: 532)Home is the first index pulse to the positive side of the home switch transition.Initial direction of motion is negative if the home switch is inactive. If a limit switch isactivated before the home switch transition, an error is generated.Home SwitchHIndex Pulse<strong>Copley</strong> <strong>Controls</strong> Corp. 45


Homing Variables and Methods<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>B.3.9: Home Switch In to IndexDirection of Motion: Positive (Homing Method Value: 548)Home is the first index pulse to the positive side of the home switch transition. Initialdirection of motion is positive if the home switch is inactive. If a limit switch is activatedbefore the home switch transition, an error is generated.Home SwitchIndex PulseHDirection of Motion: Negative (Homing Method Value: 564)Home is the first index pulse to the negative side of the home switch transition. Initialdirection of motion is negative if the home switch is inactive. If a limit switch is activatedbefore the home switch transition, an error is generated.Home SwitchHIndex Pulse46 <strong>Copley</strong> <strong>Controls</strong> Corp.


<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>Homing Variables and MethodsB.3.10: Lower HomeDirection of Motion: Positive (Homing Method Value: 771)Home is the negative edge of a momentary home switch. Initial direction of motion ispositive if the home switch is inactive. Motion will reverse if a positive limit switch isactivated before the home switch; then, if a negative limit switch is activated before thehome switch, an error is generated.HHHome SwitchPositive LimitSwitchDirection of Motion: Negative (Homing Method Value: 787)Home is the negative edge of a momentary home switch. Initial direction of motion isnegative. If the initial motion leads away from the home switch, the axis reverses onencountering the negative limit switch; then, if a positive limit switch is activated before thehome switch, an error is generated.HHome SwitchNegative LimitSwitchH<strong>Copley</strong> <strong>Controls</strong> Corp. 47


Homing Variables and Methods<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>B.3.11: Upper HomeDirection of Motion: Positive (Homing Method Value: 515)Home is the positive edge of a momentary home switch. Initial direction of motion ispositive. If the initial motion leads away from the home switch, the axis reverses onencountering the positive limit switch; then, if a negative limit switch is activated before thehome switch, an error is generated.HHome SwitchPositive LimitSwitchHDirection of Motion: Negative (Homing Method Value: 531)Home is the positive edge of momentary home switch. Initial direction of motion isnegative if the home switch is inactive. If the initial motion leads away from the homeswitch, the axis reverses on encountering the negative limit switch; then, if a positive limitswitch is activated before the home switch, an error is generated.HHome SwitchNegative LimitSwitchH48 <strong>Copley</strong> <strong>Controls</strong> Corp.


<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>Homing Variables and MethodsB.3.12: Lower Home Outside IndexDirection of Motion: Positive (Homing Method Value: 803)Home is the first index pulse on the negative side of the negative edge of a momentaryhome switch. Initial direction of motion is positive if the home switch is inactive. If the initialmotion leads away from the home switch, the axis reverses on encountering the positivelimit switch; then, if a negative limit switch is activated before the home switch, an error isgenerated.Home SwitchPositive LimitSwitchIndex PulseHHDirection of Motion: Negative (Homing Method Value: 819)Home is the first index pulse on the negative side of the negative edge of a momentaryhome switch. Initial direction of motion is negative. If the initial motion leads away from thehome switch, the axis reverses on encountering the negative limit switch; then, if anegative limit switch is activated before the home switch, an error is generated.HHHome SwitchHNegative LimitSwitchIndex Pulse<strong>Copley</strong> <strong>Controls</strong> Corp. 49


Homing Variables and Methods<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>B.3.13: Lower Home Inside IndexDirection of Motion: Positive (Homing Method Value: 867)Home is the first index pulse on the positive side of the negative edge of a momentaryhome switch. Initial direction of motion is positive if the home switch is inactive. If the initialmotion leads away from the home switch, the axis reverses on encountering the positivelimit switch; then, if a negative limit switch is activated before the home switch, an error isgenerated.HHHome SwitchPositive LimitSwitchIndex PulseDirection of Motion: Negative (Homing Method Value: 883)Home is the first index pulse on the positive side of the negative edge of a momentaryhome switch. Initial direction of motion is negative. If the initial motion leads away from thehome switch, the axis reverses on encountering the negative limit switch; then, if anegative limit switch is activated before the home switch, an error is generated.HHHome SwitchNegative LimitSwitchIndex Pulse50 <strong>Copley</strong> <strong>Controls</strong> Corp.


<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>Homing Variables and MethodsB.3.14: Upper Home Outside IndexDirection of Motion: Positive (Homing Method Value: 547)Home is the first index pulse on the positive side of the positive edge of a momentaryhome switch. Initial direction of motion is positive. If the initial motion leads away from thehome switch, the axis reverses on encountering the positive limit switch; then, if anegative limit switch is activated before the home switch, an error is generated.HHHome SwitchPositive LimitSwitchIndex PulseDirection of Motion: Negative (Homing Method Value: 563)Home is the first index pulse on the positive side of the positive edge of a momentaryhome switch. Initial direction of motion is negative if the home switch is inactive. If theinitial position is right of the home position, the axis reverses on encountering the homeswitch.HHHome SwitchNegative LimitSwitchIndex Pulse<strong>Copley</strong> <strong>Controls</strong> Corp. 51


Homing Variables and Methods<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>B.3.15: Upper Home Inside IndexDirection of Motion: Positive (Homing Method Value: 611)Home is the first index pulse on the negative side of the positive edge of momentaryhome switch. Initial direction of motion is positive. If initial motion leads away from thehome switch, the axis reverses on encountering the positive limit switch; then, if anegative limit switch is activated before the home switch, an error is generated.HHHome SwitchPositive LimitSwitchIndex PulseDirection of Motion: Negative (Homing Method Value: 627)Home is the first index pulse on the negative side of the positive edge of a momentaryhome switch. Initial direction of motion is negative if the home switch is inactive. If initialmotion leads away from the home switch, the axis reverses on encountering the negativelimit; then, if a negative limit switch is activated before the home switch, an error isgenerated.HHHome SwitchNegative LimitSwitchIndex Pulse52 <strong>Copley</strong> <strong>Controls</strong> Corp.


CHAPTERC: I/O MESSAGE AMPLIFIER PARAMETERSThis chapter describes the amplifier parameters that can be accessed by <strong>DeviceNet</strong> I/Omessages. I/O messages access only a subset of the complete set of amplifierparameters. This subset consists largely of those variables most likely to be changedduring amplifier use, as opposed to configuration parameters.(Note that the explicit message provides access to all amplifier parameters. For thecomplete list of amplifier parameters, see the <strong>Copley</strong> <strong>Controls</strong> Amplifier ParameterDictionary.)


I/O Message Amplifier Parameters<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>Parameter DescriptionsLegendID: The ID to use in the Parameter ID fields of I/O messages.Explicit ID: The ID to use in Explicit messages.R/W: Indicates whether the parameter is read only (RO) or read/write (RW).ID Explicit R/W DescriptionID01n/a0xA1RWRODummy parameter. Reads return zero, writes have no effect.Amplifier Status Register. Bit-mapped as described below:Continued…Bits Description0 Short circuit detected.1 Amplifier over temperature.2 Over voltage.3 Under voltage.4 Motor temperature sensor active.5 Encoder power error.6 Motor phasing error.7 Current output limited.8 Voltage output limited.9 Positive limit switch active.10 Negative limit switch active.11 Enable input not active.12 Amp is disabled by software.13 Trying to stop motor.14 Motor brake activated.15 PWM outputs disabled.16 Positive software limit condition.17 Negative software limit condition.18 Tracking error.19 Tracking warning.20 Amplifier is currently in a reset condition.21 Position has wrapped. The Position variable cannot increase indefinitely. Afterreaching a certain value the variable rolls back. This type of counting is calledposition wrapping or modulo count.22 Amplifier fault. An amplifier fault that was configured as latching has occurred.For information on latching faults, see the CME 2 User <strong>Guide</strong>.23 Velocity limit has been reached.24 Acceleration limit has been reached.25 Position error is outside of tracking window.26 Home switch is active.27 In motion. This bit is set if the trajectory generator is running a profile OR theposition error is outside the tracking window. The bit is clear when the amplifier issettled in position.28 Velocity window. Set if the absolute velocity error exceeds the velocity windowvalue.29 Phase not yet initialized. Set when the amplifier has not yet initialized its phasewhile phasing with no halls.30, 31 Not defined.54 <strong>Copley</strong> <strong>Controls</strong> Corp.


<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>I/O Message Amplifier Parameters…Continued:ID ExplicitIDR/W2 0x25 RWContinued…DescriptionAmplifier Desired State. This parameter selects between position, velocity and currentmodes. For most applications it should be left at the default value configured using CME 2.Value Description0 Disabled.1 The current loop is driven by the programmed current value.2 The current loop is driven by the analog reference input.3 The current loop is driven by the PWM & direction input pins.4 The current loop is driven by the internal function generator.11 The velocity loop is driven by the programmed velocity value.12 The velocity loop is driven by the analog reference input.13 The velocity loop is driven by the PWM & direction input pins.14 The velocity loop is driven by the internal function generator.21 In servo mode, the position loop is driven by the trajectory generator.22 In servo mode, the position loop is driven by the analog reference input.23 In servo mode, the position loop is driven by the digital inputs (pulse & direction,master encoder, etc).24 In servo mode, the position loop is driven by the internal function generator.25 In servo mode, the position loop is driven by the camming function.30 In servo mode, the position loop is driven by the CANopen interface.31 In microstepping mode, the position loop is driven by the trajectory generator.32 In microstepping mode, the position loop is driven by the analog reference input.33 In microstepping mode, the position loop is driven by the digital inputs (pulse &direction, master encoder, etc).34 In microstepping mode, the position loop is driven by the internal functiongenerator.35 In microstepping mode, the position loop is driven by the camming function.40 In microstepping mode, the amplifier is driven by the CANopen interface.42 Micro-stepping diagnostic mode. The current loop is driven by the programmedcurrent value, and the phase angle is micro-stepped.<strong>Copley</strong> <strong>Controls</strong> Corp. 55


I/O Message Amplifier Parameters<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>…Continued:ID Explicit R/W DescriptionID3 0xA7 RO Input States. The high/low states of the amplifier’s programmable digital inputs. Each bitrepresents an input number. Bit 0 = Digital Input 1 (IN1), Bit 1 = IN2, etc. up to INn, thenumber of digital inputs on the amplifier. Additional bits are ignored.If an input is high, the corresponding bit is set to 1. If the input is low, the corresponding bitis set to 0. For instance, if the value of 0xa6 is 33, the binary equivalent is 100001,showing that IN1 and IN6 are high and the other inputs are low.4 0xAC RW Output States. Reads the high/low state of all output pins. Each bit represents an inputnumber. Bit 0 = digital output 1 (OUT1), Bit 1 = OUT2, etc., up to OUTn, the number ofdigital outputs on the amplifier. Additional bits are ignored.Also, outputs which have been configured for program control can be set by writing to thisparameter. Set a bit to activate the output. It will be activated high or low according to how itwas programmed. If an output was not configured for program control it will not affected.5 0x39 RO Actual Motor Current. Units: 0.01 A.6 0x26 RO Current Loop Limited Current. Units: 0.01 A.7 0x03 RO Programmed Current Value. Used only in Programmed Current mode(Amplifier Desired State = 1). Units: 0.01 A.8 0x19 RO Actual Motor Velocity. Units: 0.1 counts/sec.9 0x2A RO Limited Velocity (output of position loop). Units: 0.1 counts/sec.10 0x30 RO Programmed Velocity Command. Only used in Programmed Velocity Mode(Amplifier Desired State = 11). Units: 0.1 counts/sec.11 0x18 RO Actual Motor Position. Units: counts.12 0x2E RO Limited Position. A trajectory generator output. Units: counts.13 0x3C RO Profile Velocity. A trajectory generator output. Units: 0.1 counts/sec.14 0x3D RO Profile Acceleration. A trajectory generator output. Units: counts/sec 2 .15 0x1E RO Analog Input Voltage. Some amplifier models include a +/- 10V analog input which can beread through this parameter. Units: millivolts.16 0x1F RO Bus Voltage. Units:0.1 V.17 0x21 RO Amplifier Temperature. Units: degrees C.Continued…56 <strong>Copley</strong> <strong>Controls</strong> Corp.


<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>I/O Message Amplifier Parameters…Continued:ID Explicit R/W DescriptionID18 0xC3 RW Homing Method. Select a homing method and direction using the values below. For fulldescription of homing methods, see Homing Method Descriptions (p. 39).Method Start Direction ValueSet Current Position as Home ----- 512Next IndexPositive 544Negative 560Limit SwitchPositive 513Negative 529Limit Switch Out to IndexPositive 545Negative 561Home SwitchPositive 514Negative 530Home Switch Out to IndexPositive 546Negative 562Home Switch In to IndexPositive 610Negative 626Hard StopPositive 516Negative 532Hard Stop Out to IndexPositive 548Negative 564Lower HomePositive 771Negative 787Upper HomePositive 515Negative 531Lower Home Outside IndexPositive 803Negative 819Lower Home Inside IndexPositive 867Negative 883Upper Home Outside IndexPositive 547Negative 563Upper Home Inside IndexPositive 611Negative 6270xC4 RW Homing Velocity (fast moves). Units: 0.1 counts/sec.20 0xC5 RW Homing Velocity (slow moves). Units: 0.1 counts/sec.21 0xC6 RW Homing Acceleration/Deceleration. Units: 10 counts/second 2 .22 0xC7 RW Home Offset. Units: counts.23 0xC8 RW Homing Current Limit (used with home to hard stop mode only). Units: 0.01 A24 0xC0 RW Homing Current Delay Time (used with home to hard stop mode only). Units: milliseconds.25 0xC9 RW Trajectory Profile Type.0 = Absolute move, trapezoidal profile.1 = Absolute move, S-curve profile.256 = Relative move, trapezoidal profile.257 = Relative move, S-curve profile.2 = Velocity profile.Continued…<strong>Copley</strong> <strong>Controls</strong> Corp. 57


I/O Message Amplifier Parameters<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>…Continued:ID Explicit R/W DescriptionID26 0xCA RO Trajectory Status Register. Bit-mapped as shown here:Bit Description0-10 Reserved for future use.11 Homing error. If set an error occurred in the last home attempt.Cleared by a home command.12 Referenced. Set if a homing command has been successfully executed.Cleared by a home command.13 Homing. Set when the amplifier is running a home command.14 Set when a move is aborted. Cleared at the start of the next move.15 In-Motion Bit. If set, the trajectory generator is presently generating aprofile.27 0xCB RW Position Command. Units: Counts. Meaning depends on move type:Relative move = the distance of the move.Absolute move = the target position of the move.Velocity move = 1 for positive direction, -1 for negative direction.28 0xCC RW Maximum Velocity. Units: 0.1 counts/sec.29 0xCD RW Maximum Acceleration Rate. Units: 10 counts/second 2 .30 0xCE RW Maximum Deceleration Rate. Units: 10 counts/second 2 .31 0xCF RW Maximum Jerk Rate. Units: 100 counts/ second 3 .32 0x3E RO Commanded Position. Units: Counts.33 0xB9 RW Positive Software Limit. Units: Counts.34 0xBA RW Negative Software Limit. Units: Counts.35 0xBF RW Software Limit Acceleration. Units: 10 counts/second 2 .Continued…58 <strong>Copley</strong> <strong>Controls</strong> Corp.


<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>I/O Message Amplifier Parameters…Continued:ID Explicit R/W DescriptionID36 n/a RO Latched I/O Command Error Code. When an I/O command causes one of the followingamplifier errors, the respective code is returned in this parameter. The I/O responsemessage Error Bit remains set until cleared by a 0-1 transition of the command messageClear Error Bit.Code Description0 No Error. The command was performed successfully.1 Too much data passed with command.2 Bad checksum on input command.3 Unknown command code.4 Not enough data was supplied with the command.5 Too much data was supplied with the command.6 Flash erase failed.7 Flash write failed.8 Attempt to access a bad memory group.9 Unknown variable ID.10 Data value out of range.11 Attempt to modify read-only variable14 Unknown axis state.15 Variable doesn’t exist on requested page.16 Reserved.17 Data flash failed CRC check.18 Illegal attempt to start a move while currently moving19 Illegal velocity limit for move.20 Illegal acceleration limit for move.21 Illegal deceleration limit for move.22 Illegal jerk limit for move.23 Trajectory buffer under flowed during move.24 Trajectory buffer overflowed when adding data.25 Invalid trajectory mode.26 CVM Program location already in use.27 Command is not allowed while CVM is running28 CVM Program too big to upload.29 CVM file system error.30 Specified CVM Program does not exist.31 Invalid node ID for serial port forwarding.32 CAN Network communications failure.33 ASCII command parsing error.34 Internal amplifier error.Continued…<strong>Copley</strong> <strong>Controls</strong> Corp. 59


I/O Message Amplifier Parameters<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>…Continued:ID Explicit R/W DescriptionID37 0xA5 RO Fault Register. Bit-mapped to show latching faults that have occurred in the amplifier.When a latching fault is present, the I/O response message Fault Bit remains set. Thefaults can be cleared by a 0-1 transition of the command message Clear Faults Bit.Bit Fault Description0 Fatal hardware error: the flash data is corrupt (CRC error).1 Fatal hardware error: A/D offset is out of range.2 Short Circuit.3 Amp Over Temperature.4 Motor Over Temperature.5 Over Voltage.6 Under Voltage.7 Feedback Error.8 Motor Phasing Error.9 Following Error.10 Over Current (Latched).38 0x6D RW Position Capture Control Register. Sets up position capture based on the index or homeswitch input. Bit-mapped as follows:Bit Description0 If set, the index position is captured on the falling edge of the index.1 If set, the index position is captured on the rising edge of the index.2 If set, a captured index position will not be overwritten by a new position until ithas been read. If clear, new positions will overwrite old positions.3,4 Reserved.5 If set, capture falling edges of the home switch input transition; if clear, capturerising edges.6 If set, a captured home switch input position will not be overwritten by a newposition until it has been read. If clear, new positions will overwrite old positions.39 0x6E RO Position Capture Status Register. Shows the current status of the index or home switchcapture mechanism. Bit-mapped as follows:Bit Description0 If set, an index position has been captured. Cleared when the captured positionis read.1,2 Reserved.3 If set, a new index transition occurred when a captured position was alreadystored. Depending on the mode programmed in Bit 2 of the Position CaptureControl Register, the new position may have been discarded, or overwritten thepreviously stored position.4 If set, new home switch transition data has been captured.5,6 Reserved.7 If set, a new home switch input transition occurred when a captured position wasalready stored. Depending on the mode programmed in Bit 6 of the PositionCapture Control Register, the new position may have been discarded, oroverwritten the previously stored position.40 0x69 RO Captured Index Position. Units: counts. Provides the position that the axis was in when anindex pulse was captured. Can be configured by setting bits in the Position Capture ControlRegister, and the status of the captured data can be checked in the Position CaptureStatus Register. Reading this variable resets bits 0 & 3 of the Position Capture StatusRegister.41 0x10B RO Captured Home Position. Units: counts. Provides the position that the axis was in when aninput pin configured as a home switch input became active. Can be configured by settingbits in the Position Capture Control Register, and the status of the captured data can bechecked in the Position Capture Status Register.Reading this variable resets bits 4 & 7 of the Position Capture Status Register.Continued…60 <strong>Copley</strong> <strong>Controls</strong> Corp.


<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>I/O Message Amplifier Parameters…Continued:ID Explicit R/W DescriptionID42 0x106 RW Camming Configuration. Configures camming feature. Bit-mapped as follows:Bits Description0-3 Number of the Cam Table to use (0-9).4,5 Reserved6 If set, use the internal generator.If clear, use digital command input as configured in using CME 2 Cammingcontrols or explicit message variable 0xA7.The internal generator runs at constant velocity programmed in variable 0x109.7 Reserved.8-11 Input number to use as trigger.Note: a value of 0 selects input 1, value of 1 selects input 2, etc.12- Camming trigger type:13Code Type0 None (Continuous): The active Cam Table is repeated continuously.1 Use Input, Edge: The active Cam Table begins executing on the risingedge of the input pin selected by bits 8-11.2 Use Input, Level: The active Cam Table will run as long as the inputselected by bits 8-11 is high.3 Use Master (Secondary) Encoder Index: The active Cam Table isexecuted when the amplifier receives an index pulse from the Masterencoder. Index pulses received during execution are ignored.For an example, see Select CAM Table and Trigger (p. 26).For more information, see the <strong>Copley</strong> Camming User <strong>Guide</strong>.43 0x107 RW Camming Delay Forward. Units: master command counts. For an example, seeAdjust Camming Delay (p. 27).44 0x108 RW Camming Delay Reverse. Units: master command counts.45 0x109 RW Camming Master Velocity. Units: 0.1 counts/sec.<strong>Copley</strong> <strong>Controls</strong> Corp. 61


<strong>Copley</strong> <strong>DeviceNet</strong> Programmer’s <strong>Guide</strong>P/N 95-00658-000Revision 2June 2008 2006, 2007, 2008<strong>Copley</strong> <strong>Controls</strong> Corporation20 Dan RoadCanton, MA 02021 USAAll rights reserved

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!