HSL-4XMO High Speed Link 4-Axis Motion Control Module User’s Manual Manual Rev. 2.02 Revision Date: December 21, 2006 Part No: 50-1I001-200 Advance Technologies; Automate the World.
Copyright 2005 ADLINK TECHNOLOGY INC. All Rights Reserved. The information in this document is subject to change without prior notice in order to improve reliability, design, and function and does not represent a commitment on the part of the manufacturer. In no event will the manufacturer be liable for direct, indirect, special, incidental, or consequential damages arising out of the use or inability to use the product or documentation, even if advised of the possibility of such damages.
Getting Service from ADLINK Customer Satisfaction is top priority for ADLINK Technology Inc. Please contact us should you require any service or assistance. ADLINK TECHNOLOGY INC. Web Site: http://www.adlinktech.com Sales & Service: Service@adlinktech.com TEL: +886-2-82265877 FAX: +886-2-82265717 Address: 9F, No. 166, Jian Yi Road, Chungho City, Taipei, 235 Taiwan Please email or FAX this completed service form for prompt and satisfactory service.
Table of Contents Table of Contents..................................................................... i List of Tables.......................................................................... iv List of Figures ......................................................................... v 1 Introduction ........................................................................ 1 1.1 1.2 1.3 Features............................................................................... 2 Specifications..............
3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 3.10 3.11 3.12 3.13 3.14 Encoder Feedback Signals EA, EB and EZ....................... Origin Signal ORG ............................................................. End-Limit Signals PEL and MEL........................................ Ramping-down & Position Latch........................................ In-position Signal INP ........................................................ Alarm Signal ALM ..............................................................
4.10 4.11 4.12 4.13 4.14 4.15 4.16 Command Position Counter .......................................... 68 Feedback Position Counter .......................................... 69 Position Error Counter .................................................. 71 General Purpose Counter ............................................. 71 Target Position Recorder .............................................. 72 Multiple HSL-4XMO Operations ........................................
List of Tables Table 2-1: CN1 Pin Assignments: External Power Input ......... 10 Table 2-2: CN2 Pin Assignments: Emergency Input and General Input Common ........................................................... 10 Table 2-3: HS1-HS2 Pin Assignments: HSL Communication Signal (RJ-45) .................................................................... 11 Table 2-4: HS3 Pin Assignments: HSL Communication Signal (WAGO type) .................................................................
List of Figures Figure 2-1: Figure 2-2: Figure 2-3: Figure 2-4: HSL-4XMO-CG-N/P Mechanical Drawing ................. 8 HSL-4XMO-CD-N/P Mechanical Drawing ................. 9 S1: Switch Setting for HSL Slave ID........................ 14 JP1: HSL Communication Speed Selection Jumper Setting........................................................................... 14 Figure 2-5: JP2 - 3: Jumper Setting for HSL Transmission Mode 15 Figure 2-6: JP4: HSL Termination Resistor Jumper Setting ......
Figure 4-11: 2 Axes Linear Interpolation ...................................... Figure 4-12: 3-Axis Linear Interpolation ....................................... Figure 4-13: Circular interpolation for 2 axes ............................... Figure 4-14: Circular Interpolation with Acc/dec Time ................. Figure 4-15: Velocity and Acceleration Time A ............................ Figure 4-16: Velocity and Acceleration Time B ............................ Figure 4-17: home_mode=0..........................
1 Introduction The HSL-4XMO is a 4-axis motion controller module for HSL system. It can generate high frequency pulses (6.55MHz) to drive stepper or servomotors. As a motion controller, it can provide 2axis circular interpolation, 4-axis linear interpolation, or continuous interpolation for continual velocity. Also, changing position/speed on the fly is available with a single axis operation. Multiple HSL-4XMO modules can be used in one HSL system.
1.1 Features 2 X High Speed Link (HSL) protocol compatible X 3M/6M/12M data transfer rate selectable X Support dual and half duplex modes X On board DSP (TMS320C6711) X 4-axis stepper or servo motor control by pulse signal command X Maximum pulse output frequency: 6.
X User-friendly function libraries and utilities for DOS and Windows 9x/NT/2000/XP. Also supported under Linux 1.2 Specifications Command Response Time X Half Duplex: 240us for one module under 6Mhz data transfer rate X Full Duplex: 240us for two modules under 6Mhz data transfer rate Motion Control X Maximum controllable axes in one module: 4 X Internal reference clock: 19.
Digital Input X Sink or source type can be selected via ICOM X Switching capability: 10K Hz X Input voltage range: Z Logic H: 14.4~24V Z Logic L: 0~5V X Input resistor: 4.7KΩ @ 0.5W X Isolated voltage: 500Vrms Digital Output X Output type: Open-collector (PC3H7C) X Sink Current: 4mA max. X Switching capability: 10KHz @ 24V, load = 4.
1.3 Supported Software Programming Library The Library supports Borland C/C++ (Version: 3.1) and Windows 95/98/NT/2000/XP. These function libraries are shipped with the module. Users can check ADLINK website for latest update. This module supports DOS/Windows 98/NT/2000/XP. For other OS, please contact the local vendors. Motion Creator on LinkMaster Utility This Windows-based utility is used to setup cards, motors, and systems. It can also aid in debugging hardware and software problems.
6 Introduction
2 Installation This chapter describes how to install the HSL-4XMO series. Please follow these steps below: X Check what you have (section 2.1) X Check the PCB (section 2.2) X Install the hardware (section 2.3) X Install the software driver (section 2.4) X Understanding the I/O signal connections (chapter 3) and their operation (chapter 4) X Understanding the connector pin assignments (the remaining sections) and wiring the connections 2.
2.
2.
S1: Slave ID Switch JP1: Communication Speed Selection Jumper JP2-3: JP4: Full Duplex/Half Duplex Jumper Termination Resistor Jumper JP5-8: JP9: Enable/Disable DO to reset servo driver NPN/PNP setting of EMG signal JP10-13: NPN/PNP setting of DO signal 2.4 CN1 Pin Assignments: External Power Input CN1 Pin Name Description EGND External power ground E24V +24VDC ±5% External power supply Table 2-1: CN1 Pin Assignments: External Power Input 2.
2.6 HS1,2 Pin Assignments: HSL Communication Signal (RJ-45). PIN NO. PIN OUT RJ45 Female Connector PIN 1 NC PIN 2 NC PIN 3 TXD+ PIN 4 RXD- PIN 5 RXD+ PIN 6 TXD- PIN 7 NC PIN 8 NC Table 2-3: HS1-HS2 Pin Assignments: HSL Communication Signal (RJ-45) 2.7 HS3 Pin Assignments: HSL Communication Signal (WAGO Type) HS3 Pin Name Description FG Shielding ground T+ TXD+ T- TXD- R+ RXD+ R- RXD- Table 2-4: HS3 Pin Assignments: HSL Communication Signal (WAGO type) 2.
No. Name Function No. Name Function 9 OUT+ Pulse signal (+) 10 OUT- Pulse signal (-) 11 DIR+ Direction signal (+) 12 DIR- Direction signal (-) Ext.
2.9 CM1-CM4 Pin Assignments: For HSL-4XMO-CDN/P No. Name Function No. Name Function 1 SVON Servo on output signal 2 INP In-position input signal 3 ERC Deviation counter clear output signal 4 RDY Ready input signal 5 OUT- Pulse signal (-) 6 OUT+ Pulse signal (+) 7 EA- Encoder A-phase (-) 8 EA+ Encoder A-phase (+) Alarm reset output signal 9 N.C. Not Connected 10 RST 11 ALM Alarm input signal 12 E24V External power supply, +24V 13 EGND Ext. power ground 14 N.C.
2.11 S1: Switch Setting for HSL Slave ID Figure 2-3: S1: Switch Setting for HSL Slave ID Note: Each HSL-4XMO occupies 4 HSL IDs. If using half duplex mode, the occupied ID will be continuously from this setting. For example, if you set the ID=1 then the occupied IDs will be 1, 2, 3, 4. If using full duplex mode, the occupied ID will be two ID steps in order. For example, if you set the ID=1 then the occupied IDs will be 1, 3, 5, 7. 2.
2.13 JP2 - 3: Jumper Setting for HSL Transmission Mode Figure 2-5: JP2 - 3: Jumper Setting for HSL Transmission Mode 2.
2.15 JP5-8, JP10-13: Enable/Disable DO to reset servo driver Figure 2-7: JP5-8, JP10-13: Enable/Disable DO to reset servo driver 2.
3 Signal Connections Signal connections of all I/O’s are described in this chapter. Refer to the contents of this chapter before wiring any cables between the HSL-4XMO and any motor drivers. This chapter contains the following sections: X Section 3.1 Pulse Output Signals OUT and DIR X Section 3.2 Encoder Feedback Signals EA, EB and EZ X Section 3.3 Origin Signal ORG X Section 3.4 End-Limit Signals PEL and MEL X Section 3.5 Ramping-down & Position latch signals X Section 3.
3.1 Pulse Output Signals OUT and DIR There are 4 axis pulse output signals on the HSL-4XMO. For each axis, two pairs of OUT and DIR signals are used to transmit the pulse train and to indicate the direction. The OUT and DIR signals can also be programmed as CW and CCW signal pairs. In this section, the electrical characteristics of the OUT and DIR signals are detailed. Each signal consists of a pair of differential signals. For example, OUT2 consists of OUT2+ and OUT2- signals.
Figure 3-2: Non-differential Type Wiring Example Warning: The sink current must not exceed 20mA or the 2631 will be damaged! Signal Connections 19
3.2 Encoder Feedback Signals EA, EB and EZ The encoder feedback signals include EA, EB, and EZ. Every axis has six pins for three differential pairs of phase-A (EA), phase-B (EB), and index (EZ) inputs. EA and EB are used for position counting, and EZ is used for zero position indexing.
Figure 3-4: Connection to Line Driver Output Connection to Open Collector Output To connect with an open collector output, an external power supply is necessary. Some motor drivers can provide the power source. The connection between the HSL-4XMO, encoder, and the power supply is shown in the diagram below. Note that an external current limiting resistor R is necessary to protect the HSL4XMO input circuit. The following table lists the suggested resistor values according to the encoder power supply.
Figure 3-5: Connection to Open Collector Output For more operation information on the encoder feedback signals, refer to section 4.9. 3.3 Origin Signal ORG The origin signals (ORG1-ORG4) are used as input signals for the origin of the mechanism. The input circuit of the ORG signals is shown below. Usually, a limit switch is used to indicate the origin on one axis. The specifications of the limit switch should have contact capacity of +24V @ 6mA minimum.
and DIR). For detailed operations of the ORG signal, refer to section 4.8. 3.4 End-Limit Signals PEL and MEL There are two end-limit signals PEL and MEL for each axis. PEL indicates the end limit signal is in the plus direction and MEL indicates the end limit signal is in the minus direction. A circuit diagram is shown in the diagram below. The external limit switch should have a contact capacity of +24V @ 6mA minimum.
Figure 3-8: Ramping-down & Position Latch 3.6 In-position Signal INP The in-position signal INP from a servo motor driver indicates its deviation error. If there is no deviation error then the servo’s position indicates zero. The input circuit of the INP signals is shown in the diagram below: Figure 3-9: In-position Signal INP The in-position signal is usually generated by the servomotor driver and is ordinarily an open collector output signal.
3.7 Alarm Signal ALM The alarm signal ALM is used to indicate the alarm status from the servo driver. The input alarm circuit is shown below. The ALM signal usually is generated by the servomotor driver and is ordinarily an open collector output signal. An external circuit must provide at least 6mA current sink capabilities to drive the ALM signal. For more details of ALM signal operations, refer to section 4.7. Figure 3-10: Alarm Signal ALM 3.
Figure 3-11: Deviation Counter Clear Signal (ERC) 3.9 General-purpose Signal SVON The SVON signal can be used as a servomotor-on control or general- purposed output signal. The output circuit for the SVON signal is shown below: Figure 3-12: General-purpose Signal SVON 3.10 General-purpose Signal RDY The RDY signals can be used as motor driver ready input or general purpose input signals.
Figure 3-13: General-purpose Signal RDY 3.11 Position Compare Output CMP The HSL-4XMO provides 4 comparison output channels. The comparison output channel will generate a pulse signal when the encoder counter reaches a pre-set value set by the user. The following wiring diagram is of the CMP signals: Figure 3-14: Position Compare Output CMP Note: CMP trigger type can be set as normal low (rising edge) or normal high (falling edge). Default setting is normal high. 3.
closed) contact switches can be used. The type of switch can be configured by software. Figure 3-15: Emergency Stop Input EMG 3.13 General-purpose Input HSL-4XMO has 4 opto-isolated digital inputs for general-purposed use. The following wiring diagrams are of these signals Figure 3-16: General-purpose Input 3.14 General-purpose Output HSL-4XMO has 4 opto-isolated digital outputs for general-purposed use.
NPN type general purpose Output (available in –N modules): Figure 3-17: NPN Type General Purpose Output PNP type general purpose Output (available in –P modules): Figure 3-18: PNP Type General Purpose Output Signal Connections 29
30 Signal Connections
4 Operation Theory 4.1 Communication Block Diagram Figure 4-1: Communication Block Diagram 4.2 Host Command Inside the HSL system, those remote modules communicate with each other with HSL network packets. Actually, users do not have to understand what the content of the packet is. Instead, we provide many kinds of API functions for controlling this module. They are very easy to understand and to use. Those APIs can analyze the parameters from user’s command and pack them as HSL network packets.
4.3 Command Delivering Time HSL-4XMO supports both full duplex and half duplex mode. In full duplex mode, one module occupies 4 HSL slave IDs by two ID number steps. For example, if the module start ID=1, then it occupies ID 1, 3, 5, 7. If having two slave modules, we suggest that the second ID can be set at 2. Then, the second module would occupy ID 2, 4, 6, 8. In half duplex mode, the module occupies 4 HSL slave IDs by one ID number step.
Figure 4-2: Single Command Timing The base scan time table is as follows, N is the range of total IDs. Half Duplex Full Duplex Maximum Length 3M 118 us x N 60.7 us x N 400 meters 6M 59 us x N 30.4 us x N 200 meters 15.2 us x N 100 meters 12M 29.
4.4 Command Dispatching in DSP Command-dispatching task is executed by the DSP on the module. Once the DSP receives a new command, it will process this command within the time less than the HSL scan time. The dispatching task includes the motion ASIC command, data downloading command, point table command and script program downloading command. The command-dispatching task is executed every HSL scan cycle. It is real-time.
4.5 The role of DSP and motion ASIC Motion control is executed by motion ASIC. DSP acts as a role to execute the command dispatching, data management and motion command sequecing. Motion ASIC is used for generating pulse trains, position control, dedicated motion I/O control and so on. There is no motion I/O scan time problem because the ASIC will take care all of them. 4.6 Motion Control Modes In this section, the pulse output signal configuration and the following motion control modes are described.
sents direction command of positive (+) or negative (-). This mode is most commonly used. The diagrams below show the output waveform. It is possible to set the polarity of the pulse chain. Figure 4-4: Single Pulse Output Mode (OUT/DIR Mode) Dual Pulse Output Mode (CW/CCW Mode) In this mode, the waveform of the OUT and DIR pins represent CW (clockwise) and CCW (counter clockwise) pulse output respectively.
Figure 4-5: Dual Pulse Output Mode (CW/CCW Mode) X Relative Function: HSL_M_set_pls_outmode() Velocity Mode Motion This mode is used to operate a one-axis motor with Velocity mode motion. The output pulse accelerates from a starting velocity (StrVel) to a specified maximum velocity (MaxVel). The HSL_M_tv_move() function is used for constant linear acceleration while the HSL_M_sv_move() function is use for acceleration according to the S-curve.
tions, tv_move or sv_move. The velocity profile is shown as follows: Note: The v_change and stop functions can also be applied to Preset Mode or Home Mode (refer to 4.1). Figure 4-6: Velocity Mode Motion X Relative Functions: HSL_M_tv_move() HSL_M_sv_move() HSL_M_v_change() HSL_M_sd_stop() HSL_M_emg_stop() HSL_M_fix_speed_range() HSL_M_unfix_speed_range() Trapezoidal Motion This mode is used to move a singe axis motor to a specified position (or distance) with a trapezoidal velocity profile.
Figure 4-7: Trapezoidal Motion There are 2 trapezoidal point-to-point functions supported by the HSL-4XMO. In the HSL_M_start_ta_move() function, the absolute target position must be given in units of pulses. The physical length or angle of one movement is dependent on the motor driver and mechanism (including the motor). Since absolute move mode needs the information of current actual position, the “External encoder feedback (EA, EB pins)” should be set in HSL_M_set_feedback_src() function.
StrVel = MaxVel + decel *Tdec; Where accel/decel represents the acceleration/deceleration rate in units of pps/sec^2. The area inside the trapezoidal profile represents the moving distance. Units of velocity setting are pulses per second (PPS). Usually, units of velocity of the manual of motor or driver are in rounds per minute (RPM). A simple conversion is necessary to match between these two units.
Figure 4-8: Encoder Diagram If this ratio is not set before issuing the start moving command, it will cause problems when running in “Absolute Mode” because the HSL-4XMO won’t recognize the actual absolute position during motion. X Relative Functions: HSL_M_start_ta_move() HSL_M_start_tr_move() HSL_M_motion_done() HSL_M_set_feedback_src() HSL_M_set_move_ratio() S-curve Profile Motion This mode is used to move a single-axis motor to a specified position (or distance) with a S-curve velocity profile.
There are several parameters that need to be set in order to make a S-curve move.
velocity from (StrVel + VSacc) to (MaxVel - VSacc) constantly. The deceleration period is similar in fashion. Note: If user wants to disable the linear region, the VSacc/VSdec must be assigned “0” rather than “0.5” (MaxVel-StrVel). Remember that the VSacc/VSdec is in units of PPS and it should always keep in the range of [0 to (MaxVel - Strvel)/2 ], where “0” means no linear region. The S-curve profile motion functions are designed to always produce smooth motion.
The Following table shows the differences between all single axis motion functions, including preset mode (both trapezoidal and Scurve motion) and constant velocity mode.
Figure 4-11: 2 Axes Linear Interpolation The speed ratio along X-axis and Y-axis is (ΔX: ΔY), respectively, and the vector speed is: When calling 2-axis linear interpolation functions, the vector speed needs to define the start velocity, StrVel, and maximum velocity, MaxVel. Both trapezoidal and S-curve profiles are available. Example: HSL_M_start_tr_move_xy(0, 30000.0, 40000.0, 1000.0, 5000.0, 0.1, 0.
HSL_M_start_ta_move_zu() HSL_M_start_sr_move_xy() HSL_M_start_sr_move_zu() HSL_M_start_sa_move_xy() HSL_M_start_sa_move_zu() The second group allows user to freely assign the 2 target axes.
The speed ratio along X-axis, Y-axis, and Z-axis is (ΔX: ΔY: ΔZ), respectively, and the vector speed is: When calling 3-axis linear interpolation functions, the vector speed is needed to define the start velocity, StrVel, and maximum velocity, MaxVel. Both trapezoidal and S-curve profiles are available. Example: HSL_M_start_tr_line3(….,1000.0 /*ΔX */ , 2000.0/ *ΔY */, 3000.0 /*DistZ*/, 100.0 /*StrVel*/, 5000.0 /* MaxVel*/, 0.1/*sec*/, 0.
The following functions are used for 4-axis linear interpolation: HSL_M_start_tr_line4() HSL_M_start_sr_line4() HSL_M_start_ta_line4() HSL_M_start_sa_line4() The characters “t”, “s”, “r”, and “a” after HSL_M_start mean: X t – Trapezoidal profile X s – S-Curve profile X r – Relative motion X a – Absolute motion Circular interpolation for 2 axes Any 2 of the 4 axes of the HSL-4XMO can perform circular interpolation.
To specify a circular interpolation path, the following parameters must be clearly defined: X Center point: The coordinate of the center of arc (In absolute mode) or the off_set distance to the center of arc (In relative mode) X End point: The coordinate of end point of arc (In absolute mode) or the off_set distance to center of arc (In relative mode) X Direction: The moving direction, either CW or CCW.
and Axis1, and also Axis3 (Axis0=x, Axis1=y, Axis2=z, Axis3=u). For the full lists of functions. To check if the board supports these functions use the HSL_M_version_info() function. If hardware information for the card returns a value with the 4th digit greater then 0, for example '1003', users can use this group of circular interpolation to perform S or T-curve speed profiles. If the hardware version returns a value with the 4th digit being 0, then that board does not support these functions.
Figure 4-15: Velocity and Acceleration Time A How do users decide an optimum value for “OverVelocity” in the HSL_M_fix_speed_range() function? The HSL_M_verify_speed() function is provided to calculate such value. The inputs to this function are the start velocity, maximum velocity and over velocity values. The output value will be the minimum and maximum values of the acceleration time. For example, if the original acceleration range for the command is: HSL_M_start_tr_move(AxisNo,5000,0,5000,0.001,0.
HSL_M_verify_speed(0,5000,&minAccT, &maxAccT,140000); The value miniAccT will be 0.000948sec and maxAccT will be 31.08sec. This minimum acceleration time meets the requirements. So, the motion command can be changed to: HSL_M_fix_speed_range(AxisNo,140000); HSL_M_start_tr_move(AxisNo,5000,0,5000,0.001,0.0 01); Note: The return value of HSL_M_verify_speed() is the minimum velocity of motion command, it does not always equal to your start velocity setting.
change the (MaxV, MiniT) relationship to a higher value, (MaxV1, MiniT1). Finally, the command would be: HSL_M_fix_speed_range(AxisNo, MaxV1); HSL_M_start_tr_move(AxisNo,Distance, 0 , MaxV2 , Target T, Target T); Relative Functions: HSL_M_fix_speed_range() HSL_M_unfix_speed_range() HSL_M_verify_speed() Home Return Mode In this mode, the HSL-4XMO is allowed to continuously output pulses until the condition to complete the home return is satisfied after writing the command HSL_M_home_move().
the target position to HSL_M_reset_target_pos(). “0” by calling the function The following figures show the various home modes and the reset points, when the counter is cleared to “0.” home_mode=0: ORG -> Slow down -> Stop X When SD (Ramp-down signal) is inactive. Figure 4-17: home_mode=0 home_mode=1: ORG -> Slow down -> Stop at end of ORG X 54 When SD (Ramp-down signal) is active.
Figure 4-18: home_mode=1 home_mode=3: ORG -> EZ -> Slow down -> Stop Figure 4-19: home_mode=3 Operation Theory 55
home_mode=4: ORG -> Slow down -> Go back at FA speed -> EZ -> Stop Figure 4-20: home_mode=4 home_mode=5: ORG -> Slow down -> Go back ->? Accelerate to MaxVel -> EZ -> Slow down -> Stop 56 Operation Theory
Figure 4-21: home_mode=5 home_mode=6: EL only Figure 4-22: home_mode=6 home_mode=7: EL -> Go back -> Stop on EZ signal Figure 4-23: home_mode=7 Operation Theory 57
home_mode=8: EL -> Go back -> Accelerate to MaxVel -> EZ > Slow down -> Stop Figure 4-24: home_mode=8 home_mode=9: ORG -> Slow down -> Go back -> Stop at beginning edge of ORG Figure 4-25: home_mode=9 58 Operation Theory
home_mode=10: ORG -> EZ -> Slow down -> Go back -> Stop at beginning edge of EZ Figure 4-26: home_mode=10 home_mode=11: ORG -> Slow down -> Go back (backward) -> Accelerate to MaxVel -> EZ -> Slow down -> Go back again (forward) -> Stop at beginning edge of EZ Operation Theory 59
Figure 4-27: home_mode=11 home_mode=12: EL -> Stop -> Go back (backward) -> Accelerate to MaxVel -> EZ -> Slow down -> Go back again (forward) -> Stop at beginning edge of EZ Figure 4-28: home_mode=12 60 Operation Theory
Home Search Example (Home mode=1) Figure 4-29: Home Search Example Operation Theory 61
Moving Steps 1. Home searching start (-) 2. –EL touches, slow down and reverse moving (+) 3. ORG touches, slow down 4. Escape from ORG according to ORG offset 5. Start searching again (-) 6. ORG touches, slow down then using searching speed to escape ORG (+) 7.
4.7 The Motor Driver Interface The HSL-4XMO provides the INP, ALM, ERC, SVON, and RDY signals for a servomotor driver control interface. The INP and ALM are used for feedback of the servo driver status, ERC is used to reset the servo driver’s deviation counter under special conditions, VON is a general purpose output signal, and RDY is a general purpose input signal. The meaning of “general purpose” is that the processing of the signal is not a build-in procedure of the hardware.
The in-position function can be enabled or disabled, and the input logic polarity is also programmable by the “inp_logic” parameter of HSL_M_set_inp(). The INP signal status can be monitored by software with the function: HSL_M_get_io_status(). X Relative Functions: HSL_M_set_inp() HSL_M_get_io_status() HSL_M_motion_done() ALM The processing of the ALM signal is a hardware build-in procedure, and it is designed to interact with the alarm signal of the servomotor driver.
designed to interact with the deviation counter clear signal of the servomotor driver. The deviation counter clear signal is inserted in the following 4 situations: 1. Home return is complete 2. The end-limit switch is active 3. An alarm signal stops the OUT and DIR signals 4.
X Relative Functions: HSL_M_Set_Servo() HSL_M_get_io_status() 4.8 The Limit Switch Interface and I/O Status In this section, the following I/O signal operations are described. X SD/PCS: Ramping Down & Position Change sensor X ±EL: End-limit sensor X ORG: Origin position In any operation mode, if an ?EL signal is active during any moving condition, it will cause the HSL-4XMO to stop automatically outputting pulses.
The latch function is used to capture values on all 4 counters (refer to section 4.4) at the instant the latch signal is activated. The latched data can be read by the function HSL_M_get_latch_data(). The latch logic can be set by the function HSL_M_set_ltc_logic(). X Relative Functions: HSL_M_set_sd() HSL_M_get_io_status() HSL_M_set_ltc_logic() HSL_M_get_latch_data() EL The end-limit signal is used to stop the control output signals (OUT and DIR) when the end-limit is active.
“home_mode” argument in the function HSL_M_set_home_config(). The logic polarity of the ORG signal level or latched input mode is also selectable using this function as well. After setting the configuration for the home return mode with HSL_M_set_home_config(), the HSL_M_home_move() command can perform the home return function. X Relative Functions: HSL_M_set_home_config(), HSL_M_home_move() 4.9 The Counters There are four counters for each axis of the HSL-4XMO.
HSL_M_set_command() can be executed at any time to set a new command position value. To read current command position use HSL_M_get_command(). X Relative Functions: HSL_M_set_command(), HSL_M_get_command(): Feedback Position Counter The HSL-4XMO has a 28-bit binary up/down counter managing the present position feedback for each axis. The counter counts signal inputs from the EA and EB pins. It accepts 2 kinds of pulse inputs: (1). Plus and minus pulse inputs (CW/CCW mode). (2).
motor. The up/down counter counts up when the phase of EA signal leads the phase of EB signal. The following diagram shows the waveform. Figure 4-30: 90° Phase Difference Signals The index input (EZ) signals of the encoders are used as the “ZERO” reference. This signal is common on most rotational motors. EZ can be used to define the absolute position of the mechanism. The input logic polarity of the EZ signals is programmable using software function HSL_M_set_home_config().
Position Error Counter The position error counter is used to calculate the error between the command position and the feedback position. It will add one count when the HSL-4XMO outputs one pulse and subtracts one count when the HSL-4XMO receives one pulse (from EA, EB). It is useful in detecting step-loses (stalls) in situations of a stepping motor when an encoder is applied.
The table below summarizes all functions used for the different counter types Counter Description Command Counts the number of output pulses Feedback Position error General Purpose Counts the number of input pulses Counter Source Function Function Description HSL_M_set_command Set a new value for command position HSL_M_get_command Read current command position HSL_M_set_pls_iptmode Select the input modes of EA/EB HSL_M_set_feedback_src Set the counters input source HSL_M_set_position Set
1. After a home move completes 2. After a new feedback position is set X Relative Function: HSL_M_reset_target_pos() 4.10 Multiple HSL-4XMO Operations The software function library can support a maximum of 16 HSL4XMO modules in one HSL set. This means up to 63 motors(maximum axes) can be connected. When multiple modules are used, the order of axes number is from low to high and each module takes four axis number.
4.11 Change Position Or Speed On The Fly The HSL-4XMO provides the ability to change position or speed while an axis is moving. Changing speed/position on the fly means that the target speed/position can be altered after the motion has started. However, certain limitations do exist. Carefully study all constraints before implementing the on-the-fly function. Change Speed on the Fly Figure 4-31: Change Speed on the Fly The change speed on the fly function is applicable on single axis motion only.
The first 4 functions can be used for changing speed during a single axis motion. Functions HSL_M_sd_stop() and HSL_M_emg_stop() are used to decelerate the axis speed to “0.” HSL_M_fix_speed_range() is necessary before any HSL_M_v_change() function, and HSL_M_unfix_speed_range() releases the speed range constrained by HSL_M_fix_speed_range().
Figure 4-32: HSL_M_v_change() Theory Constraints of HSL_M_v_change() In a single axis preset mode, there must be enough remaining pulses to reach the new velocity, else the HSL_M_v_change() will return an error and the velocity remains unchanged. Example: A trapezoidal relative motion is applied: HSL_M_start_tr_move(0,10000,0,1000,0.1,0.1). It cause axis 0 to move for 10000 pulses, and the maximum velocity is 1000 PPS.
. NewVel (PPS) Tacc (Sec) Necessary remaining pulses Acceleration Deceleration 5000 OK / Error Total 0.1 300 313 613 OK 5000 1 3000 3125 6125 Error 10000 0.1 550 556 1106 OK 50000 0.1 2550 2551 5101 Error Table 4-6: HSL_M_v_change() Example 1. To set the maximum velocity, the function HSL_M_fix_speed_range() must be used in order for the function HSL_M_v_change() to work correctly.
Figure 4-34: Velocity Suggestions B Example: There are 3 speed change sensors during an absolute move for 200000 pulses. Initial maximum speed is 10000pps. Change to 25000pps if Sensor 1 is touched. Change to 50000pps if Sensor 2 is touched. Change to 100000pps if Sensor 3 is touched. Then the code for this application and the resulting velocity profiles are shown below. Figure 4-35: Velocity Example #include “pci_HSL-4XMO.h” HSL_M_fix_speed_range(axis, 100000.0); HSL_M_start_ta_move(axis, 200000.
if((Sensor1==High) && (Sensor2==Low) && (Sensor3 == Low)) HSL_M_v_change(axis, 25000, 0.02); else if((Sensor1==Low) && (Sensor2==High) && (Sensor3 == Low)) HSL_M_v_change(axis, 50000, 0.02); else if((Sensor1==Low) && (Sensor2==Low) && (Sensor3 == High)) HSL_M_v_change(axis, 100000, 0.
Change Position on the Fly When operating in single-axis absolute pre-set motion, it is possible to change the target position during moving by using the function HSL_M_p_change(). Figure 4-37: Change Position on the Fly Theory of HSL_M_p_change(): The HSL_M_p_change() is applicable to the HSL_M_start_ta_move(), and HSL_M_start_sa_move() functions only. It is used to change the target position, defined originally by these two functions.
Figure 4-38: Theory of HSL_M_p_change() HSL_M_p_change() Constraints: 1. HSL_M_p_change() is only applicable on single-axis absolute pre-set motion, i.e., HSL_M_start_ta_move(), and HSL_M_start_sa_move() only. 2. Position change during the deceleration period is not allowed. 3. There must be enough distance between the new target position and current position where HSL_M_p_change() is executed because the HSL-4XMO needs enough space to finish deceleration.
At position “CurrentPos,” HSL_M_p_change(0, NewPos) is applied. NewPos CurrentPos OK / Error Note 5000 4000 OK 5000 4501 Error 5000 5000 Error 5000 5499 Error 5000 6000 OK Go back 5000 9499 OK Go back 5000 9500 Error 5000 9999 Error Table 4-7: HSL_M_p_change() Constraints X Relative Function: HSL_M_p_change() 4.12 Position Compare The HSL-4XMO provides position comparison functions for all axes.
Comparator 4 Any counters General-purpose HSL_M_set_general_comparator Comparator 5 (Only Axes 0 & 1) Feedback position counter Position compare function (Trigger) HSL_M_set_trigger_comparator HSL_M_build_compare_function HSL_M_build_compare_table HSL_M_set_auto_compare Table 4-8: HSL-4XMO Comparators Note: Only comparator 5 has the ability to trigger an output pulse via the CMP. Comparators 1 and 2 are used for soft limits. Refer to section 4.9.
Continuously Comparison with Trigger Output To compare multiple data continuously, functions for building comparison tables are provided and are shown below: HSL_M_build_comp_function(AxisNo, Start, End, Interval) HSL_M_build_comp_table(AxisNo, tableArray, Size) HSL_M_set_auto_compare(AxisNo, SelectSource) The first function builds a comparison list using start and end points and constant intervals. The second function builds on an arbitrary comparison table (data array).
put of the HSL-4XMO. An image of the moving object is easily obtained.
HSL_M_set_trigger_type () 4.13 Backlash Compensator and Vibration Suppression Whenever direction change has occurred, the HSL-4XMO outputs a backlash corrective pulse before sending the next command. The function HSL_M_backlash_comp() is used to set the pulse number. In order to minimize vibration when a motor stops, the HSL-4XMO can output a single pulse for a negative direction and then single pulse for a positive direction right after completion of a command movement.
4.14 Software Limit Function The HSL-4XMO provides 2 software limits for each axis. The soft limit is extremely useful in protecting a mechanical system as it works like a physical limit switch when correctly set. The soft limits are built on comparators 1 and 2 (Refer to section 4.7), and the comparing source is the command position counter.
4.16 Motion Script Download For time-critical applications or specific motion sequences, users can pre-define a motion squence with simple script file. HSL4XMO will interpret the motion script command line-by-line and realize the motion sequence as what users want. This feature is much more useful because the module plays as a standalone system and execute the motion commands by itself. Windows context switching would not interrupt the module.
5 Motion Creator in LinkMaster After installing the hardware (Chapters 2 and 3), it is necessary to correctly configure all modules and double check the system before running. This chapter gives the guidelines for establishing a control system and manually testing the HSL-4XMO module to verify correct operation. The Motion Creator software provides a simple and powerful way to setup, configure, test, and debug a motion control system that uses HSL-4XMO module.
developed program. This function is available in a DOS environment as well.
5.3 Motion Creator Form Introducing Main Menu The main menu appears after running Motion Creator.
Interface I/O Configuration Menu In this menu, users can configure EL, ORG, EZ, ERC, ALM, INP, SD, and LTC.
ALM Logic and Response mode: Select logic and response modes of ALM signal. The related function call is HSL_M_set_alm(). 1. INP Logic and Enable/Disable selection: Select logic, and Enable/ Disable the INP signal. The related function call is HSL_M_set_inp() 2. ERC Logic and Active timing: Select the Logic and Active timing of the ERC signal. The related function call is HSL_M_set_erc(). 3. EL Response mode: Select the response mode of the EL signal. The related function call is HSL_M_set_el(). 4.
Figure 5-4: Pulse IO Configuration Menu 1. Pulse Output Mode: Select the output mode of the pulse signal (OUT/ DIR). The related function call is HSL_M_set_pls_outmode(). 2. Pulse Input: Sets the configurations of the Pulse input signal(EA/EB). The related function calls are HSL_M_set_pls_iptmode(), HSL_M_set_feedback_src(). 3. Buttons: 94 X Next Axis: Change operating axis. X Save Config: Save current configuration to HSL-4XMO.ini. X Operate: Go to the operation menu, refer to section 5.3.
Operation Menu In this menu, users can change the settings a selected axis, including velocity mode motion, preset relative/absolute motion, manual pulse move, and home return.
Figure 5-5: Operation Menu 1. Position: X Command: displays the value of the command counter. The related function is HSL_M_get_command(). X Feedback: displays the value of the feedback position counter. The related function is HSL_M_get_position() X Pos Error: displays the value of the position error counter. The related function is HSL_M_get_error_counter(). X Target Pos: displays the value of the target position recorder. The related function is HSL_M_get_target_pos(). 2.
Figure 5-6: Show Velocity Curve 6. Operation Mode: Select operation mode. X Absolute Mode: “Position1” and “position2” will be used as absolution target positions for motion. The related functions are HSL_M_start_ta_move(), HSL_M_start_sa_move(). X Relative Mode: “Distance” will be used as relative displacement for motion. The related function is HSL_M_start_tr_move(), HSL_M_start_sr_move(). X Cont. Move: Velocity motion mode. The related function is HSL_M_tv_move(), HSL_M_start_sv_move().
Figure 5-7: Home Mode Configuration 98 X ERC Output: Select if the ERC signal will be sent when home move completes. X EZ Count: Set the EZ count number, which is effective on certain home return modes. X Mode: Select the home return mode. There are 13 modes available. X Home Mode figure: The figure shown explains the actions of the individual home modes.
X Close: Click this button close this window. X ORG Distance: The length during ORG is ON 7. Position: Set the absolute position for “Absolute Mode.” It is only effective when “Absolute Mode” is selected. 8. Distance: Set the relative distance for “Relative Mode.” It is only effective when “Relative Mode” is selected. 9. Repeat Mode: When “On” is selected, the motion will become repeat mode (forward<->backward or position1<->position2).
12.Speed Range: Set the max speed of motion. If “Not Fix” is selected, the “Maximum Speed” will automatically become the maximum speed range, which can not be exceeded by on-the-fly velocity change. 13.Servo On: Set the SVON signal output status. The related function is HSL_M_set_servo(). 14.Play Keys X X Left play button: Clicking this button will cause the HSL4XMO start to outlet pulses according to previous setting. Z In “Absolute Mode,” it causes the axis to move to position1.
defined in “Decel. Time.” The related function is HSL_M_sd_stop(). 18.I/O Status: The status of motion I/O. Light-On means Active, while Light-Off indicates inactive. The related function is HSL_M_get_io_status(). 19.Buttons: X Next Axis: Change operating axis. X Save Config: Save current configuration to HSL-4XMO.ini. X Config Pulse: Go to the Pulse IO Configuration menu, refer to section 5.3 X Config Interface I/O: Go to the Interface I/O Configuration menu, refer to section 5.
102 Motion Creator in LinkMaster
6 Appendix 6.1 HSL-4XMO Commmand Executuion Time The testing is conducted at 6MHz baud rate and full-deplux mode. We list the execution time depending on the command delivering counts. The time is measured with one, four, and eight modules respectively. The time unit is mini-second. We have the classification as follows.
Notes: The cycle time is equal to maximum slave number *30.1 us. Theoretical command time is recommend as follows: Z If the module is smaller than 4, the time is roughly 0.5 ms. Z If the quantity of the modules is odd, the time is about Z If the quantity of the modules is even, the time is about 0.5 + (Num +1– 4)/2 * 0.24 ms. 0.5 + (Num – 4)/2 * 0.24 ms.
Warranty Policy Thank you for choosing ADLINK. To understand your rights and enjoy all the after-sales services we offer, please read the following carefully. 1. Before using ADLINK’s products please read the user manual and follow the instructions exactly. When sending in damaged products for repair, please attach an RMA application form which can be downloaded from: http:// rma.adlinktech.com/policy/. 2.
3. Our repair service is not covered by ADLINK's guarantee in the following situations: X Damage caused by not following instructions in the User's Manual. X Damage caused by carelessness on the user's part during product transportation. X Damage caused by fire, earthquakes, floods, lightening, pollution, other acts of God, and/or incorrect usage of voltage transformers. X Damage caused by unsuitable storage environments (i.e. high temperatures, high humidity, or volatile chemicals).