OPTO 22 SNAP PAC MOTION CONTROL User Manual

Motion module; breakout board; optomotion command set
Table of Contents

Advertisement

Quick Links

SNAP PAC MOTION CONTROL
USER'S GUIDE
SNAP-SCM-MCH16 Motion Module
SNAP-SCM-BB4 Breakout Board
OptoMotion Command Set
Form 1673-170718—July 2017
43044 Business Park Drive
Temecula
CA 92590-3614
Phone: 800-321-OPTO (6786) or 951-695-3000
Fax: 800-832-OPTO (6786) or 951-695-2712
www.opto22.com
Product Support Services
800-TEK-OPTO (835-6786) or 951-695-3080
Fax: 951-695-3017
Email: support@opto22.com
Web: support.opto22.com

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the SNAP PAC MOTION CONTROL and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for OPTO 22 SNAP PAC MOTION CONTROL

  • Page 1 SNAP PAC MOTION CONTROL USER’S GUIDE SNAP-SCM-MCH16 Motion Module SNAP-SCM-BB4 Breakout Board OptoMotion Command Set Form 1673-170718—July 2017 43044 Business Park Drive Temecula CA 92590-3614 • • Phone: 800-321-OPTO (6786) or 951-695-3000 Fax: 800-832-OPTO (6786) or 951-695-2712 www.opto22.com Product Support Services...
  • Page 2 Specifications are subject to change without notice. Opto 22 warrants all of its products to be free from defects in material or workmanship for 30 months from the manufacturing date code. This warranty is limited to the original cost of the unit only and does not cover installation, labor, or any other contingent costs.
  • Page 3: Table Of Contents

    Setting Up the SNAP-SCM-MCH16 Module ..........12 SNAP PAC Motion Control User’s Guide...
  • Page 4 Commands in Alphabetical Order ............38 Appendix: SNAP-SCM-MCH16 Conversion Formulas ....111 SNAP PAC Motion Control User’s Guide...
  • Page 5: Chapter 1: Overview

    SNAP-SCM-MCH16 module allows a SNAP PAC controller running a PAC Control™ programming strategy to control up to 16 stepper motors. The module snaps into an Opto 22 SNAP PAC mounting rack right beside digital and analog modules. LED indicators are provided to indicate Transmit and Receive on each port.
  • Page 6: Software Availability

    For more information, see the PAC Project Data Sheet. Software Availability PAC Project Basic is included with SNAP PAC controllers and is a free download from the Opto 22 website. PAC Project Professional is available for purchase on a CD with both Acrobat PDF format and printed documentation.
  • Page 7: Related Documentation

    If you have problems installing or using SNAP PAC Motion Control Subsystem, first check this guide and the Troubleshooting section of the user’s guide for your Opto 22 hardware. If you cannot find the help you need in the guides or on the Opto 22 website, contact Opto 22 Product Support. Phone:...
  • Page 8 FOR HELP SNAP PAC Motion Control User’s Guide...
  • Page 9: Chapter 2: Specifications

    Torque, connector screws 5.26 in-lb (0.6 N-m) Agency Approvals UL, CE, RoHS, DFARS Warranty 30 months 1. Each breakout board is powered by a separate power supply. 2. Breakout board uses power from the module. SNAP PAC Motion Control User’s Guide...
  • Page 10: Module Bias And Termination

    This will happen if more than one breakout board is connected without additional power supplies, or there is a short in the system. Tx: transmitting data Status: shows module status. This LED blinks twice when the kernel is started. Rx: receiving data SNAP PAC Motion Control User’s Guide...
  • Page 11: Breakout Board Specifications

    Power and Serial LEDs The power and serial LEDs indicate Serial the following: +3.3V Power Axis LEDs There is one set of LED indicators for Pulse each axis that indicates the following: Encoder +Limit –Limit SNAP PAC Motion Control User’s Guide...
  • Page 12: Breakout Board Connector Pins

    VMod AxisOut+ AxisOut- J5 (and J8, J11, & J14): Stepper Motor Inputs J3 (and J6, J9, & J12): Encoder Signal Inputs Description Description PosLimit QuadA+ QuadA- NegLimit QuadB+ AxisIn QuadB- Index+ Index- Home+ Home- SNAP PAC Motion Control User’s Guide...
  • Page 13: Breakout Board Switches

    Switch 6 Address (ADDR0) (ADDR1) FromHost Termination FromHost Termination * Set both switches to VMod/Aux +8-24Vin VMod/Aux +8-24Vin ON for VMod, or both to Select* Select* OFF for Aux +8-24Vin. ADDR0 ADDR0 ADDR1 ADDR1 SNAP PAC Motion Control User’s Guide...
  • Page 14: If Pull-Up Resistors Are Not Used

    I/O modules. For more information and power requirements worksheets, see the SNAP I/O Wiring Guide (form 1403) as well as the wiring appendices in the brain or controller’s user’s guide. SNAP PAC Motion Control User’s Guide...
  • Page 15: Chapter 3: Hardware Quick Start

    • RS-422/485 serial cable (see • PC running Opto 22 PAC Project software version 8.0 or newer • SNAP PAC rack-mounted controller or brain with firmware version 8.0 or newer. NOTE: The I/O unit must be part of a system using PAC Control on a SNAP PAC controller.
  • Page 16: Setting Up The Snap-Scm-Mch16 Module

    0, aligning the small slot at the base of the module with the retention bar on the rack. The module can be placed in any position on the rack. This example shows the module in position 0. position 0 Retention bar Module connectors SNAP PAC Motion Control User’s Guide...
  • Page 17 6. Make sure the rack is wired to receive 5.0 to 5.2 VDC @ 4A. Leave the power supply off at this time. For more information on power requirements, see , the SNAP I/O Racks Data Sheet. SNAP PAC Motion Control User’s Guide...
  • Page 18: Removing A Module

    3. Squeeze the module tool against the module to open the release latch, and pull straight up on the module to remove it. SNAP PAC Motion Control User’s Guide...
  • Page 19: Configuring The Breakout Board

    3. Enable Axis 0 by setting S3 to the Enabled position. If you are using the Electronic Gearing example strategy (see page 24), enable Axis 1 too by setting S5 to the Enabled position. Enabled S3 (and S5) SNAP PAC Motion Control User’s Guide...
  • Page 20 Version of the Controller or Brain” on page 19. If not (as indicated by the STAT LED on controller or brain blinking orange), assign an IP address by following the steps in the next section. SNAP PAC Motion Control User’s Guide...
  • Page 21: Assigning An Ip Address To The Controller Or Brain

    2. Choose Start > Programs > Opto 22 > PAC Project > PAC Manager. 3. Choose Tools > Assign IP Address. In the dialog that opens you should see the device’s MAC address. Addresses of other Opto 22 Ethernet-based devices without IP addresses might appear as well.
  • Page 22 If you don’t see a reply, make sure the subnet mask you’ve assigned matches the subnet mask on your PC. 10. For future reference, write the IP address next to the MAC address on the white sticker provided on the device, then close the DOS window. SNAP PAC Motion Control User’s Guide...
  • Page 23: Checking The Firmware Version Of The Controller Or Brain

    Next you will check to make sure the controller or brain is running firmware version 8.0 or newer. Checking the Firmware Version of the Controller or Brain 1. Choose Start > Programs > Opto 22 > PAC Project > PAC Manager. 2. In the PAC Manager main window, click Inspect 3.
  • Page 24: Component Connection Schematic

    RS-422/485 serial link Breakout board (included) SNAP-SCM-BB4 Motion host module SNAP-SCM-MCH16 J5 Inputs: - Positive limit - Negative limit - General purpose axis input J3 Encoder Amplifier/ J4 Motor driver Optional encoder Stepper motor SNAP PAC Motion Control User’s Guide...
  • Page 25: Connecting Multiple Breakout Boards

    PC running PAC Control SNAP-SCM-BB4 breakout boards Stepper motors (Up to 4 (up to 4 per module) per breakout board) SNAP-SCM-MCH16 Motion Module External power supplies are required for additional breakout boards. Controller Serial RS-422/485 SNAP PAC Motion Control User’s Guide...
  • Page 26: Daisy-Chained Breakout Boards Schematic

    Daisy-Chained Breakout Boards Schematic Use the following schematic to daisy-chain SNAP-SCM-BB4 breakout boards. SNAP-SCM-BB4 Next SNAP-SCM-BB4 Description Description TO HOST+ TO HOST+ TO HOST- TO HOST- FROM HOST+ FROM HOST+ FROM HOST- FROM HOST- SNAP PAC Motion Control User’s Guide...
  • Page 27: Chapter 4: Commands Quick Start

    How To Structure a Motion Control Strategy in PAC Control..How To Find Home .................... Moving a Set Distance..................Using a Smooth Start and Smooth Stop..........Host I/O Errors...................... How To Use the Command Details............. Entering Commands in OptoScript ............Response Format....................SNAP PAC Motion Control User’s Guide...
  • Page 28: Introduction

    Commands are sent to the SNAP-SCM-MCH16 motion module via PAC Control. The SNAP-SCM-MCH16 motion module acts as a communication link between Opto 22 controllers and the SNAP-SCM-BB4 breakout board. Using a PAC Control strategy, you open a TCP Communication Handle to the module.
  • Page 29: How To Structure A Motion Control Strategy In Pac Control

    Also see, “Entering Commands in OptoScript” on page 32 For more information on using the Transmit/Receive command, see form 1701, the PAC Control Command Reference. NOTE: It’ s not necessary to reset with every move. SNAP PAC Motion Control User’s Guide...
  • Page 30: 3: Configure Parameters

    Guide to Calculate RPMs, etc. NumberToHexString((nVelocity0 >> 16) bitand 0xFFFF, sTemp); sVelocity0 += sTemp; // Append the first data word. sVelocity0 += Chr(','); NumberToHexString(nVelocity0 bitand 0xFFFF, sTemp); sVelocity0 += sTemp; // Append the second data word. SNAP PAC Motion Control User’s Guide...
  • Page 31: 5: Close The Communication Handle

    += sTemp; // Append the second data word. nStatus = TransmitReceiveString(sPosition0, comMotionModule,sCommandResponse); // Set Breakpoint 0 setup for signal status nStatus = TransmitReceiveString(">SetBreakPointValue,0,0,0008,0000", comMotionModule, sCommandResponse); //Breakpoint 0, abrupt stop, signal status nStatus = TransmitReceiveString(">SetBreakPoint,0,0,0A20", comMotionModule, sCommandResponse) SNAP PAC Motion Control User’s Guide...
  • Page 32: Multiple Axis Example

    += sTemp; // Append the first data word. sPosition1 += Chr(','); NumberToHexString(nPosition1 bitand 0xFFFF, sTemp); sPosition1 += sTemp; // Append the second data word. nStatus = TransmitReceiveString(sPosition1, comMotionModule,sCommandResponse); // Set Breakpoint 1 setup for signal status SNAP PAC Motion Control User’s Guide...
  • Page 33: Moving A Set Distance

    >Update,0 Using a Smooth Start and Smooth Stop SetStopMode command and the breakpoint commands (such as SetBreakPoint) all have SmoothStop or AbruptStop options. Set the starting acceleration with the SetAcceleration command. For example, >SetAcceleration,0,3,FF SNAP PAC Motion Control User’s Guide...
  • Page 34: Host I/O Errors

    Limit event pending A limit switch event has occurred. An attempt was made to execute a move without first clear- Move into limit ing the limit bit(s) in the event status register. SNAP PAC Motion Control User’s Guide...
  • Page 35: How To Use The Command Details

    The syntax of the text string entered within the TransmitReceiveString OptoScript command, which Example is sent to the motion module for conversion to the corresponding PMD C-Motion command for implementation by the motion control processor. See Also Refers to related instructions. SNAP PAC Motion Control User’s Guide...
  • Page 36: Entering Commands In Optoscript

    For more information on the Transmit/Receive String command, see the PAC Control Command Reference, form 1701. For information on motion control strategy examples available on the Opto 22 website, “Using the Example Strategies” on page To enter a motion control command, use the >...
  • Page 37: Response Format

    0, 1, 2, or 3 parameters. >Status,P1,P2,P3 Status: If successful, 00 If not successful, a code from the Host I/O Errors list. Returned packet examples: Successful command: >00,0123,4567,89AB Not successful: >04 SNAP PAC Motion Control User’s Guide...
  • Page 38 RESPONSE FORMAT SNAP PAC Motion Control User’s Guide...
  • Page 39: Chapter 5: Command Reference

    For an explanation on how to use the information included for each command, page In This Chapter Commands by Group ..........36 Commands in Alphabetical Order .......38 SNAP PAC Motion Control User’s Guide...
  • Page 40: Commands By Group

    GetCommandedAcceleration Get commanded (instantaneous desired) acceleration GetCommandedPosition Get commanded (instantaneous desired) position. GetCommandedVelocity Get commanded (instantaneous desired) velocity. MultiUpdate Forces buffered command values to become active for multiple axes. SetAcceleration, GetAcceleration Set/Get acceleration limit. SNAP PAC Motion Control User’s Guide...
  • Page 41 ResetEventStatus Reset bits in event status register. SetAxisOutSource, GetAxisOutSource Set/Get axis out signal monitor source. SetSignalSense, GetSignalSense Set/Get the interpretation of the signal status bits. Miscellaneous NoOperation Perform no operation. Reset Reset the SNAP-SCM-BB4. SNAP PAC Motion Control User’s Guide...
  • Page 42: Commands In Alphabetical Order

    SetTrackingWindow, GetTrackingWindow 101 GetGearMaster 47 SetAutoStopMode,GetAutoStopMode 65 SetVelocity, GetVelocity 102 GetGearRatio 47 SetAxisMode, GetAxisMode 66 Update 103 GetHostIOError 48 SetAxisOutSource, GetAxisOutSource 67 WriteBuffer 104 GetInterruptAxis 49 SetBreakPoint, GetBreakPoint 69 GetInterruptMask 50 SetBreakPointValue, GetBreakPointValue 71 SNAP PAC Motion Control User’s Guide...
  • Page 43 The position error is also zeroed. AdjustActualPosition takes effect immediately, it is not buffered. OptoScript Status=TransmitReceiveString Example (“>AdjustActualPosition,4,0,3E”,ComHandle,ResponseString) See Also GetPositionError (page 57), GetActualVelocity (page 44), SetActualPositionUnits, GetActualPositionUnits (page 70), SetActualPosition, GetActualPosition (page 69) SNAP PAC Motion Control User’s Guide...
  • Page 44 The ClearInterrupt command has no effect if it is executed when no interrupts are pending. The axis number is not used. OptoScript Status=TransmitReceiveString Example (“>ClearInterrupt,0”,ComHandle,ResponseString) See Also GetInterruptAxis (page 55), SetInterruptMask, GetInterruptMask (page 91), ResetEventStatus (page 67) SNAP PAC Motion Control User’s Guide...
  • Page 45 This command should not be sent while the chip is executing a move using the S-curve profile mode. OptoScript Status=TransmitReceiveString Example (“>ClearPositionError,1”,ComHandle,ResponseString) See Also GetPositionError (page 57), MultiUpdate (page 62), SetPositionErrorLimit, GetPositionErrorLimit (page 97) GetAcceleration “SetAcceleration, GetAcceleration” on page SNAP PAC Motion Control User’s Guide...
  • Page 46 Set to 1 when the trajectory generator is executing a profile. In positive limit Set to 1 when the positive limit switch is active. In negative limit Set to 1 when the negative limit switch is active. SNAP PAC Motion Control User’s Guide...
  • Page 47 This field is undefined when using the Trapezoi- dal and Velocity Contouring profile modes. OptoScript Status=TransmitReceiveString Example (“>GetActivityStatus,2”,ComHandle,ResponseString) See Also GetEventStatus (page 52), GetSignalStatus (page 59) GetActualPosition “SetActualPosition, GetActualPosition” on page GetActualPositionUnits “SetActualPositionUnits, GetActualPositionUnits” on page SNAP PAC Motion Control User’s Guide...
  • Page 48 As a result the value returned by GetActualVelocity will always be a multiple of 65,536 since this represents a value of one in the 16.16 number format. The low word is always zero. OptoScript Status=TransmitReceiveString Example (“>GetActualVelocity,3”,ComHandle,ResponseString) See Also GetCommandedVelocity (page 50) SNAP PAC Motion Control User’s Guide...
  • Page 49 CHAPTER 5: COMMAND REFERENCE GetAutoStopMode “SetAutoStopMode, GetAutoStopMode” on page GetAxisMode “SetAxisMode, GetAxisMode” on page GetAxisOutSource “SetAxisOutSource, GetAxisOutSource” on page GetBreakPoint “SetBreakPoint, GetBreakPoint” on page GetBreakPointValue “SetBreakPointValue, GetBreakPointValue” on page GetBufferLength “SetBufferLength, GetBufferLength” on page SNAP PAC Motion Control User’s Guide...
  • Page 50 COMMANDS IN ALPHABETICAL ORDER GetBufferReadIndex “SetBufferReadIndex, GetBufferReadIndex” on page GetBufferStart “SetBufferStart, GetBufferStart” on page GetBufferWriteIndex “SetBufferWriteIndex, GetBufferWriteIndex” on page GetCaptureSource “SetCaptureSource, GetCaptureSource” on page SNAP PAC Motion Control User’s Guide...
  • Page 51 If actual position units is set to steps, the returned position will be in units of steps. OptoScript Status=TransmitReceiveString Example (“>GetCaptureValue,4”,ComHandle,ResponseString) See Also SetCaptureSource, GetCaptureSource (page 83), SetActualPositionUnits, GetActualPositionUnits (page 70), GetActivityStatus (page 42) SNAP PAC Motion Control User’s Guide...
  • Page 52 Scaling example: If a value of 114,688 is retrieved using this command then this corresponds to 114,688/ 65,536 = 1.750 counts/cycle2 acceleration value. See “SNAP-SCM-MCH16 Conversion Formulas” on page 111. OptoScript Status=TransmitReceiveString Example (“>GetCommandedAcceleration,5”,ComHandle,ResponseString) See Also GetCommandedPosition (page 49), GetCommandedVelocity (page 50) SNAP PAC Motion Control User’s Guide...
  • Page 53 GetCommandedPosition returns the commanded position for the specified axis. Commanded position is the instantaneous position value output by the trajectory generator. This command functions in all profile modes. OptoScript Status=TransmitReceiveString Example (“>GetCommandedPosition,6”,ComHandle,ResponseString) See Also GetCommandedAcceleration (page 48), GetCommandedVelocity (page 50) SNAP PAC Motion Control User’s Guide...
  • Page 54 Scaling example: If a value of -1,234,567 is retrieved using this command (FFEDh in high word, 2979h in low word) then this corresponds to -1,234,567/65,536 = -18.8380 counts/cycle velocity value. See “SNAP-SCM-MCH16 Conversion Formulas” on page 111. OptoScript Status=TransmitReceiveString Example (“>GetCommandedVelocity,7”,ComHandle,ResponseString) See Also GetCommandedAcceleration (page 48), GetCommandedPosition (page 49) SNAP PAC Motion Control User’s Guide...
  • Page 55 CHAPTER 5: COMMAND REFERENCE GetDeceleration “SetDeceleration, GetDeceleration” on page GetEncoderModulus “SetEncoderModulus, GetEncoderModulus” on page GetEncoderSource “SetEncoderSource, GetEncoderSource” on page GetEncoderToStepRatio “SetEncoderToStepRatio, GetEncoderToStepRatio” on page SNAP PAC Motion Control User’s Guide...
  • Page 56 Not used; may be 0 or 1. Breakpoint 2 Set to 1 when breakpoint 2 has been triggered. reserved 15 Not used; may be 0 or 1. OptoScript Status=TransmitReceiveString Example (“>GetEventStatus,8”,ComHandle,ResponseString) See Also GetActivityStatus (page 42), GetSignalStatus (page 59) SNAP PAC Motion Control User’s Guide...
  • Page 57 CHAPTER 5: COMMAND REFERENCE GetGearMaster “SetGearMaster, GetGearMaster” on page GetGearRatio “SetGearRatio, GetGearRatio” on page SNAP PAC Motion Control User’s Guide...
  • Page 58 The error codes are encoded as defined below: Error Code Encoding No error Processor Reset Invalid instruction Invalid axis Invalid parameter Trace running reserved Block out of bounds Trace buffer zero Bad serial checksum reserved Invalid negative value Invalid parameter change SNAP PAC Motion Control User’s Guide...
  • Page 59 1. If there are no pending interrupts, the returned word is 0. If any axis has a pending interrupt, the HostInterrupt signal will be in an active state. OptoScript Status=TransmitReceiveString Example (“>GetInterruptAxis,9”,ComHandle,ResponseString); See Also ClearInterrupt (page 40), SetInterruptMask, GetInterruptMask (page 91) SNAP PAC Motion Control User’s Guide...
  • Page 60 COMMANDS IN ALPHABETICAL ORDER GetInterruptMask “SetInterruptMask, GetInterruptMask” on page GetJerk “SetJerk, GetJerk” on page GetLimitSwitchMode “SetLimitSwitchMode, GetLimitSwitchMode” on page GetMotionCompleteMode “SetMotionCompleteMode, GetMotionCompleteMode” on page GetMotorMode “SetMotorMode, GetMotorMode” on page GetPosition “SetPosition, GetPosition” on page SNAP PAC Motion Control User’s Guide...
  • Page 61 (represented in steps), and the commanded position (instantaneous output of the trajectory generator). OptoScript Status=TransmitReceiveString Example (“>GetPositionError,9”,ComHandle,ResponseString) See Also SetPosition, GetPosition (page 96), SetPositionErrorLimit, GetPositionErrorLimit (page 97) GetPositionErrorLimit “SetPositionErrorLimit, GetPositionErrorLimit” on page GetProfileMode “SetProfileMode, GetProfileMode” on page SNAP PAC Motion Control User’s Guide...
  • Page 62 COMMANDS IN ALPHABETICAL ORDER GetSampleTime “SetSampleTime, GetSampleTime” on page GetSettleTime “SetSettleTime, GetSettleTime” on page 100. GetSettleWindow “SetSettleWindow, GetSettleWindow” on page 101. GetSignalSense “SetSignalSense, GetSignalSense” on page 102. SNAP PAC Motion Control User’s Guide...
  • Page 63 Encoder A Encoder B Encoder Index Encoder Home Positive limit Negative limit AxisIn reserved 7–9 AxisOut reserved 11–15 OptoScript Status=TransmitReceiveString Example (“>GetSignalStatus,A”,ComHandle,ResponseString) See Also GetActivityStatus (page 42), GetEventStatus (page 52), SetSignalSense, GetSignalSense (page 102) SNAP PAC Motion Control User’s Guide...
  • Page 64 COMMANDS IN ALPHABETICAL ORDER GetStartVelocity “SetStartVelocity, GetStartVelocity” on page 104. GetStepRange “SetStepRange, GetStepRange” on page 105. GetStopMode “SetStopMode, GetStopMode” on page 106. GetTrackingWindow “SetTrackingWindow, GetTrackingWindow” on page 107. SNAP PAC Motion Control User’s Guide...
  • Page 65 Second data word P2 read time (low-order part) Description GetTime returns the number of cycles which have occurred since the motion processor was last reset. OptoScript Status=TransmitReceiveString (“>GetTime,B”,ComHandle,ResponseString) Example GetVelocity “SetVelocity, GetVelocity” on page 108. SNAP PAC Motion Control User’s Guide...
  • Page 66 Update command. Type Command General ClearPositionError Acceleration Deceleration GearRatio Jerk Trajectory Position ProfileMode StopMode Velocity DerivativeTime IntegrationLimit Kaff Servo Kvff Motor MotorCommand SNAP PAC Motion Control User’s Guide...
  • Page 67 Type Range Board Address unsigned 8 bits 0 to 3 axis 4 to 7 8 to B C to F Returned Data none Description The NoOperation command has no effect on the motion processor. SNAP PAC Motion Control User’s Guide...
  • Page 68 OptoScript Status=TransmitReceiveString Example (“>ReadBuffer,C,P1”,ComHandle,ResponseString) See Also SetBufferReadIndex, GetBufferReadIndex (page 80), WriteBuffer (page 110), SetBufferStart, GetBufferStart (page 81), SetBufferLength, GetBufferLength (page 79) SNAP PAC Motion Control User’s Guide...
  • Page 69 Deceleration SampleTime see notes DerivativeTime SettleTime EncoderModulus SettleWindow EncoderSource SPIMode EncoderToStepRatio 00010001h StepRange EventStatus StepRange see notes GearMaster StopMode GearRatio SynchronizationMode GetSignalStatus 800 (hex) TraceMode IntegrationLimit TracePeriod InterruptMask TraceStart Jerk TraceStop Kaff TraceVariable 1 SNAP PAC Motion Control User’s Guide...
  • Page 70 "Status=TransmitReceiveString (“>Reset,4”,ComHandle,ResponseString)" "Status=TransmitReceiveString (“>Reset,5”,ComHandle,ResponseString)" "Status=TransmitReceiveString (“>Reset,6”,ComHandle,ResponseString)" "Status=TransmitReceiveString (“>Reset,7”,ComHandle,ResponseString)" Reset Board 2: "Status=TransmitReceiveString (“>Reset,8”,ComHandle,ResponseString)" "Status=TransmitReceiveString (“>Reset,9”,ComHandle,ResponseString)" "Status=TransmitReceiveString (“>Reset,10”,ComHandle,ResponseString)" "Status=TransmitReceiveString (“>Reset,11”,ComHandle,ResponseString)" Reset Board 3: "Status=TransmitReceiveString (“>Reset,12”,ComHandle,ResponseString)" "Status=TransmitReceiveString (“>Reset,13”,ComHandle,ResponseString)" "Status=TransmitReceiveString (“>Reset,14”,ComHandle,ResponseString)" "Status=TransmitReceiveString (“>Reset,15”,ComHandle,ResponseString)" OptoScript Status=TransmitReceiveString (“>Reset,0”,ComHandle,ResponseString) Example SNAP PAC Motion Control User’s Guide...
  • Page 71 0 in the mask sent with this command. All other event status register bits (bits which have a mask value of 1) are unaffected. OptoScript Status=TransmitReceiveString Example (“>ResetEventStatus,D,P1”,ComHandle,ResponseString) See Also GetEventStatus (page 52) SNAP PAC Motion Control User’s Guide...
  • Page 72 SetAcceleration is not valid in Electronic Gearing profile mode. SetAcceleration is a buffered command. The value set using this command will not take effect until the next Update or MultiUpdate instruction. OptoScript Status=TransmitReceiveString Example (“>SetAcceleration,C,P1,P2”,ComHandle,ResponseString) SNAP PAC Motion Control User’s Guide...
  • Page 73 SetActualPosition command is sent. SetActualPosition takes effect immediately, it is not buffered. GetActualPosition reads the contents of the encoder's actual position register. This value will be accurate to within one cycle (as determined by Set/GetSampleTime). SNAP PAC Motion Control User’s Guide...
  • Page 74 SetEncoderToStepRatio command. GetActualPositionUnits returns the position units for the specified axis. OptoScript Status=TransmitReceiveString Example (“>SetActualPositionUnits,E,P1”,ComHandle,ResponseString) Status=TransmitReceiveString (“>GetActualPositionUnits,E”,ComHandle,ResponseString) See Also SetActualPosition, GetActualPosition (page 69), SetEncoderToStepRatio, GetEncoderToStepRatio (page 87), AdjustActualPosition (page 39), GetCaptureValue (page 47) SNAP PAC Motion Control User’s Guide...
  • Page 75 When the encoder source is set to none (SetEncoderSource None), setting the auto stop mode to Enable will not stop motion in the event that the position error limit is exceeded. OptoScript Status=TransmitReceiveString Example (“>SetAutoStopMode,F,P1”,ComHandle,ResponseString) Status=TransmitReceiveString (“>GetAutoStopMode,F”,ComHandle,ResponseString) See Also GetEventStatus (page 52), SetPositionErrorLimit, GetPositionErrorLimit (page 97) SNAP PAC Motion Control User’s Guide...
  • Page 76 Disabled axes do not provide encoder feedback. If it is desired that an axis provide encoder feedback even though no profiling or servo control is to be used, the axis must be left enabled. OptoScript Status=TransmitReceiveString Example (“>SetAxisMode,0,P1”,ComHandle,ResponseString) Status=TransmitReceiveString (“>GetAxisMode,0”,ComHandle,ResponseString) SNAP PAC Motion Control User’s Guide...
  • Page 77 The following table shows the corresponding value for combinations of bit and register. event status register activity status register signal status register Motion complete Phasing initialized Encoder A Wrap-around At maximum velocity Encoder B Breakpoint 1 Tracking Encoder index SNAP PAC Motion Control User’s Guide...
  • Page 78 Motor on/off Hall sensor 2 Position capture Hall sensor 3 In motion Commutation error In positive limit In negative limit Breakpoint 2 OptoScript Status=TransmitReceiveString Example (“>SetAxisOutSource,1,P1”,ComHandle,ResponseString) Status=TransmitReceiveString (“>GetAxisOutSource,1”,ComHandle,ResponseString) See Also SetSignalSense, GetSignalSense (page 102) SNAP PAC Motion Control User’s Guide...
  • Page 79 First data word P1 write breakpointID Second data word P2 write trigger action source Axis 12 11 GetBreakPoint First data word P1 write breakpointID Second data word P1 read trigger action source Axis 12 11 SNAP PAC Motion Control User’s Guide...
  • Page 80 Always load the breakpoint comparison value (SetBreakPointValue command) before setting a new breakpoint condition (SetBreakPoint command). Failure to do so will likely result in unexpected behavior. OptoScript Status=TransmitReceiveString Example (“>SetBreakPoint,2,P1,P2”,ComHandle,ResponseString) Status=TransmitReceiveString (“>GetBreakPoint,2,P1”,ComHandle,ResponseString) See Also SetBreakPointValue, GetBreakPointValue (page 77) SNAP PAC Motion Control User’s Guide...
  • Page 81 The value parameter is interpreted according to the trigger condition for the selected breakpoint; “SetBreakPoint, GetBreakPoint” on page 75. The data format for each trigger condition is as follows: Breakpoint Trigger Value Type Range Units to 2 GreaterOrEqualCommandedPosition signed 32-bit counts SNAP PAC Motion Control User’s Guide...
  • Page 82 Always load the breakpoint comparison value (SetBreakPointValue command) before setting a new breakpoint condition (SetBreakPoint command). Failure to do so will likely result in unexpected behavior. OptoScript Status=TransmitReceiveString Example (“>SetBreakPointValue,3,P1,P2,P3”,ComHandle,ResponseString) Status=TransmitReceiveString (“>GetBreakPointValue,3,P1”,ComHandle,ResponseString) See Also SetBreakPoint, GetBreakPoint (page 75) SNAP PAC Motion Control User’s Guide...
  • Page 83 NOTE: SetBufferLength resets the buffers read and write indexes to 0. GetBufferLength returns the length of the specified buffer. OptoScript Status=TransmitReceiveString Example (“>SetBufferLength,4,P1,P2,P3”,ComHandle,ResponseString) Status=TransmitReceiveString (“>GetBufferLength,4,P1”,ComHandle,ResponseString) See Also SetBufferReadIndex, GetBufferReadIndex (page 80), SetBufferStart, GetBufferStart (page 81), SetBufferWriteIndex, GetBufferWriteIndex (page 82) SNAP PAC Motion Control User’s Guide...
  • Page 84 If the read index is set to an address beyond the length of the buffer, the command will not be executed and will return host I/O error code 7, buffer bound exceeded. OptoScript Status=TransmitReceiveString Example (“>SetBufferReadIndex,5,P1,P2,P3”,ComHandle,ResponseString) Status=TransmitReceiveString (“>GetBufferReadIndex,5,P1”,ComHandle,ResponseString) See Also SetBufferLength, GetBufferLength (page 79), SetBufferStart, GetBufferStart (page 81), SetBufferWriteIndex, GetBufferWriteIndex (page 82) SNAP PAC Motion Control User’s Guide...
  • Page 85 NOTE: SetBufferStart resets the buffers read and write indexes to 0. GetBufferStart returns the starting address for the specified bufferID. OptoScript Status=TransmitReceiveString Example (“>SetBufferStart,6,P1,P2,P3”,ComHandle,ResponseString) Status=TransmitReceiveString (“>GetBufferStart,6,P1”,ComHandle,ResponseString) See Also SetBufferLength, GetBufferLength (page 79), SetBufferReadIndex, GetBufferReadIndex (page 80), SetBufferWriteIndex, GetBufferWriteIndex (page 82) SNAP PAC Motion Control User’s Guide...
  • Page 86 Second data word P1 read index (high-order part) Third data word P2 read index (low-order part) OptoScript Status=TransmitReceiveString Example (“>SetBufferWriteIndex,7,P1,P2,P3”,ComHandle,ResponseString) Status=TransmitReceiveString (“>GetBufferWriteIndex,7,P1”,ComHandle,ResponseString) See Also SetBufferLength, GetBufferLength (page 79), SetBufferReadIndex, GetBufferReadIndex (page 80), SetBufferStart, GetBufferStart (page 81) SNAP PAC Motion Control User’s Guide...
  • Page 87 SetCaptureSource determines which of two encoder signals, Index or Home, is used to trigger the high-speed capture of the actual axis position for the specified axis. GetCaptureSource returns the capture signal source for the selected axis. OptoScript Status=TransmitReceiveString Example (“>SetCaptureSource,2,P1”,ComHandle,ResponseString) Status=TransmitReceiveString (“>GetCaptureSource,2”,ComHandle,ResponseString) See Also GetCaptureValue (page 47) SNAP PAC Motion Control User’s Guide...
  • Page 88 These commands are used with the Trapezoidal and Velocity Contouring profile modes. They are not used with the Electronic Gearing or S-curve profile mode. NOTE: If deceleration is set to zero, then the value specified for acceleration (SetAcceleration) will automatically be used to set the magnitude of deceleration. SNAP PAC Motion Control User’s Guide...
  • Page 89 GetEncoderModulus returns the encoder modulus. Restrictions A value for encoder modulus is only required when the encoder source is set to parallel. OptoScript Status=TransmitReceiveString Example (“>SetEncoderModulus,5,P1”,ComHandle,ResponseString) Status=TransmitReceiveString (“>GetEncoderModulus,5”,ComHandle,ResponseString) See Also SetEncoderSource, GetEncoderSource (page 86) SNAP PAC Motion Control User’s Guide...
  • Page 90 This allows for position capture of the step position when a physical encoder is not present. GetEncoderSource returns the code for the current type of feedback. OptoScript Status=TransmitReceiveString Example (“>SetEncoderSource,7,P1”,ComHandle,ResponseString) Status=TransmitReceiveString (“>GetEncoderSource,7”,ComHandle,ResponseString) SNAP PAC Motion Control User’s Guide...
  • Page 91 GetEncoderToStepRatio returns the ratio of the number of encoder counts to the number of output steps per motor rotation. OptoScript Status=TransmitReceiveString Example (“>SetEncoderToStepRatio,8,P1,P2”,ComHandle,ResponseString) Status=TransmitReceiveString (“>GetEncoderToStepRatio,8”,ComHandle,ResponseString) See Also SetActualPositionUnits, GetActualPositionUnits (page 70) SNAP PAC Motion Control User’s Guide...
  • Page 92 GetGearMaster returns the value for the geared axes and position source. OptoScript Status=TransmitReceiveString Example (“>SetGearMaster,A,P1”,ComHandle,ResponseString) Status=TransmitReceiveString (“>GetGearMaster,A”,ComHandle,ResponseString) See Also SetGearRatio, GetGearRatio (page 89) SNAP PAC Motion Control User’s Guide...
  • Page 93 15.259 positive slave counts for each positive master count 123 .0018 positive slave counts for each positive master count Restrictions This is a buffered command. The new value set will not take effect until the next Update or MultiUpdate instruction is entered. SNAP PAC Motion Control User’s Guide...
  • Page 94 COMMANDS IN ALPHABETICAL ORDER OptoScript Status=TransmitReceiveString Example (“>SetGearRatio,B,P1,P2”,ComHandle,ResponseString) Status=TransmitReceiveString (“>GetGearRatio,B”,ComHandle,ResponseString) See Also SetGearMaster, GetGearMaster (page 88), MultiUpdate (page 62), Update (page 109) SNAP PAC Motion Control User’s Guide...
  • Page 95 Example: The interrupt mask value 28h will generate an interrupt when either the “in positive limit” bit or the “capture received” bit of the event status register goes active (set to 1). OptoScript Status=TransmitReceiveString Example (“>SetInterruptMask,C,P1”,ComHandle,ResponseString) Status=TransmitReceiveString (“>GetInterruptMask,C”,ComHandle,ResponseString) See Also ClearInterrupt (page 40), GetInterruptAxis (page 55) SNAP PAC Motion Control User’s Guide...
  • Page 96 Update or MultiUpdate instruction. This command is used only with the S-curve profile mode. It is not used with the trapezoidal, velocity contouring, or electronic gear profile modes. OptoScript Status=TransmitReceiveString Example (“>SetJerk,D,P1,P2”,ComHandle,ResponseString) Status=TransmitReceiveString (“>GetJerk,D”,ComHandle,ResponseString) SNAP PAC Motion Control User’s Guide...
  • Page 97 GetLimitSwitchMode returns the value for the state of the limit-sensing mode. OptoScript Status=TransmitReceiveString Example (“>SetLimitSwitchMode,1,P1”,ComHandle,ResponseString) Status=TransmitReceiveString (“>GetLimitSwitchMode,1”,ComHandle,ResponseString) See Also GetActivityStatus (page 42), GetEventStatus (page 52) SNAP PAC Motion Control User’s Guide...
  • Page 98 SettleTime cycles will occur after the trajectory profile motion is complete. GetMotionCompleteMode returns the value for the motion-complete mode. OptoScript Status=TransmitReceiveString Example (“>SetMotionCompleteMode,2,P1”,ComHandle,ResponseString) Status=TransmitReceiveString (“>GetMotionCompleteMode,2”,ComHandle,ResponseString) See Also SetSettleTime, GetSettleTime (page 100), SetSettleWindow, GetSettleWindow (page 101) SNAP PAC Motion Control User’s Guide...
  • Page 99 Motor type Motor mode Motor output source Pulse & direction; microstepping Trajectory generator GetMotorMode returns the value of the motor mode. OptoScript Status=TransmitReceiveString Example (“>SetMotorMode,3,P1”,ComHandle,ResponseString) Status=TransmitReceiveString (“>GetMotorMode,3”,ComHandle,ResponseString) See Also GetActivityStatus (page 42) SNAP PAC Motion Control User’s Guide...
  • Page 100 Update or MultiUpdate instruction. OptoScript Status=TransmitReceiveString Example (“>SetPosition,5,P1,P2”,ComHandle,ResponseString) Status=TransmitReceiveString (“>GetPosition,5”,ComHandle,ResponseString) See Also SetAcceleration, GetAcceleration (page 68), SetDeceleration, GetDeceleration (page 84), SetJerk, GetJerk (page 92), SetVelocity, GetVelocity (page 108), MultiUpdate (page 62), Update (page 109) SNAP PAC Motion Control User’s Guide...
  • Page 101 Such a motion error may or may not cause the axis to stop moving depending on the value set using the SetAutoStopMode command. GetPositionErrorLimit returns the value of the position error limit. OptoScript Status=TransmitReceiveString Example (“>SetPositionErrorLimit,6,P1,P2”,ComHandle,ResponseString) Status=TransmitReceiveString (“>GetPositionErrorLimit,6”,ComHandle,ResponseString) See Also GetPositionError (page 57), SetActualPosition, GetActualPosition (page 69), SetPosition, GetPosition (page 96) SNAP PAC Motion Control User’s Guide...
  • Page 102 SetProfileMode is a buffered command. The value set using this command will not take effect until the next Update or MultiUpdate instruction. OptoScript Status=TransmitReceiveString Example (“>SetProfileMode,7,P1”,ComHandle,ResponseString) See Also MultiUpdate (page 62), Update (page 109) SNAP PAC Motion Control User’s Guide...
  • Page 103 102.4 µs 51.2 µs / 102.4 µs (9.76 w/ trace capture) 153.6 µs 153.6 µs 76.8 µs 6.51 KHz 204.8 µs 204.8 µs 68.3 µs 4.88 KHz 256 µs 256 µs 64 µs 3.91 KHz SNAP PAC Motion Control User’s Guide...
  • Page 104 GetSettleTime returns the value of the settle time for the specified axis. OptoScript Status=TransmitReceiveString Example (“>SetSettleTime,8,P1”,ComHandle,ResponseString) Status=TransmitReceiveString (“>GetSettleTime,8”,ComHandle,ResponseString) See Also SetMotionCompleteMode, GetMotionCompleteMode (page 94), SetSettleWindow, GetSettleWindow (page 101), GetActivityStatus (page 42) SNAP PAC Motion Control User’s Guide...
  • Page 105 SetSettleTime before the axis-settled indicator in the activity status register is set. GetSettleWindow returns the value of the settle window. OptoScript Status=TransmitReceiveString Example (“>SetSettleWindow,A,P1”,ComHandle,ResponseString) Status=TransmitReceiveString (“>GetSettleWindow,A”,ComHandle,ResponseString) See Also SetMotionCompleteMode, GetMotionCompleteMode (page 94), SetSettleTime, GetSettleTime (page 100), GetActivityStatus (page 42) SNAP PAC Motion Control User’s Guide...
  • Page 106 Pulse signal. Otherwise, a step will be generated by the motion processor with a high-to-low transition on the Pulse signal. Setting the MotorDirection bit has the effect of swapping the sense of positive and negative motor movement. SNAP PAC Motion Control User’s Guide...
  • Page 107 GetSignalSense returns the value of the signal sense mask. Restrictions Inverting the encoder A or B signal may prevent the index capture mechanism from operating correctly. OptoScript Status=TransmitReceiveString Example (“>SetSignalSense,B,P1”,ComHandle,ResponseString) Status=TransmitReceiveString (“>GetSignalSense,B”,ComHandle,ResponseString) See Also GetSignalStatus (page 59) SNAP PAC Motion Control User’s Guide...
  • Page 108 StartVelocity is only used in the Velocity Contouring and Trapezoidal profile modes. OptoScript Status=TransmitReceiveString Example (“>SetStartVelocity,C,P1,P2”,ComHandle,ResponseString) Status=TransmitReceiveString (“>GetStartVelocity,C,P1”,ComHandle,ResponseString) See Also SetVelocity, GetVelocity (page 108), SetAcceleration, GetAcceleration (page 68), SetDeceleration, GetDeceleration (page 84), SetPosition, GetPosition (page 96) SNAP PAC Motion Control User’s Guide...
  • Page 109 SetStepRange sets the maximum pulse rate frequency for the specified axis. For example, if the desired maximum pulse rate is 200,000 pulses/second, the command SetStepRange 4 should be issued. GetStepRange returns the maximum pulse rate frequency for the specified axis. OptoScript Status=TransmitReceiveString Example (“>SetStepRange,D,P1”,ComHandle,ResponseString) Status=TransmitReceiveString (“>GetStepRange,D”,ComHandle,ResponseString) SNAP PAC Motion Control User’s Guide...
  • Page 110 SetStopMode is a buffered command. The value set using this command will not take effect until the next Update or MultiUpdate instruction. OptoScript Status=TransmitReceiveString Example (“>SetStopMode,E,P1”,ComHandle,ResponseString) Status=TransmitReceiveString (“>GetStopMode,E”,ComHandle,ResponseString) See Also MultiUpdate (page 62), Update (page 109) SNAP PAC Motion Control User’s Guide...
  • Page 111 0. When the position error returns to within the window, the tracking indicator is set to 1. GetTrackingWindow returns the value of the tracking window. OptoScript Status=TransmitReceiveString Example (“>SetTrackingWindow,F,P1”,ComHandle,ResponseString) Status=TransmitReceiveString (“>GetTrackingWindow,F”,ComHandle,ResponseString) See Also GetActivityStatus (page 42), SetActualPosition, GetActualPosition (page 69) SNAP PAC Motion Control User’s Guide...
  • Page 112 SetVelocity is not valid in Electronic Gear profile mode. The velocity cannot be negative, except in the VelocityContouring profile mode. SetVelocity is a buffered command. The value set using this command will not take effect until the next Update or MultiUpdate instruction. SNAP PAC Motion Control User’s Guide...
  • Page 113 The following table shows the buffered commands and variables which are made active as a result of the Update command. Type Command General ClearPositionError Trajectory Acceleration Deceleration GearRatio Jerk Position ProfileMode StopMode Velocity Motor MotorCommand OptoScript Status=TransmitReceiveString (“>Update,1”,ComHandle,ResponseString) Example See Also MultiUpdate (page 62) SNAP PAC Motion Control User’s Guide...
  • Page 114 After the contents have been written, the write index is incremented by 1. If the result is equal to the buffer length (set by SetBufferLength), the index is reset to 0. OptoScript Status=TransmitReceiveString Example (“>WriteBuffer,2,4,0,3E”,ComHandle,ResponseString) See Also ReadBuffer (page 64), SetBufferWriteIndex, GetBufferWriteIndex (page 82) SNAP PAC Motion Control User’s Guide...
  • Page 115 A: SNAP-SCM-MCH16 Conversion FormulasAppendix A SNAP-SCM-MCH16 Conversion Formulas Use the table on the next page to convert Counts/Cycle used by some of the motion commands. SNAP PAC Motion Control User’s Guide...
  • Page 116 SNAP PAC Motion Control User’s Guide...

This manual is also suitable for:

Snap-scm-bb4Snap-scm-mch16

Table of Contents