Home
UIM242XX Integrated Miniature Stepper Controller
Contents
1. Size 42 3mm x 42 3mm x 13 5mm L W H Wight 0 1 kg Page 7 M24220101008EN UI Robot Technology Co LTD UIM24204 24208 Table of Contents NZ E 3 Terminal Deepen testen Creche EE dees ees EesebEes 4 Typical Application WEE 5 ei e EE 7 1 0 OM BIVICW echt EE TT steutatatucecueacdaligrecnsdocuedenlus savalesseeemetuerabasaccan 10 TTE Ee E EE 10 1 2 Advanced Motion Control Module 11 1 3 Sensor Input Control Module 12 1 4 TTL Output Control Module 12 1 5 SINSIUCONS 2hectie EE 12 2 0 Instruction and Feedback Structure cccccseeeceseeeeeeeeeseeeeeeesseneeeeeeeeeeeeeeeneeees 13 2 1 Griet 13 2 2 Macro Operator and Null Instruction ecccceccececeeeeeeeeeeeeeeee cece teceaeceeeeeeesecsicaeeeeeereetenes 14 2 3 Feedback Message Structure c cccccceceeeneeeeeeeneeeeeeeneeeeeeaeeeeseeaeeeeeeiaeeeeeenaeeeeeeneeeeeeeaas 14 3 0 Real time Change Notification RTCN s eseecceeeeeseeseeeeeeeeeeeenseneeeeeeeeeeeees 16 3 1 Enable Disable RN Auu0eengt sine ereeg kene eE SEET 17 4 0 Hardware Firmware Configuration cccssseecseeseeeeeeeeeeeeeeesseeeeeeeseeneeeeeneeees 18 4 1 Master Configuration Register 18 4 2 Master Configuration Register Instruction MCFG o eceecceeeecceeeeeeeeeeeeeeeeeeeeeeseneeeeeeeees 20 A3 Check Master Configuration Register 20 5 0 CAN2 0 Communication geb gbebegEe ev ceescassanucencessnevesasackenuertavtvaaveestncsetacesexsnesacece 21 ST Controller ID A
2. of a single instruction is no more than 20 characters 2 Coded with standard 7 bits ASCII code 1 127 Expended ASCII code is NOT accepted 3 Have the following structure Instruction Symbol Value Where Instruction Symbol comprises several letters with no space between them and is not case sensitive Value comprises set of numbers with no other characters between them Some instructions have no Value part Terminator is the semicolon Instruction without terminator will cause the UIM242XxX to wait until the presence of the In most situation that will cause unpredictable results Notice the equal symbol has no effective usage User can use other characters except and 4 Only the first letters of an instruction is used by the UIM242XX Therefore following instructions are the same ENABLE and ENA Page 13 M24220101008EN UI Robot Technology Co LTD UIM24204 24208 2 2 Macro Operator and Null Instruction In practice users will combine several instructions together and send them at once For example CUR 20 MCS 16 DIR 1 SPD 5000 ENABLE Normally the user device will receive an ACK message on every instruction sent Thus above instruction set will cause 5 ACK messages being transferred on the RS232 bus Especially for those basic motion instructions like SPD DIR MCS which have the same ACK sending a set of ACK is unnecessary To facil
3. 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 S34CON is a 16 bit register inside the controller and can be configured using the instruction SCFG 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 9 2 1 S34CON Structure Upper Byte Name P4LVL P4EVENT Bit 15 14 13 12 11 10 9 8 Lower Byte Name S3RD S3RACT S3FD S3FACT Bit 7 6 5 4 3 2 1 0 Bit 15 12 Unimplemented Read as 0 Bit 11 P4LVL Port P4 output voltage level D If the event defined by PAEVENT code happens P4 output OV 1 Ifthe event defined by P4EVENT code happens P4 output 5V Bit 10 8 P4EVENT lt 2 0 gt S3 Rising edge Motion Direction 000 Instruction control P4 output level is controlled by user instruction 001 Run Stop event control If current speed is non zero P4 output P4LVL If current speed is zero P4 output P4LVL 010 Direction event control If current direction is 1 P4 output P4LVL If current direction is 0 P4 output P4LVL 011 Origin point hit event If current absolute position is on the origin point or just pass the origin point P
4. 11 8 Bit 15 14 13 12 11 10 9 8 Lower Byte Name AL 7 0 Bit 7 6 5 4 3 2 1 0 Bit 15 12 Unimplemented Read as 0 Bit 11 0 AL lt 11 0 gt Lower limit of analog threshold Notice ANTHD input range is 0 4095 with 0 corresponding to OV and 4095 corresponding to 5V 4095 is the maximum of a 12bits data Page 57 M24220101008EN UI Robot Technology Co LTD UIM24204 24208 8 7 Sensor Registers Writing Instruction SCFG Instruction SCFG Function Syntax ACK Comment Write the S12CON S34CON ATCONH and ATCONL SCFG x Variable Integer x 0 1 1048575 20bits OxAA Controller ID 0xCO 0x0 0x0 S2 S1 SO AL1 ALO AH1 AHO OxFF 0xC0 is the Message ID of SCFG S2 SO represent the value of S12CON AL1 ALO represent the value of the lower limit of analog input AH1 AHO represent the value of the upper limit of the analog input Writing to the S12CON and ATCON is realized through instruction SCFG 12CON and ATCON are 16bits registers in the controller But when using the SCFG user has to affix a 4bits suffix code to point the desired register to be written The suffix code for S12CON is 0000 The suffix code for S34CON is 0001 The suffix code for ATCONL is 0010 binary The suffix code for ATCONH is 0011 binary Details on how to using the SCFG is given in the examples 8 9 1 and 8 9 2 binary binary 8 8 Check S12CON S34CON ATCONH and ATCONL Instruction SC
5. code to point to this register The suffix code for S34CON is 0001 binary In addition S34CON is also used to configure the TTL output port and the events that drive the output level In this chapter only the S3 related configuration is described Page 53 M24220101008EN UI Robot Technology Co LTD UIM24204 24208 8 L 5 1 S12CON Structure Upper Byte Name S2RD S2RACT S2FD S2FACT Bit 15 14 13 12 11 10 9 8 ower Byte Name S1RD S1RACT S1FD S1FACT Bit T 6 5 4 3 2 1 0 Bit 15 Bit 14 12 Bit 11 Bit 10 8 Bit 7 Bit 6 4 S2RD_ S2 Rising edge Motion Direction 0 for actions that require a specific direction e g Run DIR 0 1 Tor actions that require a specific direction e g Run DIR 1 S2RACT lt 2 0 gt Action code for S2 Rising edge event 000 No action No RTCN Ignore MCFG lt SZ2IE gt 001 No action RTCN depends on MCFG lt S2IE gt 010 Run RTCN depends on MCFG lt S2IE gt 011 Deceleration Stop RTCN depends on MCFG lt SZ2IE gt 100 Sudden Stop RTCN depends on MCFG lt S2IE gt 101 Relative Displacement RTCN depends on MCFG lt SZ2IE gt 110 Reset Absolute Position Counter RTCN depends on MCFG lt S2IE gt S2FD S2 Falling edge Motion Direction 0 for actions that require a specific direction e g Run DIR 0 1 Tor actions that require a specific direction e g Run DIR 1 S2FACT lt
6. pulse square second 7 9 2 Period Method pre requiring MCFG lt AM gt 1 Instruction mACC Function Set the acceleration rate Syntax mACC x Variable Integer x 1 2 60 000 OxAA Controller ID 0xB1 ACF 0x0 0x0 AC2 AC1 ACO OxFF 0xB1 is the Message ID of mACC ACK AC2 ACO represents the value of the acceleration period ACF the AM bit of the MCFG here always 1 ACF 1 means the value input will be interpreted as the desired time for acceleration mACC is the abbreviation of motion Acceleration Comment Unit milliseconds UI Robot Technology Co LTD M24220101008EN Page 44 UIM242XX Integrated Miniature Stepper Controller 7 10 Check the Current Acceleration Rate Instruction mACC Function Check current acceleration rate Syntax mACC Variable N A 0xAA Controller ID 0xB1 ACF AC4 AC3 AC2 AC1 ACO OxFF 0xB1 is the Message ID of mACC AC4 ACO represents the value of the acceleration rate period ACK ACF the AM bit of the MCFG 0 or 1 This value determines the method used by the system to interpret the AC4 ACO value When ACF 1 the unit is milliseconds When ACF 0 the unit is pps sec or pulse square second Comment Page 45 M24220101008EN UI Robot Technology Co LTD UIM24204 24208 7 11 Deceleration Rate Setup Instruction mDEC 7 11 1 Absolute Value Method pre requiring MCFG lt DM gt 0 Instruction mDEC Function Set the deceleration rate Syntax mDEC x Variable I
7. 0 for actions that require a specific direction e g Run DIR 0 1 Tor actions that require a specific direction e g Run DIR 1 Bit 2 0 S3FACT lt 2 0 gt Action code for S3 Falling edge event 000 No action No RTCN Ignore MCFG lt S3lE gt 001 No action RTCN depends on MCFG lt S3IE gt 010 Run is bonded RTCN depends on MCFG lt S3IE gt 011 Deceleration Stop RTCN depends on MCFG lt S3IE gt 100 Sudden Stop RTCN depends on MCFG lt S3IE gt 101 Relative Displacement RTCN depends on MCFG lt S3IE gt 110 Reset Absolute Position Counter RTCN depends on MCFG lt S3IE gt UI Robot Technology Co LTD M24220101008EN Page 56 UIM242xXX Integrated Miniature Stepper Controller 8 6 Analog Threshold Control Register ATCONH ATCONL ATCONH and ATCONL define the upper and lower limit of the analog threshold Both registers are 16bits registers in the controller memory space However when write to them 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 8 6 1 ATCONH Structure Upper Byte Name AH 11 8 Bit 15 14 13 12 11 10 9 8 Lower Byte Name AH 7 0 Bit 7 6 5 4 3 2 1 0 Bit 15 12 Unimplemented Read as 0 Bit 11 0 AH lt 11 0 gt Upper limit of analog threshold 8 6 2 ATCONL Structure Upper Byte Name AL
8. Speed Since the definitions of Maximum Starting Speed and Maximum Cessation Speed were already discussed in the previous sections here they are omitted The unit of Maximum Starting Speed and Maximum Cessation Speed is pps pulse per second 7 8 Enable disable Advanced Motion Control Module MCFG Even if the UlIM242XX is equipped with advanced motion control module user can enable or disable the module through instruction This is realized through setting or clearing the CM bit MCFG lt 10 gt of the master configuration register 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 Details on how to write the master configuration module can be found in section 4 1 Page 43 M24220101008EN UI Robot Technology Co LTD UIM24204 24208 7 9 Acceleration Rate Setup Instruction mACC 7 9 1 Absolute Value Method pre requiring MCFG lt AM gt 0 Instruction mACC Function Set the acceleration rate Syntax mACC x Variable Integer x 1 2 65 000 000 0OxAA Controller ID 0xB1 ACF AC4 AC3 AC2 AC1 ACO OxFF 0xB1 is the Message ID of mACC ACK AC4 ACO represents the value of the acceleration rate ACF the AM bit of the MCFG here always 0 ACF 0 means the value input will be interpreted as the absolute acceleration rate mACC is the abbreviation of motion Acceleration Comment Unit pps s pulse sec sec
9. White CANH CAN High Level Voltage I O VDC 4 Green CANL CAN Low Level Voltage UO VDC 5 Blue AG Analog Ground for Sensor 0 VDC 6 Pink EN Sensor 1 Input 0 5 VDC 7 Yellow S2 Sensor 2 Input 0 5 VDC 8 SteelBlue S3 Sensor 3 Input 0 5 VDC 9 Gray P4 TTL Output 0 5 VDC Note 1 Please refer to Typical Application section for details 2 Internally linked to supply voltage ground Motor Wiring Pads at the bottom of the controller Pad A A Connect to the stepper motor phase A Pad B B Connect to the stepper motor phase B WARNING To avoid damaging make sure the phase winds are connected correctly Resistance between leads of different phases is usually gt 100KQ2 Resistance between leads of the same phase is usually lt 1000 i UI Robot Technology Co LTD M24220101008EN Page 4 UIM242XX Integrated Miniature Stepper Controller Typical Application UIM242 Controllers can work standalone or within a motor network When working in a motor network up to 100 UIM242 controllers can be linked together using a minimum of 2 twisted wires 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 Please note that 1 User is responsible for the power supply for the sensor s 2 Voltage on the terminal 6 7 8 must be kept between 0 3V and 5 3V Under both scenarios TTL output should be connected
10. architecture comprises communication system basic motion control system absolute position counter and real time event based change notification system Embedded 64 bit calculation precision DSP controller guarantees the real time processing of the motion control and change notifications There are 3 optional advanced modules Advanced Motion Control Module Input Control Module and Output Control Module With UIM242 s Advanced Motion Control selected NEMA 17 23 motors can ramp up to 6600 RPM in 0 5 seconds and 4000 RPM in 0 25 seconds online video available for downloading UIM242 controllers can be mounted onto NEMA17 23 34 42 series stepper motor through adapting flanges Controller thickness is less than 14 mm Enclosure is made of die cast aluminum to provide a rugged durable protection and improves the heat dissipation Page 3 M24220101008EN UI Robot Technology Co LTD UIM24204 24208 Terminal Description Figure 0 1 Terminal Description Phase To avoid loss of terminal screws please always keep screws tightened Description of Screw Terminals Terminal Description Input Output No Color MIN NOM MAX UNIT 1 Red V Supply voltage 12 40 VDC 2 Black GND Supply voltage ground 0 VDC 3
11. control automatically At any time use can use FBK and POS instructions to get the current status of the motor These 5 instructions will be further discussed in the following sections UI Robot Technology Co LTD M24220101008EN Page 34 UIM242xXX Integrated Miniature Stepper Controller 7 1 Uniform Acceleration Uniform acceleration is defined as during the acceleration period the acceleration rate is constant The relationship between the speed and time is shown in figure 7 1 Once user set the acceleration and desired speed through instructions e mACC and SPD UIM242XX controller will realize the process automatically with 64bit calculation accuracy Figure 7 1 Uniform Acceleration Control Speed Uniform Acceleration Desired Speed ae Current Speed 7 2 Uniform Deceleration Uniform deceleration is defined as during the deceleration period the deceleration rate is constant The relationship between the speed and time is shown in figure 7 2 Once user set the acceleration and desired speed through instructions e mDEC and SPD UIM242xXX controller will realize the process automatically with 64bit calculation accuracy Figure 7 2 Uniform Deceleration Control Uniform Deceleration Current Speed d Desired Speed Page 35 M24220101008EN UI Robot Technology Co LTD UIM24204 24208 7 3 Nonlinear Acceleration In order to minimize the response time make the motor reaching the desired speed
12. in a real time fashion To communicate with these motor controllers user needs a CAN RS232 converter i e UIM2501 Converting Controller The UIM2501 commands the UIM242xx controllers through CAN bus and communicates with the user devices through RS232 ASCII coded instructions In that manner user can operate these controllers with minor or no knowledge about the stepper motor driving and CAN protocol UIM242 controller has a miniature size of less than 42 3 x 42 3 x 13 5 mm and is designed to mount onto NEMA17 23 34 42 series stepper motor seamlessly through adapting flanges The enclosure is made of die cast aluminum which provides a rugged durable protection and improves the heat dissipation UIM24204 and UIM24208 are capable of providing 1 5 4A and 3 8A adjustable output current Output current can be adjusted through instruction in a real time fashion Once set the value is stored in the onboard EEPROM The controller also has high speed current compensation to facilitate the motor s high speed performance This series of controllers can work with 12 40VDC power supply 1 1 Basic Control System UIM242XX controllers basic control system comprises communication system basic UI Robot Technology Co LTD M24220101008EN Page 10 UIM242XX Integrated Miniature Stepper Controller motion control system and absolute position counter and real time event based change notification system 1 1 1 Communication Through a CAN RS2
13. is 5V while P4 0 means the output is OV DOUT is the abbreviation of Digital Output DOUT 1 TTL output is 5V DOUT 0 TTL output is OV Using DOUT x will affect S34CON Once DOUT instruction is received 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 UI Robot Technology Co LTD M24220101008EN Page 64 UIM242XX Integrated Miniature Stepper Controller 9 5 Check TTL Output Level Instruction DOUT Function Check current TTL output level Syntax DOUT Variable N A OxAA Controller ID 0xC1 P4 OxFF ACK 0xC1 is the message ID of DOUT P4 is the logic level of the TTL output P4 1 means the output is 5V while P4 0 means the output is OV DOUT is the abbreviation of Digital Output Using DOUT will NOT affect S34CON Comment Page 65 M24220101008EN UI Robot Technology Co LTD UIM24204 24208 9 6 Examples of TTL Output Control Writing to the S34CON is realized through instruction SCFG Before writing to the S34CON user needs to first fill every bit of the S34CON according to the information provided in previous sections and then affixes the suffix code 0001 binary Then user can use the instruction SCFG to realize the configuration An example is provided below Example 9 6 1 Sy
14. is the abbreviation of Origin Page 29 M24220101008EN UI Robot Technology Co LTD UIM24204 24208 6 11 Basic Instruction ACK Upon receiving an instruction the UIM242XX controller will immediately send back an ACK Acknowledgment message For all basic instructions describe before except POS and ORG there are only two ACK messages for all of them as described below 6 11 1 Error Message If the received instruction is incorrect UIM242xx controllers will issue an error message There are two kinds of errors Syntax error and value error the variable range is incorrect The structure of an error message is OxEE Error Code 0xFF Where OxEE denotes an error message The error code is list below Error Code 0x65 0x66 Meaning Syntax Error Value Error 6 11 2 Basic ACK Message When a valid instruction is received the UIM242XX controller will send back a basic ACK message The basic ACK message contains all desired settings including the most current setting Specifically following information is included in the ACK message STP SPD DIR MCS CUR ENABLE OFFLINE and ACR The basic ACK message is 13 bytes long and has a structure as shown below OxAA Controller ID ASM byte current SPD2 SPD1 SPDO STP4 STP3 STP2 STP1 STPO OxFF Where 1 OxAA denotes a normal ACK message 2 ASM assembled byte structure N A 1 Enable MCS 1 Value Reado AC
15. 1 5 Instructions 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 or SPD 1000 or SPD 1000 or SPD1000 or SPD amp 1000 In case the user enters a wrong instruction the controller will return an ACK of error message Incorrect instructions will not the executed to prevent accidents UI Robot Co provides free Microsoft Windows XP based VB VC demo software and corresponding source code to facilitate the quick start of user device side programming UI Robot Technology Co LTD M24220101008EN Page 12 UIM242XX Integrated Miniature Stepper Controller INSTRUCTION AND FEEDBACK STRUCTURE 2 0 INSTRUCTION AND FEEDBACK STRUCTURE Once UIM242XX receives a message instructions from the user device it will first ACK back repeat the received instruction and then execute the instruction If the real time change notification RTCN is enabled UIM242XX will further send back a message to notice 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 Instruction Structure An instruction is a message sent by the user device to UIM242XX to indicate or command curtain operation Instructions of UIM242XX obey following rules 1 Total length including the terminating semicolon
16. 2 0 gt Action code for S2 Falling edge event 000 No action No RTCN Ignore MCFG lt SZ2IE gt 001 No action RTCN depends on MCFG lt S2IE gt 010 Run RTCN depends on MCFG lt S2IE gt 011 Deceleration Stop RTCN depends on MCFG lt SZ2IE gt 100 Sudden Stop RTCN depends on MCFG lt S2IE gt 101 Relative Displacement RTCN depends on MCFG lt SZ2IE gt 110 Reset Absolute Position Counter RTCN depends on MCFG lt S2IE gt S1RD S1 Rising edge Motion Direction 0 for actions that require a specific direction e g Run DIR 0 1 Tor actions that require a specific direction e g Run DIR 1 S1RACT lt 2 0 gt Action code for S1 Rising edge event 000 No action No RTCN Ignore MCFG lt S1IE gt 001 No action RTCN depends on MCFG lt S1IE gt 010 Run RTCN depends on MCFG lt S1IE gt 011 Deceleration Stop RTCN depends on MCFG lt S1IE gt 100 Sudden Stop RTCN depends on MCFG lt S1IE gt UI Robot Technology Co LTD M24220101008EN Page 54 UIM242xXX Integrated Miniature Stepper Controller 101 Relative Displacement RTCN depends on MCFG lt S1IE gt 110 Reset Absolute Position Counter RTCN depends on MCFG lt S1IE gt Bit 3 S1FD S1 Falling edge Motion Direction 0 for actions that require a specific direction e g Run DIR 0 1 Tor actions that require a specific direction e g Run DIR 1 Bit 2 0 S1FACT lt 2 0 gt Action code for S1 Falling edge event 000 No action No R
17. 220101008EN Page 50 UIM242XX Integrated Miniature Stepper Controller 8 1 Rising and Falling Edge Figure 8 1 Rising and Falling Edge of a Digital Sensor Input Voltage on port Sx Sx Logic Value Rising Edge Falling Edge When port Sx x 1 2 3 is configured for digital input if the sensor module detects a voltage change on Sx from OV to 5V an Sx rising edge event will be created meanwhile Sx is assigned a logic value 1 i e Sx 1 If the sensor module detects a change on Sx from 5V to OV an Sx falling edge event will be created meanwhile Sx 0 8 2 Analog Input and Thresholds Figure 8 2 Analog Input and Thresholds Voltage on Sensor Port Here S1 S3 is still 1 AL ov Here S1 S3 is still 0 S1 S3 Logic Value Falling Edge Rising Edge Sensor input port S1 or S3 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 set or clear the CHS bit of the master configuration register i e if S3 is the analog input port make MCFG lt CHS gt 1 else if the S1 is the analog input port make MCFG lt CHS gt 0 Page 51 M24220101008EN UI Robot Technology Co LTD UIM24204 24208 Once configured the analog voltage on port S1 or S3 can be immediately obtained through instruction sFBK In order to use the s
18. 24220101008EN UI Robot Technology Co LTD UIM24204 24208 8 10 Examples of Sensor Input Control 8 10 1 Writing the S12CON Before writing to the 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 Then user can use the instruction SCFG to realize the configuration An example is provided below Example 8 10 1 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 Otherwise a 5V presents Requirements As soon as one sensor S2 is hit the stepper motor starts to run reversely DIR 0 until the table hits the other sensor 1 As soon as 1 is hit the stepper motor starts to run positively DIR 1 until the table hits the S2 Keep the reciprocating motion without the user control device Realization We are not interested in the rising edge therefore S2RD 0 and S2RACT lt 2 0 gt 000 It is required DIR 0 on S2 failing edge therefore set S2FD 0 and S2FACT lt 2 0 gt 010 Action Run Same reason as 1 set S1RD 0 and S1RACT lt 2 0 gt 000 It is required DIR 1 on 1 failing edge therefore set S1FD 1 and S1FACT lt 2 0 gt 010 Action Run Fill the S12CON with above bits get S12CON 0000 0010 0000 1010 binary Affix the suffix code 0000 to S12CON get 0000 0010 0000 1010 0000 Convert above value to
19. 2XX Integrated Miniature Stepper Controller 4 Current speed is represented through SPD2 SPD1 SPDO using following structure Bit shifting operation can be used to convert these three bytes into a 16bits data Figure 6 4 Convert ACK message SPD2 SPD0 into a 16bits Data 16bits SPD data XXXX XXXX XXXX XXXX 7bits ACK Message 0 0 o0 o0 o x x o x x x x x x o x x x x x x Bit gt i7 e s5 4 3 2 r1 7fe sia 3 2ii 7 e s 4 3 2q2 SPD2 SPD1 SPDO 5 Current displacement is represented through STP4 STP3 STP2 STP1 STPO suing following structure Bit shifting operation can be used to convert these three bytes into a 32bits data Figure 6 5 Convert ACK message STP4 STP0 into a 32bits Data 32bits STP data XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXXX 7bits ACK Message gt o o o o x x x x o x x x x x x x lo x x x x x x x o x x x x x x x o x x x x x x x Bit gt LZle s 4 3 2 1 o 7fe s 4 3l2 ajo 7jels af3t2 zfo 7fe si4 3 2tafo z7fe s 4 3 2 1fol 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 are free for downloading User can go to www uirobot com to download free copies Page 33 M24220101008EN UI Robot Technology Co LTD UIM24204 24208 ADVANCED MOTION CONTROL 7 0 ADVANCED MOTION CONTROL UIM242XX has an optional sold separately module to perform the advanced motion control includ
20. 32 converter i e UIM2501 user device can command multiple UIM242 controllers through RS232 using ASCII coded instructions The UIM2501 translates the instructions from RS232 to CAN2 0B and sends the instructions to the target controller according to the controller ID that specified by the user device 1 1 2 Basic Motion Control User device can control following basic motions parameters through instructions in real time direction speed angular displacement phase current micro stepping and enable disable the H bridge etc Speed input range is 0 65 000 pulses sec and angular displacement input range is 0 2 000 000 000 pulses 1 1 3 Absolute Position Counter UIM242XX has a hardware pulse counter Output of the counter is signed The counter can be reset either by user instruction or automatically 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 can be automatically generated message feedback to the user device given the corresponding configuration through user instruction 1 1 4 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 Mes
21. 4 output P4LVL Otherwise P4 output P4LVL Bit 7 0 S3RF S3RACT lt 2 0 gt S3FF SS3FACT lt 2 0 gt S3 Input Control Please refer to section 8 5 2 for more information Page 63 M24220101008EN UI Robot Technology Co LTD UIM24204 24208 9 3 Output Control Register Writing Instruction SCFG Instruction SCFG Function Syntax ACK Comment Write the S12CON S34CON ATCONH and ATCONL SCFG x Variable Integer x 0 1 1048575 20bits OxAA Controller ID OxCO 0x0 0x0 S2 S1 SO AL1 ALO AH1 AHO OxFF 0xCO is the Message ID of SCFG S2 SO represent the value of S12CON AL1 ALO represent the value of the lower limit of analog input AH1 AHO represent the value of the upper limit of the analog input Writing to the S12CON and ATCON is realized through instruction SCFG 12CON and ATCON are 16bits registers in the controller But when using the SCFG user has to affix a 4bits suffix code to point the desired register to be written The suffix code for S12CON is 0000 The suffix code for S34CON is 0001 The suffix code for ATCONL is 0010 binary The suffix code for ATCONH is 0011 binary binary binary 9 4 TTL Output Direct Write Instruction DOUT Instruction DOUT Function Syntax ACK Comment Direct write to the TTL output DOUT x Variable Integer x 0 1 OxAA Controller ID 0xC1 P4 OxFF 0xC1 is the message ID of DOUT P4 is the logic level of the TTL output P4 1 means the output
22. 69 Here 32769 1000 0000 0000 0001 binary i e ANE 1 CHS 0 S1IE 1 no advanced motion control user can enable it yourself It is required DIR 1 on 1 falling edge when analog input lt 0 6V therefore S1FD 1 and S1FACT lt 2 0 gt 010 Action Run It is required DIR 0 on S1 rising edge when analog input gt 4V therefore S1RD 0 and S1FACT lt 2 0 gt 010 Action Run Fill the S12CON with above bits get S12CON 0000 0000 0010 1010 binary Affix the suffix code 0000 to S12CON get 0000 0000 0010 1010 0000 Convert above value to decimal 0000 0000 0010 1010 0000 672 Send instruction SCFG 672 Calculate the upper limit 4V 5V 4095 3276 0000 1100 1100 1100 Affix the suffix code 0011 get 0000 1100 1100 1100 0011 Convert above value to decimal 0000 1100 1100 1100 0011 52419 Send instruction SCFG 52419 Calculate the lower limit 0 6V 5V 4095 491 value is rounded Affix the suffix code 0010 convert to decimal then send instruction SCFG 7858 Set up desired speed by sending instruction SPD 5000 Burn parameters into EEPROM by sending STORE Initiate the motion by sending ENABLE The system starts to work continuously Disconnect the user device and restart the UIM241XX controller the system will automatically run Page 61 M24220101008EN UI Robot Technology Co LTD UIM24204 24208 TTL OUTPUT CONTROL 9 0 TTLOUTPUT CONTROL UIM242XX controller has an opti
23. Cessation Speed mMDS is the abbreviation of motion Maximum Deceleration Speed The reason not using mMCS is the possible confusing with the micro stepping instruction MCS Unit pps pulse second 7 16 Check the Current Maximum Cessation Speed Instruction mMDS Function Check the Maximum Cessation Speed Syntax mMDS Variable N A OxAA Controller ID 0xB4 MD2 MD1 MDO OxFF ACK OXB4 is the Message ID of mMDS MD2 MDO represents the value of the Maximum Cessation Speed mMDS is the abbreviation of motion Maximum Deceleration Speed Comment The reason not using mMCS is the possible confusing with the micro stepping instruction MCS Unit pps pulse second Page 49 M24220101008EN UI Robot Technology Co LTD UIM24204 24208 SENSOR INPUT CONTROL 8 0 SENSOR INPUT CONTROL UIM242XX Motion Controller has an optional sold separately sensor input control module which supports three sensor input ports S1 S2 and S3 All sensor input ports accept digital TTL input from OV 5V Furthermore port S1 or 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 with a 5V reference voltage If the input voltage is O 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 digital or analog input the
24. FG Function Syntax ACK Comment Check the current value of S12CON S384CON ATCONH and ATCONL SCFG Variable N A OxAA Controller ID OxCO 0x0 0x0 S2 S1 SO AL1 ALO AH1 AHO OxFF 0xC0 is the Message ID of SCFG S2 SO represent the value of S12CON AL1 ALO represent the value of the lower limit of analog input AH1 AHO represent the value of the upper limit of the analog input UI Robot Technology Co LTD M24220101008EN Page 58 UIM242XX Integrated Miniature Stepper Controller 8 9 EEPROM Store Instruction STORE The instruction STORE is used to burn the values of Sensor Control Configuration Analog Thresholds desired speed and desired displacement into the EEPROM STORE instruction will affect real time performance The process will take around 20 milliseconds Instruction STORE Function Burn MCFG sensor CFG Motion Parameters into EEPROM Syntax STORE Variable N A OxAA Controller ID 0xD1 OxFF ACK 0xD1 is the Message ID of STORE STORE instruction is used to burn Sensor Configuration Analog Thresholds desired speed desired displacement acceleration deceleration rate etc into EEPROM Comment STORE instruction will affect real time performance It takes around 20 ms for the instruction to be executed Therefore it is suggested that user issues this instruction when the motor is not working and wait 20ms after this instruction is issued before send other instructions Page 59 M
25. Falling edge of sensor 3 OxA4 Voltage on S3 port High gt gt gt Low 6 Rising edge of sensor 3 OxA5 Voltage on S3 port Low gt gt gt High 7 TTL output P4 low OxA6 Voltage on P4 port High gt gt gt Low 8 TTL output P4 high OxA7 Voltage on P4 port Low gt gt gt High 9 Exceed upper limits 0xA1 0xA5 Analog input gt user preset upper limit 10 Below lower limit OxA0 0xA4 Analog input lt user preset lower limit 11 Displacement control OxA8 Displacement control is fulfilled and the complete desired position is reached 12 Zero Poston e eed Note When S1 is configured as analog OxA1 denotes event 9 otherwise 0xA1 denotes event 2 When S3 is configured as analog OxA5 denotes event 9 otherwise 0xA5 denotes event 6 kk When S1 is configured as analog OxA0O denotes event 9 otherwise OxA0 denotes event 1 When S3 is configured as analog 0OxA4 denotes event 9 otherwise 0xA4 denotes event 5 UI Robot Technology Co LTD M24220101008EN Page 16 UIM242xXX Integrated Miniature Stepper Controller 3 1 Enable Disable RTCN Every RTCN can be enabled or disabled by 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 PAIE bit MCFG lt 3 gt S3IE bit MCFG 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 even
26. Position If the user input speed is too large UIM242XX will perform deceleration control before the motor speed reaching the user desired speed in order to guarantee that when desired displacement is reached the speed is right zero The process is shown in figure 7 10 Figure 7 10 S curve Relative Displacement Control case 2 Desired Speed Uniform Acceleration ee Uniform Deceleration UIM242xXxXs also support nonlinear acceleration deceleration based relative displacement UI Robot Technology Co LTD M24220101008EN Page 40 UIM242xXX Integrated Miniature Stepper Controller control although that is not the exact S curve displacement control Nonlinear acceleration deceleration based displacement control process is shown in figure 7 11 Please note that the nonlinear based displacement control described above may not suitable for applications requiring motion smoothness since there are knee points on the trajectory Figure 7 11 S curve Relative Displacement Control Uniform Acceleration Desired Speed Uniform Deceleration Max Start Speed Max Cessation Speed Angular Displacement Stop Position Start Position 7 6 Automatic Direction Control 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
27. R o offine OR 0 full step 15 1 16 step Bit 7 6 5 4 3 2 1 0 3 CUR desired phase current structure N A Value Read 0 Phase Current lt 6 0 gt e g 27 2 7 Amp Bit 7 6 5 4 3 2 1 0 UI Robot Technology Co LTD M24220101008EN Page 30 UIM242XX Integrated Miniature Stepper Controller 4 Desired speed is represented through SPD2 SPD1 SPDO using following structure Bit shifting operation can be used to convert these three bytes into a 16bits data Figure 6 2 Convert ACK message SPD2 SPD0 into a 16bits Data 16bits SPD data XXXX XXXX XXXX XXXX 7bits ACK Message 0 0 o0 o0 o x x o x x x x x x o x x x x x x Bt gt 7 s s 4 s 2 1 lz7ls sl 4lsl 7ls sl4 ls 2 1 SPD2 SPD1 SPDO 5 Desired displacement is represented through STP4 STP3 STP2 STP1 STPO suing following structure Bit shifting operation can be used to convert these three bytes into a 32bits data Figure 6 3 Convert ACK message STP4 STP0 into a 32bits Data 32bits STP data XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXXX 7bits ACK Message gt o o o o x x x x o x x x x x x x lo x x x x x x x o x x x x x x x o x x x x x x x Bit gt LZle s 4 3 2 1 o 7fe s 4 3l2 ajo 7jels af3t2 zfo 7fe si4 3 2tafo z7fe s 4 3 2 1fol 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 are free for downloading User can go to ww
28. SSignMent leet AEN degen 21 6 0 Basic Control Instructions i e tiie dis eege emacs 22 6 1 H Bridge Enable Instruction ENABLE ceccceceeceeeeeeeeeeeeeeeeeceaeeecaaeeceeeeseaeeesaeeeeeeeeaas 23 6 2 H Bridge Disable Instruction OFFLINE eccccccccceeseeceeeeeeeeeeeceaeeeseaeeeceeeeseaeeeseaeeeeeeeeas 23 6 3 Motor Current Adjusting Instruction CUR o eeccceccceceeeceeeeeeeeeeeceeeeseeseneeeesaeeeseaeeneneeeeas 24 6 4 Automatic Current Reduction Instruction ACR oo eccccccccsseeeeseseeeeeecsneeeesseeeeeesssneeeeeeaas 24 6 5 Micro Stepping Setup Instruction MCS oo cecccccccccsseceeeeseeeeeeseneeeeecseeesseeseeeeeeseeseseaas 25 6 6 Motion Direction Instruction DIR ccccccceseccecsesseeessseeeeeesseeeeseeaeeesseseeesessieeesssseeseseaas 25 6 7 Speed Adjusting Instruction SPD o eccececesceceeeeeeeeeeeeeeeseeeeecaaeeeeeeeseeeeeseaeeeseaeeseneeeeas 26 6 8 Displacement Control Instruction STP ccccccccccsseceeessseeeessseeeeeeeseeeesessieeeesssieeeeseaas 27 6 9 Absolute Position Inquiry Instruction DOS 28 6 10 Absolute Position Counter Reset Instruction ORG ooo eeecececceeeeeesteeeeessneeesesseeeeeseeas 29 6 11 Basic Instruction ACK ee ee 30 6 12 Motor Status Feedback Inquiry Instruction FBK o eececssceeesceceeeeeeeeeeeeeeeseneeeseeeeseneeeas 32 6 13 Motor Status Feedback Message ececceceeeeeeeeeeeeeeeeeeneeeeeeeaaeeeeeeaeeeeeeaeeeeeeeneeeeeeteeeeneaas 32 7 0 Advanced Motion Control eugenseebeee
29. TCN Ignore MCFG lt S1IE gt 001 No action RTCN depends on MCFG lt S1IE gt 010 Run is bonded RTCN depends on MCFG lt S1IE gt 011 Deceleration Stop RTCN depends on MCFG lt S1IE gt 100 Sudden Stop RTCN depends on MCFG lt S1IE gt 101 Relative Displacement RTCN depends on MCFG lt S1IE gt 110 Reset Absolute Position Counter RTCN depends on MCFG lt S1IE gt Page 55 M24220101008EN UI Robot Technology Co LTD UIM24204 24208 8 5 2 S34CON Structure Upper Byte Name P4LVL P4EVENT Bit 15 14 12 11 10 9 8 Lower Byte Name S3RD S3RACT S3FD S3FACT Bit 7 6 5 4 3 2 1 0 Bit 15 12 Unimplemented Read as 0 Bit 11 8 P4LVL P4EVENT lt 2 0 gt P4 TTL output control Refer to section 9 2 for details Bit 7 S3RD S3 Rising edge Motion Direction 0 for actions that require a specific direction e g Run DIR 0 1 Tor actions that require a specific direction e g Run DIR 1 Bit 6 4 S3RACT lt 2 0 gt Action code for S3 Rising edge event 000 No action No RTCN Ignore MCFG lt S3IE gt 001 No action RTCN depends on MCFG lt S3IE gt 010 Run RTCN depends on MCFG lt S3IE gt 011 Deceleration Stop RTCN depends on MCFG lt S3lE gt 100 Sudden Stop RTCN depends on MCFG lt S3IE gt 101 Relative Displacement RTCN depends on MCFG lt S3lE gt 110 Reset Absolute Position Counter RTCN depends on MCFG lt S3IE gt Bit 3 S3FD S3 Falling edge Motion Direction
30. UIM24204 24208 OVERVIEW 1 0 OVERVIEW UIM24204 and UIM24208 are integrated stepper motor controllers with CAN2 0B Active bus communication capability They can work in a network as well as standalone CAN2 0B bus based communication features high speed 1Mega bps long distance max 10 000 m and high noise immunity It is widely used in automobile automated manufacturing transportation management where high reliability is critical The physical wiring of a CAN bus network requires only one pair of wires twisted UIM242XX controllers basic architecture includes communication system basic motion control system and absolute position counter and real time event based change notification system UIM242XX s advanced add on modules include advanced motion control module and sensor input control module can automatically process sensor events locally and TTL output control module With UIM242 s Advanced Motion Control selected NEMA 17 23 motors can ramp up to 6600 RPM in 0 5 seconds and 4000 RPM in 0 25 seconds There are videos about these modules available for downloading Interested user can go to www uirobot com to download Embedded 64 bit calculation precision DSP controller guarantees the real time processing of the motion control and change notifications similar to interrupters of CPU The control process loop time is 1 millisecond By linking several controllers together through the CAN bus user can control multiple motors
31. UWIROBOT United Intelligence Robot Technology User Manual UIM242XX series CAN2 0B Interface Integrated Miniature Stepper Motor Motion Controller UIM24204 24208 Please pay attention to the following before using the UIROBOT products e UIROBOT products meet the specification contained in their particular Data Sheet e UIROBOT will only work with the customer who respects the Intellectual Property IP protection 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 indemnify and hold harmless UIROBOT from any and all damages claims suits or expenses result
32. aaes 20 mA Ambient temperature under bas Storage Temperature tNOTICE Stresses above those listed under Absolute Maximum Ratings may cause permanent damage to the device This is a stress rating only and functional operation of the device at those or any other conditions above those indicated in the operation listings of this specification is not implied Exposure to maximum rating conditions for extended periods may affect device reliability Electrical Characteristics Ambient Temperature 25 C Supply Power Voltage 12V 40VDC Motor Output Current Max 2A 4A 8A per phase Adjustable through instruction Driving Mode Stepping Resolution PWM constant current full step half step quarter step and sixteenth step Insulation Resistance gt 100MQ Dielectric Strength 0 5KV in one minute Communication Ambient Temperature 25 C Protocol Active CAN 2 0B Wiring method 2 wire CANH CANL CAN bus drive e Supports 1 Mb s operation e ISO 11898 standard physical layer requirements e Suitable for 12V and 24V systems e Up to 100 nodes can be connected Environment Requirements Cooling Free Air Environment Avoid dust oil mist and corrosive gases Temperature 20 C 85 C Working Humidity lt 80 RH no condensation no frosting Vibration 3G Max Storage Temperature 50 C 150 C Size and Weight
33. arting Speed the UIM242XX will use the Uniform Acceleration Control Algorithm to control the speed Figure 7 5 Nonlinear Acceleration Control case 3 Speed Uniform Acceleration Desired Speed Current Speed Maximum Starting Speed Page 37 M24220101008EN UI Robot Technology Co LTD UIM24204 24208 7 4 Nonlinear Deceleration Similar to the nonlinear acceleration control there are three cases and corresponding control algorithms as listed below 1 If the desired speed is high than a certain user preset value i e the Maximum Cessation Speed then the UIM242XX will use the Uniform Deceleration Control algorithm Figure 7 6 Nonlinear Deceleration Control case 1 Uniform Deceleration Current Speed Desired Speed Maximum Cessation Speed 2 If desired speed is less 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 a step deceleration to the desired speed Figure 7 7 Nonlinear Deceleration Control case 2 Speed Current Speed Uniform Deceleration Step Deceleration Maximum Cessation Speed Desired Speed UI Robot Technology Co LTD M24220101008EN Page 38 UIM242xXX Integrated Miniature Stepper Controller 3 Ifthe 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 th
34. beeeeheeeeCe EEN ege 34 GA Uniform Acceleration erien ee ne tenia a nave ait 35 ZG Uniform Deceleration i i0 2c dc EENS vel ado nation tn eigene EE 35 7 3 Nonlinear Acceleration e a r aaa ea a cesses p Aa EAA AEEA E AEA ERKA Taa EE 36 ZA Nonlinear Deceleration ceccccecccceceeeeeceneeeceeeeeeeeeecaeaeeeeeeesesenaeaeeeeeeesescnnaeeeeeeseeeeessaeess 38 UI Robot Technology Co LTD M24220101008EN Page 8 UIM242xXX Integrated Miniature Stepper Controller 7 5 S curve Relative Displacement Control 40 7 6 gt Automatic Direction ele Lt te EE 41 7 7 Advanced Motion Control Instructions sessesessesseesrrnnseesteretrrrntnssttetrrnnennsttnnntnnnenenen nenna 42 7 8 Enable disable Advanced Motion Control Module MCFG o ccccccecsseeeeesstteeeessteeeeeenes 43 7 9 Acceleration Rate Setup Instruction m 44 7 10 Check the Current Acceleration Rate ccccccceeeeeeecneceeeeeeesecencaeeeeeeeseesecencaeeeeeeesetensaeas 45 7 11 Deceleration Rate Setup Instruction MDEC ccccccccecseceeeessneeeeecsneeeeesseeeeesssueeeesenaes 46 7 12 Check the Current Deceleration Rate nnsenensnessesrtrnstesttttnrtnntterttntrtnnnnesttnnntnnnaeeennnn nnn 47 7 13 Maximum Starting Speed Setup Instruction MMSS ooo eceeceecsteeeessteeeeessteeeeeeeaes 48 7 14 Check the Current Maximum Starting Speed 000 0 eee ee ceeeeeeeeneeeeeeeneeeeeeeaeeeeeeaeeeeneaes 48 7 15 Maximum Cessation Speed Setup Instru
35. ction MMDS c cccccecceecseeeeeessteeeeessteeeeeeeaes 49 7 16 Check the Current Maximum Cessation Gpeed nenna 49 8 0 Sensor Input Gone Wisse cs acest aes eh es e 50 821 Rising and Falling Edge EE 51 8 2 Analog Input and Thresholds TEE 51 8 3 Sensor Event Action and Binding s siirsi aana aaiae 52 8 4 Introduction to Sensor Control Instruchons rn 53 8 5 Sensor Input Control Register S12CON G3ACON 53 8 6 Analog Threshold Control Register ATCONH ATCONL ceceeeceeeeeeteeeeeeneeeeeeeneeeeneaas 57 8 7 Sensor Registers Writing Instruction CEO 58 8 8 Check S12CON S34CON ATCONH and ATCONL 58 8 9 EEPROM Store Instruction STORE c ccccccccssccececseeeeeessneeeessseeeeessseeeessseeeesesieeseeeaes 59 8 10 Examples of Sensor Input Control 60 9 0 WAP Ot Pe COM EE 62 9 1 Introduction to Sensor Control Instruchons rn 62 9 2 TTL Output Control Register SS4CON oo cee ee eenee rere tenets ee eaeeeeeeneeeeetaeeeeeeeaeeeeeeaes 63 9 3 Output Control Register Writing Instruction CEO 64 9 4 TTL Output Direct Write Instruction DOUT 64 9 5 Check 1 TL Outputheveliin se niecaestessaceees dette eared ee VER telat a Tael e aa essed aes 65 9 6 Examples of TTL Output Control 66 Appendix A Dimensions ssssssuuuunnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn nnnm nnna 67 Appendix B Installation swcvsivesiisccecnvcavavercarcnst aacestareiscest acter anne 68 Page 9 M24220101008EN UI Robot Technology Co LTD
36. d relative pulse counter will check the actual pulses sent The actual angular displacement is also depends on the micro stepping resolution If an instruction of STP 0 is received before the previous STP instruction is Comment fulfilled the motor will stop running i e SPD is reset to 0 and previous STP instruction is considered fulfilled If the STP instruction is received when the motor is already running the steps that the motor will run are counted when the STP instruction is executed Example 6 8 1 For a 1 8 stepper motor if STP 200 User sent STP 200 If MCS 1 motor rotation angle 1 8 200 360 If MCS 16 motor rotation angle 1 8 200 16 22 5 Page 27 M24220101008EN UI Robot Technology Co LTD UIM24204 24208 6 9 Absolute Position Inquiry Instruction POS Instruction POS Check the hardware based absolute position counter absolute position of the Function motor Syntax POS Variable N A 0xCC Controller ID 0xB0 P4 P3 P2 P1 PO OxFF Feedback 0xB0 is the Message ID of POS Note when the message header is OxAA 0xBO Message is the Message ID of MCFG Refer to section 4 3 for details P4 PO are message data can be converted to a 32bits data P4 PO represent the value of hardware absolute position counter It provides a measurement of the absolute position of motor The hardware absolute position counter only resets back to zero under three situations as liste
37. d below 1 Right after the system powers up 2 User issues the instruction ORG see the next section 3 User pre configured sensor event based action to ORG and that event happens Comment pp The hardware absolute position counter records the total pulses sent to motor When the direction is positive DIR 1 the counter increases by 1 when the direction is negative DIR 0 the counter decreases by 1 Therefore the value of the counter is a signed 32bits integer with positive representing the final position is of the same direction of DIR 1 vise versa Please note that the actual motor angular displacement also depends on the micro stepping resolution as shown in example 6 8 1 Figure 6 1 Conversion from P4 P0 to 32bits POS value POS data binary XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXXX 4 bits 7bits message UI Robot Technology Co LTD M24220101008EN Page 28 UIM242XX Integrated Miniature Stepper Controller 6 10 Absolute Position Counter Reset Instruction ORG Instruction ORG Reset the hardware based absolute position counter absolute position of the Function Se motor to zero to create an origin point Syntax ORG Variable N A OxCC Controller ID 0xBO 0x0 0x0 0x0 0x0 0x0 OxFF Feedback 0 xBO0 is the Message ID of POS Note when the message header is 0xAA 0xBO Message _ is the Message ID of MCFG Refer to section 4 3 for details P4 PO are message data Here they are all zeros Comment ORG
38. decimal 0000 0010 0000 1010 0000 binary 8352 Send instruction SCFG 8352 Set up desired speed by sending instruction SPD 5000 Burn parameters into EEPROM by sending STORE Press any one limit sensor the mobile platform will work lf user enables the RTAFs the user device will get feedback every time the S1 or S2 is hit Disconnect the user device and restart the UIM241XX controller the system will automatically run UI Robot Technology Co LTD M24220101008EN Page 60 UIM242xXX Integrated Miniature Stepper Controller 8 10 2 Writing the ATCONH ATCONL Similar to S12CON 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 Example 8 10 2 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 positively DIR 1 until the potentiometer outputs arrives 4V 2 As soon as the sensor output is higher than 4V the stepper motor starts to run reversely DIR 0 until the potentiometer outputs reaches 0 6V 3 Keep the reciprocating motion without the user control device Realization 1 Set MCFG lt ANE gt 1 MCFG lt CHS gt 0 by sending MCFG 327
39. e desired speed immediately Figure 7 8 Nonlinear Deceleration Control case 3 Step Deceleration Maximum Cessation Speed Current Speed Desired Speed Note Setting the Maximum Starting Speed or the Maximum Cessation Speed to 0 zero will force the controller use Uniform Acceleration Deceleration Control Algorithm Page 39 M24220101008EN UI Robot Technology Co LTD UIM24204 24208 7 5 S curve Relative Displacement Control S curve relative displacement control essentially is the relative displacement control under the uniform acceleration 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 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 50 micro seconds 50 x 10 second with 64bit accuracy Figure 7 9 S curve Relative Displacement Control case 1 Speed Desired Speed Uniform Acceleration h yer Deceleration Time Angular Displacement Stop Position b Trajectory Start
40. e the analog input port S1 and S3 are digital 1 Enable the analog input Bit 14 CHS Analog Input Channel 0 Analog input on port S1 1 Analog input on port S3 Bit 13 11 Unimplemented Read as 0 UI Robot Technology Co LTD M24220101008EN Page 18 UIM242xXX Integrated Miniature Stepper Controller Bit 10 CM Motion Control Mode 0 Disable advanced motion control module use basic control mode 1 Enable advanced motion control module Bit 9 AM Acceleration Mode 0 Value input The instruction value is treated as the speed increment every second Unit is pps sec or pulse square second 1 Period input The instruction value is treated as the time period to accelerate to the desired the speed Unit is millisecond Bit 8 DM Deceleration Mode 0 Value input The instruction value is treated as the speed decrement every second Unit is pps sec or pulse square second 1 Period input The instruction value is treated as the time period to decelerate to the desired the speed Unit is millisecond Bit 7 6 Unimplemented Read as 0 Bit 5 ORGIE Original Zero Position RTCN Real time Change Notification 0 Disable the Original zero position RTCN 1 Enable the Original zero position Bit 4 STPIE Displacement Control STP Completion RTCN 0 Disable the displacement control completion RTCN 1 Enable the displacement control completion RTCN Bit 3 P4IE TTL Output Status Change RTCN 0 Disable TTL output P4
41. ensor events user may need to further setup the input upper and lower thresholds 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 Sa a 1 or 3 rising edge event will be created meanwhile Sa is assigned a logic value 1 i e Sa 1 If the sensor module detects a change on Sa from higher than AL to lower than AL an Sa falling edge event will be created meanwhile Sa 0 Otherwise Sa is kept unchanged 8 3 Sensor Event Action and Binding A sensor event is defined as the sensor voltage change matches a user defined condition Binding means assigning a sensor action to a sensor event UIM242Xx controllers support 8 sensor events as listed in section 8 0 There are 5 actions that can be bound to those 8 sensor events The IDs for these 5 actions are from 2 to 6 An action ID is a number used to assign an action to a sensor event The binding between events and actions are realized through the configuration of the Sensor Control Register S12CON and or S34CON These 5 actions are described below 1 Run ID 2 Run means starting and continuously running the motor according to motion parameters e SPD ACC DEC MSS MDS etc stored in the EEPROM Motion direction is defined by the S12CON and or S34CON Before making usage of this action user has to first configure the S12CON S34CON setup the desired speed SPD and if applicable the acceleration rate maximum starti
42. ent ACR This is the instruction to activate deactivate the automatic current reduction function which will supply the working phase current to the motor when the motor is running and supply the idle phase current when the motor is stopped MCS This is the instruction to set the micro stepping SPD This is the instruction to set the desired PPS pulse per second to run the motor Note that the actual motor speed depends also on the micro stepping setup Refer to example 6 7 1 section 6 7 for details STP This is the instruction to set the desired steps pulses to move the motor Note that the actual motor angular displacement speed depends also on the micro stepping setup Refer to example 6 8 1 section 6 8 for details DIR This is the instruction to set the desired direction for the motor to move ORG This is the instruction to reset the hardware based absolute position counter FBK This is the instruction to ask the controller to send back current motor working status POS This is the instruction to ask the controller to send back the motor s absolute position UI Robot Technology Co LTD M24220101008EN Page 22 UIM242XX Integrated Miniature Stepper Controller 6 1 H Bridge Enable Instruction ENABLE Instruction ENABLE Function Enable the stepper motor driver i e H bridge driving circuit Syntax ENABLE Variable N A ACK Refer to the Basic Instruction ACK section 6 11 for details Com
43. executed immediately The motor must first be decelerated to zero speed before turned to the desired direction In addition the input values of SPD and STP are unsigned integers Therefore when user wants to input a negative value the DIR must to be used before the SPD and STP instructions Page 41 M24220101008EN UI Robot Technology Co LTD UIM24204 24208 7 7 Advanced Motion Control Instructions Once the advanced motion control module is enabled all basic control instructions are automatically turned into advanced control instructions This transition is transparent to the user Furthermore there are 5 additional instructions added These 5 instructions are listed below 1 MCFG This is the instruction to enable or disable the advanced motion control module 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 mACC This is the instruction set the acceleration rate There are two input methods to set the acceleration rate a Absolute Value method If 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 absolute 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 b Period method If the AM bit of Master Configuration Register is set to o
44. in the shortest time without sacrificing stepping accuracy user may want to utilize the nonlinear acceleration deceleration capability of the UIM242XX controller Experiments proved that only by using the nonlinear acceleration can the NEMA 17 23 reach a 6600 RPM half step speed in 0 5 seconds and a 4000 RPM quad step speed in 0 25 second UIM242XX controllers are equipped with the Nonlinear Acceleration Control function as describe below 1 If user input desired speed is higher than a certain value i e the Maximum Starting Speed defined by user through instruction and current motor speed is lower than the Max Starting Speed then the motor speed is first stepped up to the Max Starting Speed and then uniformly accelerated according to the user preset acceleration rate This process is shown in figure 7 3 Figure 7 3 Nonlinear Acceleration Control case 1 Speed Uniform Acceleration Desired Speed Step Acceleration Maximum Starting Speed Current Speed 2 If user input desired speed is less than the Max Starting Speed then the motor speed is stepped up to the desired speed immediately as shown in figure 7 4 Figure 7 4 Nonlinear Acceleration Control case 2 o Speed Step Acceleration Maximum Starting Speed Desired Speed Current Speed UI Robot Technology Co LTD M24220101008EN Page 36 UIM242xXX Integrated Miniature Stepper Controller 3 If current speed is higher than the Max St
45. ing 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 UIM24XXxX series Step Motor Controllers UIM25XX series CAN RS232 Converter and their layout designs are patent protected UIM242XX Order Information In order to serve you quicker and better when order UIM242XX series controllers please provide the product part number in the following format S 2 Sensor Inputs SP 3 Sensor Inputs 1 TTL Output Blank No Sensor I O 2 CAN2 0B Interface 04 4A Peak Phase Current Adjustable 08 8A Peak Phase Current Adjustable M Advanced Motion Blank Basic Motion Note Options in gray is not applicable Examples UIM24204 UIM24204 M UIM24204 S UIM24204 M S UIM24204 M SP UI Robot Technology Co LTD M24220101008EN Page 2 UIM242XX Integrated Miniature Stepper Controller UIM24204 UIM24208 CAN2 0B Interface Integrated Miniature Stepper Motor Motion Controller Features Miniature Integral Design Miniature size 42 3mm 42 3mm 13 5mm Fit onto motors seamlessly Embedded DSP Microprocessor Embedded 64 bit calculation precision high performance digital signal processing micro controller Absolute position counter reset by instruction or senso
46. ing uniform or non linear acceleration deceleration and S curve relative displacement control User can specify corresponding motion control parameters through instructions Instructions for the advanced motion control includes all the basic motion instructions and 5 additional instructions Once the advanced motion control module is enabled all basic control instructions are automatically turned into advanced control instructions The 5 additional instructions are listed below 1 MCFG This is the instruction to enable or disable the advanced motion control module User can clear the CM MCFG lt 10 gt bit of Master Configuration Register i e CM 0 to disable the module or set the CM bit i e CM 1 to enable the module 2 mACC This is the instruction set the acceleration rate There are two input methods to set the acceleration rate 3 mDEC Similar to mACC the deceleration also has two input methods as listed below 4 mMSS This is the instruction to set the Maximum Starting Speed 5 mMDS This is the instruction to set the Maximum Cessation Speed Not counting the communication time it takes less than 1 millisecond for the specified parameter to take effect after the instruction is received In addition values of above instructions will be automatically stored in the EEPROM for future usage and the storage will not affect any real time process Once the parameters are set the controller will perform the advanced motion
47. input voltage cannot exceed 0 3V 5 3V otherwise permanent damage may happen Besides measuring the voltage input and providing the reads to the user device when requested the sensor control module is able to carry out a certain control action when a sensor event happens Actions and sensor events can be defined by user instructions With the Sensor Control Module UIM242 can perform motion controls without the user device There are 8 sensor events can be configured for S1 S2 and S3 as listed below Table 8 1 Sensor Events No Sensor Event Description 1 1 Falling Edge 1 Voltage Level Change High gt gt gt Low 2 1 Rising Edge 1 Voltage Level Change Low gt gt gt High 3 S2 Falling Edge S2 Voltage Level Change High gt gt gt Low 4 S2 Rising Edge S2 Voltage Level Change Low gt gt gt High 5 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 Upper Limit Analog input voltage is higher than user defined upper limit 8 Exceeding Lower Limit Analog input voltage is lower than user defined lower limit There are 5 actions can be bound to sensor events 1 Start and Run using user preset motion parameters Sudden Emergent stop Decelerate until stop Reset absolute position counter SH ae Execute displacement control using user preset motion parameters UI Robot Technology Co LTD M24
48. itate above situation user can use following method to send a set of instructions Instruction 1 Instruction 2 Instruction N N lt 10 For example CUR 20 MCS 16 DIR 1 SPD 5000 ENABLE UIM242XX will only send back 1 ACK on receiving above message In above example and Y is called Macro Operator Instructions between a pair of macro operators will get no ACK message 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 UIM242XX to send back all desired parameters of the basic motion control e status of desired Enable disable Current Micro stepping Auto current reduction Direction Speed and Displacement In practice user can send the null instruction alone to check the status of above parameters In addition if there is no null instruction after the there will be no ACK message at all 2 3 Feedback Message Structure Feedback Message is the message sent to user device from UIM242XX controller The maximum length of feedback messages is 13 bytes Feedback messages from UIM242XxX follow the structure below Header Controller ID Message ID Data Terminator Header denotes the start of a feedback message There are 3 kinds of headers 1 OxAA represents the start of the ACK message which is a repeat of the received instruction 2 OxCC represents the start
49. m Factory 120 Ohm O UIM242xx E UIM242xx Controller 1 Controller 1 O UIM242xx Controller 1 iiil Motor 1 Motor 2 Motor 100 In multi node CAN applications it is important to maintain a direct point to point wiring scheme A single pair of wires should connect each element of the CAN bus and the two ends of the bus should be terminated with 1200 resistors A star configuration should never be used UIM2501 converter has a build in terminal resistor User only needs to attach a resistor at the UIM242 end of the bus To enable the UIM2501 converter s terminating resistor please refer to the UIM2501 user manual In addition any deviation from the point to point wiring scheme creates a stub The high speed edge of the CAN data on a stub can create reflections back down the bus These reflections can cause data errors by eroding the noise margin of the system Although stubs are unavoidable in a multi node system care should be taken to keep these stubs as small as possible UI Robot Technology Co LTD M24220101008EN Page 6 UIM242XX Integrated Miniature Stepper Controller Characteristics Absolute Maximum Ratings SUPPL VZV GO E 10V to 40V Voltage on 1 S2 S3 P4 with respect to AG 0 3V to 5 3V Maximum output current sunk by S1 S2 S3 P4 ee eccee eee eeeeee eee eecteeeeeeeenaeeeeeeetncaeeeeeeeenaaees 20 mA Maximum output current sourced by S1 S2 S3 P4 ee ceeeeeeeeeeneeeeeeeeeescneeeeeeeeneeeeeeeen
50. ment ENABLE instruction turns on the dual H bridge motor driving circuit 6 2 H Bridge Disable Instruction OFFLINE Instruction OFFLINE Function Disable the stepper motor driver i e H bridge driving circuit Syntax OFFLINE Variable N A ACK Refer to the Basic Instruction ACK section 6 11 for details OFFLINE instruction turns off the dual H bridge motor driving circuit Once an OFFLINE instruction is executed the motor will have no power supply Comment the power consumption is cut to minimum the logic circuit is still working User needs to use the ENABLE instruction to turn the motor driver back to working Page 23 M24220101008EN UI Robot Technology Co LTD UIM24204 24208 6 3 Motor Current Adjusting Instruction CUR Instruction CUR Function Set the value of output current Syntax CUR x Variable Integer x 0 1 80 ACK Refer to the Basic Instruction ACK section 6 11 for details UIM24204 08 is able to provide maximum 4A 8A peak phase current to the motor The actual current is commanded through this instruction It is executed in real time Comment Integers 0 80 represent 0 8 0 amps Once received the current value will be stored in the controller s EEPROM If 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 execution 6 4 Automatic Current Reduction In
51. ne 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 i e 0 001 60 seconds Figure 7 12 Two Methods to Set the of Acceleration Rate 1 Acc Period Desired Speed Max Start Speed CH 2 Acc Rate Slope Current Speed 3 mDEC Similar to mACC the deceleration also has two input methods as listed below c Absolute Value method If 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 as the absolute 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 UI Robot Technology Co LTD M24220101008EN Page 42 UIM242xXX Integrated Miniature Stepper Controller d Period method 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 mMSS This is the instruction to set the Maximum Starting Speed 5 mMDS This is the instruction to set the Maximum Cessation
52. need to check the current value of the Master Configuration Register following instruction can be used Instruction MCFG Function Check the value of the Master Configuration Register Syntax MCFG Variable OxAA Controller ID OxBO CFG2 CFG1 CFGO 0xFF ACK OxBO is the Message ID of MCFG CFG2 CFGO are message data can be converted to a 16bits data Comment UI Robot Technology Co LTD M24220101008EN Page 20 UIM242XX Integrated Miniature Stepper Controller CAN2 0 COMMUNICATION 5 0 CAN2 0 COMMUNICATION In order to communicate with the UIM242XX controller a UIM2501 CAN RS232 Converting Controller is required between the user device and the UIM242xx controller The user device sends ASCII coded instructions through RS232 port to the UIM2501 converter Inside UIM25001 the RS232 based instructions are translated into CAN messages and sent to UIM242xx controllers ACK and or feedback messages are sent back from UIM242xx controllers to the UIM2501 and then translated into RS232 messages and sent back to the user device Through this fashion 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 For detailed instructions and operations on the communication between user device and UIM2501 please refer to the UIM2501 converter s user manual 5 1 Controller ID Assignment In
53. ng speed etc After that user has to burn the SPD and S12CON S34CON into the EEPROM using the STORE instruction 2 Relative Displacement ID 5 Relative Displacement means controlling the motor to realize a given displacement steps according to motion parameters i e SPD STP ACC DEC MSS MDS etc stored in the EEPROM Motion s direction is defined by the S12CON Before making usage of this action user has to first configure the S12CON S34CON setup the desired speed SPD the desired displacement STP and if applicable the acceleration rate maximum starting speed etc After that the user has to burn the parameters into the EEPROM using the STORE instruction 3 Sudden Emergent Stop ID 4 Sudden Emergent Stop means cutting the current speed to zero to force the motor stop immediately 4 Deceleration Stop ID 3 Deceleration Stop means decelerating the motor speed until stop according to the motion parameters i e DEC MDS stored in the EEPROM To use this action the advanced motion control module must be enabled 5 Reset the Absolute Position Counter ID 6 This action reset the Absolute Position Counter to zero creates a zero position or origin Once bound it takes around 1 millisecond maximum 2ms for the action to take place after the sensor event happens UI Robot Technology Co LTD M24220101008EN Page 52 UIM242xXX Integrated Miniature Stepper Controller 8 4 Introduction to Sensor C
54. nteger x 1 2 65 000 000 OxAA Controller ID 0xB2 DCF DC4 DC3 DC2 DC1 DCO OxFF OxB2 is the Message ID of mDEC ACK DC4 DCO represents the value of the deceleration rate DCF the DM bit of the MCFG here always 0 DCF 0 means the value input will be interpreted as the absolute deceleration rate mDEC is the abbreviation of motion deceleration Comment Unit pps s pulse sec sec pulse square second 7 11 2 Period Method pre requiring MCFG lt DM gt 1 Instruction mDEC Function Set the deceleration rate Syntax mDEC x Variable Integer x 1 2 60 000 OxAA Controller ID 0xB2 DCF 0x0 0x0 DC2 DC1 DCO OxFF OxB2 is the Message ID of mDEC ACK DC4 DCO represents the value of the deceleration period DCF the DM bit of the MCFG here always 1 DCF 1 means the value input will be interpreted as the desired time for deceleration mDEC is the abbreviation of motion deceleration Comment Unit milliseconds UI Robot Technology Co LTD M24220101008EN Page 46 UIM242XX Integrated Miniature Stepper Controller 7 12 Check the Current Deceleration Rate Instruction mDEC Function Check current deceleration rate Syntax mDEC Variable N A 0xAA Controller ID 0xB2 DCF DC4 DC3 DC2 DC1 DCO OxFF OXB2 is the Message ID of mDEC DC4 DCO represents the value of the deceleration rate period ACK DCF the DM bit of the MCFG 0 or 1 This value determines the method used by the system to interpre
55. of the status feedback which is the description of the current working status UI Robot Technology Co LTD M24220101008EN Page 14 UIM242XX Integrated Miniature Stepper Controller 3 OxEE represents the start of an error message Controller ID is the identification number of current controller in a controller network Controller ID should be 5 126 Message ID denotes the property of the current message For example OxCC 0x05 OxAO OxFF where 0xA0 denotes that the current message means a falling edge happened at sensor S1 port Data has a 7bits data structure In figure 2 1and figure 2 2 examples are shown on how to convert a set of 7bits data into 16bits data and 32 bits data Obviously 16bits data takes three 7bits data and 32bits data needs five 7btis data to represent Terminator denotes the end of a feedback message UIM242XX controller utilizes OxFF as the terminator Notice there are two types of feedback has NO message ID ACK message and Motor Statue feedback controller s response to FBK instruction Other messages could have NO data such as some real time change notification messages Figure 2 1 Conversion from three 7bits message data to a 16bits data 16bits data binary X XXX XXXX XXXX XXXX bits message data _ oTo 0 0 0 X X 0 X X X X X X 0 X X X X X X Bit gt 7 6 5 4 3 2 Lee Is pa 3 2 eS LS 4 8 2 1 Message Byte2 Message Byte1 Message Byte0 Figure 2 2 Conversion from fi
56. onal TTL Output Control Module sold separately that supports 1 channel of TTL voltage 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 The output voltage level can be controlled by 1 User instruction or 2 One of the following events a Run Stop status If this event is linked to the TTL output the output voltage level is determined by whether the speed is zero or non zero b Direction change If this event is linked to the TTL output the output voltage level is determined by whether the actual motion direction is zero or non zero c Origin point hit If this event is linked to the TTL output the output voltage level is determined by whether the absolute position is zero or just passed the zero point 9 1 Introduction to Sensor Control Instructions There are 3 instructions related to the TTL output control 1 MCFG 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 4 1 2 SCFG The instruction SCFG is used to configure the register S34CON 3 DOUT This instruction is used to directly control the TTL output voltage level as well as check current voltage level UI Robot Technology Co LTD M24220101008EN Page 62 UIM242xXX Integrated Miniature Stepper Controller
57. ontrol Instructions There are 3 instructions related to the sensor input control 1 MCFG 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 S2IE bit MCFG lt 1 gt enable disable the sensor real time change notification RTCN For details please refer to section 4 1 2 SCFG The instruction SCFG can be used to configure following four sensor input control registers a Sensor input control register S12CON S34CON b Analog threshold control register ATCONH ATCONL 3 SFBK Under any scenario using the instruction sFBK can always read back the logic value of 1 S2 S3 as well as the analog measurement given MCFG lt ANE gt 1 8 5 Sensor Input Control Register S12CON S34CON S12CON defines the binding relationship between S1 and S3 sensor events and actions as well as the activation of corresponding RTCNs It is a 16bits register inside the controller and can be configured using the instruction SCFG When writing to it user needs to affix a Abits suffix code to point to this register The suffix code for S12CON is 0000 binary S34CON defines the binding relationship between S3 sensor events and actions as well as the enable disable status of RTCN It is a 16bits register inside the controller and can be configured using the instruction SCFG When writing to it user needs to affix a 4bits suffix
58. order to properly communicating every UIM242XX controller needs to have a unique identification code ID or address even operates in standalone mode Figure 0 2 Before leave the factory all UIM242xx controllers have been assigned a default ID of 5 User can change the ID using SETADR instruction Before assign an ID to a UIM242xx controller please connect the UIM2501 controller and the UIM242XX controller using the standalone operation scheme That is only one UIM242xx is connected to the UIM2501 controller motor is not needed at this time For detailed process and instructions involved please refer to the UIM2501 user manual Please Note If in a network there are two or more UIM242 controllers with the same ID the network may not work properly If two or more UIM242 controllers are connected to a UIM2501 during ID assignment process the process will fail Page 21 M24220101008EN UI Robot Technology Co LTD UIM24204 24208 BASIC CONTROL INSTRUCTIONS 6 0 BASIC CONTROL INSTRUCTIONS UIM242XX controllers support following basic functions and instructions These basic instructions are also valid for advanced motion control given the advanced motion control module is installed and enabled 1 10 11 ENABLE This is the instruction to enable the motor driving H bridge OFFLINE This is the instruction to disable the motor driving H bridge CUR This is the instruction to set the motor working phase curr
59. r input Advanced motion control module from 0 to 4000 RPM in 0 25s and from 0 to 6600 RPM in 0 5s for NEMA17 23 3 digital inputs 1 can be configured to analog input 12bit 1 TTL output controlled by 3 events or instruction Die cast aluminum enclosure improving heat transfer and durability Motor Drive Characteristics Wide supply voltage range 12 40VDC Output current 4 8A instruction adjustable Full to 16th micro step resolution Dual full H bridge with PWM constant current control Accurate micro stepping and current f control 6600 RPM max speed for NEMA 12 real time event based change 17 motor half step and 4000 RPM for notifications similar to interrupters NEMA 17 23 motor quad step 5 programmable actions triggered by 8 S Z a sensor events CAN2 0B Active Communication i N ks Ce Simple intuitive rich instructions 2 wire interface User friendly interface Max 1M bps operation long distance Differential bus high noise immunity Max 100 nodes Description UIM24204 and UIM24208 are miniature stepper motor controllers with CAN network capability Through a CAN RS232 converter UIM2501 user device can command multiple UIM242 controllers through RS232 using ASCII coded instructions Instructions are simple intuitive and fault tolerating User is not required to have knowledge on stepper motor driving and CAN network UIM242 controller s
60. r x 0 1 ACK Refer to the Basic Instruction ACK section 6 11 for details DIR 0 or DIR 1 only denotes two opposite turning direction Comment Actual motor turning direction also depends on the physical wiring situation For example swapping the wiring between A and A or B and B can lead to an opposite turning direction Page 25 M24220101008EN UI Robot Technology Co LTD UIM24204 24208 6 7 Speed Adjusting Instruction SPD Instruction SPD Function Set the desired speed Syntax SPD x Variable Integer x 0 1 2 65000 ACK Refer to the Basic Instruction ACK section 6 11 for details Speed is defined as how many steps per second PPS Pulses per Second or Hz x 0 1 65000 represents 0 1 65000 pulses sec sent Comment Example 6 7 1 For a 1 8 stepper motor if the SPD 100 User sent SPD 100 If MCS 1 motor speed 1 8 100 180 Ysec 30 rpm If MCS 16 motor speed 1 8 100 16 11 257 s 1 875rpm UI Robot Technology Co LTD M24220101008EN Page 26 UIM242XX Integrated Miniature Stepper Controller 6 8 Displacement Control Instruction STP Instruction STP Function Set the desired steps or micro steps if MCS 1 beyond current position Syntax STP x Variable Integer x 0 1 2 000 000 000 ACK Refer to the Basic Instruction ACK section 6 11 for details x is the number of the total pulses will be sent to the motor A hardware base
61. sabled enabled by user instruction 1 3 Sensor Input Control Module UIM242XX s Sensor Input Control Module supports 3 channels of TTL input or 1 channel digital and 1 channel analog input User instruction can configure the input type On board Analog to Digital ADC converter is of 12bits accuracy 50K Hz sampling rate The analog input is further averaged over 16 samples before output top user The update rate is 1K Hz For digital inputs user can configure the desired action and REMF when each sensor s status sensor events changes There are 5 actions that can be bound to 8 sensor events 1 Start running according the user preset speed and acceleration deceleration rate Direction is determined by the sensor voltage level Sudden stop Decelerate to stop Reset absolute position counter ON ore e Ee Processing displacement control using the motion parameters preset by the user e g SPD STP acceleration deceleration maximum start speed maximum diminish speed etc 1 4 TTL Output Control Module UIM242XX 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 prevent overheating the controller The output level can be controlled by 1 User instruction 2 One of the following events a Run Stop status b Direction change c Origin point hit
62. sage transfer time depends on the baud rate of the RS232 setup of the UIM2501 The transfer time will be less than 0 5 milliseconds if the baud rate is set to 115200 UIM242XX s RTCN system supports 12 events displacement control done absolution zero position sensor 1 2 3 rising edge falling edge analog input beyond upper threshold analog input lower than lower threshold and TTL status etc All RTCNs can be enabled or disabled by instructions 1 2 Advanced Motion Control Module Advanced motion control module is capable to perform following functions without the help of user device Uniform Acceleration Deceleration Nonlinear Acceleration Deceleration S curve Displacement Control and Auto Direction Control UIM242XX provides 2 methods to define acceleration deceleration rate 1 Absolute Value Input range 1 65 000 000 PPS Sec pulse sec 2 Period i e expect period for the acceleration deceleration to finish Input range 1 60 000 milliseconds The input range of the displacement control is 0 2 billion pulses steps with the user defined direction Under advanced control the actual direction is controlled by the module itself Once the displacement control is done there could be a RTCN depending on the Page 11 M24220101008EN UI Robot Technology Co LTD UIM24204 24208 user configuration The time from it s done to the RTCN being sent is less than 1 ms Advanced motion control module can be di
63. status change RTCN 1 Enable TTL output P4 status change RTCN Bit 2 S3IE S3 Status Change RTCN 0 Disable sensor port 3 S3 status change RTCN 1 Enable S3 status change RTCN Bit 1 S2IE S2 Status Change RTCN 0 Disable sensor port 2 S2 status change RTCN 1 Enable S2 status change RTCN Bit 0 S1IE S1 Status Change RTCN 0 Disable sensor port 1 S1 status change RTCN 1 Enable S1 status change RTCN Page 19 M24220101008EN UI Robot Technology Co LTD UIM24204 24208 4 2 Master Configuration Register Instruction MCFG Master Configuration Register can be written using following instruction Instruction MCFG Function Setup the value of the Master Configuration Register Syntax MCFG x Variable Integer x 0 1 65535 OxAA Controller ID OxBO CFG2 CFG1 CFGO 0xFF ACK OxBO is the Message ID of MCFG CFG2 CFGO are message data can be converted to a 16bits data When setup user first fill each bit of the master configuration register with desired number O or 1 Then convert to the decimal based number Finally use the Comment number as the instruction data for MCFG i e replace the x in above instruction with the number calculated Note only decimal format number can be accepted Example 4 2 1 User sent MCFG 34611 ACK OxAA 0 OxBO 0x2 UNE 0x33 Oxff Explain Convert 0x2 OxE 0x33 into 16bits data we get 0x8733 That is 34611 decimal 4 3 Check Master Configuration Register If
64. stem Description A reciprocating mobile platform Requirements 1 When the motion DIR 1 P4 outputs 5V 2 When the motion DIR 0 P4 outputs OV 3 Need RTCN every time P4 changes Realization 1 Set MCFG lt P4IE gt 1 by sending MCFG 8 Here 8 0000 0000 0000 1000 binary User can enable other features yourself Make P4EVENT lt 2 0 gt 010 link to direction event Make P4LVL 1 so when DIR 1 P4 will output 5V Fill the S34CON with above bits get S34CON 0000 1010 0000 0000 binary Affix the suffix code 0001 to S34CON get 0000 0000 0010 1010 0001 Convert above value to decimal 0000 0000 0010 1010 0001 40961 Send instruction SCFG 40961 4 Run the motor There are numerous ways to run the motor The easiest way is using SPD x 15 During the motion please watch the output level change each time the motor change direction and pay attention to the RTCN on the PC screen UI Robot Technology Co LTD M24220101008EN Page 66 UIM242XX Integrated Miniature Stepper Controller Appendix A Dimensions Unit mm Page 67 M24220101008EN UI Robot Technology Co LTD UIM24204 24208 Appendix B Installation 4 M3x10 UIM Controller nA Heat Sink Compound gt 54 Flange Screws Flange Winding Leads Solder to Controller Ba ie EES MMM Sea ad HA 9GvETZL DSSSSSS Med i yet SS UI Robot Technolog
65. struction ACR Instruction ACR Function Enable disable ACR automatic current reduction function Syntax ACR x Variable Integer x Oor1 ACK Refer to the Basic Instruction ACK section 6 11 for details To reduce the power consumption and temperature raise UIM242xx controller has the build in function to automatically reduce output current by half 0 2 seconds after the motor stopped Comment Caution has to be taken before enable this function since current reduction also means holding torque reduction This function is enabled by default If ACR 1 the function is enabled vice versa UI Robot Technology Co LTD M24220101008EN Page 24 UIM242XxX Integrated Miniature Stepper Controller 6 5 Micro Stepping Setup Instruction MCS Instruction MCS Function Set change micro step resolution Syntax MCS x Variable Integer x 1 2 4 16 ACK Refer to the Basic Instruction ACK section 6 11 for details x 1 2 4 16 represents the full step half step quarter step and sixteenth step resolution respectively Comment Once received the MCS value will be stored in the controllers EEPROM If 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 execution 6 6 Motion Direction Instruction DIR Instruction DIR Function Set the desired motor direction Syntax DIR x Variable Intege
66. t control user needs to further configure the sensor control registers S34CON and S12CON Please refer to chapter 8 0 for details Page 17 M24220101008EN UI Robot Technology Co LTD UIM24204 24208 HARDWARE FIRMWARE CONFIGURATION 4 0 HARDWARE FIRMWARE CONFIGURATION UIM242XX s hardware and firmware can be configured through user instructions to maintained flexibility of the system This can be achieved through writing the corresponding configuration register s There are 5 configuration registers on UIM242XX Master Configuration Register Sensor Input Control Register Sensor Output Control Register and 2 Analog Threshold Registers In this chapter only the Mater Configuration Register is described User can find details about the other 4 registers in their corresponding chapters 4 1 Master Configuration Register Master Configuration Register is used to enable disable the major functional hardware and firmware Once configured it will be effective immediately and its value will be burned into the on board EEPROM automatically and will not affect any real time process Master Configuration Register is a 16bits register with the following structure Upper Byte Name ANE CHS CM AM DM Bit 15 14 13 12 11 10 9 8 Lower Byte Name 7 ORGIE STPIE P4IE S3IE S2lE S1IE Bit 7 6 5 4 3 2 1 0 Bit 15 ANE Enable Disable Analog Input 0 Disabl
67. t the DC4 DCO value When DCF 1 the unit is milliseconds When DCF 0 the unit is pps sec or pulse square second Comment Page 47 M24220101008EN UI Robot Technology Co LTD UIM24204 24208 7 13 Maximum Starting Speed Setup Instruction mMSS Instruction mMSS Function Syntax ACK Comment Set the Maximum Starting Speed mMSS x Variable Integer x 1 2 65 000 0OxAA Controller ID 0xB3 MS2 MS1 MSO 0xFF OXB3 is the Message ID of mMSS MS2 MSO represents the value of the Maximum Starting Speed mMSS is the abbreviation of motion Maximum Starting Speed Unit pps pulse second 7 14 Check the Current Maximum Starting Speed Instruction mMSS Function Syntax ACK Comment Check the Maximum Starting Speed mMSS Variable N A 0OxAA Controller ID 0xB3 MS2 MS1 MSO 0xFF OXB3 is the Message ID of mMSS MS2 MSO represents the value of the Maximum Starting Speed mMSS is the abbreviation of motion Maximum Starting Speed Unit pps pulse second UI Robot Technology Co LTD M24220101008EN Page 48 UIM242XX Integrated Miniature Stepper Controller 7 15 Maximum Cessation Speed Setup Instruction mMDS Instruction mMDS Function Syntax ACK Comment Set the Maximum Cessation Speed mMDS x Variable Integer x 1 2 65 000 0xAA Controller ID 0xB4 MD2 MD1 MDO OxFF OXB4 is the Message ID of mMDS MD2 MDO represents the value of the Maximum
68. to terminal 9 and signal ground should be connected to terminal 5 Please also note that 1 The Maximum sourcing sinking current must be kept in O 20mA 2 Voltage on terminal 9 must be kept between 0 3V and 5 3V Standalone Operation When working standalone user can use the wiring scheme as shown below Please note that this is the required wiring method when assigning controller ID to a UIM242 controller motor is not required Figure 0 2 Wiring Scheme for Standalone Operation Stepper Motor UIM2501 Controller Ge RS232 Cable KR UIM242XX Controller JU TTL Output For long distance transfer both ends of the bus should be terminated with1200Q terminating resistors UIM2501 converter has a build in terminating resistor User only needs to attach a resistor at the other end of the bus Refer to the UIM2501 user manual for how to enable Page 5 M24220101008EN UI Robot Technology Co LTD UIM24204 24208 the UIM2501 converter s terminating resistor To achieve the best communication CANH and CANL should be a twisted wire pair Network Operation Multiple UIM242XX controllers can be wired together to form a reliable motor network Following figure provides a typical network wiring solution Detailed terminal wiring on each controller can be found in previous standalone Operation solution Figure 0 3 Wiring Scheme for Standalone Operation Control Roo
69. ve 7bits message data to a 32bits data 32bits data binary XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXXX 4 bits 7bits message data _ o ofo o x x xxx g Page 15 M24220101008EN UI Robot Technology Co LTD UIM24204 24208 REAL TIME CHANGE NOTIFICATION 3 0 REAL TIME CHANGE NOTIFICATION RTCN UIM242XX 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 RTCN is less than 0 5 milliseconds CAN bus is less than 0 1 ms therefore is omitted The time from the occurrence of the event to the sending of the If the RS232 communication uses 115200 baud rate the transfer time on the RS232 bus is around 0 4 milliseconds Therefore the time from the event happening till user device gets the information is less than 1 millisecond Time on the The structure of a RTCN is shown below 0xAA Controller ID Message ID 0xFF The RTCN system is able to response to following events Table 3 1 Real time Change notification Events No Event Message ID Description 1 Falling edge of sensor 1 OxAO Voltage on S1 port High gt gt gt Low 2 Rising edge of sensor 1 OxA1 Voltage on S1 port Low gt gt gt High 3 Falling edge of sensor 2 OxA2 Voltage on S2 port High gt gt gt Low 4 Rising edge of sensor 2 OxA3 Voltage on S2 port Low gt gt gt High 5
70. w uirobot com to download free copies Page 31 M24220101008EN UI Robot Technology Co LTD UIM24204 24208 6 12 Motor Status Feedback Inquiry Instruction FBK If user wants to check the current motor status following instruction should be used Note that motor status and desired settings are different Instruction FBK Function Check the current motor status Syntax FBK Variable N A Feedback Message Refer to the Motor Status Feedback message section 6 13 for details Comment FBK is the abbreviation of Feed Back 6 13 Motor Status Feedback Message Upon receiving the FBK instruction the controller will send back the feedback message comprising following up to date motor status relative displacement steps speed direction micro step resolution current enabled offline status and ACR status The feedback Message is 13 bytes long within the following format 0xCC Controller ID ASM byte current SPD2 SPD1 SPDO STP4 STP3 STP2 STP1 STPO OxFF Where 1 OxCC denotes a Motor Status Feedback Message 2 ASM assembled byte structure N A 1 Enable MCS 1 Value Reado ACR o oftine HP 0 full step 15 1 16 step Bit 7 6 5 4 3 2 1 0 3 CUR current phase current structure N A Z Value Read 0 Phase Current lt 6 0 gt e g 27 2 7 Amp Bit 7 6 5 4 3 2 1 0 UI Robot Technology Co LTD M24220101008EN Page 32 UIM24
71. y Co LTD M24220101008EN Page 68
Download Pdf Manuals
Related Search
Related Contents
Manual (PDF USER MANUAL - Multiform Lighting PC500 User Manual 使用時間 - 中西金属工業 EPD室 0_Capa1e4_GWS 22U-GWS12U_v3.indd Serie 19P & 19T - Apex Power Tools THE SMITH AGENCY Espressione P-150D User's Manual Catskill Craftsmen 51538 Instructions / Assembly Copyright © All rights reserved.
Failed to retrieve file