Home

User Manual - Zapp Automation Ltd

image

Contents

1. 44 XX XX BAs ogy Ape Apu lomas Jae e souenbes panisoay XX Xx X H PeAlgoes geq UI Robot Technology Co Ltd M4220130813EN Page 58 UIM242XX Miniature Integrated Stepper Motor Controller 11 3 Instruction Description This section describes the detail of the instructions mentioned in this document in the alphabetic order 1 Check desired motor status Format Description Check desired motor status ACK AA Controller ID ASB CUR VO V1 V2 PO P1 P2 P3 P4 FF Comment ASB gt gt Received data 0 CUR gt gt Received data 1 VO P4 gt gt Received data 2 9 ASB structure 7 6 5 4 waco Ack Joao am vc CUR structure Bit Value Bit 7 6 9 4 3 2 1 0 Value N A 0 Phase Current e g 27 2 7 Amp VO V2 is the converted value for desired speed 16 bits Figure 11 1 PO P4 is the converted value for desired displacement 32 bits Figure 11 2 UI Robot Technology Co Ltd M4220130813EN Page 59 UIM24202 04 08 2 ACRn Format Description ACK Comment Note Set auto current reduction ratio ACR set auto current reduction ratio n n 0 1 99 n 0 disable auto current reduction Standby CUR working current n 1 in standeby mode current reduces to 50 Standby CUR working current 2 n 2 3 99 in standeby mode current reduces
2. UIROBOT United Intelligence Robot Technology User Manual UIM242XX Series CAN2 0B Instruction Control Miniature Integrated Stepper Motor Controller AA 5s Ma Ms A W S NA i ih A 1 k eh a cs a PI IIIIHAAA fs UIM24202 04 08 Please pay attention to the following before using the UIROBOT products 1 UIROBOT products meet the specification contained in their particular Data Sheet 2 UIROBOT will only work with the customer who respects the Intellectual Property IP protection 3 Attempts to break UIROBOT s IP protection feature may be a violation of the local Copyright Acts If such acts lead to unauthorized access to UIROBOT s IP work UIROBOT has a right to sue for relief under that Act Information contained in this publication regarding controller applications and the like is provided only for your convenience and may be superseded by updates It is your responsibility to ensure that your application meets with your specifications UIROBOT MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED WRITTEN OR ORAL STATUTORY OR OTHERWISE RELATED TO THE INFORMATION INCLUDING BUT NOT LIMITED TO ITS CONDITION QUALITY PERFORMANCE MERCHANTABILITY OR FITNESS FOR PURPOSE UIROBOT disclaims all liability arising from this information and its use Use of UIROBOT products in life support and or safety applications is entirely at the buyer s risk and the buyer agrees to defend in
3. SimpleCAN protocol One gateway can network with up to 100 UIM242 controllers UIM242 can realize open loop and encoder based closed loop control lts architecture includes communication system basic motion control system advanced motion control module linear non linear acceleration deceleration S curve PT PVT displacement control sensor input control module TTL output control module and user programming module Embedded 64 bit calculating precision DSP controller guarantees the entire control process finish within 1 millisecond Instructions are simple and intuitive UIROBOT provides free Microsoft Windows based VB VC demo software and corresponding source code Enclosure is made of die cast aluminum to provide a rugged durable protection and improves the heat dissipation Ul Robot Technology Co Ltd M4220130813EN Page 5 UIM24202 04 08 TERMINAL DESCRIPTION T P Figure0 1 Terminal Description Motor Terminals Control Termianals Control Terminals Terminal No 1 V Supply voltage 12 50VDC Designator Description NO GND Supply voltage ground CANH CAN signal dominant high CANL CAN signal dominant low o1 amp W AG Analog ground for sensors O S1 Sensor input port 1 S2 Sensor input port 2 00 S3 Sensor input port 3 O P4 TTL signal output port Motor Terminals Terminal No Description A A Connect to the stepper motor phase A B B Connect to the s
4. Set digital input sampling mode STO Store moton control parameters STon Bind motion control parameters to sensoredge 9 8 10 Example of S12CON Configuration When configuring S12CON user needs to first fill every bit of the S12CON according to the information provided in previous sections and then affixes the suffix code 0000 binary An example is provided below System Description A reciprocating mobile platform has one ON OFF stroke limit sensor at each end When the mobile table hit the sensor a OV presents Requirements 1 As soon as one sensor S2 is hit the stepper motor starts to run reversely until the table hits the other sensor S1 2 As soon as S1 is hit the stepper motor starts to run positively until the table hits S2 Realization 1 First stop the motor by sending OFF 2 Weare not interested in the rising edge so set S2RACT lt 3 0 gt 0000 3 Itis required Start and Run Reversely on S2 failing edge so set S2FACT lt 3 0 gt 0010 Same as 2 set S1RACT lt 3 0 gt 0000 It is required Start and Run Forwardly on S1 failing edge so set S1FACT lt 3 0 gt 1010 Fill the S12CON with above bits get S12CON 0000 0010 0000 1010 binary Affix the suffix code 0000 to S12CON get SCFG 0000 0010 0000 1010 0000 binary 0x20A0 hex 8352 decimal 8 Send instruction SCFx 20A0 or SCF 8352 9 Setup desired speed by sending instruction SPD 5000 10 Burn parameters into E
5. D2 D3 D4 FF B2 gt gt The message ID of MDEn FG gt gt Equal to the DM bit of the MCFG Hy DM Denote the input mode value period FG 1 unit ms FG 0 unit pps s DO D4 gt gt Received data 0 4 DO D4 is the converted value for the value of the deceleration rate 32 bits Figure11 2 Page 78 M4220130813EN Ul Robot Technology Co Ltd UIM242XX Miniature Integrated Stepper Motor Controller 21 MDE Check Current Deceleration Rate Format MDE Description Check current deceleration rate ACK AA Controller ID B2 FG DO D1 D2 D3 D4 FF Comment Refer to ACK comment of MDEn Ul Robot Technology Co Ltd M4220130813EN Page 79 UIM24202 04 08 22 MDLn Check Controller Model Format MDLn Description Check the Model installed optional modules and firmware version of the UIM242 controller of ID n 9 Oa 120 ACK CC Controller ID DE 18 02 CUR asb VO V1 V2 FF Note denotes one byte the data is hexadecimal Comment DE gt gt Message ID of instruction MDLn CUR gt gt The Max phase current e g 20 means 2 0 A asb gt gt The installed optional modules and sensor ports VO V2 gt gt Received data 0 2 VO V2 is the converted value for the firmware version 12 bits Figure 11 1 Structure of asb is as follow Bit 6 5 4 3 2 1 0 Defination Int QE Closed loop Adv Motion No of sensor port For e
6. e F Moto Cords hA DriverlUlM Controllers Pa WKS 1 wee f A j e Mounting Screws rie Saf a 4 Te x i F Pra Brka ets a Pa Via feel oe ire ee Tae Pu Ms Wirt Are NEMA 23 34 42 need flange 1 Fix flange on motor 2 Fix the UIM controller on flange with screw 3 Connect the motor pin to motor terminal of UIM controller Stepper Motor DEBI poo Flange PE Es e Motor Cords EPLIR UIM Controller Driver UIM Pel 2 14 a5 y J Mounting Screws 7 lt Q ERRE A N S UI Robot Technology Co Ltd M4220130813EN Page 103
7. it is more flexible Figure 0 4 Wiring Scheme for Network Operation 2 T TE UiM S01 hide oe ee Ud a eee a ee 2 mot ce s i TEE tl E i Pi i E l a i oM l ima RS NEP ES 12 40 UIM24Z0 12 40 VOC ppg VDE 0610600668 06 ce UIM 24 210 atlas ALF 14 ULF 2 AAF 1 00 i hn UI Robot Technology Co Ltd M4220130813EN Page 11 UIM24202 04 08 INSTRUCTION SET SUMMARY Network Communication Realized by gateway UIM2501 USBC9100 PCIC120 please refer to user manual of gateway for details em a SETn Assign an to UIM242 controller Aa DD Model Check La Feedback Message CI Fae E ra Check the model of controller cc DE 8 Function Configuration EI Hacer ip PPS ENAn Set enable time boot time after n ms enable AA Ao 68 ENAXFFFF Checkenabletime AA a 69 MCFn Set master configuration register AA Bo 75 MCF Check master configuration register AA Bo 76 SCFn Set sensor control configuration registern AA Co 90 General Check a Feedback Message E o L Check desired motor status a NEC Check current motor status co 70 Check sensor status Page 12 M4220130813EN Ul Robot Technology Co Ltd UIM242XX Miniature Integrated Stepper Motor Controller Motor Configuration EI Set auto current reduction ratio y A oe Check
8. A0 A1 A2 A3 A4 FF Comment Refer to ACK comment of MACn Page 74 M4220130813EN Ul Robot Technology Co Ltd UIM242XX Miniature Integrated Stepper Motor Controller 17 MCFn MCFxn Master Configuration Register Instruction Format MCFn or MCFxn Description Setup Master Configuration Register 1 If n is decimal Use format MCFn Where n 0 1 65535 16 bits unsigned integer 2 Ilfn is hexadecimal Use format MCFxn Where n has 2 bytes and the structure is as follow Byte 0 1 Where D1 DO compose a hexadecimal 16bit data D1 is high DO is low For example Master Configuration 0x1234 Then send instruction MCFx 34 12 Each Byte must have an even number of digits or letters ACK AA Controller ID BO CO C1 C2 FF Comment BO gt gt The Message ID of MCFn CO C2 gt gt Received data 0 2 CO C2 is the converted value for the value of master configuration register 16 bits Figure 11 1 Note If y using decimal first convert the 16 bits binary number to a decimal based number Example Instruction MCF34611 or MCFx8733 ACK AA 05 BO 02 OE 33 FF Comment Convert 02 OE 33 to 16 bits 2Bytes data get 0x8733 34611 decimal Here assume Controller ID 5 Ul Robot Technology Co Ltd M4220130813EN Page 75 UIM24202 04 08 18 MCF Check Master Configuration Register Format MCF Description Check the value of the Master Configuration Register ACK AA
9. Controller 3 0CAN2 0 COMMUNICATION In order to communicate with UIM242 controller a UIM2501 CAN RS232 Converting Controller is required between the user device and the UIM242 The user device sends ASCII coded instructions through RS232 port to the UIM2501 converter Inside UIM2501 the RS232 based instructions are translated into CAN messages and sent to UIM242 controllers With this UIM2501 converter the user does not have to understand and deal with CAN bus operations but still enjoy the advantages of CAN bus such as high speed long distance interference immunity network and easy wiring UIM2501 is small in size and is set up near the host so the communication is quick and efficient UIM2501 supports 57600 bps RS232 baud rate The instruction takes less than 2ms 0 002s to transfer from user machine to UlM242XX At the same time it only takes 50 100 us to transfer a message through SimpleCAN This ensures the real time of the system For detailed instructions and operations on the communication between user device and UIM2501 please refer to the UIM2501 user manual 3 1 Controller ID Assignment Before operation a unique identification number i e ID or address is assigned to every UIM242 controller needs to be ID is used to identify which object is the instruction send to and where the ACK is from Every UIM242xx controller has a factory default ID of 5 User can change the ID through instruction Before assign an ID to
10. Controller ID BO C0 C1 C2 FF Comment Refer to ACK comment of MCFn Page 76 M4220130813EN Ul Robot Technology Co Ltd UIM242XX Miniature Integrated Stepper Motor Controller 19 MCSn Setup Micro Stepping Format MCSn Description Set micro stepping resolution n 1 2 4 8 16 unsigned integer n 1 2 4 8 16 represents the full half quarter eighth and sixteenth step resolution respectively ACK AA Controller ID ASB CUR VO V1 V2 PO P1 P2 P3 P4 FF Comment ASB gt gt Received data 0 CUR gt gt Received data 1 VO P4 gt gt Received data 2 9 ASB structure 7 6 5 4 waco Ack Jemo om vc CUR structure Bit Value Bit 7 6 9 4 3 2 1 0 Value N A 0 Phase Current e g 27 2 7 Amp VO V2 is the converted value for desired speed 16 bits Figure 11 1 PO P4 is the converted value for desired displacement 32 bits Figure 11 2 Note Real time update micro stepping MCS is short forMicrostepping Once received the MCS value will be stored in the controller s EEPROM UI Robot Technology Co Ltd M4220130813EN Page 77 UIM24202 04 08 20 MDEn Set Deceleration Rate Format Description ACK Comment MDEn Set the deceleration rate to n n 1 2 65 000 000 Pre requiring MCFG lt DM gt 0 value mode n 1 2 60 000 Pre requiring MCFG lt DM gt 1 period mode AA Controller ID B2 FG DO D1
11. Ltd UIM242XX Miniature Integrated Stepper Motor Controller 5 BLC Check backlash compensation Format BLC Description Check the value of backlash compensation in reciprocating motion ACK AA Controller ID DE B0 B1 B2 FF Comment Refer to ACK comment of instruction BLCn Ul Robot Technology Co Ltd M4220130813EN Page 63 UIM24202 04 08 6 CURn Motor Current Adjusting Format CURn Description Set the output phase current to n n 0 1 80 unsigned integer 0 80 represent 0 8 0 amps ACK AA Controller ID ASB CUR VO V1 V2 PO P1 P2 P3 P4 FF Comment ASB gt gt Received data 0 CUR gt gt Received data 1 VO P4 gt gt Received data 2 9 ASB structure 7 6 5 4 waco ren Jaro om wc CUR structure Bit Value Bit 7 6 5 4 3 2 1 0 Value N A 0 Phase Current e g 27 2 7 Amp VO V2 is the converted value for desired speed 16 bits Figure 11 1 PO P4 is the converted value for desired displacement 32 bits Figure 11 2 Note Value of this instruction will be stored in EEPROM lf the received current value is not one of the above integers an Error ACK will be sent to the user device through RS232 Incorrect instructions will be discarded without being executed Page 64 M4220130813EN Ul Robot Technology Co Ltd UIM242XX Miniature Integrated Stepper Motor Controller 7 DOUn Set TTL Output Format DOUn D
12. ORG User pre configured sensor ORG event takes place User needs pay attention to the two notes list below Power Failure Protection Should a Power Failure situation happen the value of the pulse counter will be pushed into EEPROM and restored when reboot next time However passive movement after power off cannot be recorded The actual motor position is also relative to the micro stepping resolution Page 88 M4220130813EN Ul Robot Technology Co Ltd UIM242XX Miniature Integrated Stepper Motor Controller 31 POS Check Current Position Format POS Description Check the value of current hardware absolute pulse counter i e current absolute position of the motor ACK CC Controller ID BO PO P1 P2 P3 P4 FF Comment BO gt gt The message ID of current position PO P4 gt gt Received data 0 4 PO P4 is the converted value for the desired absolute position 32 bits Figure 11 2 This position is relative to origin zero position of couter Ul Robot Technology Co Ltd M4220130813EN Page 89 UIM24202 04 08 32 SCFn SCFxn Set Sensor Configuration Format SCFn or SCFxn Description Configure S12CON S34CON ATCONH and ATCONL 1 When n is decimal Instruction type is SCFn Where n 0 1 1048575 24 bits unsigned integer Refer to Chapter 8 2 When n is hexadecimal Instruction is SCFxn Where n has 3 bytes the structure Is as follow Byte 0 1 2 Where D1 DO
13. S1IE gt 0001 N A Depends on MCFG lt S2lE gt lt S1IE gt 0010 Start and Run Reversely Depends on MCFG lt S2lE gt lt S1IE gt 0011 Decelerate until Stop Depends on MCFG lt S2IE gt lt S1IE gt 0100 Emergency Stop Depends on MCFG lt S2lE gt lt S1IE gt 0101 Reverse Displacement Control Depends on MCFG lt S2lIE gt lt S1IE gt 0110 Reset position Depends on MCFG lt S2lIE gt lt S1IE gt 0111 Reset position Dispalcement Control Depends on MCFG lt S2lE gt lt S1IE gt 1001 Direction change displacement control Depends on MCFG lt S2lE gt lt S1IE gt 1010 Start and Run Forwardly Depends on MCFG lt S2lE gt lt S1IE gt 1011 Reset position Decelerate until Stop Depends on MCFG lt S2lE gt lt S1IE gt 1100 Reset position Emergency Stop Depends on MCFG lt S2lE gt lt S1IE gt 1101 Forward Displacement Control Depends on MCFG lt S2lE gt lt S1IE gt 1110 Change direction and run Depends on MCFG lt S2lE gt lt S1IE gt 1111 OFF Depends on MCFG lt S2IE gt lt S11E gt 8 7 Sensor Input Control Register S34CON S34CON Sensor3 Port4 Control defines the binding relationship between S3 sensor events and actions as well as the activation of corresponding RICNs It is a 16bits register inside the controller and can be configured using the instruction SCF When writing to it user needs to affix a 4bits suffix code to point to this register For details of SCF please refer to chapter 10 In addition S34CON is also used to configure the TT
14. a UIM242XX controller please make sure the UIM2501 controller and the UlM242XX controller are connected together using the standalone operation scheme Figure 0 3 A motor is not necessary For detailed process and instructions for Controller ID assignment please see the UIM2501 user manual A amp A Please Note If there are two or more UIM242 controllers with the same ID in a network See the network may not work properly Before assign an ID to a UIM242XxX controller please make sure the UIM2501 controller and the UlM242XX controller are connected together using the standalone operation scheme 3 2 Instruction List The following table shows the instructions mentioned in this chapter the detail of those instructions is descriped at the end of the document instruction Description Page MDL Check the model of controller BO For details about CAN2 0B bit rate setting and global instructions please see the UIM2501 user manual GA Note Incorrect bit rate can result in communication failure or unstable Ul Robot Technology Co Ltd M4220130813EN Page 25 UIM24202 04 08 4 0REAL TIME CHANGE NOTIFICATION UIM242 controllers support Real time Change Notification RTCN Similar to interrupter of CPU a RTCN is generated and sent when a user predefined event happens The length of a RTCN is 4 bytes The time from the occurrence of the event to the sending of the RTCN is less than 1 millisecond The time is decided by b
15. a step deceleration to the desired speed Figure7 7 Nonlinear Deceleration Control case 2 Current Speed Uniform deceleration ya Step Deceleration Maximum Cessation Speed Desired Speed T Time If the desired speed is lower than the Max Cessation Speed and current motor speed is lower than Max Cessation Speed then the speed will be adjusted to the desired speed through step deceleration Figure7 8 Nonlinear Deceleration Control case 3 tep Deceleration Maximum Cessation Speed Current Speed H Desired Speed T Time Page 38 M4220130813EN Ul Robot Technology Co Ltd UIM242XX Miniature Integrated Stepper Motor Controller Note Setting the Maximum Starting Speed or the Maximum Cessation Speed to 0 zero will force the controller use Linear Acceleration Deceleration Control Algorithm 7 5 S curve Displacement Control S curve displacement control essentially is the displacement control under the linear acceleration and deceleration speed control The name is originated from the shape of the motion trajectory The original S curve displacement control is the acceleration coast deceleration speed control In the entire trajectory there is no knee point which makes the motion very smooth without impact or vibration The control process is shown in figure 7 9 Figure7 9 S curve Relative Displacement Control case 1 Desired Speed Uniform Acceleration JR Deceleration T Time Angular Displac
16. as the value of the deceleration rate The range of the input value is 1 65 000 000 and unit is pulse sec sec or pulse square second Period mode If the DM bit of Master Configuration Register is set to one MCFG lt DM gt 1 then the value of the instruction will be interpreted as the period of the acceleration or in other words the time used for motor to decelerate to the desired speed from current speed The range of the input value is 1 60 000 milliseconds i e 0 001 60 seconds 4 Set maximum starting speed MMS 5 Set maximum cessation speed MMD 6 Set backlash compensation value BLC Max starting speed and max cessation speed has been described in front section The unit of MMS and MMD are pps Figure7 12 Two modes to Set the of Acceleration Rate 1 Acc Period Desired Speed Max Start Speed 2 Acc Rate Slope Current Speed T HFHJ 7 9 Enable disable Advanced Motion Control Module MCFG Advanced Motion Control Module can be enabled or disabled by setting the CM bit of MCFG MCFG lt 10 gt Setting the CM bit MCFG lt CM gt 1 will enable the module and clearing the CM bit MCFG lt CM gt 0 will disable the advanced motion control module For details of setting please refer to Section 5 1 Master Configuration Register Meanwhile the AM and DM bit of MCFG also defines the input methods of acceleration deceleration 7 10 Instruction List The following table shows the
17. compose a hexadecimal 16bit data D1 is high DO is low IDX 0 1 2 3 denotes configuration of S12CON S34CON ATCONH and ATCONL separately Example Set S12CON as 0x1234 Then send instruction SCFx 34 12 00 00 is suffix Each Byte must have an even number of digits or letters ACK AA Controller ID CO SO S1 S2 S3 S4 ALO AL1 AHO AH 1 FF Comment CO gt gt The message ID of SCFn SO S4 gt gt Received data 0 4 ALO AL1 gt gt Received data 5 6 AHO AH1 gt gt Received data 7 8 SO S4 is the converted value for S34CON S12CON 32 bits Figure 11 2 where 16 bits high denotes S34CON 16 bits low denotes S12CON ALO AL1 is the converted value for lower limit of analog threshold ATCONL 12 bits Figure 11 1 AHO AH1 is the converted value for upper limit of analog threshold ATCONH 12 bits Figure 11 1 Page 90 M4220130813EN Ul Robot Technology Co Ltd UIM242XX Miniature Integrated Stepper Motor Controller Note The suffix code for S12CON is 00 hexadecimal The suffix code for S34CON is 01 hexadecimal The suffix code for ATCONH is 02 hexadecimal The suffix code for ATCONL is 03 hexadecimal Ul Robot Technology Co Ltd M4220130813EN Page 91 UIM24202 04 08 33 SCF Check the value of Sensor Configuration Format SCF Description Check the current value of S12CON S34CON ATCONH and ATCONL ACK AA Controller ID CO SO S1 S2
18. configuration register Set master configuration register Check master configuration register Ul Robot Technology Co Ltd M4220130813EN Page 29 UIM24202 04 08 6 DBASIC CONTROL INSTRUCTIONS UIM242 controllers support abundant motion control instructions The instructions of Ulm242 are valid for both basic motion control without acceleration deceleration or S curve displacement control and advanced motion control if the module is installed and enabled User can select either basic or advanced motion control by configuring the Master Configuration Registration MCFG In this Chapter introduction to UIM242XX motion control modes is provided 6 1 General Introduction of Motion Control Modes There are three motion control modes for UIM242XX controller Velocity Tracking VT Position Tracking PT and Position Velocity Tracking PVT Velocity Tracking VT In the Velocity Tracking VT mode UlM242XX controller controls the motor speed to track desired speed Figure6 1 Velocity Tracking Instruction SPD 1000 received at this point Basic motion control speed rises without Current Speed acceleration process Advanced motion control linear non linear acceleration T Time Instruction SPD 1000 received at this point Basic motion control speed falls without deceleration process Current Speed Advanced motion control linear non linear 1000 deceleration T Time Please note tha
19. following table shows the instructions mentioned in this chapter the detail of those instructions is descriped at the end of the document instruction Description Page LACAN Set auto current attenuation raton ENAn Set enable time boot afternmsenabe 6 TENAXFFFF Checkenabletime lt o Set desired position n open loop control Check current position SPD TP STPn Set desired incremental displacement n Check current incremental displacement Ul Robot Technology Co Ltd M4220130813EN Page 35 UIM24202 04 08 7 0ADVANCED MOTION CONTROL UIM242XX has an optional Advanced Motion Control Module sold separately to perform linear non linear acceleration deceleration and S curve displacement and position control User can specify corresponding motion control parameters through instructions Instructions for the advanced motion control includes all the basic motion instructions and 6 additional instructions Values of these instructions will be stored in the EEPROM the burning process will not affect any real time process Once the parameters are set the controller will perform the advanced motion control automatically At any time user can use instructions e g FBK POS SPD etc to get the current status of the motor In this chapter the Advanced Motion Control processes are introduced 7 1 Linear Acceleration Linear acceleration is defined as acceleration at constant rate The relationship between
20. gt Received data 0 2 CO C2 is the converted value for the value of initial configuration register 16 bits Figure 11 1 Note Require controller hardware version being 1232 or higher Ul Robot Technology Co Ltd M4220130813EN Page 71 UIM24202 04 08 14 ICF Check Initial Configuration Register Format ICF Description Check initial configuration register ACK AA Controller ID DA CO C1 C2 FF Comment Refer to ACK comment of ICFxn Note Require controller hardware version being 1232 or higher Page 72 M4220130813EN Ul Robot Technology Co Ltd UIM242XX Miniature Integrated Stepper Motor Controller 15 MACn Set Acceleration Rate Format MACn Description Set the acceleration rate to n n 1 2 65 000 000 Pre requiring MCFG lt AM gt 0 value mode n 1 2 60 000 Pre requiring MCFG lt AM gt 1 period mode ACK AA Controller ID B1 FG AO A1 A2 A3 A4 FF Comment B1 gt gt The message ID of MACn FG gt gt Equal to the AM bit of the MCFG Denote the input mode value period FG 1 unit ms FG 0 unit pps s AO A4 gt gt Received data 0 4 AO A4 is the converted value for the value of the acceleration rate 32 bits Figure 11 2 Ul Robot Technology Co Ltd M4220130813EN Page 73 UIM24202 04 08 16 MAC Check Current Acceleration Rate Format MAC Description Check current acceleration rate ACK AA Controller ID B1 FG
21. instructions mentioned in this chapter the detail of those instructions is descriped at the end of the document instruction Description Page Check acceleration rate MDEn Set deceleration rate n Check deceleration rate Page 42 M4220130813EN Ul Robot Technology Co Ltd UIM242XX Miniature Integrated Stepper Motor Controller MMDn Set maximum cessation speed n MMD Check maximum cessation speed 82 MMSn Set maximum starting speed n 83 MMS Check maximum starting speed 84 Ul Robot Technology Co Ltd M4220130813EN Page 43 UIM24202 04 08 8 0SENSOR INPUT CONTROL UIM242XX Motion Controller has an optional sold separately Sensor Control Module which supports three sensor input ports S1 52 and S3 Port S2 can be configured for digital input 0 5V Port S1 and S3 can be configured for either digital input or analog input Besides digital input condition circuit UIM242XX has a 12 bits ADC analog digital converter and a 5V reference voltage If the input voltage is 0 5V the feedback value will be 0 4095 The ADC sample rate is 50K Hz The analog feedback value is a mathematic average of 16 samples and the update rate is 1000 Hz Regardless of whether it s digital or analog the input voltage cannot exceed 0 3V 5 3V otherwise permanent damage can be done Besides measuring the voltage input and providing the reads to the user device when inquired the sensor control module is able to carry out a certain contro
22. lt 2 gt S2IE bit MCFG lt 1 gt and S1IE bit MCFG lt 0 gt Please refer to section 4 1 for details Please note to realize the sensor event control user needs to further configure the sensor control registers S34CON and S12CON Please refer to Chapter 8 0 for details Page 26 M4220130813EN Ul Robot Technology Co Ltd UIM242XX Miniature Integrated Stepper Motor Controller 5 0 INITIAL AND HARDWARE FIRMWARE CONFIGURATION UIM242 s hardware and firmware can be configured through user instructions There are 5 configuration registers for UIM242 Initial Configuration Register Master Configuration Register S12CON S34CON and Analog Threshold Register In this chapter only the Initial Configuration Register and Mater Configuration Register are described User can find details about the other registers in their corresponding chapters 5 1 Initial Configuration Register hardware version 1232 or higher Initial configuration register is used to decide the initial status of the controllers after power on Once configured its value will be burned into the on board EEPROM and the controller will auto reboot Initial configuration register is a 16bits register with following structure ICFG Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Biti5 4 Unimplemented Read as 0 Bit3 Elock Lock when emergency events happen O After the sensor is emergency stop or power off the controller is unlock and can execute instructions 1 A
23. motor The former STP instruction is regarded as being completed Meanwhile system will shift from PT mode to VT mode lf an STP instruction is received while the motor is already running the former steps will not be counted in the displacement of current STP instruction Example For a 1 8 stepper motor if STP 200 pulse User sent STP200 lf MCS 1 motor rotation angle 1 8 200 360 lf MCS 16 motor rotation angle 1 8 200 16 22 5 Page 100 M4220130813EN Ul Robot Technology Co Ltd UIM242XX Miniature Integrated Stepper Motor Controller 42 STP Check Displacement Format STP Description Check current incremental displacement ACK CC Controller ID B3 PO P1 P2 P3 P4 FF Comment B3 gt gt The message ID of current incremental displacement PO P4 gt gt Received data 0 4 PO P4 is the converted value for the current incremental displacement 32 bits Figure11 2 UI Robot Technology Co Ltd M4220130813EN Page 101 UIM24202 04 08 APPENDIX A DIMENSIONS OM lo 1 gt Maa Wi to pan a ae ana de NA i aaa fea Units mm Page 102 M4220130813EN UI Robot Technology Co Ltd UIM242XX Miniature Integrated Stepper Motor Controller APPENDIX B INSTALLATION INSTRUCTION NEMA 17 do not need flange 1 Fix the UIM controller on motor with screw 2 or 4 2 Connect the motor pin to motor terminal of UIM controller stepper Motor PREMIA
24. multiple pulps connected to the two wire power cord CAN bus network boosts many advantages one of them is controllers never compete for bus transference A UIM2501 CAN R232 converter is used to connect UIM242 controller s to user device through serial port Meanwhile ASCIl coded instructions from user device are converted and transfers in CAN protocol in high speed to long distance reliably to control stepper motor s motion parameters such as direction speed steps micro steps current enable and disable the H bridge For network operation each controller should be set a unique ID and up to 100 UIM242 controllers can be controlled through this UIM2501 converter 1 1 Basic Control System UIM242 controller s basic control system comprises communication system basic motion control system absolute position counter and real time event based change notification system Communication System CAN bus protocol communication is used to realize the control to UIM242 Through one CAN RS232 converter the UIM2501 user device can command multiple UIM242 controllers through RS232 using ASCII coded instructions The CAN bit rate can be changed through instruction Basic Motion Control UIM242 has a build in basic motion control system User device can control the following basic motion parameters through instructions in real time direction speed angular UI Robot Technology Co Ltd M4220130813EN Page 19 UIM24202 04 08 displacement
25. no displacement Therefore UIM242 will take this instruction as a request to shift from PT mode to VT mode In PT mode the actual speed direction and desired displacement are related to deviation of actual displacement When sign of desired speed and displacement deviation is different the actual direction is decided by displacement deviation while actual speed is set to absolute value of desired speed Once deviation of desired and actual displacement is too small and the acceleration is also too small then it may cause the following situation the motor has already reached the desired position but it still has not reached the desired speed Ul Robot Technology Co Ltd M4220130813EN Page 31 UIM24202 04 08 Figure6 2 Position Tracking Mode without acceleration deceleration Position T Time Actual Motor Speed eceiveENA eceiveORG Reach Position 2000 ReceiveSPD 2000 om ReceivePOS 1000 lt Reach Position 1000 So E E LL Pa O v v 2 2 13 ra O O D D T Time Operation or Control Desired Current Position Error Desired Motor Motor Event Mode Position Position Speed Direction Speed Stored Stored position position Stored Stored position position ORG 0 0 POS 0 2000 SPD 0 2000 Position reached 0 POS 4000 Position reached SPD POS Position reached PT mode off OFF Power up VT ENA ER PrPrPRrRPOOOrRRrR PF PB Position Velocity Tracking PVT Position Veloc
26. phase current micro stepping and enable disable the H bridge etc Speed input range is 65 000 pulses sec and displacement input range is 2 000 000 000 pulses Absolute Position Counter UIM242 has a hardware pulse counter The counter can be reset either by user instruction or automatically by the configurable sensor input event Under most conditions through the advanced motion control this counter can provide the absolute position of the motor with enough accuracy When the counter reaches zero position there could be automatically generated message feedback to the user device given the corresponding configuration through user instruction Furthermore with the encoder based closed loop control module the UIM242 can perform self closed loop control Real time Change Notification RTCN Similar to CPU s interrupters UIM242XX can automatically generate certain messages after predefined events and sends them to the user device The time is less than 1 millisecond from the occurring of the event to the message being sent Message transfer time depends on the baud rate of the RS232 setup The transfer time will be less than 1 millisecond if the baud rate is set to 57600 UIM242XX s RTCN system supports 12 events displacement control done absolution position reset sensor 1 2 38 rising edge and falling edge analog input beyond upper threshold analog input lower than lower threshold and TTL status etc All RTCNs can be enabled
27. please contact with salesmans before purchase UI Robot Technology Co Ltd M4220130813EN Page 7 UIM24202 04 08 TYPICAL APPLICATION UIM242 controllers can work standalone or within a CAN network Working standalone means only one UIM242 controller is linked to the CAN based host such as UlM2501 When working in a CAN network up to 100 UIM242 controllers can be linked together Under both scenarios sensor input S1 S2 S3 should be connected to terminal 6 7 8 and signal ground should be connected to terminal 5 Furthermore please be aware User is responsible for the power supply for sensors Voltage on terminal 6 7 8 9 must be kept between 0 3V and 5 3V Signal line of TTL output port P4 should be connected to port 9 and sign ground should be connected to AG port port 5 For TTL output the max sourcing sinking current must be kept in 0 20mA Output voltage of P4 is 0 5 V Relative to Port 5 lf using an external encoder channel A should be connected to S1 channel B to S2 GND to AG Futhermore users must note Live line work is forbidden Live line work will cause ground wire missing the supply voltage red port is on while the supply voltage ground black port is not on In this case the supply voltage flows into the CAN driver chip then flows into other controllers in the net through CAN bus and finally causes damage to numbers of controllers All controller and gateway must be common grounded Connect the
28. the speed and time is shown in figure 7 1 After the acceleration rate and desired speed is set MAC and SPD UIM242 controller will perform the acceleration process automatically Figure7 1 Linear Acceleration Control Acceleration Rate Desired Speed Current Speed T Time 7 2 Linear Deceleration Linear deceleration is defined as deceleration at constant rate The relationship between the speed and time is shown in figure 7 2 After the deceleration rate and desired speed is set MDE and SPD UIM242 controller will perform the deceleration process automatically Figure7 2 Linear Deceleration Control Speed Current Speeed Uniform Deceleration Desired Speed T Time 7 3 Nonlinear Acceleration To minimize the response time and to avoid resonance point user can use UlM242XX s non linear acceleration function Experiments show that through non linear acceleration Page 36 M4220130813EN Ul Robot Technology Co Ltd UIM242XX Miniature Integrated Stepper Motor Controller UIM242XX can make NEMA17 23 4000RPM quad step in 0 25 seconds UlM242XX controller has the following non linear acceleration functions If the desired speed is higher than a certain value i e the Maximum Starting Speed defined by instruction and current motor speed is lower than the Max Starting Speed then the motor speed will first step up to the Max Starting Speed and then linearly accelerated according to the acceleration rate Fig
29. will cause pressure on CAN bus Especially for those basic motion instructions like SPD DIR MCS which have the same ACK sending a set of ACK is unnecessary For example CUR 20 MCS 16 SPD 5000 ENA The above instruction set will cause 4 ACK messages being transferred on the RS232 bus To facilitate the above situation user can use the following method to send a set of instructions Instruction 1 Instruction 2 Instruction N N lt 10 For example CUR 20 MCS 16 SPD 5000 ENA UIM242xXX will only send back 1 ACK on receiving the above message In the above example and is called Macro Operator Instructions between a pair of macro operators will get no ACK message UI Robot Technology Co Ltd M4220130813EN Page 23 UIM24202 04 08 The semicolon at the end of the instruction set has no letter or number before it That is called Null Instruction The only purpose of a Null Instruction is to tell the UlM242XX to feedback all the inquired parameters of the basic motion control i e Enable disable Current Micro stepping Auto current reduction Direction Speed and Displacement Actually user can simply send the null instruction alone to check the status of the above parameters If there is no null instruction after the in the above example there will be no ACK message at all Page 24 M4220130813EN Ul Robot Technology Co Ltd UIM242XX Miniature Integrated Stepper Motor
30. 08 26 MMS Check current Maximum Starting Speed Format MMS Description Check the maximum starting speed ACK AA Controller ID B3 MO M1 M2 FF Comment Refer to ACK comment of MMSn Page 84 M4220130813EN Ul Robot Technology Co Ltd UIM242XX Miniature Integrated Stepper Motor Controller 27 OFF H Bridge Disable Format OFF Description Disable the stepper motor driver i e H bridge driving circuit ACK AA Controller ID ASB CUR VO V1 V2 PO P1 P2 P3 P4 FF Comment ASB gt gt Received data 0 CUR gt gt Received data 1 VO P4 gt gt Received data 2 9 ASB structure 7 6 5 4 waco aca Jarre om we CUR structure Bit Value Bit 7 6 5 4 3 2 1 0 Value N A 0 Phase Current e g 27 2 7 Amp VO V2 is the converted value for desired speed 16 bits Figure 11 1 PO P4 is the converted value for desired displacement 32 bits Figure 11 2 Note Turns off the dual H bridge motor driving circuit Once controller is OFF most devices of controller including MOSFET are turn off the motor is free and the logical circuit can work Ul Robot Technology Co Ltd M4220130813EN Page 85 UIM24202 04 08 28 ORG Reset Position Counter Format ORG Description Reset the position encoder counter to zero 0 is equivalent to instruction ORG 0 ACK AA Controller ID B7 PO P1 P2 P3 P4 FF Comment Please refer to 31 PO
31. 4202 04 08 CONTENTS Terminal descriptions 6 Terminal description aia o e codo e ecru a e e doo a 7 Typical A A a aaay 8 INSTFUGTION SEU SUIMIMAN Y ipni o a a E a a E E E EE 12 Ghar acta SOS o e 14 1 0 OVOIVIOW sscrr a 19 1 1 Basic CORntrol Sy Mi li lid Did ose 19 1 2 Advanced Motion Control Morea 20 Lo Sensor Input Control Module ai a E T A eect 20 14 PTE OUTPUT GOntrol Module a aaa 21 1 5 Instructions and INTC ACC sitio rata ages 21 2 0 instruction ANG Feedback Structure aai 22 2 1 UlM242 Message Communication MoOdE6 ccccccccccccncccnnccccnononcconnnononononcnonnnnnonnnnnnnnnnnnnnnnnnnnnnnnnnnnnannnnnnnnnns 22 22 WMstucion gt TUI icon 23 23 Macro Operatorand NUMIMSruCtOn e de ol edo DO 23 3 0 CAN2 0 COMMUNICATION a iO 25 3 1 Controller ID AS stone ra areas oko co secede tins E Ad E 25 3 2 ASTUCIA ENS Ui a ciate 2 aa es aaa a es nl de iu ene ae cle a 25 4 0 Real time Change NoOttiCatlom iii A ieee ee Aaa Eia 26 4 1 RTON Ul CES RE o e ake anes 26 4 2 Enable Disable REGN as a a dolce 26 5 0 initial and Hardware Firmware Configuration cccccssssseeescesssseeeeessseeeeeeeseeeseoeesseeseoeesseeseoeneesseooens 27 5 1 Initial Configuration Register hardware version 1232 Or NiQhe ccccsseeeceeeeeeeeeeeeeeeeeeeessaeeeeeeesaeeeeeeeeas 27 Dar A teas Soma cee cea aoa eae ate ad Sade eens ae ae nts Gad en eeaeoe 28 Oe os A ce ee eae eta ek a alte Me R eli Melee eet 28 54 Master Conigu ralon Regi
32. 9 UIM24202 04 08 12 FBK Motor Status Feedback Inquiry Format FBK Description Check the current motor status ACK AA Controller ID ASB CUR VO V1 V2 PO P1 P2 P3 P4 FF Comment ASB gt gt Received data 0 CUR gt gt Received data 1 VO P4 gt gt Received data 2 9 Structure of ASB is as follow Bit 7 6 5 4 3 2 1 0 Defination Nia 0 ACR ENA OFF DIR MCS 1 0 full step 15 1 16 step Structure of CUR is as follow Bit 7 6 5 4 3 2 1 0 Defination N A 0 Phase Current e g 27 2 7 Amp VO V2 is the converted value for the current motor speed 16 bits Figure11 1 PO P4 is the converted value for the current motor displacement 32 bits Figure 1 2 Note User can get current motor status by using this instruction at any time Please note current status is different from desired status Page 70 M4220130813EN Ul Robot Technology Co Ltd UIM242XX Miniature Integrated Stepper Motor Controller 13 ICFxn Initial Configuration Register Instruction Format ICFxn Description Configure the initial configuration register InitCFG Parameter n has two bytes structure is as follow Byte 0 1 Where D1 DO compose a hexadecimal 16bit data D1 is high DO is low Example Initial Configuration 0x1234 Then send instruction ICFx 34 12 ACK AA Controller ID DA CO C1 C2 FF Comment DA gt gt Message ID of instruction ICFxn CO C2 gt
33. EPROM by sending STO 11 Press any one of the limit sensors the mobile platform will work 12 Disconnect the user device and restart the UIM242 controller the system will automatically run Page 50 M4220130813EN Ul Robot Technology Co Ltd UIM242XX Miniature Integrated Stepper Motor Controller 13 If enable auto feedback once the motor touches limit switch user device will receive a feedback message of falling edge on port S1 S2 8 11 Example of ATCONH ATCONL Configuration Similar to S12CON configuration user needs to first fill every bit of the ATCONH ATCONL according to the information provided in previous sections and then affixes the suffix code 0011 0010 An example is provided below System Description A reciprocating mobile platform has one linear potentiometer attached to the mobile table Within the stroke range the potentiometer outputs 0 6V 4V Requirements 1 As soon as the sensor output is less than 0 6V the stepper motor starts to run forward until the potentiometer outputs arrives 4V 2 As soon as the sensor output is higher than 4V the stepper motor starts to run backward DIR 0 until the potentiometer outputs reaches 0 6V Realization 1 First stop the motor by sending OFF 2 Set MCFG lt ANE gt 1 MCFG lt CHS gt 0 MCFG lt S1IE gt 1 get MCFG 1000 0000 0000 0001 binary 0x8001 hex 32769 decimal 3 Send instruction MCF x8001 or MCF 32769 4 Itis required
34. For S1 S2 and S34CON For S3 must be configurated again ACK AA Controller ID C9 SO S1 S2 S3 S4 S5 S6 S7 S8 FF Comment C9 gt gt Message ID of instruction STGxn SO S8 gt gt Received data 0 8 SO S2 is the converted value for sampling mode of sensor 1 16 bits Figure 11 1 S3 S5 is the converted value for sampling mode of sensor 2 16 bits S6 S8 is the converted value for sampling mode of sensor 3 16 bits Example Requirements 1 Sensor 1 2 Intermittent mode interval is 200ms Then 1 IDX 00 hexadecimal 2 D1 DO 200 decimal 00C8 hexadecimal So DO C8 D1 00 hexadecimal 3 Then send instruction STGx C8 00 00 Page 96 M4220130813EN Ul Robot Technology Co Ltd UIM242XX Miniature Integrated Stepper Motor Controller 38 STG Check Digital Input Sampling Mode Format STG Description Check digital input sampling mode of S1 S2 FI S3 ACK AA Controller ID C9 SO S1 S2 S3 S4 S5 S6 S7 S8 FF Comment Refer to ACK comment of instruction STGxn Ul Robot Technology Co Ltd M4220130813EN Page 97 UIM24202 04 08 39 STO Format Description ACK Comment Note EEPROM Store STO Banding motion parameters to motions Triggered by sensor edge or controllered by instruction Motion parameters include 1 Acceleration 2 Deceleration 3 Max starting speed 4 Max cessation speed For senso
35. Instruction without semicolon will cause unpredictable results Feedback Message is the message sent to user device from UlD828 controller The maximum length of feedback messages is 13 bytes Feedback messages from UIM242 through UIM2501 follow the structure below Header Controller 1D Message 1D Data Terminator There are 3 kinds of headers AA CC and EE Controller ID the identification number of current controller in a CAN network also known as Node ID Scope 5 125 Message ID denotes the property of the current message Data has a bits data structure High is in front and low is in the back The 7bits data can be translated into 16bits data through the shifting operation One 16bit data takes three 7bits data to represent Terminator denotes the end of a feedback message UIM242 controller utilizes FF or FE as the terminator If terminator is FF it means there is no follow up message If terminator is FE it means there has follow up messages Note there are two types of feedback that has NO message ID ACK message and Motor Status feedback controller s response to FBK instruction Other messages could have NO data such as some real time change notification messages 2 3 Macro Operator and Null Instruction In practice users will combine several instructions together and send them at once Normally the user device will receive an ACK message on every instruction sent these message
36. L level output This output port P4 is capable of providing 20mA sourcing or sinking current In practice please keep the current as low as possible to prevent overheating the controller Port P4 also can output setting level when detects events list below pre configuration 1 Run Stop status The output voltage level is determined by if the speed is zero or not 2 Direction change The output voltage level is determined by if the current motor direction is forward or reverse 3 Origin point hit The output voltage level is determined by if current position is zero point or just crosses over the zero point 9 1 Introduction to TTL Output Control Instructions There are 3 instructions related to the TTL output control 1 MCF The P4IE bit MCFG lt 3 gt of the master configuration register enables disables the P4 real time change notification RTCN For details please refer to section 5 1 2 SCF is used to configure the register SS4CON S34CON is shared by Sensor 3 and TTL output When it works as TTL output it definds the relationship between events and outpult level 3 DOU is used to directly control the TTL output voltage level as well as check current voltage level 9 2 TTL Output Control Register S34CON For TTL output control the upper byte of S34CON defines the binding between a certain event and the output voltage level SS4CON is a 16 bit register inside the controller and can be configured using the instruc
37. L output port and the events that drive the output level In this chapter only the S3 related configuration is described The suffix code for S34CON is 0001 binary S34CON structure is as follows Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Defination STALL P4LVL P4EVENT S3RACT S3FACT Bit 15 12 Stall Alarm Only for closed loop control please refer to UIM242 closed loop control manual Page 48 M4220130813EN UI Robot Technology Co Ltd UIM242XX Miniature Integrated Stepper Motor Controller Bit 11 8 P4LVLP4EVENT lt 2 0 gt P4 TTL Output Control Please refer to chapter 9 0 for details Bit 7 4 S3RACT lt 3 0 gt S3 Rising edge Action Bit 3 0 S3FACT lt 3 0 gt S3 Falling edge Action The binding relationship between S3 and S2 sensor events and actions is as follow ACT Code binary Action RTCN or Not 0101 Reverse Displacement Control Depends on MCFG lt S2lIE gt lt S1IE gt 0110 Reset position Depends on MCFG lt S2IE gt lt S1IE gt 0111 Reset position Dispalcement Control Depends on MCFG lt S2lE gt lt S1IE gt 1001 Direction change displacement control Depends on MCFG lt S2IE gt lt S1IE gt 1010 Start and Run Forwardly Depends on MCFG lt S2lE gt lt S1IE gt 1011 Reset position Decelerate until Stop Depends on MCFG lt S2lE gt lt S1IE gt 1100 Reset position Emergency Stop Depends on MCFG lt S2IE gt lt S1 E gt 1101 Forward Displacement Control Depends on MCFG lt S2lIE gt lt S1IE gt 1110 Change direction and run Depe
38. S Page 86 M4220130813EN Ul Robot Technology Co Ltd UIM242XX Miniature Integrated Stepper Motor Controller 29 ORGn Reset Position Counter Format ORGn Description Reset the position encoder counter to a given value n n 2147483647 2147483647 signed integer n 0 reset the position encoder counter to zero 0 n 0 reset the position encoder counter to a given value n ACK AA Controller ID B7 PO P1 P2 P3 P4 FF Comment Please refer to 31 POS Ul Robot Technology Co Ltd M4220130813EN Page 87 UIM24202 04 08 30 POSn Position Control Format POSn Description Set desired position for open loop control n 2147483647 2147483647 signed integer ACK AA Controller ID B7 PO P1 P2 P3 P4 FF Comment B7 gt gt The message ID of desired position PO P4 gt gt Received data 0 4 PO P4 is the converted value for the desired absolute position 32 bits Figure1 0 2 Note Position is essentially recorded from counts of the pulse counter The position counter records the total pulses sent to motor When the direction is positive the counter increases by 1 when the direction is negative the counter decreases by 1 When ICFG CW 0 consider clockwise as forword direction when ICFG CW 1 consider anticlockwise as forword direction The absolute position counter only resets back to zero in two situations User issues the instruction
39. S3 S4 ALO AL1 AHO AH1 FF Comment Refer to ACK comment of SCFn Page 92 M4220130813EN Ul Robot Technology Co Ltd UIM242XX Miniature Integrated Stepper Motor Controller 34 SFB Format Description ACK COMMENT Note Check Sensor Data SFB Check sensor readings and status CC Controller ID C1 D1 D2 D3 ANO AN1 FF C1 gt gt The message ID of SFB D1 D3 gt gt Received data 1 3 ANO AN1 gt gt Received data 4 5 D1 D3 represent the logic level of S1 S2 and S3 respectively 0 1 ANO AN1 is the converted value for analog input 12 bits Figure 11 1 AN1 and ANO are 0 if no analog input port is configured This instruction can be used for sensor data inquiry at any time and under any condition Ul Robot Technology Co Ltd M4220130813EN Page 93 UIM24202 04 08 35 SPDn Speed Adjusting Format SPD Description Set the desired speed to n n 65535 1 0 1 65535 signed integer ACK AA Controller ID B5 VO V1 V2 FF Comment B5 gt gt The message ID for desired speed VO V2 gt gt Received data 0 2 VO V2 is the converted value for the value of desired speed 16 bits Figure11 1 Unit Pluse Second PPS or Hz The sign of speed decides direction If no or specified before x itis taken as Note Once H bridge is enabled motor starts running on receiving the instruction SPDn
40. Start and Run Forwardly on S1 falling edge when analog input lt 0 6V therefore S1FACT lt 3 0 gt 1010 5 It is required Start and Run Reversely on S1 rising edge when analog input gt 4V therefore S1RACT lt 3 0 gt 0010 6 Fill the S12CON with above bits get S12CON 0000 0000 0010 1010 binary 7 Add suffix code 0000 for S12CON get SCFG 0000 0000 0010 1010 0000 binary Ox2A0 hex 672 decimal 8 Send instruction SCF x2A0 or SCF 672 9 Calculate the upper limit 4V 5V 4095 3276 0000 1100 1100 1100 binary 10 Add suffix code 0011 for ATCONH get SCFG 0000 1100 1100 1100 0011 binary 0xCCC3 hex 52419 decimal 11 Send instruction SCF xCCC3 or SCF 52419 12 Calculate the lower limit 0 6V 5V 4095 491 value is rounded 0000 0001 1110 1011 binary 13 Add suffix code 0010 for ATCONL get SCFG 0000 0001 1110 1011 0010 binary 0x1EB2 hex 7858 decimal 14 Send instruction SCF x1EB2 or SCF 7858 15 Set desired speed by sending instruction SPD 5000 16 Burn parameters into EEPROM by sending STO 17 Send instruction ENA 18 The system starts to work continuously 19 Disconnect the user device and restart the UIM242 controller the system will automatically run Ul Robot Technology Co Ltd M4220130813EN Page 51 UIM24202 04 08 9 0 TTL OUTPUT CONTROL UIM242 controller has an optional TTL Output Control Module sold separately that supports 1 channel of TT
41. able 0 1 Correspondence between Max Supply Voltage and Peak Current Page 2 M4220130813EN UI Robot Technology Co Ltd UIM242XX Miniature Integrated Stepper Motor Controller Examples UIM242L02T UlM242L02D UlM242C04P MSP UlM242H08P IE Examples of Control Connector options Screw Terminal Rectangular Plug Socket Differential Terminal Ul Robot Technology Co Ltd M4220130813EN Page 3 UIM24202 04 08 UIM24202 04 08 CAN2 0Instruction Control Miniature Integrated Stepper Motor Contrller Miniature Integral Design Miniature size 42 8mm 42 3mm 16 5mm Fit onto motors seamlessly Die cast aluminum enclosure improving heat dissipation and durability Motor Driving Characteristics Wide supply voltage range 12 50VDC Output current 2 4 8A instruction adjustable Full to 16th micro step resolution Dual full H bridge with PWM constant current control Network Communication CAN2 0 A B 2 wire interface max 1M bps operation long distance Differential bus high noise immunity max 100 nodes Embedded DSP Microprocessor Hardware DSP 64bits precision calculating Simple instructions intuitive and fault tolerating Intelligent control intuitive and fault tolerating SDK and underlying control drive of host VC C CA VB demo Advanced Motion Control Absolute position record feedback Power failure position protection Quadrature encoder based closed loop control l
42. and 10 2 examples are shown on how to convert a set of bits data into 16bit data and 32bit data Obviously one 16bit data takes three 7bit data to represent and one 32bit data takes five 7bit data Terminator The end of a feedback message UIM motion controller utilizes FF or FE as the terminator If terminator is FF it means there is no follow up message If terminator is FE it means there has follow up messages Note there are two types of feedback that has NO message ID ACK message and Motor Status feedback controller s response to FBK instruction Other messages could have NO data such as some real time change notification messages Figure11 1 Conversion from three 7bits message data to a 16bits data Data received Hex XX XX 1 Byte 2 Byte 3 Byte XX XX FF Receive sequence earlier gt later Y 7 6 5 43 27 0 1Byte o o o 0 o o fowjore 6 5 4 3 2 1 0 2 Byte ag o D13 D12 D11 D10 D9 Ds D7 7 6 5 4 3 2 1 0 soys o os Jos os os oe or oo 14 13 12 11 1 0 9 8 7 6 5 4 3 2 1 0 16bit Binary Data 015 D14 013 D12 D11 10 D9 De D7 De Ds D4 D3 D2 01 Do UI Robot Technology Co Ltd M4220130813EN Page 57 UIM24202 04 08 Conversion from five 7bits message data to a 32bits data Figure11 2 a meo lo co 86 ve Go 9c Le BE 6c OE Z aly L E v Gm 99
43. aud rate The transfer time is ahout 1ms 0 001s when the baud rate is 57600 Then it takes only 1 5ms from an event happening to a RTCN being received 4 1 RTCN Structure The structure of an RTCN message is shown below CC Controller ID Message ID FF The RTCN system is able to response to the following events Table3 1 Real time change notification events No Event Message ID Description 1 falling edge of S1 AO Voltage on S1 High gt gt gt Low rising edge of S1 Al Voltage on S1 Low gt gt gt High falling edge of S2 A2 Voltage on S2 High gt gt gt Low falling edge of S3 A4 Voltage on S3 port High gt gt gt Low 11 displacement control complete A8 The desired position is reached 2 3 4 rising edge of S2 A3 Voltage on S2 Low gt gt gt High 5 6 12 zero position A9 Position counter reaches passes zero Note When S1 is configured as analog A1 denotes event 9 otherwise A1 denotes event 2 When S3 is configured as analog A5 denotes event 9 otherwise A5 denotes event 6 When S1 is configured as analog AO denotes event 10 otherwise AO denotes event 1 When S3 is configured as analog A4 denotes event 10 otherwise A4 denotes event 5 4 2 Enable Disable RTCN Every RTCN can be enabled or disabled through user instruction Enable disable the RTCN is achieved by the writing to the Master Configuration Register s ORGIE bit MCFG lt 5 gt STPIE bit MCFG lt 4 gt P4lE bit MCFG lt 3 gt S3IE bit MCFG
44. auto current reduction ratio CURn Set output phase current AA 64 ENA Enable H bridge circuit a 7 MCSn Set micro stepping resolution aa 7 OFF Disable H bridge circuit a 85 Motion Control struction O oip S A ORG Set zero origin positon Aa B7 88 POS Check current position CC Bo 89 STO __ Store motion control parameters Aa D1 98 STOn Bind motion control parameters to sensor edge AA D1 99 STPn Set desired incremental displacement AA Be 100 I O Control s Feedback Message CEI rag DOUN Set output TTL leveln Check current output TTL level AA Ct 66 Set digital input sampling mode oa oe e Check digital input sampling mode UI Robot Technology Co Ltd M4220130813EN Page 13 UIM24202 04 08 CHARACTERISTICS Absolute Maximum Ratings SUDD VO ladra Ras 10V to 50V Voltage on S1 S2 S3 P4 with respect to GND ooocccccccccccnncconcccconoccnnnconononononnncnonananonnnos 0 3V to 5 3V Maximum output current SUNK by S1 52 53 P4 ooooncccccnoncnncoccconcononncnnnnnnnononononnnnnnnnnnnnnnonnnnnanannnnnns 20 mA Maximum output current sourced by S1 52 S8 P4 ooncccccccccccccncnncnccconnnnnnonononnnnnnnnnononnnonnnonnnonanonnns 20 mA Ambient temperature under Dias A da 20 C to 85 Storage temperature eresi a a 50 C to 150 C NOTE Working under environment exceeding the above maximum value could result in permanent
45. coccccocncononccnoncccanoncnnnnnnnnconannononnnnnnnnnnnnnnnannnnannnnnnnnnnnnnnnaninnos 90 SCF Check the value of Sensor Configuration cccccccccocconnccnnncconononnnnnnnonononnncnnnnnnnnnnnnnnnnnnnonnnnnnnnnnnnnnnnnnos 92 SEBCheck Sensor Dali ata 93 SPDR SPCC Ad sI o tes la al o le ci ale a 94 SPD Check GurremtS DCCC aos asis reed meas a E toa 95 Ul Robot Technology Co Ltd M4220130813EN Page 17 UIM24202 04 08 37 38 39 40 41 42 STGxn Set Digital Input Sampling Mode cococcccoccnccccnccccncconcncnonnconcncnnnnnnnnnnonnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnns 96 STG Check Digital Input Sampling Mode ccoocccccccconcnncccconcnnncncnnnnnnnnnoncnnnononnnnnnononnnnnnononnnnnnononnnnncnnononos 97 STOEEPROM SIOC na a O O O 98 SON Parameter Banding at o a is ee 99 STPi Displacement COn TO AA A EA 100 SIP Check Displacement eccrine see eee ae 101 Page 18 M4220130813EN Ul Robot Technology Co Ltd UIM242XX Miniature Integrated Stepper Motor Controller 1 0 OVERVIEW UIM242XX are miniature integrated stepper motor controllers with CAN2 0B Active bus communication capability UIM242 has a size of 42 3mm 42 3mm 16 5mm and is designed to mount onto NEMA17 23 34 42 stepper motors seamlessly UIM24202 can provide 0 7 2A output current UIM24204 can provide 1 5 4A output current UIM24208 can provide 3 8A output current Current value is adjustable within the range through instructions Once set the value i
46. d displacement control follow the preset motion parameters speed displacement acceleration e Reverse displacement control follow the preset motion parameters speed displacement acceleration Page 20 M4220130813EN Ul Robot Technology Co Ltd UIM242XX Miniature Integrated Stepper Motor Controller e Direction change displacement control follow the preset motion parameters speed displacement acceleration e Decelerate at preset deceleration until stop e Emergency stop e Reset position and encoder counter e Reset position and encoder counter Reverse displacement control follow the preset motion parameters speed displacement acceleration e Reset position and encoder counter Decelerate at preset deceleration until stop e Reset position and encoder counter Emergency stop e Off 1 4 TTL Output Control Module UIM242 s TTL Output Control Module supports 1 channel of TTL voltage level output The output port P4 is capable of providing 20mA sourcing or sinking current In practice please keep the current consumption as low as possible to avoid overheating the controller Port P4 also can output setting level when detects events list below pre configuration e Run Stop status The output voltage level is determined by if the speed is zero or not e Direction change The output voltage level is determined by if the current motor direction is forward or reverse e Origin point hit The output voltage level i
47. damage to controller Working under conditions at the maximum value is not recommended as operation at maximum value for extended period may have negative effect on device reliability H product Max supply voltage is 50V is custom made please contact with salesmans before purchase Electrical Characteristics Ambient Temperature 25 C Supply Power Voltage 12V 50VDC Motor Output Current Max 2A 4A 8A per phase instruction adjustable Driving Mode PWM constant current Stepping Resolution full step half step 1 4 1 8 and 1 16 step H product Max supply voltage is 50V is custom made please contact with salesmans before purchase Communication Ambient Temperature 25 C Wiring method 2 wire CANH CANL e Supports 1 Mb s operation e ISO 11898 standard physical layer requirements e Short circuit protection CAN bus drive e High voltage transient protection e Auto thermal shutdown protection e Up to 100 nodes can be connected e Differential bus high noise immunity Environment Requirements Working environment Avoid dust oil mist and corrosive gases Working temperature 40 C 85 C Humidity lt 80 RH no condensation no frosting Storage temperature 50 C 150 C Page 14 M4220130813EN Ul Robot Technology Co Ltd UIM242XX Miniature Integrated Stepper Motor Controller Size and Weight 42 3mm x 42 3mm x 16 5mm Weight 0 1 kg Ul Robot Technology Co Ltd M4220130813EN Page 15 UIM2
48. demnify and hold harmless UIROBOT from any and all damages claims suits or expenses resulting from such use No licenses are conveyed implicitly or otherwise under any UIROBOT intellectual property rights Trade Mark Layout design Patent The UIROBOT name and logo are registered trademarks of UIROBOT Ltd in the P R China and other countries UIROBOT s UlM24XXX series Step Motor Controllers UIM25XX series CAN RS232 Converter and their layout designs are patent protected UIM242XX Ordering Information In order to serve you quicker and better please provide the product number in following format UIM242XX PART NUMBERING SYSTEM PG Programme Control without host Category Series E IE External Internal Encoder Closed Motor CAN2 0 O tional Loop Control Control p M Advanced Motion Control SP I O Control Control T Screw Terminal P Plug Socket Connector D Differential Terminal Peak Current 02 2A 04 4A 08 8A Maximum Supply Voltage L 35V C 40V H 50V Note 1 Peak current is decided by max supply voltage See in Table 0 1 2 H product Max supply voltage is 50V is custom made please contact with salesmans before purchase 3 Default control connector is T screw terminal if not selected 4 D product Differential Terminal is custom made please contact with salesmans before purchase 5 PG Programme Control without Host need the hardware model be 1232 or higher T
49. e acta 46 8 4 Sensor Event Action and BIN resar a tt 46 8 5 Introduction to Sensor Input Control INStrUCtiONS ccccccccccoconncnnnncconenonnnnnnnonnnnnnnnnnnnnnnnnnnnnnnnnnonononanennns 47 Page 16 M4220130813EN UI Robot Technology Co Ltd 8 6 8 8 8 8 9 8 10 8 11 9 0 UIM242XX Miniature Integrated Stepper Motor Controller Sensor Input Control Register S12CON ooooccccnnncccccconnccnnncononnononononononononnnnnnnnnnnnnnnnnnnnnonnnnnnnnnnnnnnnnnnnneninnnnns 48 Sensor Input Control Register S34CON ooooccccnnnccccnconnccnnnnonononononnnonnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnonnnaneninnnnns 48 Analog Threshold Control Register ATCONH 8 ATCONL ooooccccnnnnccccnnccccncnocccnnnnonnnnnnnnnnnnononnnnnnnonnnonononanenons 49 INSUUCTION Lista o o ti ade e e e ghee le 50 Example 05126 ON CONTIGUA Msi a ae Riess 50 Example of ATCONH ATCONL Configuration ccccocccnnccnnccccccconncnnnnononononnnnnnnonnnnnnnnnnnnnnnnnnnnnennnnnnnonnnnnennns 51 TEL OUIDUU CONTEO aiii A eian 52 Introduction to TTL Output Control Instructions cccccoconccnncccnonnnnccnnnncnncononnnnnnnnnnnnnnnononnnnnnnnonnnnncnnnnnnnnnss 52 TTL Output Control Register S34CON oridi pa i a a a a a e a a i 52 Output Control Configuration Instruction SCF occcccccnnnnncncnnnnncnononnncnnnnnonononnnnnnnnnnnnnnnnnnnnnnnonnnnnnnnnnnnnnnnnos 53 o e cae eck deine 53 Example of TTL Output Control and S34CON ConfiguratiON occccccccccccconncnnnnccnononnncnnnnnn
50. e immediately and its value will be burned into the on board EEPROM The burning process will not affect any real time process Master Configuration Register is a 16bits register with the following structure MCFG bit value 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Bit15 ANE Enable Disable Analog Input O Disable the analog input all sensor are set to digital input 1 Enable the analog input Bit14 CHS Analog Input Channel 0 Analog input on port S1 1 Analog input on port S3 Bit13 QEl Enable Disable Quadrature Encoder Interface 0 Disable Quadrature Encoder Interface 1 Enable Quadrature Encoder Interface Bit12 Unimplemented Read as 0 Bit11 QEM Enable Disable Quadrature Encoder based Closed loop Control Module 0 Disable Quadrature Encoder based Closed loop Control Module 1 Enable Quadrature Encoder based Closed loop Control Module Bit10 CM Advanced Motion Control Mode 0 Disable advanced motion control module use basic control mode 1 Enable advanced motion control module Bit9 AM Acceleration Mode 0 Value mode Unit is pps sec or pulse square second 1 Period mode Unit is millisecond Bit8 DM Deceleration Mode O Value mode Unit is pps sec or pulse square second 1 Period mode Unit is millisecond Bit7 Unimplemented Read as 0 Bit6 STLIE Locked rotor Detection Variation Notification 0 Disable locked rotor detection variation notification only for closed loop Page 28 M4220130813EN Ul Robot Techn
51. ement Stop Position Start Position T Time In the control process UIM242XX s advance motion control module will continuously calculate the deceleration happening point time and then perform the deceleration to guarantee that when desired displacement is reached the speed is right zero The entire calculation time is around 20 micro seconds with 64bit accuracy In practice when the desired displacement is small and the desired speed is high deceleration starts before the desired speed is achieved to ensure that the speed decelerate to right zero when desired displacement is completed The process is shown in figure 7 10 Ul Robot Technology Co Ltd M4220130813EN Page 39 UIM24202 04 08 Figure7 10 S curve Relative Displacement Control case 2 Desired Speed Uniform Uniform Acceleration a Po Deceleration T Time All the acceleration deceleration methods may be applied in the S curve displacement control including linear acceleration deceleration and non linear acceleration deceleration which is not described in the above figures though Please note that for the non linear acceleration deceleration as there are knee points in its trajectory is not suitable for applications requiring motion smoothness In this case user can set the maximum start speed and maximum cessation speed at zero to disable non linear acceleration deceleration This process is shown is figure 7 11 Figure7 11 S curve Displacement C
52. escription Set TTL output level n 0 1 ACK AA Controller ID C1 P4 FF Comment C1 gt gt The message ID of DOUn P4 gt gt The logic level of the TTL output P4 1 means the output is 5V P4 0 means the output is OV Note Using DOUn will affect S34CON Once DOU N instruction is receiced UIM242 controller will clear P4LVL and P4EVENT lt 2 0 gt Therefore if user wants to re bind the events to the output control user needs to reconfigure S34CON This is to prevent potential confliction between user instruction and events controlled output Ul Robot Technology Co Ltd M4220130813EN Page 65 UIM24202 04 08 8 DOU Check TTL Output Level Format DOU Description Check current TTL output level ACK AA Controller ID C1 P4 FF COMMENT Refer to ACK comment of DOUn Note Using DOU will NOT affect S34CON Page 66 M4220130813EN Ul Robot Technology Co Ltd UIM242XX Miniature Integrated Stepper Motor Controller 9 ENA H Bridge Enable Format ENA Description Enable the stepper motor driver i e H bridge driving circuit ACK AA Controller ID ASB CUR VO V1 V2 PO P1 P2 P3 P4 FF Comment ASB gt gt Received data 0 CUR gt gt Received data 1 VO P4 gt gt Received data 2 9 ASB structure 7 6 5 4 waco aca Jea or om Ju CUR structure Bit Value Bit 7 6 5 4 3 2 1 0 Value N A 0 Phase Current e g 27 2 7 Amp VO V2 is the converted val
53. fter the sensor is emergency stop or power off the controller is lock and receives no instruction It needs to reboot the controller to unlock it Bit2 Execute user program after power on Future function Bit1 CCW Adjust rotation direction Figure 5 1 0 Set CW is positive when turn CW displacement counter accumulate otherwise displacement counter decrease 1 Set anti CW is positive when turn anti CW displacement counter accumulate otherwise displacement counter decrease BitO ENA Auto enable after powr on O Disable the function Auto enable after power on 1 Enable the function auto enable the controller after the pre set time when power is on Figure 5 1 Rotation Direction Clockwise CW Ul Robot Technology Co Ltd M4220130813EN Page 27 UIM24202 04 08 5 2 Auto enable Once ICFG ENA is set to 1 UIM242 will auto enable the H Bridge of motor after the power is on for T ms the interval time T can be set through instruction For details of the instruction please refer to Chapter 10 5 3 User Program User can program on UIM242 Once ICFG PROG is set to 1 UIM242 will execute user program after the power is on For details please refer to UIM Programming Manual UIM242 still can execute user instructions when user program is running 5 4 Master Configuration Register Master Configuration Register is used to enable disable the hardware firmware functions Once configured it will be effectiv
54. ge Module When pumping voltange is higher than the voltage those control devices can withstand UIM regeneration diacharge module will absorb regeneration electric energy reduce pumping voltage stabilize working voltage to avoid damage on UIM controller Ul Robot Technology Co Ltd M4220130813EN Page 55 UIM24202 04 08 11 0 INSTRUCTION This chapter describes the detail of the instructions mentioned in this document Please note in this user manual unless otherwise specified all messages are based on structure form and parsing method of RS232 character string messages For structure form and parsing method of CAN message based on UI SimpleCAN please refer to Ul SimpleCAN programming manual 11 1 Instruction Structure An instruction is a message sent from the user device to motion controller to command certain operatio Instructions of UID828 follow the rules listed below 1 Length of an instruction including the ending semicolon should be within 20 characters 2 Coded with standard 7 bits ASCII code 1 127 Expended ASCII code is NOT accepted 3 Instruction structure is as follow INSn or INSxn or INS Where INS Instruction Comprises three letters with no space between them and is not case sensitive Symbol If there is an x INSx then it means the value is hexadecimal Please note if n is hexadecimal then the data must have an even number of digits such as 00 01 OA A data has an
55. ground wire of all controllers and gateway through one wire lf there are two ground G1 and G2 in CAN bus once a high power device on G1 ground is on the voltage on G1 will be pulled up instantly higher than dozens volt then this high voltage will flow into G2 through CAN bus Normally the voltage on CAN bus is only 2 5V so the dozens volt differential will cause damage to all CAN bus chip and controllers Page 8 M4220130813EN Ul Robot Technology Co Ltd UIM242XX Miniature Integrated Stepper Motor Controller Standalone Operation When working standalone user can use the wiring scheme shown in figure 0 3 Please note that this wiring scheme should be used for setting the ID of a UIM242 controller For long distance transfer both ends of the CAN bus should be terminated with1200 terminating resistors As UIM2501 converter has a build in terminating resistor user only needs to attach a resistor at the other end of the bus Please refer to the UIM2501 user manual for how to enable the UIM2501 converter s terminating resistor CANH and CANL should use a twisted wire pair Figure 0 3 Wiring Scheme for Standalone Operation Except supply voltage port and motor terminal voltage on port Si Mot must be kept between 0 3 5 3V epper Motor CANH Supply ueso yl XOX 0TH TY Converter CAN Twist Wire a Pair E DB9 Port RS232Cable UIM242XX Controller A Warning Live line work is forbidden 4 Warning Al
56. igure 10 1 for how to convert to a signed 16bit integer 5 STP4 STPO denotes the desired motor displacement See figure 10 2 for how to convert to a signed 32bit integer 6 3 Motor Status Feedback Message Upon receiving the FBK instruction the controller will send back the feedback message comprising the following up to date motor status incremental displacement speed direction micro stepping resolution and phase current enabled offline status and ACR status The feedback Message is 13 bytes long in the following format Byte 1 2 3 4 5 6 7 8 9 10 11 12 13 1 CC denotes a Motor Status Feedback Message i e the present value of motor status 2 ASB assembled byte structure 7 6 5 4 3 2 1 0 N A 0 ENA OFF DIR MCS 1 O full step 15 1 16 step 3 CUR current phase current structure Bit value Bit 7 6 5 4 3 2 1 0 value N A 0 Phase Current e g 27 2 7 Amp 4 SPD2 SPDO denotes the current motor speed See figure 10 1 for how to convert to a signed 16bit integer 5 STP4 STPO denotes the current motor displacement See figure 10 2 for how to convert to a signed 32bit integer For more details on above conversion please refer to the source code of the provided demo software These software and related source code are VC VB based and free Page 34 M4220130813EN Ul Robot Technology Co Ltd UIM242XX Miniature Integrated Stepper Motor Controller 6 4 Instruction List The
57. inear and non linear acceleration and deceleration S curve PT PVT displacement control Backlash compensation Advanced I O Control without host 3 sensor input ports 1 analog input 1 2bit 1 TTL output 3 trigger mode intermittent single continuous 6 independent motion group Pre set action controlled by O parameter O real time event based change notification 12 real time event based notifications change 13 programmable actions Others Initial status configurate Auto lock when emergency User program Regeneration discharge module sold separately H product Max supply voltage is 50V is custom made please contact with salesmans before purchase Page 4 M4220130813EN Ul Robot Technology Co Ltd UIM242XX Miniature Integrated Stepper Motor Controller General Description UIM24202 UIM24204 UIM24208 are miniature stepper motor controllers with CAN network interface UIM242 controllers can be mounted onto NEMA17 23 34 42 series stepper motor through adapting flanges Total thickness of the controller is less than 16 5mm With UIM242 controller it is simple to construct a control system Users can control the whole motor sensor third party actuator system through their own CAN based host by using SimpleCAN protocol Users also can control the system through a gateway produced by Ulrobot such as UIM2501 USBC9100 and PCI120 by using RS232 based string or
58. ity Tracking PVT mode is an extended mode of Position Tracking PT mode In this mode user can enter both desired position and desired speed UIM242XX controller will instruct motor to run at the desired speed until it reaches the desired position and then stop User can enter successively or discontinuously both desired speed and desired position Shifting between the three modes is displayed in the following chart Page 32 M4220130813EN UI Robot Technology Co Ltd UIM242XX Miniature Integrated Stepper Motor Controller Figure6 3 Shifting between Motion Control Modes y offline Instruction OFF H bridge disabled logic circuit working can accept buffer and operate instructions Instruction ENA PT Mode 1 set the desired speed and then set the desired vileds EU USHOR STEN position or displacement successively or Approach the desired discontinuously speed approach the desired speed while making sure Keep running at the the desired position is achieved desired speed Lae keep running at the desired speed Set the desired speed at O Instruction STPn stop after reaching the desired position to stop Instruction POSn SPDn POSn Instruction STPn SPDn STPn Instruction POSn PVT Mode set the desired speed and position or displacement successively or discontinuously approach the desired speed while making sure the desired position is achieved kee
59. l action when a sensor event happens Actions and sensor events can be defined by instructions With the Sensor Control Module UIM242 can perform motion controls without the user device There are 8 sensor events that can be configured as listed below Table8 1 Sensor Events S2 Rising Edge S2 Voltage Level Change Low gt gt gt High 4 9 S3 Falling Edge S3 Voltage Level Change High gt gt gt Low 6 S3 Rising Edge S3 Voltage Level Change Low gt gt gt High 7 Exceeding the Upper Limit Analog input voltage is higher than user defined upper limit 8 Exceeding the Lower Limit Analog input voltage is lower than user defined lower limit There are 13 actions that can be furthermore bound to sensor events e Start and run forwardly at preset speed and acceleration e Start and run reversely at preset speed and acceleration e Change direction and run at preset speed and acceleration e Forword displacement control follow the preset motion parameters speed displacement acceleration e Reverse displacement control follow the preset motion parameters speed displacement acceleration e Direction change displacement control follow the preset motion parameters speed displacement acceleration e Decelerate at preset deceleration until stop e Emergency stop e Reset position and encoder counter e Reset position and encoder counter Reverse displacement control follow the preset motion parameters speed displacement accelerati
60. l controller and gateway must be common grounded Ul Robot Technology Co Ltd M4220130813EN Page 9 UIM24202 04 08 Network Operation CAN bus provides a reliable and simple method of network constructing In figure 0 4 a wiring scheme is presented for such network operation with one RS232 CAN converter connected with multiple UlM242XX controllers For detailed terminal wiring on each controller please refer to figure 0 3 Note All nodes are connected onto a twist wire pair Star connection scheme must be avoided The stub must not exceed 2cm each The shorter the better Both ends of the bus should be terminated with1200 terminating resistors Shielded 120 ohm CAN bus cable is recommended if the transfer distance is over 50 meters In practice only one terminating resistor is need at the other end of CAN bus since UIM2501 already has a built in terminating resistor To activate this built in terminating resistor see UIM2501 user manual Figure 0 4 Wiring Scheme for Network Operation Control Room UIM2501 Converter E UIM242xx UIM242xx Controller Controller ae Warning Live line work is forbidden pe Warning All controller and gateway must be common grounded Page 10 M4220130813EN Ul Robot Technology Co Ltd UIM242XX Miniature Integrated Stepper Motor Controller There is another wiring scheme of network in Figure 0 4 When wiring in this way the length of stub need not be shorten than 2CM
61. lacement control follow the preset motion parameters speed displacement acceleration code 9 e Decelerate at preset deceleration until stop code 3 e Emergency stop code 4 e Reset position and encoder counter code 6 Page 46 M4220130813EN Ul Robot Technology Co Ltd 8 5 UIM242XX Miniature Integrated Stepper Motor Controller Reset position and encoder counter Reverse displacement control follow the preset motion parameters speed displacement acceleration code 7 Reset position and encoder counter Decelerate at preset deceleration until stop code 11 Reset position and encoder counter Emergency stop code 12 Off code 15 Introduction to Sensor Input Control Instructions There are only 5 instructions related to the sensor input control 1 MCF Master Configuration Register The ANE bit MCFG lt 15 gt and CHS bit MCFG lt 14 gt of the master configuration register define the digital analog input of the sensor port The S1IE bit MCFG lt 0 gt and S2lE bit MCFG lt 1 gt enable disable the sensor real time change notification RTCN See section 5 1 for details SCF Sensor Configuration Register SCF is used to configure following sensor input control registers S12CON S34CON ATCONH HI ATCONL STG Sensor Trigger Configuration STG is used to configure sensor trigger mode UIM242 has three trigger mode Single Trigger Continouns Trigger and N ms Intermittent Trigger STO Sens
62. ms before sending other instructions Before set parameters disable the controller first Default setting for STOO 300 300 0 0 0 0 it can be configurated by instruction Parameters for each edge can be different Not all parameters are needed the non value parameter will be assigned as the value of parameters for STOO Disable the controller OFF Set 1st group of parameters SPDn STPn MACn MDEn MMSn MMDn Banding it to rising edge of S1 STO2 Set 6th group of parameters SPDn STPn MACn MDEn MMSn MMDn Banding it to falling edge of S3 STO7 M4220130813EN Page 99 UIM24202 04 08 41 STPn Displacement Control Format STPn Description Set the desired incremental displacement i e the displacement relative to current position n 2147483647 2147483647 signed integer ACK AA Controller ID B6 PO P1 P2 P3 P4 FF Comment B6 gt gt The message ID of STPn PO P4 gt gt Received data 0 4 PO P4 is the converted value for the desired motor displacement 32 bits Figure10 2 Note Displacement is essentially defined as counts of the pulse or encoder counter Actual pulse sended to motor is controlled by displacement counter The actual motor displacement is also relative to the micro stepping resolution or encoder resolution lf an STPO instruction is received before the former STP instruction is completed UIM242 will execute the current instruction and stop
63. n 40 until another instruction SPDO is given Example For a 1 8 stepper motor if the SPD 100 User sent SPD100 If MCS 1 motor speed 1 8 100 180 sec 30 rom If MCS 16 motr speed 1 8 100 16 11 25 sec 1 875 rpm Page 94 M4220130813EN Ul Robot Technology Co Ltd UIM242XX Miniature Integrated Stepper Motor Controller 36 SPD Check Current Speed Format SPD Description Check current speed ACK CC Controller ID B2 VO V1 V2 FF Comment B2 gt gt The message ID of current speed VO V2 gt gt Received data 0 2 VO V2 is the converted value for the value of desired speed 16 bits Figure11 1 Unit Pluse Second PPS or Hz The sign of speed decides direction If no or specified before x it is taken as Ul Robot Technology Co Ltd M4220130813EN Page 95 UIM24202 04 08 37 STGxn Set Digital Input Sampling Mode Format STGxn Description Set sampling mode of digital input continnous intermittent and single sampling Structure of n Byte 0 1 2 Where D1 DO compose a hexadecimal 16bit data D1 is high DO is low IDX 00 01 02 hexadecimal denotes configurating sensor 1 2 3 D1 DO 0000 0001 0002 EA60 denotes that the sensor will not be triggered until 0 1 2 60000ms after last sampling This can eliminate the shake of sensor signal D1 DO gt EA60 denotes signle sampling once triggered the S12CON
64. n port S1 can be obtained by instruction SFB In order to use the sensor events user may need to further setup the input upper and lower thresholds 1 e AH AL in figure 8 2 If the sensor module detects the analog input voltage is changing from lower than AH to high than AH an S1 rising edge event will be created meanwhile S1 is assigned a logic value 1 i e S1 1 If the sensor module detects a change on S1 from higher than AL to lower than AL an 1 falling edge event will be created meanwhile S1 0 Otherwise S1 is kept unchanged UI Robot Technology Co Ltd M4220130813EN Page 45 UIM24202 04 08 8 3 Digital Input Sampling Mode Digital input of UIM242 has three sampling mode 1 Continuous sampling 2 Intermittent sampling 3 Single sampling Continuous Sampling In continuous sampling mode UIM242 controllers detect level fluctuation at port 1 S2 S3 uninterruptrdly Once a fluctuation happens controllers will call corresponding program execute pre set actions and or send a message to user device lf user sets the sampling interval to O by using instruction STG the controllers will work in continuous sampling mode Intermittent Sampling In intermittent sampling mode user needs to set sampling interval T 1 60000ms at first Once a fluctuation is detected at one port UIM242 controllers will not detect the level fluctuation at this port until T 1 ms later When working in this mode it is available for preve
65. nds on MCFG lt S2lE gt lt S1IE gt 1111 OFF Depends on MCFG lt S2IE gt lt S11E gt 8 8 Analog Threshold Control Register ATCONH 8 ATCONL ATCONH Analog Threshold Control High and ATCONL define the upper and lower limit of the analog threshold Both registers are 16bits registers in the controller memory space configured through SCF instructions However when configuring user needs to affix a 4bits suffix code to point to a specific register The suffix code for ATCONL is 0010 binary the suffix code for ATCONH is 0011 binary ATCONH structure is as follows Bit 15 14 13 12 11 10 9 8 7 6 s 4 3 2 1 0 Definatio Resered AH lt i1 0 gt Bit 15 12 Unimplemented read as 0 Bit 11 0 AH lt 11 0 gt Upper limit of analog threshold ATCONL structure is as follows Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Defination Reserved AL lt 11 05 ft 15 12 Unimplemented read as 0 t 11 0 AL lt 11 0 gt Lower limit of analog threshold ron Note ATCONH ATCONL input range is 0 4095 with O corresponding to OV and 4095 weer corresponding to 5V 4095 is the maximum of a 12bits data UI Robot Technology Co Ltd M4220130813EN Page 49 UIM24202 04 08 8 9 Instruction List The following table shows the instructions mentioned in this chapter the detail of those instructions is descriped at the end of the document instruction Descrip ge SCFn Set sensor contro configuration egistern STan
66. nnnnnnnnnnnnnnnnnnnnnnnnnnanennnns 72 MACH SetAcceleration Rate a 73 MAC Check Gurrent Acceleration Rate ii 74 MCFn MCFxn Master Configuration Register InStructiON ccocooccncoccncncconnnnononcnconnnonconanonononcnnnnancnnnnos 75 MCF Check Master Configuration Register oooconncccnnccconconncnnnnnccnnonnnnnnnnnonnnnnnnnnnnnonnnnnnnnnnnnononnnaneneninins 76 MCS Setup Micro Ste Pin ns eset nica din ia sierra 77 MBEN Set Deceleration Ral tot 78 MDE Check Current Deceleration Rate zeori a e a a 79 MDLn Check Controller Model cooocccoocccoccccoccnccoccnconcncononnononnnnonnnonnnnonannononnnnnnnnnnnnnonannnnannnnnnnnnnanens 80 MMDn Set Maximum Cessation Speed ccccccccsscccesceceseeccececaeeecsueeceueessaeeecauseseueessueeesageecsueessueessaeeess 81 MMD Check current Maximum Cessation Speed oooocccccncccccconcccnnncccnnnonnnnnnnonononnnnnnnnnononnnnnnnnnnnnnnnnnnnnnnnnnns 82 MMSn Set Maximum Starting Speed occccccnccccnnccccnccocnconcnnononnononnnnnnncnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnenanins 83 MMS Check current Maximum Starting Speed ooonnccccncccccconnccnnncconononccnnnnncnnnnnnnnnnnnonononnnnnnnnnnnnnnaneneninons 84 OPE A Braga DIS alii E cocida 85 ORG Reset Position COUME aiai rea a da dal a e ant ode oct ella e abla 86 ORG Reset Position COUNT A A a et 87 POST POSitOn Ono espanta its inline a iia E iio 88 AOS IA AAPP A 89 SCFn SCFxn Set Sensor ConfiguratiON cco
67. ntion and treatment of disturb and shake eliminating of digital input lf user sets the sampling interval to T 1 60000 by using instruction STG the controllers will work in intermittent sampling mode and sampling interval is T Single Sampling In single sampling mode once a fluctuation is detected at one port UIM242 controllers will not detect the level fluctuation at this port until user configures the corresponding control bit of S12CON or S34CON again If user sets the sampling interval to T gt 60000 by using instruction STG the controllers will work in single sampling mode 8 4 Sensor Event Action and Binding UIM242XXs support 8 sensor events as listed in section 8 0 There are 13 actions that can be bound to those 8 sensor events Binding means assigning a sensor action to a sensor event The binding between events and actions are realized through the configuration of the Sensor Control Register S12CON An action code is needed when configuring sensor registers e Start and run forwardly at preset speed and acceleration code 10 e Start and run reversely at preset speed and acceleration code 2 e Change direction and run at preset speed and acceleration code 14 e Forword displacement control follow the preset motion parameters speed displacement acceleration code 13 e Reverse displacement control follow the preset motion parameters speed displacement acceleration code 5 e Direction change disp
68. ntioned in this chapter the detail of those instructions is descriped at the end of the document Set output TTL level n DOU Check current output TTL level 9 5 Example of TTL Output Control and S34CON Configuration Writing to the S34CON is realized through instruction SCFG Before writing to the S34CON user needs to first fill every bit of the S84CON according to the information provided in previous sections and then affixes the suffix code 0001 binary An example is provided below System Description A reciprocating mobile platform Requirements 1 When motor moves forward P4 outputs 5V 2 When motor moves backward P4 outputs OV 3 Need RTCN every time P4 changes Realization 1 First stop the motor by sending OFF 2 Set MCFG lt P4IE gt 1 get MCFG 0000 0000 0000 1000 binary 0x8 hex 8 decimal Send instruction MCF 8 Set P4EVENT lt 2 0 gt 010 link to direction event Set P4LVL 1 so when motor moves forward P4 will output 5V Fill the S34CON with above bits get S34CON 0000 1010 0000 0000 binary Affix the suffix code 0001 to S34COMN get SCFG 0000 1010 0000 0000 0001 binary 0xA001 hex 40961 decimal Send instruction SCF xA001 or SCF 40961 9 Send instruction ENA SE J ON ee on Ul Robot Technology Co Ltd M4220130813EN Page 53 UIM24202 04 08 10 Run the motor There are numerous ways to run the motor The easiest way is using SPDn During the motion once act
69. odd number of digits will cause erroes for example 001 10A are illegal input n Value Comprises set of numbers with no other characters between them Some instruction have no value such as SPD STP etc Terminator Each instruction must end with semicolon Note Instruction without terminator will cause unpredictable results 11 2 Feedback Message Structure Feedback Message is the message sent to user device from motion controller The length of feedback message is not regular maximum length is 13 bytes Structure of feedback message from UlM242XX through UIM2501 is as follow Header Controller ID Message ID Data Terminator Page 56 M4220130813EN Ul Robot Technology Co Ltd UIM242XX Miniature Integrated Stepper Motor Controller Header The start of a feedback message There are 3 kinds of headers AA represents the ACK message which is a repeat of the received instruction CC represents the status feedback which is a description of current working status EE represents the error message Controller ID The identification number of current controller in a CAN network also known as Node ID Scope 5 125 Message ID The property of the current message For example CC 05 AO FF where AO denotes that there is a low level on sensor 1 For details please refer to following sections Data Has a 7bits data structure High is in front and low is in the back In figure 10 1
70. ology Co Ltd UIM242XX Miniature Integrated Stepper Motor Controller 1 Enable locked rotor detection variation notification Once the error between pulsing counter and encoder counter is overstep a message will be send to user device automatically Bit5 ORGIE Origin Zero Position RTCN 0 Disable the Origin zero position RTCN 1 Enable the Origin zero position RTCN Once the value of pulsing counter or encoder counter is zero a message will be send to user device automatically Bit4 STPIE Displacement Control STP POS QEC Completion RTCN 0 Disable the displacement control completion RTCN 1 Enable the displacement control completion RICN Once the displacementinstruction has been executed a message will be send to user device automatically Bit3 P4IE P4 Status Change RTCN 0 Disable P4 status change RTCN 1 Enable P4 status change RTCN Bit2 S3IE S3 Status Change RTCN 0 Disable S3 status change RTCN 1 Enable S3 status change RTCN Bit S2IE S2 Status Change RTCN 0 Disable sensor port 2 S2 status change RTCN 1 Enable S2 status change RTCN BitO S1IE S1 Status Change RTCN 0 Disable sensor port 1 S1 status change RTCN 1 Enable S1 status change RTCN 5 5 Instruction List The following table shows the instructions mentioned in this chapter the detail of those instructions is descriped at the end of the document Instruction Desorption ag ICFn Set initial configuration register Check initial
71. on e Reset position and encoder counter Decelerate at preset deceleration until stop e Reset position and encoder counter Emergency stop e Off Page 44 M4220130813EN Ul Robot Technology Co Ltd UIM242XX Miniature Integrated Stepper Motor Controller 8 1 Rising and Falling Edge When port S1 and S2 is configured for digital input if the sensor module detects a voltage change on S1 S2 from OV to 5V an Sx rising edge event will be created meanwhile S1 S2 is assigned a logic value 1 i e S1 1 If the sensor module detects a change on S1 S2 from 5V to OV an S1 S2 falling edge event will be created meanwhile S1 S2 0 Figure8 1 Rising and Falling Edge of a Digital Sensor Input Voltage on Port S1 S2 Falling ai T Time 8 2 Analog Input and Thresholds Figure8 2 Analog Input and Thresholds Voltage on Sensor Port Though voltage on sensor port is lower than Thd_H S1 is still 1 S1 logic value T Time S1 Logic Value Though voltage on sensor port is higher than Thd_L S1 is still O Rising Edge T Time Sensor input port S1 can be configured for analog input by instruction To do that user needs to first enable the analog input function by set the ANE bit of the master configuration register i e MCFG lt ANE gt 1 Then user needs to select the analog input port by clear the CHS bit of the master configuration register i e make MCFG lt CHS gt 0 Once configured the analog voltage o
72. onnnnnnnnnnnnnnnonanenons 53 Regeneration AICA a aaa aaa a bua aaa a aA aeaa ora aa aa aaaea aoaaa Sua 55 Regeneration Electric Energy tir A send seusennde Rass uveaseendee as 55 UIM Regeneration Discharge Mode e iris 55 UES UIC UO ssn E E E E A 56 InSTUCHON TUCU ria A N 56 Feedback Message SIFUCIUTS cai A A E as 56 INSTRUCTION Descritor bo 59 Check desred motor salia iii dt 59 ACRn Set auto current reduction ratio oooccccccccnncconnnnonononononnnnononnnnononnnnonnnnnnnnnnnnnnnnnnnnnnnnnnnonnnnnnancncnnos 60 ACR Check auto current reduction ratiO oooonccncccconcnncccnoncnncnnnnnnonononancnnnnnnnnnnnononnnnnnnnnnnnrnnnnnnnnrnnnnnnnrennns 61 BLCn Backlash compensation ccccceeccceececeececseeeceececeuceceueessueeesaueeseueessueessaeeesaueeseusessaeessueeeseeeeseeeeseas 62 BLC Check backlash compensa dd 63 CURA Motor Curent AGUS ting isco ices cele Sa ie ocios 64 DOU Set TT LY Outg ue wit a2 tecs o ii ls lapa tina 65 DOU Gheck TTL Outout LEVE ioc coeacecs a donarcd R Rh a satacarenacecdaceante 66 ENA cy es m1 1 9 6 2 Ena eee RR ee ds o o el a Os O ee 67 ENAN SOE enable tme it dr sida deca 68 ENAXEERE Check enable Merritt talas 69 FBK Motor Status Feedback NOUI os iaa 70 ICFxn Initial Configuration Register InStrUCtION ooonccccooncnnononnnnonnnnnononenonnnnnnnnnnrnnonnncnnonnnnnnnnnrnnnnnnnnnnnos 71 ICF Check Initial Configuration Register cccccccccocccnnccnnncccnononncnnnnnnnononnnnnnnnonnnnnn
73. ontrol Uniform Accelaration Desired Speed Uniform Deceleration Max Start Speed Max Cessation Speed T Time Angular Displacement Stop Position Trajectory Start Position N T Time 7 6 Direction Control and Position Counter When the user enables the advanced motion control module the actual motor direction Is controlled by the module This is because if the user input commands a motion direction different from the current motion direction the desired direction cannot be executed immediately UIM242 has two types of position counters absolute position counter and displacement counter Page 40 M4220130813EN Ul Robot Technology Co Ltd UIM242XX Miniature Integrated Stepper Motor Controller Absolute position counter is for recording the absolute position of motor The actual angular displacement is also relative to micro stepping The value recorded in absolute position counter will be stored automatically on Power Failure situation and can only be cleared on user instruction or preset sensor event The counter will increase or decrease according to ICFG CWW and the actual direction of motor Absolute position counter value can be read through POS instruction Displacement counter is mainly used for displacement control The former information is cleared when it receives a new displacement instruction It can also be used to record the displacement since last time it was cleared 7 7 Backlash Compensa
74. or Parameter Store into EEPROM STO is used for storing parameters such as S12CON ATCONH ATCONL SPD and STP into EEPROM so that Sensor Input Control Module can perform the control when user device is absent SFB Sensor Status Feedback At any time and under any scenario using the instruction SFB can always read back the logic value of S1 and S2 as well as the analog measurement given MCFG lt ANE gt 1 MCFG lt CHS gt 0 Ul Robot Technology Co Ltd M4220130813EN Page 47 UIM24202 04 08 8 6 Sensor Input Control Register S12CON S12CON Sensor 1 2 Control defines the binding relationship between S1 and S2 sensor events and actions as well as the activation of corresponding RTCNSs It is a 16bits register inside the controller and can be configured using the instruction SCF When writing to it user needs to affix a 4bits suffix code to point to this register For details of SCF please refer to chapter 10 The suffix code for S12CON is 0000 binary S12CON structure is as follows Bit 15 14 13 12 11 10 9 8 6 3 4 3 2 1 0 Defination S2RACT S2FACT S1RACT S1FACT Bit 15 12 S2RACT lt 3 0 gt S2 Rising edge Action Bit 11 8 S2FACT lt 3 0 gt S2 Falling edge Action Bit 7 4 S1RACT lt 3 0 gt S1 Rising edge Action Bit 3 0 S1FACT lt 3 0 gt S1 Falling edge Action The binding relationship between S1 and S2 sensor events and actions is as follow ACT Code binary Action RTCN or Not 0000 N A No RTCN Ignore MCFG lt S2IE gt lt
75. or disabled by instructions 1 2 Advanced Motion Control Module With advanced motion control module installed UIM242XX controller can maintain linear and non linear acceleration deceleration S curve displacement control PT PVT control auto direction control etc There are two ways to define acceleration deceleration rate 1 Value Mode Input range 1 65 000 000 PPS Sec pulse sec2 2 Period Mode Input range 1 60 000 milliseconds time to fulfill the acceleration or deceleration The input range of the displacement control is 2 billion pulses steps In advanced motion control mode the actual direction is decided by module calculation When displacement is in place there will be a RICN Instruction configurable Advanced motion control module can be disabled enabled through user instruction 1 3 Sensor Input Control Module UIM242 s Sensor Input Control Module supports 3 channels of sensor input They can accept a TTL level input of O 5V There is 1 channel can be configured as analog input Precision 12bit Sample frequency 50K mean of 16 calculation Update frequency 1000Hz User can configure the desired automatic action triggered by sensor status change There are 9 actions listed below that can be triggered by sensor event e Start and run forwardly at preset speed and acceleration e Start and run reversely at preset speed and acceleration e Change direction and run at preset speed and acceleration e Forwor
76. p running at the desired speed stop after reaching the desired position 6 2 Basic Instruction Acknowledgment ACK Upon receiving an instruction the UlM242XX controller will immediately send back an Acknowledgment ACK message There are only two ACK messages for all of them as described below Error Message If the received instruction is incorrect UIM242 will issue an error message and the incorrect instruction will not be executed EE Error Code FF Where EE denotes an error message The error code is list below Error Code 65 66 Meaning Syntax Error Value Error Basic ACK Message When a valid instruction is received the UIM242 will send back a basic ACK message The basic ACK message contains all desired settings Specifically following information is included in the ACK message STP SPD DIR MCS CUR ENABLE OFFLINE and ACR The basic ACK message is 13bytes long and has a structure as shown below Byte 1 2 3 4 5 6 7 8 9 10 11 12 13 Where Ul Robot Technology Co Ltd M4220130813EN Page 33 UIM24202 04 08 1 AA denotes a basic ACK message is a kind of reply to instructions received 2 ASM Assembled byte structure 7 6 5 4 3 2 1 0 N A 0 ENA OFF DIR MCS 1 O full step 15 1 16 step 3 CUR desired phase current structure Bit value Bit 7 6 5 4 3 2 1 0 value N A 0 Phase Current e g 27 2 7 Amp 4 SPD2 SPDO denotes the desired motor speed See f
77. pensation value is pulse the range is O 65536 recommended value lt 5000 the default value is 0 7 8 Advanced Motion Control Instructions There are 6 additional instructions added as listed below 1 Enable disable MCFG MCF User can clear the CM bit of Master Configuration Register MCFG lt CM gt 0 to disable the module or set the CM bit MCFG lt CM gt 1 to enable the module 2 Set acceleration MAC There are two ways to set the acceleration rate Figure7 12 Value mode lf the AM bit of the Master Configuration Register is clear to zero MCFG lt AM gt 0 then the value of the instruction will be interpreted as the value of the acceleration rate The range of the input value is 1 65 000 000 and unit is pulse sec sec or pulse square second Period mode f the AM bit of Master Configuration Register is set to one MCFG lt AM gt 1 then the value of the instruction will be interpreted as the period of the acceleration or in other words the time used for motor to accelerate to the desired speed from current speed The range of the input value is 1 60 000 milliseconds e 0 001 60 seconds 3 Set deceleration MDE Similar to mACC the deceleration also has two ways to set as listed below Ul Robot Technology Co Ltd M4220130813EN Page 41 UIM24202 04 08 Value mode lf the DM bit of the Master Configuration Register is clear to zero MCFG lt DM gt 0 then the value of the instruction will be interpreted
78. r there also has 5 Speed 6 Displacement AA Controller ID D1 FF D1 gt gt The message ID of STO This instruction will affect real time performance lt takes around 20 ms for the instruction to be executed It is recommended that sending this instruction when the motor is idle and wait 20ms before sending other instructions Page 98 M4220130813EN Ul Robot Technology Co Ltd 40 UIM242XX Miniature Integrated Stepper Motor Controller STOn Format Description ACK Comment Note Example Ul Robot Technology Co Ltd Parameter Banding STOn Banding motion parameters to motions Triggered by sensor edge or controllered by instruction n 0 1 ie n 0 gt gt Montion controlled by instrcution 1 gt gt Only for close loop gt gt Motion triggered by rising edge of S1 gt gt Motion triggered by falling edge of S1 u gt gt Motion triggered by rising edge of S2 gt gt Motion triggered by falling edge of S2 gt gt Motion triggered by rising edge of S3 u A AS es Il NO oO KR WO YD Motion triggered by falling edge of S3 gt gt AA Controller ID D1 FF D1 gt gt Message ID of instruction STO Require controller hardware version being 1232 or higher This instruction will affect real time performance It takes around 15 ms for the instruction to be executed It is recommended that sending this instruction when the motor is idle and wait 20
79. s determined by if current position is zero point or just crosses over the zero point 1 5 Instructions and Interface Instructions for UIM242XX are simple intuitive and fault tolerating For example in order to command a speed of 1000 steps sec the following instructions are all valid SPD 1000 SPD 1000 SPD 1000 SPD1000 or even SPD amp 10005 In case that a wrong instruction is entered the controller will return an ACK of error message Incorrect instructions will not be executed to prevent accidents UIROBOT provides free Microsoft Windows based VB VC demo software and corresponding source code to facilitate the quick start of user device side programming Ul Robot Technology Co Ltd M4220130813EN Page 21 UIM24202 04 08 2 0 INSTRUCTION AND FEEDBACK STRUCTURE Once UlM242XX receives a message instructions from the user device it will first ACK back repeat the received instruction and then execute the instruction UlM242XX will further send back a message to inform the user device of the completion of the instruction Before a new instruction is received UIM242XX will keep current working status e g running stop etc 2 1 UIM242 Message Communication Mode Host computer realizes motion control through message Furthermore host obtain controller status and controller update feedback information to host also through message Therefore user must know the structure of the message first Mes
80. s stored in EEPROM UlM242XX controller also has the function of high speed current compensation to offset the effect of Back Electromotive Force BEMF of motor at high speed and therefore to facilitate motor s high speed performance UlM242XX series of controllers work with 12 40VDC power supply UIM242XX can perform open loop control The control system comprises communication system basic motion control system absolute position counter and real time event based change notification system There are also two optional modules to be added on customer request Advanced Motion Module linear non linear acceleration deceleration S curve PV PVT displacement control and Sensor Input contro Module The embedded 64 bit calculation precision DSP controller guarantees the real time processing of the motion control and change notifications similar to the interrupters of CPU Entire control process is finished within 1 millisecond UIM242 controller applies CAN2 0B communication protocol which due to its high speed 1 million bit rate long distance 10km transference and high noise immunity is widely used in applications with serious signal interference and yet requiring high reliability such as automobile industry automated manufacturing and traffic control The whole CAN bus network is based on a twisted wire pair Similar to the network of home appliances multiple UIM242 controllers are connected to the twisted pair in parallel just like
81. sage of UIM has two forms listing below 1 String based on RS232 Figure 2 1 and 2 CAN message based on Ul simpleCAN Figure 2 2 lf there is no special version all messages are based on RS232 in this manual For details of CAN message please refer to Ul simple CAN programming manual or contact with technical support of Ulrobot Host sends string message to Ul gateway UIM2501 through RS232 serial port then the gateway converst the message into CAN message based on SimpleCAN and sends it to specified UIM242 controller Similarly feedback message sent by UIM242 is based on SimpleCAN the gateway converts it to string based on RS232 and sends it to host Figure 2 1 Hardware scheme for communication based on RS232 string Work node Work node Work node Work node Work node Gateway Le Work node Page 22 M4220130813EN Ul Robot Technology Co Ltd UIM242XX Miniature Integrated Stepper Motor Controller 2 2 Instruction Structure An instruction is a message sent from the user device to UIM242 to Comment certain operation Instructions of UIM242 follow the rules listed below INS n or INSx n or INS Instruction symbol INS comprises three letters with no space between them and is not case sensitive If there is an x INSx then it means the value is hexadecimal Value n comprises set of numbers Some instructions have no value such as SPD STP etc Each instruction must end with semicolon
82. ste we ee lee Seti ele ele eee aa cenit ln els ee aide 28 5 5 BAS WUC OTA HENS es actin 5 seas ance os ltd clara 29 6 0 Basic Gontrol INStruCGuons rsisi aapa aa aA aaa aa a aa Aaa aa adina Ria 30 6 1 General Introduction of Motion Control Modes ccccccssseccecceeseceeeceeeceescaeseceeeseeeeceeeeeuseceeeeeeeceeteaeaeeess 30 6 2 Basic Instruction Acknowledgment ACK assi td 33 6 3 Motor Status Feedback Message oocccccccnccccoconncccnnncconononononnnononnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnananinns 34 6 4 o A 35 7 0 Advanced Motion Controla ihn ie es eee ee ee 36 7 1 near Accor alot idol ide 36 7 2 Linear Declara 36 7 3 Nonlinear Acceleration eo altos a tae lio te dae de 36 7 4 Nonlinear Deceleration a O tee ti a it 38 Lo S Curve Displacement Contra a a S 39 7 6 Direction Control and Position Counter cccccccccseeeeececeeeceeeeeeeeeeeeeeeeeeeeceeeeeeseeeseeeeeesseeeeeeeeeeeessaaaneeeeeees 40 foal Backlash Compensa ON ct 41 7 8 Advanced Motion Control INStruCtiONS oooccccnncccononnncnnnononononnnnnnnnonononnnnnnnnnonnnnnnnnnnnnnnonnnnnnnnnnnonnnnnnnnnns 41 7 9 Enable disable Advanced Motion Control Module MCFG ccccccccseeeeeeeeeeeeeeeeseeeeeeeeeeeeeeeeesaeeeeesenaaees 42 LTO A S a al el cal se Ae cae celia tole tales 42 8 0 Sensor Input Contro lsrs aiii aa 44 8 1 Rising and Falling Ed a a a li DU 45 3 2 Analog Input and TA Sa 45 33 Digitalinpul Sampling Mode a e a e a e e
83. t Sign of the value of SPD instruction instructs the motion direction For example both the instruction SPD 1000 and SPD 1000 make motor run forward at 1000pps Meanwhile the instruction SPD 1000 can cause motor to run backward at 1000pps lf Advanced Motion Control Module is installed soeed control can be achieved through linear or non linear acceleration deceleration For details please refer to Chapter 6 0 Advanced Motion Control If Advanced Motion Control Module is not installed once a SPD instruction is received motor speed will be set to desired speed Position Tracking PT In the Position Tracking PT mode UIM242 controller will keep motor running at a speed close to the set value until it reaches the desired steps After setting the desired speed user can enter desired positions or incremental displacement continuously or discontinuously UIM242 controller will make sure that the desired position is achieved when trying to approach the desired speed to the greatest extent Page 30 M4220130813EN UI Robot Technology Co Ltd UIM242XX Miniature Integrated Stepper Motor Controller As shown in Figure 6 2 UIM242 controller operates in PT mode automatically on receiving position instruction such as POS STP until an instruction of STP 0 is given STP is a displacement control instruction Logically STP 0 means no displacement It is contradictory to send a displacement instruction of
84. tepper motor phase B H product Max supply voltage is 50V is custom made please contact with salesmans before purchase WARNING Incorrect connection of phase winds will permanently damage the controller Resistance between leads of different phases is usually gt 100KQ Resistance between leads of the same phase is usually lt 100Q It can simply measured by a multimeter WARNING Except supply voltage port and motor terminal voltage on port must be kept between 0 3 5 3V Otherwise the controller will be damaged Page 6 M4220130813EN UI Robot Technology Co Ltd UIM242XX Miniature Integrated Stepper Motor Controller TERMINAL DESCRIPTION D Figure0 2 Termianal Description ae E ie A TT o HA e aa lo w MO de ey M0 7000 se sr so 0157 E Control Terminals Control Terminals Terminal No Designator Description Two core1 V Supply voltage 12 40VDC Two core2 GND Supply voltage ground Four core3 4 CANH CAN signal dominant high Four core1 2 CANL CAN signal dominant low Six core1 AG Analog ground for sensors Six core2 5V Voltage output 5V 80mA Six core3 P4 TTL signal output port Six core4 S3 Sensor input port 3 Six core5 S2 Sensor input port 2 Six core6 S1 Sensor input port 1 Motor Terminals Terminal No Description A A Connect to the stepper motor phase A B B Connect to the stepper motor phase B Note D product Differential Terminal is custom made
85. tion Backlash is a ubiquitous matter for mechanical system e g screw nut transmission or gear rack transmission For example there is a gap between screw and nut once the rotation direction is change in certain angle though the screw is turing the nut will not drive the table moving until the gap is eliminate this gap is known as backlash which is reflected in the rotation angle of screw Quantitatively if the screw rotates clockwise to drive the nut moving 5mm forward then rotates anticlockwise for the same cycles the nut will moving backword 4 99mm the difference between the two value is the backlash Because of backlash once reverse motion starts the accumulative error will increase until the backlash is compensate then the accumulative error tends to be steady The influence caused by backlash is considerable in a reciprocating motion UIM242 controllers provide the function of backlash compensation to reduce the influence on mechanical transmission accuracy To compensate backlash user needs to set a reference backlash first then once there is a backlash user can compensate it by sending instruction BLC Since this instruction compensate backlash automatically when motion direction changes and the direction before can not get automatically then it will be thought as no backlash exsiting at the initial moment Therefore user must ensure that there is no backlash before sending instruction BLC The units of backlash com
86. tion SCF When writing to it user needs to affix a 4bits suffix code to point to this register The suffix code for S34CON is 0001 binary In addition S34CON is also used for sensor input control In this chapter only the TTL output control related configuration is described S34CON Structure Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Defination STALL P4LVL P4EVENT S3RACT S3FACT Bit 15 12 Stall Alarm Only for closed loop control please refer to UIM242 closed loop control manual Bit 11 P4LVL Port P4 output voltage level O If the event defined by P4EVENT code happens P4 output OV 1 If the event defined by P4EVENT code happens P4 output 5V Bit 10 8 P4EVENT lt 2 0 gt P4 Output Driving Events P4EVENT binary Action RTCN or Not 000 No action Output is controlled by instruction Depends on MCFG lt P4IE gt 001 When SPD gt 0 Output P4LVL vice versa Depends on MCFG lt P4IE gt Page 52 M4220130813EN Ul Robot Technology Co Ltd UIM242XX Miniature Integrated Stepper Motor Controller When move forward Output P4LVL vice versa Depends on MCFG lt P4IE gt When POS 0 Output P4LVL vice versa Depends on MCFG lt P4IE gt Bit 7 0 S3RACT lt 3 0 gt S3FACT lt 3 0 gt S3 Input Control Please refer to section 8 7 for more information 9 3 Output Control Configuration Instruction SCF Please refer to chapter 8 for detailed information 9 4 Instruction List The following table shows the instructions me
87. to 2 3 99 Standby CUR working current n 100 n 0orn 1 ACK is the same as ACK of 6 ENA n 2 3 99 ACK is as follow AA Controller ID BA AO FF BA gt gt Message ID of instruction ACRn AO gt gt Received data 0 AO n ACR is short for Automatic Current Reduce When ACR is enabled the current will be reduced after motor stop which means a decrease of holding torque Value of this instruction will be stored in EEPROM n 2 3 99 require controller hardware version being 1232 or higher Page 60 M4220130813EN Ul Robot Technology Co Ltd UIM242XX Miniature Integrated Stepper Motor Controller 3 ACR Check auto current reduction ratio Format ACR Description Check auto current reduction ratio ACK AA Controller ID BA A0 FF Comment Refer to ACK comment of instruction ACR Note Require controller hardware version being 1232 or higher Ul Robot Technology Co Ltd M4220130813EN Page 61 UIM24202 04 08 4 BLCn Backlash compensation Format BLCn Description Set value of backlash compensation in reciprocating motion n 0 1 65535 Unsigned integer Units pps open loop ACK AA Controller ID DE BO B1 B2 FF Comment DE gt gt Message ID of instruction BLCn BO B2 gt gt Received data 0 2 BO B2 is the converted value for the value of backlash compensation 16 bits Figure 11 1 Page 62 M4220130813EN Ul Robot Technology Co
88. ual direction NOT desired direction is plus P4 will output 5V and RTCN Vice verse Page 54 M4220130813EN Ul Robot Technology Co Ltd UIM242XX Miniature Integrated Stepper Motor Controller 10 0 REGENERATION DISCHARGE 10 1 Regeneration Electric Energy Regeneration electric energy is the electric energy generated when the UIM all in one motor works in generator mode The motor will work in generator mode when following situation 1 Deceleration reversal cuased by external force or its own rotor inertance Overlarge deceleration in the controlled moderating process Motion drived by the reversed towing caused by load on vertical axis Continuous motion caused by load OP ae cee Ie Motion caused by rotor intertance unexpected off line and shutoff of the H bridge MOS Generally the electric energy can be absorbed when charging the smoothing capacitor of UIM controller Charge accumulation of the capacitor in a short time will cause pumping voltage and direct voltage rise Once the pumping voltage is higher than the voltage those control devices can withstand the controller will be damaged For example a NEMA 34 motor runs at a speed of 300rpm or higher once it receives an instruction to stop or turn off the controller will be damaged When the load of a NEMA 34 motor makes it reversed towing the pumping voltage on MOS of H bridge will higer than 100V then the controller will be damaged 10 2 UIM Regeneration Dischar
89. ue for desired speed 16 bits Figure 11 1 PO P4 is the converted value for desired displacement 32 bits Figure 11 2 Note Only after the H bridge enabled can the controller drive the motor Ul Robot Technology Co Ltd M4220130813EN Page 67 UIM24202 04 08 10 ENAn Set enable time Format ENAn Description Set auto enable time register ENAtimer Controller auto enable the H bridge circuit afer power is on for n ms n 1 2 60000 ACK AA Controller ID AO EO E1 E2 FF Comment AO gt gt Message ID of instruction ENAn EO E2 gt gt Received data 0 2 EO E2 is the converted value for auto ENA time 16 bits Figure 11 1 units ms Note This instruction sets ENAtimer only can not enable controller In order to enable controller after pre set time user needs to configure initial configuration register by using instruction ICF after ENAtimer is set Require controller hardware version being 1232 or higher Page 68 M4220130813EN Ul Robot Technology Co Ltd UIM242XX Miniature Integrated Stepper Motor Controller 11 ENAXFFFF Check enable time Format ENAxFFFF Description Check auto enable time ACK AA Controller ID AO E0 E1 E2 FF Comment Refer to ACK comment of instruction ENAn Note This instruction checks ENAtimer only can not enable controller Require controller hardware version being 1232 or higher Ul Robot Technology Co Ltd M4220130813EN Page 6
90. ure7 3 Nonlinear Acceleration Control case 1 Uniform acceleration Desired Speed Speed Step acceleration Maximum Starting Speed Current Speed T Time If the desired speed is less than the Max Starting Speed then the motor speed will step up to the desired speed immediately Figure7 4 Nonlinear Acceleration Control case 2 Step Acceleration Maximum Starting Speed Desired Speed Current Speed T Time lf the current speed is higher than the Max Starting Speed the UIM242 will use the linear Acceleration Control Algorithm to control the speed Figure7 5 Nonlinear Acceleration Control case 3 Uniform acceleration Desired Speed Current Speed Maximum Starting Speed T Time Ul Robot Technology Co Ltd M4220130813EN Page 37 UIM24202 04 08 7 4 Nonlinear Deceleration Similar to the nonlinear acceleration control there are three cases and corresponding control algorithms as listed below lf the desired speed is higher than a certain user preset value i e the Maximum Cessation Speed UlM242XX will use the Uniform Deceleration Control algorithm Figure7 6 Nonlinear Deceleration Control case 1 Current Speed Uniform Deceleration Desired Speed Maximum Cessation Speed T Time lf desired speed is lower than the Max Cessation Speed and current motor speed is higher than the Max Cessation Speed the Uniform Deceleration Control will be first applied and followed by
91. xample if bit 4 is 1 the Advanced Motion Control module is installed Page 80 M4220130813EN UI Robot Technology Co Ltd UIM242XX Miniature Integrated Stepper Motor Controller 23 MMDn Set Maximum Cessation Speed Format MMDy Description Set the maximum cessation speed at n n 1 2 65 000 000 unsigned integer ACK AA Controller ID B4 MO M1 M2 FF COMMENT B4 gt gt The message ID of MMDn MO M2 gt gt Received data 0 2 MO M2 is the converted value for the value of maximum cessation speed 16 bits Figure 11 1 Unit pps pulse second Ul Robot Technology Co Ltd M4220130813EN Page 81 UIM24202 04 08 24 MMD Check current Maximum Cessation Speed Format MMD Description Check the maximum cessation speed ACK AA Controller ID B4 MO M1 M2 FF Comment Refer to ACK comment of MMDn Page 82 M4220130813EN UI Robot Technology Co Ltd UIM242XX Miniature Integrated Stepper Motor Controller 25 MMSn Set Maximum Starting Speed Format MMSn Description Set the maximum starting speed at n n 1 2 65 000 000 unsigned integer ACK AA Controller ID B3 MO M1 M2 FF Comment B3 gt gt The message ID of MMSn MO M2 gt gt Received data 0 2 MO M2 is the converted value for the value of maximum starting speed 16 bits Figure11 1 Unit pps pluse second Ul Robot Technology Co Ltd M4220130813EN Page 83 UIM24202 04

Download Pdf Manuals

image

Related Search

Related Contents

Guide - Vegaplan  User's Guide for SCORIGHT (Version 3.0): A Computer  Milwaukee SM102 User's Manual  Digitus DA-70218  Hydraulic Service Jack w/ Air Motor Operating Instructions & Parts  Learning Resources 1253    3DYNAPVF™ - Dynaflow, Inc.  Handleiding  PEDIDO DE COTIZACIÓN Ejercicio: 2015  

Copyright © All rights reserved.
Failed to retrieve file