+ All Categories
Home > Documents > TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual ....

TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual ....

Date post: 25-Jul-2020
Category:
Upload: others
View: 14 times
Download: 0 times
Share this document with a friend
215
TPM TurboPAC User Manual 1 TurboPAC TPC-6000 User Manual Version: V1.0 2011J05 To properly use the product, read this manual thoroughly is necessary. Part No.: 81-00TPC10-010
Transcript
Page 1: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

1

TurboPAC

TPC-6000 User Manual

Version: V1.0 2011J05

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

Page 2: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

2

Revision History Date Revision Description

2011/1/5 1.0 Document Creation 2011/8/2 - 1. Remove project encryption section.

2. Update programming interface to be synchronized with PCI-L122-DIO.

Page 3: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

3

© Copyright 2010 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, 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: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC 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: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

5

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

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

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

1.2. FEATURES .................................................................................................................................................................................. 10

1.3. HARDWARE SPECIFICATIONS ......................................................................................................................................................... 11

1.4. UTILITY SOFTWARE ..................................................................................................................................................................... 12

1.5. MOTIONNET COMPATIBLE DEVICES ................................................................................................................................................ 13

1.6. SYSTEM ARCHITECTURE ............................................................................................................................................................... 14

2. GETTING START ..................................................................................................................................................................... 15

2.1. MECHANICAL DIMENSIONS .......................................................................................................................................................... 15

2.2. INTERFACES ............................................................................................................................................................................... 16

2.2.1. Front ..................................................................................................................................................................... 16

2.2.2. Rear ...................................................................................................................................................................... 17

2.2.3. Motionnet Master Card – PCI-L122-DIO ............................................................................................................ 18

2.3. CONNECTOR .............................................................................................................................................................................. 18

2.3.1. Remote Power On/Off switch .............................................................................................................................. 18

2.3.2. Com1 to Com4 Serial Port ................................................................................................................................... 19

2.4. MOTIONNET DEVICES .................................................................................................................................................................. 21

2.4.1. Placement of the Board ........................................................................................................................................ 22

2.4.2. Motionnet Extension Connector .......................................................................................................................... 22

2.4.3. Digital I/O Connector .......................................................................................................................................... 23

2.4.4. Card Number Switch (RSW1) ............................................................................................................................. 25

2.4.5. Input Type Select Switch (DSW1) ....................................................................................................................... 26

3. SYSTEM SETUP ...................................................................................................................................................................... 27

3.1. INSTALLING A DEVICE AT BOTTOM .................................................................................................................................................. 27

3.1.1. SATA Hard Drive Installation .............................................................................................................................. 27

3.1.2. PCI Card Installation ............................................................................................................................................ 28

3.2. INSTALLING DEVICES AT TOPSIDE .................................................................................................................................................... 29

3.2.1. Special Purpose USB Device Installation ............................................................................................................ 29

3.2.2. INtime Runtime Hardware key (optional) ........................................................................................................... 30

3.3. INSTALLING DEVICES AT FRONT ...................................................................................................................................................... 31

3.3.1. Compact Flash Card Installation .......................................................................................................................... 31

3.4. BIOS SETUP .............................................................................................................................................................................. 32

3.4.1. Select Boot Device ............................................................................................................................................... 32

Page 6: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

6

3.4.2. Select Serial Port 2 Transmission Protocol .......................................................................................................... 33

3.4.3. Power Management Setup ................................................................................................................................... 34

3.4.4. Assign PCI Cards with independent IRQ ............................................................................................................. 35

4. MOTIONNET INTRODUCTION ............................................................................................................................................... 38

4.1. WHAT IS MOTIONNET? ............................................................................................................................................................... 38

4.2. MOTIONNET FUNCTIONS ............................................................................................................................................................. 38

4.3. ADVANTAGE OF MOTIONNET ........................................................................................................................................................ 39

4.4. MOTIONNET PRODUCT FAMILY ...................................................................................................................................................... 41

5. MYLINK ................................................................................................................................................................................. 42

5.1. INTERFACES ............................................................................................................................................................................... 42

5.1.1. Tool Bar ............................................................................................................................................................... 42

5.1.2. Module Status ...................................................................................................................................................... 43

5.2. DIO MODULE OPERATION ........................................................................................................................................................... 45

5.3. AIO MODULE OPERATION ........................................................................................................................................................... 45

5.4. PIO COUNTER MODULE OPERATION .............................................................................................................................................. 46

5.5. SINGLE AXIS MODULE ................................................................................................................................................................. 50

5.6. GROUPED AXES .......................................................................................................................................................................... 51

6. SAMPLE PROJECTS ................................................................................................................................................................ 61

6.1. GETTING START WITH .NET PROJECT 2005 .................................................................................................................................... 61

6.2. COUNTER MODULE ..................................................................................................................................................................... 63

6.3. LOCAL DIO MODULE .................................................................................................................................................................. 63

6.4. DIO MODULE ............................................................................................................................................................................ 64

6.5. SINGLE AXIS MOTION MODULE ..................................................................................................................................................... 64

7. FUNCTION REFERENCE .......................................................................................................................................................... 65

7.1. MOTIONNET INITIALIZATION ......................................................................................................................................................... 65

7.1.1. Hardware Initialization ........................................................................................................................................ 65

7.1.2. Library Initialization ............................................................................................................................................ 66

7.1.3. Motionnet Master ................................................................................................................................................. 66

7.2. DATA DEFINITION ....................................................................................................................................................................... 67

7.3. MOTIONNET MASTER DEVICE ....................................................................................................................................................... 68

7.3.1. _l122_open ........................................................................................................................................................... 69

7.3.2. _l122_close .......................................................................................................................................................... 70

7.3.3. _l122_check_switch_card_num ........................................................................................................................... 71

7.3.4. _l122_set_ring_config ......................................................................................................................................... 72

7.3.5. _l122_get_start_ring_num ................................................................................................................................... 73

Page 7: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

7

7.3.6. _l122_read_local_input ........................................................................................................................................ 74

7.3.7. _l122_read_local_output ...................................................................................................................................... 75

7.3.8. _l122_write_local_output .................................................................................................................................... 76

7.4. MOTIONNET RING OPERATION ...................................................................................................................................................... 77

7.4.1. _mnet_reset_ring ................................................................................................................................................. 79

7.4.2. _mnet_start_ring .................................................................................................................................................. 80

7.4.3. _mnet_stop_ring .................................................................................................................................................. 81

7.4.4. _mnet_close ......................................................................................................................................................... 82

7.4.5. _mnet_get_ring_status ......................................................................................................................................... 83

7.4.6. _mnet_set_ring_config ........................................................................................................................................ 84

7.4.7. _mnet_get_ring_active_table ............................................................................................................................... 85

7.4.8. _mnet_get_slave_type .......................................................................................................................................... 86

7.5. MOTIONNET SLAVE DIO .............................................................................................................................................................. 87

7.5.1. _mnet_io_output .................................................................................................................................................. 88

7.5.2. _mnet_io_input .................................................................................................................................................... 89

7.6. MOTIONNET SLAVE ANALOG INPUT ............................................................................................................................................... 90

7.6.1. _mnet_ai8_initial ................................................................................................................................................. 92

7.6.2. _mnet_ai8_set_cycle_time ................................................................................................................................... 93

7.6.3. _mnet_ai8_enable_device .................................................................................................................................... 94

7.6.4. _mnet_ai8_enable_channel .................................................................................................................................. 95

7.6.5. _mnet_ai8_set_channel_gain ............................................................................................................................... 96

7.6.6. _mnet_ai8_get_value ........................................................................................................................................... 97

7.6.7. _mnet_ai8_get_value_all ..................................................................................................................................... 98

7.6.8. _mnet_ai8_get_voltage ........................................................................................................................................ 99

7.6.9. _mnet_ai8_get_voltage_all ................................................................................................................................ 100

7.7. MOTIONNET SLAVE ANALOG OUTPUT .......................................................................................................................................... 101

7.7.1. _mnet_ao4_initial .............................................................................................................................................. 103

7.7.2. _mnet_ao4_reset_DAC ...................................................................................................................................... 104

7.7.3. _mnet_ao4_clear_output_all .............................................................................................................................. 105

7.7.4. _mnet_ao4_set_output ....................................................................................................................................... 106

7.7.5. _mnet_ao4_set_voltage ...................................................................................................................................... 107

7.7.6. _mnet_ao4_set_voltage1 .................................................................................................................................... 108

7.7.7. _mnet_ao4_set_output_all ................................................................................................................................. 109

7.7.8. _mnet_ao4_set_voltage_all ................................................................................................................................ 110

7.7.9. _mnet_ao4_set_voltage_all1 ............................................................................................................................... 111

7.7.10. _mnet_ao4_set_coarse_gain ............................................................................................................................ 112

7.7.11. _mnet_ao4_set_fine_gain ................................................................................................................................ 113

7.7.12. _mnet_ao4_set_offset ...................................................................................................................................... 114

Page 8: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

8

7.8. MOTIONNET SLAVE PULSE COUNTER ............................................................................................................................................ 115

7.8.1. _mnet_p120_initial ............................................................................................................................................ 115

7.8.2. _mnet_p120_start_channel ................................................................................................................................ 116

7.8.3. _mnet_p120_stop_channel ................................................................................................................................ 117

7.8.4. _mnet_p120_get_value ...................................................................................................................................... 118

7.9. MOTIONNET SLAVE ONE AXIS MOTION ........................................................................................................................................ 119

7.9.1. One Axis Motion Operation ............................................................................................................................... 120

7.9.2. Start Hardware Dependant Settings ................................................................................................................... 121

7.9.3. Start Output Pulse Setting .................................................................................................................................. 122

7.9.4. Start Input Pulse Setting ..................................................................................................................................... 123

7.9.5. Start Home Mode Motion .................................................................................................................................. 124

7.9.6. Start Velocity Mode Motion ............................................................................................................................... 125

7.9.7. Start Position Mode Motion ............................................................................................................................... 126

7.9.8. Comparator Counter Setting .............................................................................................................................. 127

7.9.9. Latch Counter Operation .................................................................................................................................... 128

7.9.10. Synchronization (1 Axis) ................................................................................................................................. 129

7.9.11. Synchronization (2 Axes) ................................................................................................................................. 130

7.10. ONE AXIS MOTION SLAVE API .................................................................................................................................................. 131

7.10.1. Initialization ..................................................................................................................................................... 131

7.10.2. Pulse I/O Configuration ................................................................................................................................... 133

7.10.3. Interface I/O Configuration .............................................................................................................................. 141

7.10.4. Home Operation ............................................................................................................................................... 156

7.10.5. Positioning Operation ...................................................................................................................................... 167

7.10.6. Velocity Operation ........................................................................................................................................... 172

7.10.7. Stop Operation ................................................................................................................................................. 177

7.10.8. Counter Control ............................................................................................................................................... 183

7.10.9. Position Compare and Latch ............................................................................................................................ 194

7.10.10. Synchronization ............................................................................................................................................. 202

7.10.11. Motion Status ................................................................................................................................................. 211

7.10.12. Destination Change ........................................................................................................................................ 213

Page 9: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

9

1. Introduction Utilizing the Intel® GM45 chipsets, TurboPAC is highly scalable supporting a wide variety of Intel Celeron® processors. Using the Intel® graphics media accelerator 4500MHD, the rugged TurboPAC delivers exceptional graphics performance with notable rates of data transfer. TurboPAC provides a number of important features required by image processing operation, including dual-channel DDR3 memory, two Gigabit Ethernet LANs, auto-direction control on RS485 interface. On top of that, TurboPAC supports dual independent displays through 2x VGA, DVI or LVDS outputs. Housed in a robust aluminum chassis, TurboPAC of 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 TurboPAC series is an idea system for industrial automation, machine automation, motion control, Automated Optical Inspection (AOI), visual inspection, video surveillance, image mapping and face recognition markets.

1.1. Overview

Front view Rear view

Page 10: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

10

Figure 1-1: TurboPAC and peripherals

1.2. Features

Intel® Core 2 Duo / Celeron® processor Intel® GM45 chipset Dual Intel® 82574L Gigabit Ethernet ports Dual VGA or VGA/DVI Independent Display 3x RS232 and 1x RS232/422/485 with Auto Direction Control

Page 11: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

11

Supports 2 SATA drive bays One external CF socket Onboard DC to DC power design to support 16V to 30V DC power input Supports ATX power mode and PXE/WOL Two PCI slots

1.3. Hardware Specifications

Main Board • TPC-6100 Series • Support Intel® C2D® Processor P8600(3M Cache, 2.40 GHz) • Support Intel® Celeron® Processor 575 (1M Cache, 2.00 GHz) • 4GB/2GB DDR3 1066 MHz SDRAM, un-buffered and non-ECC

Chipset • Intel® GM45 Graphics and Memory Controller Hub • Featuring the Mobile Intel® Graphics Media Accelerator 4500MHD • Intel® 82801IBM I/O Controller Hub

I/O Interface - Front • ATX power on/off switch • HDD Access / Power status LEDs • 2 x USB2.0 ports

I/O Interface - Rear • 2-pin Remote Power on/off switch • 16 ~ 30V DC input • 1 x PS/2 for Keyboard/Mouse • 1 x DB25 Parallel Port (Optional GPIO or LVDS interface) • 1 x DB44 Serial Port for 4x RS232 (COM2: RS232/422/485 with Auto Flow Control) • 2 x Gigabit Ethernet (GbE) LAN ports • 4 x USB2.0 ports • 1 x DB15 VGA port • 1 x DVI-I Port (DVI-D + VGA) • 1 x Speaker-out • 1 x Line-in

Device • 2 x 2.5” SATA HDD drive bay (option) • 1 external locked CF card socket

Expansion • TPC-6100 - Two PCI expansion - Max. Supported Add-on Card Length: 169mm

Page 12: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

12

• TPC-6101 - One Motionnet Master Card - One PCI expansion

Power Requirements • ATX power mode • Onboard DC to DC power support from 16V to 30VDC

Dimensions •195mm (W) x 268mm (D) x 107mm (H) (7.6” x 10.5” x 4.2”) Construction • Aluminum chassis with fan-less design Environment • Operating temperature:

Ambient with airflow: -5°C to 55°C (According to IEC60068-2-1, IEC60068-2-2, IEC60068-2-14)

• Storage temperature: -20°C to 80°C • Relative humidity: 10% to 93% (Non-Condensing)

Certifications • CE approval • FCC Class B

1.4. Utility Software

MyLink is a useful diagnostic utility used to test, set and verify the functionalities of modules hooked up to Motionnet. It simplifies the operation and adjustment of modules which could be complicated. So far, MyLink supports modules such as AIO, DIO, counters, gateway and motion control. The screenshot of MyLink is as follows:

Page 13: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

13

Figure 1-2: Screenshot of MyLink

1.5. Motionnet Compatible Devices

TurboPAC equipped a Motionnet master control card which is designed for users to quickly and easily develop applications, such as motion control and controls of I/O. The PCI-L122-DIO built in TurboPAC is a standard PCI master control card consisting high speed network extension called Motionnet. Motionnet is a new series of products designed for versatile automation applications, especially with motion control requirements. The built-in Motionnet master PCI-L122-DIO is equipped with 2 masters, Ring 0 and Ring1, which will be introduced later.

Page 14: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

14

1.6. System Architecture

Figure 1-3: TurboPAC System Architecture

Page 15: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

15

2. Getting Start

2.1. Mechanical Dimensions

Figure 2-1: the rear of TurboPAC

Figure 2-2: Dimensions of TurboPAC

Page 16: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

16

Figure 2-3: Height of TurboPAC

2.2. Interfaces

TurboPAC provides various kinds of I/O interfaces, including USB, Ethernet, Compact Flash card, VGA, DVI, RS232, microphone, remote switch, speaker, mouse, keyboard and PCI devices, etc. At the front side, TurboPAC has 6 LEDs indicates the status of the corresponding devices. With the plentiful supply of the I/O, TurboPAC can fully fulfill customers’ requirements. Moreover, TurboPAC builds in a Motionnet master card, PCI-L122-DIO, which can connect to up to 128 Motionnet slave devices.

2.2.1. Front

Figure 2-4: Front side I/O interfaces

Page 17: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

17

Label Function Description Power Switch Toggles the power switch of the system.

Power led Indicates the power status.

HD led Indicates the R/W status of the hard drive.

LAN LEDs Indicates the status of the LAN ports.

CF Socket CompactFlash card slot.

USB slots Used to connect USB 2.0/1.1 devices.

2.2.2. Rear

Figure 2-5: Rear side I/O interfaces

Label Function Description

Remote Power Switch Connect to a remote controller to toggle the power switch. Motionnet master card Provides customers to extend functions by connecting to Motionnet slave

cards. PS/2 KB/Mouse Connect to a PS/2 keyboard and PS/2 mouse via a cable. 16V-30V DC Input Used to plug a DC power cord. Parallel port Used to connect a parallel device. COM1 to COM4 DB44 port supports 3 RS232 and 1 RS232/422/485 compatible serial

devices.

Page 18: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

18

Label Function Description LAN Used to connect the system to a local area network USB Provides extensions for USB 2.0/1.1 devices. VGA Used to connect an analog VGA monitor. DVI Used to connect a digital LCD panel. Voice in Voice out

Used to connect a headphone or a speaker. Used to connect an external microphone.

Expansion Slots - TPC-6100: 2 expansion slot - TPC-6101: 1 expansion slots

2.2.3. Motionnet Master Card – PCI-L122-DIO

Figure 2-6: I/O interfaces of PCI-L122-DIO

Label Function Description Ring 0 RJ-45, Motionnet Extension Connector Ring 1 RJ-45, Motionnet Extension Connector Digital I/O D-SUB 26Pin Digital I/O Connector

2.3. Connector

2.3.1. Remote Power On/Off switch

Connector pin definitions:

Pin Definition

1 GND

2 PWRBT

Page 19: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

19

2.3.2. Com1 to Com4 Serial Port

Serial interface (com1 to com4) Connector size: 44-pin D-Sub, 2x22 (12.55mm x 53.04mm) Connector location: CN4

The 44-pin D-Sub connector is used to connect 4 external serial devices. As shown in Figure 2-7, the 44-pin connector could be plugged in TurboPAC and so that up to 4 devices (3Figure 2-7: 1-4(com1~com4) serial cable RS232 and 1 RS232/RS422/RS485 configurable) could be communicating with the host system.

Figure 2-7: 1-4(com1~com4) serial cable

Here is the pin assignment of the serial interface.

COM2 (RS232) labeled “B” on DB9 Cable Connector DB44 Pin # DB9 Pin # Def. DB44 Pin # DB9 Pin # Def.

11 1 DCD2 12 2 RXD2 13 3 TXD2 14 4 DTR2 15 5 GND 16 6 DSR2 17 7 RTS2 18 8 CTS2 19 9 RI2 20 GND

COM1 (RS232) labeled “A” on DB9 Cable Connector DB44 Pin # DB9 Pin # Def. DB44 Pin # DB9 Pin # Def.

1 1 DCD1 2 2 RXD1 3 3 TXD1 4 4 DTR1 5 5 GND 6 6 DSR1 7 7 RTS1 8 8 CTS1 9 9 RI1 10 GND

Page 20: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

20

COM3 (RS232) labeled “C” on DB9 Cable Connector DB44 Pin # DB9 Pin # Def. DB44 Pin # DB9 Pin # Def.

21 1 DCD3 22 2 RXD3 23 3 TXD3 24 4 DTR3 25 5 GND 26 6 DSR3 27 7 RTS3 28 8 CTS3 29 9 RI3 30 GND

COM4 (RS232) labeled “D” on DB9 Cable Connector DB44 Pin # DB9 Pin # Def. DB44 Pin # DB9 Pin # Def.

31 1 DCD4 32 2 RXD4 33 3 TXD4 34 4 DTR4 35 5 GND 36 6 DSR4 37 7 RTS4 38 8 CTS4 39 9 RI4 40 GND 41 NC 42 NC 43 NC 44 NC

Note: Pin 39 is defined as an external power source, which can be selected for 5V or 12V using JP10.

COM2 (RS422) labeled “B” on DB9 Cable Connector DB44 Pin # DB9 Pin # Def. DB44 Pin # DB9 Pin # Def.

11 1 TXD- 12 2 TXD+ 13 3 RXD+ 14 4 RXD- 15 5 GND 16 6 RTS- 17 7 RTS# 18 8 CTS+ 19 9 CTS- 20 GND

COM2 (RS485) labeled “B” on DB9 Cable Connector DB44 Pin # DB9 Pin # Def. DB44 Pin # DB9 Pin # Def.

11 1 TXD- 12 2 TXD+ RXD- RXD+

13 3 Reserved 14 4 Reserved 15 5 Reserved 16 6 Reserved 17 7 Reserved 18 8 Reserved 19 9 Reserved 20 Reserved

Page 21: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

21

2.4. Motionnet Devices

Built-in TurboPAC system, PCI-L122-DIO master control card is designed for users who need to quickly and easily develop applications such as motion control and controls of I/O. PCI-L122-DIO is a standard PCI master control card with high speed real-time network extension called Motionnet. Motionnet is a new series of communicating system designed for versatile automation applications.

PCI-L122-DIO is designed following the Standard PCI form factor. This master can connect up to 64x2=128 slave modules. There are 3 categories of the slave modules, for motion control, digital I/O and miscellaneous functions.

For motion control slave modules, there are 3 types: 1-axis, 2-axes or 4-axes. For digital I/O slave modules, there are 3 types: 32-IN, 32-OUT, and 16-IN & 16-OUT. For miscellaneous slave modules, there are AD/DA models, counter modes or the other customized type models.

The more detailed introduction of PCI-L122-DIO is in the following subsection. The functional block is illustrated in Figure 2-8.

Figure 2-8: PCI-L122-DIO functional block

Page 22: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

22

2.4.1. Placement of the Board

Figure 2-9: placement of PCI-L122-DIO control board

2.4.2. Motionnet Extension Connector

Figure 2-10: Motionnet extension connector Ring0/Ring1 for PCI-L122-DIO

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 23: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

23

2.4.3. Digital I/O Connector

Figure 2-11: digital I/O connector

Pin Label Description Pin Label Description

1 EXT_IN0 GPIO Input 0 14 EXT_OUT4 GPIO Output 4

2 EXT_IN1 GPIO Input 1 15 EXT_OUT5 GPIO Output 5

3 EXT_IN2 GPIO Input 2 16 EXT_OUT6 GPIO Output 6

4 EXT_IN3 GPIO Input 3 17 EXT_OUT7 GPIO Output 7

5 EXT_IN4 GPIO Input 4 18 E24V 24VDC Power Input

6 EXT_IN5 GPIO Input 5 19 EXT_IN8 GPIO Input 8

7 EXT_IN6 GPIO Input 6 20 EXT_IN9 GPIO Input 9

8 EXT_IN7 GPIO Input 7 21 EXT_IN10 GPIO Input 10

9 EGND 24VDCGround 22 EXT_IN11 GPIO Input 11

10 EXT_OUT0 GPIO Output 0 23 EXT_OUT8 GPIO Output 8

11 EXT_OUT1 GPIO Output 1 24 EXT_OUT9 GPIO Output 9

12 EXT_OUT2 GPIO Output 2 25 EXT_OUT10 GPIO Output 10

13 EXT_OUT3 GPIO Output 3 26 EXT_OUT11 GPIO Output 11

Page 24: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

24

2.4.3.1 GPIO Input of Connection for NPN-Sink Mode

Figure 2-12: GPIO input of connection for NPN-Sink mode

2.4.3.2 GPIO Input of Connection for PNP-Source Mode

Figure 2-13: GPIO Input of connection for PNP-Source mode

Page 25: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

25

2.4.3.3 GPIO Output of Connection for Transistor

Figure 2-14: GPIO output of connection for transistor

2.4.4. Card Number Switch (RSW1)

If there are 2 PCI-L122-DIO cards installed in the system, it is necessary to specify the ID for each card respectively by configuring the DIP rotary switch as shown below.

Figure 2-15: DIP rotary switch on PCI-L122-DIO

Label Description #0 ~ #7 Card #0 to card #7 #8 ~ #F Reserved

Page 26: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

26

2.4.5. Input Type Select Switch (DSW1)

Figure 2-16: input type select switch (DSW1)

Label Description OFF Input Type is NPN (default) ON Input Type is PNP

Page 27: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

27

3. System Setup TurboPAC provides I/O extensions such as SATA hard disk, PCI, special purpose USB devices and compact flash card, etc. With these extensions, users could install devices depending on their needs. The interior device installations would be introduced in the following sub-sections.

3.1. Installing a Device at Bottom

With the bottom side of the chassis facing up, remove the screws of the bottom cover, the cover board could be taken off.

Figure 3-1: mounting holes at bottom side

3.1.1. SATA Hard Drive Installation

The drive bay is used to hold a SATA hard drive and attach it to the chassis board. By removing 4 mounting screws from the chassis board, the drive bay could be easily removed. And vice versa, the hard drive could easily be installed by connecting the power and data cable and attaching the drive bay to the chassis board. The mounting holes and connector interfaces would be illustrated in the following figures.

Page 28: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

28

Figure 3-2: mounting screws of the drive bay

Figure 3-3: connector side of the hard drive

3.1.2. PCI Card Installation

A PCI board could be installed / removed by locking/removing the designated 3 mounting screws of the PCI bay. The PCI bay is designed to hold a PCI card.

Figure 3-4: mounting holes for PCI mounting bay

Page 29: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

29

3.2. Installing Devices at Topside

With the top side of the chassis facing up, remove the screws of the top cover, the cover board could be taken off.

Figure 3-5: mounting holes at topside

3.2.1. Special Purpose USB Device Installation

In addition to 4 USB slots at the back side of TurboPAC, there are 2 USB slots built in at the main board. These slots let users install USB devices rarely need to unplug, like USB hardware dongle key.

Figure 3-6: internal USB slots

Page 30: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

30

3.2.2. INtime Runtime Hardware key (optional)

Figure 3-7: INtime system architecture

INtime for Windows software combines deterministic, hard real-time control with standard Windows operating systems without requiring additional hardware. INtime for Windows was designed specifically to take advantage of the powerful capabilities of the TurboPAC architecture. This allows real-time and non-real-time applications to run our Axes control, Digital and Analog IO modules.

Figure 3-8: INtime runtime dongle key

Page 31: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

31

3.3. Installing Devices at Front

3.3.1. Compact Flash Card Installation

The compact flash slot is covered by a board attached by 2 screws as shown below. Users could remove the cover by taking off the screws and insert compact flash card in the slot.

Figure 3-9: Screws for compact flash card cover

Page 32: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

32

3.4. BIOS Setup

3.4.1. Select Boot Device

Figure 3-10: BIOS setup screen

3.4.1.1 Hard Disk Boot Priority

This field is used to select the boot sequence of the hard drives. Move the cursor to this field then press <Enter>. Use the Up or Down arrow keys to select a device then press <+> to move it up or <-> to move it down the list.

3.4.1.2 First Boot Device, Second Boot Device and Third Boot Device

Select the drive to boot first, second and third in the “First Boot Device” “Second Boot Device” and “Third Boot Device” fields respectively. The BIOS will boot the operating system according to the sequence of the

Page 33: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

33

selected drive. The options are: Hard Disk CDROM USB-FDD USB-ZIP USB-CDROM LAN Disabled

3.4.2. Select Serial Port 2 Transmission Protocol

Integrated Peripherals – SuperIO Device

Figure 3-11: setting of SuperIO devices

SuperIO Device Setup lets you decide parameters of the system communication ports. Only COM2 has various transmission protocols.

Page 34: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

34

The options are: RS232 RS422 RS485 RS485 AUTO

3.4.3. Power Management Setup

Figure 3-12: setting of power management

3.4.3.1 PWRON After PWR-Fail

“OFF” Mode If the power management is set to OFF and power failure happens, the system power will be off when the power supply restores. Users have to switch the power on to start the system.

“ON” Mode If the power management is set to ON and power failure happens, the system power will be on automatically when the power supply restores.

Page 35: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

35

“Former-Sts” Mode If the power management is set to Former-Sts and power failure happens, when the power supply restores, the system power status will be ON if the system power is ON before the power failure. The system power status will be OFF if the system power is OFF before the power failure. In one word, TurboPAC synchronizes the power status before and after power failures.

3.4.3.2 ACPI Function

By default, the ACPI function is enabled. This function should be enabled only in operating systems that support ACPI.

3.4.3.3 Soft-Off by PWR-BTTN

This field allows you to select the method to power off your system. Delay 4 Sec.

If the Soft-Off by PWR-BTTN is set to Delay 4 seconds and the power button is pressed in less than 4 seconds, the system will enter suspend mode instead of shutdown immediately. Only if the power button is pressed longer than 4 seconds will shutdown the system immediately. The purpose of the setting is to prevent the system shutting down from users touch the power button accidently. If the system enters the suspend mode, users only need to press the power button in less than 4 seconds to bring the system back to normal operation mode.

Instant-Off Compared to Delay 4 Second mode, press the power button will make the system shutdown immediately if the system is set to Instant-Off mode.

3.4.4. Assign PCI Cards with independent IRQ

Figure 3-13: extending PCI slots

Page 36: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

36

Label Description IRQ No. PCI Slot1 Close to the main board 21 PCI Slot2 Farther from the main board 22

PCI slot 1 and slot 2 share IRQ with other devices by default. The PCI slot 1 shares IRQ 21 with audio controller no. 2 and PCI slot 2 shares IRQ 22 with USB D26F1. If users need to assign independent IRQ on the PCI Card, there are two methods to implement as introduced in the following sub-sections.

3.4.4.1 To Isolate IRQ 21

Since the PCI slot 1 and USB D26F1 share the same IRQ, the way to isolate IRQ 21 for PCI slot 1 is to set USB D26F1 to Disabled. Users could not feel anything about disabling USB D26F1 since TurboPAC does not use this input device. The system will be working very well without any side effects.

Figure 3-14: disable USB D26F1 in BIOS settings

3.4.4.2 To Isolate IRQ 22

PCI slot 2 shares the same IRQ 22 with “audio Controller”. If users need to isolate IRQ 22 for PCI slot 2, just disable the device “Audio Selection” from BIOS settings.

Page 37: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

37

Figure 3-15: disable Audio Select

Phoenix - AwardBIOS CMOS Setup Utility Integrated Peripherals

OnChip IDE Device [Press Enter]

SuperIO Device [Press Enter]

Audio Select [Disabled]

USB Device Setting [Press Enter]

LAN 1 [Enabled]

LAN 2 [Enabled]

Onboard LAN Boot ROM [Disabled]

Item Help

Menu Level

↑↓→←: Move Enter: Select +/-/PU/PD: Value F10: Save ESC: Exit F1: General Help

F5: Previous Values F7: Optimized Defaults

Page 38: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

38

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 center 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 39: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

39

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 40: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

40

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 41: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

41

4.4. Motionnet Product Family

Figure 4-4: Motionnet product family

Page 42: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

42

5. 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 Installation 1 executable file: MyLink.exe

5.1. Interfaces

5.1.1. Tool Bar

Figure 5-1: MyLink main functions

There are 4 main functions in the tool bar. File

This is used for setting and saving of axes module parameters.

Figure 5-2: functions under file option

Tools Provides functions for setting system parameters and initialize the system.

Page 43: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

43

Figure 5-3: functions under tools option

Settings Settings of the Motionnet master, including baud rates for Ring0 and Ring1.

Figure 5-4: screenshot of settings

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

Figure 5-5: functions under window option

Help This shows the MyLink revision number.

5.1.2. Module Status

Figure 5-6: slave devices found by the Motionnet master

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.

Page 44: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

44

Properties The related item will be shown according to the selected slave module type.

Figure 5-7: the property window

Figure 5-8: screenshot of updating properties

Description This is located below the property page.

Figure 5-9: 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-10: Ring status

Page 45: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

45

5.2. DIO Module Operation

Figure 5-11: information of connected devices

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.

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.3. AIO Module Operation

In this example, 4 AO channels are connected to the 4 AI channels.

Page 46: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

46

Figure 5-12: 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 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 module.

5.4. PIO Counter Module Operation

Counter module is connected with pattern generator in this example.

Page 47: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

47

Figure 5-13: information of connected devices

Module Status The counter module with IP63 is identified.

Property The property of 108-P120 counter module is described in the following. Information

Device ID and MCU_Ver, etc. is listed here. Operation

Cycle Time: The scan time is set here. Default value is 2ms and maximum value is 200ms. Settings-1.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

Page 48: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

48

Mode name Parameter Description 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: IN0 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.

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

Page 49: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

49

Mode name Parameter Description 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

DO Output

AlarmOut AlarmOut will be activated according to the set value as foregoing. PowerOn Value The power on state of DO can be set as ON or OFF. Safe Value Safe value of DO can be set here.

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

Page 50: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

50

5.5. Single Axis Module

Single Axis module is described in this section

Figure 5-14: single axis module screenshot

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.

Page 51: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

51

5.6. Grouped Axes

Multiple axes can be grouped together by click on the Set Axis Group icon as shown below.

Figure 5-15: group axes around

Select axes to be grouped as shown in the following.

Figure 5-16: select axes to be grouped

Add the axes into the specified group as shown below and M121 belongs to Group 1 but not Ring 1.

Figure 5-17: check to select the axis

File Setting and Access:

Page 52: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

52

Backup Configuration The data can be saved to PC, PAC, or EEPROM as shown below:

Figure 5-18: backup selections

PC Select the specified axes that you want to save the settings and click on File Path to enter the directory of the file。The following data will be saved: Information, InterfaceI/O, Pulse I/O and Operation.

PAC Check the slave module IP number in advance. The legal slave modules data will be saved in the EasyPAC with filename extension *.kwcfg.

EEPROM Confirm the module is equipped with EEPROM in advance and click Save to save the data in the EEPROM.

Page 53: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

53

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

Figure 5-19: recover configuration

From file: select the source and target axis respectively. Self EEPROM: recover configurations from the on-board EEPROM. Others: this is used for copy operation. Select the above 3 and click Load All. Transfer Path File

Page 54: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

54

Figure 5-20: the interpolation path file can be sent with the *.kwpts file

Example: A rectangular with arc in the corner is shown below

Figure 5-21: a rectangular with arc example

[path] Count = 8 StrVel = 100

Page 55: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

55

MaxVel = 6000 Tacc = 0.1 Tdec = 0.1 Curve: T [segments] Seg1.Type = Line Seg1.Dist8 = 0 Seg1.Dist9 = 1000 Seg2.Type = Arc Seg2.Ax = 8 Seg2.Ay = 9 Seg2.Cx = 1000 Seg2.Cy = 0 Seg2.Ex = 1000 Seg2.Ey = 1000 Seg2.Dir = Cw Seg3.Type = Line Seg3.Dist8 = 2000 Seg3.Dist9 = 0 Seg4.Type = Arc Seg4.Ax = 8 Seg4.Ay = 9 Seg4.Cx = 0 Seg4.Cy = -1000 Seg4.Ex = 1000 Seg4.Ey = -1000 Seg4.Dir = Cw Seg5.Type = Line Seg5.Dist8 = 0 Seg5.Dist9 = -1000 Seg6.Type = Arc Seg6.Ax = 8 Seg6.Ay = 9

Page 56: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

56

Seg6.Cx = -1000 Seg6.Cy = 0 Seg6.Ex = -1000 Seg6.Ey = -1000 Seg6.Dir = Cw Seg7.Type = Line Seg7.Dist8 = -2000 Seg7.Dist9 = 0 Seg8.Type = Arc Seg8.Ax = 8 Seg8.Ay = 9 Seg8.Cx = 0 Seg8.Cy = 1000 Seg8.Ex = -1000 Seg8.Ey = 1000 Seg8.Dir = Cw The file format is described in the following: [path] Count = 8 no. of path segments, max is 100 StrVel = 100 Start Velocity, unit is pps, value is 0~6666666 MaxVel = 6000 Max. Velocity, unit is pps, value is 0~6666666,must be > StrVel Tacc = 0.1 Acc. time unit is sec, data type is float Tdec = 0.1 Dec. time unit is sec, data type is float Curve: T Velocity Profile is T curve or S curve Segment description: Start Point is (0, 1000) Seg1.Type = Line Path type is line Seg1.Dist8 = 0 Axis with IP8 is grouped, 0 pulses, range: Dist1~Dist32 Seg1.Dist9 = 1000 Axis with IP9 is grouped, 1000 pulses, range: Dist1~Dist32 Seg2.Type = Arc Path type is circle Seg2.Ax = 8 Axis with IP8 is assigned as X-Axis,range:1~32 Seg2.Ay = 9 Axis with IP9 is assigned as Y-Axis,range:1~32 Seg2.Cx = 1000 center of circle is 1000 relative to X-Axis. Range: -134217728 ~ 134217727 Seg2.Cy = 0 center of circle is 0 relative to Y-Axis.

Page 57: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

57

Range: -134217728 ~ 134217727 Seg2.Ex = 1000 End point in X-Axis is 1000, range: -134217728 ~ 134217727 Seg2.Ey = 1000 End point in Y-Axis is 1000, range: -134217728 ~ 134217727 Seg2.Dir = Cw Clockwise circle Seg3.Type = Line Path type is line Seg3.Dist8 = 2000 Axis with IP8 is grouped, 2000 pulses, range: Dist1~Dist32 Seg3.Dist9 = 0 Axis with IP9 is grouped, 0 pulses, range: Dist1~Dist32 Seg4.Type = Arc Path type is circle Seg4.Ax = 8 Axis with IP8 is assigned as X-Axis, range: 1~32 Seg4.Ay = 9 Axis with IP9 is assigned as Y-Axis, range: 1~32 Seg4.Cx = 0 center of circle is 0 relative to X-Axis. Range: -134217728 ~ 134217727 Seg4.Cy = -1000 center of circle is 1000 relative to Y-Axis. Range: -134217728 ~ 134217727 Seg4.Ex = 1000 End point in X-Axis is 1000, range: -134217728 ~ 134217727 Seg4.Ey = -1000 End point in Y-Axis is 1000, range: -134217728 ~ 134217727 Seg4.Dir = Cw Clockwise circle Seg1~Seg4 is described in the above and Seg5~Seg8 is similar. 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-22: screenshot of axis control window

Page 58: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

58

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-23: motion in error status

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

Page 59: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

59

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

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

Figure 5-26: axis group properties

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

Figure 5-27: 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

Page 60: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

60

group in line interpolation mode.

Figure 5-28: 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-29: error message if not two axes are doing arc interpolating motion

Page 61: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

61

6. Sample Projects In this chapter, sample codes for Motionnet modules are introduced. Step by step from an empty project to make modules work in simple projects. The projects are constructed based on Microsoft .NET framework 2005 and we use C# as developing language. Users can select any languages as long as the language supports importing .dll files.

6.1. Getting Start With .NET Project 2005

Before launching a .NET project, we need to have some files in ready: MNetCL.dll, CMNet.dll and PCI_L122.dll for library files. Following figures illustrates sequence of how to create a Motionnet project. 1. Create a new project in Microsoft Visual Studio 2005 from “File”.

Figure 6-1: New one project

2. In this example, the template we select is Windows Application. Then name the project and specify the storage path.

Page 62: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

62

Figure 6-2: Select the template and name it

3. Now we have the empty project with a windows application form, but no content as yet.

Figure 6-3: an empty project with the main frame only

4. If a developer needs to use Motionnet relative functions, the Motionnet libraries need to be included. A simple way to do this is to put .dll files in the folder where the executable will be generated. For this example, we put the .dll files in the “debug” folder.

5. After copying those files in the project root directory, we can import those in the workspace by right clicking on the Project Add References then add the MNetCL.dll as a reference.

Page 63: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

63

6. The last important thing is to import the library by writing “using Motionnet;” to start using the provided functions.

Figure 6-4: using Motionnet then start writing applications

The steps introduced above are the preliminary setting for Motionnet project development. In this chapter, only the simplest projects are illustrated. We do not even separate files into categories so it’s easy to pick up the meaning of statements. Users can extend functions

6.2. Counter Module

Here we introduce a very simple example to monitor the counter values. The counter might be an encoder with multiple channels. In this case we setup 4 channels with a hyphen as the initial value. The start button make the application start to capturing the encoder values and the stop button make it stop capturing. The figure below is the sample user interface of the program.

6.3. Local DIO Module

The Motionnet master module provides a set of local DIO interface on board with 12 in and 12 out. In this example, we cross wired the first output channel to the first input channel so that whatever from the first output will input to the first input channel. The check box labeled as input1 is the first output and the right hand side contains a figure with grey indicates OFF and green indicates ON of the first input.

Page 64: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

64

6.4. DIO Module

106-D404-XN is a DO module with 32 channel output and 106-D440-NX is a DI module with 32 channel input. As previous example, we cross connect each output channel to the input channel so that the output value of the DO module will send to the corresponding input channel of DI module. The user interface of the application will change accordingly. The checkboxes indicate DO statuses and green lights indicate DI statuses. The DI and DO channels are grouped into 4 ports. The detailed specification is not introduced here. Please refer to the TPM product data sheet.

6.5. Single Axis Motion Module

Like previous modules mentioned, the Motionnet initialization part of code could be simply copied and pasted from one of the other examples. However, the motion module needs more parameters to make it work properly. Before start writing code to drive motors, the motion driver needs setting of gain parameters. This step is done through input by directly cable connection between PC and the driver. After that, users just setup parameters such as run mode, encoder feedback, velocity, acceleration, deceleration, position and so on to drive a motor. The sample user interface in this manual is as the following figure.

Page 65: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

65

7. Function Reference Motionnet is a low cost, digital-serial control interface for communications between host algorithm and axis-controllers, I/O devices and other function devices. Most physical or data layer tasks are completed by the ASIC hardware together with user-friendly software under Windows operating system. This chapter describes the operating principle and application interfaces of the Motionnet. This chapter is helpful to users want to know more details about the operational principle of the motion control card.

7.1. Motionnet Initialization

The system initialization is divided into two parts: hardware initialization and library initialization. The hardware and system layer is as shown in the following figure.

Figure 7-1: Motionnet system and hardware layer

7.1.1. Hardware Initialization

Figure 7-2: hardware initialization interface

Page 66: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

66

7.1.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 7-3: library relationship

7.1.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 7-4: illustration of master-slave

Page 67: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

67

7.2. 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 68: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

68

7.3. Motionnet Master Device

Function name Description Card Resource Functions

_l122_open Initialize hardware and resources _l122_close Release the hardware resources _l122_check_switch_card_num Check the existence of the designated PCI-L122-DIO card. _l122_set_ring_config Set the baud rate of 2 Rings of the specified PCI-L122-DIO card. _l122_get_start_ring_num Get the start Ring number of the specified card.

Local I/O Control Functions _l122_read_local_input Obtain the input ON/OFF status of 12 local digital input channels

which are in the CN3 port of PCI-L122 card. _l122_read_local_output Obtain the output data of 12 local output channels which are in the

CN3 port of PCI-L122 card. _l122_write_local_output Set the12 channels output data to the CN3 port of PCI-L122 card.

Page 69: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

69

7.3.1. _l122_open

Description: Initialize hardware and resources Syntax: I16 _l122_open (U16 *exist cards); Argument:

[output] U16 existcards : Get Master card count in your PC Return: 0 ERR_NoError : The system was initialed successfully. Other : Please reference to the Appendix error table.

Page 70: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

70

7.3.2. _l122_close

Description: Release the hardware and resources. Syntax: I16 _l122_close (); Argument:

None Return: 0 ERR_NoError : The system was initialed successfully. Other : Please reference to the Appendix error table.

Page 71: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

71

7.3.3. _l122_check_switch_card_num

Description: Check the existence of the designated PCI-L122-DIO card. Syntax: I16 _l122_check_switch_card_num (U16 SwitchCardNo, U8 *IsExist); Argument:

[input] U16 SwitchCardNo : the card number specified. [output] U8 *IsExist : return the existence.

Return: 0 ERR_NoError : The system was initialed successfully. Other : Please reference to the Appendix error table.

Page 72: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

72

7.3.4. _l122_set_ring_config

Description: Set the baud rate of 2 Rings of the specified PCI-L122-DIO card. Syntax: I16 _l122_set_ring_config (U16 SwitchCardNo, U8 BaudRate0, U8 BaudRate1); Argument:

[input] U16 SwitchCardNo : the specified card number. [input] U8 BaudRate0 : the baud rate for Ring_0 [input] U8 BaudRate1 : the baud rate for Ring_1 Note: Baud rate: 0: 2.5Mbps, 1: 5Mbps, 2: 10Mbps, 3: 20Mbps

Return: 0 ERR_NoError : The system was initialed successfully. Other : Please reference to the Appendix error table.

Page 73: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

73

7.3.5. _l122_get_start_ring_num

Description: Get the start Ring number of the specified card. Syntax: I16 _l122_get_start_ring_num (U16 SwitchCardNo, U8 *RingNo); Argument:

[input] U16 SwitchCardNo : the specified card number. [output] U8 *RingNo : the start Ring number.

Return: 0 ERR_NoError : The system was initialed successfully. Other : Please reference to the Appendix error table.

Page 74: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

74

7.3.6. _l122_read_local_input

Description: Obtain the input ON/OFF status of 12 local digital input channels which are in the CN3 port of PCI-L122 card. Syntax: I16 _l122_read_local_input (U16 SwitchCardNo, U16* Val) Argument:

[input] U16 SwitchCardNo : the specified card number. [input] U16 Val : 12 channel entrance point ON/OFF condition feedback value:

0x000 ~0xfff

Return: ERR_NoError : The API is successfully returned. Other : Please reference to the Appendix error table. Note. Bit0~Bit11 represents the status of the GPIO in Channel #0~#11

Bit0 =1 => Ch. #0 is ON Bit0 =0 => Ch. #0 is OFF

Page 75: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

75

7.3.7. _l122_read_local_output

Description: Obtain the output data of 12 local output channels which are in the CN3 port of PCI-L122 card. Syntax: I16 _l122_read_local_output (U16 SwitchCardNo, U16* Val); Argument:

[input] U16 SwitchCardNo : the specified card number. [input] U16Val : 12 channel entrance point ON/OFF condition feedback value:

0x000 ~0xfff Return: 0 SYS_NoError : The API is success. Other : Please reference to the Appendix error table.

Page 76: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

76

7.3.8. _l122_write_local_output

Description: Set the12 channels output data to the CN3 port of PCI-L122 card. Syntax: I16 _l122_write_local_output (U16 SwitchCardNo, U16Val); Argument:

[input] U16 SwitchCardNo : the specified card number. [output] U16Val : 12 channel entrance point ON/OFF condition feedback value:

0x000 ~0xfff Return: 0 SYS_NoError : The API is success. Other : Please reference to the Appendix error table.

Page 77: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

77

7.4. Motionnet Ring Operation

Function name Description _mnet_reset_ring Soft Reset Ring And Record Data _mnet_start_ring Start Ring Communication _mnet_stop_ring Stop Ring Communication _mnet_close Close Motionnet API Interface _mnet_get_ring_status Get The Active Ring Status _mnet_set_ring_config Set the Baudrate of Motionnet Ring _mnet_get_ring_active_table Get the Active Slave Table _mnet_get_slave_type Get the Slave Module Type _mnet_get_msg_slave_type Get the Msg Slave Module Type

Page 78: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

78

Start Motinonet Ring

Figure 7-5: Initialization of Motion Ring

Page 79: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

79

7.4.1. _mnet_reset_ring

Description: Soft reset ring and recorded data, User should reset Motionnet when the ring is in error status. Syntax: I16 _mnet_reset_ring (U16 RingNo); Argument:

[input] U16RingNo : Ring Number 0 ~1

Return: ERR_NoError : The API was initialized successful. ERR_Invalid_RingNo : Make sure the Ring is active.

Page 80: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

80

7.4.2. _mnet_start_ring

Description: Start Ring communication. Syntax: I16 _mnet_start_ring (U16 RingNo); Argument:

[input] U16RingNo : Ring Number0 ~1

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_RingNo : Make sure the Ring is active.

Page 81: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

81

7.4.3. _mnet_stop_ring

Description: Stop Ring communication. Syntax: I16 _mnet_stop_ring (U16 RingNo); Argument:

[input] U16RingNo : Ring Number0 ~1

Return: ERR_NoError : The API was initialized successful. ERR_Invalid_RingNo : Make sure the Ring is active.

Page 82: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

82

7.4.4. _mnet_close

Description: Close Motionnet API interface. Syntax: I16 _mnet_close(); Argument:

No Parameter

Return: ERR_NoError : The API was initialized successful. ERR_Invalid_RingNo : Make sure the Ring is active.

Page 83: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

83

7.4.5. _mnet_get_ring_status

Description: Get active Ring status. Syntax: I16 _mnet_get_ring_status (U16 RingNo, U16 * status); Argument:

[input] U16 RingNo : Ring Number 0 ~ 1 [output] U16 Status : Ring status

Return: ERR_NoError : The API was initialized successful. ERR_Invalid_RingNo : Make sure the Ring is active.

Page 84: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

84

7.4.6. _mnet_set_ring_config

Description: Set the Baudrate of Motionnet Ring. Syntax: I16 _mnet_set_ring_config (U16 RingNo, U16 Baudrate); Argument:

[input] U16RingNo : Ring Number 0 ~1 [input] U16 Baudrate : Baudrate 0: 2.5Mbps, 1: 5Mbps, 2: 10Mbps, 3: 20Mbps

Return: ERR_NoError : The API was initialized successful. ERR_Invalid_RingNo : Make sure the Ring is active.

Page 85: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

85

7.4.7. _mnet_get_ring_active_table

Description: Get the active slave table. Syntax: I16 _mnet_get_ring_active_table (U16 RingNo, U32 * DevTable); Argument:

[input] U16 RingNo : Ring Number 0 ~1 [output] U32 DevTable[2] : Slave device table

Return: ERR_NoError : The API was initialized successful. ERR_Invalid_RingNo : Make sure the Ring is active.

ERR_Invalid_Table_Addr : Make sure the variable address Note. DevTable is a 64-bit continue memory.

Bit set 1 means connected slave, and 0 means disconnected.

Page 86: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

86

7.4.8. _mnet_get_slave_type

Description: Get the slave module type. Syntax: I16 _mnet_get_slave_type (U16 RingNo, U16 SlaveIP, U8 *SlaveType); Argument:

[input] U16RingNo : Ring Number 0~ 1 [input] U16SlaveIP : Slave IP 0 ~ 63 [output] U32 DevTable[2] : Slave device table

Return: ERR_NoError : The API was initialized successful. ERR_Invalid_Slave : Slave IP is not correct.

ERR_Invalid_DeviceType : Device Type is not correct.

Page 87: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

87

7.5. Motionnet Slave DIO

After Motionnet initialization, start the operation of slaves in Ring.

Function name Description _mnet_io_output Output Remote Port _mnet_io_input Input Remote Port

Page 88: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

88

7.5.1. _mnet_io_output

Description: Output the remote port. Syntax: I16 _mnet_io_output (U16 RingNo, U16 SlaveIP, U8 PortNo, U8 Val); Argument:

[input] U16RingNo : Ring Number 0 ~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [input] U8 PortNo : Port No 0 ~ 3 [input] U8 Val : The value of output

Return: ERR_NoError : The API was initialized successful. ERR_Invalid_RingNo : Make sure the Ring is active. Note. If the out port number is not match the output port setting, the Motionnet will stop the out action.

Page 89: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

89

7.5.2. _mnet_io_input

Description: Read the remote input port. Syntax: I16 _mnet_io_input(U16 RingNo, U16 SlaveIP, U8 PortNo); Argument:

[input] U16 RingNo : Ring Number 0 ~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [input] U8 PortNo : Port No 0 ~ 3

Return: Return > 0 : Means the input value. Return < 0 : Means error code ERR_NoError : The API was initialized successful. ERR_Invalid_RingNo : Make sure the Ring is active. Note. If the out port number is not match the input port setting, the Motionnet will stop the action.

Page 90: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

90

7.6. Motionnet Slave Analog Input

Function name Description _mnet_ai8_initial Initial A180 Module _mnet_ai8_set_cycle_time Set ADC Convert Cycle Time _mnet_ai8_enable_device Enable A180 Device to Start ADC Operation _mnet_ai8_enable_channel Enable A180 ADC Input Channel _mnet_ai8_set_channel_gain Set the Gain for Assigned Channel _mnet_ai8_get_value Get Analog Input Channel Value _mnet_ai8_get_value_all Get All Analog Input Channel Value _mnet_ai8_get_voltage Get Voltage of Analog Input Channel _mnet_ai8_get_voltage_all Get Voltage of All Analog Input Channel

Page 91: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

91

Figure 7-6: analog input flow

Page 92: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

92

7.6.1. _mnet_ai8_initial

Description: Initialize an A180 module. Syntax: I16 _mnet_ai8_initial ( U16 RingNo, U16 SlaveIP ); Argument:

[input] U16RingNo : Ring Number 0~ 1 [input] U16SlaveIP : Slave IP 0 ~ 63

Return: ERR_NoError : The API was initialized successful. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

ERR_AI8_DeviceTypeNotCorrect : Device Type is not correct.

Page 93: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

93

7.6.2. _mnet_ai8_set_cycle_time

Description: Set ADC convert cycle time. Syntax: I16 _mnet_ai8_set_cycle_time (U16 RingNo, U16 SlaveIP, U8 SetValue) Argument:

[input] U16RingNo : Ring Number 0~ 1 [input] U16SlaveIP : Slave IP 0 ~ 63 [input] U8 SetValue : Cycle Time = SetValue + 2ms

ex. 2ms:0x00, 3ms:0x01 Return: ERR_NoError : The API was initialized successful. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

ERR_AI8_DeviceTypeNotCorrect : Device Type is not correct. ERR_AI8_RegisterWriteFail : Write Register Fail.

Page 94: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

94

7.6.3. _mnet_ai8_enable_device

Description: Enable A180 device to start ADC operation. Syntax: I16 _mnet_ai8_enable_device (U16 RingNo, U16 SlaveIP, U8 EnableDevice); Argument:

[input] U16RingNo : Ring Number 0~ 1 [input] U16SlaveIP : Slave IP 0 ~ 63 [input] U8 EnableDevice : 0x00 DAC_DEVICE_ENABLE

0x01 DAC_DEVICE_DISABLE Return: ERR_NoError : The API was initialized successful. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

ERR_AI8_DeviceTypeNotCorrect : Device Type is not correct. ERR_AI8_RegisterWriteFail : Fail to write the register.

Page 95: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

95

7.6.4. _mnet_ai8_enable_channel

Description: Enable A180 ADC input channel. Syntax: I16 _mnet_ai8_enable_channel (U16 RingNo, U16 SlaveIP, U16 ChannelNo, U8 Enable); Argument:

[input] U16RingNo : Ring Number 0~ 1 [input] U16SlaveIP : Slave IP 0 ~ 63 [input] U16 ChannelNo : 0x00 DAC_CHANNEL_0 0x01 DAC_CHANNEL_1

0x02 DAC_CHANNEL_2 0x03 DAC_CHANNEL_3 0x04 DAC_CHANNEL_4 0x05 DAC_CHANNEL_5 0x06 DAC_CHANNEL_6 0x07 DAC_CHANNEL_7

[input] U8 Enable : 0x00 DAC_CHANNEL_ENABLE 0x01 DAC_CHANNEL_DISABLE Return: ERR_NoError : The API was initialized successful. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

ERR_AI8_DeviceTypeNotCorrect : Device Type is not correct. ERR_AI8_IncorrectChannelNo : Incorrect Channel Number ERR_AI8_RegisterWriteFail : Fail to write the register.

Page 96: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

96

7.6.5. _mnet_ai8_set_channel_gain

Description: Set the gain for assigned channel. Syntax: I16 _mnet_ai8_set_channel_gain (U16 RingNo, U16 SlaveIP, U16 ChannelNo, U8 Gain) Argument:

[input] U16RingNo : Ring Number 0~ 1 [input] U16SlaveIP : Slave IP 0 ~ 63 [input] U16 ChannelNo : 0x00 DAC_CHANNEL_0 0x01 DAC_CHANNEL_1

0x02 DAC_CHANNEL_2 0x03 DAC_CHANNEL_3 0x04 DAC_CHANNEL_4 0x05 DAC_CHANNEL_5 0x06 DAC_CHANNEL_6 0x07 DAC_CHANNEL_7

[input] U8 Gain : 0x00 DAC_CHANNEL_GAIN_0 0x01 DAC_CHANNEL_GAIN_2

0x02 DAC_CHANNEL_GAIN_4 0x03 DAC_CHANNEL_GAIN_8 Return: ERR_NoError : The API was initialized successful. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

ERR_AI8_DeviceTypeNotCorrect : Device Type is not correct. ERR_AI8_IncorrectChannelNo : Incorrect Channel Number ERR_AI8_IncorrectValueOfGain : Incorrect Gain Value. ERR_AI8_RegisterWriteFail : Fail to write the register.

Page 97: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

97

7.6.6. _mnet_ai8_get_value

Description: Get Analog input channel value. Syntax: I16 _mnet_ai8_get_value (U16 RingNo, U16 SlaveIP, U16 ChannelNo, I16 *GetValue) Argument:

[input] U16RingNo : Ring Number 0~ 1 [input] U16SlaveIP : Slave IP 0 ~ 63 [input] U16 ChannelNo : 0x00 DAC_CHANNEL_0 0x01 DAC_CHANNEL_1

0x02 DAC_CHANNEL_2 0x03 DAC_CHANNEL_3 0x04 DAC_CHANNEL_4 0x05 DAC_CHANNEL_5 0x06 DAC_CHANNEL_6 0x07 DAC_CHANNEL_7

[output] I16 GetValue : Analog input channel value (0~65535)

Return: ERR_NoError : The API was initialized successful. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

ERR_AI8_DeviceTypeNotCorrect : Device Type is not correct. ERR_AI8_IncorrectChannelNo : Incorrect Channel Number ERR_AI8_DeviceNotEnable : Device not enabled ERR_AI8_ChannelNotEnable : Channel not enabled ERR_AI8_RegisterWriteFail : Fail to write the register.

Page 98: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

98

7.6.7. _mnet_ai8_get_value_all

Description: Get all Analog input channel value. Syntax: I16 _mnet_ai8_get_value_all (U16 RingNo, U16 SlaveIP, I16 *GetValue) Argument:

[input] U16RingNo : Ring Number 0~ 1 [input] U16SlaveIP : Slave IP 0 ~ 63 [output] I16 GetValue[8] : Analog input channel value (0~65535)

Return: ERR_NoError : The API was initialed successful. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

ERR_AI8_DeviceTypeNotCorrect : Device Type is not correct. ERR_AI8_DeviceNotEnable : Device not enabled.

ERR_AI8_ChannelNotEnable : Channel not enabled. ERR_AI8_RegisterWriteFail : Fail to write the register.

Page 99: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

99

7.6.8. _mnet_ai8_get_voltage

Description: Get voltage of Analog input channel. Syntax: I16 _mnet_ai8_get_voltage (U16 RingNo, U16 SlaveIP, U16 ChannelNo, F64 *Voltage) Argument:

[input] U16RingNo : Ring Number 0~ 1 [input] U16SlaveIP : Slave IP 0 ~ 63 [input] U16 ChannelNo : 0x00 DAC_CHANNEL_0 0x01 DAC_CHANNEL_1

0x02 DAC_CHANNEL_2 0x03 DAC_CHANNEL_3 0x04 DAC_CHANNEL_4 0x05 DAC_CHANNEL_5 0x06 DAC_CHANNEL_6 0x07 DAC_CHANNEL_7

[output] F64 GetValue : Voltage of analog input channel (-10V~+10V)

Return: ERR_NoError : The API was initialized successful. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

ERR_AI8_DeviceTypeNotCorrect : Device Type is not correct. ERR_AI8_IncorrectChannelNo : Incorrect Channel Number ERR_AI8_DeviceNotEnable : Device not enabled. ERR_AI8_ChannelNotEnable : Channel not enabled. ERR_AI8_RegisterWriteFail : Fail to write the register.

Page 100: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

100

7.6.9. _mnet_ai8_get_voltage_all

Description: Get voltage of all Analog input channels. Syntax: I16 _mnet_ai8_get_voltage_all (U16 RingNo, U16 SlaveIP, F64 *Voltage) Argument:

[input] U16RingNo : Ring Number 0~ 1 [input] U16SlaveIP : Slave IP 0 ~ 63 [output] F64 GetValue[8] : Voltage of analog input channel (-10V~+10V)

Return: ERR_NoError : The API was initialized successful. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

ERR_AI8_DeviceTypeNotCorrect : Device Type is not correct. ERR_AI8_DeviceNotEnable : Device not enabled. ERR_AI8_ChannelNotEnable : Channel not enabled. ERR_AI8_RegisterWriteFail : Fail to write the register.

Page 101: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

101

7.7. Motionnet Slave Analog Output

Function name Description _mnet_ao4_initial Initial A104 Module _mnet_ao4_get_hardware_info Get Device Hardware Information _mnet_ao4_reset_DAC Enable A180 Device to Start ADC Operation _mnet_ao4_clear_output_all Clear All Channels Output to 0V _mnet_ao4_set_output Set One Channel Output Value _mnet_ao4_set_voltage Set One Channel Output Voltage _mnet_ao4_set_voltage1 Set One Channel Output Voltage and get transformed value _mnet_ao4_set_output_all Set All Channels Output Value _mnet_ao4_set_voltage_all Set All Channels Output Voltage _mnet_ao4_set_voltage_all1 Set All Channels Output Voltage and get transformed value _mnet_ao4_set_coarse_gain Set One Channel Coarse Gain _mnet_ao4_set_fine_gain Set One Channel Fine Gain _mnet_ao4_set_offset Set One Channel Offset

Page 102: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

102

Figure 7-7: control flow of analog flow

Page 103: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

103

7.7.1. _mnet_ao4_initial

Description: Initial the A104 module. Syntax: I16 _mnet_ao4_initial (U16 RingNo, U16 SlaveIP) Argument:

[input] U16RingNo : Ring Number 0~ 1 [input] U16SlaveIP : Slave IP 0 ~ 63

Return: ERR_NoError : The API was initialized successful. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

ERR_AO4_DeviceTypeNotCorrect : Device Type is not correct. ERR_AO4_RegisterWriteFail : Fail to write the register.

Page 104: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

104

7.7.2. _mnet_ao4_reset_DAC

Description: Reset DAC all registers to 0. Syntax: I16 _mnet_ao4_reset_DAC (U16 RingNo, U16 SlaveIP) Argument:

[input] U16RingNo : Ring Number 0~ 1 [input] U16SlaveIP : Slave IP 0 ~ 63

Return: ERR_NoError : The API was initialized successful. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

ERR_AO4_DeviceTypeNotCorrect : Device Type is not correct. ERR_AO4_RegisterWriteFail : Fail to write the register.

Page 105: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

105

7.7.3. _mnet_ao4_clear_output_all

Description: Clear DAC all Channels Output to 0V. Syntax: I16 _mnet_ao4_clear_output_all (U16 RingNo, U16 SlaveIP) Argument:

[input] U16RingNo : Ring Number 0~ 1 [input] U16SlaveIP : Slave IP 0 ~ 63

Return: ERR_NoError : The API was initialized successful. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

ERR_AO4_DeviceTypeNotCorrect : Device Type is not correct. ERR_AO4_RegisterWriteFail : Fail to write the register.

Page 106: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

106

7.7.4. _mnet_ao4_set_output

Description: Set One Channel Output Value. Syntax: I16 _mnet_ao4_set_output (U16 RingNo, U16 SlaveIP, U8 ChannelNo, I16 SetValue) Argument:

[input] U16RingNo : Ring Number 0~ 1 [input] U16SlaveIP : Slave IP 0 ~ 63 [input] U8 ChannelNo : ChannelNo 0 ~ 3 [input] I16 SetValue : Output Value (-32768 ~ 32767)

Return: ERR_NoError : The API was initialized successful. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

ERR_AO4_DeviceTypeNotCorrect : Device Type is not correct. ERR_AO4_OutputValueNotCorrect : Output Value Incorrect.

ERR_AO4_RegisterWriteFail : Fail to write the register.

Page 107: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

107

7.7.5. _mnet_ao4_set_voltage

Description: Set Output Voltage of the specified channel. Syntax: I16 _mnet_ao4_set_voltage (U16 RingNo, U16 SlaveIP, U8 ChannelNo, F64 Voltage) Argument:

[input] U16RingNo : Ring Number 0~ 1 [input] U16SlaveIP : Slave IP 0 ~ 63 [input] U8 ChannelNo : ChannelNo 0 ~ 3 [input] F64 Voltage : Output Voltage (-10.0V ~ +10.0V)

Return: ERR_NoError : The API was initialized successful. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

ERR_AO4_DeviceTypeNotCorrect : Device Type is not correct. ERR_AO4_ChannelNoNotCorrect : Channel Number Incorrect ERR_AO4_OutputVoltageNotCorrect : Output Voltage Incorrect.

ERR_AO4_RegisterWriteFail : Fail to write the register.

Page 108: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

108

7.7.6. _mnet_ao4_set_voltage1

Description: Set Output Voltage of the specified channel and show transformed value. Syntax: I16 _mnet_ao4_set_voltage1 (U16 RingNo, U16 SlaveIP, U8 ChannelNo, F64 Voltage, I16 *Value) Argument:

[input] U16RingNo : Ring Number 0~ 1 [input] U16SlaveIP : Slave IP 0 ~ 63 [input] U8 ChannelNo : ChannelNo 0 ~ 3 [input] F64 Voltage : Output Voltage (-10.0V ~ +10.0V) [output] I16 Value : Actual output value (-32768~ +32767)

Return: ERR_NoError : The API was initialized successful. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

ERR_AO4_DeviceTypeNotCorrect : Device Type is not correct. ERR_AO4_ChannelNoNotCorrect : Channel Number Incorrect ERR_AO4_OutputVoltageNotCorrect : Output Voltage Incorrect.

ERR_AO4_RegisterWriteFail : Fail to write the register.

Page 109: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

109

7.7.7. _mnet_ao4_set_output_all

Description: Set All Channels Output Value . Syntax: I16 _mnet_ao4_set_output_all( U16 RingNo, U16 SlaveIP, I16 SetValue1, I16 SetValue2, I16 SetValue3, I16 SetValue4 ); Argument:

[input] U16RingNo : Ring Number 0~ 1 [input] U16SlaveIP : Slave IP 0 ~ 63 [input] I16 SetValue1 : Channel 0 Output Value (-32768 ~ +32767) [input] I16 SetValue2 : Channel 1 Output Value (-32768 ~ +32767) [input] I16 SetValue3 : Channel 2 Output Value (-32768 ~ +32767) [input] I16 SetValue4 : Channel 3 Output Value (-32768 ~ +32767)

Return: ERR_NoError : The API was initialized successful. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

ERR_AO4_DeviceTypeNotCorrect : Device Type is not correct. ERR_AO4_OutputValueNotCorrect : Output Value Incorrect.

ERR_AO4_RegisterWriteFail : Fail to write the register.

Page 110: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

110

7.7.8. _mnet_ao4_set_voltage_all

Description: Set All Channels Output Voltage. Syntax: I16 _mnet_ao4_set_voltage_all (U16 RingNo, U16 SlaveIP, F64 Voltage1, F64 Voltage2, F64 Voltage3, F64 Voltage4 ); Argument:

[input] U16RingNo : Ring Number 0~ 1 [input] U16SlaveIP : Slave IP 0 ~ 63 [input] F64 Valtage1 : Channel 0 Output Voltage (-10.0V ~ +10.0V) [input] F64 Valtage2 : Channel 1 Output Voltage (-10.0V ~ +10.0V) [input] F64 Valtage3 : Channel 2 Output Voltage (-10.0V ~ +10.0V) [input] F64 Valtage4 : Channel 3 Output Voltage (-10.0V ~ +10.0V)

Return: ERR_NoError : The API was initialized successful. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

ERR_AO4_DeviceTypeNotCorrect : Device Type is not correct. ERR_AO4_OutputVoltageNotCorrect : Output Voltage Incorrect

ERR_AO4_RegisterWriteFail : Write Register Fail

Page 111: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

111

7.7.9. _mnet_ao4_set_voltage_all1

Description: Set All Channels Output Voltage and show transformed value. Syntax: I16 _mnet_ao4_set_voltage_all1( U16 RingNo, U16 SlaveIP, F64 Voltage1, F64 Voltage2, F64 Voltage3, F64 Voltage4, I16 *Value1, I16 *Value2, I16 *Value3, I16 *Value4 ); Argument:

[input] U16RingNo : Ring Number 0~ 1 [input] U16SlaveIP : Slave IP 0 ~ 63 [input] F64 Valtage1 : Channel 0 Output Voltage (-10.0V ~ +10.0V) [input] F64 Valtage2 : Channel 1 Output Voltage (-10.0V ~ +10.0V) [input] F64 Valtage3 : Channel 2 Output Voltage (-10.0V ~ +10.0V) [input] F64 Valtage4 : Channel 3 Output Voltage (-10.0V ~ +10.0V) [output] I16 Value1 : Channel 0 actual output value (-32768 ~ +32767) [output] I16 Value2 : Channel 1 actual output value (-32768 ~ +32767) [output] I16 Value3 : Channel 2 actual output value (-32768 ~ +32767) [output] I16 Value4 : Channel 3 actual output value (-32768 ~ +32767)

Return: ERR_NoError : The API was initialized successful. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

ERR_AO4_DeviceTypeNotCorrect : Device Type is not correct. ERR_AO4_OutputVoltageNotCorrect : Output Voltage Incorrect.

ERR_AO4_RegisterWriteFail : Write Register Fail

Page 112: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

112

7.7.10. _mnet_ao4_set_coarse_gain

Description: Set the Coarse Gain of assigned channel. Syntax: I16 _mnet_ao4_set_coarse_gain (U16 RingNo, U16 SlaveIP, U8 ChannelNo, I16 SetValue) Argument:

[input] U16RingNo : Ring Number 0~ 1 [input] U16SlaveIP : Slave IP 0 ~ 63 [input] U8 ChannelNo : ChannelNo 0 ~ 3 [input] I16 SetValue : Coarse Gain Value (0 ~ 2) 0 Output Range: ±10V (default) 1 Output Range: ±10.2564V 2 Output Range: ±10.5263V

Return: ERR_NoError : The API was initialized successful. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

ERR_AO4_DeviceTypeNotCorrect : Device Type is not correct. ERR_AO4_ChannelNoNotCorrect : Channel Number Incorrect

ERR_AO4_CoarseGainValueNotCorrect : Coarse Gain Value Incorrect ERR_AO4_RegisterWriteFail : Write Register Fail

Page 113: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

113

7.7.11. _mnet_ao4_set_fine_gain

Description: Set the adjust Fine Gain of assigned channel and the adjustment is made to both the positive full-scale points and the negative full-scale points simultaneously. Syntax: _mnet_ao4_set_fine_gain (U16 RingNo, U16 SlaveIP, U8 ChannelNo, I16 SetValue) Argument:

[input] U16RingNo : Ring Number 0~ 1 [input] U16SlaveIP : Slave IP 0 ~ 63 [input] U8 ChannelNo : ChannelNo 0 ~ 3 [input] I16 SetValue : Fine Gain Value (31 ~ -32)

Return: ERR_NoError : The API was initialized successful. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

ERR_AO4_DeviceTypeNotCorrect : Device Type is not correct. ERR_AO4_ChannelNoNotCorrect : Channel Number Incorrect.

ERR_AO4_FineGainValueNotCorrect : Fine Gain Value Incorrect. ERR_AO4_RegisterWriteFail : Write Register Fail

Page 114: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

114

7.7.12. _mnet_ao4_set_offset

Description: Set the adjust Offset of assigned channel. Syntax: I16 _mnet_ao4_set_offset (U16 RingNo, U16 SlaveIP, U8 ChannelNo, I16 SetValue) Argument:

[input] U16RingNo : Ring Number 0~ 1 [input] U16SlaveIP : Slave IP 0 ~ 63 [input] U8 ChannelNo : ChannelNo 0 ~ 3 [input] I16 SetValue : Offset Value (+127 ~ -128)

Return: ERR_NoError : The API was initialized successful. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

ERR_AO4_DeviceTypeNotCorrect : Device Type is not correct. ERR_AO4_ChannelNoNotCorrect : Channel Number Incorrect.

ERR_AO4_CoarseGainValueNotCorrect : Coarse Gain Value Incorrect. ERR_AO4_RegisterWriteFail : Write Register Fail

Page 115: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

115

7.8. Motionnet Slave Pulse Counter

Before developing the Pulse Counter program, you have to use MyLink to set all parameters and properties of the counter module. Here we introduce how to acquire the counter or frequency value from the module.

Function name Description _mnet_p120_initial Initial P120 Module _mnet_p120_get_hardware_info Get Device Hardware Information _mnet_p120_start_channel Start the Assigned Channels to Counter Operation _mnet_p120_stop_channel Stop Operation of the Assigned Channels _mnet_p120_get_value Acquire Counter Value of the Assigned Channels

7.8.1. _mnet_p120_initial

Description: Initialize P120 Module and start one channel. Syntax: I16 _mnet_p120_initial (U16 RingNo, U16 SlaveIP) Argument:

[input] U16RingNo : Ring Number 0~ 1 [input] U16SlaveIP : Slave IP 0 ~ 63

Return: ERR_NoError : The API was initialized successful. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

Page 116: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

116

7.8.2. _mnet_p120_start_channel

Description: Start assigned channels to counter operation. Syntax: I16 _mnet_p120_start_channel (U16 RingNo, U16 SlaveIP, U16 Channels) Argument:

[input] U16RingNo : Ring Number 0~ 1 [input] U16SlaveIP : Slave IP 0 ~ 63 [input] U16 Channels : 0x01 CNT_CHANNEL_0 0x02 CNT_CHANNEL_1

0x04 CNT_CHANNEL_2 0x08 CNT_CHANNEL_3 0x03 CNT_CHANNEL_0 | CNT_CHANNEL_1 :

: 0x0f all channels

Return: ERR_NoError : The API was initialized successful. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct. ERR_MSG_InvalidParameter3 : Channels are not correct.

Page 117: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

117

7.8.3. _mnet_p120_stop_channel

Description: Stop operation of assigned channels. Syntax: I16 _mnet_p120_stop_channel (U16 RingNo, U16 SlaveIP, U16 Channels) Argument:

[input] U16RingNo : Ring Number 0~ 1 [input] U16SlaveIP : Slave IP 0 ~ 63 [input] U16 Channels : 0x01 CNT_CHANNEL_0 0x02 CNT_CHANNEL_1

0x04 CNT_CHANNEL_2 0x08 CNT_CHANNEL_3 0x03 CNT_CHANNEL_0 | CNT_CHANNEL_1 :

: 0x0f all channels

Return: ERR_NoError : The API was initialized successful. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct. ERR_MSG_InvalidParameter3 : Channels are not correct.

Page 118: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

118

7.8.4. _mnet_p120_get_value

Description: Acquire counter value of the assigned channels in an array structure. Syntax: I16 _mnet_p120_get_value (U16 RingNo, U16 SlaveIP, U16 Channels, U32* Values); Argument:

[input] U16RingNo : Ring Number 0~ 1 [input] U16SlaveIP : Slave IP 0 ~ 63 [input] U16 Channels : 0x01 CNT_CHANNEL_0

0x02 CNT_CHANNEL_1 0x04 CNT_CHANNEL_2 0x08 CNT_CHANNEL_3 0x03 CNT_CHANNEL_0 | CNT_CHANNEL_1 :

: 0x0f all channels

[output] U32 Values[4] : Counter values of all channels. If the channel is not assigned to acquire counter value, then the corresponding values[] will be 0. When the mode parameter of counter module is set frequency or period from MyLink, the acquired value means a period in nanoseconds (ns),

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct. ERR_MSG_InvalidParameter3 : Channels are not correct.

Page 119: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

119

7.9. Motionnet Slave One Axis Motion

The operation of Motion slave can be viewed as a single axis Point-to-Point operation. Before the motion operation, hardware initialization must be completed first. The following automatic function is supported. 1. Homing 2. Velocity Move 3. Point to Point move 4. CMP / LTC One Axis Motion Operation Flow Chart

Figure 7-8: 1-axis motion operation flowchart

Page 120: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

120

7.9.1. One Axis Motion Operation

Figure 7-9: one axis motion operating flowchart

Page 121: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

121

7.9.2. Start Hardware Dependant Settings

Figure 7-10: Hardware dependent setting flowchart

Page 122: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

122

7.9.3. Start Output Pulse Setting

Figure 7-11: setting output pulse

Page 123: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

123

7.9.4. Start Input Pulse Setting

Figure 7-12: input pulse settings

Page 124: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

124

7.9.5. Start Home Mode Motion

Figure 7-13: homing sequence diagram

Page 125: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

125

7.9.6. Start Velocity Mode Motion

Figure 7-14: velocity mode flowchart

Page 126: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

126

7.9.7. Start Position Mode Motion

Figure 7-15: position mode sequence diagram

Page 127: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

127

7.9.8. Comparator Counter Setting

Figure 7-16: settings of comparator

Page 128: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

128

7.9.9. Latch Counter Operation

Figure 7-17: latch counter operation

Page 129: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

129

7.9.10. Synchronization (1 Axis)

Figure 7-18: synchronize 1 axis

Page 130: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

130

7.9.11. Synchronization (2 Axes)

Figure 7-19: synchronize 2 axes

Page 131: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

131

7.10. One Axis Motion Slave API

7.10.1. Initialization

Function name Description _mnet_m1_initial Initialize the remote axis resource. _mnet_m1_load_motion_file Load the parameters of axis configuration from the .CFG file

which is generated by the MyLink utility.

7.10.1.1 _mnet_m1_initial

Description: Initial the remote Axis resource. Syntax: I16 _mnet_m1_initial (U16 RingNo, U16 SlaveIP); Argument:

[input] U16RingNo : Ring Number 0~ 1 [input] U16SlaveIP : Slave IP 0 ~ 63

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

Page 132: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

132

7.10.1.2 _mnet_m1_load_motion_file

Description: Load the parameters of axis configuration from the CFG file which is generated by the MyLink utility. Syntax: I16 _mnet_m1_load_motion_file (U16 RingNo, U16 SlaveIP, char *FilePath) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [input] charFilePath[ ] : File name and path for parameters of axis configuration.

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

Page 133: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

133

7.10.2. Pulse I/O Configuration

Function name Description _mnet_m1_set_pls_outmode Set pulse command output mode. _mnet_m1_set_pls_iptmode Set encoder input mode. _mnet_m1_set_feedback_src Set the counters input source. _mnet_m1_set_move_ratio Set the move ratio which is the feedback counter divided by

the command counter.

7.10.2.1 _mnet_m1_set_pls_outmode

Description: Set pulse command output mode. Syntax: I16 _mnet_m1_set_pls_outmode (U16 RingNo, U16 SlaveIP, U16 pls_outmode) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [input] U16 pls_outmode : Setting of command pulse output mode

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

Page 134: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

134

NOTE Single Pulse Output Mode(OUT/DIR Mode)

In this mode, the OUT signal is for the command pulse (position or velocity) chain. The numbers of OUT pulse represent the relative “distance” or “position”, the frequency of the OUT pulse represents the command for “speed” or “velocity”. The DIR signal represents direction command of the positive (+) or negative (-). This mode is the most common used mode. The following diagrams show the output waveform. It is possible to set the polarity of pulse chain.

Figure 7-20: single pulse output mode

Page 135: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

135

Dual Pulse Output Mode(CW/CCW Mode) In this mode, the waveform of the OUT and DIR pins represent CW (clockwise) and CCW (counter clockwise) pulse output respectively. Pulses output from CW pin makes motor move in positive direction, whereas pulse output from CCW pin makes motor move in negative direction. The following diagram shows the output waveform of positive (plus,+) command and negative (minus,-) command.

Figure 7-21: dual pulse output mode

Page 136: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

136

AB Phase Pulse Output Mode(AB/BA Mode) In this mode, the waveform of the OUT and DIR pins represent A phase and B phase pulse output respectively. When the A phase pulse leads B phase output, it makes motor move in positive direction. When the B phase pulse leads A phase output, it makes motor move in negative direction. The following diagram shows the output waveform of positive (plus, +) command and negative (minus, -) command.

Figure 7-22: AB phase pluse output mode

Page 137: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

137

7.10.2.2 _mnet_m1_set_pls_iptmode

Description: Set encoder input mode. Syntax: I16 _mnet_m1_set_pls_iptmode (U16 RingNo, U16 SlaveIP, U16 pls_iptmode, U16 pls_iptdir) Argument:

[input] U16RingNo : Ring Number 0~ 1 [input] U16SlaveIP : Slave IP 0 ~ 63 [input] U16 pls_iptmode : Setting of encoder feedback pulse input mode

[input]U16 pls_iptdir : Logic of encoder feedback pulse

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

Page 138: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

138

NOTE plus and minus pulses input(CW/CCW mode)

The pattern of pulses in this mode is the same as Dual Pulse Output Mode in Pulse Command Output section, expect that the input pins are EA and EB. In this mode, pulse from EA causes the counter to count up, whereas EB caused the counter to count down.

90° phase difference signals(AB phase mode) 90° phase difference signals may be selected to be multiplied by a factor of 1, 2 or 4. 4x AB phase mode is the most commonly used for incremental encoder input. In this mode, the EA signal is 90° phase leading or lagging in comparison with EB signal. The difference of phase “lead” and “lag” between two signals is caused by the turning direction of motors. The up/down counter counts up when the phase of EA signal leads the phase of EB signal. The following diagram shows the waveform.

Figure 7-23: illustration of the motion directions of AB phases

Page 139: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

139

7.10.2.3 _mnet_m1_set_feedback_src

Description: Set the counters input source. Syntax: I16 _mnet_m1_set_feedback_src (U16 RingNo, U16 SlaveIP, U16 FbkSrc) Argument:

[input] U16RingNo : Ring Number 0~ 1 [input] U16SlaveIP : Slave IP 0 ~ 63 [input] U16 FbkSrc : Counter source

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

Page 140: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

140

7.10.2.4 _mnet_m1_set_move_ratio

Description: Set the move ratio thatis the feedback counter divided by the command counter. Syntax: I16 _mnet_m1_set_move_ratio (U16 RingNo, U16 SlaveIP, F64 move_ratio) Argument:

[input] U16RingNo : Ring Number 0~ 1 [input] U16SlaveIP : Slave IP 0 ~ 63 [input] F64 move_ratio :Move_ratio = Feedback Counter / Command Counter

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

Page 141: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

141

7.10.3. Interface I/O Configuration

Function name Description

_mnet_m1_set_alm Set Alarm Logic And Operating Mode

_mnet_m1_set_inp Set INP Logic And Operating Mode

_mnet_m1_set_erc Set ERC Logic And Timing

_mnet_m1_set_erc_on Force ERC Output

_mnet_m1_set_svon Set Servo Driver ON

_mnet_m1_set_ralm Output Servo Driver Alarm Reset

_mnet_m1_set_sd Set SD Logic And Operating Mode

_mnet_m1_set_ltc_logic Set Latch Logic

_mnet_m1_dio_output Set TTL Output Status

_mnet_m1_dio_input Set TTL Input Status

_mnet_m1_set_mechanical_input_filter Set Mechanical Input Filter On/Off

_mnet_m1_get_io_status Get The Motion I/O Status Of One AXIS Motion Controller

Page 142: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

142

7.10.3.1 _mnet_m1_set_alm

Description: Set alarm logic and operating mode. Syntax: I16 _mnet_m1_set_alm (U16 RingNo, U16 SlaveIP, U16 alm_logic, U16 alm_mode) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [input] U16 alm_logic : Setting of active logic for ALARM signal

[input] U16 alm_mode : reacting modes when receiving ALARM signal

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

Page 143: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

143

7.10.3.2 _mnet_m1_set_inp

Description: Set INP logic and operating mode. Syntax: I16_mnet_m1_set_inp (U16 RingNo, U16 SlaveIP, U16 inp_enable, U16 inp_logic) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [input] U16 inp_enable : INP function enable/disable

[input] U16 inp_logic : Setting of active logic for INP signal

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

Page 144: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

144

7.10.3.3 _mnet_m1_set_erc

Description: Set ERC logic and timing. Syntax: I16_mnet_m1_set_erc (U16 RingNo, U16 SlaveIP, U16 erc_logic, U16 erc_on_time, U16 erc_off_time) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [input] U16 erc_logic : Setting of active logic for ERC signal

[input] U16 erc_on_time : Setting of time length of ERC active

[input] U16 erc_off_time : Specify the pulse width of ERC output signal

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

Page 145: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

145

7.10.3.4 _mnet_m1_set_erc_on

Description: Force ERC output. Syntax: I16_mnet_m1_set_erc_on (U16 RingNo, U16 SlaveIP, I16 on_off) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [input] U16 on_off : Setting the action of ERC signal

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

Page 146: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

146

7.10.3.5 _mnet_m1_set_svon

Description: Set servo Driver ON. Syntax: I16_mnet_m1_set_svon (U16 RingNo, U16 SlaveIP, U16 on_off) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [input] U16 on_off : Setting the action of ERC signal

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

Page 147: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

147

7.10.3.6 _mnet_m1_set_ralm

Description: Output servo Driver Alarm Reset. Syntax: I16_mnet_m1_set_ralm (U16 RingNo, U16 SlaveIP, U16 on_off) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [input] U16 on_off : Setting the action of ERC signal

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

Page 148: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

148

7.10.3.7 _mnet_m1_set_sd

Description: Set SD logic and operating mode. Syntax: I16_mnet_m1_set_sd (U16 RingNo, U16 SlaveIP, I16 sd_enable, I16 sd_logic, I16 sd_latch, I16 sd_mode) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [input] I16 sd_enable : Enable/disable the SD signal

[input]I16 sd_logic : setting of active logic for SD signal

[input] I16 sd_latch : setting of latch control for SD signal

[input] I16 sd_mode : setting the reacting mode of SD signal

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

Page 149: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

149

If the SD signal is enabled and the SD signal is turned ON while in operation, the axis will be the following 4 status, according to the setting of sd_latch and sd_mode. decelerate <sd_latch = 0, sd_mode =0>

Figure 7-24: speed modes

latch and decelerate <sd_latch = 1, sd_mode = 0>

Figure 7-25: speed modes

Page 150: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

150

decelerate and stop <sd_latch = 0, sd_mode = 1>

Figure 7-26: speed modes

latch and perform a deceleration stop <sd_latch = 1, sd_mode = 1>

Figure 7-27: speed modes

Page 151: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

151

7.10.3.8 _mnet_m1_set_ltc_logic

Description: Set latch logic. Syntax: I16_mnet_m1_set_ltc_logic (U16 RingNo, U16 SlaveIP, U16 ltc_logic) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [input] U16 ltc_logic : Latch logical

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

Page 152: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

152

7.10.3.9 _mnet_m1_dio_output

Description: Set output status of axis remote module. Syntax: I16_mnet_m1_dio_output( U16 RingNo, U16 SlaveIP, U16 DoNo, U16 on_off ); Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [input] U16 DoNo : Digital out Number

[input] U16 on_off : Setting of active logic for ON_OFF signal

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

Page 153: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

153

7.10.3.10 _mnet_m1_dio_input

Description: Get input status of axis remote module. Syntax: I16_mnet_m1_dio_input (U16 RingNo, U16 SlaveIP, U16 DiNo) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [input] U16 DiNo : Digital in Number

Return: 0 : No active. 1 : Active. Less than 0 : Means error condition.

Page 154: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

154

7.10.3.11 _mnet_m1_set_mechanical_input_filter

Description: Set mechanical input filter status of axis remote module. Syntax: I16_mnet_m1_set_mechanical_input_filter (U16 RingNo, U16 SlaveIP, U16 on_off) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [input] U16 on_off : Setting of filter status for mechanical input

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

Page 155: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

155

7.10.3.12 _mnet_m1_get_io_status

Description: Get the motion I/O status of AXIS Remote module. Syntax: I16_mnet_m1_get_io_status (U16 RingNo, U16 SlaveIP, U32 *IO_status) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [output] U32 IO_status : I/O status word. Where “1’ is ON and “0” is OFF. ON/OFF state is read based

on the corresponding set logic

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

Page 156: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

156

7.10.4. Home Operation

Function name Description _mnet_m1_start_home_move Begin A Home Return Action _mnet_m1_set_home_config Set The Home/Index Logic Configuration _mnet_m1_start_home_search Search the ORG active position and stop on the ORG active

point _mnet_m1_start_home_escape Escape from the ORG active status

7.10.4.1 _mnet_m1_start_home_move

Description: Begin a home return action. Syntax: I16 _mnet_m1_start_home_move (U16 RingNo, U16 SlaveIP, U8 Dir) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [input] U8 Dir : Action direction

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

Page 157: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

157

7.10.4.2 _mnet_m1_set_home_config

Description: Set the home/index logic configuration. Syntax: I16 _mnet_m1_set_home_config (U16 RingNo, U16 SlaveIP, U16 home_mode, U16 org_logic, U16 ez_logic, U16 ez_count, U16 erc_out) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [input] U16 home_mode: Stopping modes for home return, 0~12 see Description [input] U16 org_logic : Action logic configuration for ORG signal

[input] U16 ez_logic : Action logic configuration for EZ signal

[input] U16 ez_count : 0 ~ 15 [input] U16 erc_out : Set ERC output options

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

Page 158: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

158

NOTE In this mode, you can let the Axis Module output pulses until the condition to complete the home return is satisfied after writing the command _mnet_m1_start_home_move(). There are 13 home moving modes provided by Axis Module. The “home_mode” of function _mnet_m1_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 Axis Module, there are 3 counters. Command position counter: To count the number of output pulses. Feedback position counter: To count the number of pulse input. Position error counter: To count the error between command and feedback pulse number. After Home move complete, it is necessary to manually set the counter to “0” by calling the function: _mnet_m1_reset_command(), _mnet_m1_reset_position(), _mnet_m1_reset_error_counter(). So that, information of all the positions will be “0”. The following figures show the various home modes.

Page 159: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

159

home_mode = 0

Figure 7-28: home_mode=0 when SD (ramp-down signal) is inactive

Figure 7-29: home_mode=0 when SD (ramp-down signal) is active

Page 160: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

160

home_mode = 1

Figure 7-30: home_mode = 1

home_mode = 2

Figure 7-31: home_mode = 2

Page 161: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

161

home_mode = 3

Figure 7-32: home_mode = 3

home_mode = 4

Figure 7-33: home_mode = 4

Page 162: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

162

home_mode = 5

Figure 7-34: home_mode = 5

home_mode = 6

Figure 7-35: home_mode = 6

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

Figure 7-36: home_mode = 7

Note: FA=1/2 (start velocity)

Page 163: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

163

home_mode = 8

Figure 7-37: home_mode = 8

home_mode = 9

Figure 7-38: home_mode = 9

home_mode = 10

Figure 7-39: home_mode = 10

Page 164: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

164

home_mode = 11

Figure 7-40: home_mode = 11

home_mode = 12

Figure 7-41: home_mode = 12

Page 165: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

165

7.10.4.3 _mnet_m1_start_home_search

Description: Search the ORG active position and stop on the ORG active point. Syntax: I16_mnet_m1_start_home_search( U16 RingNo, U16 SlaveIP, U8 Dir, F64 ORGOffset ); Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [input] U8 Dir : Action Direction

[input] F64 ORGOffset : ORG Offset

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct. NOTE

Figure 7-42: home search status

Page 166: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

166

7.10.4.4 _mnet_m1_start_home_escape

Description: Escape from the ORG active status. Syntax: I16_mnet_m1_start_home_escape( U16 RingNo, U16 SlaveIP, U8 Dir ); Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [input] U8 Dir : Action Direction

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

Page 167: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

167

7.10.5. Positioning Operation

Function name Description _mnet_m1_set_tmove_speed Set A Trapezoidal Velocity Profile _mnet_m1_set_smove_speed Set A S-Curve Velocity Profile Move _mnet_m1_start_r_move Begin An Relative Move _mnet_m1_start_a_move Begin An Absolute Move

Page 168: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

168

7.10.5.1 _mnet_m1_set_tmove_speed

Description: Set a trapezoidal velocity profile. Syntax: I16_mnet_m1_set_tmove_speed (U16 RingNo, U16 SlaveIP, F64 StrVel, F64 MaxVel, F64 Tacc, F64 Tdec) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [input] F64 StrVel : starting velocity in unit of pulse per second [input] F64 MaxVel : maximum velocity in unit of pulse per second [input] F64 Tacc : specified acceleration time in unit of second [input] F64 Tdec : specified deceleration time in unit of second

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct. ERR_SpeedError : If MaxVel equal to zero, the error will happen NOTE

Figure 7-43: relative trapezoidal profile

Page 169: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

169

7.10.5.2 _mnet_m1_set_smove_speed

Description: Set a S-curve Velocity profile move. Syntax: I16_mnet_m1_set_smove_speed (U16 RingNo, U16 SlaveIP, F64 StrVel, F64 MaxVel, F64 Tacc, F64 Tdec, F64 SVacc, F64 SVdec) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [input] F64 StrVel : Starting velocity in unit of pulse per second [input] F64 MaxVel : Maximum velocity in unit of pulse per second [input] F64 Tacc : Specified acceleration time in unit of second [input] F64 Tdec : Specified deceleration time in unit of second [input] F64 SVacc : Specified velocity interval in which S-curve acceleration is performed.

Range: 0 ~ (MaxVel~StrVel)/2 [input] F64 SVdec : Specified velocity interval in which S-curve deceleration is performed.

Range: 0 ~ (MaxVel~StrVel)/2 Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct. ERR_SpeedError : If MaxVel equal to zero, the error will happen NOTE

Figure 7-44: relative S-curve profile

Page 170: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

170

7.10.5.3 _mnet_m1_start_r_move

Description: Begin a relative move. Syntax: I16_mnet_m1_start_r_move (U16 RingNo, U16 SlaveIP, I32 Distance) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [input] I32 Distance : Relative Distance

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct. ERR_Invalid_Operating_Velocity : No Velocity Profile Setting

Page 171: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

171

7.10.5.4 _mnet_m1_start_a_move

Description: Begin an absolute move. Syntax: I16_mnet_m1_start_a_move (U16 RingNo, U16 SlaveIP, I32 Pos) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [input] I32 Pos : Absolute Position

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct. ERR_Invalid_Operating_Velocity : No Velocity Profile Setting

Page 172: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

172

7.10.6. Velocity Operation

Function name Description _mnet_m1_v_move Accelerate an axis to a constant velocity with trapezoidal profile _mnet_m1_v_change Speed change by comparator _mnet_m1_fix_speed_range Fix the speed range constrain _mnet_m1_unfix_speed_range Release the speed range constrain

Page 173: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

173

7.10.6.1 _mnet_m1_v_move

Description: Accelerate an axis to a constant velocity with trapezoidal profile. Syntax: I16_mnet_m1_v_move (U16 RingNo, U16 SlaveIP, U8 Dir) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [input] U8 Dir : Action direction

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct. NOTE

Figure 7-45: constant velocity with trapezoidal profile

Page 174: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

174

7.10.6.2 _mnet_m1_v_change

Description: Speed change by comparator. Syntax: I16_mnet_m1_v_change (U16 RingNo, U16 SlaveIP, F64 NewVel, F64 Time) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [input] F64 NewVel : The new velocity [input] F64 Time : The acceleration time

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct. NOTE

Figure 7-46: update speed on the fly

Page 175: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

175

7.10.6.3 _mnet_m1_fix_speed_range

Description: Fix the speed range constrain. Syntax: I16_mnet_m1_fix_speed_range (U16 RingNo, U16 SlaveIP, F64 MaxVel) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [input] F64 MaxVel : Maximum velocity in unit of pulse per second

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

Page 176: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

176

7.10.6.4 _mnet_m1_unfix_speed_range

Description: Release the speed range constrain. Syntax: I16_mnet_m1_unfix_speed_range (U16 RingNo, U16 SlaveIP) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

Page 177: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

177

7.10.7. Stop Operation

Function name Description _mnet_m1_sd_stop Slow down to stop _mnet_m1_emg_stop Immediately stop _mnet_m1_set_soft_limit Set soft limit _mnet_m1_enable_soft_limit Enable limit _mnet_m1_disable_soft_limit Disable limit

Page 178: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

178

7.10.7.1 _mnet_m1_sd_stop

Description: Slow down to stop. Syntax: I16_mnet_m1_sd_stop (U16 RingNo, U16 SlaveIP) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

Page 179: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

179

7.10.7.2 _mnet_m1_emg_stop

Description: Immediately stop. Syntax: I16_mnet_m1_emg_stop (U16 RingNo, U16 SlaveIP) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

Page 180: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

180

7.10.7.3 _mnet_m1_set_soft_limit

Description: Set the Value of soft Limit. Syntax: I16_mnet_m1_set_soft_limit (U16 RingNo, U16 SlaveIP, I32 PLimit, I32 MLimit) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [input] I32 PLimit : Positive Limit [input] I32 MLimit : Negative Limit

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

Page 181: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

181

7.10.7.4 _mnet_m1_enable_soft_limit

Description: Enable soft limit function. Syntax: I16_mnet_m1_enable_soft_limit (U16 RingNo, U16 SlaveIP, U8 Action) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [input] U8 Action : Active type

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

Page 182: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

182

7.10.7.5 _mnet_m1_disable_soft_limit

Description: Disable soft limit function. Syntax: I16_mnet_m1_disable_soft_limit (U16 RingNo, U16 SlaveIP) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

Page 183: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

183

7.10.8. Counter Control

Function name Description

_mnet_m1_set_command Set the command value

_mnet_m1_get_command Get the command value

_mnet_m1_reset_command Reset the command value to zero

_mnet_m1_get_position Get the position value

_mnet_m1_set_position Set the position value

_mnet_m1_reset_position Reset the position value to zero

_mnet_m1_set_error_counter Set the value of error counter

_mnet_m1_get_error_counter Get the error counter value

_mnet_m1_reset_error_counter Reset the error counter to zero

_mnet_m1_get_current_speed Get current speed

Page 184: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

184

7.10.8.1 _mnet_m1_set_command

Description: Set the value of command counter. Syntax: I16_mnet_m1_set_command (U16 RingNo, U16 SlaveIP, I32 Cmd) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [input] I32 Cmd : Set Value

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

Page 185: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

185

7.10.8.2 _mnet_m1_get_command

Description: Get the value of command counter. Syntax: I16_mnet_m1_get_command (U16 RingNo, U16 SlaveIP, I32 *Cmd) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [output] I32 Cmd : Command Value

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

Page 186: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

186

7.10.8.3 _mnet_m1_reset_command

Description: Reset the value of command counter to zero. Syntax: I16_mnet_m1_reset_command (U16 RingNo, U16 SlaveIP) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

Page 187: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

187

7.10.8.4 _mnet_m1_get_position

Description: Get the value of position counter. Syntax: I16_mnet_m1_get_position (U16 RingNo, U16 SlaveIP, I32 *Pos) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [output] I32 Pos : Position Value

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

Page 188: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

188

7.10.8.5 _mnet_m1_set_position

Description: Set the value of position counter. Syntax: I16_mnet_m1_set_position (U16 RingNo, U16 SlaveIP, I32 Pos) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [input] I32 Pos : Set Value

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

Page 189: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

189

7.10.8.6 _mnet_m1_reset_position

Description: Reset the value of position counter to zero. Syntax: I16_mnet_m1_reset_position (U16 RingNo, U16 SlaveIP) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

Page 190: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

190

7.10.8.7 _mnet_m1_set_error_counter

Description: Set the value of error counter. Syntax: I16_mnet_m1_set_error_counter (U16 RingNo, U16 SlaveIP, I32 ErrCnt) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [input] I32 ErrCnt : Set Value

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

Page 191: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

191

7.10.8.8 _mnet_m1_get_error_counter

Description: Get the Value of error Counter. Syntax: I16_mnet_m1_get_error_counter (U16 RingNo, U16 SlaveIP, I32 *ErrCnt) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [output] I32 ErrCnt : Error Counter Value

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

Page 192: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

192

7.10.8.9 _mnet_m1_reset_error_counter

Description: Reset the error counter to zero. Syntax: I16_mnet_m1_reset_error_counter (U16 RingNo, U16 SlaveIP) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

Page 193: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

193

7.10.8.10 _mnet_m1_get_current_speed

Description: Get current speed. Syntax: I16_mnet_m1_get_current_speed (U16 RingNo, U16 SlaveIP, F64 *speed) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [output] F64 speed : Get the current velocity of Axis number

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

Page 194: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

194

7.10.9. Position Compare and Latch

Function name Description _mnet_m1_set_comparator_mode Set general-purposed comparator _mnet_m1_set_comparator_data Set comparator data _mnet_m1_set_trigger_comparator Set trigger comparator _mnet_m1_set_trigger_comparator_data Set trigger comparator value _mnet_m1_get_comparator_data Get current comparator data _mnet_m1_get_latch_data Get latch data _mnet_m1_set_auto_trigger See the function of trigger comparator

Page 195: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

195

7.10.9.1 _mnet_m1_set_comparator_mode

Description: Set general-purposed comparator. Syntax: I16_mnet_m1_set_comparator_mode (U16 RingNo, U16 SlaveIP, I16 CompNo, I16 CmpSrc, I16 CmpMethod, I16 CmpAction) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [input] I16 CompNo : Comparator Number (1~3) [input] I16 CmpSrc : The comparing source counter

[input] I16 CmpMethod : The comparing method

[input] I16 CmpAction : The reacting mode when comparison comes into exist

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

Page 196: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

196

7.10.9.2 _mnet_m1_set_comparator_data

Description: Set the Value of comparator. Syntax: I16_mnet_m1_set_comparator_data (U16 RingNo, U16 SlaveIP, I16 CompNo, F64 Pos) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [input]I16 CompNo : Comparator Number [input] F64 Pos : Compare value

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct. ERR_Comparator_Config : Parameter CmpMethod value setting error

Page 197: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

197

7.10.9.3 _mnet_m1_set_trigger_comparator

Description: Set the function of trigger comparator. Syntax: I16_mnet_m1_set_trigger_comparator (U16 RingNo, U16 SlaveIP, U16 CmpSrc , U16 CmpMethod) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [input] U16 CmpSrc : The comparing source counter

[input] U16 CmpMethod : The comparing method

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct. ERR_Comparator_Config : Parameter CmpMethod value setting error

Page 198: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

198

7.10.9.4 _mnet_m1_set_trigger_comparator_data

Description: Set the value of trigger comparator. Syntax: I16_mnet_m1_set_trigger_comparator_data (U16 RingNo, U16 SlaveIP, F64 Data) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [input] F64 speed : Compare data

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct. ERR_Comparator_Config : Parameter CmpMethod value setting error

Page 199: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

199

7.10.9.5 _mnet_m1_get_comparator_data

Description: Get the value of trigger comparator. Syntax: I16_mnet_m1_get_comparator_data (U16 RingNo, U16 SlaveIP, I16 CompNo, F64 *Pos) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [output] F64 Pos : Setting value

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct. ERR_Comparator_Config : Parameter CmpMethod value setting error

Page 200: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

200

7.10.9.6 _mnet_m1_get_latch_data

Description: Get the data of latch counter. Syntax: I16_mnet_m1_get_latch_data (U16 RingNo, U16 SlaveIP, I16 LatchNo, F64 *Pos) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [input] I16 LatchNo : Latch Counter Number

[output] F64 Pos : Latch value Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

Page 201: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

201

7.10.9.7 _mnet_m1_set_auto_trigger

Description: Set the function of trigger comparator. Syntax: I16_mnet_m1_set_auto_trigger (U16 RingNo, U16 SlaveIP, U16 CmpSrc, U16 CmpMethod, U16 Interval, U16 on_off) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [input] U16 CmpSrc : The comparing source counter

[input] U16 CmpMethod : The comparing method

[input] U16 Interval : Interval of trigger outputRange: 0~32767 [input] U16 on_off : Switch the Auto-Trigger function ON or OFF

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct. ERR_CompareSourceError : The value of setting compare source is error. ERR_ CompareMethodError : The value of setting compare method is error.

ERR_ SetAutoTrigger : To Set Auto Trigger is invalid.

Page 202: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

202

7.10.10. Synchronization

Function name Description _mnet_m1_set_sta_trigger Set the type of STA trigger input _mnet_m1_sync_v_move Accelerate an axis to a constant velocity with trapezoidal profile

and synchronously triggered by STA input signal. _mnet_m1_start_sync_r_move Run a relative moving command and wait for trigger signal STA. _mnet_m1_start_sync_a_move Run an absolute moving command and synchronously triggered

by STA input signal. _mnet_m1_start_sync_tr_line Run a relative linear moving command with T velocity profile via

assigned two axes and synchronously triggered by STA input signal.

_mnet_m1_start_sync_ta_line Run a absolute linear moving command with T-Curve velocity profile via assigned two axes and synchronously triggered by STA input signal.

_mnet_m1_start_sync_sr_line Run a relative linear moving command with S-Curve velocity profile via assigned two axes and synchronously triggered by STA input signal.

_mnet_m1_start_sync_sa_line Run a absolute linear moving command with S-Curve velocity profile via assigned two axes and synchronously triggered by STA input signal.

Page 203: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

203

7.10.10.1 _mnet_m1_set_sta_trigger

Description: Set the type of STA trigger input. Syntax: I16_mnet_m1_set_sta_trigger (U16 RingNo, U16 SlaveIP, U16 TriType) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [input] U16 TriType : Type of STA trigger input

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct. ERR_Invalid_Type : The Type of STA trigger input is not correct

Page 204: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

204

7.10.10.2 _mnet_m1_sync_v_move

Description: Accelerate an axis to a constant velocity with trapezoidal profile and synchronously triggered by STA input signal. Syntax: I16_mnet_m1_sync_v_move (U16 RingNo, U16 SlaveIP, U8 Dir) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [input] U8 Dir : Action direction

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct. NOTE

Figure 7-47: constant velocity with trapezoidal profile

Page 205: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

205

7.10.10.3 _mnet_m1_start_sync_r_move

Description: Run a relative moving command and wait for trigger signal STA. Syntax: I16_mnet_m1_start_sync_r_move (U16 RingNo, U16 SlaveIP, I32 Distance) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [input] I32 Distance : Relative Distance

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct. ERR_Invalid_Operating_Velocity : No Velocity Profile Setting

Page 206: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

206

7.10.10.4 _mnet_m1_start_sync_a_move

Description: Run an absolute moving command and synchronously triggered by STA input signal. Syntax: I16_mnet_m1_start_sync_a_move (U16 RingNo, U16 SlaveIP, I32 Pos) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [input] I32 Pos : Absolute Distance

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct. ERR_Invalid_Operating_Velocity : No velocity profile setting.

Page 207: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

207

7.10.10.5 _mnet_m1_start_sync_tr_line

Description: Run a relative linear moving command with T velocity profile via assigned two axes and synchronously triggered by STA input signal. Syntax: I16_mnet_m1_start_sync_tr_line (U16 RingNo, U16* SlaveIP, I32 DistX, I32 DistY, F64 StrVel, F64 MaxVel, F64 Tacc, F64 Tdec) Argument:

[input] U16 RingNo : Ring Number 0 ~ 1. [input] U16 SlaveIP[2] : Array to put the assigned axes IP. [input] I32 DistX : Distance for first axis to move. [input] I32 DistY : Distance for second axis to move. [input] F64 StrVel : Starting velocity in unit of pulse per second. [input] F64 MaxVel : Maximum velocity in unit of pulse per second. [input] F64 Tacc : Specified acceleration time in unit of second. [input] F64 Tdec : Specified deceleration time in unit of second.

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct. ERR_NotPermitToWorkAtSameAxis : The IP in the array are same ERR_PosOutOfRange : The value of distance is out of range

Page 208: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

208

7.10.10.6 _mnet_m1_start_sync_ta_line

Description: Run a absolute linear moving command with T-Curve velocity profile via assigned two axes and synchronously triggered by STA input signal. Syntax: I16_mnet_m1_start_sync_ta_line (U16 RingNo, U16* SlaveIP, I32 PosX, I32 PosY, F64 StrVel, F64 MaxVel, F64 Tacc, F64 Tdec) Argument:

[input] U16 RingNo : Ring Number 0~ 1. [input] U16 SlaveIP[2] : Array to put the assigned axes IP. [input] I32 PosX : Position for first axis to move. [input] I32 PosY : Position for second axis to move. [input] F64 StrVel : Starting velocity in unit of pulse per second. [input] F64 MaxVel : Maximum velocity in unit of pulse per second. [input] F64 Tacc : Specified acceleration time in unit of second. [input] F64 Tdec : Specified deceleration time in unit of second.

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct. ERR_NotPermitToWorkAtSameAxis : The IP in the array are same ERR_PosOutOfRange : The value of Position is out of range

Page 209: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

209

7.10.10.7 _mnet_m1_start_sync_sr_line

Description: Run a relative linear moving command with S-Curve velocity profile via assigned two axes and synchronously triggered by STA input signal. Syntax: I16_mnet_m1_start_sync_sr_line (U16 RingNo, U16* SlaveIP, I32 DistX, I32 DistY, F64 StrVel, F64 MaxVel, F64 Tacc, F64 Tdec, F64 SVacc, F64 SVdec) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP[2] : Array to put the assigned axes IP [input] I32 DistX : Distance for first axis to move [input] I32 DistY : Distance for second axis to move [input] F64 StrVel : Starting velocity in unit of pulse per second [input] F64 MaxVel : Maximum velocity in unit of pulse per second [input] F64 Tacc : Specified acceleration time in unit of second [input] F64 Tdec : Specified deceleration time in unit of second [input] F64 SVacc : Specified velocity interval in which S-curve acceleration is

performedSVacc < (MaxVel- StrVel)/2 is necessary [input] F64SVdec : Specified velocity interval in which S-curve deceleration is

performedSVacc < (MaxVel- StrVel)/2 is necessary

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct. ERR_NotPermitToWorkAtSameAxis : The IP in the array are same ERR_PosOutOfRange : The value of Position is out of range

Page 210: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

210

7.10.10.8 _mnet_m1_start_sync_sa_line

Description: Run an absolute linear moving command with S-Curve velocity profile via assigned two axes and synchronously triggered by STA input signal. Syntax: I16_mnet_m1_start_sync_sa_line (U16 RingNo, U16* SlaveIP, I32 PosX, I32 PosY, F64 StrVel, F64 MaxVel, F64 Tacc, F64 Tdec, F64 SVacc, F64 SVdec) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP[2] : Array to put the assigned axes IP [input] I32 PosX : Position for first axis to move [input] I32 PosY : Position for second axis to move [input] F64 StrVel : Starting velocity in unit of pulse per second [input] F64 MaxVel : Maximum velocity in unit of pulse per second [input] F64 Tacc : Specified acceleration time in unit of second [input] F64 Tdec : Specified deceleration time in unit of second [input] F64 SVacc : Specified velocity interval in which S-curve acceleration is

performedSVacc < (MaxVel- StrVel)/2 is necessary [input] F64SVdec : Specified velocity interval in which S-curve deceleration is

performedSVacc < (MaxVel- StrVel)/2 is necessary Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct. ERR_NotPermitToWorkAtSameAxis : The IP in the array are same ERR_PosOutOfRange : The value of Position is out of range

Page 211: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

211

7.10.11. Motion Status

Function name Description _mnet_m1_motion_done Return the motion status of Motionnet motion slave.

Page 212: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

212

7.10.11.1 _mnet_m1_motion_done

Description: Return the motion status of Motionnet motion slave. Syntax: I16_mnet_m1_motion_done (U16 RingNo, U16 SlaveIP, U16 *MoSt) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [output] U16 MoSt : Return Value. Motion Status

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

Page 213: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

213

7.10.12. Destination Change

Function name Description _mnet_m1_start_p_change Rewrite the target position when absolute movement _mnet_m1_start_d_change Rewrite the target distance when relative movement

Page 214: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

214

7.10.12.1 _mnet_m1_start_p_change

Description: Rewrite the target position when absolute movement. Syntax: I16 _mnet_m1_start_p_change (U16 RingNo, U16 SlaveIP, I32 NewPos) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [input] I32 NewPos : New position

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.

Page 215: TPM TurboPAC User Manual TurboPAC · TPM TurboPAC User Manual 1 TurboPAC . TPC-6000 User Manual . Version: V1.0 2011J05 . To properly use the product, read this manual thoroughly

TPM TurboPAC User Manual

215

7.10.12.2 _mnet_m1_start_d_change

Description: Rewrite the target distance when absolute movement. Syntax: I16_mnet_m1_start_d_change (U16 RingNo, U16 SlaveIP, I32 NewDist) Argument:

[input] U16 RingNo : Ring Number 0~ 1 [input] U16 SlaveIP : Slave IP 0 ~ 63 [input] I32 NewDist : New distance

Return: ERR_NoError : The API was initialized successfully. ERR_Invalid_Ring : Ring is not correct. ERR_Invalid_Slave : Slave IP is not correct.


Recommended