+ All Categories
Home > Documents > SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”),...

SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”),...

Date post: 14-Mar-2018
Category:
Upload: leque
View: 219 times
Download: 3 times
Share this document with a friend
244
SmartPAC User Manual 1 SmartPAC SPC-2000 User Manual Version: V1.0 2012J03 To properly use the product, read this manual thoroughly is necessary. Part No.: 81-00SPC10-010
Transcript
Page 1: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

1

SmartPAC

SPC-2000 User Manual

Version: V1.0 2012J03

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

Page 2: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

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.

Page 3: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

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: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

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: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

5

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

1. INTRODUCTION ...................................................................................................................................................................... 9

1.1. OVERVIEW .................................................................................................................................................................................. 9

1.2. FEATURES .................................................................................................................................................................................... 9

1.3. HARDWARE SPECIFICATIONS ......................................................................................................................................................... 10

1.4. MOTIONNET COMPATIBLE DEVICES ................................................................................................................................................ 10

2. I/O INTERFACES .................................................................................................................................................................... 11

2.1. INTERFACES ............................................................................................................................................................................... 11

2.2. KEYBOARD AND MOUSE NOTICE .................................................................................................................................................... 12

2.3. PIN ASSIGNMENT FOR EACH CONNECTOR ........................................................................................................................................ 13

2.3.1. Serial Port (Com) ................................................................................................................................................. 13

2.3.2. GPIO .................................................................................................................................................................... 13

2.3.3. Side 24V DC Input ............................................................................................................................................... 16

2.3.4. RS-485 ................................................................................................................................................................. 16

2.3.5. Hand Wheel Connector ........................................................................................................................................ 16

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

2.3.7. Motionnet Ring .................................................................................................................................................... 18

2.3.8. SW1 (Function Reserved) .................................................................................................................................... 18

2.3.9. SW2 – Motionnet Speed Selection ...................................................................................................................... 18

2.3.10. Audio .................................................................................................................................................................. 19

2.3.11. SCSI 100 Pin ...................................................................................................................................................... 20

2.4. MOTIONNET DEVICES .................................................................................................................................................................. 23

2.4.1. Motionnet Extension Connector .......................................................................................................................... 23

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

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

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

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

3.2. 107-T141-GEN SERIES .............................................................................................................................................................. 26

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

3.2.2. Product Category ................................................................................................................................................. 26

3.2.3. Module Introduction ............................................................................................................................................ 27

3.2.4. Example ............................................................................................................................................................... 28

3.2.5. Product Naming Convention ................................................................................................................................ 29

3.2.6. Specification Convention ..................................................................................................................................... 30

Page 6: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

6

3.2.7. Part Number Convention ..................................................................................................................................... 30

3.2.8. BOM Table ........................................................................................................................................................... 30

4. MOTIONNET INTRODUCTION ............................................................................................................................................... 33

4.1. WHAT IS MOTIONNET? ............................................................................................................................................................... 33

4.2. MOTIONNET FUNCTIONS ............................................................................................................................................................. 33

4.3. ADVANTAGE OF MOTIONNET ........................................................................................................................................................ 34

4.4. MOTIONNET PRODUCT FAMILY ...................................................................................................................................................... 36

5. SOFTWARE UTILITIES ............................................................................................................................................................ 37

5.1. SPC_TOOL_CE ......................................................................................................................................................................... 37

5.1.1. Information .......................................................................................................................................................... 37

5.1.2. General ................................................................................................................................................................. 38

5.1.3. Boot Execute ........................................................................................................................................................ 39

5.1.4. Rotary Switch Execute ......................................................................................................................................... 40

5.1.5. Backup/Restore .................................................................................................................................................... 41

5.1.6. AES ...................................................................................................................................................................... 42

5.2. MYLINK .................................................................................................................................................................................... 43

5.2.1. Interface ............................................................................................................................................................... 43

5.2.2. Module Status ...................................................................................................................................................... 45

5.2.3. DIO Module Operation ........................................................................................................................................ 47

5.2.4. AIO Module Operation ........................................................................................................................................ 48

5.2.5. PIO Counter Module Operation ........................................................................................................................... 53

5.2.6. Single Axis Module .............................................................................................................................................. 56

5.2.7. Grouped Axes ...................................................................................................................................................... 57

6. PROJECT ENCRYPTION .......................................................................................................................................................... 65

6.1. BENEFITS .................................................................................................................................................................................. 65

6.2. AES BRIEF INTRODUCTION ........................................................................................................................................................... 65

6.3. FUNCTIONAL ARCHITECTURE ......................................................................................................................................................... 65

6.4. APPLICATION INTERFACE .............................................................................................................................................................. 68

6.4.1. _spc2_get_secure_id ............................................................................................................................................ 69

6.4.2. _spc2_gen_aes_key .............................................................................................................................................. 70

6.4.3. _spc2_check_aes_key .......................................................................................................................................... 71

6.4.4. _spc2_gen_aes_str ............................................................................................................................................... 72

6.4.5. _spc2_check_aes_str ............................................................................................................................................ 73

7. SOFTWARE DEVELOPMENT ENVIRONMENT .......................................................................................................................... 74

7.1. SYSTEM REQUIREMENTS .............................................................................................................................................................. 74

Page 7: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

7

7.1.1. Hardware Requirements ....................................................................................................................................... 74

7.1.2. Software Requirements ........................................................................................................................................ 74

7.2. ONLINE DEBUGGER ..................................................................................................................................................................... 74

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

7.2.2. Connect to SmartPAC .......................................................................................................................................... 75

8. FUNCTION REFERENCE .......................................................................................................................................................... 80

8.1. HARDWARE INITIALIZATION ........................................................................................................................................................... 80

8.2. LIBRARY INITIALIZATION ............................................................................................................................................................... 80

8.3. MOTIONNET MASTER ................................................................................................................................................................. 81

8.4. DATA DEFINITION ....................................................................................................................................................................... 81

8.5. PLATFORM FUNCTIONS ................................................................................................................................................................ 82

8.5.1. Platform Information Functions ........................................................................................................................... 82

8.5.2. Platform I/O Functions ........................................................................................................................................ 89

8.5.3. Platform AES Functions ...................................................................................................................................... 95

8.5.4. Platform Retain Functions ................................................................................................................................... 99

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

8.6.1. System Initialization .......................................................................................................................................... 105

8.6.2. Pulse Input / Output Configurations ................................................................................................................... 111

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

8.6.4. Homing Control Functions ................................................................................................................................ 126

8.6.5. Velocity Control Functions ................................................................................................................................ 137

8.6.6. Position Control Functions ................................................................................................................................ 144

8.6.7. Stop Control Functions ...................................................................................................................................... 152

8.6.8. Counter Operating Functions ............................................................................................................................. 158

8.6.9. I/O Control Functions ........................................................................................................................................ 175

8.6.10. Linear Interpolation ......................................................................................................................................... 178

8.6.11. Arc Interpolation .............................................................................................................................................. 199

8.6.12. Helical Interpolation ........................................................................................................................................ 213

8.6.13. Compare Functions .......................................................................................................................................... 216

8.6.14. Latch Functions ................................................................................................................................................ 220

8.6.15. Continuous Functions ...................................................................................................................................... 223

8.6.16. Counter Comparator Trigger Out Functions .................................................................................................... 228

8.6.17. Jog Functions ................................................................................................................................................... 235

9. APPENDIX A ........................................................................................................................................................................ 241

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

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

9.3. SOFTWARE INSTALLATION ........................................................................................................................................................... 244

Page 8: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

8

Page 9: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

9

1. Introduction Utilizing the DMP® Vortex86DX chipsets, SmartPAC is a compact size and powerful PAC (Programmable Automation Controller). SmartPAC provides features including one RS232/RS422/RS485 com port, one 2 USB slots, 1 VGA output, two motion controller (2-axis for each controller), 10/100T Ethernet LAN port, one terminal block, one DIO (8-DI and 8-DO) and one pulse generator (hand wheel). 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 hand wheel port

Page 10: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

10

Built-in 8-DI and 8-DO SCSI port Daughter board extension slot

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 • Power consumption: 8W

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 11: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

11

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 hand wheel (JOG)

Page 12: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

12

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

2.2. Keyboard and Mouse Notice

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.

Figure 2-4: USB 1 and 2 indication

Page 13: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

13

2.3. Pin Assignment for Each Connector

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

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.

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 14: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

14

Figure 2-5: DI NPN logic circuit

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.

Page 15: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

15

Figure 2-7: DO NPN logic circuit

Page 16: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

16

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 input 4 GND Ground

Table 2-4: pin definition of RS-485

2.3.5. Hand Wheel Connector

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 hand wheel port

The logic circuit is illustrated below.

Page 17: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

17

Figure 2-8: hand wheel NPN logic circuit

Figure 2-9: hand wheel PNP logic circuit

Page 18: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

18

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

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 OFF OFF 20Mbps OFF ON 10Mbps ON OFF 5Mbps ON ON 2.5Mbps

Page 19: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

19

Table 2-8: baud rate list table

2.3.10. Audio

This function is not temporarily released.

Page 20: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

20

2.3.11. SCSI 100 Pin

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

Figure 2-10: 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 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

Page 21: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

21

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

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. I<100mA

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 (-)

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.

Page 22: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

22

Figure 2-11: LTC logic circuit in NPN type

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

Figure 2-12: CMP logic circuit in NPN type

Page 23: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

23

2.4. Motionnet Devices

2.4.1. Motionnet Extension Connector

Figure 2-13: Motionnet extension connector Ring

Pin Label Description 1 FG Filed Ground 2 FG Filed Ground 3 RS485+ High Speed RS-485 protocol 4 FG Filed Ground 5 FG Filed Ground 6 RS485- High Speed RS-485 protocol 7 FG Filed Ground 8 FG Filed Ground

Page 24: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

24

3. Terminal Boards The 4-axis motion control interface is via the 100 pin SCSI connector on SmartPAC. 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

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

Page 25: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

25

Figure 3-2: SCSI 100 pin definition

Figure 3-3: screw terminal definition

Figure 3-4: screw terminal definition

Page 26: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

26

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-DAB (2) DB-T141-DUM (3) DB-T141-YS2 (4) DB-T141-PMA (5) DB-T141-GEN (6) DB-T141-PA4 (7) DB-T141-MJ3

Page 27: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

27

107-T141-GEN

Driver Type Add modules of 107-T141 Terminal Board Series

Delta B Type Driver (A)DB-T141-DAB

Servo or stepping Driver (B)DB-T141-DUM (E)DB-T141-GEN

Yaskawa Sigma-II/V Driver (C)DB-T141-YS2

Panasonic Minas A Driver (D)DB-T141-PMA (F)DB-T141-PA4

Mitsubishi MR-J3 Driver (G)DB-T141-MJ3

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 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 28: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

28

Figure 3-5: 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 (A)DB-T141-DAB

3

Panasonic Minas A Driver (F)DB-T141-PA4

4

Mitsubishi MR-J3 Driver (G)DB-T141-MJ3

Table 3-2: selected list example

Page 29: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

29

Figure 3-6: software processed sample product image

3.2.5. Product Naming Convention

The product name is composed according to the requirement of users. Take the previous instance as an example the product name would be 107-AAFG-141. 107-AAFG-141 = 107-T141-GEN + A: DB-T141-DAB + A: DB-T141-DAB + F: DB-T141-PA4 + G: DB-T141-MJ3

Figure 3-7: illustration of an example of the naming convention

Page 30: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

30

3.2.6. 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.

3.2.7. Part Number Convention

According to the previous example, the product part number is 92-361AAFG-011. 92-361AAFG-011 = 107-T141-GEN (part number: 90-3611410-011. See note.) + A: DB-T141-DAB + A: DB-T141-DAB + F: DB-T141-PA4 + G: DB-T141-MJ3

Figure 3-8: the part number generation with 107-T141-GEN from level 90 upgrade to 92

Note: 90-3611410-010 is the 107-T141-GEN R1.0 which is the old version. The introduction is not included in this document.

3.2.8. BOM Table

According to the previous example, the product part number is 92-361AAFG-011. Users need to select the required extended daughter boards to compose the product BOM. The level of each terminal board is 90 at maximum. Once the product is composed, the level for the designated product terminal board is upgraded to 92.

Page 31: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

31

Part no. Item name 90-3611410-011 107-T141-GEN R11 90-6070602-011 (A) DB-T141-DAB 90-6070601-011 (B) DB-T141-DUM 90-6070606-011 (C) DB-T141-YS2 90-6070605-011 (D) DB-T141-PMA 90-6070603-011 (E) DB-T141-GEN 90-6070604-011 (F) DB-T141-PA4 90-6080701-011 (G) DB-T141-MJ3

Table 3-3: BOM list of each item

The generated BOM for 107-AAFG-141 is listed in the following table.

Level Part no. Item name Note 92 92-361AAFG-011 107-AAFG-141

Table 3-4: generated BOM

Level Part no. Item name Pcs Note

90 90-3611410-011 107-T141-GEN R11 1 90 90-6070602-011 DB-T141-DAB 2 CN1, CN2 90 90-6070604-011 DB-T141-PA4 1 CN3 90 90-6080701-011 DB-T141-MJ3 1 CN4 90 82-2226409-001 Conductive Grid Bag 26.0x40.0x0.09mm 1 90 82-3116425-001 Antistatic Label Yellow 64x25mm 1 90 82-3422510-003 Barcode Label Silver 25x10mm 1 90 82-3636030-003 Product Label White 60x30mm 1 On terminal board

Table 3-5: BOM list for each item

The 107-T141-GEN series are composed with 4 terminal boards. The production plan for now is arrange 2 pairs for each kind of terminal board. Therefore, there will be 28 selections in mass production listed below.

Item name Specification Part no. Note 107-AAAA-141 107-T141 with DABx4 92-361AAAA-011 107-AABB-141 107-T141 with DABx2+DUMx2 92-361AABB-011 107-AACC-141 107-T141 with DABx2+YS2x2 92-361AACC-011 107-AADD-141 107-T141 with DABx2+PMAx2 92-361AADD-011 107-AAEE-141 107-T141 with DABx2+GENx2 92-361AAEE-011

Page 32: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

32

Item name Specification Part no. Note 107-AAFF-141 107-T141 with DABx2+PA4x2 92-361AAFF-011 107-AAGG-141 107-T141 with DABx2+MJ3x2 92-361AAGG-011 107-BBBB-141 107-T141 with DUMx4 92-361BBBB-011 107-BBCC-141 107-T141 with DUMx2+YS2x2 92-361BBCC-011 107-BBDD-141 107-T141 with DUMx2+PMAx2 92-361BBDD-011 107-BBEE-141 107-T141 with DUMx2+GENx2 92-361BBEE-011 107-BBFF-141 107-T141 with DUMx2+PA4x2 92-361BBFF-011 107-BBGG-141 107-T141 with DUMx2+MJ3x2 92-361BBGG-011 107-CCCC-141 107-T141 with YS2x4 92-361CCCC-011 107-CCDD141 107-T141 with YS2x2+PMAx2 92-361CCDD-011 107-CCEE-141 107-T141 with YS2x2+GENx2 92-361CCEE-011 107-CCFF-141 107-T141 with YS2x2+PA4x2 92-361CCFF-011 107-CCGG-141 107-T141 with YS2x2+MJ3x2 92-361CCGG-011 107-DDDD-141 107-T141 with PMAx4 92-361DDDD-011 107-DDEE-141 107-T141 with PMAx2+GENx2 92-361DDEE-011 107-DDFF-141 107-T141 with PMAx2+PA4x2 92-361DDFF-011 107-DDGG-141 107-T141 with PMAx2+MJ3x2 92-361DDGG-011 107-EEEE-141 107-T141 with GENx4 92-361EEEE-011 107-EEFF-141 107-T141 with GENx2+PA4x2 92-361EEFF-011 107-EEGG-141 107-T141 with GENx2+MJ3x2 92-361EEGG-011 107-FFFF-141 107-T141 with PA4x4 92-361FFFF-011 107-FFGG-141 107-T141 with PA4x2+MJ3x2 92-361FFGG-011 107-GGGG-141 107-T141 with MJ3x4 92-361GGGG-011

Table 3-6: 107-T141-GEN with generated product list

Page 33: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

33

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.

Page 34: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

34

New devices can be added to the system on the fly. Systems can be isolated using pulse transformers. Transfer speed up to 20 Mbps. 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.

ACTUATORACTUATORACTUATORACTUATORACTUATOR

SENSORSENSORSENSORSENSORSENSORSENSORSENSORSENSOR

Extension

Master

Analog I /O Digital I /O Motion

ACTUATORACTUATORACTUATORACTUATORACTUATOR

SENSORSENSORSENSORSENSORSENSORSENSORSENSORSENSOR

100m

Motion.NET

WIRE-SAVING / LONG-DISTANCE

ACTUATORACTUATORACTUATORACTUATORACTUATORMOTOR

ACTUATORACTUATORACTUATORACTUATORACTUATORMOTOR

Page 35: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

35

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. 65 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 36: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

36

4.4. Motionnet Product Family

Figure 4-4: Motionnet product family

Page 37: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

37

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

Page 38: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

38

5.1.2. General

The functions in the General tab are briefly described below.

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.

Copy Online Debug Program for 2005/2008

Page 39: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

39

These two button actions are copying the .dll files to the system for debug use. It is very important for users need to develop programs on the system. Only if users copied the debug supporting files to the system could do debug remotely. The remote debugger will be introduced in section 7.2 Online Debugger. Note that it is necessary to copy the match version of the debug .dll file according to Microsoft Visual Studio 2005 or 2008 respectively. The most recent debug system could be obtained by clicking “Get Current Debug System” button and the information will show up in the label right before the button. It is necessary to restart the system if users load the other debug system.

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 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.

Page 40: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

40

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 41: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

41

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 files or FRAM files only 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.

Page 42: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

42

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 screen of the AES encryption tab is shown below.

Page 43: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

43

Figure 5-6: AES key generation tab

5.2. MyLink

MyLink is utility software used to test, diagnose and verify the functions of the remote Motionnet slave modules. The following slave modules are available: DIO、AIO、Counter and Axis modules. After

successful installation, MyLink.exe with icon could be found in the remote PC.

Recommended Hardware Requirement PC Hardware: PC or laptop with Intel Centrino up CPU Memory: 1GB RAM OS: Windows 2000/XP/Win7 LAN card: RJ-45 10/100/1000 Mbps Software Execution 1. Start MyLink Server in SPC. 2. Double click on the executable file MyLink.exe to launch the program. 3. Close MyLink Server after finishing diagnosis. Otherwise, the hardware resources will be occupied.

5.2.1. Interface

Login The supported master contains 6 kinds of devices – SmartPAC, USB-L111, EasyPAC, PCI-L112, PCI-L122 and PCI-M114-GL. If users select USB-L111, the baud rate option of Ring_0 and Ring_1 would be enabled.

Page 44: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

44

If users select SmartPAC as the master device, the baud rate would keep disabled since that is set by switching the dip switch SW2.

Figure 5-7: screenshot of settings

Tool Bar

Figure 5-8: MyLink main functions

There are 4 main functions in the tool bar. File

This is used for file access. Also this is used to set and save of axes module parameters or copy the parameters for other axes.

Figure 5-9: functions under file option

Tools Provides functions for setting system parameters and initialize the system. There are 2 sub-functions: 1. Edit Path…: this option is only available when two axes module are grouped up. Later we will

discuss about the “Group” function. 2. Refresh: this function provides users to rescan all the devices connected to the MyLink server after

adding, removing or replacing Motionnet slave modules without the need of restarting MyLink.

Figure 5-10: functions under tools option

Page 45: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

45

Windows When multiple slave modules are displayed in the same time, the related menu will be re-arranged accordingly.

Figure 5-11: functions under window option

Help This shows the MyLink revision number.

5.2.2. Module Status

After clicking the initial button, the found and identified slave modules will be shown accordingly. Click the check box in front of the slave module and the corresponding menu will pop-up. Except USB-L111, it will show up two Motionnet masters at the top left corner – Ring_0 and Ring_1. If the master is SmartPAC, MyLink could save the profile according to data type designated for KW. Moreover, the slave modules besides axes control are supposed to connect to Ring_0 and axes control is supposed to connected to Ring_1. Check the slave device at the check box will pop up the corresponding control window at the main frame of MyLink and the properties will show at the left bottom corner.

Figure 5-12: on board 4-axis and Motionnet slave devices found by the Motionnet master

Properties The related item will be shown according to the selected slave module type. If the property is grayed out means it is read only.

Page 46: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

46

Figure 5-13: the property window

If the parameter comes with a combo box means the input options are pre-arranged. If the input is a text box, users should key in the value needed within the acceptable range. The combo box for a parameter is shown as the following figure.

Figure 5-14: screenshot of updating properties

Description This is located below the property page. The main purpose is illustration and suggestion.

Figure 5-15: property description

Ring Status Ring status is shown in the bottom. Green means the ring is initialized successfully without error and red means the ring is in error state. The number within the parenthesis represents the number of communication failure. The ring status will be in red if there is no slave modules connected to the ring or the communication retry time reaches the maximum limit (10000).

Figure 5-16: Ring status

Message

Page 47: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

47

There is a block above the ring status displaying responses from MyLink. The responses include time stamp the event occurred and error or hint messages.

Figure 5-17: message box information

5.2.3. DIO Module Operation

Figure 5-18: controller view

Figure 5-19: properties dialog

Figure 5-20: module operation frame

Module Status As shown in the above menu, a DIO module is identified in Ring 0. This example is a 16 input /16 output module.

Page 48: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

48

Property No setting is required for DIO module.

Operation The DO is connected with DI in the illustrated DIO module accordingly. When turn on the DO channel, both the DO and corresponding DI are ON.

5.2.4. AIO Module Operation

5.2.4.1 A104 & A180

In this example, 4 AO (A104) channels are connected to the 4 AI (A180) channels. The remaining 4 channels of AI connect to ground.

Figure 5-21: information of connected devices

Module Status AO module with IP19 and AI module with IP48 are identified.

Property The property of AO module is similar to DIO module. The input range property can be set here. There are 8 channels with 4 ranges (±1.25/ ±2.50/ ±5.0/ ±10.0).

Operation Move the track bar to change the output value of AO module and the value will also be shown in the AI

Page 49: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

49

module.

5.2.4.2 108-A122

The only difference between 108-A122 and A104/A180 is 108-A122 has an EEPROM storage device. The operation is almost the same as A104/A180 illustrated later.

Figure 5-22: 108-A122 slave module

Module Status The property sub-frame shows the information of 108-A122 with EEPROM.

Figure 5-23: properties of 108-A122

Property The extensions of 108-A122 are inputs – Mode, Gain and ValueType and output – PowerOnValue. All parameter values could be stored in the EERPOM except the ValueType. Mode: select the input mode single end or differential end.

Page 50: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

50

Gain: select the input voltage range. It is separated into 8 grades - +/-80mV, +/-160mV, +/-320mV, +/-640mV, +/-1.28V, +/-2.56V, +/-5.12V, +10.24/-5.12V. The input voltage larger than 5.12V is not recommended. ValueType: set the view of input/output as transformed voltage or the raw data. The rules to transform to the voltage value by calling APIs are as following: 1. Take reference only on the positive voltage value. Take +10.24V for example, Range = 10.24 * 2,

Start = -10.24, the result could be obtained by calling API a122_get_input_value. 2. Input voltage Vin = (Value x Range) /65536 + Start 3. PowerOnValue: when the power supplies, the initial value of 108-A122. Default value is 0.

Operation The demo program is cross-connection from 4 outputs to 8 inputs separately (ex. AO1 – A1+ – A3+)

Figure 5-24: screenshot of the example

The program keeps polling of the analog input data. There are only a few options users could change – Input Setting-1.Mode (single end or differential), Input Setting-2.Gain (voltage) and the ValueType (voltage output or raw data). Users could change the output value by inputting the voltage value directly or by scrolling the slide bar. Select the check box to choose which to output.

Retain Parameters As mentioned above, 108-A122 is a module with an EEPROM for data storage and MyLink is a parameter setting utility. It is very important to save the setting in the EEPROM so that users do not have to set the parameters every time when system is brought up. Moreover, users who do not thoroughly understand the settings could also use this module with the preset parameters. Users could write the configuration in the EEPROM through File Backup Config to… as following

Page 51: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

51

shown figure.

Figure 5-25: save parameters to EEPROM

If the Backup Config to… option is hit, a new dialog will be popped up as figure below.

Figure 5-26: save configuration dialog

There are two targets of configuration storage –EEPROM Users need to take few steps to save the configuration in the EEPROM as following. 1. Check the EEPROM option, and all the modules with EEPROM will show up in the list. 2. Select modules need to store to EEPROM by checking the checkbox. 3. Press “Save” button.

Page 52: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

52

The status window displays the saving result with time stamps and messages.

Figure 5-27: saving status window

Duplication This function is made to efficiently duplicate configuration profiles among same type of modules. For example, users could duplicate the configuration profile to other 108-A122 from the settings of the previous bought identical type product. The steps to duplicate are as following. Select “File Recovery Config From…” from file option.

Figure 5-28: duplicate configuration option

If the Recovery Config From… option is hit, a new dialog will be popped up as figure below.

Figure 5-29: recover profile dialog

Here is the duplicating sequence: i. Select “Other Axis” from the radio button as the recovery source.

ii. Select the copy source from the module list.

Page 53: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

53

iii. Select the destinations. Users could select multiple devices by multi-checking devices or check the Ring to select all devices under the Ring.

iv. Press the “LoadAll” to finish the recovery. The status window displays the recovery result with time stamps and messages.

Figure 5-30: recovery status window

Note that the recovery is just recovering to the specified devices, not saving to EEPROM. If the profile needs to be saved eternally, users still need to save it to the EERPOM.

5.2.5. PIO Counter Module Operation

The PIO counter module operation is illustration in this chapter. A signal generator is connected to channel 0 and channel 1 of a counter module.

Figure 5-31: MyLink control for counter module

Module Status Displays counter modules found with corresponding IP address. The module name is a little bit different with AI/O and DI/O. There are five modes of counter configurable. The frequency mode is

Page 54: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

54

adapted hereafter.

Property The 108-P120 extension properties include: Mode, Time, AlarmOut, Average, Edge, PowerOn, SafeValue, UpperLimit and LowerLimit. Except the options of Mode and Time are set with Group as a unity, other are set with each channel independently. IN0 and IN1 are grouped up as Group0 and IN2 and IN3 are grouped up as Group1. The details of the properties are listed below: 1. Cycle Time

It is the time period between two sampling times. The default value is 2ms and maximum at 200ms.

2. Mode 5 modes are available: Counter, Frequency, Period, GT and GC. Mode name Parameter Description

Counter

– Counter mode

Time 0: up-count 1: down-count

Average Unused Edge Trigger type: Rise/Fall

Upper Limit 0 to 4,294,967,295 Maximum number for up-count and initial number for down-count.

Lower Limit 0 to 4,294,967,295. Initial number for up-count and minimum number for down-count.

AlarmOut Measured Value < Lower Limit or Measured value > Upper Limit

Frequency

– Frequency mode

Time 0.1s/1s/10s/100s the sampling period. 1s: INx gets 1000 pulses within 1 second, the measured frequency is 1KHz.

Average unused Edge Trigger Type: Rise/Fall Upper Limit Hz (0 ~ 4,294,967,295) Lower Limit Hz (0 ~ 4,294,967,295)

AlarmOut Measured Value < Lower Limit or Measured value > Upper Limit

Period – Period measurement mode, this is used to measure the ON-OFF time of the incoming pulses, the max measured time is 800ms.

Page 55: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

55

Mode name Parameter Description

Time

2ms/20m/200ms/800ms Set the max measure time for INx input pulse. Example: The period of INx input pulse is 1.5ms. The most accurate measure value can be obtained by 2ms. If the input pulse period ranges from 1.5ms to 500ms, please use 800ms to measure the period.

Average Calculate the value with different number for average. “2” means the period is averaged with 2 samples.

Edge Trigger type: Rise/Fall Upper Limit ms (0 ~ 4,294,967,295) Lower Limit ms (0 ~ 4,294,967,295) AlarmOut When value < Lower Limit or value > Upper Limit

GT

– Gate Time. To measure the Gate ON or OFF time with sampling period 0.1ms.

Time Unused Average Unused Edge Trigger type: Rise/Fall Upper Limit Sec (0 ~ 4,294,967,295) Lower Limit Sec (0 ~ 4,294,967,295) AlarmOut When value < Lower Limit or value > Upper Limit

GC

Gate Counter is used to measure the number of pulses on the gate. Example: The input pulse source is 1mm/pulse encoder. When the measured gate count is 1000, the length is 1 meter. Only 2 channels are available in this mode: IN0: Count0 IN2: Count1 IN1: Gate0 IN3: Gate1

Time Unused Average Unused Edge Trigger type: Rise/Fall Upper Limit (0 ~ 4,294,967,295) Lower Limit (0 ~ 4,294,967,295) AlarmOut When value < Lower Limit or value > Upper Limit

3. DO Output

AlarmOut: AlarmOut will be activated according to the set value as foregoing. PowerOn Value: It is composed by 4 bits (0b0000). The power on state of DO can be set as ON or

Page 56: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

56

OFF. If the value is 1, the output is ON when power on. If the value is 0, the output is OFF when power on. The bit sequence from left to right are DO3, DO2, DO1, DO0 correspondingly.

Safe Value: It is composed by 4 bits (0b0000). Safe value of DO can be set here. If the value is 1, the output is ON when the safe protection is triggered. If the value is 0, the output is OFF when the safe protection is triggered. The main purpose is to protect from hardware damage when the module failure.

Operation

In this example, IN0 and IN1 are connected with a signal generator. Set Mode to Frequency. Set Time with default value. Set Average to 1 Press StartChannel to get the measured value.

Note: please remember to save the set parameters to EEPROM in case the set parameters are gone after reboot. Please go through AIO Module Operation subsection for reference.

5.2.6. Single Axis Module

Single Axis module is described in this section.

Page 57: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

57

Figure 5-32: screenshot of single axis module

Module status M171 module is identified and displayed in the above and is equipped with EEPROM. The functions of motion slave modules without EEPROM will be limited: 1. No grouped axes motion; and 2. SA_LoadConfigFile is needed to download parameter.

Property There are 3 categories of setting: Homing mode, Driver I/O interface, Machine I/O interface. Please refer to GA_GetSensor in this manual.

5.2.7. Grouped Axes

Multiple axes can be grouped up together by right click on the Ring and select “Set Axis Groups” as shown below:

Page 58: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

58

Figure 5-33: group up axes

When the “Set Axis Groups” option is clicked, a dialog will pop up as the following figure.

Figure 5-34: set group dialog

The “None” option of the left and right side means the axes have not joined groups. Select the non-grouped axes with one of Group1~7 specified and press the arrow button “>>>” or “<<<” to make the selected axes grouped up as a group. The grouped axes will show up in the device monitor as following:

Figure 5-35: grouped axes

In this example, M121 is a grouped axis under AxisGroup1 instead an independent axis.

Page 59: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

59

Save And Recover Configurations The reading and writing of configuration profile are almost the same as AI/O in the previous section except one more place to save the configuration profile – pc.

Figure 5-36: file options

Save As mentioned above, a saving dialog will pop up if the “Backup Config to…” option is hit. There are 2 options – PC and EEPROM

Figure 5-37: the saving dialog for group axes

1. PC Users could select the axes to be saved in the tree diagram. The “File Path” button let users

Page 60: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

60

change storage path at will. Press “Save” to save the information including information, interface I/O, pulse I/O and Operation in the PC.

2. EEPROM Modules with EEPROM are in the list. Users could select modules need to save the profile in the EEPROM and then press “Save” to save the configuration profile in the EEPROM.

Recovery The recovery dialog will show up if enters “File Recovery Config From…”.

Figure 5-38: recovery dialog with file source

1. File The recovery source could be stored as a file. Users could recover from the file to targets in the target list.

2. Self EEPROM Targets could be multi selected to be recovered from self EEPROM.

3. Other Axis It is to duplicate the axis configuration profile from one source axis to the designated target axes.

Press “LoadAll” to recover the configuration profile.

Page 61: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

61

Operation All the signals are displayed in green background after the hardware properties are set. The single axis motion window is shown in the following figure.

Figure 5-39: screenshot of axis control window

Before testing the axis, it is necessary to make the motor servo on. The “SVON” signal will become from green to red. If the “Servo Drive Alarm Reset” is connected to the output signal, the “RALM” must be pressed and the corresponding signal turns red. If the “Repeat” option is checked, the motion will go back and forth infinitely with the pre-defined position. The “DIR” signal will toggle as well. If there are errors terminate the motion, the “Error” light would be on and press the exclamation mark will pop the error message as shown below.

Figure 5-40: motion in error status

Page 62: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

62

After the exclamation mark being pressed, the system will restore from error to normal and display the error messages in the message window as shown below.

Figure 5-41: restore from error state

With respect to the group axes, the “SVON” action should be done as mentioned. Users could check the group folder to bring up the axis group option.

Figure 5-42: check the group folder to update axis parameters

The window of grouped axes properties is as the following figure.

Page 63: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

63

Figure 5-43: axis group properties

Before running the axis, please make sure the properties are set correctly.

Figure 5-44: axis properties window

MoveMode: the options are Relative or Absolute move. StopMode: the options are abrupt stop or slow down stop VelProfile: the options are T-curve or S-curve InterpolationMode: the options are Line or Arc

The group operation depends on the VelProfile (Line/Arc). More than two axes could be joined together as a group in line interpolation mode.

Page 64: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

64

Figure 5-45: more than two axes are possible to run together in line interpolation mode

Users could only choose exactly two axes to do arc interpolating motions. More than two or less than two axes will cause an error message in the message window.

Figure 5-46: error message if not two axes are doing arc interpolating motion

Page 65: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

65

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

Page 66: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

66

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.

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,

Page 67: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

67

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 68: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

68

6.4. Application Interface

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. _spc2_gen_aes_str Generate the AES_KEY with SI_KEY and SECURE_ID in char array. _spc2_check_aes_str Check the validity of the generated AES_KEY in char array.

Page 69: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

69

6.4.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 70: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

70

6.4.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 Input the 8-byte array SI_KEY provided by the system integrator [input] U8 *SecureId Input the 8-byte array indicating the Secure ID [output] U8 *AES_KEY The generated AES_KEY in 8-byte array format Return: PLATFORM_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 71: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

71

6.4.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 Input the 8-byte array SI_KEY provided by the system integrator [input] U8 * AES_KEY Input the 8-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 72: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

72

6.4.4. _spc2_gen_aes_str

Description: Generate the AES_KEY with SI_KEY and SECURE_ID in char array format. Syntax: I16 _spc2_gen_aes_str (TCHAR SI_KeyStr[100], TCHAR SecureIDStr[100], TCHAR AES_KeyStr[100]) Argument: [input] TCHAR SI_KeyStr[100] Input the SI_KEY char array provided by the system integrator. [input] TCHAR SecureIDStr[100] Input the char array indicating the AES_KEY [output] TCHAR AES_KeyStr[100] The generated AES_KEY in char array format Return: PLATFORM_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 73: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

73

6.4.5. _spc2_check_aes_str

Description: Check the validity of the generated AES_KEY. Syntax: I16 _spc2_check_aes_str (TCHAR SI_KeyStr[100], TCHAR AES_KeyStr[100], U8* Validity) Argument: [input] TCHAR SI_KeyStr[100] Input the char array SI_KEY provided by the system integrator [input] TCHAR AES_KeyStr[100] Input the char 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 74: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

74

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 Note that in SPC_Tool_CE.exe please select VS2005 for online debugging.

SDK: Microsoft Visual Studio 2008 Need service pack 1 installed

Note that in SPC_Tool_CE.exe please select VS2008 for online debugging.

7.2. Online Debugger

Online debugger is a very useful tool when developers are developing their projects. SmartPAC also provides an online debugger mechanism to help user easily online debug and monitoring variables.

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.

Page 75: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

75

Figure 7-1: 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-2: 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. 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 76: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

76

Figure 7-3: 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-4.

4. Select the target device (SPC-2000 for this example) as marked as the 2nd step in Figure 7-4 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-4.

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-4.

Page 77: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

77

Figure 7-4: 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 78: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

78

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

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

Figure 7-6: sequence to connect to SmartPAC

Page 79: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

79

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. 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-7: the debugging window

Page 80: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

80

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.

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 81: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

81

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 82: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

82

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 system path _spc2_read_hw_id Get the unique hardware ID _spc2_read_cpu_id Get the CPU ID _spc2_read_user_id Get the user ID

Page 83: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

83

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 84: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

84

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 85: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

85

8.5.1.3 _spc2_read_path

Description: Get the system 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 86: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

86

8.5.1.4 _spc2_read_hw_id

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

Page 87: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

87

8.5.1.5 _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 88: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

88

8.5.1.6 _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 89: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

89

8.5.2. Platform I/O Functions

Function name Description _spc2_read_local_di Get the local DI 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. _spc2_read_mtbf Get the mtbf for the system.

Page 90: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

90

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 91: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

91

8.5.2.2 _spc2_write_local_dq

Description: Set the local DO value. Syntax: 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 92: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

92

8.5.2.3 _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 93: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

93

8.5.2.4 _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 94: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

94

8.5.2.5 _spc2_read_mtbf

Description: Get the system MTBF timer in hours. Syntax: I16 _spc2_read_mtbf (U32 *MTBF) Argument: [output] U32 *MTBF Return the MTBF value of system. Return: PLATFORM_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 95: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

95

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 96: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

96

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 97: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

97

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 Input the 8-byte array SI_KEY provided by the system integrator [input] U8 *SecureId Input the 8-byte array indicating the Secure ID [output] U8 *AES_KEY The generated AES_KEY in 8-byte array format Return: PLATFORM_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 98: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

98

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 Input the 8-byte array SI_KEY provided by the system integrator [input] U8 * AES_KEY Input the 8-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 99: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

99

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 100: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

100

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 101: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

101

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 102: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

102

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 103: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

103

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 104: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

104

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 105: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

105

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_get_error Get the error status caused by hardware of the specified axis. _m124_check_error Check the error status which stops the axis motion.

Page 106: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

106

8.6.1.1 _m124_initial

Description: Initialize the resource of the remote axis. 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 107: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

107

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 108: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

108

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 109: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

109

8.6.1.3 _m124_get_error

Description: Get the error status caused by hardware of the specified axis. Syntax: I16 _m124_get_error (U16 AxisNo, U16 *error) Argument: [input] U16 AxisNo The target axis number that will be checked. [output] U16 *error The error status. The error bit mask is as follows.

0 No error EMG (Bit 0) EMG error ALM (Bit 1) Servo alarm +EL (Bit 2) Positive limit -EL (Bit 3) Negative limit

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

Page 110: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

110

8.6.1.4 _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 111: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

111

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.

Page 112: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

112

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

[input] I16 pls_logic Direction of encoder feedback pulse.

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

Page 113: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

113

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_iptmode Setting of command pulse output mode

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

Page 114: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

114

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

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

Page 115: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

115

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 116: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

116

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.

[input] I16 alm_mode Reacting modes when receiving ALARM signal.

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

Page 117: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

117

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.

[input] I16 inp_logic Setting of active logic for INP signal.

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

Page 118: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

118

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.

[input] I16 erc_on_time Setting of time length of ERC active.

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

Page 119: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

119

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.

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

Page 120: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

120

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.

[input] I16 sd_logic Setting of active logic for SD signal.

[input] I16 sd_mode Setting the reacting mode of SD signal.

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

Page 121: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

121

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.

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

Page 122: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

122

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 Setting the action of RALM signal.

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

Page 123: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

123

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.

[input] I16 ell_mode Active mode for EL signal meets.

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

Page 124: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

124

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.

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

Page 125: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

125

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 auto_erc_logic) Argument: [input] U16 AxisNo Axis number: 0 ~ 3 [input] I16 auto_erc_logic Enable auto ERC

Value Meaning

0 Disable 1 Enable

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

Page 126: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

126

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 127: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

127

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 128: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

128

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 _ smartmot_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 129: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

129

home_mode = 1

Figure 8-6: home_mode = 1

home_mode = 2

Figure 8-7: home_mode = 2

Page 130: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

130

home_mode = 3

Figure 8-8: home_mode = 3

home_mode = 4

Figure 8-9: home_mode = 4

Page 131: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

131

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 132: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

132

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 133: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

133

home_mode = 11

Figure 8-16: home_mode = 11

home_mode = 12

Figure 8-17: home_mode = 12

Page 134: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

134

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 135: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

135

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 136: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

136

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 137: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

137

8.6.5. Velocity Control Functions

Function name Description _m124_tv_move Set a trapezoidal velocity profile _m124_sv_move Set a S-curve velocity profile _m124_fix_speed_range Set speed range _m124_unfix_speed_range Release the speed range constrain _m124_get_current_speed Get current speed

Page 138: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

138

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 139: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

139

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 140: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

140

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 141: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

141

8.6.5.4 _m124_fix_speed_range

Description: Fix speed range. User need to fix the speed range before he want to do the velocity change command _m124_v_change 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 142: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

142

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 143: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

143

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 144: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

144

8.6.6. 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. _m124_suppress_vibration Set the vibration suppressing timing _m124_set_idle_pulse Set the idle pulse number before starting the acceleration

Page 145: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

145

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 146: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

146

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 147: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

147

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 148: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

148

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 149: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

149

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 150: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

150

8.6.6.6 _m124_suppress_vibration

Description: Set vibration suppressing timing. See note. Syntax: I16 _m124_suppress_vibration (U16 AxisNo, U16 ReverseTime, U16 ForwardTime) Argument: [input] U16 AxisNo Axis number: 0 ~ 3 [input] U16 ReverseTime Specified reverse time, 0 ~ 65535, unit 1.6 us [input] U16 ForwardTime Specified forward time, 0 ~ 65535, unit 1.6 us Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A. NOTE

Figure 8-23: suppress vibration parameter define

Dir(+)

Dir(-)

T1 T2

T3 T4

T1 = Reverse TimeT2 = Forward TimeT3 = 1/2 x T1T4 = 1/2 x T2

Final Pulse

Page 151: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

151

8.6.6.7 _m124_set_idle_pulse

Description: Set the Idle pulse number before starting the acceleration. Syntax: I16 _m124_set_idle_pulse (U16 AxisNo, I16 idl_pulse) Argument: [input] U16 AxisNo Axis number: 0 ~ 3 [input] I16 idl_pulse Idle number Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 152: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

152

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 153: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

153

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 154: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

154

8.6.7.2 _m124_emg_stop

Description: Set axis from slow down 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 155: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

155

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 156: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

156

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 157: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

157

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 158: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

158

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_check_rdp Check the ramping down point data. _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 159: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

159

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 160: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

160

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 161: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

161

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 162: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

162

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 163: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

163

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 164: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

164

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 165: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

165

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 166: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

166

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 167: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

167

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 HandWheel 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 168: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

168

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 169: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

169

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 170: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

170

8.6.8.12 _m124_check_rdp

Description: Check the ramping down point data. Syntax: I16 _m124_check_rdp (U16 AxisNo, I32 *rdp_command) Argument: [input] U16 AxisNo Axis number: 0 ~ 3 [output] I32 *rdp_command Ramping down point data. Range: 0~167777215 Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 171: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

171

8.6.8.13 _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 172: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

172

8.6.8.14 _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 173: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

173

8.6.8.15 _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 [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 174: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

174

8.6.8.16 _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 175: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

175

8.6.9. I/O 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.

Page 176: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

176

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 177: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

177

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: 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 178: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

178

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 179: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

179

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 180: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

180

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 181: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

181

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 182: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

182

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 183: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

183

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 184: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

184

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 185: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

185

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 186: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

186

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 187: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

187

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 (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 188: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

188

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 (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 189: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

189

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 (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 190: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

190

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 (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 191: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

191

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 1 to move [input] I32 DistY Specified relative distance of axis 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 192: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

192

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 1 to move [input] I32 PosY Specified absolute position of axis 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 193: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

193

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 1 to move [input] I32 DistY Specified relative distance of axis 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 194: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

194

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 1 to move [input] I32 PosY Specified absolute position of axis 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 195: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

195

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 DistX, I32 DistY, U32 StrVel, U32 MaxVel, F32 Tacc, F32 Tdec) Argument: [input] I32 DistX Specified relative distance of axis 3 to move [input] I32 DistY Specified relative distance of axis 4 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 196: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

196

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 PosX, I32 PosY, U32 StrVel, U32 MaxVel, F32 Tacc, F32 Tdec) Argument: [input] I32 PosX Specified absolute position of axis 3 to move [input] I32 PosY Specified absolute position of axis 4 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 197: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

197

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 DistX, I32 DistY, U32 StrVel, U32 MaxVel, F32 Tacc, F32 Tdec) Argument: [input] I32 DistX Specified relative distance of axis 3 to move [input] I32 DistY Specified relative distance of axis 4 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 198: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

198

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 PosX, I32 PosY, U32 StrVel, U32 MaxVel, F32 Tacc, F32 Tdec) Argument: [input] I32 PosX Specified absolute position of axis 3 to move [input] I32 PosY Specified absolute position of axis 4 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 199: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

199

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 200: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

200

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, CW: 0, CCW: 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 201: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

201

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, CW: 0, CCW: 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 202: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

202

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, CW: 0, CCW: 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 203: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

203

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, CW: 0, CCW: 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 204: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

204

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, CW: 0, CCW: 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 205: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

205

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, CW: 0, CCW: 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 206: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

206

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, CW: 0, CCW: 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 207: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

207

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, CW: 0, CCW: 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 208: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

208

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, CW: 0, CCW: 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 209: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

209

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 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, CW: 0, CCW: 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 210: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

210

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 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, CW: 0, CCW: 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 211: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

211

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 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, CW: 0, CCW: 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 212: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

212

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 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, CW: 0, CCW: 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 213: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

213

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 214: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

214

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, CW: 0, CCW: 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 215: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

215

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, CW: 0, CCW: 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 216: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

216

8.6.13. 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 217: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

217

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 reacting mode when comparison comes into exist 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.

Page 218: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

218

8.6.13.2 _m124_check_compare_data

Description: 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

[input] 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 219: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

219

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

Trigger comparator on (for 0, 1 axis only). Return: The return value is the occupied continuous buffer, say “rc”. The available buffer size is 3-rc.

Page 220: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

220

8.6.14. Latch Functions

Function name Description _m124_set_ltc_logic Set latch logic. _m124_get_latch_data Get latch data.

Page 221: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

221

8.6.14.1 _m124_set_ltc_logic

Description: Set latch logic which defines the latch input logic LTC_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 0 means active low, 1 means active high Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 222: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

222

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 223: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

223

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 224: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

224

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 225: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

225

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 226: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

226

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 227: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

227

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 228: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

228

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 229: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

229

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 logicr Return: ERR_NoError The API is successfully returned. Others Please refer to the error code table at Appendix A.

Page 230: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

230

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 231: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

231

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 232: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

232

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 233: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

233

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 234: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

234

8.6.16.6 _m124_add_trigger_comparator

Description: Disable the trigger comparator function. Syntax: I16 _m124_add_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 235: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

235

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 hand wheel 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 236: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

236

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 Active low 1 Active high

[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 237: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

237

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 Active low 1 Active high

[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 238: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

238

8.6.17.3 _m124_jog_pulser_step

Description: Enable the hand wheel 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] U8 switch_logic Set the switch logic.

Value Meaning

0 Active low 1 Active high

[input] I32 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 239: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

239

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 240: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

240

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 241: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

241

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 242: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

242

9.2. The Motion Error Code List Table

ERR_NoError 0

ERR_BoardNoInit -14001

ERR_InvalidBoardNumber -14002

ERR_InitializedBoardNumber -14003

ERR_BaseAddressError -14004

ERR_BaseAddressConflict -14005

ERR_DuplicateBoardSetting -14006

ERR_DuplicateIrqSetting -14007

ERR_PCIBiosNotExist -14008

ERR_PCIIrqNotExist -14009

ERR_PCICardNotExist -14010

ERR_SpeedError -14011

ERR_MoveRatioError -14012

ERR_PosOutOfRange -14013

ERR_AxisAlreadyStop -14014

ERR_AxisArrayError -14015

ERR_SlowDownPointError -14016

ERR_CompareMethodError -14017

ERR_CompareNoError -14018

ERR_CompareAxisError -14019

ERR_CompareTableSizeError -14020

ERR_CompareFunctionError -14021

ERR_CompareTableNotReady -14022

ERR_CompareLineNotReady -14023

ERR_NoCardFound -14024

ERR_LatchNoError -14025

ERR_AxisRangeError -14026

ERR_DioNoError -14027

ERR_PChangeSlowDownPointError -14028

ERR_SpeedChangeError -14029

ERR_CardNoError -14030

ERR_LinkIntError -14031

ERR_HardwareCompareAxisWrong -14032

ERR_AutoCompareSourceWrong -14033

Page 243: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

243

ERR_CompareDeviceTypeError -14034

ERR_PulserHomeTypeError -14035

ERR_EventAlreadyEnable -14036

ERR_EventNotEnableYet -14037

ERR_LineArcParameterError -14038

ERR_ConfigFileOpenError -14039

ERR_CompareFIFONotReady -14040

ERR_EventInitError -14041

ERR_MemAllocError -14042

ERR_StapmodSetErr -14043

ERR_StapParaSetErr -14044

ERR_ErrFeedRate -14048

ERR_Errlogwrite -14052

ERR_Err3PointsInput -14053

ERR_ErrValueOfCeterOutRange -14054

ERR_GetCenter -14055

ERR_GetInterruptEvent -14056

ERR_InvalidParameter -14057

ERR_Comparebufferfull -14058

ERR_AxisNotStop -14059

ERR_CompareSource -14060

Page 244: SmartPAC User Manual SmartPAC - tpm-pac.com in it, without the permission of TPM Inc. (“TPM”), is not allowed to be reproduced, transmitted, ... SmartPAC User Manual . 9 . 1. Introduction

SmartPAC User Manual

244

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


Recommended