Home

User Manual - Zapp Automation Ltd

image

Contents

1. D3 ANO AN1 FF COMMENT C1 gt gt The message ID of SFB D1 D3 gt gt Received data 1 3 ANO AN1 gt gt Received data 4 5 D1 D3 represent the logic level of S1 S2 and S3 respectively 0 1 AN0 AN1 is the converted value for analog input 12 bits Figure 12 1 AN1 and ANO are 0 if no analog input port is configured Note This instruction can be used for sensor data inquiry at any time and under any condition Page 98 M4220130827EN UI Robot Technology Co Ltd UIM242 Miniature Integrated Stepper Motor Controller Closed loop 37 SPDn Speed Adjusting Format SPD Description Set the desired speed to n n 65535 1 0 1 65535 signed integer ACK AA Controller ID B5 VO V1 V2 FF Comment B5 gt gt The message ID for desired speed VO V2 gt gt Received data 0 2 VO V2 is the converted value for the value of desired speed 16 bits Figure11 1 Unit Pluse Second PPS or Hz The sign of speed decides direction If no or specified before x itis taken as Note Once H bridge is enabled motor starts running on receiving the instruction SPDy n0 until another instruction SPDO is given Example For a 1 8 stepper motor if the SPD 100 User sent SPD100 If MCS 1 motor speed 1 8 100 180 sec 30 rpm If MCS 16 motr speed 1 8 100 16 11 25 sec 1 875 rpm UI Robot Technology Co Ltd M
2. Introduction to Sensor Input Control Instructions There are only 5 instructions related to the sensor input control 1 MCF Master Configuration Register The ANE bit MCFG lt 15 gt and CHS bit MCFG lt 14 gt of the master configuration register define the digital analog input of the sensor port The S1IE bit MCFG lt 0 gt and S2IE bit MCFG lt 1 gt enable disable the sensor real time change notification RTCN See section 5 1 for details SCF Sensor Configuration Register SCF is used to configure following sensor input control registers S12CON S34CON ATCONH HI ATCONL STG Sensor Trigger Configuration STG is used to configure sensor trigger mode UIM242 has three trigger mode Single Trigger Continouns Trigger and N ms Intermittent Trigger STO Sensor Parameter Store into EEPROM STO is used for storing parameters such as S12CON ATCONH ATCONL SPD and STP into EEPROM so that Sensor Input Control Module can perform the control when user device is absent SFB Sensor Status Feedback At any time and under any scenario using the instruction SFB can always read back the logic value of S1 and S2 as well as the analog measurement given MCFG lt ANE gt 1 MCFG lt CHS gt 0 UI Robot Technology Co Ltd M4220130827EN Page 47 UIM24202 04 08 IE Bit Defina 8 6 Sensor Input Control Register S12CON S12CON Sensor 1 2 Control defines the binding relationship between S1 and S2 sensor events and acti
3. Note The encoder counter records encoder pulses When the direction is positive the counter increases when the direction is negative the counter decreases When ICFG CW 0 consider clockwise as forword direction when ICFG CW 1 consider anticlockwise as forword direction Encoder counter can only be reset cleared under following situations Commanded by user instruction ORG User preset sensor ORG event happens Please also be aware Power Failure Protection Should a Power Failure situation happen the value of the encoder counter will be pushed into EEPROM and restored when reboot next time However passive movement after power off cannot be recorded For every slot the encoder counter records 4 pulses E g when QEC 500 the encoder counter records 500 4 2000 pulses each turn UI Robot Technology Co Ltd M4220130827EN Page 91 UIM24202 04 08 IE 31 QEC Check Current Encoder Positon Format QEC Description Check current encoder position ACK CC Controller ID B1 Q0 Q1 Q2 Q3 Q4 FF Comment B1 gt gt Message ID of current encoder position QO Q4 gt gt Received data 0 4 Q0 Q4 is the converted value for current encoder position 32 bits Figure 12 2 Page 92 M4220130827EN UI Robot Technology Co Ltd UIM242 Miniature Integrated Stepper Motor Controller Closed loop 32 QERn Set Quadrature Encoder Resolution Format QERn Description Set the quadrature
4. Six core5 2 Sensor input port 2 Six core6 EN Sensor input port 1 Motor Terminals Terminal No Description A A Connect to the stepper motor phase A B B Connect to the stepper motor phase B Note D product Differential Terminal is custom made please contact with salesmans before purchase UI Robot Technology Co Ltd M4220130827EN Page 7 UIM24202 04 08 IE TYPICAL APPLICATION UIM242 controllers can work standalone or within a CAN network Working standalone means only one UIM242 controller is linked to the CAN based host such as UIM2501 When working in a CAN network up to 100 UIM242 controllers can be linked together Under both scenarios sensor input S1 S2 S3 should be connected to terminal 6 7 8 and signal ground should be connected to terminal 5 Furthermore please be aware User is responsible for the power supply for sensors Voltage on terminal 6 7 8 9 must be kept between 0 3V and 5 3V Signal line of TTL output port P4 should be connected to port 9 and sign ground should be connected to AG port port 5 For TTL output the max sourcing sinking current must be kept in 0 20mA Output voltage of P4 is 0 5 V Relative to Port 5 If using an external encoder channel A should be connected to S1 channel B to S2 GND to AG Futhermore users must note Live line work is forbidden Live line work will cause ground wire missing the supply voltage red port is on while the sup
5. The only purpose of a Null Instruction is to tell the UIM242XX to feedback all the inquired parameters of the basic motion control i e Enable disable Current Micro stepping Auto current reduction Direction Speed and Displacement Actually user can simply send the null instruction alone to check the status of the above parameters If there is no null instruction after the in the above example there will be no ACK message at all Page 24 M4220130827EN UI Robot Technology Co Ltd UIM242 Miniature Integrated Stepper Motor Controller Closed loop 3 0CAN2 0 COMMUNICATION In order to communicate with UIM242 controller a UIM2501 CAN RS232 Converting Controller is required between the user device and the UIM242 The user device sends ASCII coded instructions through RS232 port to the UIM2501 converter Inside UIM2501 the RS232 based instructions are translated into CAN messages and sent to UIM242 controllers With this UIM2501 converter the user does not have to understand and deal with CAN bus operations but still enjoy the advantages of CAN bus such as high speed long distance interference immunity network and easy wiring UIM2501 is small in size and is set up near the host so the communication is quick and efficient UIM2501 supports 57600 bps RS232 baud rate The instruction takes less than 2ms 0 002s to transfer from user machine to UIM242XxX At the same time it only takes 50 100 us to transfer a mes
6. the actual direction is decided by displacement deviation while actual speed is set to absolute value of desired speed Once deviation of desired and actual displacement is too small and the acceleration is also too small then it may cause the following situation the motor has already reached the desired position but it still has not reached the desired speed UI Robot Technology Co Ltd M4220130827EN Page 31 UIM24202 04 08 IE Figure6 2 Position Tracking Mode without acceleration deceleration Position T Time Actual Motor Speed Reach Position 2000 ReceiveSPD 2000 mm ReceiveQEC 1000 m Reach Position 1000 2000 lt Receive STPO lt 4 Receive OFF 1000 0 T Time Operation or Control Desired Current Position Error Desired Motor Motor Event Mode Position Position Speed Direction Speed Power up VT Sie 3 Sore 0 position position ENA VT ones Starea position position ORG VT 0 0 QEC PT 0 2000 SPD PT 0 2000 Position reached PT 0 QEC PT 4000 Position reached PT SPD PT QEC PT Position reached PT PT mode off OFF BR VT VT a ta ba ta OO Ota ta PB Position Velocity Tracking PVT Position Velocity Tracking PVT mode is an extended mode of Position Tracking PT mode In this mode user can enter both desired position and desired speed UIM242XX controller will instruct motor to run at the desired speed until it reaches the desired position and then stop User c
7. 70 MCSn Set micro stepping resolution AA 80 OFF Disable H bridge circuit AA 88 Motion Control ee Feedback Message Instruction Description Header ID H Page BLCn Set backlash compensation value n AA DE 65 BLC Check backlash compensation value AA DE 66 MACn Set acceleration rate n AA B1 76 MAC Check acceleration rate AA B1 77 MDEn Set deceleration rate n AA B2 81 MDE Check deceleration rate AA B2 82 MMDn Set maximum cessation speed n AA B4 84 MMD Check maximum cessation speed AA B4 85 MMSn Set maximum starting speed n AA B3 86 MMS Check maximum starting speed AA B3 87 ORG Set zero origin position AA B7 89 ORGn Reset the position to a given value n AA B7 90 SPDn Set the desired speed n AA B5 99 SPD Check current speed CC B2 100 STO Store motion control parameters AA D1 104 STOn Bind motion control parameters to sensor edge AA D1 105 STPn Set desired incremental displacement n AA B6 106 STP Check current incremental displacement CC B3 107 Closed Loop Control At F k M Instruction Description EN Dec Page QECn Set desired quadrature encoder s position n AA B8 91 QEC Check current quadrature encoder s position CC B1 92 QERn Set quadrature encoder s resolution n AA C2 93 QER Check quadrature encoder s resolution AA C2 94 SQT Set tolerance of blocked alarm AA B8 101 UO Control e SNE Feedback Message Instruction Description Header ID H Page DOUn Set output TTL leveln AA C1 68 DOU Check current output
8. Depends on MCFG lt S2IE gt 0010 N A Depends on MCFG lt S2IE gt 0011 N A Depends on MCFG lt S2IE gt 0100 Emergency Stop Depends on MCFG lt S2IE gt 0101 N A Depends on MCFG lt S2IE gt 0110 N A Depends on MCFG lt S2IE gt 1001 Direction change displacement control Depends on MCFG lt S2IE gt 1010 N A Depends on MCFG lt S2IE gt 1011 N A Depends on MCFG lt S2IE gt 1100 Reset position Emergency Stop Depends on MCFG lt S2IE gt 1101 N A Depends on MCFG lt S2IE gt 1110 Change direction and run Depends on MCFG lt S2IE gt 1111 OFF Depends on MCFG lt S2IE gt Bit 11 8 P4LVLP4EVENT lt 2 0 gt P4 TTL Output Control Please refer to chapter 9 0 for details Bit 7 4 S3RACT lt 3 0 gt S3 Rising edge Action Bit 3 0 S3FACT lt 3 0 gt S3 Falling edge Action The binding relationship between S3 and S2 sensor events and actions is as follow ACT Code binary Action RTCN or Not 0000 N A No RTCN Ignore MCFG lt S2IE gt lt S1IE gt 0001 N A Depends on MCFG lt S2IE gt lt S1IE gt 0010 Start and Run Reversely Depends on MCFG lt S2IE gt lt S1IE gt 0011 Decelerate until Stop Depends on MCFG lt S2IE gt lt S1IE gt 0100 Emergency Stop Depends on MCFG lt S2IE gt lt S1IE gt 0101 Reverse Displacement Control Depends on MCFG lt S2IE gt lt S1IE gt 0110 Reset position Depends on MCFG lt S2IE gt lt S1IE gt 0111 Reset position Dispalcement Control Depends on MCFG lt S2IE gt lt S1IE gt 1001 Direction change disp
9. Stepper Motor Controller Closed loop 2 2 Instruction Structure An instruction is a message sent from the user device to UIM242 to Comment certain operation Instructions of UIM242 follow the rules listed below INS n or INSx n or INS Instruction symbol INS comprises three letters with no space between them and is not case sensitive If there is an x INSx then it means the value is hexadecimal Value n comprises set of numbers Some instructions have no value such as SPD STP etc Each instruction must end with semicolon Instruction without semicolon will cause unpredictable results Feedback Message is the message sent to user device from UID828 controller The maximum length of feedback messages is 13 bytes Feedback messages from UIM242 through UIM2501 follow the structure below Header Controller ID Message ID Data Terminator There are 3 kinds of headers AA CC and EE Controller ID the identification number of current controller in a CAN network also known as Node ID Scope 5 125 Message ID denotes the property of the current message Data has a 7 bits data structure High is in front and low is in the back The 7bits data can be translated into 16bits data through the shifting operation One 16bit data takes three 7bits data to represent Terminator denotes the end of a feedback message UIM242 controller utilizes FF or FE as the terminator If terminator is FF
10. Terminals Terminal No Description A A Connect to the stepper motor phase A B B Connect to the stepper motor phase B H product Max supply voltage is 50V is custom made please contact with salesmans before purchase a WARNING Incorrect connection of phase winds will permanently damage the controller Resistance between leads of different phases is usually gt 100KQ Resistance between leads of the same phase is usually lt 100Q It can simply measured by a multimeter WARNING Except supply voltage port and motor terminal voltage on port must be kept between 0 3 5 3V Otherwise the controller will be damaged Page 6 M4220130827EN UI Robot Technology Co Ltd UIM242 Miniature Integrated Stepper Motor Controller Closed loop TERMINAL DESCRIPTION D Figure0 2 Termianal Description Motor Terminals A A B ROBOT B 1 b ol a ees Control Terminals Control Terminals Terminal No Designator Description Two core1 V Supply voltage 12 40VDC Two core2 GND Supply voltage ground Four core3 4 CANH CAN signal dominant high Four core1 2 CANL CAN signal dominant low Six core1 AG Analog ground for sensors Six core2 5V Voltage output 5V 80mA Six core3 P4 TTL signal output port Six core4 3 Sensor input port 3
11. UIM Regeneration Discharge Module When pumping voltange is higher than the voltage those control devices can withstand UIM regeneration diacharge module will absorb regeneration electric energy reduce pumping voltage stabilize working voltage to avoid damage on UIM controller Page 58 M4220130827EN UI Robot Technology Co Ltd UIM242 Miniature Integrated Stepper Motor Controller Closed loop 12 0 INSTRUCTION This chapter describes the detail of the instructions mentioned in this document Please note in this user manual unless otherwise specified all messages are based on structure form and parsing method of RS232 character string messages For structure form and parsing method of CAN message based on UI SimpleCAN please refer to Ul SimpleCAN programming manual 12 1 Instruction Structure An instruction is a message sent from the user device to motion controller to command certain operatio Instructions of UID828 follow the rules listed below 1 Length of an instruction including the ending semicolon should be within 20 characters 2 Coded with standard 7 bits ASCII code 1 127 Expended ASCII code is NOT accepted 3 Instruction structure is as follow INS or INSx N or INS Where INS Instruction Comprises three letters with no space between them and is not case sensitive Symbol If there is an x INSx then it means the value is hexadecimal Please note if n is hexadecimal then the
12. Within the stroke range the potentiometer outputs 0 6V 4V Requirements 1 As soon as the sensor output is less than 0 6V the stepper motor starts to run forward until the potentiometer outputs arrives 4V 2 As soon as the sensor output is higher than 4V the stepper motor starts to run backward DIR 0 until the potentiometer outputs reaches 0 6V Realization 1 First stop the motor by sending OFF 2 Set MCFG lt ANE gt 1 MCFG lt CHS gt 0 MCFG lt S1IE gt 1 get MCFG 1000 0000 0000 0001 binary 0x8001 hex 32769 decimal 3 Send instruction MCF x8001 or MCF 32769 4 Itis required Start and Run Forwardly on S1 falling edge when analog input lt 0 6V therefore S1FACT lt 3 0 gt 1010 5 Itis required Start and Run Reversely on S1 rising edge when analog input gt 4V therefore S1RACT lt 3 0 gt 0010 6 Fill the S12CON with above bits get S12CON 0000 0000 0010 1010 binary 7 Add suffix code 0000 for S12CON get SCFG 0000 0000 0010 1010 0000 binary 0x2A0 hex 672 decimal 8 Send instruction SCF x2A0 or SCF 672 9 Calculate the upper limit 4V 5V 4095 3276 0000 1100 1100 1100 binary 10 Add suffix code 0011 for ATCONH get SCFG 0000 1100 1100 1100 0011 binary OxCCC3 hex 52419 decimal 11 Send instruction SCF xCCC3 or SCF 52419 12 Calculate the lower limit 0 6V 5V 4095 491 value is rounded 0000 0001 1110 1011 binary 13 Add suffix code 0010 f
13. data must have an even number of digits such as 00 01 OA A data has an odd number of digits will cause erroes for example 001 10A are illegal input n Value Comprises set of numbers with no other characters between them Some instruction have no value such as SPD STP etc Terminator Each instruction must end with semicolon Note Instruction without terminator will cause unpredictable results 12 2 Feedback Message Structure Feedback Message is the message sent to user device from motion controller The length of feedback message is not regular maximum length is 13 bytes Structure of feedback message from UIM242XX through UIM2501 is as follow Header Controller ID Message ID Data Terminator UI Robot Technology Co Ltd M4220130827EN Page 59 UIM24202 04 08 IE Header The start of a feedback message There are 3 kinds of headers AA represents the ACK message which is a repeat of the received instruction CC represents the status feedback which is a description of current working status EE represents the error message Controller ID The identification number of current controller in a CAN network also known as Node ID Scope 5 125 Message ID The property of the current message For example CC 05 AO FF where AO denotes that there is a low level on sensor 1 For details please refer to following sections Data Has a 7bits data structure High is in front an
14. encoder resolution at n n 0 1 65000 ACK AA Controller ID C2 RO R1 R2 FF Comment C2 gt gt Message ID of QER RO R2 gt gt Received data 0 2 RO R2 is the converted value for encoder resolution 16 bits Figure 12 1 Note Incorrect QER value can result in unpredictable closed loop control operations UI Robot Technology Co Ltd M4220130827EN Page 93 UIM24202 04 08 IE 33 QER Check Quadrature Encoder Resolution Format QER Description check current quadrature encoder resolution ACK AA Controller ID C2 RO R1 R2 FF Comment Refer to ACK comment of instruction QERn Page 94 M4220130827EN UI Robot Technology Co Ltd UIM242 Miniature Integrated Stepper Motor Controller Closed loop 34 SCFn SCFxn Set Sensor Configuration Format SCFn or SCFxn Description Configure S12CON S34CON ATCONH and ATCONL 1 When n is decimal Instruction type is SCFn Where n 0 1 1048575 24 bits unsigned integer Refer to Chapter 8 2 When n is hexadecimal Instruction is SCFxn Where yn has 3 bytes the structure is as follow Byte 0 1 2 Defination DO Di IDX Where D1 DO compose a hexadecimal 16bit data D1 is high DO is low IDX 0 1 2 3 denotes configuration of S12CON S34CON ATCONH and ATCONL separately Example Set S12CON as 0x1234 Then send instruction SCFx 34 12 00 00 is suffix Each Byte must have an even number of digits or letters AC
15. grounded Page 10 M4220130827EN UI Robot Technology Co Ltd UIM242 Miniature Integrated Stepper Motor Controller Closed loop There is another wiring scheme of network in Figure 0 4 When wiring in this way the length of stub need not be shorten than 2CM it is more flexible Figure 0 4 Wiring Scheme for Network Operation 2 RS232 UIM2501 ietis CANL CANH LTES MERR S St ger R i oso UIM242200 BI li 12 40 HALF 100 aA Warning Live line work is forbidden a Warning All controller and gateway must be common grounded UI Robot Technology Co Ltd M4220130827EN Page 11 UIM24202 04 08 IE INSTRUCTION SET SUMMARY Network Communication Realized by gateway UIM2501 USBC9100 PCIC120 please refer to user manual of gateway for details Model Functi General Check Instruction Description pani RE BTRn Set CAN network communication bit rate index AA BC BTR Check current CAN network bit rate index AA BC SETn Assign an to UIM242 controller AA DD gOFF Disable H bridge circuit AA AD gCURn Set output phase current AA AD gACRn Enable disable automatic current reduction AA AD gMCSn Set micro stepping resolution AA AD gORG Set zero origin position CC AD gSPDn Set the desired speed the sign decides direction AA AD gSTPn Set relative position the
16. it means there is no follow up message If terminator is FE it means there has follow up messages Note there are two types of feedback that has NO message ID ACK message and Motor Status feedback controller s response to FBK instruction Other messages could have NO data such as some real time change notification messages 2 3 Macro Operator and Null Instruction In practice users will combine several instructions together and send them at once Normally the user device will receive an ACK message on every instruction sent these message will cause pressure on CAN bus Especially for those basic motion instructions like SPD DIR MCS which have the same ACK sending a set of ACK is unnecessary For example CUR 20 MCS 16 SPD 5000 ENA The above instruction set will cause 4 ACK messages being transferred on the RS232 bus To facilitate the above situation user can use the following method to send a set of instructions Instruction 1 Instruction 2 Instruction N N lt 10 For example CUR 20 MCS 16 SPD 5000 ENA UIM242XX will only send back 1 ACK on receiving the above message In the above example and is called Macro Operator Instructions between a pair of macro operators will get no ACK message UI Robot Technology Co Ltd M4220130827EN Page 23 UIM24202 04 08 IE The semicolon at the end of the instruction set has no letter or number before it That is called Null Instruction
17. sign decides direction AA AD gPOSn Set desired position the sign decides direction AA AD gQECn Set encoder based position the sign decides direction AA AD gDOUTn Set output TTL level AA AD Check Instruction Description prey Ee Page MDL Check the model of controller CC DE 83 on Configuration Instruction Description great Ge Page ENAn Set enable time boot time after n ms enable AA AO 71 ENAxFFFF Check enable time AA AO 72 ICFn Set initial configuration register AA DA 74 ICF Check initial configuration register AA DA 75 MCFn Set master configuration register AA BO 78 MCF Check master configuration register AA BO 79 SCFn Set sensor control configuration register n AA co 95 SCF Check sensor control configuration register AA co 97 Instruction Description oe E Page Check desired motor status AA 62 FBK Check current motor status CC 73 SFB Check sensor status CC C1 98 Page 12 M4220130827EN UI Robot Technology Co Lid UIM242 Miniature Integrated Stepper Motor Controller Closed loop Motor Configuration Feedback Message Instruction Description Header ID Page ACRn Set auto current reduction ratio n AA 63 ACR Check auto current reduction ratio AA BA 64 CUR Set output phase current n AA 67 ENA Enable H bridge circuit AA
18. 0 N A Depends on MCFG lt S2IE gt 0011 N A Depends on MCFG lt S2IE gt 0100 Emergency Stop Depends on MCFG lt S2IE gt 0101 N A Depends on MCFG lt S2IE gt 0110 N A Depends on MCFG lt S2IE gt 1001 Direction change displacement control Depends on MCFG lt S2IE gt 1010 N A Depends on MCFG lt S2IE gt 1011 N A Depends on MCFG lt S2IE gt 1100 Reset position Emergency Stop Depends on MCFG lt S2IE gt 1101 N A Depends on MCFG lt S2lE gt 1110 Change direction and run Depends on MCFG lt S2IE gt 1111 OFF Depends on MCFG lt S2IE gt Bit 11 P4LVL Port P4 output voltage level 0 If the event defined by P4EVENT code happens P4 output OV 1 If the event defined by P4EVENT code happens P4 output 5V Bit 10 8 P4EVENT lt 2 0 gt P4 Output Driving Events P4EVENT binary Action RTCN or Not 000 No action Output is controlled by instruction Depends on MCFG lt P4IE gt 001 When SPD gt 0 Output P4LVL vice versa Depends on MCFG lt P4IE gt 010 When move forward Output P4LVL vice versa Depends on MCFG lt P4IE gt 011 When POS 0 Output P4LVL vice versa Depends on MCFG lt P4IE gt Bit 7 0 S3RACT lt 3 0 gt S3FACT lt 3 0 gt S3 Input Control Please refer to section 8 7 for more information 10 3 Output Control Configuration Instruction SCF Please refer to chapter 8 for detailed information 10 4 Instruction List The following table shows the instructions mentioned in this chapter the detail of those instr
19. 4220130827EN Page 99 UIM24202 04 08 IE 38 SPD Check Current Speed Format SPD Description Check current speed ACK CC Controller ID B2 VO V1 V2 FF Comment B2 gt gt The message ID of current speed VO V2 gt gt Received data 0 2 VO V2 is the converted value for the value of desired speed 16 bits Figure11 1 Unit Pluse Second PPS or Hz The sign of speed decides direction If no or specified before x itis taken as Page 100 M4220130827EN UI Robot Technology Co Ltd UIM242 Miniature Integrated Stepper Motor Controller Closed loop 39 SQTn Set Tolerance of Blocked Alarm Format SQTn Description Set tolerance of blocked alarm Alarm when deciation of reading between encoder and pulse counter is larger than n n 0 1 65535 ACK AA Controller ID B8 Q0 Q1 Q2 Q3 Q4 FF Comment B8 gt gt Message ID of desired encoder position Q0 Q4 gt gt Received data 0 4 Q0 Q4 is the converted value for desired encoder position 32 bits Figure 12 2 UI Robot Technology Co Ltd M4220130827EN Page 101 UIM24202 04 08 IE 40 STGxn_ Set Digital Input Sampling Mode Format STGxn Description Set sampling mode of digital input continnous intermittent and single sampling Structure of n Byte 0 1 2 Where D1 DO compose a hexadecimal 16bit data D1 is high DO is low IDX 00 01 02 hexadecimal denotes confi
20. 7 UIM24202 04 08 IE 7 DOUn Set TTL Output Format Description Comment Note DOUn Set TTL output level n 0 1 AA Controller ID C1 P4 FF C1 gt gt The message ID of DOUn P4 gt gt The logic level of the TTL output P4 1 means the output is 5V P4 0 means the output is OV Using DOUn will affect S34CON Once DOUn instruction is receiced UIM242 controller will clear P4LVL and P4EVENT lt 2 0 gt Therefore if user wants to re bind the events to the output control user needs to reconfigure S34CON This is to prevent potential confliction between user instruction and events controlled output Page 68 M4220130827EN UI Robot Technology Co Lid UIM242 Miniature Integrated Stepper Motor Controller Closed loop 8 DOU Check TTL Output Level Format DOU Description Check current TTL output level ACK AA Controller ID C1 P4 FF COMMENT Refer to ACK comment of DOUn Note Using DOU will NOT affect S34CON UI Robot Technology Co Ltd M4220130827EN Page 69 UIM24202 04 08 IE 9 ENA H Bridge Enable Format ENA Description Enable the stepper motor driver i e H bridge driving circuit ACK AA Controller ID ASB CUR VO V1 V2 P0 P1 P2 P3 P4 FF Comment ASB gt gt Received data 0 CUR gt gt Received data 1 VO P4 gt gt Received data 2 9 ASB structure Bit 7 6 5 4 3 2 1 0 Value N A 0 ACR ENA OFF DIR MCS 1 0 full ste
21. DU j United Intelligence Robot Technology User Manual UIM242XX Series CAN2 0B Instruction Control Miniature Integrated Stepper Motor Controller Closed loop UIM24202 04 08 IE Please pay attention to the following before using the UIROBOT products 1 UIROBOT products meet the specification contained in their particular Data Sheet 2 UIROBOT will only work with the customer who respects the Intellectual Property IP protection 3 Attempts to break UIROBOT s IP protection feature may be a violation of the local Copyright Acts If such acts lead to unauthorized access to UIROBOT s IP work UIROBOT has a right to sue for relief under that Act Information contained in this publication regarding controller applications and the like is provided only for your convenience and may be superseded by updates It is your responsibility to ensure that your application meets with your specifications UIROBOT MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED WRITTEN OR ORAL STATUTORY OR OTHERWISE RELATED TO THE INFORMATION INCLUDING BUT NOT LIMITED TO ITS CONDITION QUALITY PERFORMANCE MERCHANTABILITY OR FITNESS FOR PURPOSE UIROBOT disclaims all liability arising from this information and its use Use of UIROBOT products in life support and or safety applications is entirely at the buyer s risk and the buyer agrees to defend indemnify and hold harmless UIROBOT from any and all damages claims suits o
22. Enable the Origin zero position RTCN Once the value of pulsing counter or encoder counter is zero a message will be send to user device automatically Bit4 STPIE Displacement Control STP POS QEC Completion RTCN 0 Disable the displacement control completion RTCN 1 Enable the displacement control completion RTCN Once the displacementinstruction has been executed a message will be send to user device automatically Bit3 P4IE P4 Status Change RTCN 0 Disable P4 status change RTCN 1 Enable P4 status change RTCN Bit2 S3IE S3 Status Change RTCN 0 Disable S3 status change RTCN 1 Enable S3 status change RTCN Bit1 S2IE S2 Status Change RTCN 0 Disable sensor port 2 S2 status change RTCN 1 Enable S2 status change RTCN BitO S1IE S1 Status Change RTCN 0 Disable sensor port 1 S1 status change RTCN 1 Enable S1 status change RTCN 5 5 Instruction List The following table shows the instructions mentioned in this chapter the detail of those instructions is descriped at the end of the document Instruction Description Page ICFn Set initial configuration register 74 ICF Check initial configuration register 75 MCFn Set master configuration register 78 MCF Check master configuration register 79 UI Robot Technology Co Ltd M4220130827EN Page 29 UIM24202 04 08 IE 6 0BASIC CONTROL INSTRUCTIONS UIM242 controllers support abundant motion control instructions The instructions of Ulm242
23. K AA Controller ID CO SO S1 S2 S3 S4 ALO AL1 AHO AH1 FF Comment Co gt gt The message ID of SCFn SO S4 gt gt Received data 0 4 ALO AL1 gt gt Received data 5 6 AHO AH1 gt gt Received data 7 8 SO S4 is the converted value for S34CON S12CON 32 bits Figure 12 2 where 16 bits high denotes S34CON 16 bits low denotes S12CON ALO AL1 is the converted value for lower limit of analog threshold ATCONL 12 bits Figure 12 1 AHO AH1 is the converted value for upper limit of analog threshold ATCONH 12 bits Figure 12 1 UI Robot Technology Co Ltd M4220130827EN Page 95 UIM24202 04 08 IE Note The suffix code for S12CON is 00 hexadecimal The suffix code for S34CON is 01 hexadecimal The suffix code for ATCONH is 02 hexadecimal The suffix code for ATCONL is 03 hexadecimal Page 96 M4220130827EN UI Robot Technology Co Ltd UIM242 Miniature Integrated Stepper Motor Controller Closed loop 35 SCF Check the value of Sensor Configuration Format SCF Description Check the current value of S12CON S34CON ATCONH and ATCONL ACK AA Controller ID CO SO S1 S2 S3 S4 ALO AL1 AHO AH1 FF Comment Refer to ACK comment of SCFn UI Robot Technology Co Ltd M4220130827EN Page 97 UIM24202 04 08 IE 36 SFB Check Sensor Data Format SFB Description Check sensor readings and status ACK CC Controller ID C1 D1 D2
24. Since this instruction compensate backlash automatically when motion direction changes and the direction before can not get automatically then it will be thought as no backlash exsiting at the initial moment Therefore user must ensure that there is no backlash before sending instruction BLC The units of backlash compensation value is pulse the range is 0 65536 recommended value lt 5000 the default value is 0 7 8 Advanced Motion Control Instructions There are 6 additional instructions added as listed below 1 Enable disable MCFG MCF User can clear the CM bit of Master Configuration Register MCFG lt CM gt 0 to disable the module or set the CM bit MCFG lt CM gt 1 to enable the module D Set acceleration MAC There are two ways to set the acceleration rate Figure7 12 Value mode 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 value of the acceleration rate The range of the input value is 1 65 000 000 and unit is pulse sec sec or pulse square second Period mode If the AM bit of Master Configuration Register is set to one MCFG lt AM gt 1 then the value of the instruction will be interpreted as the period of the acceleration or in other words the time used for motor to accelerate to the desired speed from current speed The range of the input value is 1 60 000 milliseconds i e 0 001 60 seconds 3 S
25. TCONL input range is 0 4095 with 0 corresponding to OV and 4095 corresponding to 5V 4095 is the maximum of a 12bits data Page 50 M4220130827EN UI Robot Technology Co Ltd UIM242 Miniature Integrated Stepper Motor Controller Closed loop 8 9 Instruction List The following table shows the instructions mentioned in this chapter the detail of those instructions is descriped at the end of the document Instruction Description Page SCFn Set sensor control configuration register n 95 SCF Check sensor control configuration register 97 SFB Check sensor status 98 STGn Set digital input sampling mode 102 STG Check digital input sampling mode 103 STO Store motion control parameters 104 STOn Bind motion control parameters to sensor edge 105 8 10 Example of S12CON Configuration When configuring S12CON user needs to first fill every bit of the S12CON according to the information provided in previous sections and then affixes the suffix code 0000 binary An example is provided below System Description A reciprocating mobile platform has one ON OFF stroke limit sensor at each end When the mobile table hit the sensor a OV presents Requirements 1 As soon as one sensor S2 is hit the stepper motor starts to run reversely until the table hits the other sensor S1 2 As soon as S1 is hit the stepper motor starts to run positively until the table hits S2 Realization 1 First st
26. TP 500 4 QER set encoder resolution QER 500 5 SQT Set tolerance of blocked alarm SQT 150 9 1 Enable Disable Encoder and Closed loop Module MCFG Enable Encoder Interface The Encoder Decoding Module is enabled disabled through configuring the QEI bit of MCFG MCFG lt 13 gt When MCFG lt QEl gt 0 the encoder decoding module is disabled when MCFG lt QEl gt 1 the encoder decoding module is enabled If external encoder is used S1 and S2 ports must be used for channel A and channel B respectively If user chooses UIROBOT internal encoder S1 and S2 ports are available for sensors Please UI Robot Technology Co Ltd M4220130827EN Page 53 UIM24202 04 08 IE note encoder interface is a standard module which is available as long as Sensor Input Module is installed Enable Closed loop Control Module The Encoder based Closed loop Control Module hereinafter referred to as Closed loop Control Module is enabled by configuring the QEM bit of MCFG MCFG lt 11 gt When MCFG lt QEM gt lt 0 this module is disabled when MCFG lt QEI gt 1 it is enabled Please note closed loop control module is a must even if user uses external encoders Otherwise UIM242 controller can only read the external encoder data but cannot maintain closed loop motion control with this data However if the internal encoder is installed Closed loop Control Module is automatically included For master configuration register MCFG please ref
27. TTL level AA C1 69 STGn Set digital input sampling mode AA c9 102 STG Check digital input sampling mode AA c9 103 UI Robot Technology Co Ltd M4220130827EN Page 13 UIM24202 04 08 IE CHARACTERISTICS Absolute Maximum Ratings SUPPIY VOIAG Css spends Avis etre dteve store A E E ena E EEE eee 10V to 50V Voltage on S1 S2 S3 P4 with respect to OND 0 3V to 5 3V Maximum output current sunk by S1 S2 S3 P4 0 c ce eeceeeceeeneeeeeeeeeeeeeeeeeaeeseeeeeeeseaeeeaeesneeeseneeeeeaes 20 mA Maximum output current sourced by S1 S2 S3 P4 c ce eecceeseeeeeeeeeeeeeeeeneeeneeeeeeseaeseaeeeeeeteeeeeeeenaeess 20 mA Ambient temperature Under bas 20 C to 85 C Storage temperatures a isc Eege Peep dere kee ed an dice eerie EES ie 50 C to 150 C NOTE Working under environment exceeding the above maximum value could result in permanent damage to controller Working under conditions at the maximum value is not recommended as operation at maximum value for extended period may have negative effect on device reliability H product Max supply voltage is 50V is custom made please contact with salesmans before purchase Electrical Characteristics Ambient Temperature 25 C Supply Power Voltage 12V 50VDC Motor Output Current Max 2A 4A 8A per phase instruction adjustable Driving Mode PWM constant current Stepping Resolution full step half step 1 4 1 8 and 1 16 step H product Max supply vo
28. Technology Co Ltd UIM242 Miniature Integrated Stepper Motor Controller Closed loop APPENDIX B INSTALLATION INSTRUCTION NEMA 17 do not need flange 1 Fix the UIM controller on motor with screw 2 or 4 2 Connect the motor pin to motor terminal of UIM controller Stepper Motor Z iL DriverUIM Controller UIME MISS Mounting Screws SH NEMA 23 34 42 need flange 1 Fix flange on motor 2 Fix the UIM controller on flange with screw 3 Connect the motor pin to motor terminal of UIM controller Stepper Motor ib EEI Adapting Flange e E Motor Cords BLS AR UIM Controller Driver UIM Tel 3 Ska ee MI Ca Mounting Screws BRET Ss UI Robot Technology Co Ltd M4220130827EN Page 109
29. UR gt gt The Max phase current e g 20 means 2 0 A asb gt gt The installed optional modules and sensor ports VO V2 gt gt Received data 0 2 VO V2 is the converted value for the firmware version 12 bits Figure 12 1 Structure of asb is as follow Bit Defination 0 Int QE Closed loop Adv Motion No of sensor port For example if bit 4 is 1 the Advanced Motion Control module is installed UI Robot Technology Co Ltd M4220130827EN Page 83 UIM24202 04 08 IE 23 MMDn Set Maximum Cessation Speed Format MMDn Description Set the maximum cessation speed at n n 1 2 65 000 000 unsigned integer ACK AA Controller ID B4 MO M1 M2 FF COMMENT B4 gt gt The message ID of MMDn MO M2 gt gt Received data 0 2 MO M2 is the converted value for the value of maximum cessation speed 16 bits Figure 12 1 Unit pps pulse second Page 84 M4220130827EN UI Robot Technology Co Ltd UIM242 Miniature Integrated Stepper Motor Controller Closed loop 24 MMD Check current Maximum Cessation Speed Format MMD Description Check the maximum cessation speed ACK AA Controller ID B4 MO M1 M2 FF Comment Refer to ACK comment of MMDn UI Robot Technology Co Ltd M4220130827EN Page 85 UIM24202 04 08 IE 25 MMSn Set Maximum Starting Speed Format MMSn Description Set the maximum starting speed at n n 1 2 65 000 000 unsign
30. a signed 32bit integer 6 3 Motor Status Feedback Message Upon receiving the FBK instruction the controller will send back the feedback message comprising the following up to date motor status incremental displacement speed direction micro stepping resolution and phase current enabled offline status and ACR status The feedback Message is 13 bytes long in the following format Byte 1 2 3 4 5 6 7 8 9 10 1 12 13 Value CC Controller ID ASB CUR epps app epp STP4 STP3 sTP2 STP1 STPO FF Where 1 CC SC a Motor Status Feedback Message e the present value of motor status 2 ASB assembled byte structure Bit 7 6 5 4 3 2 1 0 value N A 0 ACR ENA OFF DIR Mcs 1 Ozfull step 15 1 16 step 3 CUR current phase current structure Bit 7 6 5 4 3 2 1 0 value N A 0 Phase Current e g 27 2 7 Amp 4 SPD2 SPDO denotes the current motor speed See figure 10 1 for how to convert to a signed 16bit integer 5 STP4 STPO denotes the current motor displacement See figure 10 2 for how to convert to a signed 32bit integer For more details on above conversion please refer to the source code of the provided demo software These software and related source code are VC VB based and free Page 34 M4220130827EN UI Robot Technology Co Ltd UIM242 Miniature Integrated Stepper Motor Controller Closed loop 6 4 Instruction List The following table shows the instructions mentioned in this c
31. an enter successively or discontinuously both desired speed and desired position Shifting between the three modes is displayed in the following chart Page 32 M4220130827EN UI Robot Technology Co Ltd UIM242 Miniature Integrated Stepper Motor Controller Closed loop Figure6 3 Shifting between Motion Control Modes H bridge disabled circuit working can accept buffer operate instructions and logic l Instruction ENA Approach the speed Keep running at desired speed Set the desired speed at 0 to stop the Instruction STP 0 desired Instruction OFF position or e aesire displacement successively or discontinuously approach the desired speed while making sure the desired position is achieved a Instruction STP keep running at the desired speed stop after reaching the desired position Instruction QECn set SPDn QECn SPD1 STPn Instruction STPn Instruction QECn PVT Mod the desired speed and position or displacement successively or discontinuously approach the desired speed while making sure the desired position is achieved keep running at the desired speed stop after reaching the desired position 6 2 Basic Instruction Acknowledgment ACK Upon receiving an instruction the UIM242XX controller will immediately send back an Acknowledgment ACK message There are only two ACK messages for all of them as described bel
32. and a 5V reference voltage If the input voltage is 0 5V the feedback value will be 0 4095 The ADC sample rate is 50K Hz The analog feedback value is a mathematic average of 16 samples and the update rate is 1000 Hz Regardless of whether it s digital or analog the input voltage cannot exceed 0 3V 5 3V otherwise permanent damage can be done Besides measuring the voltage input and providing the reads to the user device when inquired the sensor control module is able to carry out a certain control action when a sensor event happens Actions and sensor events can be defined by instructions With the Sensor Control Module UIM242 can perform motion controls without the user device There are 8 sensor events that can be configured as listed below Table8 1 Sensor Events No Sensor Events Description 1 S1 Falling Edge S1 Voltage Level Change High gt gt gt Low 2 S1 Rising Edge S1 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 the Upper Limit Analog input voltage is higher than user defined upper limit 8 Exceeding the Lower Limit Analog input voltage is lower than user defined lower limit There are 13 actions that can be furthermore bound
33. are valid for both basic motion control without acceleration deceleration or S curve displacement control and advanced motion control if the module is installed and enabled User can select either basic or advanced motion control by configuring the Master Configuration Registration MCFG In this Chapter introduction to UIM242XX motion control modes is provided 6 1 General Introduction of Motion Control Modes There are three motion control modes for UIM242XX controller Velocity Tracking VT Position Tracking PT and Position Velocity Tracking PVT Velocity Tracking VT In the Velocity Tracking VT mode UIM242XX controller controls the motor speed to track desired speed Figure6 1 Velocity Tracking Instruction SPD 1000 received at this point Basic motion control speed rises without Current Speed acceleration process Advanced motion control linear non linear acceleration T Time Instruction SPD 1000 received at this point Basic motion control speed falls without eceleration process Current Speed Advanced motion control linear non linear 1000 deceleration T Time Please note that Sign of the value of SPD instruction instructs the motion direction For example both the instruction SPD 1000 and SPD 1000 make motor run forward at 1000pps Meanwhile the instruction SPD 1000 can cause motor to run backward at 1000pps If Advanced Motion Control Mo
34. bit MCFG lt CM gt 0 will disable the advanced motion control module For details of setting please refer to Section 5 1 Master Configuration Register Meanwhile the AM and DM bit of MCFG also defines the input methods of acceleration deceleration 7 10 Instruction List The following table shows the instructions mentioned in this chapter the detail of those instructions is descriped at the end of the document Instruction Description Page DL Cu Set backlash compensation value n 65 BLC Check backlash compensation value 66 MACn Set acceleration rate n 76 MAC Check acceleration rate 77 MDEn Set deceleration rate n 81 MDE Check deceleration rate 82 Page 42 M4220130827EN UI Robot Technology Co Ltd UIM242 Miniature Integrated Stepper Motor Controller Closed loop MMDn Set maximum cessation speed n 84 MMD Check maximum cessation speed 85 MMSn Set maximum starting speed n 86 MMS Check maximum starting speed 87 UI Robot Technology Co Ltd M4220130827EN Page 43 UIM24202 04 08 IE 8 0SENSOR INPUT CONTROL UIM242XX Motion Controller has an optional sold separately Sensor Control Module which supports three sensor input ports S1 S2 and S3 Port S2 can be configured for digital input 0 5V Port S1 and S3 can be configured for either digital input or analog input Besides digital input condition circuit UIM242XX has a 12 bits ADC analog digital converter
35. by if the current motor direction is forward or reverse e Origin point hit The output voltage level is determined by if current position is zero point or just crosses over the zero point 1 5 Encoder based Closed loop Control Module With the encoder based closed loop control module UIM242 controller can perform self closed loop motion control Without this module UIM242 can still interface with a quadrature encoder and provide reading to user device but the self closed loop is not available 1 6 Instructions and Interface Instructions for UIM242XX are simple intuitive and fault tolerating For example in order to command a speed of 1000 steps sec the following instructions are all valid SPD 1000 SPD 1000 SPD 1000 SPD1000 or even SPD amp 1000 In case that a wrong instruction is entered the controller will return an ACK of error message Incorrect instructions will not be executed to prevent accidents UIROBOT provides free Microsoft Windows based VB VC demo software and corresponding source code to facilitate the quick start of user device side programming UI Robot Technology Co Ltd M4220130827EN Page 21 UIM24202 04 08 IE 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 UIM242XX will further send back a message to inform the user device
36. by mode current reduces to 2 3 99 Standby CUR working current 100 n 0 orn 1 ACK is the same as ACK of 6 ENA n 2 3 99 ACK is as follow AA Controller ID BA A0 FF BA gt gt Message ID of instruction ACRn AO gt gt Received data 0 A0 n ACR is short for Automatic Current Reduce When ACR is enabled the current will be reduced after motor stop which means a decrease of holding torque Value of this instruction will be stored in EEPROM n 2 3 99 require controller hardware version being 1232 or higher UI Robot Technology Co Ltd M4220130827EN Page 63 UIM24202 04 08 IE 3 ACR Check auto current reduction ratio Format ACR Description Check auto current reduction ratio ACK AA Controller ID BA A0 FF Comment Refer to ACK comment of instruction ACRn Note Require controller hardware version being 1232 or higher Page 64 M4220130827EN UI Robot Technology Co Ltd UIM242 Miniature Integrated Stepper Motor Controller Closed loop 4 BLCn Backlash compensation Format BLCn Description Set value of backlash compensation in reciprocating motion n 0 1 65535 Unsigned integer Units pps open loop ACK AA Controller ID DE B0 B1 B2 FF Comment DE gt gt Message ID of instruction BLCn BO B2 gt gt Received data 0 2 BO B2 is the converted value for the value of backlash compensation 16 bits Figure 12 1 UI Robo
37. ccumulate otherwise displacement counter decrease Bito ENA Auto enable after powr on 0 Disable the function Auto enable after power on 1 Enable the function auto enable the controller after the pre set time when power is on Figure 5 1 Rotation Direction Clockwise CW UI Robot Technology Co Ltd M4220130827EN Page 27 UIM24202 04 08 IE 5 2 Auto enable Once ICFG ENA is set to 1 UIM242 will auto enable the H Bridge of motor after the power is on for T ms the interval time T can be set through instruction For details of the instruction please refer to Chapter 10 5 3 User Program User can program on UIM242 Once ICFG PROG is set to 1 UIM242 will execute user program after the power is on For details please refer to UIM Programming Manual UIM242 still can execute user instructions when user program is running 5 4 Master Configuration Register Master Configuration Register is used to enable disable the hardware firmware functions Once configured it will be effective immediately and its value will be burned into the on board EEPROM The burning process will not affect any real time process Master Configuration Register is a 16bits register with the following structure MCFG bit 12 11 10 9 8 7 6 5 4 3 2 1 0 15 14 13 value ANE CHS QEI X QEM CM AM DM X STLIEORGIE STPIE P4IE S3IE S2IE S11E Bit15 ANE Enable Disable Analog Input 0 Disable the analog input all senso
38. cept supply voltage port and motor terminal voltage on port must be kept between 0 3 5 3V UIM2501 WM Converter CAN Twist Wire Pair LJ DBs Port RS232Cable UIM242XX Controller Warning Live line work is forbidden y Warning All controller and gateway must be common grounded UI Robot Technology Co Ltd M4220130827EN Page 9 UIM24202 04 08 IE Network Operation CAN bus provides a reliable and simple method of network constructing In figure 0 4 a wiring scheme is presented for such network operation with one RS232 CAN converter connected with multiple UIM242XX controllers For detailed terminal wiring on each controller please refer to figure 0 3 Note s All nodes are connected onto a twist wire pair e Star connection scheme must be avoided e The stub must not exceed 2cm each The shorter the better e Both ends of the bus should be terminated with 200 terminating resistors Shielded 120 ohm CAN bus cable is recommended if the transfer distance is over 50 meters e In practice only one terminating resistor is need at the other end of CAN bus since UIM2501 already has a built in terminating resistor To activate this built in terminating resistor see UIM2501 user manual Figure 0 4 Wiring Scheme for Network Operation Control Room UIM2501 Converter E UIM242xx UIM242xx Controller Controller Warning Live line work is forbidden bh Warning All controller and gateway must be common
39. checks ENAtimer only can not enable controller Require controller hardware version being 1232 or higher Page 72 M4220130827EN UI Robot Technology Co Ltd UIM242 Miniature Integrated Stepper Motor Controller Closed loop 12 FBK Format Description ACK Comment Bit Motor Status Feedback Inquiry FBK Check the current motor status AA Controller ID ASB CUR VO V1 V2 P0 P1 P2 P3 P4 FF ASB gt gt Received data 0 CUR gt gt Received data 1 VO P4 gt gt Received data 2 9 Structure of ASB is as follow 7 6 5 4 3 2 1 0 Defination N A 0 ACR ENA OFF DIR Mcs 1 0 full step 15 1 16 step Bit Structure of CUR is as follow 7 6 5 4 3 2 1 0 Defination N A 0 Phase Current e g 27 2 7 Amp Note VO V2 is the converted value for the current motor speed 16 bits Figure11 1 PO P4 is the converted value for the current motor displacement 32 bits Figure1 1 2 User can get current motor status by using this instruction at any time Please note current status is different from desired status UI Robot Technology Co Ltd M4220130827EN Page 73 UIM24202 04 08 IE 13 ICFxn Format Description Byte Initial Configuration Register Instruction ICFxn Configure the initial configuration register InitCFG Parameter n has two bytes structure is as follow 0 1 Where D1 DO compose a hexadec
40. chnology Co Ltd UIM242 Miniature Integrated Stepper Motor Controller Closed loop 20 MDEn_ Set Deceleration Rate Format MDEn Description Set the deceleration rate to n n 1 2 65 000 000 Pre requiring MCFG lt DM gt 0 value mode n 1 2 60 000 Pre requiring MCFG lt DM gt 1 period mode ACK AA Controller ID B2 FG DO D1 D2 D3 D4 FF Comment B2 gt gt The message ID of MDEn FG gt gt Equal to the DM bit of the MCFG DI DM Denote the input mode value period FG 1 unit ms FG 0 unit pps s DO D4 gt gt Received data 0 4 D0 D4 is the converted value for the value of the deceleration rate 32 bits Figure11 2 UI Robot Technology Co Ltd M4220130827EN Page 81 UIM24202 04 08 IE 21 MDE Check Current Deceleration Rate Format MDE Description Check current deceleration rate ACK AA Controller ID B2 FG D0 D1 D2 D3 D4 FF Comment Refer to ACK comment of MDEn Page 82 M4220130827EN UI Robot Technology Co Ltd UIM242 Miniature Integrated Stepper Motor Controller Closed loop 22 MDLn Check Controller Model Format MDLn Description Check the Model installed optional modules and firmware version of the UIM242 controller of ID n n 5 6 125 ACK CC Controller ID DE 18 02 CUR asb V0 V1 V2 FF Note denotes one byte the data is hexadecimal Comment DE gt gt Message ID of instruction MDLn C
41. d Peak Current L 35V C 40V H 50V Current 2A vV vV vV 4A x vV v 8A x vV vV Page 2 M4220130827EN UI Robot Technology Co Ltd UIM242 Miniature Integrated Stepper Motor Controller Closed loop Examples UIM242L02T UIM242L02D UIM242C04P MSP UIM242HO8P IE Examples of Control Connector options Screw Terminal Rectangular Plug Socket Differential Terminal UI Robot Technology Co Ltd M4220130827EN Page 3 UIM24202 04 08 IE UIM24202 04 08 CAN2 0Instruction Control Miniature Integrated Stepper Motor Conirller Miniature Integral Design Advanced Motion Control Miniature size 42 3mm 42 3mm 16 5mm Absolute position record feedback Power failure position protection Eu onto motors seamlessly P P Quadrature encoder based closed loop Die cast aluminum enclosure improving control heat dissipation and durability linear and non linear acceleration and Motor Driving Characteristics deceleration S curve PT PVT Wide supply voltage range 12 50VDC displacement SN h compensation Output current 2 4 8A instruction adjustable Backlash compensatio Full to 16th micro step resolution Advanced I O Control without host Dual full H bridge with PWM constant 3 sensor input ports 1 analog input current control 12bit Network Communication 1 TTL output E 3 trigger mode continuous NE intermittent sing
42. d low is in the back In figure 10 1 and 10 2 examples are shown on how to convert a set of 7bits data into 16bit data and 32bit data Obviously one 16bit data takes three 7bit data to represent and one 32bit data takes five 7bit data Terminator The end of a feedback message UIM motion controller utilizes FF or FE as the terminator If terminator is FF it means there is no follow up message If terminator is FE it means there has follow up messages Note there are two types of feedback that has NO message ID ACK message and Motor Status feedback controller s response to FBK instruction Other messages could have NO data such as some real time change notification messages Figure12 1 Conversion from three 7bits message data to a 16bits data Data received Hex XX XX 1 Byte 2 Byte 3 Byte XX XX FF Receive sequence earlier gt later 1 Byte D14 7 6 5 4 3 2 1 0 SCH D b b bchbdslslz 7 6 5 4 3 2 1 0 3 Byte P o pe os va vs o2 p1 Do 14 _1 II 0 3 12 9 8 7 6 5 4 3 2 1 0 geen Data Dia Daia an oos bs b7 bs os b4 os oa 07 09 Page 60 M4220130827EN UI Robot Technology Co Ltd ture Integrated Stepper Motor Controller Closed loop inia UIM242 M Figure12 2 Conversion from five 7bits message data to a 32bits data eo lt geq Heug 11991 ve Ge 96 Le 8z G OF LE J j
43. dule is installed speed control can be achieved through linear or non linear acceleration deceleration For details please refer to Chapter 6 0 Advanced Motion Control If Advanced Motion Control Module is not installed once a SPD instruction is received motor speed will be set to desired speed Position Tracking PT In the Position Tracking PT mode UIM242 controller will keep motor running at a speed close to the set value until it reaches the desired steps After setting the desired speed user can enter desired positions or incremental displacement continuously or discontinuously UIM242 controller will make sure that the desired position is achieved when trying to approach the desired speed to the greatest extent Page 30 M4220130827EN UI Robot Technology Co Ltd UIM242 Miniature Integrated Stepper Motor Controller Closed loop As shown in Figure 6 2 UIM242 controller operates in PT mode automatically on receiving position instruction such as POS STP until an instruction of STP 0 is given CSTP is a displacement control instruction Logically STP 0 means no displacement It is contradictory to send a displacement instruction of no displacement Therefore UIM242 will take this instruction as a request to shift from PT mode to VT mode In PT mode the actual speed direction and desired displacement are related to deviation of actual displacement When sign of desired speed and displacement deviation is different
44. e Format Description ACK Comment Note STO Banding motion parameters to motions Triggered by sensor edge or controllered by instruction Motion parameters include 1 Acceleration 2 Deceleration 3 Max starting speed 4 Max cessation speed For sensor there also has 5 Speed 6 Displacement AA Controller ID D1 FF D1 gt gt The message ID of STO This instruction will affect real time performance It takes around 20 ms for the instruction to be executed It is recommended that sending this instruction when the motor is idle and wait 20ms before sending other instructions Page 104 M4220130827EN UI Robot Technology Co Lid UIM242 Miniature Integrated Stepper Motor Controller Closed loop 43 STOn Format Description ACK Comment Note Example Parameter Banding STOn Banding motion parameters to motions Triggered by sensor edge or controllered by instruction D S 71 0 gt gt Montion controlled by instrcution 1 gt gt Only for close loop gt gt Motion triggered by rising edge of S1 gt gt Motion triggered by falling edge of S1 gt gt Motion triggered by rising edge of S2 gt gt Motion triggered by falling edge of S2 Il N O OO fF W PL gt gt Motion triggered by rising edge of S3 SoS 156 re SoS SS Il gt gt Motion triggered by falling edge of S3 AA Controller ID D1 FF D1 gt gt Message ID of i
45. e e pe 2nuanbas penjanay 44 XX xx ua May ug El ug zl Ieug U Xx Dx x9H panao erea Page 61 M4220130827EN UI Robot Technology Co Ltd UIM24202 04 08 IE 12 3 Instruction Description This section describes the detail of the instructions mentioned in this document in the alphabetic order 1 Check desired motor status Format Description Check desired motor status ACK AA Controller ID ASB CUR VO V1 V2 PO P1 P2 P3 P4 FF Comment ASB gt gt Received data 0 CUR gt gt Received data 1 VO P4 gt gt Received data 2 9 ASB structure Bit 7 6 ZS 4 3 2 1 0 Value N A 0 ACR ENA OFF DIR MCS 1 0 full step 15 1 16 step CUR structure Bit 7 6 5 4 3 2 1 0 Value N A 0 Phase Current e g 27 2 7 Amp VO V2 is the converted value for desired speed 16 bits Figure 12 1 PO P4 is the converted value for desired displacement 32 bits Figure 12 2 Page 62 M4220130827EN UI Robot Technology Co Ltd UIM242 Miniature Integrated Stepper Motor Controller Closed loop 2 ACRn Format Description ACK Comment Note Set auto current reduction ratio AC Pn set auto current reduction ratio n a0 1 499 n 0 disable auto current reduction Standby CUR working current n 1 in standeby mode current reduces to 50 Standby CUR working current 2 n Z r in stande
46. e are knee points in its trajectory is not suitable for applications requiring motion smoothness In this case user can set the maximum start speed and maximum cessation speed at zero to disable non linear acceleration deceleration This process is shown is figure 7 11 Figure7 11 S curve Displacement Control Uniform Accelaration Desired Speed COLES Apel Uniform Deceleration Max Start Speed Max Cessation Speed T Time Angular Displacement Stop Position i Trajectory Start Position T Time 7 6 Direction Control and Position Counter When the user enables the advanced motion control module the actual motor direction is controlled by the module This is because if the user input commands a motion direction different from the current motion direction the desired direction cannot be executed immediately UIM242 has two types of position counters absolute position counter and displacement counter Page 40 M4220130827EN UI Robot Technology Co Ltd UIM242 Miniature Integrated Stepper Motor Controller Closed loop Absolute position counter is for recording the absolute position of motor The actual angular displacement is also relative to micro stepping The value recorded in absolute position counter will be stored automatically on Power Failure situation and can only be cleared on user instruction or preset sensor event The counter will increase or decrease according to ICFG CWW and the actual direction of m
47. eatens 42 PAO Jet Oe et ist te S E EE e Eed edd Eessen Skee ee 42 8 0 Sensor Input Control eeaeee raare geed EES 44 8 1 Rising and Falling Edgy TEE 45 8 2 Analog Input and Thresholds siev nate a eA Rien nn eh Min dee A creel 45 8 3 Digital Input Sampling MOH Eisis sarea sanien Ah ea oc a ea A ee 46 8 4 Sensor Event Action and Binding ccccssecceeeenceeeeenceeeeseneeeseeaeeeeneeeeeeseneeeseneeeeessaeeeeeseaeeessseeeesenseeeess 46 Page 16 M4220130827EN UI Robot Technology Co Ltd UIM242 Miniature Integrated Stepper Motor Controller Closed loop 8 5 8 6 8 7 8 8 8 9 8 10 8 11 9 0 9 1 9 2 10 0 10 1 10 2 10 3 10 4 10 5 11 0 11 1 11 2 12 0 12 1 12 2 12 3 CON OV to ba 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Introduction to Sensor Input Control Instructions ecceeeceseeeceeeeteeeeeeeeeeeeeeseaeeseaeesaeeseaeesnaeeseaeeseaeeesaeeeaas 47 Sensor Input Control Register S12CON A 48 Sensor Input Control Register SS4CON A 48 Analog Threshold Control Register ATCONH amp ATCONL ceecceeeceeeeeeeeeeeeeeeeeeeeeseaeeeeeeeseaeeeeeeeseaeeeeeeenaas 49 Instr ctiom BCEE 51 Example of S12CON Configuration cccceecceeeeeeeeneeeeeeseeeeseeeeseaeeeeaeecaeeseaeesaeeseaeeseaeeseaeessaeeseaeessaeeseaeeeaas 51 Example of ATCONH ATCONL Configuration cecceecceseeeeseneeeeeeseaeeseaeeseaeeseeeesaeeseeeeseaeessaeesnaeeseae
48. eceleration Hate cesta ccoeasel seevscines ecdies cetundineccrneed ceveewesccebeve gqechdveocevngel cqevbatnedesictengeviciaees 81 MDE Check Current Deceleration Hate 82 MDEn Gheck Controller Models ee a geseet dE ESA deed ees ee id 83 MMDn Set Maximum Cessation Speed AAA 84 MMD Check current Maximum Cessation Speed ececececceeeeeeeeeeeeeeeeeeeeeeeeeeeeeaeeeeeeeeaeeesieeseneeeeieeeeneeee 85 MMSn Set Maximum Starting SPO AAA 86 MMS Check current Maximum Starting Gpeed ennt 87 OFF H Bridge Disable vic 2 25c scent barbies onsen a aa nied aa a a cd AL eke ea ceed pean ls 88 ORG Reset Position Counters tence ie ie eet eal ale ne he hee 89 ORG Reset Position Counte ns x ivr secre dE Ed ee Eegeregie 90 QECn Set desired quadrature encoder s postton ec eeseceeeeseeeeeeeneeeeeeeeeeeeaeeeeeeaeeesesaeeeeeeeeeesenneeeneaaes 91 QEC Check Current Encoder Poeiton AAA 92 UI Robot Technology Co Ltd M4220130827EN Page 17 UIM24202 04 08 IE 32 QERn Set Quadrature Encoder Resolution eee eeeesceeeeneeeeeeneeeeeeeaeeetesaeeeeseaeeeeeeaeeesesaeesesenaeeeeseneterenaes 93 33 QER Check Quadrature Encoder Resolution cceeseeeeeeceneeeeeeeseeeeeeeeseeeeeaeeeseeeeaeeeseeeseeeeieeeeieeeeeeeeeaees 94 34 SCFn SCFxn Set Sensor Configuration ee eeeceeeeeseeeeeeeeeeeeneeeeeseeeeeeeneeesenaeeeeseeeeeeeeaeeesesaeeeeneneeeeees 95 35 SCF Check the value of Sensor Configuration cecceeecceseeeeeseeeseeeeen
49. ed integer ACK AA Controller ID B3 MO M1 M2 FF Comment B3 gt gt The message ID of MMSn MO M2 gt gt Received data 0 2 MO M2 is the converted value for the value of maximum starting speed 16 bits Figure11 1 Unit pps pluse second Page 86 M4220130827EN UI Robot Technology Co Ltd UIM242 Miniature Integrated Stepper Motor Controller Closed loop 26 MMS Check current Maximum Starting Speed Format MMS Description Check the maximum starting speed ACK AA Controller ID B3 MO M1 M2 FF Comment Refer to ACK comment of MMSn UI Robot Technology Co Ltd M4220130827EN Page 87 UIM24202 04 08 IE 27 OFF H Bridge Disable Format OFF Description Disable the stepper motor driver i e H bridge driving circuit ACK AA Controller ID ASB CUR VO V1 V2 PO P1 P2 P3 P4 FF Comment ASB gt gt Received data 0 CUR gt gt Received data 1 VO P4 gt gt Received data 2 9 ASB structure Bit 7 6 5 4 3 2 1 0 Value N A 0 ACR ENA OFF DIR MCS 1 0 full step 15 1 16 step CUR structure Bit 7 6 5 4 3 2 1 0 Value N A 0 Phase Current e g 27 2 7 Amp VO V2 is the converted value for desired speed 16 bits Figure 12 1 P0 P4 is the converted value for desired displacement 32 bits Figure 12 2 Note Turns off the dual H bridge motor driving circuit Once controller is OFF most devices of controller
50. ed to the TTL output control 1 MCF The P4IE bit MCFG lt 3 gt of the master configuration register enables disables the P4 real time change notification RTCN For details please refer to section 5 1 2 SCF is used to configure the register S34CON S34CON is shared by Sensor 3 and TTL output When it works as TTL output it definds the relationship between events and outpult level 3 DOU is used to directly control the TTL output voltage level as well as check current voltage level 10 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 SCF When writing to it user needs to affix a 4bits suffix code to point to this register The suffix code for S34CON is 0001 binary In addition S84CON is also used for sensor input control In this chapter only the TTL output control related configuration is described S34CON Structure Bit 15 14 13 12 A 10 9 8 7 6 5 4 3 2 1 0 Defination STALL P4LVL P4EVENT S3RACT S3FACT Bit 15 12 Blocked alarm UI Robot Technology Co Ltd M4220130827EN Page 55 UIM24202 04 08 IE Action code after blocked is as follow ACT binary Action RTCN or Not 0000 N A No RTCN Ignore MCFG lt S2lE gt 0001 N A Depends on MCFG lt S2IE gt 001
51. ee sampling mode 1 Continuous sampling 2 Intermittent sampling 3 Single sampling Continuous Sampling In continuous sampling mode UIM242 controllers detect level fluctuation at port 1 S2 S3 uninterruptrdly Once a fluctuation happens controllers will call corresponding program execute pre set actions and or send a message to user device If user sets the sampling interval to 0 by using instruction STG the controllers will work in continuous sampling mode Intermittent Sampling In intermittent sampling mode user needs to set sampling interval T 1 60000ms at first Once a fluctuation is detected at one port UIM242 controllers will not detect the level fluctuation at this port until T 1 ms later When working in this mode it is available for prevention and treatment of disturb and shake eliminating of digital input If user sets the sampling interval to T 1 60000 by using instruction STG the controllers will work in intermittent sampling mode and sampling interval is T Single Sampling In single sampling mode once a fluctuation is detected at one port UIM242 controllers will not detect the level fluctuation at this port until user configures the corresponding control bit of S12CON or S84CON again If user sets the sampling interval to T gt 60000 by using instruction STG the controllers will work in single sampling mode 8 4 Sensor Event Action and Binding UIM242XXs support 8 sensor events as lis
52. eeaas 52 Encoder and closed loop COntrol cccssssencsseeeeeseseeneseeeeneuseeeeeeseeeeeenseeeeeasseeeeeseeeeeenseeeeeasseeeeaneeeeeeneneenens 53 Enable Disable Encoder and Closed loop Module MCEO 53 Edel lu CEET 54 TT Output eoptrol eee00NEEOEREEdEEEEENEEE ENEE secur stead esdereuedesuteerendeenbedctetesnadeeneneeeurencees 55 Introduction to TTL Output Control Instructions eee eeeceeeeeeeeneeeeeeeeeeeeseeeeseaeeseeeeseaeeseeeeseaeessatessaeeseaeeeaas 55 TTL Output Control Register SQ4CON ceceeececseeeeeeeeseeeeeeeeeeeeeeeeecaeeeaeeesaeeteeesiaeeseeesaeeseeeessaeeseaeenaas 55 Output Control Configuration Instruction SCF oo eeceeesceseseeeseeeseeeeeeeeeseeeeeeeeeseaeeeaeeeseaeeseeeseaeesnaeessaeeseates 56 JE Tele BEE 56 Example of TTL Output Control and S34CON Confiouraton 56 Regeneration discharge ccssseenssseennseeeenseeeneesseeeeeseeeeserseeeeeassenesaseeeeeeaseneseaseneeeaseneeeedseneeeaseneneasenenens 58 Regeneration Electric Energy ieies i N a a A a aa 58 UIM Regeneration Discharge Module 58 aeaaea aa E EEATT T E T 59 Instruction te 59 Feedback Message Structures ss a deer ENEE EES Eed 59 Instruction RI le 62 Check desired Motor Status sss cite eee EE Ee 62 ACRn Set auto current reduction ratio cee eeesceeeesceeeeeneeeeeeeneeeeeeneeeseaeeeeseaeeeeseaaeeeseaeeeeneneeeesseaeeerenaeeees 63 ACR Check auto current reduction ratio eceeecceeeeeeeeeeeeeeeeeeeeeeneeeeeeessaeeeaeeeesaeeteeeesaee
53. eeeseeeeeaeeeeeeeeseeeseeeseeeseeeeeieeeseeeeeaes 97 36 SFB Check Sensor Data sci ders eich tebe is asec te eas atten te Whee eed Eegen ie reese aa 98 37 SPD Speed Adjusting i 0 soit eed A eae Si a ee eee ed Se ee a A 99 38 SPD Check Current Speed muinin n a aa a ei a a e e a a eaat 100 39 SQTn Set Tolerance of Blocked Alam eecceeecceeeeeeeseeeeeeeeeneeeeeeeeeneeeeeeeeeeeeseeeeeeeeseaeeseeeseaeesnaeeseaeeenaeess 101 40 STGxn Set Digital Input Sampling Mode e 102 41 STG Check Digital Input Sampling Mode 103 42 STO EEPROM Store s dE ik de EES DER 104 43 STOn Parameter Banding issscectscee desserts a Ee Sie et epee et Soe 105 44 STP Displacement Control 20282 peed Mae a ee ERR de 106 e GEAR Gene 107 Page 18 M4220130827EN UI Robot Technology Co Ltd UIM242 Miniature Integrated Stepper Motor Controller Closed loop 1 0 OVERVIEW UIM242XX are miniature integrated stepper motor controllers with CAN2 0B Active bus communication capability UIM242 has a size of 42 3mm 42 3mm 16 5mm and is designed to mount onto NEMA17 23 34 42 stepper motors seamlessly UIM24202 can provide 0 7 2A output current UIM24204 can provide 1 5 4A output current UIM24208 can provide 3 8A output current Current value is adjustable within the range through instructions Once set the value is stored in EEPROM UIM242XX controller also has the function of high speed current compensation to offset the effect of Back Electromotive Force BEMF of motor at high speed and t
54. er can use instructions e g FBK POS SPD etc to get the current status of the motor In this chapter the Advanced Motion Control processes are introduced 7 1 Linear Acceleration Linear acceleration is defined as acceleration at constant rate The relationship between the speed and time is shown in figure 7 1 After the acceleration rate and desired speed is set MAC and SPD UIM242 controller will perform the acceleration process automatically Figure7 1 Linear Acceleration Control Acceleration Rate Desired Speed Current Speed T Time 7 2 Linear Deceleration Linear deceleration is defined as deceleration at constant rate The relationship between the speed and time is shown in figure 7 2 After the deceleration rate and desired speed is set MDE and SPD UIM242 controller will perform the deceleration process automatically Figure7 2 Linear Deceleration Control Speed Current Speeed Uniform Deceleration Desired Speed T Time 7 3 Nonlinear Acceleration To minimize the response time and to avoid resonance point user can use UIM242XX s non linear acceleration function Experiments show that through non linear acceleration Page 36 M4220130827EN UI Robot Technology Co Ltd UIM242 Miniature Integrated Stepper Motor Controller Closed loop UIM242XX can make NEMA17 23 4000RPM quad step in 0 25 seconds UIM242XX controller has the following non linear acceleration functions If the desired s
55. er to Section 5 4 9 2 Instruction List The following table shows the instructions mentioned in this chapter the detail of those instructions is descriped at the end of the document Instruction Description Page QECn Set desired quadrature encoder s position n 91 QEC Check current quadrature encoder s position 92 QERn Set quadrature encoder s resolution n 93 QER Check quadrature encoder s resolution 94 SQT Set tolerance of blocked alarm 101 Page 54 M4220130827EN UI Robot Technology Co Ltd UIM242 Miniature Integrated Stepper Motor Controller Closed loop 10 0 TTL OUTPUT CONTROL UIM242 controller has an optional TTL Output Control Module sold separately that supports 1 channel of TTL level output This output port P4 is capable of providing 20mA sourcing or sinking current In practice please keep the current as low as possible to prevent overheating the controller Port P4 also can output setting level when detects events list below pre configuration 1 Run Stop status The output voltage level is determined by if the speed is zero or not 2 Direction change The output voltage level is determined by if the current motor direction is forward or reverse 3 Origin point hit The output voltage level is determined by if current position is zero point or just crosses over the zero point 10 1 Introduction to TTL Output Control Instructions There are 3 instructions relat
56. et deceleration MDE Similar to mACC the deceleration also has two ways to set as listed below UI Robot Technology Co Ltd M4220130827EN Page 41 UIM24202 04 08 IE Value mode 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 value of the deceleration rate The range of the input value is 1 65 000 000 and unit is pulse sec sec or pulse square second Period mode Ir the DM bit of Master Configuration Register is set to one MCFG lt DM gt 1 then the value of the instruction will be interpreted as the period of the acceleration or in other words the time used for motor to decelerate to the desired speed from current speed The range of the input value is 1 60 000 milliseconds i e 0 001 60 seconds 4 Set maximum starting speed MMS 5 Set maximum cessation speed MMD 6 Set backlash compensation value BLC Max starting speed and max cessation speed has been described in front section The unit of MMS and MMD are pps Figure7 12 Two modes to Set the of Acceleration Rate 1 Acc Period L Desired Speed Max Start Speed 2 Acc Rate Slope Current Speed T CN TaD 7 9 Enable disable Advanced Motion Control Module MCFG Advanced Motion Control Module can be enabled or disabled by setting the CM bit of MCFG MCFG lt 10 gt Setting the CM bit MCFG lt CM gt 1 will enable the module and clearing the CM
57. figuration Register hardware version 1232 or bhiober 27 5 2 e Ee EE 28 5 3 User PROG ramet retest RENAN ica eet REA gee Ee EE 28 5 4 Master Configuration Register minista Sates eat Bath cade a ect ce eege ee eee Eai 28 5 5 IMSTHUCTION EIST ere de EE ebe SE Opeth ebe Dee dien 29 6 0 Basic Control Instructions esccccsiccc25 d ses est deeg ee Seege Eege 30 6 1 General Introduction of Motion Control Modes AAA 30 6 2 Basic Instruction Acknowledgment ACK sssssssssseessesirertesittsitstistrnstnstintttnntntttntentttnstnastnntnnntnnetnnen nenna 33 6 3 Motor Status Feedback Message 34 6 4 INSTRUCTION BEER 35 7 0 Advanced Motion Control isiescssecisces ccsetecsnesececaiccsneccsctecsiie nanmanna aaan amaai daanan aAa nanoia n 36 7 1 Linear Accel ratiofie nea e ee ee ee ee 36 7 2 Linear Deceleration 4 cteAseest cit sedate ee ee ee i ee 36 7 3 Nonlinear Accel ration EE 36 7 4 Nonlinear Decelerationis ree e a et ke ee ae 38 Z S curve Displacement Control cir acest cece nti ci este iin ni a in cei 39 7 6 Direction Control and Position Counter cccccccceeseseceeeseeeeeseneeeeseeneeecceaeeeeuseeeesseaeeesecaeeeeseaseeesseeeeessaeees 40 7 7 Ee E ee lu E TEE 41 7 8 Advanced Motion Control Instructions ccccecceeececeeeeeeeeeseeeeeeeeeseeeeeaeeesaeeeaeeeseeesseeeseeeeeeeseeeeieeeseeeeeaees 41 7 9 Enable disable Advanced Motion Control Module MCFG ecceeecceseeeeeseeeeeeeeeneeseeeeeneeeseaeeeneeeseaeee
58. ge etc Speed input range is 65 000 pulses sec and displacement input range is 2 000 000 000 pulses Absolute Position Counter Quadrature Encoder Interface UIM242 has a hardware pulse counter The counter can be reset either by user instruction or automatically by the configurable sensor input event Under most conditions through the advanced motion control this counter can provide the absolute position of the motor with enough accuracy When the counter reaches zero position there could be automatically generated message feedback to the user device given the corresponding configuration through user instruction UIM242 controller has Quadrature Encoder Interface and can work with quadrature encoder when sensor input module is installed Furthermore with the encoder based closed loop control module the UIM242 can perform self closed loop control Real time Change Notification RTCN Similar to CPU s interrupters UIM242XX can automatically generate certain messages after predefined events and sends them to the user device The time is less than 1 millisecond from the occurring of the event to the message being sent Message transfer time depends on the baud rate of the RS232 setup The transfer time will be less than 1 millisecond if the baud rate is set to 57600 UIM242XX s RTCN system supports 12 events displacement control done absolution position reset sensor 1 2 3 rising edge and falling edge analog input beyond upper
59. gurating sensor 1 2 3 D1 DO 0000 0001 0002 EA60 denotes that the sensor will not be triggered until 0 1 2 60000ms after last sampling This can eliminate the shake of sensor signal D1 DO gt EA60 denotes signle sampling once triggered the S12CON For S1 S2 and S34CON For S3 must be configurated again ACK AA Controller ID C9 SO S1 S2 S3 S4 S5 S6 S7 S8 FF Comment CO gt gt Message ID of instruction STGxn SO S8 gt gt Received data 0 8 SO S2 is the converted value for sampling mode of sensor 1 16 bits Figure 12 1 S3 S5 is the converted value for sampling mode of sensor 2 16 bits S6 S8 is the converted value for sampling mode of sensor 3 16 bits Example Requirements 1 Sensor 1 2 Intermittent mode interval is 200ms Then 1 IDX 00 hexadecimal 2 D1 DO 200 decimal 00C8 hexadecimal So DO C8 D1 00 hexadecimal 3 Then send instruction STGx C8 00 00 Page 102 M4220130827EN UI Robot Technology Co Ltd UIM242 Miniature Integrated Stepper Motor Controller Closed loop 41 STG Check Digital Input Sampling Mode Format STG Description Check digital input sampling mode of S1 S2 H S3 ACK AA Controller ID C9 SO S1 S2 S3 S4 S5 S6 S7 S8 FF Comment Refer to ACK comment of instruction STGxn UI Robot Technology Co Ltd M4220130827EN Page 103 UIM24202 04 08 IE 42 STO EEPROM Stor
60. hapter the detail of those instructions is descriped at the end of the document Instruction Description Page ACRn Set auto current attenuation ratio n 63 ACR Check auto current attenuation ratio 64 CURn Set output phase current n 67 ENA Enable H bridge circuit 70 ENAn Set enable time boot after n ms enable 71 ENAXxFFFF Check enable time 72 FBK Check current motor status 73 MCSn Set micro stepping resolution 80 OFF Disable H bridge circuit 88 ORG Set zero origin position 89 ORGn Reset the position to a given value n 90 SPDn Set the desired speed n 99 SPD Check current speed 100 STPn Set desired incremental displacement n 106 STP Check current incremental displacement 107 UI Robot Technology Co Ltd M4220130827EN Page 35 UIM24202 04 08 IE 7 0ADVANCED MOTION CONTROL UIM242XX has an optional Advanced Motion Control Module sold separately to perform linear non linear acceleration deceleration and S curve displacement and position control User can specify corresponding motion control parameters through instructions Instructions for the advanced motion control includes all the basic motion instructions and 6 additional instructions Values of these instructions will be stored in the EEPROM the burning process will not affect any real time process Once the parameters are set the controller will perform the advanced motion control automatically At any time us
61. he acceleration rate 32 bits Figure 12 2 Page 76 M4220130827EN UI Robot Technology Co Ltd UIM242 Miniature Integrated Stepper Motor Controller Closed loop 16 MAC Check Current Acceleration Rate Format MAC Description Check current acceleration rate ACK AA Controller ID B1 FG A0 A1 A2 A3 A4 FF Comment Refer to ACK comment of MACn UI Robot Technology Co Ltd M4220130827EN Page 77 UIM24202 04 08 IE 17 MCFn MCFxn Master Configuration Register Instruction Format MCFn or MCFxn Description Setup Master Configuration Register 1 If n is decimal Use format MCFn Where n 0 1 65535 16 bits unsigned integer 2 If is hexadecimal Use format MCFxn Where n has 2 bytes and the structure is as follow Byte W 1 Where D1 DO compose a hexadecimal 16bit data D1 is high DO is low For example Master Configuration 0x1234 Then send instruction MCFx 34 12 Each Byte must have an even number of digits or letters ACK AA Controller ID BO CO C1 C2 FF Comment BO gt gt The Message ID of MCF CO C2 gt gt Received data 0 2 CO C2 is the converted value for the value of master configuration register 16 bits Figure 12 1 Note If n using decimal first convert the 16 bits binary number to a decimal based number Example Instruction MCF34611 or MCFx8733 ACK AA 05 BO 02 OE 33 FF Comment Convert 02 0E 33 to 16 bits 2Bytes da
62. herefore to facilitate motor s high speed performance UIM242XX series of controllers work with 12 40VDC power supply UIM242XX can perform encoder based closed loop motion control The control system comprises communication system basic motion control system absolute position counter quadrature encoder interface and real time event based change notification system There are also four optional modules to be added on customer request Advanced Motion Module linear non linear acceleration deceleration S curve PV PVT displacement control Encoder based Closed loop Control Module Sensor Input control Module and User Program Module The embedded 64 bit calculation precision DSP controller guarantees the real time processing of the motion control and change notifications similar to the interrupters of CPU Entire control process is finished within 1 millisecond UIM242 controller applies CAN2 0B communication protocol which due to its high speed 1 million bit rate long distance 10km transference and high noise immunity is widely used in applications with serious signal interference and yet requiring high reliability such as automobile industry automated manufacturing and traffic control The whole CAN bus network is based on a twisted wire pair Similar to the network of home appliances multiple UIM242 controllers are connected to the twisted pair in parallel just like multiple pulps connected to the two wire power cord CAN bus netwo
63. imal 16bit data D1 is high DO is low Example Initial Configuration 0x1234 Then send instruction ICFx 34 12 ACK AA Controller ID DA CO C1 C2 FF Comment DA gt gt Message ID of instruction ICFxn CO C2 gt gt Received data 0 2 CO C2 is the converted value for the value of initial configuration register 16 bits Figure 12 1 Note Require controller hardware version being 1232 or higher Page 74 M4220130827EN UI Robot Technology Co Ltd UIM242 Miniature Integrated Stepper Motor Controller Closed loop 14 ICF Check Initial Configuration Register Format ICF Description Check initial configuration register ACK AA Controller ID DA C0 C1 C2 FF Comment Refer to ACK comment of ICFxn Note Require controller hardware version being 1232 or higher UI Robot Technology Co Ltd M4220130827EN Page 75 UIM24202 04 08 IE 15 MACn Set Acceleration Rate Format Description ACK Comment MACn Set the acceleration rate to n n 1 2 65 000 000 Pre requiring MCFG lt AM gt 0 value mode n 1 2 60 000 Pre requiring MCFG lt AM gt 1 period mode AA Controller ID B1 FG A0 A1 A2 A3 A4 FF B1 gt gt The message ID of MACn FG gt gt Equal to the AM bit of the MCFG Denote the input mode value period FG 1 unit ms FG 0 unit pps s A0 A4 gt gt Received data 0 4 A0 A4 is the converted value for the value of t
64. including MOSFET are turn off the motor is free and the logical circuit can work Page 88 M4220130827EN UI Robot Technology Co Ltd UIM242 Miniature Integrated Stepper Motor Controller Closed loop 28 ORG Reset Position Counter Format ORG Description Reset the position encoder counter to zero 0 is equivalent to instruction ORG 0 ACK AA Controller ID B7 PO P1 P2 P3 P4 FF Comment Please refer to 31 POS UI Robot Technology Co Ltd M4220130827EN Page 89 UIM24202 04 08 IE 29 ORGn Reset Position Counter Format ORGn Description Reset the position encoder counter to a given value n n 2147483647 2147483647 signed integer n 0 reset the position encoder counter to zero 0 n 0 reset the position encoder counter to a given value n ACK AA Controller ID B7 PO P1 P2 P3 P4 FF Comment Please refer to 31 POS Page 90 M4220130827EN UI Robot Technology Co Ltd UIM242 Miniature Integrated Stepper Motor Controller Closed loop 30 QECn Set desired quadrature encoder s position Format QECn Description Set desired encoder position to n n 2 000 000 000 1 0 1 2 000 000 000 ACK AA Controller ID B8 Q0 Q1 Q2 Q3 Q4 FF Comment B8 gt gt Message ID of desired encoder position QO Q4 gt gt Received data 0 4 Q0 Q4 is the converted value for desired encoder position 32 bits Figure 12 2
65. is using SPDy During the motion once actual direction NOT desired direction is plus P4 will output 5V and RTCN Vice verse NO a P to Gei UI Robot Technology Co Ltd M4220130827EN Page 57 UIM24202 04 08 IE 11 0 REGENERATION DISCHARGE 11 1 Regeneration Electric Energy Regeneration electric energy is the electric energy generated when the UIM all in one motor works in generator mode The motor will work in generator mode when following situation 1 Deceleration reversal cuased by external force or its own rotor inertance Overlarge deceleration in the controlled moderating process Motion drived by the reversed towing caused by load on vertical axis Continuous motion caused by load Ss EG Je Motion caused by rotor intertance unexpected off line and shutoff of the H bridge MOS Generally the electric energy can be absorbed when charging the smoothing capacitor of UIM controller Charge accumulation of the capacitor in a short time will cause pumping voltage and direct voltage rise Once the pumping voltage is higher than the voltage those control devices can withstand the controller will be damaged For example a NEMA 34 motor runs at a speed of 300rpm or higher once it receives an instruction to stop or turn off the controller will be damaged When the load of a NEMA 34 motor makes it reversed towing the pumping voltage on MOS of H bridge will higer than 100V then the controller will be damaged 11 2
66. l pulse sended to motor is controlled by displacement counter The actual motor displacement is also relative to the micro stepping resolution or encoder resolution If an STPO instruction is received before the former STP instruction is completed UIM242 will execute the current instruction and stop motor The former STP instruction is regarded as being completed Meanwhile system will shift from PT mode to VT mode If an STP instruction is received while the motor is already running the former steps will not be counted in the displacement of current STP instruction Example For a 1 8 stepper motor if STP 200 pulse User sent STP200 If MCS 1 motor rotation angle 1 8 200 360 If MCS 16 motor rotation angle 1 8 200 16 22 5 Page 106 M4220130827EN UI Robot Technology Co Ltd UIM242 Miniature Integrated Stepper Motor Controller Closed loop 45 STP Check Displacement Format STP Description Check current incremental displacement ACK CC Controller ID B3 PO P1 P2 P3 P4 FF Comment B3 gt gt The message ID of current incremental displacement PO P4 gt gt Received data 0 4 PO P4 is the converted value for the current incremental displacement 32 bits Figure1 1 2 UI Robot Technology Co Ltd M4220130827EN Page 107 UIM24202 04 08 IE APPENDIX A DIMENSIONS DNH inh Sa Units mm Page 108 M4220130827EN UI Robot
67. lacement control Depends on MCFG lt S2IE gt lt S1IE gt 1010 Start and Run Forwardly Depends on MCFG lt S2IE gt lt S1IE gt 1011 Reset position Decelerate until Stop Depends on MCFG lt S2IE gt lt S1IE gt 1100 Reset position Emergency Stop Depends on MCFG lt S2IE gt lt S1IE gt 1101 Forward Displacement Control Depends on MCFG lt S2IE gt lt S1IE gt 1110 Change direction and run Depends on MCFG lt S2IE gt lt S1IE gt 1111 OFF Depends on MCFG lt S2IE gt lt S1IE gt 8 8 Analog Threshold Control Register ATCONH amp ATCONL ATCONH Analog Threshold Control High and ATCONL define the upper and lower limit of the analog threshold Both registers are 16bits registers in the controller memory space configured through SCF instructions However when configuring user needs to affix a 4bits suffix code to point to a specific register The suffix code for ATCONL is 0010 binary the suffix code for ATCONH is 0011 binary ATCONH structure is as follows UI Robot Technology Co Ltd M4220130827EN Page 49 UIM24202 04 08 IE Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Defination Reserved AH lt 11 0 gt Bit 15 12 Unimplemented read as 0 Bit 11 0 AH lt 11 0 gt Upper limit of analog threshold ATCONL structure is as follows Bit 15 E 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Defination Reserved AL lt 11 0 gt Jr 15 12 Unimplemented read as 0 fi 11 0 AL lt 11 0 gt Lower limit of analog threshold i Note ATCONH A
68. le 2 wire interface max 1M bps operation long distance 6 independent motion parameter group Differential bus high noise immunity Pre set action controlled by I O max 100 nodes y O real time event based change Embedded DSP Microprocessor notification Hardware DSP 64bits calculating 12 real time event based change precision notifications Simple instructions intuitive and fault 13 programmable actions tolerating intelligent control intuitive and fault SE tolerating Initial status configurate SDK and underlying control drive of Auto lock when emergency host User program Re ee deme Regeneration discharge module sold separately H product Max supply voltage is 50V is custom made please contact with salesmans before purchase Page 4 M4220130827EN UI Robot Technology Co Lid UIM242 Miniature Integrated Stepper Motor Controller Closed loop General Description UIM24202 UIM24204 UIM24208 are miniature stepper motor controllers with CAN network interface UIM242 controllers can be mounted onto NEMA17 23 34 42 series stepper motor through adapting flanges Total thickness of the controller is less than 16 5mm With UIM242 controller it is simple to construct a control system Users can control the whole motor sensor third party actuator system through their own CAN based host by using SimpleCAN protocol Users also can contr
69. ltage is 50V is custom made please contact with salesmans before purchase Communication Ambient Temperature 25 C Protocol Active CAN 2 0 Wiring method 2 wire CANH CANL e Supports 1 Mb s operation e ISO 11898 standard physical layer requirements e Short circuit protection CAN bus drive e High voltage transient protection e Auto thermal shutdown protection e Up to 100 nodes can be connected e Differential bus high noise immunity Environment Requirements Cooling Free air Working environment Avoid dust oil mist and corrosive gases Working temperature 40 C 85 C Humidity lt 80 RH no condensation no frosting Vibration 3G Max Storage temperature 50 C 150 C Page 14 M4220130827EN UI Robot Technology Co Lid UIM242 Miniature Integrated Stepper Motor Controller Closed loop Size and Weight Size 42 3mm x 42 3mm x 16 5mm Weight 0 1 kg UI Robot Technology Co Ltd M4220130827EN Page 15 UIM24202 04 08 IE CONTENTS Terminal GeSCriptiOn T P ccccsseenesseeeesseeeneeseeeesenseeeeeaseeeeenseeessaseneeeasseeeseaseeeseaseneeeasseneseaseeeesassneeeasseneeeneeneeeassneaeenes 6 Terminal deSCriptiOn D cecsessenseeeeeeeeeeeneeseeeeeenseneeeaseeeseneeeeeeaseneeeasseeeseaseeseasseeesasseeeeaseeeesassneeeeseeneeeaseneeeasseeeenes 7 Typical Application cecesessenneeeeeeenseeeeesseeensaseeeeeaseneeeaseeeeea
70. n speed control In the entire trajectory there is no knee point which makes the motion very smooth without impact or vibration The control process is shown in figure 7 9 Figure7 9 S curve Relative Displacement Control case 1 Desired Speed Uniform Acceleration i E Deceleration T Time Angular Displacement Stop Position Start Position In the control process UIM242XX s advance motion control module will continuously calculate the deceleration happening point time and then perform the deceleration to guarantee that when desired displacement is reached the speed is right zero The entire calculation time is around 20 micro seconds with 64bit accuracy In practice when the desired displacement is small and the desired speed is high deceleration starts before the desired speed is achieved to ensure that the speed decelerate to right zero when desired displacement is completed The process is shown in figure 7 10 UI Robot Technology Co Ltd M4220130827EN Page 39 UIM24202 04 08 IE Figure7 10 S curve Relative Displacement Control case 2 Desired Speed Uniform Uniform Acceleration za Ge Deceleration T Time All the acceleration deceleration methods may be applied in the S curve displacement control including linear acceleration deceleration and non linear acceleration deceleration which is not described in the above figures though Please note that for the non linear acceleration deceleration as ther
71. nstruction STO Require controller hardware version being 1232 or higher This instruction will affect real time performance It takes around 15 ms for the instruction to be executed It is recommended that sending this instruction when the motor is idle and wait 20ms before sending other instructions Before set parameters disable the controller first Default setting for STOO 300 300 0 0 0 0 it can be configurated by instruction Parameters for each edge can be different Not all parameters are needed the non value parameter will be assigned as the value of parameters for STOO Disable the controller OFF Set 1st group of parameters Gu STPn MACn MDEn MMSn MMDn Banding it to rising edge of S1 STO2 Set 6th group of parameters SPDyn STPn MACn MDEn MMSn MMDn Banding it to falling edge of S3 STO7 UI Robot Technology Co Ltd M4220130827EN Page 105 UIM24202 04 08 IE 44 STPn Displacement Control Format STPn Description Set the desired incremental displacement i e the displacement relative to current position n 2147483647 2147483647 signed integer ACK AA Controller ID B6 PO P1 P2 P3 P4 FF Comment B6 gt gt The message ID of STPn PO P4 gt gt Received data 0 4 P0 P4 is the converted value for the desired motor displacement 32 bits Figure10 2 Note Displacement is essentially defined as counts of the pulse or encoder counter Actua
72. of absolute position The quadrature signals from encoder can be decoded into four types of messages the order of which reverse when rotation direction is reversed The phase signals and index pulses are detected by encoder and further decoded to produce a count up pulse for one direction of shaft rotation or a countdown pulse for the other direction of shaft rotation UIM242 controller has a built in quadrature encoder hereinafter referred to as encoder interface circuit which is capable of decoding encoder signals of less than 200KHz input Another option is user can connect external encoder of their own choice to UIM242 controller using S1 and S2 ports for channel A and B In this case however INDEX decoding function is not available S1 S2 supports 0 5V TTL input The input range for S1 and S2 ports of UIM242 controller is 0 3V 5 3V Any input beyond this range can result in permanent damage Also for this case encoder power supply is to be provided by user For UIROBOT UIM242 controller with internal encoder the S1 and S2 ports are not occupied and therefore are available for sensors Whether the encoder is built in or external the controlling mode and the instructions are the same Instructions relative to encoder control function are listed below Instruction Function Example 1 MCF enable encoder function MCF 1792 2 QEC encoder based position control QEC 200000 3 STP encoder based displacement control S
73. of the completion of the instruction Before a new instruction is received UIM242XX will keep current working status e g running stop etc 2 1 UIM242 Message Communication Mode Host computer realizes motion control through message Furthermore host obtain controller status and controller update feedback information to host also through message Therefore user must know the structure of the message first Message of UIM has two forms listing below 1 String based on RS232 Figure 2 1 and 2 CAN message based on UI simpleCAN Figure 2 2 If there is no special version all messages are based on RS232 in this manual For details of CAN message please refer to Ul simple CAN programming manual or contact with technical support of Ulrobot Host sends string message to Ul gateway UIM2501 through RS232 serial port then the gateway converst the message into CAN message based on SimpleCAN and sends it to specified UIM242 controller Similarly feedback message sent by UIM242 is based on SimpleCAN the gateway converts it to string based on RS232 and sends it to host Figure 2 1 Hardware scheme for communication based on RS232 string Work node SEH y Work node Gateway UIM2501 Work node Figure2 2 Hardware scheme for communication based on CAN message USBC9100 Work ode Work node Gateway ing Work node Page 22 M4220130827EN UI Robot Technology Co Ltd UIM242 Miniature Integrated
74. ol case 1 Current Speed Uniform Deceleration Desired Speed Maximum Cessation Speed T Time If desired speed is lower than the Max Cessation Speed and current motor speed is higher than the Max Cessation Speed the Uniform Deceleration Control will be first applied and followed by a step deceleration to the desired speed Figure7 7 Nonlinear Deceleration Control case 2 Current Speed Uniform deceleration a Step Deceleration Maximum Cessation Speed Desired Speed T Time If the desired speed is lower than the Max Cessation Speed and current motor speed is lower than Max Cessation Speed then the speed will be adjusted to the desired speed through step deceleration Figure7 8 Nonlinear Deceleration Control case 3 tep Deceleration Maximum Cessation Speed Current Speed Desired Speed T Time Page 38 M4220130827EN UI Robot Technology Co Ltd UIM242 Miniature Integrated Stepper Motor Controller Closed loop Note Setting the Maximum Starting Speed or the Maximum Cessation Speed to 0 zero will force the controller use Linear Acceleration Deceleration Control Algorithm 7 5 S curve Displacement Control S curve displacement control essentially is the displacement control under the linear acceleration and deceleration speed control The name is originated from the shape of the motion trajectory The original S curve displacement control is the acceleration coast deceleratio
75. ol the system through a gateway produced by Ulrobot such as UIM2501 USBC9100 and PCI120 by using RS232 based string or SimpleCAN protocol One gateway can network with up to 100 UIM242 controllers UIM242 can realize open loop and encoder based closed loop control Its architecture includes communication system basic motion control system advanced motion control module linear non linear acceleration deceleration S curve PT PVT displacement control sensor input control module TTL output control module and user programming module Embedded 64 bit calculating precision DSP controller guarantees the entire control process finish within 1 millisecond Instructions are simple and intuitive UIROBOT provides free Microsoft Windows based VB VC demo software and corresponding source code Enclosure is made of die cast aluminum to provide a rugged durable protection and improves the heat dissipation UI Robot Technology Co Ltd M4220130827EN Page 5 UIM24202 04 08 IE TERMINAL DESCRIPTION T P Figure0 1 Terminal Description Motor Terminals Control Termianals Control Terminals a Designator Description 1 V Supply voltage 12 50VDC 2 GND Supply voltage ground 3 CANH CAN signal dominant high 4 CANL CAN signal dominant low 5 AG Analog ground for sensors 6 S1 Sensor input port 1 7 S2 Sensor input port 2 8 S3 Sensor input port 3 9 P4 TTL signal output port Motor
76. ons as well as the activation of corresponding RTCNs It is a 16bits register inside the controller and can be configured using the instruction SCF When writing to it user needs to affix a 4bits suffix code to point to this register For details of SCF please refer to chapter 10 The suffix code for S12CON is 0000 binary S12CON structure is as follows 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 S2RACT S2FACT S1RACT S1FACT tion Bit 15 12 S2ZRACT lt 3 0 gt S2 Rising edge Action Bit 11 8 S2FACT lt 3 0 gt S2 Falling edge Action Bit 7 4 S1RACT lt 3 0 gt S1 Rising edge Action S1FACT lt 3 0 gt S1 Falling edge Action The binding relationship between S1 and S2 sensor events and actions is as follow Bit 3 0 ACT Code binary Action RTCN or Not 0000 N A No RTCN Ignore MCFG lt S2IE gt lt S1IE gt 0001 N A Depends on MCFG lt S2IE gt lt S1IE gt 0010 Start and Run Reversely Depends on MCFG lt S2IE gt lt S1IE gt 0011 Decelerate until Stop Depends on MCFG lt S2IE gt lt S1IE gt 0100 Emergency Stop Depends on MCFG lt S2IE gt lt S1IE gt 0101 Reverse Displacement Control Depends on MCFG lt S2IE gt lt S1IE gt 0110 Reset position Depends on MCFG lt S2IE gt lt S1IE gt 0111 Reset position Dispalcement Control Depends on MCFG lt S2IE gt lt S1IE gt 1001 Direction change displacement control Depends on MCFG lt S2IE gt lt S1IE gt 1010 Start and Run Forwardly Depends on MCFG lt S2IE gt l
77. op the motor by sending OFF 2 Weare not interested in the rising edge so set S2CRACT lt 3 0 gt 0000 3 It is required Start and Run Reversely on S2 failing edge so set S2FACT lt 3 0 gt 0010 Same as 2 set S1RACT lt 3 0 gt 0000 It is required Start and Run Forwardly on S1 failing edge so set S1FACT lt 3 0 gt 1010 Fill the S12CON with above bits get S12CON 0000 0010 0000 1010 binary Affix the suffix code 0000 to S12CON get SCFG 0000 0010 0000 1010 0000 binary 0x20A0 hex 8352 decimal 8 Send instruction SCFx 20A0 or SCF 8352 9 Setup desired speed by sending instruction SPD 5000 10 Burn parameters into EEPROM by sending STO 11 Press any one of the limit sensors the mobile platform will work 12 Disconnect the user device and restart the UIM242 controller the system will automatically run UI Robot Technology Co Ltd M4220130827EN Page 51 UIM24202 04 08 IE 13 If enable auto feedback once the motor touches limit switch user device will receive a feedback message of falling edge on port S1 S2 8 11 Example of ATCONH ATCONL Configuration Similar to S12CON configuration user needs to first fill every bit of the ATCONH ATCONL according to the information provided in previous sections and then affixes the suffix code 0011 0010 An example is provided below System Description A reciprocating mobile platform has one linear potentiometer attached to the mobile table
78. or ATCONL get SCFG 0000 0001 1110 1011 0010 binary 0x1EB2 hex 7858 decimal 14 Send instruction SCF x1EB2 or SCF 7858 15 Set desired speed by sending instruction SPD 5000 16 Burn parameters into EEPROM by sending STO 17 Send instruction ENA 18 The system starts to work continuously 19 Disconnect the user device and restart the UIM242 controller the system will automatically run Page 52 M4220130827EN UI Robot Technology Co Lid UIM242 Miniature Integrated Stepper Motor Controller Closed loop 9 0 ENCODER AND CLOSED LOOP CONTROL Quadrature Encoder also known as Incremental Encoder or Optical Encoder is used for tracking the angular position and velocity of rotary motion It can be applied for closed loop control of various motors A typical quadrature encoder consists of a slotted wheel for motor shaft and a transmitter detection module for detection of the slot on the wheel Usually there are 3 channels channels A B and Z INDEX Information from the three channels can be read and decoded to provide motion status of shaft including position and velocity The relationship between channel A QEA and channel B QEB is as simple as which phase leads When phase A leads B then the shaft is rotating in the clockwise direction When phase B leads A then the shaft is rotating in the counter clockwise direction Channel Z is called index pulse which is generated per revolution as a reference for tracking
79. otor Absolute position counter value can be read through POS instruction Displacement counter is mainly used for displacement control The former information is cleared when it receives a new displacement instruction It can also be used to record the displacement since last time it was cleared 7 7 Backlash Compensation Backlash is a ubiquitous matter for mechanical system e g screw nut transmission or gear rack transmission For example there is a gap between screw and nut once the rotation direction is change in certain angle though the screw is turing the nut will not drive the table moving until the gap is eliminate this gap is known as backlash which is reflected in the rotation angle of screw Quantitatively if the screw rotates clockwise to drive the nut moving 5mm forward then rotates anticlockwise for the same cycles the nut will moving backword 4 99mm the difference between the two value is the backlash Because of backlash once reverse motion starts the accumulative error will increase until the backlash is compensate then the accumulative error tends to be steady The influence caused by backlash is considerable in a reciprocating motion UIM242 controllers provide the function of backlash compensation to reduce the influence on mechanical transmission accuracy To compensate backlash user needs to set a reference backlash first then once there is a backlash user can compensate it by sending instruction BLC
80. ow Error Message If the received instruction is incorrect UIM242 will issue an error message and the incorrect instruction will not be executed EE Error Code FF Where EE denotes an error message The error code is list below Error Code 65 66 Meaning Syntax Error Basic ACK Message Value Error When a valid instruction is received the UIM242 will send back a basic ACK message The basic ACK message contains all desired settings Specifically following information is included in the ACK message STP SPD DIR MCS CUR ENABLE OFFLINE and ACR The basic ACK message is 13bytes long and has a structure as shown below Byte 1 2 3 4 5 6 7 8 9 10 11 12 13 Value AA Controller ID ASB CUR SPD2 SPD1 SPDO0 STP4 STP3 STP2 STP1 STPO FF Where UI Robot Technology Co Ltd M4220130827EN Page 33 UIM24202 04 08 IE 1 AA denotes a basic ACK message is a kind of reply to instructions received 2 ASM Assembled byte structure Bit 7 6 5 4 3 2 1 0 value N A 0 ACR ENA OFF DIR MCS 1 O full step 15 1 16 step 3 CUR desired phase current structure Bit 7 6 5 4 3 2 1 0 value N A 0 Phase Current e g 27 2 7 Amp 4 SPD2 SPDO denotes the desired motor speed See figure 10 1 for how to convert to a signed 16bit integer 5 STP4 STPO denotes the desired motor displacement See figure 10 2 for how to convert to
81. p 15 1 16 step CUR structure Bit 7 6 5 4 3 2 1 0 Value N A 0 Phase Current e g 27 2 7 Amp VO V2 is the converted value for desired speed 16 bits Figure 12 1 P0 P4 is the converted value for desired displacement 32 bits Figure 12 2 Note Only after the H bridge enabled can the controller drive the motor Page 70 M4220130827EN UI Robot Technology Co Ltd UIM242 Miniature Integrated Stepper Motor Controller Closed loop 10 ENAn _ Set enable time Format ENAn Description Set auto enable time register ENAtimer Controller auto enable the H bridge circuit afer power is on for n ms n 1 2 60000 ACK AA Controller ID AO E0 E1 E2 FF Comment AO gt gt Message ID of instruction ENAn E0 E2 gt gt Received data 0 2 E0 E2 is the converted value for auto ENA time 16 bits Figure 12 1 units ms Note This instruction sets ENAtimer only can not enable controller In order to enable controller after pre set time user needs to configure initial configuration register by using instruction ICF after ENAtimer is set Require controller hardware version being 1232 or higher UI Robot Technology Co Ltd M4220130827EN Page 71 UIM24202 04 08 IE 11 ENAXxFFFF Check enable time Format ENAxFFFF Description Check auto enable time ACK AA Controller ID AO E0 E1 E2 FF Comment Refer to ACK comment of instruction ENAn Note This instruction
82. peed is higher than a certain value i e the Maximum Starting Speed defined by instruction and current motor speed is lower than the Max Starting Speed then the motor speed will first step up to the Max Starting Speed and then linearly accelerated according to the acceleration rate Figure7 3 Nonlinear Acceleration Control case 1 Uniform acceleration Desired Speed Speed Step acceleration Maximum Starting Speed Current Speed T Time If the desired speed is less than the Max Starting Speed then the motor speed will step up to the desired speed immediately Figure7 4 Nonlinear Acceleration Control case 2 Step Acceleration Maximum Starting Speed Desired Speed Current Speed T Time If the current speed is higher than the Max Starting Speed the UIM242 will use the linear Acceleration Control Algorithm to control the speed Figure7 5 Nonlinear Acceleration Control case 3 Uniform acceleration Desired Speed Current Speed Maximum Starting Speed T Time UI Robot Technology Co Ltd M4220130827EN Page 37 UIM24202 04 08 IE 7 4 Nonlinear Deceleration Similar to the nonlinear acceleration control there are three cases and corresponding control algorithms as listed below If the desired speed is higher than a certain user preset value i e the Maximum Cessation Speed UIM242XX will use the Uniform Deceleration Control algorithm Figure7 6 Nonlinear Deceleration Contr
83. ply voltage ground black port is not on In this case the supply voltage flows into the CAN driver chip then flows into other controllers in the net through CAN bus and finally causes damage to numbers of controllers All controller and gateway must be common grounded Connect the ground wire of all controllers and gateway through one wire If there are two ground G1 and G2 in CAN bus once a high power device on G1 ground is on the voltage on G1 will be pulled up instantly higher than dozens volt then this high voltage will flow into G2 through CAN bus Normally the voltage on CAN bus is only 2 5V so the dozens volt differential will cause damage to all CAN bus chip and controllers Page 8 M4220130827EN UI Robot Technology Co Lid UIM242 Miniature Integrated Stepper Motor Controller Closed loop Standalone Operation When working standalone user can use the wiring scheme shown in figure 0 3 Please note that this wiring scheme should be used for setting the ID of a UIM242 controller For long distance transfer both ends of the CAN bus should be terminated with 200 terminating resistors As UIM2501 converter has a build in terminating resistor user only needs to attach a resistor at the other end of the bus Please refer to the UIM2501 user manual for how to enable the UIM2501 converter s terminating resistor CANH and CANL should use a twisted wire pair Figure 0 3 Wiring Scheme for Standalone Operation Ex
84. r are set to digital input 1 Enable the analog input Bit14 CHS Analog Input Channel 0 Analog input on port S1 1 Analog input on port S3 Bit13 QEI Enable Disable Quadrature Encoder Interface 0 Disable Quadrature Encoder Interface 1 Enable Quadrature Encoder Interface Bit12 Unimplemented Read as 0 Bit11 QEM Enable Disable Quadrature Encoder based Closed loop Control Module 0 Disable Quadrature Encoder based Closed loop Control Module 1 Enable Quadrature Encoder based Closed loop Control Module Bit10 CM Advanced Motion Control Mode 0 Disable advanced motion control module use basic control mode 1 Enable advanced motion control module Bit9 AM Acceleration Mode 0 Value mode Unit is pps sec or pulse square second 1 Period mode Unit is millisecond Bit8 DM Deceleration Mode 0 Value mode Unit is pps sec or pulse square second q Period mode Unit is millisecond Bit7 Unimplemented Read as 0 Bit6 STLIE Locked rotor Detection Variation Notification 0 Disable locked rotor detection variation notification only for closed loop Page 28 M4220130827EN UI Robot Technology Co Ltd UIM242 Miniature Integrated Stepper Motor Controller Closed loop 1 Enable locked rotor detection variation notification Once the error between pulsing counter and encoder counter is overstep a message will be send to user device automatically Bit5 ORGIE Origin Zero Position RTCN 0 Disable the Origin zero position RTCN 1
85. r expenses resulting from such use No licenses are conveyed implicitly or otherwise under any UIROBOT intellectual property rights Trade Mark Layout design Patent The UIROBOT name and logo are registered trademarks of UIROBOT Ltd in the P R China and other countries UIROBOT s UIM24XXX series Step Motor Controllers UIM25XX series CAN RS232 Converter and their layout designs are patent protected UIM242XX Ordering Information In order to serve you quicker and better please provide the product number in following format UIM242XX PART NUMBERING SYSTEM UIM Category PG E IE External Internal Encoder Closed Programme Control without host Series Motor CAN2 0 Optional Control Control Control Connector Loop M Advanced Motion Control SP HO Control T Screw Terminal P Plug Socket D Differential Terminal Peak Current 02 2A 04 4A 08 8A Maximum Supply Voltage Wee L 35V C 40V Note 1 Peak current is decided by max supply voltage See in Table 0 1 2 H product Max supply voltage is 50V is custom made please contact with salesmans before purchase 3 Default control connector is T screw terminal if not selected 4 D product Differential Terminal is custom made please contact with salesmans before purchase 5 PG Programme Control without Host need the hardware model be 1232 or higher Table 0 1 Correspondence between Max Supply Voltage an
86. rk boosts many advantages one of them is controllers never compete for bus transference A UIM2501 CAN R232 converter is used to connect UIM242 controller s to user device through serial port Meanwhile ASCll coded instructions from user device are converted and transfers in CAN protocol in high speed to long distance reliably to control stepper motor s motion parameters such as direction speed steps micro steps current enable and disable the H bridge For network operation each controller should be set a unique ID and up to 100 UIM242 controllers can be controlled through this UIM2501 converter 1 1 Basic Control System UIM242 controller s basic control system comprises communication system basic motion control system absolute position counter and real time event based change notification system Communication System CAN bus protocol communication is used to realize the control to UIM242 Through one CAN RS232 converter the UIM2501 user device can command multiple UIM242 controllers through RS232 using ASCII coded instructions The CAN bit rate can be changed through instruction Basic Motion Control UI Robot Technology Co Ltd M4220130827EN Page 19 UIM24202 04 08 IE UIM242 has a build in basic motion control system User device can control the following basic motion parameters through instructions in real time direction speed angular displacement phase current micro stepping and enable disable the H brid
87. ructions There are 5 configuration registers for UIM242 Initial Configuration Register Master Configuration Register S12CON S34CON and Analog Threshold Register In this chapter only the Initial Configuration Register and Mater Configuration Register are described User can find details about the other registers in their corresponding chapters 5 1 Initial Configuration Register hardware version 1232 or higher Initial configuration register is used to decide the initial status of the controllers after power on Once configured its value will be burned into the on board EEPROM and the controller will auto reboot Initial configuration register is a 16bits register with following structure ICFG 15 14 13 12 11 10 9 3 2 1 0 8 6 5 vau X x x x x x x x x x x x Jetock PRoe cow ena Bit15 4 Unimplemented Read as 0 Bit3 Elock Lock when emergency events happen O After the sensor is emergency stop or power off the controller is unlock and can execute instructions 1 After the sensor is emergency stop or power off the controller is lock and receives no instruction It needs to reboot the controller to unlock it Bit2 Execute user program after power on Future function Bit1 CCW Adjust rotation direction Figure 5 1 0 Set CW is positive when turn CW displacement counter accumulate otherwise displacement counter decrease 1 Set anti CW is positive when turn anti CW displacement counter a
88. sage through SimpleCAN This ensures the real time of the system For detailed instructions and operations on the communication between user device and UIM2501 please refer to the UIM2501 user manual 3 1 Controller ID Assignment Before operation a unique identification number i e ID or address is assigned to every UIM242 controller needs to be ID is used to identify which object is the instruction send to and where the ACK is from Every UIM242xx controller has a factory default ID of 5 User can change the ID through instruction Before assign an ID to a UIM242XX controller please make sure the UIM2501 controller and the UIM242XX controller are connected together using the standalone operation scheme Figure 0 3 A motor is not necessary For detailed process and instructions for Controller ID assignment please see the UIM2501 user manual Please Note If there are two or more UIM242 controllers with the same ID in a network the network may not work properly Before assign an ID to a UIM242XX controller please make sure the UIM2501 controller and the UIM242XX controller are connected together using the standalone operation scheme 3 2 Instruction List The following table shows the instructions mentioned in this chapter the detail of those instructions is descriped at the end of the document Instruction Description Page MDL Check the model of controller 83 For details about CAN2 0B bit ra
89. seeeseaseneeeaseeeeseaseeeseaseeessassaeeeeaseeeesassneeeaseeeeeeneeneeeassonsennes 8 INSTFUCTION set s mmary cc seceereseeeeeseeeenenseeeeeeneneeeseeeeeeaseeeeeaseneseaseeeeeenseeeseaseeeesaseneesessueeseaseneesaseeeeeeaseeseaseneneasenes 12 ei EI E E 14 1 0 OVERVICW oi tof ccnch E EE 19 1 1 Basic GontrolSy Stern E 19 1 2 Advanced Motion Control Module 20 1 3 Sensor Input Conttol Module isenana an ane aea dn i AAN 20 14 TIE Output Control Mod lE sissa sapenne aatasi cates veges ai e Ee ae 21 1 5 Encoder based Closed loop Control Module 21 1 6 Instructions and Jotertare nerina i ea eg eo eiea ee e eieiaeo EEN 21 2 0 Instruction and Feedback Structure csscccsecsseeesseeeseeeceseenseeeeseeseseeeeseaeaseasaeeesaseasaeesenseasseeaeneeeseeeeeas 22 2 1 UIM242 Message Communication Mode 22 2 2 Eelere TEE 23 2 3 Macro Operator and Null Instructton 23 3 0 CAN2 0 Communication cccseccesecsseeesseeesseeeseeeeneeesseeeenenesseeeesenesseeeesenesseeeeseeeeseessseneeeaeeeseneeseeesseneesaees 25 3 1 Epopnttroller Deelen gedet SEI ain an hee a EE 25 3 2 after e IR EE 25 4 0 Real time Change Notification cccssecsssecsseesseessseeesseeeeseesnseeenseesaseesaseesaenesaeeaenseeseeeasaseeseeeeenseeseeeeeas 26 4 1 RTON Structure E 26 4 2 Enable Disable RTGN AEA E A EEE TE 26 5 0 initial and Hardware Firmware Configuration ccsccsseesseesseeeeseeesseeeeeneeneeasneeeenseeeneeaenseeseeeeeeeeeeneeeeas 27 5 1 Initial Con
90. set speed and acceleration e Change direction and run at preset speed and acceleration e Forword displacement control follow the preset motion parameters speed displacement acceleration Page 20 M4220130827EN UI Robot Technology Co Ltd UIM242 Miniature Integrated Stepper Motor Controller Closed loop e Reverse displacement control follow the preset motion parameters speed displacement acceleration e Direction change displacement control follow the preset motion parameters speed displacement acceleration e Decelerate at preset deceleration until stop e Emergency stop e Reset position and encoder counter e Reset position and encoder counter Reverse displacement control follow the preset motion parameters speed displacement acceleration e Reset position and encoder counter Decelerate at preset deceleration until stop e Reset position and encoder counter Emergency stop s Off 1 4 TTL Output Control Module UIM242 s TTL Output Control Module supports 1 channel of TTL voltage level output The output port P4 is capable of providing 20mA sourcing or sinking current In practice please keep the current consumption as low as possible to avoid overheating the controller Port P4 also can output setting level when detects events list below pre configuration e Run Stop status The output voltage level is determined by if the speed is zero or not e Direction change The output voltage level is determined
91. sor Input Voltage on Port 1 S2 Falling T Time 8 2 Analog Input and Thresholds Figure8 2 Analog Input and Thresholds Voltage on Sensor Port Though voltage on sensor port is lower than Thd_H S1 is still 1 S1 logic value T Time S1 Logic Value i Though voltage on sensor port is higher than Thd_L S1 is still O Falling Rising Edge T Time Sensor input port S1 can be configured for analog input by instruction To do that user needs to first enable the analog input function by set the ANE bit of the master configuration register i e MCFG lt ANE gt 1 Then user needs to select the analog input port by clear the CHS bit of the master configuration register i e make MCFG lt CHS gt 0 Once configured the analog voltage on port S1 can be obtained by instruction SFB In order to use the sensor events user may need to further setup the input upper and lower thresholds i e AH AL in figure 8 2 If the sensor module detects the analog input voltage is changing from lower than AH to high than AH an S1 rising edge event will be created meanwhile S1 is assigned a logic value 1 i e S1 1 If the sensor module detects a change on S1 from higher than AL to lower than AL an S1 falling edge event will be created meanwhile S1 0 Otherwise S1 is kept unchanged UI Robot Technology Co Ltd M4220130827EN Page 45 UIM24202 04 08 IE 8 3 Digital Input Sampling Mode Digital input of UIM242 has thr
92. t P4 high A7 Voltage on P4 port Low gt gt gt High 9 exceed upper limits A1 A5 Analog input gt user preset upper limit 10 below lower limit A0 A4 Analog input lt user preset lower limit 11 displacement control complete A8 The desired position is reached 12 zero position A9 Position counter reaches passes zero Note When S1 is configured as analog A1 denotes event 9 otherwise A1 denotes event 2 When S3 is configured as analog A5 denotes event 9 otherwise A5 denotes event 6 When S1 is configured as analog AO denotes event 10 otherwise AO denotes event 1 When S3 is configured as analog A4 denotes event 10 otherwise A4 denotes event 5 4 2 Enable Disable RTCN Every RTCN can be enabled or disabled through user instruction Enable disable the RTCN is achieved by the writing to the Master Configuration Registers ORGIE bit MCFG lt 5 gt STPIE bit MCFG lt 4 gt P4IE 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 event control user needs to further configure the sensor control registers S84CON and S12CON Please refer to Chapter 8 0 for details Page 26 M4220130827EN UI Robot Technology Co Ltd UIM242 Miniature Integrated Stepper Motor Controller Closed loop Bit 5 0 INITIAL AND HARDWARE FIRMWARE CONFIGURATION UIM242 s hardware and firmware can be configured through user inst
93. t S1IE gt 1011 Reset position Decelerate until Stop Depends on MCFG lt S2IE gt lt S1IE gt 1100 Reset position Emergency Stop Depends on MCFG lt S2IE gt lt S1IE gt 1101 Forward Displacement Control Depends on MCFG lt S2IE gt lt S1IE gt 1110 Change direction and run Depends on MCFG lt S2IE gt lt S1IE gt 1111 OFF Depends on MCFG lt S2IE gt lt S1IE gt 8 7 Sensor Input Control Register S34CON S34CON Sensor Port4 Control defines the binding relationship between 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 SCF When writing to it user needs to affix a 4bits suffix code to point to this register For details of SCF please refer to chapter 10 In addition S34CON is also used to configure the TTL output port and the events that drive the output level In this chapter only the S3 related configuration is described The suffix code for S34CON is 0001 binary S34CON structure is as follows Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Defination STALL P4LVL P4EVENT S3RACT S3FACT Bit 15 12 Blocked alarm Page 48 M4220130827EN UI Robot Technology Co Ltd UIM242 Miniature Integrated Stepper Motor Controller Closed loop Action code after blocked is as follow ACT binary Action RTCN or Not 0000 N A No RTCN Ignore MCFG lt S2lE gt 0001 N A
94. t Technology Co Ltd M4220130827EN Page 65 UIM24202 04 08 IE 5 BLC Check backlash compensation Format BLC Description Check the value of backlash compensation in reciprocating motion ACK AA Controller ID DE B0 B1 B2 FF Comment Refer to ACK comment of instruction BLCn Page 66 M4220130827EN UI Robot Technology Co Ltd UIM242 Miniature Integrated Stepper Motor Controller Closed loop 6 CURn Motor Current Adjusting Format CUR Description Set the output phase current to n n 0 1 80 unsigned integer 0 80 represent 0 8 0 amps ACK AA Controller ID ASB CUR VO V1 V2 PO P1 P2 P3 P4 FF Comment ASB gt gt Received data 0 CUR gt gt Received data 1 VO P4 gt gt Received data 2 9 ASB structure Bit 7 6 5 4 3 2 1 0 Value Mam ACR ENA OFF DIR MCS 1 0 full step 15 1 16 step CUR structure Bit 7 6 5 4 3 2 1 0 Value N A 0 Phase Current e g 27 2 7 Amp VO V2 is the converted value for desired speed 16 bits Figure 12 1 PO P4 is the converted value for desired displacement 32 bits Figure 12 2 Note Value of this instruction will be stored in 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 being executed UI Robot Technology Co Ltd M4220130827EN Page 6
95. ta get 0x8733 34611 decimal Here assume Controller ID 5 Page 78 M4220130827EN UI Robot Technology Co Ltd UIM242 Miniature Integrated Stepper Motor Controller Closed loop 18 MCF Check Master Configuration Register Format MCF Description Check the value of the Master Configuration Register ACK AA Controller ID BO CO C1 C2 FF Comment Refer to ACK comment of MCFn UI Robot Technology Co Ltd M4220130827EN Page 79 UIM24202 04 08 IE 19 MCSn Setup Micro Stepping Format MCSn Description Set micro stepping resolution n 1 2 4 8 16 unsigned integer n 1 2 4 8 16 represents the full half quarter eighth and sixteenth step resolution respectively ACK AA Controller ID ASB CUR VO V1 V2 PO P1 P2 P3 P4 FF Comment ASB gt gt Received data 0 CUR gt gt Received data 1 VO P4 gt gt Received data 2 9 ASB structure Bit 7 6 5 4 3 2 1 0 Value Marg ACR ENA OFF DIR McS 1 0 full step 15 1 16 step CUR structure Bit 7 6 5 4 3 2 1 0 Value N A 0 Phase Current e g 27 2 7 Amp VO V2 is the converted value for desired speed 16 bits Figure 12 1 PO P4 is the converted value for desired displacement 32 bits Figure 12 2 Note Real time update micro stepping MCS is short forMicrostepping Once received the MCS value will be stored in the controller s EEPROM Page 80 M4220130827EN UI Robot Te
96. te setting and global instructions please see the UIM2501 user manual Note Incorrect bit rate can result in communication failure or unstable UI Robot Technology Co Ltd M4220130827EN Page 25 UIM24202 04 08 IE 4 0REAL TIME CHANGE NOTIFICATION UIM242 controllers support Real time Change Notification RTCN Similar to interrupter of CPU a RTCN is generated and sent when a user predefined event happens The length of a RTCN is 4 bytes The time from the occurrence of the event to the sending of the RTCN is less than 1 millisecond The time is decided by baud rate The transfer time is ahout 1ms 0 001s when the baud rate is 57600 Then it takes only 1 5ms from an event happening to a RTCN being received 4 1 RTCN Structure The structure of an RTCN message is shown below CC Controller ID Message ID FF The RTCN system is able to response to the following events Table3 1 Real time change notification events No Event Message ID Description 1 falling edge of S1 AO Voltage on S1 High gt gt gt Low 2 rising edge of S1 Al Voltage on S1 Low gt gt gt High 3 falling edge of S2 A2 Voltage on S2 High gt gt gt Low 4 rising edge of S2 A3 Voltage on S2 Low gt gt gt High 5 falling edge of S3 A4 Voltage on S3 port High gt gt gt Low 6 rising edge of S3 A5 Voltage on S3 port Low gt gt gt High 7 TTL output P4 low A6 Voltage on P4 port High gt gt gt Low 8 TTL outpu
97. ted in section 8 0 There are 13 actions that can be bound to those 8 sensor events Binding means assigning a sensor action to a sensor event The binding between events and actions are realized through the configuration of the Sensor Control Register S12CON An action code is needed when configuring sensor registers e Start and run forwardly at preset speed and acceleration code 10 e Start and run reversely at preset speed and acceleration code 2 e Change direction and run at preset speed and acceleration code 14 e Forword displacement control follow the preset motion parameters speed displacement acceleration code 13 e Reverse displacement control follow the preset motion parameters speed displacement acceleration code 5 e Direction change displacement control follow the preset motion parameters speed displacement acceleration code 9 e Decelerate at preset deceleration until stop code 3 e Emergency stop code 4 e Reset position and encoder counter code 6 Page 46 M4220130827EN UI Robot Technology Co Ltd UIM242 Miniature Integrated Stepper Motor Controller Closed loop 8 5 Reset position and encoder counter Reverse displacement control follow the preset motion parameters speed displacement acceleration code 7 Reset position and encoder counter Decelerate at preset deceleration until stop code 11 Reset position and encoder counter Emergency stop code 12 Off code 15
98. teeeesiaeeeeeeetiaeeeseeenaas 64 BLCr Backlash compensation iise cee cc cceedie ceevice nee sulcek petuh ene dietcensgeveesneceuncvesaavieveccecnduaeeevbueneeevadeeeeevicrnese 65 BLC Check backlash Compensation ihein nan a E a A RESE eaa 66 Cl Motor Cument Adjust ssrt aiaeei a eis als ee ete A eer eit 67 DOU Set TTL ee EE 68 DOU Gheck TTL Output Level a a a casvsaisce ssessusceniscaddetarsasasincadicaascaaesadecadeepeaseatsnasiaee 69 ENA H Brid e Enable EE 70 ENAn Set enable time esere icici edited EEGENEN edd Eed 71 ENAxFFFF Check enable time sagte shastetnsteehies vg lads cewnves stectotne dhatied EE ENEE lect peut tiated 72 FBK Motor Status Feedback Inquiry ceccecesceceseeeeceseaeeeeaeeceaeeeeaeeseaeeseaeesaeeeaeessaeeseaeeseaeessaeessaeensaeeeaas 73 ICFxn Initial Configuration Register INStrUCtiOn 0 eiceeeeseeeeeeneeeeeeneeeeeneeeeeeaeeeeeeaeeeeseeeeeeenaeeeeneaeeeeneneees 74 ICF Check Initial Configuration Heglster A 75 MACH Set Acceleration Rate s cc ccccscecasceszscesesseatupeqsaeeaacceastagasanssacdaangsasensesesseesastagaepaacen casas lapaaazeeasezsarease 76 MAC Check Current Acceleration Rate ccceeecceseceeeeeeeeeeeeeeeeeeaeeeeaeeeeaeeeeaeeeeaaeeeaeeeseeeeaeesseeseeeseieeeeneees 77 MCFn MCF xn Master Configuration Register Instruchon 78 MCF Check Master Configuration Register A 79 MCSnr Setup Micro Stepping sees ZER e EEN EEE eect ENEE Sek edna steep eceead dee epee ceed hea eee 80 MDEn Set D
99. 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 With advanced motion control module installed UIM242XX controller can maintain linear and non linear acceleration deceleration S curve displacement control PT PVT control auto direction control etc There are two ways to define acceleration deceleration rate 1 Value Mode Input range 1 65 000 000 PPS Sec pulse sec2 2 Period Mode Input range 1 60 000 milliseconds time to fulfill the acceleration or deceleration The input range of the displacement control is 2 billion pulses steps In advanced motion control mode the actual direction is decided by module calculation When displacement is in place there will be a RTCN Instruction configurable Advanced motion control module can be disabled enabled through user instruction 1 3 Sensor Input Control Module UIM242 s Sensor Input Control Module supports 3 channels of sensor input They can accept a TTL level input of 0 5V There is 1 channel can be configured as analog input Precision 12bit Sample frequency 50K mean of 16 calculation Update frequency 1000Hz User can configure the desired automatic action triggered by sensor status change There are 9 actions listed below that can be triggered by sensor event e Start and run forwardly at preset speed and acceleration e Start and run reversely at pre
100. to sensor events e Start and run forwardly at preset speed and acceleration e Start and run reversely at preset speed and acceleration e Change direction and run at preset speed and acceleration e Forword displacement control follow the preset motion parameters speed displacement acceleration e Reverse displacement control follow the preset motion parameters speed displacement acceleration e Direction change displacement control follow the preset motion parameters speed displacement acceleration e Decelerate at preset deceleration until stop e Emergency stop e Reset position and encoder counter e Reset position and encoder counter Reverse displacement control follow the preset motion parameters speed displacement acceleration e Reset position and encoder counter Decelerate at preset deceleration until stop e Reset position and encoder counter Emergency stop e Off Page 44 M4220130827EN UI Robot Technology Co Lid UIM242 Miniature Integrated Stepper Motor Controller Closed loop 8 1 Rising and Falling Edge When port S1 and S2 is configured for digital input if the sensor module detects a voltage change on S1 S2 from OV to 5V an Sx rising edge event will be created meanwhile S1 S2 is assigned a logic value 1 i e S1 1 If the sensor module detects a change on 1 S2 from 5V to OV an S1 S2 falling edge event will be created meanwhile S1 S2 0 Figure8 1 Rising and Falling Edge of a Digital Sen
101. uctions is descriped at the end of the document Instruction Descripition Page DOUn Set output TTL level n 68 DOU Check current output TTL level 69 10 5 Example of TTL Output Control and S34CON Configuration Writing to the S34CON is realized through instruction SCFG Before writing to the S34CON user needs to first fill every bit of the S34CON according to the information provided in previous sections and then affixes the suffix code 0001 binary An example is provided below Page 56 M4220130827EN UI Robot Technology Co Lid UIM242 Miniature Integrated Stepper Motor Controller Closed loop System Description A reciprocating mobile platform Requirements 1 When motor moves forward P4 outputs 5V 2 When motor moves backward P4 outputs OV 3 Need RTCN every time P4 changes Realization 1 First stop the motor by sending OFF 2 Set MCFG lt P4IE gt 1 get MCFG 0000 0000 0000 1000 binary 0x8 hex 8 decimal Send instruction MCF 8 Set P4EVENT lt 2 0 gt 010 link to direction event Set P4LVL 1 so when motor moves forward P4 will output 5V Fill the S34CON with above bits get S34CON 0000 1010 0000 0000 binary Affix the suffix code 0001 to S34CON get SCFG 0000 1010 0000 0000 0001 binary 0xA001 hex 40961 decimal Send instruction SCF xA001 or SCF 40961 9 Send instruction ENA 10 Run the motor There are numerous ways to run the motor The easiest way

Download Pdf Manuals

image

Related Search

Related Contents

STERSOL  Curacao Bischoff & Bischoff Manual de instrucciones  NVR User Manual VP  User Manual  las nuevas derivaciones compactas SIRIUS 3RA6  CARRY-BIKE® CARAVAN UNIVERSAL  View the IAgent 2.3.2 Users Guide  Automatic Sliding Door Drive CSL400 Standard CSL400 ER for  *ENCART BO 34 - Académie de Versailles  Samsung DVD-C350 User Manual  

Copyright © All rights reserved.
Failed to retrieve file