SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual ....

229
SmartPAC User Manual 1 SmartPAC SPC-2000 User Manual Version: V1.3 2013J03 To properly use the product, read this manual thoroughly is necessary. Part No.: 81-00SPC10-013

Transcript of SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual ....

Page 1: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

1

SmartPAC

SPC-2000 User Manual

Version: V1.3 2013J03

To properly use the product, read this manual thoroughly is necessary. Part No.: 81-00SPC10-013

Page 2: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

2

Revision History Date Revision Description

2011/7/11 0.1 Document Creation 2011/7/29 0.2 Append the online debug section. 2011/9/6 0.3 Append a terminal board 107-T14-GEN series product.

2012/01/03 1.0 1. Update product photo. 2. Added SmartPAC utilities section. 3. Updated the API names.

2012/3/20 1.1 1. Added description for reset button 2. Added wiring example in section 0. 3. Added several terminal boards in sections 3. 4. Added system recovery from DOM crash in section 2.2.2. 5. Corrected application interface description of _m124_set_pls_outmode and _m124_initial 6. Updated MyLink and SPC_TOOL_CE functions and illustrations.

2012/11/22 1.2 1. Added mechanical dimensions and din rail mountings. 2. Remove MyLink section since it is in a separated manual. 3. Update several programming API’s. 4. Added illustrations for the recovery of the failed file system.

2013/6/4 1.3 1. Unify naming convention of MPG. 2. updated the chapter of terminal boards.

Page 3: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

3

© Copyright 2012 TPM The product, including the product itself, the accessories, the software, the manual and the software description in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, transcribed, stored in a retrieval system, or translated into any language in any form or by any means, except the documentation kept by the purchaser for backup purposes. The names of products and corporations appearing in this manual may or may not be registered trademarks, and may or may not have copyrights of their respective companies. These names should be used only for identification or explanation, and to the owners’ benefit, should not be infringed without any intention. The product’s name and version number are both printed on the product itself. Released manual visions for each product design are represented by the digit before and after the period of the manual vision number. Manual updates are represented by the third digit in the manual vision number. Trademark MS-DOS and Windows 95/98/NT/2000/XP/CE, Visual Studio, Visual C++, Visual BASIC are

registered trademarks of Microsoft. BCB (Borland C++ Builder) is registered trademark of Borland. MULTIPROG is registered trademark of KW software. Other product names mentioned herein are used for identification purposes only and may be trademarks

and/or registered trademarks of their respective companies.

Page 4: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

4

Electrical safely To prevent electrical shock hazard, disconnect the power cable from the electrical outlet before

relocating the system. When adding or removing devices to or from the system, ensure that the power cables for the devices

are unplugged before the signal cables are connected. Disconnect all power cables from the existing system before you add a device.

Before connecting or removing signal cables from motherboard, ensure that all power cables are unplugged.

Seek professional assistance before using an adapter or extension card. These devices could interrupt the grounding circuit.

Make sure that your power supply is set to the voltage available in your area. If the power supply is broken, contact a qualified service technician or your retailer. Operational safely Please carefully read all the manuals that came with the package, before installing the new device. Before use ensure all cables are correctly connected and the power cables are not damaged. If you detect

and damage, contact the dealer immediately. To avoid short circuits, keep paper clips, screws, and staples away from connectors, slots, sockets and

circuitry. Avoid dust, humidity, and temperature extremes. Do not place the product in any area where it may

become wet. If you encounter technical problems with the product, contact a qualified service technician or the dealer.

Page 5: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

5

Contents CONTENTS .................................................................................................................................................................................. 5

1. INTRODUCTION ...................................................................................................................................................................... 8

1.1. OVERVIEW .................................................................................................................................................................................. 8

1.2. FEATURES .................................................................................................................................................................................... 8

1.3. HARDWARE SPECIFICATIONS ........................................................................................................................................................... 9

1.4. MOTIONNET COMPATIBLE DEVICES .................................................................................................................................................. 9

2. I/O INTERFACES .................................................................................................................................................................... 10

2.1. INTERFACES ............................................................................................................................................................................... 10

2.1.1. Mechanical Dimensions ....................................................................................................................................... 12

2.1.2. Din Rail Mount Positions and Screws ................................................................................................................. 13

2.2. SOME I/O INTERFACE NOTICES ..................................................................................................................................................... 14

2.2.1. Keyboard and Mouse ........................................................................................................................................... 14

2.2.2. Compact Flash Card ............................................................................................................................................. 14

2.3. PIN ASSIGNMENT FOR EACH CONNECTOR ........................................................................................................................................ 14

2.3.1. Serial Port (Com) ................................................................................................................................................. 15

2.3.2. GPIO .................................................................................................................................................................... 15

2.3.3. Side 24V DC Input ............................................................................................................................................... 17

2.3.4. RS-485 ................................................................................................................................................................. 17

2.3.5. MPG Interface ...................................................................................................................................................... 17

2.3.6. Motion ICOM Selection (Front 24V DC Input) ................................................................................................... 19

2.3.7. Motionnet Ring .................................................................................................................................................... 19

2.3.8. SW1 (Function Reserved) .................................................................................................................................... 19

2.3.9. SW2 – Motionnet Speed Selection ...................................................................................................................... 19

2.3.10. Audio .................................................................................................................................................................. 20

2.3.11. SCSI 100 Pin ...................................................................................................................................................... 21

3. TERMINAL BOARDS .............................................................................................................................................................. 24

3.1. DB-100S-01 ............................................................................................................................................................................ 24

3.1.1. Specification ........................................................................................................................................................ 24

3.1.2. Layout Drawing ................................................................................................................................................... 24

3.1.3. Wiring Example ................................................................................................................................................... 26

3.2. 107-T141-GEN SERIES .............................................................................................................................................................. 29

3.2.1. Options of 107-T141-GEN Series ........................................................................................................................ 29

3.2.2. Product Category ................................................................................................................................................. 29

3.2.3. Module Introduction ............................................................................................................................................ 30

3.2.4. Example ............................................................................................................................................................... 31

3.2.5. Specification Convention ..................................................................................................................................... 32

3.2.6. 107-T141-GEN Layout Drawing ......................................................................................................................... 33

3.2.7. DB-T141 Series Terminal Layout Drawing ......................................................................................................... 37

Page 6: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

6

3.2.8. Wiring Examples .................................................................................................................................................. 44

4. MOTIONNET INTRODUCTION ............................................................................................................................................... 45

4.1. WHAT IS MOTIONNET? ............................................................................................................................................................... 45

4.2. MOTIONNET FUNCTIONS ............................................................................................................................................................. 45

4.3. ADVANTAGE OF MOTIONNET ........................................................................................................................................................ 46

4.4. MOTIONNET PRODUCT FAMILY ...................................................................................................................................................... 48

5. SOFTWARE UTILITIES ............................................................................................................................................................ 49

5.1. SPC_TOOL_CE ......................................................................................................................................................................... 49

5.1.1. Information .......................................................................................................................................................... 49

5.1.2. General ................................................................................................................................................................. 49

5.1.3. Boot Execute ........................................................................................................................................................ 51

5.1.4. Rotary Switch Execute ......................................................................................................................................... 51

5.1.5. Backup/Restore .................................................................................................................................................... 52

5.1.6. AES ...................................................................................................................................................................... 53

6. PROJECT ENCRYPTION .......................................................................................................................................................... 55

6.1. BENEFITS .................................................................................................................................................................................. 55

6.2. AES BRIEF INTRODUCTION ........................................................................................................................................................... 55

6.3. FUNCTIONAL ARCHITECTURE ......................................................................................................................................................... 55

7. SOFTWARE DEVELOPMENT ENVIRONMENT .......................................................................................................................... 57

7.1. SYSTEM REQUIREMENTS .............................................................................................................................................................. 57

7.1.1. Hardware Requirements ....................................................................................................................................... 57

7.1.2. Software Requirements ........................................................................................................................................ 57

7.2. ONLINE DEBUGGING ................................................................................................................................................................... 58

7.2.1. Check the Ethernet IP Address of the SmartPAC ................................................................................................. 59

7.2.2. Create a New Project ........................................................................................................................................... 59

7.2.3. Connect to SmartPAC .......................................................................................................................................... 60

8. FUNCTION REFERENCE .......................................................................................................................................................... 65

8.1. HARDWARE INITIALIZATION ........................................................................................................................................................... 65

8.2. LIBRARY INITIALIZATION ............................................................................................................................................................... 65

8.3. MOTIONNET MASTER ................................................................................................................................................................. 66

8.4. DATA DEFINITION ....................................................................................................................................................................... 66

8.5. PLATFORM FUNCTIONS ................................................................................................................................................................ 67

8.5.1. Platform Information Functions ........................................................................................................................... 67

8.5.2. Platform I/O Functions ........................................................................................................................................ 73

8.5.3. Platform AES Functions ...................................................................................................................................... 79

8.5.4. Platform Retain Functions ................................................................................................................................... 84

8.6. SMARTPAC 4-AXIS MOTION FUNCTIONS ........................................................................................................................................ 90

8.6.1. System Initialization ............................................................................................................................................ 90

8.6.2. Pulse Input / Output Configurations .................................................................................................................... 95

Page 7: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

7

8.6.3. Machine I/O Setting Functions .......................................................................................................................... 100

8.6.4. Homing Control Functions ................................................................................................................................. 111

8.6.5. Velocity Control Functions ................................................................................................................................ 122

8.6.6. Single-Axis Position Control Functions ............................................................................................................. 129

8.6.7. Stop Control Functions ...................................................................................................................................... 135

8.6.8. Counter Operating Functions ............................................................................................................................. 141

8.6.9. Input / Output Status Control Functions ............................................................................................................ 157

8.6.10. Linear Interpolation ......................................................................................................................................... 161

8.6.11. Arc Interpolation .............................................................................................................................................. 182

8.6.12. Helical Interpolation ........................................................................................................................................ 196

8.6.13. Counter Compare Functions ............................................................................................................................ 199

8.6.14. Counter Latch Functions .................................................................................................................................. 203

8.6.15. Continuous Functions ...................................................................................................................................... 206

8.6.16. Counter Comparator Trigger Out Functions .................................................................................................... 211

8.6.17. Jog Functions ................................................................................................................................................... 218

9. APPENDIX A ........................................................................................................................................................................ 224

9.1. THE PLATFORM ERROR CODE LIST TABLE ....................................................................................................................................... 224

9.2. THE MOTION ERROR CODE LIST TABLE ......................................................................................................................................... 225

9.3. SOFTWARE INSTALLATION ........................................................................................................................................................... 226

9.4. RECOVERY OF BROKEN FILE SYSTEM ............................................................................................................................................. 227

Page 8: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

8

1. Introduction Utilizing the DMP® Vortex86DX chipsets, SmartPAC is a compact size and powerful PAC (Programmable Automation Controller). SmartPAC provides features including one com port, one 2 USB slots, 1 VGA output, , 10/100T Ethernet LAN port, one terminal block, one DIO (8-DI and 8-DO) and one manual pulse generator (MPG). SmartPAC with fanless design offers noise-free, ultra reliable operating in the most demanding of industrial environment. Motionnet is a super high-speed serial communication system, digital-serial control interface for communication between host algorithm and axis-controllers, I/O devices and other function devices. Hence, The SmartPAC series is an idea system for industrial automation, machine automation and motion control markets.

1.1. Overview

Figure 1-1: overview of the SmartPAC

1.2. Features

DMP® Vortex86DX processor 4-axis motion control chip 10/100T Ethernet port 1 VGA Display 1 RS232, 1 RS422 and 1 RS485 ports Support MPG Built-in 8-DI and 8-DO SCSI port Daughter board extension slot

Page 9: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

9

1.3. Hardware Specifications

CPU • DMP Vortex86DX 800MHz Memory • SDRAM 256MB DDR2 VGA Output • Resolution up to 1600x1200 Operating System • WinCE 6.0

D-SUB Male Connector • RS-232 (COM1) x 1 • RS-422 (COM2) x 1

USB • 2 x USB 2.0 Motionnet • Motionnet Master x 1 with RJ45 connector 4-Axis Motion Control • Onboard 4-axis motion control master Ethernet • 1 x RJ45 for 10/100T based LAN

Power Requirements • 24V DC /300mA • Power consumption:

FRAM • 30K bytes for users • 2K bytes for system usage

DIO (Isolation 2.5KVDC) • 8-channel input & 8-channel output

Storage • 1GB onboard flash memory (with operating system occupied) • 1 CF card slot supports up to 32GB

Audio (reserved) • 1 x voice in • 2 x voice out (R/L)

Note. Storage devices connected on USB or CF card slots support FAT16 or FAT32 file system only.

1.4. Motionnet Compatible Devices

SmartPAC equipped a Motionnet master with one Ring which is designed for users to quickly and easily develop applications, such as motion control and controls of I/O. Motionnet is a new series of products designed for versatile automation applications, especially with motion control requirements. The built-in Motionnet master is equipped in SmartPAC with one Ring which will be introduced later.

Page 10: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

10

2. I/O Interfaces SmartPAC provides varies of I/O interfaces. Besides often used serial communication ports, there are user friendly interfaces including USB, VGA and audio outputs. In this section, the function and pin definition of these interfaces will be illustrated.

2.1. Interfaces

The I/O interface arrangement of SmartPAC is introduced by the following figures. The front side contains most of the interfaces.

Figure 2-1: I/O interfaces at front side

Figure 2-2: the port for manual pulse generator (MPG)

COM1:RS232 COM2:RS422

Page 11: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

11

Figure 2-3: side I/O interfaces with rotary switch

Note that the reset button will be working only if the triggering time is longer than 1 second.

Page 12: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

12

2.1.1. Mechanical Dimensions

Page 13: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

13

2.1.2. Din Rail Mount Positions and Screws

Page 14: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

14

2.2. Some I/O Interface Notices

2.2.1. Keyboard and Mouse

There are two USB slots for users to deploy USB devices. A very often usage is keyboard and mouse. However, there are 2 rules we would strongly recommend for ensure the system working properly. 1. The USB1 is connected to a USB hub and the mouse to the hub. The keyboard connects to USB2 directly. 2. Before the system being brought up completely (a beep followed by the Windows CE desktop displays), please do not press any button on the keyboard and mouse. Users could use the keyboard and mouse at will after the system is up. The free slot on the USB hub could be connected to any USB devices. Note that Windows CE supports storage devices in FAT16 or FAT32 file systems only.

2.2.2. Compact Flash Card

Please do not hot plug the CF card in case of breaking the DOM file system. If the DOM is accidentally broken, follow the recover procedure would save the system to the default setting and environment. The recover procedure will be discussed at Appendix A.

Figure 2-4: USB 1 and 2 indication

2.3. Pin Assignment for Each Connector

In the following subsections, the pin assignment for each connector would be introduced.

Page 15: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

15

2.3.1. Serial Port (Com)

Here is the DB-15 pin assignment of the serial interface.

2.3.2. GPIO

The SCSI-20 pin definition of this 8DI/ 8DO connector is shown below:

Pin No. Definition Description Pin No. Definition Description 1 EXT_IN0 GPIO Input 0 11 EXT_OUT0 GPIO Output 0 2 EXT_IN1 GPIO Input 1 12 EXT_OUT1 GPIO Output 1 3 EXT_IN2 GPIO Input 2 13 EXT_OUT2 GPIO Output 2 4 EXT_IN3 GPIO Input 3 14 EXT_OUT3 GPIO Output 3 5 EXT_IN4 GPIO Input 4 15 EXT_OUT4 GPIO Output 4 6 EXT_IN5 GPIO Input 5 16 EXT_OUT5 GPIO Output 5 7 EXT_IN6 GPIO Input 6 17 EXT_OUT6 GPIO Output 6 8 EXT_IN7 GPIO Input 7 18 EXT_OUT7 GPIO Output 7 9 DI_COM GPIO COM 19 Reserved NC 10 EGND GPIO GND 20 E24V External 24V DC

Table 2-2: pin assignment of DI/O interface

Digital GPIO input signal circuit in SINK mode (NPN) is illustrated as follows.

Figure 2-5: DI NPN logic circuit

Pin No. Definition Pin No. Definition Pin No. Definition 1 NC 6 NC 11 RS422 R+ 2 RS232 RX 7 RS232 RTS 12 RS422 R- 3 RS232 TX 8 RS232 CTS 13 RS422 T+ 4 NC 9 NC 14 RS422 T- 5 RS232 GND 10 NC 15 RS422 GND

Table 2-1: pin assignment of DB-15 com port

Page 16: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

16

Digital GPIO input signal circuit in SOURCE mode (PNP) is illustrated as follows.

Figure 2-6: DI PNP logic circuit

Digital GPIO output signal circuit in SINK mode (NPN) is illustrated as follows.

Figure 2-7: DO NPN logic circuit

Page 17: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

17

2.3.3. Side 24V DC Input

Pin No. Definition Description

1 24V 24V DC power input 2 GND Ground 3 FG Frame ground

Table 2-3: power connector pin definition

2.3.4. RS-485

Pin No. Definition Description

1 D+ D+ signal 2 D- D- signal 3 24V 24V DC power output 4 GND Ground

Table 2-4: pin definition of RS-485

2.3.5. MPG Interface

Pin No. Definition Description Pin No. Definition Description 1 +24V/200mA Power 11 G24 Ground 2 X Select Input signal 12 Y Select Input signal 3 Z Select Input signal 13 U Select Input signal 4 X1 Input signal 14 X10 Input signal 5 X100 Input signal 15 IOCOM 6 +5V/200mA Power 16 DGND Ground 7 PA Input signal 17 PB Input signal 8 IOCOM 18 Enable Input signal 9 JOG+ Input signal 19 JOG- Input signal

10 Reserved 20 Reserved

Table 2-5: pin definition of the MPG interface

Page 18: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

18

The logic circuit is illustrated below.

Figure 2-8: MPG NPN logic circuit

Figure 2-9: MPG PNP logic circuit

Page 19: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

19

2.3.6. Motion ICOM Selection (Front 24V DC Input)

Pin No. Definition Description

1 24V 24V DC power input 2 GND Ground 3 ICOM Connected to the same 24V input as pin 1

Table 2-6: pin assignment of the front ICOM selection

The Motion ICOM provides the options of the logic type of the motion I/O’s including PEL, MEL, ORG and SLD. PEL, MEL, ORG and SLD are NPN type if the ICOM is connected to power source 24V (pin 3 to pin 1). PEL, MEL, ORG and SLD are PNP type if the ICOM is connected to ground (pin 3 to pin 2).

2.3.7. Motionnet Ring

Figure 2-10: Motionnet extension connector Ring

Pin Pin Mark Pin Description 1 NC Reserved 2 NC Reserved 3 RS485+ Motionnet protocol + 4 NC Reserved 5 NC Reserved 6 RS485- Motionnet protocol - 7 NC Reserved 8 NC Reserved

Table 2-7: pin definition of the Motion Ring

2.3.8. SW1 (Function Reserved)

2.3.9. SW2 – Motionnet Speed Selection

The Motionnet baud rate could be selected by switching the SW2. The baud rate table is listed in the following table.

1 2

B1 B0 Transfer rate

Page 20: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

20

OFF OFF 20Mbps OFF ON 10Mbps ON OFF 5Mbps ON ON 2.5Mbps

Table 2-8: baud rate list table

2.3.10. Audio

This function is not temporarily released.

Page 21: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

21

2.3.11. SCSI 100 Pin

The follow table shows the 100 pin definitions for 4-axis motion connector.

Figure 2-11: 100 pin motion connector

Pin Label I/O 1st / 2nd / 3rd / 4th Description Pin Label I/O 1st / 2nd / 3rd / 4th Description

1 24V +24V / 200mA power input 51 24V +24V / 200mA power input

2 EGND External 24V ground 52 EGND External 24V ground

3 EMG I Emergency signal 53 EMG I Emergency signal

4 MEL_1 I 1st end limit (-) 54 MEL_3 I 3rd end limit (-)

5 PEL_1 I 1st end limit (+) 55 PEL_3 I 3rd end limit (+)

6 ORG_1 I 1st home signal 56 ORG_3 I 3rd home signal

7 SLD_1 I 1st ramp-down signal 57 SLD_3 I 3rd ramp-down signal

8 MEL_2 I 2nd end limit (-) 58 MEL_4 I 4th end limit (-)

9 PEL_2 I 2nd end limit (+) 59 PEL_4 I 4th end limit (+)

10 ORG_2 I 2nd home signal 60 ORG_4 I 4th home signal

11 SLD_2 I 2nd ramp-down signal 61 SLD_4 I 4th ramp-down signal

12 RDY_1 I 1st servo ready 62 RDY_3 I 3rd servo ready

13 INP_1 I 1st servo in-position signal 63 INP_3 I 3rd servo in-position signal

14 ALM_1 I 1st servo alarm 64 ALM_3 I 3rd servo alarm

15 LTC_1 I 1st latch input (DI_1) 65 LTC_3 I 3rd latch input (DI_3)

16 RDY_2 I 2nd servo ready 66 RDY_4 I 4th servo ready

17 INP_2 I 2nd servo in-position signal 67 INP_4 I 4th servo in-position signal

18 ALM_2 I 2nd servo alarm 68 ALM_4 I 4th servo alarm

19 LTC_2 I 2nd latch input (DI_2) 69 LTC_4 I 4th latch input (DI_4)

20 EGND External ground 70 EGND External ground

21 SVON_1 O 1st servo on 71 SVON_3 O 3rd servo on

22 ERC_1 O 1st clear servo error counter 72 ERC_3 O 3rd clear servo error counter

23 ALMC_1 O 1st reset servo alarm 73 ALMC_3 O 3rd reset servo alarm

24 CMP_1 O 1st compare output (DO_1) 74 CMP_3 O 3rd compare output (DO_3)

25 SVON_2 O 2nd servo on 75 SVON_4 O 4th servo on

26 ERC_2 O 2nd clear servo error counter 76 ERC_4 O 4th clear servo error counter

27 ALMC_2 O 2nd reset servo alarm 77 ALMC_4 O 4th reset servo alarm

28 CMP_2 O 2nd compare output (DO_2) 78 CMP_4 O 4th compare output (DO_4)

29 EA+_1 I 1st encoder A phase (+) 79 EA+_3 I 3rd encoder A phase (+)

Page 22: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

22

Pin Label I/O 1st / 2nd / 3rd / 4th Description Pin Label I/O 1st / 2nd / 3rd / 4th Description

30 EA-_1 I 1st encoder A phase (-) 80 EA-_3 I 3rd encoder A phase (-)

31 EB+_1 I 1st encoder B phase (+) 81 EB+_3 I 3rd encoder B phase (+)

32 EB-_1 I 1st encoder B phase (-) 82 EB-_3 I 3rd encoder B phase (-)

33 EZ+_1 I 1st encoder Z phase (+) 83 EZ+_3 I 3rd encoder Z phase (+)

34 EZ-_1 I 1st encoder Z phase (-) 84 EZ-_3 I 3rd encoder Z phase (-)

35 EA+_2 I 2nd encoder A phase (+) 85 EA+_4 I 4th encoder A phase (+)

36 EA-_2 I 2nd encoder A phase (-) 86 EA-_4 I 4th encoder A phase (-)

37 EB+_2 I 2nd encoder B phase (+) 87 EB+_4 I 4th encoder B phase (+)

38 EB-_2 I 2nd encoder B phase (-) 88 EB-_4 I 4th encoder B phase (-)

39 EZ+_2 I 2nd encoder Z phase (+) 89 EZ+_4 I 4th encoder Z phase (+)

40 EZ-_2 I 2nd encoder Z phase (-) 90 EZ-_4 I 4th encoder Z phase (-)

41 5V +5V power output I<100mA 91 5V +5V power output I<100mA

42 EGND External5V ground 92 EGND Extermal5V ground

43 DIR+_1 O 1st direction signal (+) 93 DIR+_3 O 3rd direction signal (+)

44 DIR-_1 O 1st direction signal (-) 94 DIR-_3 O 3rd direction signal (-)

45 OUT+_1 O 1st pulse signal (+) 95 OUT+_3 O 3rd pulse signal (+)

46 OUT-_1 O 1st pulse signal (-) 96 OUT-_3 O 3rd pulse signal (-)

47 DIR+_2 O 2nd direction signal (+) 97 DIR+_4 O 4th direction signal (+)

48 DIR-_2 O 2nd direction signal (-) 98 DIR-_4 O 4th direction signal (-)

49 OUT+_2 O 2nd pulse signal (+) 99 OUT+_4 O 4th pulse signal (+)

50 OUT-_2 O 2nd pulse signal (-) 100 OUT-_4 O 4th pulse signal (-)

Table 2-9: 100 pin definition

Note that signals SVON, ERC and RALM are NPN type digital output signals which are connected to ground when the individual signal is ON. ALM, INP and RDY are NPN type digital input signals which are connected to ground when the individual signal is ON as well. The logic circuit of LTC in NPN type is as following figure.

Figure 2-12: LTC logic circuit in NPN type

Page 23: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

23

The logic circuit of CMP in NPN type is as following figure.

Figure 2-13: CMP logic circuit in NPN type

Page 24: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

24

3. Terminal Boards This chapter just applied for SmartPAC-5120. The 4-axis motion control interface is via the 100 pin SCSI connector on SmartPAC-5120. By connecting to a terminal board, users could do the cabling on the board which is one-to-one pin mapped. The terminal board DB-100S-01 and 107-T141-GEN series are introduced in this manual.

3.1. DB-100S-01

3.1.1. Specification

• SCSI 100 with 1.27mm pitch pin female connector • DIN rail installation • Dimension is L-157 x W-122 x H-45 mm • Screw terminal Pitch is 5.00mm • Cabling spec. is: 26~14 AWG • Working temp.: 0 to 65℃

3.1.2. Layout Drawing

Figure 3-1: layout drawing of the terminal board DB-100—01

Page 25: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

25

The SCSI 100 pin definitions are shown in the following figures.

Figure 3-2: SCSI 100 pin definition

Figure 3-3: screw terminal definition

Figure 3-4: screw terminal definition

Page 26: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

26

3.1.3. Wiring Example

Pin definition for Panasonic Minas A series drivers.

Figure 3-5: Panasonic Minas A series pin assignment

Page 27: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

27

Pin definition for Mitsubishi J2S series drivers.

Figure 3-6: Pin definition for Mitsubishi J2S series drivers.

Page 28: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

28

Pin definition for Yaskawa SGDM Sigma II series drivers.

Figure 3-7: Pin definition for Yaskawa SGDM Sigma II series drivers.

Page 29: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

29

3.2. 107-T141-GEN Series

3.2.1. Options of 107-T141-GEN Series

The 107-T141-GEN is a versatile terminal board working as a bridge along with the SCSI 100-pin motion connector and servo driver connectors. While choosing 107-T141-GEN, it is necessary to select the corresponding DB series terminal boards in relation to motor drivers.

3.2.2. Product Category

1. 107-T141-GEN (versatile terminal board) 2. Modules for 107-T141-GEN

(1) DB-T141-DAA (2) DB-T141-DAB (3) DB-T141-DUM (4) DB-T141-DUME (5) DB-T141-YS2 (6) DB-T141-SAN (7) DB-T141-PA4 (8) DB-T141-MJ3 (9) DB-T141-EZS

Page 30: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

30

107-T141-GEN

Driver Type Add modules of 107-T141 Terminal Board Series

Delta B Type Driver

DB-T141-DAA

DB-T141-DAB

Servo or stepping Driver

DB-T141-DUM

DB-T141-DUME

Yaskawa Sigma-II/V Driver

DB-T141-YS2

Sanyo Q series Driver

DB-T141-SAN

Panasonic Minas A Driver

DB-T141-PA4

Mitsubishi MR-J3 Driver

DB-T141-MJ3

Ezi-SERVO Driver

DB-T141-EZS

Table 3-1: 107-T141-GEN and daughter board modules

3.2.3. Module Introduction

The 107-T141-GEN terminal board has 4 connector sockets from left to right with number 1 to 4 correspondingly. The figure below illustrates the connector number on the board. These selections compose the naming convention of the product which will be introduced in the following section.

Page 31: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

31

Figure 3-8: connector socket number of 107-T141-GEN

3.2.4. Example

If a user needs 4 axes motion control with 2 Delta B type, 1 Panasonic Minas A and 1 Mitsubishi MR-J3 drivers, the items needed would be 107-T141-GEN * 1, DB-T141-DAB * 2, DB-T141-PA4 * 1 and DB-T141-MJ3 * 1 as the following table.

107-T141-GEN

Site Driver Add modules of 107-T141

Terminal Board Series

1

2

Delta B Type Driver DB-T141-DAB

3

Panasonic Minas A Driver DB-T141-PA4

4

Mitsubishi MR-J3 Driver DB-T141-MJ3

Table 3-2: selected list example

Page 32: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

32

3.2.5. Specification Convention

According to the previous example, the product specification is 107-T141 with DABx2 + PA4 + MJ3. The specification is composed similar to the product name introduced in the previous section. 107-T141 with DABx2 + PA4 +MJ3 = 107-T141-GEN spec. + DB-T141-DAB spec. * 2 + DB-T141-PA4 spec. + DB-T141-MJ3 spec.

Page 33: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

33

3.2.6. 107-T141-GEN Layout Drawing

Figure 3-9: 107-T141-GEN terminal board

Label Function CN1 1st Reserved IO Signals Connector CN2 1st Machinery IO Signals Connector CN3 2nd Reserved IO Signals Connector CN4 2nd Machinery IO Signals Connector CN5 3rd Reserved IO Signals Connector CN6 3rd Machinery IO Signals Connector CN7 4th Reserved IO Signals Connector CN8 4th Machinery IO Signals Connector CN9 Power Connector CN10 SCSI 100 pin Connector CN12 1st DB Connector CN13 2nd DB Connector CN14 3rd DB Connector CN15 4th DB Connector

Page 34: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

34

CN10 SCSI 100 pin Pin Label I/O 1st / 2nd / 3rd / 4th Description Pin Label I/O 1st / 2nd / 3rd / 4th Description 1 24V +24V / 200mA power input 51 24V +24V / 200mA power input 2 EGND External ground 52 EGND External ground 3 EMG I Emergency signal 53 EMG I Emergency signal 4 MEL 1 I 1st end limit (-) 54 MEL 3 I 3rd end limit (-) 5 PEL 1 I 1st end limit (+) 55 PEL 3 I 3rd end limit (+) 6 ORG 1 I 1st home signal 56 ORG 3 I 3rd home signal 7 SLD 1 I 1st ramp-down signal 57 SLD 3 I 3rd ramp-down signal 8 MEL 2 I 2nd end limit (-) 58 MEL 4 I 4th end limit (-) 9 PEL 2 I 2nd end limit (+) 59 PEL 4 I 4th end limit (+)

10 ORG 2 I 2nd home signal 60 ORG 4 I 4th home signal 11 SLD 2 I 2nd ramp-down signal 61 SLD 4 I 4th ramp-down signal 12 RDY 1 I 1st servo ready 62 RDY 3 I 3rd servo ready 13 INP 1 I 1st servo in-position signal 63 INP 3 I 3rd servo in-position signal 14 ALM 1 I 1st servo alarm 64 ALM 3 I 3rd servo alarm 15 LTC 1 I 1st latch input 65 LTC 3 I 3rd latch input 16 RDY 2 I 2nd servo ready 66 RDY 4 I 4th servo ready 17 INP 2 I 2nd servo in-position signal 67 INP 4 I 4th servo in-position signal 18 ALM 2 I 2nd servo alarm 68 ALM 4 I 4th servo alarm 19 LTC 2 I 2nd latch input 69 LTC 4 I 4th latch input 20 EGND External ground 70 EGND External ground 21 SVON 1 O 1st servo on 71 SVON 3 O 3rd servo on 22 ERC 1 O 1st clear servo error counter 72 ERC 3 O 3rd clear servo error counter 23 ALMC 1 O 1st reset servo alarm 73 ALMC 3 O 3rd reset servo alarm 24 CMP 1 O 1st compare output 74 CMP 3 O 3rd compare output 25 SVON 2 O 2nd servo on 75 SVON 4 O 4th servo on 26 ERC 2 O 2nd clear servo error counter 76 ERC 4 O 4th clear servo error counter 27 ALMC 2 O 2nd reset servo alarm 77 ALMC 4 O 4th reset servo alarm 28 CMP 2 O 2nd compare output 78 CMP 4 O 4th compare output 29 EA+ 1 I 1st encoder A phase (+) 79 EA+ 3 I 3rd encoder A phase (+) 30 EA- 1 I 1st encoder A phase (-) 80 EA- 3 I 3rd encoder A phase (-) 31 EB+ 1 I 1st encoder B phase (+) 81 EB+ 3 I 3rd encoder B phase (+) 32 EB- 1 I 1st encoder B phase (-) 82 EB- 3 I 3rd encoder B phase (-) 33 EZ+ 1 I 1st encoder Z phase (+) 83 EZ+ 3 I 3rd encoder Z phase (+) 34 EZ- 1 I 1st encoder Z phase (-) 84 EZ- 3 I 3rd encoder Z phase (-) 35 EA+ 2 I 2nd encoder A phase (+) 85 EA+ 4 I 4th encoder A phase (+) 36 EA- 2 I 2nd encoder A phase (-) 86 EA- 4 I 4th encoder A phase (-) 37 EB+ 2 I 2nd encoder B phase (+) 87 EB+ 4 I 4th encoder B phase (+) 38 EB- 2 I 2nd encoder B phase (-) 88 EB- 4 I 4th encoder B phase (-) 39 EZ+ 2 I 2nd encoder Z phase (+) 89 EZ+ 4 I 4th encoder Z phase (+) 40 EZ- 2 I 2nd encoder Z phase (-) 90 EZ- 4 I 4th encoder Z phase (-) 41 DDA 5V DDA 5V power output.

91 DDA 5V DDA 5V power output. I<100mA

42 DDA GND Internal 5V ground 92 DDA GND Internal 5V ground 43 DIR+ 1 O 1st direction signal (+) 93 DIR+ 3 O 3rd direction signal (+) 44 DIR- 1 O 1st direction signal (-) 94 DIR- 3 O 3rd direction signal (-) 45 OUT+ 1 O 1st pulse signal (+) 95 OUT+ 3 O 3rd pulse signal (+) 46 OUT- 1 O 1st pulse signal (-) 96 OUT- 3 O 3rd pulse signal (-) 47 DIR+ 2 O 2nd direction signal (+) 97 DIR+ 4 O 4th direction signal (+) 48 DIR- 2 O 2nd direction signal (-) 98 DIR- 4 O 4th direction signal (-) 49 OUT+ 2 O 2nd pulse signal (+) 99 OUT+ 4 O 4th pulse signal (+) 50 OUT- 2 O 2nd pulse signal (-) 100 OUT- 4 O 4th pulse signal (-)

Page 35: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

35

CN1/ CN3/ CN5/ CN7 encoder signals connector Pin Label Description

1 N-1 Reserved

2 N-2 Reserved

3 N-3 Reserved

4 N-4 Reserved

5 N-5 Reserved

6 N-6 Reserved

7 CMP Compare output

8 GND External Ground(24V)

9 BK+ Brake signal(+)

10 BK- Brake signal(-)

11 24V +24V power

12 24V +24V power

CN2/ CN4/ CN6/ CN8 machinery I/O signals connector

Pin Label Description

1 PEL End Limit Signal(+)

2 GND External Ground(24V)

3 MEL End Limit Signal(-)

4 GND External Ground(24V)

5 ORG home signal

6 GND External Ground(24V)

7 LTC Latch input

8 GND External Ground(24V)

9 SLD ramp-down signal

10 GND External Ground(24V)

11 24V +24V power

12 24V +24V power

Page 36: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

36

CN11 / CN12 / CN13 / CN14 Servo driver connector sockets Pin Label I/O Description Pin Label I/O Description

1 EA+ I Encoder A phase signal(+) 2 24V +24V power

3 EA- I Encoder A phase signal(-) 4 GND External Ground(24V)

5 EB+ I Encoder B phase signal(+) 6 MEL I End Limit Signal(-)

7 EB- I Encoder B phase signal(-) 8 PEL I End Limit Signal(+)

9 EZ+ I Encoder Z phase signal(+) 10 RDY I Servo Ready

11 EZ- I Encoder Z phase signal(-) 12 INP I Servo In-position signal

13 OUT- O Pulse signal(-) 14 ALM O Servo Alarm

15 OUT+ O Pulse signal(+) 16 SVON O Servo On

17 DIR- O Dir. Signal(-) 18 ERC O Clear Servo Error Counter

19 DIR+ O Dir. Signal(+) 20 ALMC O Clear Servo Alarm

21 GND

External Ground(24V) 22 BRK- O Brake signal(-)

23 5V

+5V Power 24 BRK+ O Brake signal(+)

25 N-1

Reserved 26 N-2

Reserved

27 N-3

Reserved 28 N-4

Reserved

29 N-5

Reserved 30 N-6

Reserved

CN9 Power input and emergency input signal

Pin Label Description

1 24V +24V Power

2 GND Ground

3 EMG Emergency Signal

Page 37: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

37

3.2.7. DB-T141 Series Terminal Layout Drawing

DB-T141-DUM dummy type interface board. DB-T141-DUM

Pin Label Description Pin Label Description

1 RDY Servo Ready 7 +5V +5V Power

2 INP Servo In-position signal 8 IGND 5V Ground

3 ALM Servo Alarm 9 DIR+ Dir. Signal(+)

4 SVON Servo On 10 DIR- Dir. Signal(-)

5 ERC Clear Servo Error Counter 11 OUT+ Pulse signal(-)

6 ALMC Clear Servo Alarm 12 OUT- Pulse signal(+)

Note: the dummy type does not have the encoder interface. If users want to connect the EA, EB, EZ of the servo driver feedback to the controller, please contact TPM for customization.

DB-T141-DUME dummy type interface board.

DB-T141-DUME

Pin Label Description Pin Label Description

1 EA+ Encoder A phase signal(+) 1 RDY Servo Ready

2 EA- Encoder A phase signal(-) 2 INP Servo In-position signal

3 EB+ Encoder B phase signal(+) 3 ALM Servo Alarm

4 EB- Encoder B phase signal(-) 4 SVON Servo On

5 EZ+ Encoder Z phase signal(+) 5 ERC Clear Servo Error Counter

6 EZ- Encoder Z phase signal(-) 6 ALMC Clear Servo Alarm

7 EGND External ground 7 +5V +5V Power

8 EGND External ground 8 EGND External ground

9 DIR+ Dir. Signal(+)

10 DIR- Dir. Signal(-)

11 OUT+ Pulse signal(-)

12 OUT- Pulse signal(+)

Page 38: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

38

DB-T141-DAA Delta A2 type interface board. DB-T141-DAA

Pin Label Description Pin Label Description 1 INP Servo In-position signal 26 EGND External ground

2 EGND External ground 27 EGND External ground

3 DO3 HOME 28 ALM Servo Alarm 4 EGND External ground 29 NC Reserved 5 DO4 TPOS 30 EGND External ground

6 EGND External ground 31 MEL End Limit Signal(-) 7 RDY Servo Ready 32 PEL End Limit Signal(+) 8 DI4 TCM1 33 ALMC Clear Servo Alarm 9 SVON Servo On 34 DI3 TCM0

10 ERC Clear Servo Error Counter 35 NC Reserved 11 +24V +24V 36 DIR+ Dir. Signal(+) 12 EGND External ground 37 DIR- Dir. Signal(-) 13 EGND External ground 38 NC Reserved 14 NC Reserved 39 NC Reserved 15 MON2 MON2 40 NC Reserved 16 MON1 MON1 41 OUT+ Pulse signal(+) 17 NC Reserved 42 NC Reserved 18 NC Reserved 43 OUT- Pulse signal(-) 19 EGND External ground 44 NC Reserved 20 NC Reserved 45 EGND External ground

21 EA+ Encoder A phase signal(+) 46 NC Reserved 22 EA- Encoder A phase signal(-) 47 EGND External ground

23 EB- Encoder B phase signal(-) 48 NC Reserved 24 EZ- Encoder Z phase signal(-) 49 EGND External ground

25 EB+ Encoder B phase signal(+) 50 EZ+ Encoder Z phase signal(+)

DB-T141-DAB Delta B2 type interface board. DB-T141-DAB

Pin Label Description Pin Label Description

1 ALM Servo Alarm 14 EGND External ground

2 INP Servo In-position signal 15 MEL End Limit Signal(-) 3 PEL End Limit Signal(+) 16 RDY Servo On 4 24V +24V 17 SVON Servo On 5 ERC Clear Servo Error Counter 18 ALMC Clear Servo Alarm 6 NC Reserved 19 DIR+ Dir. Signal(+) 7 NC Reserved 20 DIR- Dir. Signal(-) 8 NC Reserved 21 OUT- Pulse signal(-) 9 NC Reserved 22 OUT+ Pulse signal(+)

10 EA+ Encoder A phase signal(+) 23 EA- Encoder A phase signal(-) 11 EB- Encoder B phase signal(-) 24 EZ+ Encoder Z phase signal(+) 12 EB+ Encoder B phase signal(+) 25 EZ- Encoder Z phase signal(-) 13 EGND External ground

Page 39: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

39

DB-T141-SAN Sanyo Q Series type interface board.

DB-T141-SAN Pin Label Description Pin Label Description 1 NC Reserved 26 DIR+ Dir. Signal(+) 2 NC Reserved 27 DIR- Dir. Signal(-) 3 EA+ Encoder A phase signal(+) 28 OUT+ Pulse signal(-) 4 EA- Encoder A phase signal(-) 29 OUT- Pulse signal(+) 5 EB+ Encoder B phase signal(+) 30 NC Reserved 6 EB- Encoder B phase signal(-) 31 EGND External ground

7 EZ+ Encoder Z phase signal(+) 32 CONT6 Reserved 8 EZ- Encoder Z phase signal(-) 33 CONT5 Ground 9 NC Reserved 34 ERC Clear Servo Error Counter

10 NC Reserved 35 EMG Emergency Signal 11 NC Reserved 36 ALMC Clear Servo Alarm 12 NC Reserved 37 SVON Servo On 13 NC Reserved 38 EGND External ground

14 NC Reserved 39 INP Servo In-position signal 15 NC Reserved 40 NC Reserved 16 NC Reserved 41 RDY Servo Ready 17 EGND External ground 42 OUT4 ALM5_OFF 18 PEL End Limit Signal(+) 43 OUT5 ALM6_OFF 19 MEL End Limit Signal(-) 44 OUT6 ALM7_OFF

20 NC Reserved 45 OUT7 ALM_OFF

21 NC Reserved 46 ALM Servo Alarm 22 NC Reserved 47 EGND External ground

23 NC Reserved 48 EGND External ground

24 EGND External ground 49 +24V +24V 25 EGND External ground 50 +24V +24V

Page 40: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

40

DB-T141-YS2 Yaskawa Sigma II to Sigma V drivers DB-T141-YS2

Pin Label Description Pin Label Description

1 EGND External ground 26 EGND External ground

2 EGND External ground 27 NC Reserved

3 NC Reserved 28 NC Reserved

4 +5V +5V Power 29 RDY Servo Ready

5 V_REF Reference speed 30 EGND External ground

6 EGND External ground 31 ALM Servo Alarm

7 OUT+ Pulse signal(+) 32 EGND External ground

8 OUT- Pulse signal(-) 33 EA+ Encoder A phase signal(+)

9 T_REF Torque reference 34 EA- Encoder A phase signal(-)

10 EGND External ground 35 EB+ Encoder B phase signal(+)

11 DIR+ Dir. Signal(+) 36 EB- Encoder B phase signal(-)

12 DIR- Dir. Signal(-) 37 NC Reserved

13 NC Reserved 38 NC Reserved

14 ERC Clear Servo Error Counter 39 NC Reserved

15 24V +24V 40 SVON Servo On

16 NC Reserved 41 NC Reserved

17 NC Reserved 42 PEL End Limit Signal(+)

18 NC Reserved 43 MEL End Limit Signal(-)

19 EZ+ Encoder Z phase signal(+) 44 ALMC Clear Servo Alarm

20 EZ- Encoder Z phase signal(-) 45 NC Reserved

21 BAT+ Backup battery (+) 46 NC Reserved

22 BAT- Backup battery (-) 47 24V +24V

23 NC Reserved 48 NC Reserved

24 NC Reserved 49 NC Reserved

25 INP Servo In-position signal 50 NC Reserved

Page 41: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

41

DB-T141-PA4 Panasonic A4 Series driver with more than 500k pps input DB-T141-PA4

Pin Label Description Pin Label Description

1 NC Reserved 26 NC Reserved

2 NC Reserved 27 NC Reserved

3 NC Reserved 28 NC Reserved

4 NC Reserved 29 SVON Servo On

5 NC Reserved 30 ERC Clear Servo Error Counter

6 NC Reserved 31 ALMC Clear Servo Alarm

7 24V +24V 32 NC Reserved

8 PEL End Limit Signal(+) 33 EGND External ground

9 MEL End Limit Signal(-) 34 EGND External ground

10 BRK+ Brake signal(+) 35 RDY Servo Ready

11 BRK- Brake signal(-) 36 EGND External ground

12 NC Reserved 37 ALM Servo Alarm

13 EGND External ground 38 EGND External ground

14 NC Reserved 39 INP Servo In-position signal

15 EGND External ground 40 NC Reserved

16 NC Reserved 41 EGND External ground

17 EGND External ground 42 NC Reserved

18 NC Reserved 43 NC Reserved

19 NC Reserved 44 OUT+ Pulse signal(-)

20 NC Reserved 45 OUT- Pulse signal(+)

21 EA+ Encoder A phase signal(+) 46 DIR+ Dir. Signal(+)

22 EA- Encoder A phase signal(-) 47 DIR- Dir. Signal(-)

23 EZ+ Encoder Z phase signal(+) 48 EB+ Encoder B phase signal(+)

24 EZ- Encoder Z phase signal(-) 49 EB- Encoder B phase signal(-)

25 EGND External ground 50 NC Reserved

Page 42: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

42

DB-T141-MJ3 Mitsubishi J3 series driver interface board DB-T141-MJ3

Pin Label Description Pin Label Description

1 NC Reserved 26 NC Reserved

2 NC Reserved 27 NC Reserved

3 EGND External ground 28 EGND External ground

4 EA+ Encoder A phase signal(+) 29 NC Reserved

5 EA- Encoder A phase signal(-) 30 NC Reserved

6 EB+ Encoder B phase signal(+) 31 NC Reserved

7 EB- Encoder B phase signal(-) 32 NC Reserved

8 EZ+ Encoder Z phase signal(+) 33 NC Reserved

9 EZ- Encoder Z phase signal(-) 34 EGND External ground

10 OUT+ Pulse signal(+) 35 DIR+ Dir. Signal(+)

11 OUT- Pulse signal(-) 36 DIR- Dir. Signal(-)

12 NC Reserved 37 NC Reserved

13 NC Reserved 38 NC Reserved

14 NC Reserved 39 NC Reserved

15 SVON Servo On 40 NC Reserved

16 NC Reserved 41 ERC Clear Servo Error Counter

17 PC 42 EGND External ground

18 NC Reserved 43 PEL End Limit Signal(+)

19 ALMC Clear Servo Alarm 44 MEL End Limit Signal(-)

20 24V +24V 45 NC Reserved

21 24V +24V 46 EGND External ground

22 NC Reserved 47 EGND External ground

23 ZSP 48 ALM Servo Alarm

24 INP Servo In-position signal 49 RDY Servo Ready

25 TCL 50 NC Reserved

Page 43: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

43

DB-T141-EZS Ezi servo driver interface board DB-T141-EZS

Pin Label Description Pin Label Description

1 OUT+ Pulse signal(+) 11 ALM Servo Alarm

2 OUT- Pulse signal(-) 12 INP Servo In-position signal

3 DIR+ Dir. Signal(+) 13 SVON Servo On

4 DIR- Dir. Signal(-) 14 ALMC Clear Servo Alarm

5 EA+ Encoder A phase signal(+) 15 NC Reserved

6 EA- Encoder A phase signal(-) 16 NC Reserved

7 EB+ Encoder B phase signal(+) 17 NC Reserved

8 EB- Encoder B phase signal(-) 18 NC Reserved

9 EZ+ Encoder Z phase signal(+) 19 EGND External ground

10 EZ- Encoder Z phase signal(-) 20 24V +24V

Page 44: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

44

3.2.8. Wiring Examples

For Panasonic Minas A series drivers.

Figure 3-10: wiring example for Panasonic A4 series

Page 45: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

45

4. Motionnet Introduction

4.1. What Is Motionnet?

Motionnet is a super high-speed serial communication system. The G9000 devices provide input/output control, motor control, CPU emulation and message communication with high speed serial communications (up to 20Mbps) all of which are required by current Factory Automation techniques. Motionnet always transfers 4 bytes of data in 15.1μsec using cyclic communication to control input and output. While this data is being transferred, it can communicate a maximum of 256 bytes, such as motor control data, and the LSI controls the data transmission using interrupts. Communication times can be calculated using formulas, allowing users to see that Motionnet guarantees the real-time oriented support needed by FA industries.

4.2. Motionnet Functions

Figure 4-1: Motionnet system architecture

Provides a communication protocol based on the RS485 standard. Can communicate variable length of data from 1 to 128 words (when a 16-bit CPU is used) An LSI central device (G9001) controls the bus. I/O wiring can be greatly reduced by using a G9002 I/O device. Motor control wiring can be reduced by using a G9003 PCL. Using a G9004 CPU emulation device reduces the wiring for general devices connected to a CPU. Data

can be exchanged between CPUs by changing the G9004 mode. New devices can be added to the system on the fly. Systems can be isolated using pulse transformers. Transfer speed up to 20 Mbps.

Page 46: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

46

Maximum 64 slave devices for each serial line on a master device. Input/output control of up to 256 ports (2048 points), motion control of up to 64 axes, and LSI control of up to 128 devices.

Input/output and status communication time for each device when inputting/outputting and reading status data for each device, the system automatically refreshes the center device RAM each communication cycle. (Cyclic communication: 15.1 µsec./local device) When 32 local devices are connected (1024 points of input/output): 0.49 msec. When 64 local devices are connected (2048 points of input/output): 0.97 msec.

Data communication time cyclic communication can be interrupted with a command from the CPU. Data communication time: 19.3 µsec. to send or receive 3 bytes (e.g. when writing feed amount data to the G9003). Data communication time: 169.3 µsec. to send or receive 256 bytes.

Serial communication connection cable. Multi-drop connections using LAN cables or dedicated cables. Total cable length of one line: 100 m (20 Mbps/32 local boards) (10 Mbps/64 local boards). Cable length between local boards: 0.6 m or longer.

4.3. Advantage of Motionnet

It is possible to connect from center to terminal controller parts by one cable.

Figure 4-2: wire-saving and long-distance support

In cyclic communication, a communication cycle is as follows when a 20 Mbps speed is selected. Number of local devices Communication cycle Remarks 8 0.12 ms If all of the local devices connected are I/O

devices, 256 input/output points can be used. 16 0.24 ms If all of the local devices connected are I/O

devices, 512 input/output points can be used. 32 0.49 ms If all of the local devices connected are I/O

devices, 1024 input/output points can be used.

ACTUATORACTUATORACTUATORACTUATORACTUATOR

SENSORSENSORSENSORSENSORSENSORSENSORSENSORSENSOR

Extension

Master

Analog I /O Digital I /O Motion

ACTUATORACTUATORACTUATORACTUATORACTUATOR

SENSORSENSORSENSORSENSORSENSORSENSORSENSORSENSOR

100m

Motion.NET

WIRE-SAVING / LONG-DISTANCE

ACTUATORACTUATORACTUATORACTUATORACTUATORMOTOR

ACTUATORACTUATORACTUATORACTUATORACTUATORMOTOR

Page 47: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

47

Number of local devices Communication cycle Remarks 64 0.97 ms If all of the local devices connected are I/O

devices, 2048 input/output points can be used. If a different number of local devices are connected, or when the communication cycle is interrupted by data communications, refer to the calculation formulas in the user's manual to calculate the time latency.

Figure 4-3: high-speed and time deterministic support

Master Slave Modulex 64 Slave

20Mbps

6432

0.56ms

1.04ms

NODE

CYCLE TIME

HIGH-SPEED / TIME-DETERMINISTIC

512-DI / 512-DO 1024-DI / 1024-DO

64 Slaves < 1.04ms

On 20Mbps, Max. Cycle Time = 15.1 x NODE + 71.4 [FIFO Time] in us

Page 48: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

48

4.4. Motionnet Product Family

Figure 4-4: Motionnet product family

Page 49: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

49

5. Software Utilities There are two software utilities are provided to help users easily make use of SmartPAC.

1. SPC_Tool_CE – for configuring the settings in SmartPAC. 2. MyLink – for diagnosing and testing functionalities of 4-axis module and Motionnet modules.

5.1. SPC_Tool_CE

The SPC_Tool_CE is a utility for SPC. The functions include showing system components, configuring IP address, system backup and recovery and so on. In the following sections, the functions contained in each tabbed panel would be introduced.

5.1.1. Information

The initial tab when the utility is opened will be docked in the system information tab. The screenshot is like the following figure. This shows the list of the system components of executables and .dll files with the corresponding version numbers.

Figure 5-1: system information

5.1.2. General

The functions in the General tab are briefly described below.

Page 50: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

50

Figure 5-2: the General configuration tab

Set TCP/IP Press the button “Set TCP/IP” will bring up a dialog which let users to input the designated IP address. The input IP address will take effect after the system restart.

Set Date Time Just like the previous function, it is very simple to configure the system time and date.

Set Input Method SmartPAC provides other input methods if users prefers input methods besides English.

Set Region and Language The system time zone and default will be default Taipei, Taiwan and the default language would be English. Users could update the time zone and preferred language at will. Note that SmartPAC supports English only so far.

FTP/Telnet Services The telnet and ftp services could be simply brought up by checking the Enabled checkbox. It will take effect after rebooting the system as well. The ftp root path is shown in the label “FTP Root Path” and could be configured. The button “D” stands for default.

Admin Password This button provides function for users to update the administration password. It is necessary to input the old password before input the new password. The password length needs to be within ranges 5 to 8 characters. Users could check the “Show password” checkbox to display the typed password. The new

Page 51: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

51

password will take effect after reboot.

Resolution Users could adjust the screen resolution. The recommended screen resolution is 1024x768, 32bits and 60Hz.

Memory The SmartPAC provides a function to configure the memory allocation for storage and programming. This change will also take effect after restarting the system. If there is not special requirement for programming, please leave it as the default setting.

5.1.3. Boot Execute

The SPC_Tool_CE provides a function for users to specify the programs to be executed in the booting sequence. The function is just like editing the autoexec.bat in the windows system. Users could specify at most 8 programs in the sequence. The specified programs will be executed in the next boot up sequence. The tab to edit the pre-defined programs is shown below. The “…” button stands for browse local file and “C” for clear the setting.

Figure 5-3: the predefined program while boot

5.1.4. Rotary Switch Execute

The program defined in “Rotary Switch Execute” will be launched while boot up if the rotary switch is pointed to the designated program number. The “…” button stands for browse local file and “C” for clear the setting as the “Boot Execute” ones. The check of check box “Ethernet Dependent” causes the program being launched once the system gets online, which means the system obtained a valid IP address. The check of check box “Repeat” will make the program running infinitely. Even if the program is terminated by user, the system will bring up the program again automatically.

Page 52: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

52

Figure 5-4: defined programs to be executed with rotary switch

5.1.5. Backup/Restore

The system file could be backed up to the system storage device. The backed up system file could be recovered from the system storage device vice versa. In the process of system backup, users need to achieve this in 4 steps. 1. In the action group, select backup option. 2. In the target group, select the system which is the system, FRAM, or configuration files to be backed up. 3. Choose the target directory to store the files. 4. Press the “Execute” button to start the backup sequence. The recovery could be easily achieved following the same sequences as the backup ones. Once the system is recovered, it will only take effect after rebooting the system. The following figure is the tab for the function system backup and recovery. The system files include windows system files. FRAM files are the data that are stored in the FRAM. Configuration files include SmartPAC settings like IP address, telnet service, ftp service, screen resolution and so on.

Page 53: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

53

Figure 5-5: system backup and recovery

5.1.6. AES

The project encryption introduction and application is illustrated in the section 6 Project Encryption. Please refer to the chapter for more information and software application interfaces. The hardware id is obtainable within SmartPAC, taken as the content for AES algorithm could be obtained by clicking the “Get Secure ID” button. The SI key is the key to calculate the output value. The AES key could be calculated by clicking “Generate” button. This generated AES key could be a hardware protection for SmartPAC programmers. The button “S” provides the function to save the data of secure id and the AES key to user specified locations. The screen of the AES encryption tab is shown below.

Page 54: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

54

Figure 5-6: AES key generation tab

Page 55: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

55

6. Project Encryption This chapter is intended to give a brief overview of the project encryption for SmartPAC. The following section will give background information that is necessary to fully understand the functions and how to achieve hardware encryption of the system.

6.1. Benefits

TPM is a development system provider with SmartPAC as one of the products. System integrators could adapt SmartPAC as the base system to develop applications for their customers. However, customers could find the top source vendor which is TPM and perhaps, the worst case, clone the storage in the system and purchase extra systems from TPM directly. In case of customers bypass the original system provider, which would cut down benefits for the system integrators cooperating with TPM, SmartPAC introduces a method called project encryption. Through project encryption, the system integrators can lockup certain functionalities or set timers to constrain the system running time. Only the authorized products can be working properly. The authorization is hold by the one and only one system integrator. With the project encryption technology, the system integrators cooperating with TPM and TPM will be tightly coupled cooperating relationship instead of vicious competition to make a win-win partnership.

6.2. AES Brief Introduction

This standard specifies the Rijndael algorithm, a symmetric block cipher that can process data blocks of 128 bits, using cipher keys with lengths of 128, 192, and 256 bits. Rijndael was designed to handle additional block sizes and key lengths. However they are not adopted in this standard. Throughout the remainder of this standard, the algorithm specified herein will be referred to as “the AES algorithm.” The algorithm may be used with the three different key lengths indicated above, and therefore these different “flavors” may be referred to as “AES-128”, “AES-192”, and “AES-256”. Since the AES encryption/decryption algorithm is not the main function of TurboPAC, the detailed introduction is not introduced in this manual. Please refer to Wikipedia for more information.

6.3. Functional Architecture

Each SmartPAC equipped an identification chip with unique serial number. The unique serial number plays the role as the content for AES algorithm. We call the unique serial number the hardware id from now on. Another key held by the system integrator is called the SI key, used for encryption/decryption for the AES algorithm to make the registration key. The illustration of the making of the registration is as the following figure.

Page 56: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

56

Figure 6-1: generation of the registration key

From the above figure, the hardware id is obtainable within SmartPAC, taken as the content for AES algorithm. The SI key, hard coded by the system integrator, is the key to calculate the output value, the registration key. The registration key is like the activation code to activate the full functionalities of the SmartPAC and it is not invertible. Even though the whole data including the registration key could be cloned, the end user or the system integrator’s customer cannot obtain the SI key. If an end user wants to buy a replacement from other resources instead of the designated system integrator is not doable since the hardware id would be different with the original one. Therefore, the calculated registration key with the original SI key and different hardware id as content would not match so that the specific functionalities could not be working or the system could only run for certain time period. Once the system integrator gets SmartPAC, a very important thing need to do is to assign a set of SI key with a byte array of length 8 to it. With this SI key, the system integrator could generate the AES key (byte array of length 16) using the provided function application interface _spc2_gen_aes_key. This function will be introduced later. The generated AES key should be given to end users as the activation code when the user brings up the system at first time. A SmartPAC should check the validity and set the corresponding flag in the FRAM right after the system initialization using function _spc2_check_aes_key, _spc2_write_fram_byte. Hereafter when the system is brought up, it reads the flag from FRAM. If the read value matches the pre-defined value, the system bypasses the check AES key procedure and operates normally as the system integrator designed. If the values from the designated address in FRAM do not match, the system could only run certain time or some advanced functions are locked. Only with the correct activation code can bring the system up with full functionalities and unlimited running time.

Page 57: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

57

7. Software Development Environment

7.1. System Requirements

The sections below describe the system and software requirements for developing SmartPAC applications.

7.1.1. Hardware Requirements

Processor: 1 GHz RAM: 256MB Available hard disk space: 3GB

7.1.2. Software Requirements

Operating system: Microsoft Windows XP or 7 SDK: Microsoft Visual Studio 2005

Need service pack 1 and .NET compact framework 2.0 service pack 1 installed

SDK: Microsoft Visual Studio 2008 Need service pack 1 installed

If there are connection problems on online debugging, please copy the 5 online debug files from developing PC to SmartPAC and try again. Once the files are copied to the specified location on SmartPAC, it will be copied to folder \Windows automatically after restart the system.

The location of the online debug files would be located at described below. Windows XP/7 32-bit OS (source): as shown in figure 7-1 C:\Program Files\Common Files\microsoft shared\CoreCon\1.0\Target\wce400\x86\*.*. Windows 7 64 Bit OS (source): as shown in figure 7-1 C:\Program Files (x86)\Common Files\microsoft shared\CoreCon\1.0\Target\wce400\x86\*.*.

Page 58: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

58

Figure 7-1: file path for remote debugger files

SmartPAC (destination): \IDE2\TPM\Windows Transfer the files from PC to SPC-2000 using FTP software as shown in the following figure. The destination location of SPC-2000 is \IDE2\TPM\Windows. The account to log in FTP service of the SPC-2000 is account: admin and password: admin.

Figure 7-2: copy necessary files for remote debugger using FTP software

The other way to copy those files is to copy the files to TPM\Windows of the CF card and insert the card to SPC-2000 and move those files.

7.2. Online Debugging

Online debugger is a very useful tool when developers are developing their projects. SmartPAC also

Page 59: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

59

provides an online debugger mechanism to help user easily online debug and monitoring variables. There are some preliminaries need to prepare of both developing PC and SmartPAC before starting the online debugging.

7.2.1. Check the Ethernet IP Address of the SmartPAC

Configure the IP address from the windows Start Menu Settings Network and Dial-up settings. The screenshot is like below figure.

Figure 7-3: configure the network connection

The network configuration window will be popped-up while clicking the “Network and Dial-up Connections” option. The setting window would be like the figure below.

Figure 7-3: the net work configuration window

Please make sure the IP address of SmartPAC and the SDK machine are in the same network subnet. SmartPAC is the server of the running application and connected with the SDK machine to achieve online debugging. The Sequence to establish a connection to the SmartPAC will be introduced next.

7.2.2. Create a New Project

When create a new SmartPAC project, please select “Smart Device” → “Windows CE 5.0” as the project type as shown in the follow figure.

Page 60: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

60

Figure 7-4: select Windows CE 5.0 as the project type

Go to the properties of the project and uncheck the checkbox of “Deploy the latest version of .NET Compact Framework (including Service Packs) as shown below.

Figure 7-5: uncheck the checkbox highlighted

7.2.3. Connect to SmartPAC

There are several steps to establish a connection to SmartPAC. 1. Open the sample project for SmartPAC.

Example: C:\TPM\SmartPAC\Samples\VS2005_VC\Platform_demo(VC)\ Platform_demo.sln 2. Configure the device option by selecting Tools Options in the function menu.

Page 61: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

61

Figure 7-7: positions of the “Options” for a device

3. Configure the target device IP address It is necessary to configure the target IP address before making a connection. This could be done through “Device Tools Devices” from the option window as the 1st step in Figure 7-6.

4. Select the target device (SPC-2000 for this example) as marked as the 2nd step in Figure 7-6 and hit the “Properties…” button as the 3rd step.

5. The SPC-2000 properties dialog will be popped-up. Click the “Configure…” button to configure as the 4th step in Figure 7-6.

6. Specify the target IP address and click OK button to finish the configuration process as shown as the 5th and 6th step in Figure 7-6.

Page 62: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

62

Figure 7-6: step sequence to configure the target device IP address for SDK machine

7. Launch the SmartPAC debugging service. Open the “My Device” window and execute the following

programs in order. 1. Clientshutdown.exe 2. ConmandClient2.exe 3. CMAccept.exe

Page 63: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

63

Figure 7-7: step sequence to bring up the debugging server

8. Connect to SmartPAC with the sequence in the following figure.

Figure 7-8: sequence to connect to SmartPAC

Also users could select hit the “Close” button to disconnect from SmartPAC as well. 9. Start debugging as illustrated in the following figure.

Note. 1. Press the button indicated as the 1st circle to start debugging.

Page 64: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

64

2. Users could set breakpoints as show in the 2nd circle. 3. The 3rd circle is the watch window. Users can monitor variables in this frame.

Figure 7-9: the debugging window

Page 65: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

65

8. Function Reference

8.1. Hardware Initialization

The program starts with initialization of the SmartPAC hardware. If the system needs to use the Motionnet functions, it is necessary to link the library by calling _m124_link_mnet(). After linking the library, users also need to do a reset and start the Ring by calling _mnet_reset_ring(ring_number) and _mnet_start_ring(ring_number) correspondingly.

Initialize SmartPAC_m124_initial()

Need Motionnet

Link Motionnet library_m124_link_mnet()

yes

Figure 8-1: hardware initialization interface

8.2. Library Initialization

Motionnet library can be initialized by hardware device driver library call. With the Linkage between hardware and function library, user can use different types of communication masters by the same software interface.

Figure 8-2: library relationship

Page 66: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

66

8.3. Motionnet Master

The operation of Motionnet extension is divided into the following 2 groups. One is the Motionnet master device, the other is the slave device.

Figure 8-3: illustration of master-slave

8.4. Data Definition

Name Description Range U8 8-bit ASCII character 0 to 255 I16 16-bit signed integer -32768 to 32767 U16 16-bit unsigned integer 0 to 65535 I32 32-bit signed long integer -2147483648 to 2147483647 U32 32-bit unsigned long integer 0 to 4294967295

F32 32-bit single-precision

floating-point -3.402823E38 to 3.402823E38

F64 64-bit double-precision

floating-point -1.797683134862315E308 to 1.797683134862315E309

Boolean Boolean logic value TRUE, FALSE

Page 67: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

67

8.5. Platform Functions

8.5.1. Platform Information Functions

Function name Description _spc2_read_platform Get the system platform type name. _spc2_read_machine_name Get the machine name. _spc2_read_path Get the CompactFlash path. _spc2_read_cpu_id Get the CPU ID. _spc2_read_user_id Get the user ID.

Page 68: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

68

8.5.1.1 _spc2_read_platform

Description: Get the system platform type name. Syntax: I16 _spc2_read_platform (TCHAR Platform [100]) Argument: [output] TCHAR Platform [100] Return the name of the platform. Return: PLATFORM_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 69: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

69

8.5.1.2 _spc2_read_machine_name

Description: Get the machine name. Syntax: I16 _spc2_read_machine_name (TCHAR Name [100]) Argument: [output] TCHAR Name [100] Return the name of the machine. Return: PLATFORM_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 70: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

70

8.5.1.3 _spc2_read_path

Description: Get the CompactFlash path. Syntax: I16 _spc2_read_path (TCHAR Path [100]) Argument: [output] TCHAR Path [100] Return the path string of the system. Return: PLATFORM_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 71: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

71

8.5.1.4 _spc2_read_cpu_id

Description: Get the unique cpu id. Syntax: I16 _spc2_read_cpu_id (TCHAR CPUId [100]) Argument: [output] TCHAR CPUId [100] Return the unique cpu id. Return: PLATFORM_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 72: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

72

8.5.1.5 _spc2_read_user_id

Description: Get the user id. Syntax: I16 _spc2_read_user_id (TCHAR UserId [100]) Argument: [output] TCHAR UserId [100] Return the user id. Return: PLATFORM_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 73: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

73

8.5.2. Platform I/O Functions

Function name Description _spc2_read_local_di Get the local DI value. _spc2_read_local_dq Get the local DO value. _spc2_write_local_dq Set the local DO value. _spc2_read_rotary_sw Get the local rotary switch selected value. _spc2_reboot Reboot the system.

Page 74: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

74

8.5.2.1 _spc2_read_local_di

Description: Get the local DI value. Syntax: I16 _spc2_read_local_di (U8 *Data) Argument: [output] U8 *Data Return the value of local input interface. Return: PLATFORM_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 75: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

75

8.5.2.2 _spc2_read_local_dq

Description: Get the local DO value. Syntax: I16 _spc2_read_local_dq (U8 *Data) Argument: [Output] U8 *Data Return the value of local output interface. Return: PLATFORM_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

8.5.2.3 _spc2_write_local_dq

Description: Set the local DO value. Syntax:

Page 76: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

76

I16 _spc2_write_local_dq (U8 Data) Argument: [input] U8 Data Write the value of local input interface. Return: PLATFORM_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 77: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

77

8.5.2.4 _spc2_read_rotary_sw

Description: Get the local rotary switch selected value. Syntax: I16 _spc2_read_rotary_sw (U8 *Data) Argument: [output] U8 *Data Return the value of rotary switch selected. Return: PLATFORM_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 78: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

78

8.5.2.5 _spc2_reboot

Description: Reboot the sysetm. Syntax: I16 _spc2_reboot () Argument: None Return: PLATFORM_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 79: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

79

8.5.3. Platform AES Functions

Function name Description _spc2_get_secure_id Get the SECURE_ID of the system in 8 bytes array format. _spc2_gen_aes_key Generate the AES_KEY with SI_KEY and SECURE_ID. _spc2_check_aes_key Check the validity of the generated AES_KEY.

Page 80: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

80

8.5.3.1 _spc2_get_secure_id

Description: Get the SECURE_ID of the system in 8 bytes array format. Syntax: I16 _spc2_get_secure_id (U8 *SecureId) Argument:

[output] U8 *SecureId Pointer to an 8-byte array indicating the Secure ID. If SecureId is not null, the data read from security ASIC will be used to generate AES_KEY.

Return: PLATFORM_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 81: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

81

8.5.3.2 _spc2_gen_aes_key

Description: Generate the AES_KEY with SI_KEY and SECURE_ID. Syntax: I16 _spc2_gen_aes_key (U8 *SI_Key, U8 *SecureId, U8 *AES_KEY) Argument:

[input] U8 *SI_KEY Pointer to a 16-element byte-array indicating SI key. Every element is an integer ranged from 0 to 9.

[input] U8 *SecureId Input the 8-byte array indicating the Secure ID. [output] U8 *AES_KEY The generated AES_KEY in 16-byte array format. Return: PLATFORM_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 82: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

82

8.5.3.3 _spc2_check_aes_key

Description: Check the validity of the generated AES_KEY. Syntax: I16 _spc2_check_aes_key (U8 *SI_KEY, U8 *AES_KEY, U8 *Validity) Argument:

[input] U8 *SI_KEY Pointer to a 16-element byte-array indicating SI key. Every element is an integer ranged from 0 to 9.

[input] U8 *AES_KEY Input the 16-byte array indicating the AES_KEY. [output] U8 *Validity The result of the checking. 0: invalid,1: valid Return: PLATFORM_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 83: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

83

AES Key Example: U8 SID[8]; U8 SIK[16] = {1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6}; // every element is an integer ranged from 0 to 9 U8 AesKey[16]; U8 Validity; // Generate AES Key _spc2_initial(); _spc2_get_secure_id(SID); _spc2_gen_aes_key(SIK, SID, AesKey); // Check AES Key _spc2_check_aes_key(SIK, AesKey, ref Validity);

Secure ID Array

09 e8 1b f6 05 00 00 05

[7] [6] [5] [4] [3] [2] [1] [0]

SI Key Array

1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6

[15] [14] [13] [12] [11] [10] [9] [8] [7] [6] [5] [4] [3] [2] [1] [0]

AES Key Array

9507 f73e 8bb9 5a78 d4a7 48dc bb4a 537b

[15][14] [13][12] [11][10] [9][8] [7][6] [5][4] [3][2] [1][0]

Page 84: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

84

8.5.4. Platform Retain Functions

Function name Description _spc2_retain_init Initialize and enable the system retainable interface. _spc2_retain_get_size Get the retainable memory date size in the system. _spc2_retain_read Read a byte data from a retainable memory. _spc2_retain_write Write a byte data to a retainable memory. _spc2_retain_close Close the system retainable interface.

Page 85: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

85

8.5.4.1 _spc2_retain_init

Description: Initialize and enable the system retainable interface so that users could read and write the retainable memory. Syntax: I16 _spc2_retain_init () Argument: None Return: PLATFORM_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 86: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

86

8.5.4.2 _spc2_retain_get_size

Description: Get the retainable memory date size in the system. Syntax: I16 _spc2_retain_get_size (U32 *Size) Argument: [output] U32 *Size Return the size of the retainable memory. Return: PLATFORM_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 87: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

87

8.5.4.3 _spc2_retain_read

Description: Read a byte data from a retainable memory. Syntax: I16 _spc2_retain_read (U32 Index, U8 *Data) Argument:

[input] U32 Index The index of retains memory that will be read out. It must be between 0 to Retain_Memory_Size - 1.

[output] U8 *Data Return the data of the specified memory address with index. Return: PLATFORM_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 88: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

88

8.5.4.4 _spc2_retain_write

Description: Write a byte data to a retainable memory. Syntax: I16 _spc2_retain_write (U32 Index, U8 Data) Argument:

[input] U32 Index The address index specifies which memory would be written. It must be between 0 to Retain_Memory_Size -1.

[input] U8 Data The data that would be written in. Return: PLATFORM_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 89: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

89

8.5.4.5 _spc2_retain_close

Description: Close the system retainable interface. Syntax: I16 _spc2_retain_close () Argument: None Return: PLATFORM_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 90: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

90

8.6. SmartPAC 4-Axis Motion Functions

8.6.1. System Initialization

Function name Description _m124_initial Initialize the resource of the remote axis. _m124_close Release the resource of the motion module. _m124_link_mnet Allocate resources to Motionnet, and get the total ring counts.

Page 91: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

91

8.6.1.1 _m124_initial

Description: Initialize the resource of the on board 4-axis motion control. Syntax: I16 _m124_initial () Argument: None Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 92: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

92

The initial signal values are listed in the following table. Pulse output mode CW/CCW Feedback source 3 – EA/EB absolute command following the command counter. EL stop mode Immediate stop SD input Disabled SD stop mode Decelerating to stop SD logic Positive logic ORG logic Positive logic Alarm stop mode Immediately stop Alarm logic Positive logic Stopped by +EL, -EL, ALM Auto ERC = disabled Homing done Auto ERC = disabled Pulse width of the ERC output signal 12 μsec ERC output logic Negative logic INP logic Negative logic LTC logic Negative logic DR logic Negative logic Filter to +EL, -EL, SD, ORG, ALM and INP input signals

Enabled

Page 93: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

93

8.6.1.2 _m124_close

Description: Release the resource of the motion module. Syntax: I16 _m124_close () Argument: None Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 94: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

94

8.6.1.3 _m124_link_mnet

Description: Link the resources to Motionnet, and get the total ring count. Syntax: I16 _m124_link_mnet() Argument: None Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 95: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

95

8.6.2. Pulse Input / Output Configurations

Function name Description _m124_set_pls_iptmode Set encoder input mode & logic. _m124_set_pls_outmode Set pulse command output mode. _m124_set_feedback_src Set the input source of position counters. _m124_set_abs_reference Set absolute move reference(Command or Encoder).

Page 96: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

96

8.6.2.1 _m124_set_pls_iptmode

Description: Set encoder input mode & direction of axis. Syntax: I16 _m124_set_pls_iptmode (U16 AxisNo, I16 pls_iptmode, I16 pls_logic) Argument: [input] U16 AxisNo Axis number: 0 ~ 3

[input] I16 pls_iptmode

Setting of encoder feedback pulse input mode. Value Meaning

0 1X A/B 1 2X A/B 2 4X A/B 3 CW/CCW

[input] I16 pls_logic

Direction of encoder feedback pulse. Value Meaning

0 Not inverse direction 1 Inverse direction

Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 97: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

97

8.6.2.2 _m124_set_pls_outmode

Description: Set pulse command output mode of axis. Syntax: I16 _m124_set_pls_outmode (U16 AxisNo, I16 pls_outmode) Argument: [input] U16 AxisNo Axis number: 0 ~ 3

[input] I16 pls_outmode

Setting of command pulse output mode. Value Meaning

0 OUT/DIR: OUT falling edge, DIR+ is high level 1 OUT/DIR: OUT rising edge, DIR+ is high level 2 OUT/DIR: OUT falling edge, DIR+ is low level 3 OUT/DIR: OUT rising edge, DIR+ is low level 4 CW/CCW: low active 5 CW/CCW: high active 6 A/B Phase: B phase leads A 7 A/B Phase: A phase leads B

Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 98: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

98

8.6.2.3 _m124_set_feedback_src

Description: Set the input source of position counters for axis. Syntax: I16 _m124_set_feedback_src (U16 AxisNo, I16 Src) Argument: [input] U16 AxisNo Axis number: 0 ~ 3

[input] I16 Src

Counter source. Value Meaning

0 External Feedback Input & absolute command

following position counter.

1 Command Pulse Input & absolute command

following position counter.

2 Command Pulse Input & absolute command

following command counter.

3 External Feedback Input & absolute command

following command counter.

Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 99: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

99

8.6.2.4 _m124_set_abs_reference

Description: Set absolute move reference (Command or Encoder)of axis. Syntax: I16 _m124_set_abs_reference (U16 AxisNo, I16 Ref) Argument: [input] U16 AxisNo Axis number: 0 ~ 3

[input] I16 Ref

Setting the action of Ref signal. Value Meaning

0 Encoder Counter 1 Command Counter

Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 100: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

100

8.6.3. Machine I/O Setting Functions

Function name Description _m124_set_alm Set alarm logic and operating mode. _m124_set_inp Set INP logic and operating mode. _m124_set_erc Set ERC logic and timing. _m124_set_erc_on Force ERC output. _m124_set_sd Set SD logic and operating mode. _m124_set_servo Set servo driver ON/OFF. _m124_set_ralm Output servo driver alarm reset. _m124_set_ell Set EL mode.

_m124_set_mechanical_input_filter Set a filter for +EL, -EL, SD, ORG, ALM, or INP input singals. When the filter is introduced, the triggered signal pulses shorter than 4 μsec will be ignored.

_m124_set_auto_erc Automatically outputs ERC signal when the following conditions satisfied: +EL, -EL, ALM, EMG and the time of completion of homing process.

Page 101: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

101

8.6.3.1 _m124_set_alm

Description: Set alarm logic and operating mode of axis. Syntax: I16 _m124_set_alm (U16 AxisNo, I16 alm_logic, I16 alm_mode) Argument: [input] U16 AxisNo Axis number: 0 ~ 3

[input] I16 alm_logic

Setting of active logic for ALARM signal. Value Meaning

0 Low active 1 High active

[input] I16 alm_mode

Reacting modes when receiving ALARM signal. Value Meaning

0 Motor immediately stops (default). 1 Motor decelerates to stop.

Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 102: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

102

8.6.3.2 _m124_set_inp

Description: Set INP logic and operating mode of axis. Syntax: I16 _m124_set_inp (U16 AxisNo, I16 inp_enable, I16 inp_logic) Argument: [input] U16 AxisNo Axis number: 0 ~ 3

[input] I16 inp_enable

INP function enable/disable. Value Meaning

0 Disabled (default) 1 Enabled

[input] I16 inp_logic

Setting of active logic for INP signal. Value Meaning

0 Low active 1 High active

Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 103: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

103

8.6.3.3 _m124_set_erc

Description: Set ERC logic and timing of the axis. Syntax: I16 _m124_set_erc (U16 AxisNo, I16 erc_logic, I16 erc_on_time) Argument: [input] U16 AxisNo Axis number: 0 ~ 3

[input] I16 erc_logic

Setting of active logic for ERC signal. Value Meaning

0 Low active 1 High active

[input] I16 erc_on_time

Setting of time length of ERC active. Value Meaning

0 12us 1 102us 2 409us 3 1.6ms 4 13ms 5 52ms 6 104ms 7 Level output

Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 104: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

104

8.6.3.4 _m124_set_erc_on

Description: Force ERC output by software command. Syntax: I16 _m124_set_erc_on (U16 AxisNo, I16 on_off) Argument: [input] U16 AxisNo Axis number: 0 ~ 3

[input] I16 on_off

Setting the action of ERC signal. Value Meaning

0 Inactive 1 Active

Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 105: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

105

8.6.3.5 _m124_set_sd

Description: Set SD logic and operating mode. Syntax: I16 _m124_set_sd (U16 AxisNo, I16 enable, I16 sd_logic, I16 sd_latch, I16 sd_mode) Argument: [input] U16 AxisNo Axis number: 0 ~ 3

[input] I16 enable

Enable/disable the SD signal. Value Meaning

0 Disabled (default) 1 Enabled

[input] I16 sd_logic

Setting of active logic for SD signal. Value Meaning

0 Low active 1 High active

[input] I16 sd_latch

Setting of latch control for SD signal. Value Meaning

0 Do not latch 1 Latch

[input] I16 sd_mode

Setting the reacting mode of SD signal. Value Meaning

0 Slow down only 1 Slow down then stop

Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 106: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

106

8.6.3.6 _m124_set_servo

Description: Set servo driver to ON / OFF. Syntax: I16 _m124_set_servo (U16 AxisNo, I16 on_off) Argument: [input] U16 AxisNo Axis number: 0 ~ 3

[input] I16 on_off

Setting the action of SVON signal. Value Meaning

0 In-active 1 Active

Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 107: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

107

8.6.3.7 _m124_set_ralm

Description: Set the status of servo alarm reset signal. Syntax: I16 _m124_set_ralm (U16 AxisNo, I16 on_off) Argument: [input] U16 AxisNo Axis number: 0 ~ 3

[input] I16 on_off

On-off state of RALM signal. Value Meaning

0 In-active 1 Active

Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 108: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

108

8.6.3.8 _m124_set_ell

Description: Set EL active mode & logic. Syntax: I16 _m124_set_ell (U16 AxisNo, I16 ell_logic, I16 ell_mode) Argument: [input] U16 AxisNo Axis number: 0 ~ 3

[input] I16 ell_logic

Action logic configuration for EL signal. Value Meaning

0 Low active 1 High active

[input] I16 ell_mode

Active mode for EL signal meets. Value Meaning

0 Stop immediately 1 Decelerating to stop

Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 109: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

109

8.6.3.9 _m124_set_mechanical_input_filter

Description: Set a filter for +EL, -EL, SD, ORG, ALM, or INP input singals. When the filter is introduced, the triggered signal pulses shorter than 4 μsec will be ignored. Syntax: I16 _m124_set_mechanical_input_filter (U16 AxisNo, U16 on_off) Argument: [input] U16 AxisNo Axis number: 0 ~ 3

[input] U16 on_off

Setting of mode of the input filter. Value Meaning

0 Inactive 1 Active

Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 110: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

110

8.6.3.10 _m124_set_auto_erc

Description: Automatically outputs ERC signal when the following conditions satisfied: +EL, -EL, ALM, EMG and the time of completion of homing process. Syntax: I16 _m124_set_auto_erc (U16 AxisNo, I16 enable) Argument: [input] U16 AxisNo Axis number: 0 ~ 3

[input] I16 enable

Enable auto ERC function. Value Meaning

0 Disable (Default) 1 Enable

Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 111: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

111

8.6.4. Homing Control Functions

Function name Description _m124_set_home_config Set the Home/Index logic configuration. _m124_home_move Begin a home return action. _m124_escape_home Escape from the ORG active status. _m124_home_search Search the ORG active position and stop on the ORG active point.

Page 112: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

112

8.6.4.1 _m124_set_home_config

Description: Set the Home/Index logic configuration. Syntax: I16 _m124_set_home_config (U16 AxisNo, I16 home_mode, I16 org_logic, I16 ez_logic, I16 ez_count,

I16 erc_out) Argument: [input] U16 AxisNo Axis number: 0 ~ 3 [input] I16 home_mode Stopping modes for home return, 0~12. See Note.

[input] I16 org_logic

Action logic configuration for ORG signal. Value Meaning

0 Low Active 1 High Active

[input] I16 ez_logic

Action logic configuration for EZ signal. Value Meaning

0 Low Active 1 High Active

[input] I16 ez_count 0~15

[input] I16 erc_out

Set ERC output options. Value Meaning

0 No ERC Out 1 ERC Out When homing finish

Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 113: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

113

NOTE In this mode, you can let the 4-axis output pulses until the condition to complete the home return is satisfied after writing the command ‘_m124_home_move’. There are 13 home moving modes provided by 4-axis. The “home_mode” of function _m124_set_home_config is used to select one’s favorite. After completion of home move, it is necessary to keep in mind that all the position related information should be reset to be “0”. In 4-axis, after Home move complete, the first four counters will be cleared to “0” automatically. The following figures show the various home mode and the reset point, when the counter will be clear to “0”. home_mode = 0

Figure 8-4: home_mode=0 when SD (ramp-down signal) is inactive

Figure 8-5: home_mode=0 when SD (ramp-down signal) is active

Page 114: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

114

home_mode = 1

Figure 8-6: home_mode = 1

home_mode = 2

Figure 8-7: home_mode = 2

Page 115: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

115

home_mode = 3

Figure 8-8: home_mode = 3

home_mode = 4

Figure 8-9: home_mode = 4

Page 116: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

116

home_mode = 5

Figure 8-10: home_mode = 5

home_mode = 6

Figure 8-11: home_mode = 6

Note: FA=1/2 (start velocity) home_mode = 7

Figure 8-12: home_mode = 7

Note: FA=1/2 (start velocity)

Page 117: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

117

home_mode = 8

Figure 8-13: home_mode = 8

home_mode = 9

Figure 8-14: home_mode = 9

home_mode = 10

Figure 8-15: home_mode = 10

Page 118: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

118

home_mode = 11

Figure 8-16: home_mode = 11

home_mode = 12

Figure 8-17: home_mode = 12

Page 119: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

119

8.6.4.2 _m124_home_move

Description: Begin a home return action. Syntax: I16 _m124_home_move (U16 AxisNo, U8 Dir, U32 StrVel, U32 MaxVel, F32 Tacc) Argument: [input] U16 AxisNo Axis number: 0 ~ 3

[input] U8 Dir

Set the start motion direction of the homing sequence. Value Meaning

0 Negative(-)direction 1 Positive(+)direction

[input] U32 StrVel Start velocity. [input] U32 MaxVel Max velocity. [input] F32 Tacc Acceleration time. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 120: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

120

8.6.4.3 _m124_escape_home

Description: Drive the axis to escape from the ORG active position when ORG signal is ON. Syntax: I16 _m124_escape_home (U16 AxisNo, U8 Dir, U32 StrVel, U32 MaxVel, F32 Tacc) Argument: [input] U16 AxisNo Axis number: 0 ~ 3

[input] U8 Dir

Set the motion direction when the ORG signal is on. Value Meaning

0 Negative(-)direction 1 Positive(+)direction

[input] U32 StrVel Start velocity. [input] U32 MaxVel Max velocity. [input] F32 Tacc Acceleration time. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 121: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

121

8.6.4.4 _m124_home_search

Description: Search the ORG active position and stop on the ORG active point. Syntax: I16 _m124_home_search (U16 AxisNo, U8 Dir, U32 StrVel, U32 MaxVel, F32 Tacc, I32 ORGOffset) Argument: [input] U16 AxisNo Axis number: 0 ~ 3

[input] U8 Dir

Set the motion direction of the searching process. Value Meaning

0 Negative(-)direction 1 Positive(+)direction

[input] U32 StrVel Start velocity. [input] U32 MaxVel Max velocity. [input] F32 Tacc Acceleration time. [input] I32 ORGOffset First escape distance. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 122: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

122

8.6.5. Velocity Control Functions

Function name Description _m124_tv_move Set a trapezoidal velocity profile. _m124_sv_move Set an S-curve velocity profile. _m124_v_change Speed change on the fly. _m124_fix_speed_range Set speed range. _m124_unfix_speed_range Release the speed range constrain. _m124_get_current_speed Get current speed.

Page 123: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

123

8.6.5.1 _m124_tv_move

Description: Accelerate an axis to a constant velocity with trapezoidal profile. See note. Syntax: I16 _m124_tv_move (U16 AxisNo, U8 Dir, U32 StrVel, U32 MaxVel, F32 Tacc) Argument: [input] U16 AxisNo Axis number: 0 ~ 3

[input] U8 Dir

Set the motion direction. Value Meaning

0 Negative(-)direction 1 Positive(+)direction

[input] U32 StrVel Start velocity. [input] U32 MaxVel Max velocity. [input] F32 Tacc Acceleration time. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A. NOTE

Figure 8-18: constant velocity with trapezoidal profile

Page 124: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

124

8.6.5.2 _m124_sv_move

Description: Accelerate an axis to a constant velocity with S-curve profile, see note. Syntax: I16 _m124_sv_move (U16 AxisNo, U8 Dir, U32 StrVel, U32 MaxVel, F32 Tacc) Argument: [input] U16 AxisNo Axis number: 0 ~ 3

[input] U8 Dir

Set the motion direction. Value Meaning

0 Negative (-) direction 1 Positive (+) direction

[input] U32 StrVel Start velocity. [input] U32 MaxVel Max velocity. [input] F32 Tacc Acceleration time. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A. NOTE

Figure 8-19: constant velocity with S-curve profile

Page 125: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

125

8.6.5.3 _m124_v_change

Description: Speed change on the fly. Syntax: I16 _m124_v_change (U16 AxisNo, U32 NewVel, F32 Time) Argument: [input] U16 AxisNo Axis number: 0 ~ 3 [input] U32 NewVel The new velocity.

[input] F32 Time The acceleration time. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A. NOTE

Figure 8-20: update speed on the fly

Page 126: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

126

8.6.5.4 _m124_fix_speed_range

Description: Fix speed range. Syntax: I16 _m124_fix_speed_range (U16 AxisNo, U32 MaxVel) Argument: [input] U16 AxisNo Axis number: 0 ~ 3 [input] U32 MaxVel Max velocity. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 127: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

127

8.6.5.5 _m124_unfix_speed_range

Description: Release the speed range constrain. After finished the velocity change procedure, you need to use this command to release the speed fixed range. Syntax: I16 _m124_unfix_speed_range (U16 AxisNo) Argument: [input] U16 AxisNo Axis number: 0 ~ 3 Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 128: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

128

8.6.5.6 _m124_get_current_speed

Description: Get current speed. Syntax: I16 _m124_get_current_speed (U16 AxisNo, U32 *speed) Argument: [input] U16 AxisNo Axis number: 0 ~ 3 [output] U32 *speed Get the current velocity of the axis number. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 129: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

129

8.6.6. Single-Axis Position Control Functions

Function name Description _m124_start_tr_move Begin a relative move with trapezoidal profile. _m124_start_ta_move Begin an absolute move with trapezoidal profile. _m124_start_sr_move Begin a relative move with S-curve profile. _m124_start_sa_move Begin an absolute move with S-curve profile. _m124_p_change Change position on the fly.

Page 130: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

130

8.6.6.1 _m124_start_tr_move

Description: Begin a relative move with trapezoidal profile. See note. Syntax: I16 _m124_start_tr_move (U16 AxisNo, I32 Dist, U32 StrVel, U32 MaxVel, F32 Tacc, F32 Tdec) Argument: [input] U16 AxisNo Axis number: 0 ~ 3 [input] I32 Dist Specified relative distance of axis to move. [input] U32 StrVel Start velocity. [input] U32 MaxVel Max velocity. [input] F32 Tacc Acceleration time. [input] F32 Tdec Deceleration time. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A. Note

Figure 8-21: relative trapezoidal profile

Page 131: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

131

8.6.6.2 _m124_start_ta_move

Description: Begin an absolute trapezoidal profile move. Syntax: I16 _m124_start_ta_move (U16 AxisNo, I32 Pos, U32 StrVel, U32 MaxVel, F32 Tacc, F32 Tdec) Argument: [input] U16 AxisNo Axis number: 0 ~ 3 [input] I32 Pos Specified absolute position of axis to move. [input] U32 StrVel Start velocity. [input] U32 MaxVel Max velocity. [input] F32 Tacc Acceleration time. [input] F32 Tdec Deceleration time. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 132: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

132

8.6.6.3 _m124_start_sr_move

Description: Begin a relative S-curve profile move. Syntax: I16 _m124_start_sr_move (U16 AxisNo, I32 Dist, U32 StrVel, U32 MaxVel, F32 Tacc, F32 Tdec) Argument: [input] U16 AxisNo Axis number: 0 ~ 3 [input] I32 Dist Specified relative distance of axis to move. [input] U32 StrVel Start velocity. [input] U32 MaxVel Max velocity. [input] F32 Tacc Acceleration time. [input] F32 Tdec Deceleration time. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 133: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

133

8.6.6.4 _m124_start_sa_move

Description: Begin an absolute S-curve profile move. Syntax: I16 _m124_start_sa_move (U16 AxisNo, I32 Pos, U32 StrVel, U32 MaxVel, F32 Tacc, F32 Tdec) Argument: [input] U16 AxisNo Axis number: 0 ~ 3 [input] I32 Pos Specified absolute position of axis to move. [input] U32 StrVel Start velocity. [input] U32 MaxVel Max velocity. [input] F32 Tacc Acceleration time. [input] F32 Tdec Deceleration time. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 134: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

134

8.6.6.5 _m124_p_change

Description: Change position on the fly. See note. Syntax: I16 _m124_p_change (U16 AxisNo, I32 NewPos) Argument: [input] U16 AxisNo Axis number: 0 ~ 3 [input] I32 NewPos Specified new absolute position to move. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A. NOTE

Figure 8-22: change position on the fly

Page 135: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

135

8.6.7. Stop Control Functions

Function name Description _m124_sd_stop Slow down to stop. _m124_emg_stop Immediately stop. _m124_set_soft_limit Set soft limit. _m124_enable_soft_limit Enable soft limit. _m124_disable_soft_limit Disable soft limit.

Page 136: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

136

8.6.7.1 _m124_sd_stop

Description: Set axis from slow down to stop. Syntax: I16 _m124_sd_stop (U16 AxisNo, F32 Tdec) Argument: [input] U16 AxisNo Axis number: 0 ~ 3 [input] F32 Tdec Specified deceleration time in unit of second. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 137: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

137

8.6.7.2 _m124_emg_stop

Description: Set axis immediately to stop. Syntax: I16 _m124_emg_stop (U16 AxisNo) Argument: [input] U16 AxisNo Axis number: 0 ~ 3 Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 138: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

138

8.6.7.3 _m124_set_soft_limit

Description: Set the soft-limit value for the axis. Syntax: I16 _m124_set_soft_limit (U16 AxisNo, I32 PLimit, I32 NLimit) Argument: [input] U16 AxisNo Axis number: 0 ~ 3 [input] I32 PLimit Soft limit value in positive(+)direction. [input] I32 NLimit Soft limit value in negative(-)direction. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 139: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

139

8.6.7.4 _m124_enable_soft_limit

Description: Enable soft-limit function. Syntax: I16 _m124_enable_soft_limit (U16 AxisNo, I16 Action) Argument: [input] U16 AxisNo Axis number: 0 ~ 3

[input] I16 Action

The reacting method of soft limit. Value Meaning

0 INT only 1 Immediately stop 2 Slow down then stop 3 Reserved

Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 140: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

140

8.6.7.5 _m124_disable_soft_limit

Description: Disable soft-limit function. Syntax: I16 _m124_disable_soft_limit (U16 AxisNo) Argument: [input] U16 AxisNo Axis number: 0 ~ 3 Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 141: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

141

8.6.8. Counter Operating Functions

Function name Description _m124_get_command Get the value of command counter. _m124_get_position Get the value of position counter. _m124_get_error_counter Get the value of error counter. _m124_set_command Set the value of command counter. _m124_set_position Set the value of position counter. _m124_reset_error_counter Reset the value of error counter to zero. _m124_get_rest_command Get remain pulse till end of motion. _m124_get_general_counter Get the value of the general counter. _m124_set_general_counter Set the value of the general counter. _m124_get_target_pos Get the value of target position recorder. _m124_reset_target_pos Set target position recorder. _m124_enable_command_ring_counter Enable command counter as ring counter. _m124_disenable_command_ring_counter Disable command counter as ring counter. _m124_enable_position_ring_counter Enable position counter as ring counter. _m124_disenable_position_ring_counter Disable position counter as ring counter.

Page 142: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

142

8.6.8.1 _m124_get_command

Description: Get the value of command counter. Syntax: I16 _m124_get_command (U16 AxisNo, I32 *cmd) Argument: [input] U16 AxisNo Axis number: 0 ~ 3 [output] I32 *cmd Feedback commanded position counter value. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 143: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

143

8.6.8.2 _m124_get_position

Description: Get the value of position counter. Syntax: I16 _m124_get_position (U16 AxisNo, I32 *pos) Argument: [input] U16 AxisNo Axis number: 0 ~ 3 [output] I32 *pos Feedback position counter value. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 144: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

144

8.6.8.3 _m124_get_error_counter

Description: Get the value of error counter. Syntax: I16 _m124_get_error_counter (U16 AxisNo, I16 *error) Argument: [input] U16 AxisNo Axis number: 0 ~ 3 [output] I16 *error Position error counter value, range: -32768~32767 Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 145: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

145

8.6.8.4 _m124_set_command

Description: Set the value of command counter. Syntax: I16 _m124_set_command (U16 AxisNo, I32 cmd) Argument: [input] U16 AxisNo Axis number: 0 ~ 3 [input] I32 cmd The value of general counter. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 146: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

146

8.6.8.5 _m124_set_position

Description: Reset the value of error counter. Syntax: I16 _m124_set_position (U16 AxisNo, I32 pos) Argument: [input] U16 AxisNo Axis number: 0 ~ 3 [input] I32 pos The value of general counter. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 147: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

147

8.6.8.6 _m124_reset_error_counter

Description: Reset the value of error counter to zero. Syntax: I16 _m124_reset_error_counter (U16 AxisNo) Argument: [input] U16 AxisNo Axis number: 0 ~ 3 Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 148: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

148

8.6.8.7 _m124_get_rest_command

Description: Get remain pulse till end of motion. Syntax: I16 _m124_get_rest_command (U16 AxisNo, I32 *rest_command) Argument: [input] U16 AxisNo Axis number: 0 ~ 3 [output] I32 *rest_command Rest pulse count till end of motion. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 149: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

149

8.6.8.8 _m124_get_general_counter

Description: Get the value of the general counter. Syntax: I16 _m124_get_general_counter (U16 AxisNo, I32 *CntValue) Argument: [input] U16 AxisNo Axis number: 0 ~ 3 [output] I32 *CntValue Feedback position counter value. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 150: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

150

8.6.8.9 _m124_set_general_counter

Description: Set the value of the general counter. Syntax: I16 _m124_set_general_counter (U16 AxisNo, I16 CntSrc, I32 CntValue) Argument: [input] U16 AxisNo Axis number: 0 ~ 3

[input] I16 CntSrc

General counter source.

Value Meaning

0 Command pulses 1 Feedback pulses 2 MPG pulses

3 One-half the reference clock (Setting Sample With reference clock = 19.6608MHz)

[input] I32 CntValue General counter value. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 151: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

151

8.6.8.10 _m124_get_target_pos

Description: Get the value of target position recorder. Syntax: I16 _m124_get_target_pos (U16 AxisNo, I32 *pos) Argument: [input] U16 AxisNo Axis number: 0 ~ 3 [output] I32 *pos Feedback position counter value. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 152: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

152

8.6.8.11 _m124_reset_target_pos

Description: Set target position recorder. Syntax: I16 _m124_reset_target_pos (U16 AxisNo, I32 pos) Argument: [input] U16 AxisNo Axis number: 0 ~ 3 [input] I32 pos Target position to be set. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 153: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

153

8.6.8.12 _m124_enable_command_ring_counter

Description: Enable command counter as ring counter. Syntax: I16 _m124_enable_command_ring_counter (U16 AxisNo, U32 RingCounter) Argument: [input] U16 AxisNo Axis number: 0 ~ 3 [input] U32 RingCounter Pulses per revolution-1 Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 154: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

154

8.6.8.13 _m124_disenable_command_ring_counter

Description: Disable command counter as ring counter. Syntax: I16 _m124_disenable_command_ring_counter (U16 AxisNo) Argument: [input] U16 AxisNo Axis number: 0 ~ 3 Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 155: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

155

8.6.8.14 _m124_enable_position_ring_counter

Description: Enable position counter as ring counter. Syntax: I16 _m124_enable_position_ring_counter (U16 AxisNo) Argument: [input] U16 AxisNo Axis number: 0 ~ 3 Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 156: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

156

8.6.8.15 _m124_disenable_position_ring_counter

Description: Disable position counter as ring counter. Syntax: I16 _m124_disenable_position_ring_counter (U16 AxisNo) Argument: [input] U16 AxisNo Axis number: 0 ~ 3 Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 157: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

157

8.6.9. Input / Output Status Control Functions

Function name Description _m124_get_io_status Get the motion I/O status of Axis controller. _m124_motion_done Return the motion status of motion slave. _m124_check_error Check the error status which stops the axis motion.

Page 158: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

158

8.6.9.1 _m124_get_io_status

Description: Get the motion I/O status of Axis controller. Syntax: I16 _m124_get_io_status (U16 AxisNo, U16 *io_sts) Argument: [input] U16 AxisNo Axis number: 0 ~ 3

[output] U16 *io_sts

I/O status word. Where “1’ is ON and “0” is OFF. ON/OFF state is read based on the corresponding set logic.

Bit Name Description 0 RDY RDY pin input 1 ALM Alarm Signal 2 +EL Positive Limit Switch 3 -EL Negative Limit Switch 4 ORG Origin Switch 5 DIR DIR output 6 EMG Emergency signal input 7 PCS PCS signal input 8 ERC ERC pin output 9 EZ Index signal 10 CLR Clear counter signal. 11 Latch Latch signal input 12 SD Slow Down signal input 13 INP In-Position signal input 14 SVON Servo-ON output status 15 RALM Reset Alarm output status

Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 159: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

159

8.6.9.2 _m124_motion_done

Description: Return the motion status of motion slave. Syntax: I16 _m124_motion_done (U16 AxisNo) Argument: [input] U16 AxisNo Axis number: 0 ~ 3 Return:

Return value Description 0 Stop 1 Reserved 2 Waiting for STA input signal 3 Waiting for internal synchronization signal 4 Reserved 5 Wait ERC finished 6 Wait DIR Change 7 Backlash compensating 8 Wait PA/PB 9 In home special speed motion 10 In start velocity motion 11 In acceleration 12 In Max velocity motion 13 In deceleration 14 Wait INP 15 Reserved

ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 160: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

160

8.6.9.3 _m124_check_error

Description: Check the error status which stops the axis motion. Syntax: I16 _m124_check_error (U16 AxisNo, U32 *error) Argument: [input] U16 AxisNo The target axis number that will be checked.

[output] U32 *error

The error status. The error bit mask is as follows. 0 Normal stop ESC1 (Bit 0) Comparator 1 conditions are satisfied. (+SL) ESC2 (Bit 1) Comparator 2 conditions are satisfied. (-SL) ESC3 (Bit 2) Comparator 3 conditions are satisfied. ESC4 (Bit 3) Comparator 4 conditions are satisfied. ESC5 (Bit 4) Comparator 5 conditions are satisfied. ESPL (Bit 5) +EL input turned ON. ESML (Bit 6) -EL input turned ON. ESAL (Bit 7) ALM input turned ON. ESSP (Bit 8) Reserved ESEM (Bit 9) EMG input turned ON. ESSD(Bit 10) SD input turned ON. (Bit 11) Reserved ESDT (Bit 12) An interpolation operation data error. ESIP (Bit 13) An error stop on the other axis during interpolation. ESPO (Bit 14) Overflow occurs in the PA/PB input buffer counter. ESAO (Bit 15) Positioning counter out of range during interpolation. ESEE (Bit 16) An EA/EB input error occurs. (Non-stop) ESPE (Bit 17) A PA/PB input error occurs. (Non-stop)

Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 161: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

161

8.6.10. Linear Interpolation

Function name Description

_m124_start_tr_line2 Begin a relative 2-Axis linear interpolation for any 2 axes with trapezoidal profile.

_m124_start_ta_line2 Begin an absolute 2-Axis linear interpolation for any 2 axes with trapezoidal profile.

_m124_start_sr_line2 Begin a relative 2-Axis linear interpolation for any 2 axes with S-curve profile.

_m124_start_sa_line2 Begin an absolute 2-Axis linear interpolation for any 2 axes with S-curve profile.

_m124_start_tr_line3 Begin a relative 3-Axis linear interpolation with trapezoidal profile. _m124_start_ta_line3 Begin an absolute 3-Axis linear interpolation with trapezoidal profile. _m124_start_sr_line3 Begin a relative 3-Axis linear interpolation with S-curve profile. _m124_start_sa_line3 Begin an absolute 3-Axis linear interpolation with S-curve profile. _m124_start_tr_line4 Begin a relative 4-Axis linear interpolation with trapezoidal profile. _m124_start_ta_line4 Begin an absolute 4-Axis linear interpolation with trapezoidal profile. _m124_start_sr_line4 Begin a relative 4-Axis linear interpolation with S-curve profile. _m124_start_sa_line4 Begin an absolute 4-Axis linear interpolation with S-curve profile.

_m124_start_tr_move_xy Begin a relative 2-Axis linear interpolation for the first 2 axes with trapezoidal profile.

_m124_start_ta_move_xy Begin an absolute 2-Axis linear interpolation for the first 2 axes with trapezoidal profile.

_m124_start_sr_move_xy Begin a relative 2-Axis linear interpolation for the first 2 axes with S-curve profile.

_m124_start_sa_move_xy Begin an absolute 2-Axis linear interpolation for the first 2 axes with S-curve profile.

_m124_start_tr_move_zu Begin a relative 2-Axis linear interpolation for the last 2 axes with trapezoidal profile.

_m124_start_ta_move_zu Begin an absolute 2-Axis linear interpolation for the last 2 axes with trapezoidal profile.

_m124_start_sr_move_zu Begin a relative 2-Axis linear interpolation for the last 2 axes with S-curve profile.

_m124_start_sa_move_zu Begin an absolute 2-Axis linear interpolation for the last 2 axes with S-curve profile.

Page 162: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

162

8.6.10.1 _m124_start_tr_line2

Description: Begin a relative 2-Axis linear interpolation for any 2 axes with trapezoidal profile. Syntax: I16 _m124_start_tr_line2 (U16 *AxisArray, I32 DistX, I32 DistY, U32 StrVel, U32 MaxVel, F32 Tacc,

F32 Tdec) Argument:

[input] U16 *AxisArray

Array of axis number to perform interpolation. Example: Int AxisArray[2] = {0,2}; // axis 0 & 2 Int AxisArray[3] = {0,1,3}; // axis 0,1,3 Note: AxisArray[n] must be smaller than AxisArray[m], if n<m.

[input] I32 DistX Specified relative distance of axis array 0 to move. [input] I32 DistY Specified relative distance of axis array 1 to move. [input] U32 StrVel Starting velocity in unit of pulse per second. [input] U32 MaxVel Maximum velocity in unit of pulse per second. [input] F32 Tacc Specified acceleration time in unit of second. [input] F32 Tdec Specified deceleration time in unit of second. Note: MaxVel > StrVel is necessary. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 163: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

163

8.6.10.2 _m124_start_ta_line2

Description: Begin an absolute 2-Axis linear interpolation for any 2 axes with trapezoidal profile. Syntax: I16 _m124_start_ta_line2 (U16 *AxisArray, I32 PosX, I32 PosY, U32 StrVel, U32 MaxVel, F32 Tacc,

F32 Tdec) Argument:

[input] U16 *AxisArray

Array of axis number to perform interpolation. Example: Int AxisArray[2] = {0,2}; // axis 0 & 2 Int AxisArray[3] = {0,1,3}; // axis 0,1,3 Note: AxisArray[n] must be smaller than AxisArray[m], if n<m.

[input] I32 PosX Specified absolute position of axis array 0 to move. [input] I32 PosY Specified absolute position of axis array 1 to move. [input] U32 StrVel Starting velocity in unit of pulse per second. [input] U32 MaxVel Maximum velocity in unit of pulse per second. [input] F32 Tacc Specified acceleration time in unit of second. [input] F32 Tdec Specified deceleration time in unit of second. Note: MaxVel > StrVel is necessary. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 164: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

164

8.6.10.3 _m124_start_sr_line2

Description: Begin a relative 2-Axis linear interpolation for any 2 axes with S-curve profile. Syntax: I16 _m124_start_sr_line2 (U16 *AxisArray, I32 DistX, I32 DistY, U32 StrVel, U32 MaxVel, F32 Tacc,

F32 Tdec) Argument:

[input] U16 *AxisArray

Array of axis number to perform interpolation. Example: Int AxisArray[2] = {0,2}; // axis 0 & 2 Int AxisArray[3] = {0,1,3}; // axis 0,1,3 Note: AxisArray[n] must be smaller than AxisArray[m], if n<m.

[input] I32 DistX Specified relative distance of axis array 0 to move. [input] I32 DistY Specified relative distance of axis array 1 to move. [input] U32 StrVel Starting velocity in unit of pulse per second. [input] U32 MaxVel Maximum velocity in unit of pulse per second. [input] F32 Tacc Specified acceleration time in unit of second. [input] F32 Tdec Specified deceleration time in unit of second. Note: MaxVel > StrVel is necessary. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 165: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

165

8.6.10.4 _m124_start_sa_line2

Description: Begin an absolute 2-Axis linear interpolation for any 2 axes with S-curve profile. Syntax: I16 _m124_start_sa_line2 (U16 *AxisArray, I32 PosX, I32 PosY, U32 StrVel, U32 MaxVel, F32 Tacc,

F32 Tdec) Argument:

[input] U16 *AxisArray

Array of axis number to perform interpolation. Example: Int AxisArray[2] = {0,2}; // axis 0 & 2 Int AxisArray[3] = {0,1,3}; // axis 0,1,3 Note: AxisArray[n] must be smaller than AxisArray[m], if n<m.

[input] I32 PosX Specified absolute position of axis array 0 to move [input] I32 PosY Specified absolute position of axis array 1 to move [input] U32 StrVel Starting velocity in unit of pulse per second [input] U32 MaxVel Maximum velocity in unit of pulse per second [input] F32 Tacc Specified acceleration time in unit of second [input] F32 Tdec Specified deceleration time in unit of second Note: MaxVel > StrVel is necessary. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 166: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

166

8.6.10.5 _m124_start_tr_line3

Description: Begin a relative 3-Axis linear interpolation with trapezoidal profile. Syntax: I16 _m124_start_tr_line3 (U16 *AxisArray, I32 DistX, I32 DistY, I32 DistZ, U32 StrVel, U32 MaxVel,

F32 Tacc, F32 Tdec) Argument:

[input] U16 *AxisArray

Array of axis number to perform interpolation. Example: Int AxisArray[2] = {0,2}; // axis 0 & 2 Int AxisArray[3] = {0,1,3}; // axis 0,1,3 Note: AxisArray[n] must be smaller than AxisArray[m], if n<m.

[input] I32 DistX Specified relative distance of axis array 0 to move. [input] I32 DistY Specified relative distance of axis array 1 to move. [input] I32 DistZ Specified relative distance of axis array 2 to move. [input] U32 StrVel Starting velocity in unit of pulse per second. [input] U32 MaxVel Maximum velocity in unit of pulse per second. [input] F32 Tacc Specified acceleration time in unit of second. [input] F32 Tdec Specified deceleration time in unit of second. Note: MaxVel > StrVel is necessary. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 167: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

167

8.6.10.6 _m124_start_ta_line3

Description: Begin an absolute 3-Axis linear interpolation with trapezoidal profile. Syntax: I16 _m124_start_ta_line3 (U16 *AxisArray, I32 PosX, I32 PosY, I32 PosZ, U32 StrVel, U32 MaxVel, F32

Tacc, F32 Tdec) Argument:

[input] U16 *AxisArray

Array of axis number to perform interpolation. Example: Int AxisArray[2] = {0,2}; // axis 0 & 2 Int AxisArray[3] = {0,1,3}; // axis 0,1,3 Note: AxisArray[n] must be smaller than AxisArray[m], if n<m.

[input] I32 PosX Specified absolute position of axis array 0 to move. [input] I32 PosY Specified absolute position of axis array 1 to move. [input] I32 PosZ Specified absolute position of axis array 2 to move. [input] U32 StrVel Starting velocity in unit of pulse per second. [input] U32 MaxVel Maximum velocity in unit of pulse per second. [input] F32 Tacc Specified acceleration time in unit of second. [input] F32 Tdec Specified deceleration time in unit of second. Note: MaxVel > StrVel is necessary. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 168: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

168

8.6.10.7 _m124_start_sr_line3

Description: Begin a relative 3-Axis linear interpolation with S-curve profile. Syntax: I16 _m124_start_sr_line3 (U16 *AxisArray, I32 DistX, I32 DistY, I32 DistZ, U32 StrVel, U32 MaxVel,

F32 Tacc, F32 Tdec) Argument:

[input] U16 *AxisArray

Array of axis number to perform interpolation. Example: Int AxisArray[2] = {0,2}; // axis 0 & 2 Int AxisArray[3] = {0,1,3}; // axis 0,1,3 Note: AxisArray[n] must be smaller than AxisArray[m], if n<m.

[input] I32 DistX Specified relative distance of axis array 0 to move. [input] I32 DistY Specified relative distance of axis array 1 to move. [input] I32 DistZ Specified relative distance of axis array 2 to move. [input] U32 StrVel Starting velocity in unit of pulse per second. [input] U32 MaxVel Maximum velocity in unit of pulse per second. [input] F32 Tacc Specified acceleration time in unit of second. [input] F32 Tdec Specified deceleration time in unit of second. Note: MaxVel > StrVel is necessary. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 169: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

169

8.6.10.8 _m124_start_sa_line3

Description: Begin an absolute 3-Axis linear interpolation with S-curve profile. Syntax: I16 _m124_start_sa_line3 (U16 *AxisArray, I32 PosX, I32 PosY, I32 PosZ, U32 StrVel, U32 MaxVel,

F32 Tacc, F32 Tdec) Argument:

[input] U16 *AxisArray

Array of axis number to perform interpolation. Example: Int AxisArray[2] = {0,2}; // axis 0 & 2 Int AxisArray[3] = {0,1,3}; // axis 0,1,3 Note: AxisArray[n] must be smaller than AxisArray[m], if n<m.

[input] I32 PosX Specified absolute position of axis array 0 to move. [input] I32 PosY Specified absolute position of axis array 1 to move. [input] I32 PosZ Specified absolute position of axis array 2 to move. [input] U32 StrVel Starting velocity in unit of pulse per second. [input] U32 MaxVel Maximum velocity in unit of pulse per second. [input] F32 Tacc Specified acceleration time in unit of second. [input] F32 Tdec Specified deceleration time in unit of second. Note: MaxVel > StrVel is necessary. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 170: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

170

8.6.10.9 _m124_start_tr_line4

Description: Begin a relative 4-Axis linear interpolation with trapezoidal profile. Syntax: I16 _m124_start_tr_line4 (I32 DistX, I32 DistY, I32 DistZ, I32 DistU, U32 StrVel, U32 MaxVel, F32 Tacc,

F32 Tdec) Argument: [input] I32 DistX Specified relative distance of axis array 0 to move. [input] I32 DistY Specified relative distance of axis array 1 to move. [input] I32 DistZ Specified relative distance of axis array 2 to move. [input] I32 DistU Specified relative distance of axis array 3 to move. [input] U32 StrVel Starting velocity in unit of pulse per second. [input] U32 MaxVel Maximum velocity in unit of pulse per second. [input] F32 Tacc Specified acceleration time in unit of second. [input] F32 Tdec Specified deceleration time in unit of second. Note: MaxVel > StrVel is necessary. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 171: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

171

8.6.10.10 _m124_start_ta_line4

Description: Begin an absolute 4-Axis linear interpolation with trapezoidal profile. Syntax: I16 _m124_start_ta_line4 (I32 PosX, I32 PosY, I32 PosZ, I32 PosU, U32 StrVel, U32 MaxVel, F32 Tacc,

F32 Tdec) Argument: [input] I32 PosX Specified absolute position of axis array 0 to move. [input] I32 PosY Specified absolute position of axis array 1 to move. [input] I32 PosZ Specified absolute position of axis array 2 to move. [input] I32 PosU Specified absolute position of axis array 3 to move. [input] U32 StrVel Starting velocity in unit of pulse per second. [input] U32 MaxVel Maximum velocity in unit of pulse per second. [input] F32 Tacc Specified acceleration time in unit of second. [input] F32 Tdec Specified deceleration time in unit of second. Note: MaxVel > StrVel is necessary. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 172: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

172

8.6.10.11 _m124_start_sr_line4

Description: Begin a relative 4-Axis linear interpolation with S-curve profile. Syntax: I16 _m124_start_sr_line4 (I32 DistX, I32 DistY, I32 DistZ, I32 DistU, U32 StrVel, U32 MaxVel, F32

Tacc, F32 Tdec) Argument: [input] I32 DistX Specified relative distance of axis array 0 to move. [input] I32 DistY Specified relative distance of axis array 1 to move. [input] I32 DistZ Specified relative distance of axis array 2 to move. [input] I32 DistU Specified relative distance of axis array 3 to move. [input] U32 StrVel Starting velocity in unit of pulse per second. [input] U32 MaxVel Maximum velocity in unit of pulse per second. [input] F32 Tacc Specified acceleration time in unit of second. [input] F32 Tdec Specified deceleration time in unit of second. Note: MaxVel > StrVel is necessary. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 173: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

173

8.6.10.12 _m124_start_sa_line4

Description: Begin an absolute 4-Axis linear interpolation with S-curve profile. Syntax: I16 _m124_start_sa_line4 (I32 PosX, I32 PosY, I32 PosZ, I32 PosU, U32 StrVel, U32 MaxVel, F32 Tacc,

F32 Tdec) Argument: [input] I32 PosX Specified absolute position of axis array 0 to move. [input] I32 PosY Specified absolute position of axis array 1 to move. [input] I32 PosZ Specified absolute position of axis array 2 to move. [input] I32 PosU Specified absolute position of axis array 3 to move. [input] U32 StrVel Starting velocity in unit of pulse per second. [input] U32 MaxVel Maximum velocity in unit of pulse per second. [input] F32 Tacc Specified acceleration time in unit of second. [input] F32 Tdec Specified deceleration time in unit of second. Note: MaxVel > StrVel is necessary. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 174: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

174

8.6.10.13 _m124_start_tr_move_xy

Description: Begin a relative 2-Axis linear interpolation for the first 2 axes with trapezoidal profile. Syntax: I16 _m124_start_tr_move_xy (I32 DistX, I32 DistY, U32 StrVel, U32 MaxVel, F32 Tacc, F32 Tdec) Argument: [input] I32 DistX Specified relative distance of axis 0 to move. [input] I32 DistY Specified relative distance of axis 1 to move. [input] U32 StrVel Starting velocity in unit of pulse per second. [input] U32 MaxVel Maximum velocity in unit of pulse per second. [input] F32 Tacc Specified acceleration time in unit of second. [input] F32 Tdec Specified deceleration time in unit of second. Note: MaxVel > StrVel is necessary. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 175: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

175

8.6.10.14 _m124_start_ta_move_xy

Description: Begin an absolute 2-Axis linear interpolation for the first 2 axes with trapezoidal profile. Syntax: I16 _m124_start_ta_move_xy (I32 PosX, I32 PosY, U32 StrVel, U32 MaxVel, F32 Tacc, F32 Tdec) Argument: [input] I32 PosX Specified absolute position of axis 0 to move. [input] I32 PosY Specified absolute position of axis 1 to move. [input] U32 StrVel Starting velocity in unit of pulse per second. [input] U32 MaxVel Maximum velocity in unit of pulse per second. [input] F32 Tacc Specified acceleration time in unit of second. [input] F32 Tdec Specified deceleration time in unit of second. Note: MaxVel > StrVel is necessary. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 176: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

176

8.6.10.15 _m124_start_sr_move_xy

Description: Begin a relative 2-Axis linear interpolation for the first 2 axes with S-curve profile. Syntax: I16 _m124_start_sr_move_xy (I32 DistX, I32 DistY, U32 StrVel, U32 MaxVel, F32 Tacc, F32 Tdec) Argument: [input] I32 DistX Specified relative distance of axis 0 to move. [input] I32 DistY Specified relative distance of axis 1 to move. [input] U32 StrVel Starting velocity in unit of pulse per second. [input] U32 MaxVel Maximum velocity in unit of pulse per second. [input] F32 Tacc Specified acceleration time in unit of second. [input] F32 Tdec Specified deceleration time in unit of second. Note: MaxVel > StrVel is necessary. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 177: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

177

8.6.10.16 _m124_start_sa_move_xy

Description: Begin an absolute 2-Axis linear interpolation for the first 2 axes with S-curve profile. Syntax: I16 _m124_start_sa_move_xy (I32 PosX, I32 PosY, U32 StrVel, U32 MaxVel, F32 Tacc, F32 Tdec) Argument: [input] I32 PosX Specified absolute position of axis 0 to move. [input] I32 PosY Specified absolute position of axis 1 to move. [input] U32 StrVel Starting velocity in unit of pulse per second. [input] U32 MaxVel Maximum velocity in unit of pulse per second. [input] F32 Tacc Specified acceleration time in unit of second. [input] F32 Tdec Specified deceleration time in unit of second. Note: MaxVel > StrVel is necessary. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 178: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

178

8.6.10.17 _m124_start_tr_move_zu

Description: Begin a relative 2-Axis linear interpolation for the last 2 axes with trapezoidal profile. Syntax: I16 _m124_start_tr_move_zu (I32 DistZ, I32 DistU, U32 StrVel, U32 MaxVel, F32 Tacc, F32 Tdec) Argument: [input] I32 DistZ Specified relative distance of axis 2 to move. [input] I32 DistU Specified relative distance of axis 3 to move. [input] U32 StrVel Starting velocity in unit of pulse per second. [input] U32 MaxVel Maximum velocity in unit of pulse per second. [input] F32 Tacc Specified acceleration time in unit of second. [input] F32 Tdec Specified deceleration time in unit of second. Note: MaxVel > StrVel is necessary. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 179: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

179

8.6.10.18 _m124_start_ta_move_zu

Description: Begin an absolute 2-Axis linear interpolation for the last 2 axes with trapezoidal profile. Syntax: I16 _m124_start_ta_move_zu (I32 PosZ, I32 PosU, U32 StrVel, U32 MaxVel, F32 Tacc, F32 Tdec) Argument: [input] I32 PosZ Specified absolute position of axis 2 to move. [input] I32 PosU Specified absolute position of axis 3 to move. [input] U32 StrVel Starting velocity in unit of pulse per second. [input] U32 MaxVel Maximum velocity in unit of pulse per second. [input] F32 Tacc Specified acceleration time in unit of second. [input] F32 Tdec Specified deceleration time in unit of second. Note: MaxVel > StrVel is necessary. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 180: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

180

8.6.10.19 _m124_start_sr_move_zu

Description: Begin a relative 2-Axis linear interpolation for the last 2 axes with S-curve profile. Syntax: I16 _m124_start_sr_move_zu (I32 DistZ, I32 DistU, U32 StrVel, U32 MaxVel, F32 Tacc, F32 Tdec) Argument: [input] I32 DistZ Specified relative distance of axis 2 to move. [input] I32 DistU Specified relative distance of axis 3 to move. [input] U32 StrVel Starting velocity in unit of pulse per second. [input] U32 MaxVel Maximum velocity in unit of pulse per second. [input] F32 Tacc Specified acceleration time in unit of second. [input] F32 Tdec Specified deceleration time in unit of second. Note: MaxVel > StrVel is necessary. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 181: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

181

8.6.10.20 _m124_start_sa_move_zu

Description: Begin an absolute 2-Axis linear interpolation for the last 2 axes with S-curve profile. Syntax: I16 _m124_start_sa_move_zu (I32 PosZ, I32 PosU, U32 StrVel, U32 MaxVel, F32 Tacc, F32 Tdec) Argument: [input] I32 PosZ Specified absolute position of axis 2 to move. [input] I32 PosU Specified absolute position of axis 3 to move. [input] U32 StrVel Starting velocity in unit of pulse per second. [input] U32 MaxVel Maximum velocity in unit of pulse per second. [input] F32 Tacc Specified acceleration time in unit of second. [input] F32 Tdec Specified deceleration time in unit of second. Note: MaxVel > StrVel is necessary. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 182: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

182

8.6.11. Arc Interpolation

Function name Description

_m124_start_tr_arc2 Begin a relative any 2 axis arc interpolation with trapezoidal profile.

_m124_start_ta_arc2 Begin an absolute any 2 axis arc interpolation with trapezoidal profile.

_m124_start_sr_arc2 Begin a relative any 2 axis arc interpolation with S-curve profile.

_m124_start_sa_arc2 Begin an absolute any 2 axis arc interpolation with S-curve profile.

_m124_get_center Get clockwise & counter clockwise center.

_m124_start_tr_arc_xy Begin a relative arc interpolation of the first 2 axis with trapezoidal profile.

_m124_start_ta_arc_xy Begin an absolute arc interpolation of the first 2 axis with trapezoidal profile.

_m124_start_sr_arc_xy Begin a relative arc interpolation of the first 2 axes with S-curve profile.

_m124_start_sa_arc_xy Begin an absolute arc interpolation of the first 2 axes with S-curve profile.

_m124_start_tr_arc_zu Begin a relative arc interpolation of the last 2 axis with trapezoidal profile.

_m124_start_ta_arc_zu Begin an absolute arc interpolation of the last 2 axis with trapezoidal profile.

_m124_start_sr_arc_zu Begin a relative arc interpolation of the last 2 axes with S-curve profile.

_m124_start_sa_arc_zu Begin an absolute arc interpolation of the last 2 axes with S-curve profile.

Page 183: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

183

8.6.11.1 _m124_start_tr_arc2

Description: Begin a relative any 2 axis arc interpolation with trapezoidal profile. Syntax: I16 _m124_start_tr_arc2 (U16 *AxisArray, I32 OffsetCx, I32 OffsetCy, I32 OffsetEx, I32 OffsetEy, U8

Dir, U32 StrVel, U32 MaxVel, F32 Tacc, F32 Tdec) Argument:

[input] U16 *AxisArray

Array of axis number to perform interpolation. Example: Int AxisArray[2] = {0,2}; // axis 0 & 2 Int AxisArray[3] = {0,1,3}; // axis 0,1,3 Note: AxisArray[n] must be smaller than AxisArray[m], if n<m.

[input] I32 OffsetCx X-axis offset to center. [input] I32 OffsetCy Y-axis offset to center. [input] I32 OffsetEx Axis offset to end of arc. [input] I32 OffsetEy Axis offset to end of arc. [input] U8 Dir Specified direction of arc, CCW: 0, CW; 1 [input] U32 StrVel Starting velocity in unit of pulse per second. [input] U32 MaxVel Maximum velocity in unit of pulse per second. [input] F32 Tacc Specified acceleration time in unit of second. [input] F32 Tdec Specified deceleration time in unit of second. Note: MaxVel > StrVel is necessary. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 184: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

184

8.6.11.2 _m124_start_ta_arc2

Description: Begin an absolute any 2 axis arc interpolation with trapezoidal profile. Syntax: I16 _m124_start_ta_arc2 (U16 *AxisArray, I32 Cx, I32 Cy, I32 Ex, I32 Ey, U8 Dir, U32 StrVel, U32

MaxVel, F32 Tacc,F32 Tdec) Argument:

[input] U16 *AxisArray

Array of axis number to perform interpolation. Example: Int AxisArray[2] = {0,2}; // axis 0 & 2 Int AxisArray[3] = {0,1,3}; // axis 0,1,3 Note: AxisArray[n] must be smaller than AxisArray[m], if n<m.

[input] I32 Cx X-axis absolute position to center. [input] I32 Cy Y-axis absolute position to center. [input] I32 Ex Axis absolute position to end of arc. [input] I32 Ey Axis absolute position to end of arc. [input] U8 Dir Specified direction of arc, CCW: 0, CW: 1 [input] U32 StrVel Starting velocity in unit of pulse per second. [input] U32 MaxVel Maximum velocity in unit of pulse per second. [input] F32 Tacc Specified acceleration time in unit of second. [input] F32 Tdec Specified deceleration time in unit of second. Note: MaxVel > StrVel is necessary. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 185: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

185

8.6.11.3 _m124_start_sr_arc2

Description: Begin a relative any 2 axis arc interpolation with S-curve profile. Syntax: I16 _m124_start_sr_arc2 (U16 *AxisArray, I32 OffsetCx, I32 OffsetCy, I32 OffsetEx, I32 OffsetEy, U8

Dir, U32 StrVel, U32 MaxVel, F32 Tacc, F32 Tdec) Argument:

[input] U16 *AxisArray

Array of axis number to perform interpolation. Example: Int AxisArray[2] = {0,2}; // axis 0 & 2 Int AxisArray[3] = {0,1,3}; // axis 0,1,3 Note: AxisArray[n] must be smaller than AxisArray[m], if n<m.

[input] I32 OffsetCx X-axis offset to center. [input] I32 OffsetCy Y-axis offset to center. [input] I32 OffsetEx Axis offset to end of arc. [input] I32 OffsetEy Axis offset to end of arc. [input] U8 Dir Specified direction of arc, CCW: 0, CW: 1 [input] U32 StrVel Starting velocity in unit of pulse per second. [input] U32 MaxVel Maximum velocity in unit of pulse per second. [input] F32 Tacc Specified acceleration time in unit of second. [input] F32 Tdec Specified deceleration time in unit of second. Note: MaxVel > StrVel is necessary. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 186: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

186

8.6.11.4 _m124_start_sa_arc2

Description: Begin an absolute any 2 axis arc interpolation with S-curve profile. Syntax: I16 _m124_start_sa_arc2 (U16 *AxisArray, I32 Cx, I32 Cy, I32 Ex, I32 Ey, U8 Dir, U32 StrVel, U32

MaxVel, F32 Tacc,F32 Tdec) Argument:

[input] U16 *AxisArray

Array of axis number to perform interpolation. Example: Int AxisArray[2] = {0,2}; // axis 0 & 2 Int AxisArray[3] = {0,1,3}; // axis 0,1,3 Note: AxisArray[n] must be smaller than AxisArray[m], if n<m.

[input] I32 Cx X-axis absolute position to center. [input] I32 Cy Y-axis absolute position to center. [input] I32 Ex Axis absolute position to end of arc. [input] I32 Ey Axis absolute position to end of arc. [input] U8 Dir Specified direction of arc, CCW: 0, CW: 1 [input] U32 StrVel Starting velocity in unit of pulse per second. [input] U32 MaxVel Maximum velocity in unit of pulse per second. [input] F32 Tacc Specified acceleration time in unit of second. [input] F32 Tdec Specified deceleration time in unit of second. Note: MaxVel > StrVel is necessary. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 187: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

187

8.6.11.5 _m124_get_center

Description: Get clockwise & counter clockwise center. Syntax: I16 _m124_get_center (I32 Sx, I32 Sy, I32 Ex, I32 Ey, I32 Radius, U8 Dir, I32 *Cx, I32 *Cy) Argument: [input] I32 Sx Specified Start of arc X-axis absolute position. [input] I32 Sy Specified Start of arc Y-axis absolute position. [input] I32 Ex Specified End of arc X-axis absolute position. [input] I32 Ey Specified End of arc Y-axis absolute position. [input] I32 Radius Specified the radius of arc. [input] U8 Dir Specified direction of arc, CCW: 0, CW: 1 [input] I32 *Cx Specified Center of arc X-axis absolute position. [input] I32 *Cy Specified Center of arc Y-axis absolute position. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 188: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

188

8.6.11.6 _m124_start_tr_arc_xy

Description: Begin a relative arc interpolation of the first 2 axis with trapezoidal profile. Syntax: I16 _m124_start_tr_arc_xy (I32 OffsetCx, I32 OffsetCy, I32 OffsetEx, I32 OffsetEy, U8 Dir, U32 StrVel,

U32 MaxVel, F32 Tacc, F32 Tdec) Argument: [input] I32 OffsetCx X-axis offset to center. [input] I32 OffsetCy Y-axis offset to center. [input] I32 OffsetEx Axis offset to end of arc. [input] I32 OffsetEy Axis offset to end of arc. [input] U8 Dir Specified direction of arc, CCW: 0, CW: 1 [input] U32 StrVel Starting velocity in unit of pulse per second. [input] U32 MaxVel Maximum velocity in unit of pulse per second. [input] F32 Tacc Specified acceleration time in unit of second. [input] F32 Tdec Specified deceleration time in unit of second. Note: MaxVel > StrVel is necessary Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 189: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

189

8.6.11.7 _m124_start_ta_arc_xy

Description: Begin an absolute arc interpolation of the first 2 axis with trapezoidal profile. Syntax: I16 _m124_start_ta_arc_xy (I32 Cx, I32 Cy, I32 Ex, I32 Ey, U8 Dir, U32 StrVel, U32 MaxVel, F32

Tacc,F32 Tdec) Argument: [input] I32 Cx X-axis absolute position to center. [input] I32 Cy Y-axis absolute position to center. [input] I32 Ex Axis absolute position to end of arc. [input] I32 Ey Axis absolute position to end of arc. [input] U8 Dir Specified direction of arc, CCW: 0, CW: 1 [input] U32 StrVel Starting velocity in unit of pulse per second. [input] U32 MaxVel Maximum velocity in unit of pulse per second. [input] F32 Tacc Specified acceleration time in unit of second. [input] F32 Tdec Specified deceleration time in unit of second. Note: MaxVel > StrVel is necessary. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 190: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

190

8.6.11.8 _m124_start_sr_arc_xy

Description: Begin a relative arc interpolation of the first 2 axes with S-curve profile. Syntax: I16 _m124_start_sr_arc_xy (I32 OffsetCx, I32 OffsetCy, I32 OffsetEx, I32 OffsetEy, U8 Dir, U32 StrVel,

U32 MaxVel, F32 Tacc, F32 Tdec) Argument: [input] I32 OffsetCx X-axis offset to center. [input] I32 OffsetCy Y-axis offset to center. [input] I32 OffsetEx Axis offset to end of arc. [input] I32 OffsetEy Axis offset to end of arc. [input] U8 Dir Specified direction of arc, CCW: 0, CW: 1 [input] U32 StrVel Starting velocity in unit of pulse per second. [input] U32 MaxVel Maximum velocity in unit of pulse per second. [input] F32 Tacc Specified acceleration time in unit of second. [input] F32 Tdec Specified deceleration time in unit of second. Note: MaxVel > StrVel is necessary. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 191: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

191

8.6.11.9 _m124_start_sa_arc_xy

Description: Begin an absolute arc interpolation of the first 2 axes with S-curve profile. Syntax: I16 _m124_start_sa_arc_xy (I32 Cx, I32 Cy, I32 Ex, I32 Ey, U8 Dir, U32 StrVel, U32 MaxVel, F32

Tacc,F32 Tdec) Argument: [input] I32 Cx X-axis absolute position to center. [input] I32 Cy Y-axis absolute position to center. [input] I32 Ex Axis absolute position to end of arc. [input] I32 Ey Axis absolute position to end of arc. [input] U8 Dir Specified direction of arc, CCW: 0, CW:1 [input] U32 StrVel Starting velocity in unit of pulse per second. [input] U32 MaxVel Maximum velocity in unit of pulse per second. [input] F32 Tacc Specified acceleration time in unit of second. [input] F32 Tdec Specified deceleration time in unit of second. Note: MaxVel > StrVel is necessary. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 192: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

192

8.6.11.10 _m124_start_tr_arc_zu

Description: Begin a relative arc interpolation of the last 2 axis with trapezoidal profile. Syntax: I16 _m124_start_tr_arc_zu (I32 OffsetCz, I32 OffsetCu, I32 OffsetEz, I32 OffsetEu, U8 Dir, U32 StrVel,

U32 MaxVel, F32 Tacc, F32 Tdec) Argument: [input] I32 OffsetCz Z-axis offset to center. [input] I32 OffsetCu U-axis offset to center. [input] I32 OffsetEz Axis offset to end of arc. [input] I32 OffsetEu Axis offset to end of arc. [input] U8 Dir Specified direction of arc, CCW: 0, CW: 1 [input] U32 StrVel Starting velocity in unit of pulse per second. [input] U32 MaxVel Maximum velocity in unit of pulse per second. [input] F32 Tacc Specified acceleration time in unit of second. [input] F32 Tdec Specified deceleration time in unit of second. Note: MaxVel > StrVel is necessary. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 193: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

193

8.6.11.11 _m124_start_ta_arc_zu

Description: Begin an absolute arc interpolation of the last 2 axis with trapezoidal profile. Syntax: I16 _m124_start_ta_arc_zu (I32 Cz, I32 Cu, I32 Ez, I32 Eu, U8 Dir, U32 StrVel, U32 MaxVel, F32

Tacc,F32 Tdec) Argument: [input] I32 Cz Z-axis absolute position to center. [input] I32 Cu U-axis absolute position to center. [input] I32 Ez Axis absolute position to end of arc. [input] I32 Eu Axis absolute position to end of arc. [input] U8 Dir Specified direction of arc, CCW: 0, CW: 1 [input] U32 StrVel Starting velocity in unit of pulse per second. [input] U32 MaxVel Maximum velocity in unit of pulse per second. [input] F32 Tacc Specified acceleration time in unit of second. [input] F32 Tdec Specified deceleration time in unit of second. Note: MaxVel > StrVel is necessary. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 194: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

194

8.6.11.12 _m124_start_sr_arc_zu

Description: Begin a relative arc interpolation of the last 2 axes with S-curve profile. Syntax: I16 _m124_start_sr_arc_zu (I32 OffsetCz, I32 OffsetCu, I32 OffsetEz, I32 OffsetEu, U8 Dir, U32 StrVel,

U32 MaxVel, F32 Tacc, F32 Tdec) Argument: [input] I32 OffsetCz Z-axis offset to center. [input] I32 OffsetCu U-axis offset to center. [input] I32 OffsetEz Axis offset to end of arc. [input] I32 OffsetEu Axis offset to end of arc. [input] U8 Dir Specified direction of arc, CCW: 0, CW: 1 [input] U32 StrVel Starting velocity in unit of pulse per second. [input] U32 MaxVel Maximum velocity in unit of pulse per second. [input] F32 Tacc Specified acceleration time in unit of second. [input] F32 Tdec Specified deceleration time in unit of second. Note: MaxVel > StrVel is necessary. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 195: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

195

8.6.11.13 _m124_start_sa_arc_zu

Description: Begin an absolute arc interpolation of the last 2 axes with S-curve profile. Syntax: I16 _m124_start_sa_arc_zu (I32 Cz, I32 Cu, I32 Ez, I32 Eu, U8 Dir, U32 StrVel, U32 MaxVel, F32

Tacc,F32 Tdec) Argument: [input] I32 Cz Z-axis absolute position to center. [input] I32 Cu U-axis absolute position to center. [input] I32 Ez Axis absolute position to end of arc. [input] I32 Eu Axis absolute position to end of arc. [input] U8 Dir Specified direction of arc, CCW: 0, CW: 1 [input] U32 StrVel Starting velocity in unit of pulse per second. [input] U32 MaxVel Maximum velocity in unit of pulse per second. [input] F32 Tacc Specified acceleration time in unit of second. [input] F32 Tdec Specified deceleration time in unit of second. Note: MaxVel > StrVel is necessary. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 196: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

196

8.6.12. Helical Interpolation

Function name Description _m124_start_tr_arc_xyz Begin a relative XYZ-axis arc interpolation with trapezoidal profile. _m124_start_ta_arc_xyz Begin a absolute XYZ -axis arc interpolation with trapezoidal profile.

Page 197: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

197

8.6.12.1 _m124_start_tr_arc_xyz

Description: Begin a relative XYZ-axis arc interpolation with trapezoidal profile. Syntax: I16 _mnet_m204_start_tr_arc_xyz (I32 OffsetCx, I32 OffsetCy, I32 OffsetEx, I32 OffsetEy, I32 DistZ, U8

Dir, U32 StrVel, U32 MaxVel, F32 Tacc, F32 Tdec) Argument: [input] I32 OffsetCx X-axis offset to center. [input] I32 OffsetCy Y-axis offset to center. [input] I32 OffsetEx Axis offset to end of arc. [input] I32 OffsetEy Axis offset to end of arc. [input] I32 DistZ Distance of Z axis. [input] U8 Dir Specified direction of arc, CCW: 0, CW: 1 [input] U32 StrVel Starting velocity in unit of pulse per second. [input] U32 MaxVel Maximum velocity in unit of pulse per second. [input] F32 Tacc Specified acceleration time in unit of second. [input] F32 Tdec Specified deceleration time in unit of second. Note: MaxVel > StrVel is necessary. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 198: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

198

8.6.12.2 _m124_start_ta_arc_xyz

Description: Begin a absolute XYZ -axis arc interpolation with trapezoidal profile. Syntax: I16 _mnet_m204_start_ta_arc_xyz (I32 Cx, I32 Cy, I32 Ex, I32 Ey,I32 PosZ, U8 Dir, U32 StrVel, U32

MaxVel, F32 Tacc, F32 Tdec) Argument: [input] I32 Cx Specified X-axis absolute position of center. [input] I32 Cy Specified Y-axis absolute position of center. [input] I32 Ex Specified X-axis absolute position end of arc. [input] I32 Ey Specified Y-axis absolute position end of arc. [input] I32 PosZ Absolute position of Z axis. [input] U8 Dir Specified direction of arc, CCW: 0, CW: 1 [input] U32 StrVel Starting velocity in unit of pulse per second. [input] U32 MaxVel Maximum velocity in unit of pulse per second. [input] F32 Tacc Specified acceleration time in unit of second. [input] F32 Tdec Specified deceleration time in unit of second. Note: MaxVel > StrVel is necessary. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 199: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

199

8.6.13. Counter Compare Functions

Function name Description _m124_set_general_comparator Set general-purposed comparator. _m124_check_compare_data Check current comparator data. _m124_check_compare_status Check current comparator status.

Page 200: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

200

8.6.13.1 _m124_set_general_comparator

Description: Set general-purposed comparator. Syntax: I16 _m124_set_general_comparator (U16 AxisNo, I16 CmpSrc, I16 CmpMethod, I16 CmpAction, I32

Data) Argument: [input] U16 AxisNo Axis number: 0 ~ 3

[input] I16 CmpSrc

The comparing source counter. Value Meaning

0 Command Counter 1 Feedback Counter 2 Error Counter 3 General Counter

[input] I16 CmpMethod

The comparing method. Value Meaning

0 No compare 1 CmpValue=Counter (Directionless) 2 CmpValue=Counter (+Dir) 3 CmpValue=Counter (-Dir) 4 CmpValue>Counter 5 CmpValue<Counter

[input] I16 CmpAction

The corresponding action when the preset compared position is reached. Value Meaning

0 INT only 1 Immediately stop 2 Slow down then stop 3 speed change

[input] I32 Data Comparing value. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

8.6.13.2 _m124_check_compare_data

Description:

Page 201: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

201

Check current comparator data. Syntax: I16 _m124_check_compare_data (U16 AxisNo, I16 CompType, I32 *Pos) Argument: [input] U16 AxisNo Axis number: 0 ~ 3

[input] I16 CompType

Selection of type of comparator. Value Meaning

1 + Soft Limit 2 -Soft Limit 3 Error Counter Comparator Value 4 General Comparator Value 5 Trigger Output Comparator Value

[output] I32 *Pos Latched counter value. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 202: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

202

8.6.13.3 _m124_check_compare_status

Description: Check current comparator status by calling rc=_m124_get_continuous_buffer_status(). The available buffer is 3-rc. Syntax: I16 _m124_check_compare_status (U16 AxisNo, U16 *cmp_sts) Argument: [input] U16 AxisNo Axis number: 0 ~ 3

[output] U16 *cmp_sts

Status of comparator. Bit Meaning

0 +Softlimit On 1 -SoftLimit On 2 Error counter comparator On 3 General comparator On

Return: The return value is the occupied continuous buffer, say “rc”. The available buffer size is 3-rc.

Page 203: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

203

8.6.14. Counter Latch Functions

Function name Description _m124_set_ltc_logic Set latch logic. _m124_get_latch_data Get latch data.

Page 204: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

204

8.6.14.1 _m124_set_ltc_logic

Description: Set latch logic which defines the latch input logic LTC_x (DI_x) of the SCSI 100 pin. Syntax: I16 _m124_set_ltc_logic (U16 AxisNo, I16 ltc_logic) Argument: [input] U16 AxisNo Axis number: 0 ~ 3

[input] I16 ltc_logic

Setting of active logic for LTC signal. Value Meaning

0 Low active 1 High active

Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 205: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

205

8.6.14.2 _m124_get_latch_data

Description: Get latch data. Syntax: I16 _m124_get_latch_data (U16 AxisNo, I16 LatchNo, I32 *Pos) Argument: [input] U16 AxisNo Axis number: 0 ~ 3

[input] I16 LatchNo

Specified Counter to latch. Value Meaning

0 Low Active Command counter 1 Feedback counter 2 Error Counter 3 General Counter

[output] I32 *Pos Latched counter value. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 206: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

206

8.6.15. Continuous Functions

Function name Description _m124_set_continuous_move Enable continuous motion. _m124_check_continuous_buffer Check if the continuous buffer is empty. _m124_get_continuous_buffer_status Check if the continuous buffer is available.

_m124_cancel_continuous_buffer

Cancel continue buffer. This API will cancel the commands in the preload 1st command buffer and in the preload 2nd command buffer but the working command will be finished.

Motion Command Buffer There are 3 command buffer spaces for each axis for continuous motion. This allows programmers issue continuous motion commands without the waiting and checking sequences. However, there are some rules to follow before using them. 1. It is illegal to mix up single axis motion with multiple axes interpolation motion. 2. It is not recommended to mix up absolute and relative position motion commands. 3. There must be available spaces for command buffer by using _m124_check_continuous_buffer. 4. If absolute commands are to be issued, it is necessary to set the continuous move signal to on by using

_m124_set_continuous_move. It will return an error if continuous absolute position motion command is called without continuous move signal turned on and axis in motion.

5. Please clear the command buffer spaces by _m124_cancel_continuous_buffer before issuing _m124_emg_stop or _m124_sd_stop. These 2 functions would turn the continuous move signal to off automatically.

Page 207: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

207

8.6.15.1 _m124_set_continuous_move

Description: Enable continuous motion. Syntax: I16 _m124_set_continuous_move (U16 AxisNo, I16 conti_logic) Argument: [input] U16 AxisNo Axis number: 0 ~ 3

[input] I16 conti_logic

Setting of logic for continuous movement. Default value is disabled.

Value Meaning

0 One-shoot motion, end of continuous motion 1 Continuous motion, start of continuous motion

Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 208: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

208

8.6.15.2 _m124_check_continuous_buffer

Description: Check if the continuous buffer is empty. Syntax: I16 _m124_check_continuous_buffer (U16 AxisNo) Argument: [input] U16 AxisNo Axis number: 0 ~ 3 Return: 0 Buffer is not full. Has available spaces. 1 Buffer is full. Others Please refer to the error code table at Appendix A.

Page 209: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

209

8.6.15.3 _m124_get_continuous_buffer_status

Description: Check if the continuous buffer is available. Syntax: I16 _m124_get_continuous_buffer_status (U16 AxisNo) Argument: [input] U16 AxisNo Axis number: 0 ~ 3 Return: 0 Buffer is empty. 1 1 command is in the buffer. 2 2 commands are in the buffer. 3 3 commands are in the buffer, full already. Others Please refer to the error code table at Appendix A.

Page 210: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

210

8.6.15.4 _m124_cancel_continuous_buffer

Description: Cancel continue buffer. This API will cancel the commands in the preload 1st command buffer and in the preload 2nd command buffer but the working command will be finished. Syntax: I16 _m124_cancel_continuous_buffer (U16 AxisNo) Argument: [input] U16 AxisNo Axis number: 0 ~ 3 Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 211: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

211

8.6.16. Counter Comparator Trigger Out Functions

Function name Description _m124_set_trigger_type Set the trigger comparator output signal output logic. _m124_enable_trigger_comparator Enable the trigger comparator. _m124_get_trigger_available_buffer Get the trigger data buffer available number.

_m124_add_trigger_comparator Added new trigger comparator data to the buffer. Before use this function, please make sure the buffer of trigger comparator is available.

_m124_cancel_trigger_buffer Cancel all comparator data in buffer. _m124_disable_trigger_comparator Disable the trigger comparator function.

Page 212: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

212

8.6.16.1 _m124_set_trigger_type

Description: Set the trigger comparator output signal output logic. Syntax: I16 _m124_set_trigger_type (U16 AxisNo, I16 TriggerType) Argument: [input] U16 AxisNo Axis number: 0 ~ 3

[input] I16 TriggerType 0: Positive logic 1: Negative logic.

Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 213: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

213

8.6.16.2 _m124_enable_trigger_comparator

Description: Check if the continuous buffer is available. Syntax: I16 _m124_enable_trigger_comparator (U16 AxisNo, U8 CmpSrc, U8 CmpMethod, I32 CmpData) Argument: [input] U16 AxisNo Axis number: 0 ~ 3

[input] U8 CmpSrc

0: From Command Counter 1: From Position Counter 2: From Error Counter 3 :From General Counter

[input] U8 CmpMethod 1 (equal, dir independent ) 2 (equal , count up) 3 (equal, countdown)

[input] I32 CmpData The first comparator data Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 214: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

214

8.6.16.3 _m124_get_trigger_available_buffer

Description: Get the trigger data buffer available number. Syntax: I16 _m124_get_trigger_available_buffer (U16 AxisNo, U8 *buffer) Argument: [input] U16 AxisNo Axis number: 0 ~ 3 [output] U8 *buffer The number of the available buffer, 0~3 Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 215: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

215

8.6.16.4 _m124_add_trigger_comparator

Description: Added new trigger comparator data to the buffer. Before use this function, please make sure the buffer of trigger comparator is available. Syntax: I16 _m124_add_trigger_comparator (U16 AxisNo, I32 CmpData) Argument: [input] U16 AxisNo Axis number: 0 ~ 3 [input] I32 CmpData The next comparator data. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 216: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

216

8.6.16.5 _m124_cancel_trigger_buffer

Description: Cancel all comparator data in buffer. Syntax: I16 _m124_cancel_trigger_buffer (U16 AxisNo) Argument: [input] U16 AxisNo Axis number: 0 ~ 3 Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 217: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

217

8.6.16.6 _m124_disable_trigger_comparator

Description: Disable the trigger comparator function. Syntax: I16 _m124_disable_trigger_comparator (U16 AxisNo) Argument: [input] U16 AxisNo Axis number: 0 ~ 3 Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 218: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

218

8.6.17. Jog Functions

Function name Description

_m124_jog_switch_continue Enable the motion direction button so that the button pressed will start the motion and button release will stop the motion.

_m124_jog_switch_step Start a predefined pulse counter motion by the jog button.

_m124_jog_pulser_step Enable the MPG to start a motion with defined pulse ratio and motion profile.

_m124_jog_stop Stop the jog functions. _m124_get_jogio_status Get the I/O status related to jog function.

Page 219: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

219

8.6.17.1 _m124_jog_switch_continue

Description: Enable the motion direction button so that the button pressed will start the motion and button release will stop the motion. This function needs to cooperate with MPG port. Select axis signal (HX, HY, HZ or HU) and press JOGP+ or JOGP- to start the motion. Syntax: I16 _m124_jog_switch_continue (U16 AxisNo, U8 switch_logic, U32 StrVel, U32 MaxVel, F32 Tacc, F32

Tdec) Argument: [input] U16 AxisNo Axis number: 0 ~ 3

[input] U8 switch_logic

Set the switch logic. Value Meaning

0 Low active 1 High active

[input] U32 StrVel Start velocity. [input] U32 MaxVel Max velocity. [input] F32 Tacc Acceleration time. [input] F32 Tdec Deceleration time. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 220: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

220

8.6.17.2 _m124_jog_switch_step

Description: Start a predefined pulse counter motion by the jog button. This function needs to cooperate with MPG port. Select axis signal (HX, HY, HZ or HU) and press JOGP+ or JOGP- to start the motion. Syntax: I16 _m124_jog_switch_step (U16 AxisNo, U8 switch_logic, I32 Step, U32 StrVel, U32 MaxVel, F32 Tacc,

F32 Tdec) Argument: [input] U16 AxisNo Axis number: 0 ~ 3

[input] U8 switch_logic

Set the switch logic. Value Meaning

0 Low active 1 High active

[input] I32 Step Steps to move. [input] U32 StrVel Start velocity. [input] U32 MaxVel Max velocity. [input] F32 Tacc Acceleration time. [input] F32 Tdec Deceleration time. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 221: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

221

8.6.17.3 _m124_jog_pulser_step

Description: Enable the MPG to start a motion with defined pulse ratio and motion profile. This function needs to cooperate with MPG port. Select axis signal (HX, HY, HZ or HU) and press JOGP+ or JOGP- to start the motion. Syntax: I16 _m124_jog_pulser_step (U16 AxisNo, U8 pulser_Dir, U8 Step, U32 StrVel, U32 MaxVel, F32 Tacc,

F32 Tdec) Argument: [input] U16 AxisNo Axis number: 0 ~ 3

[input] pulser_Dir

Set the pulser dir. Value Meaning

0 Negative(-)direction 1 Positive(+)direction

[input] U8 Step Select the multiple of step 1, 10 or 100 [input] U32 StrVel Start velocity. [input] U32 MaxVel Max velocity. [input] F32 Tacc Acceleration time. [input] F32 Tdec Deceleration time. Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 222: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

222

8.6.17.4 _m124_jog_stop

Description: Stop the jog functions. Syntax: I16 _m124_jog_stop (U16 AxisNo) Argument: [input] U16 AxisNo Axis number: 0 ~ 3 Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 223: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

223

8.6.17.5 _m124_get_jogio_status

Description: Get the I/O status related to jog function. Syntax: I16 _m124_get_jogio_status (U16 AxisNo, U16 *jogio_sts) Argument: [input] U16 AxisNo Axis number: 0 ~ 3

[output] U16 *jogio_sts

IO status word. Where “1’ is ON and “0” is OFF. ON/OFF state is read based on the corresponding setting logic.

Value Meaning

X1 (Bit 0) X1 input signal. X10 (Bit 1) X10 input signal. X100 (Bit 2) X100 input signal. Enable (Bit 3) Enable input signal.

WaitDR (Bit 4) In wait JOG+ and JOG- input signal to move status.

WaitPAB (Bit 5) In wait PA/PB input signal to move status.

PABErr (Bit 6) PA/PB input signal has error. PABOverflow (Bit 7) PA/PB input buffer overflow. JOGP (Bit 8) JOG+ input signal. JOGN (Bit 9) JOG- input signal.

Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 224: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

224

9. Appendix A

9.1. The Platform Error Code List Table

PLATFORM_NoError 0 PLATFORM_NotReady_Error -9000 PLATFORM_CheckDeviceNotMatch_Error -9001 PLATFORM_Unknown_Error -9005 PLATFORM_DeviceUnknown_Error -9006 PLATFORM_Version_Error -9010 PLATFORM_Open_File_Error -9011 PLATFORM_Write_File_Error -9012 PLATFORM_Read_File_Error -9013 PLATFORM_Out_Of_Range_Error -9020 PLATFORM_InvalidParameter_Error -9021 PLATFORM_GetSecureIdFailed_Error -9022 PLATFORM_GenAesKeyFailed_Error -9023 PLATFORM_InformationType_Unknown_Error -9030 PLATFORM_Debug_Infomation_0 -9040 PLATFORM_Debug_Infomation_1 -9041 PLATFORM_Debug_Infomation_2 -9042 PLATFORM_Debug_Infomation_3 -9043 PLATFORM_NotSucceed_Error -9090

Page 225: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

225

9.2. The Motion Error Code List Table

ERR_NoError 0

ERR_BoardNotInitYet -14001

ERR_BoardInitializedAlready -14002

ERR_InvalidBoardNumber -14003

ERR_InvalidAxisNumber -14004

ERR_InvalidParameter1 -14011

ERR_InvalidParameter2 -14012

ERR_InvalidParameter3 -14013

ERR_InvalidParameter4 -14014

ERR_InvalidParameter5 -14015

ERR_InvalidParameter6 -14016

ERR_InvalidParameter7 -14017

ERR_InvalidParameter8 -14018

ERR_InvalidParameter9 -14019

ERR_InvalidParameter10 -14020

ERR_InvalidParameter11 -14021

ERR_InvalidParameter12 -14022

ERR_SlowDownPointError -14031

ERR_Err3PointsInput -14032

ERR_GetCenterFailed -14033

ERR_CompareBufferFull -14034

ERR_AxisNotStoppedYet -14035

Page 226: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

226

9.3. Software Installation

The SmartPAC product is delivered with an installation CD. Contents included in the CD are user manuals, programming .dll files, sample projects and utility – MyLink. The screenshot of the CD is as the following figure when the autorun batch file is executed.

Figure 9-1: screenshot of the installation CD

Page 227: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

227

9.4. Recovery of Broken File System

SPC-2000 does not support hot plug of the CF card because it will crash the file system. The steps below will show how to recover the system from file system failure. 1. Insert the CF card in the SPC-2000 as the figure below.

Figure 9-2: insert CF card in the system

2. Press F11 to enter the bios setting page while booting up the SPC-2000. 3. Select CF card named as HDD: PS-TRANSCEND as the boot device as the following figure. Save this

setting and reboot the system.

Figure 9-3: select CF card as the boot device

4. When the system boots up, it will enter the DOS mode as the figure below. Now select option (A) Action 1: Make the disk of SPC-2000 and hit enter to do the action. The system will reboot automatically right after the enter button is hit.

Page 228: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

228

Figure 9-4: select option (A) to make the disk of SPC-2000

5. It is necessary to select HDD: PS-TRANSCEND as the boot device again from the BIOS setting page. 6. After the system restarted, it will show the DOS menu again. Select (B) Action 2: Format and make the

windows CE system for this time.

Figure 9-5: select option (B) to make the disk of SPC-2000

7. After rebooting the system, it will enter the Windows CE system and pop up a dialog as the following figure. Click the OK button without any change to close the dialog.

Page 229: SPC-2000 User Manual - tpm-pac.com · SmartPAC User Manual 1 SmartPAC . SPC-2000 User Manual . Version: V1.3 2013J03 . To properly use the product, read this manual thoroughly is

SmartPAC User Manual

229

Figure 9-6: just press OK button when the windows pops up the dialog.

8. Then the system will start coping necessary files to the system.

Figure 9-7: recovering the system.

After all the steps above, the system will be recovered as shown below.

Figure 9-8: the system is successfully recovered.