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...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

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.

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

Saved successfully!

Ooh no, something went wrong!