LMMS MN1278 Manual de usuario Pagina 1

Busca en linea o descarga Manual de usuario para Software LMMS MN1278. LMMS MN1278 User's Manual Manual de usuario

  • Descarga
  • Añadir a mis manuales
  • Imprimir

Indice de contenidos

Pagina 1 - Mint™ version 4

MN1278 05.2001 Mint™ version 4 PC Programming Guide MN1278 Issue 1.2

Pagina 3

Introduction MN1278 05.2001 1 1. Introduction 1 The Mint™ v4 PC Programming Guide details how to call Mint v4 functions and how to communicate w

Pagina 4

Mint v4 PC Programming Guide 2 MN1278 05.2001 1.1 Introduction The PC Developer Libraries allow PC based applications to be written that commun

Pagina 5 - Manual Revision History

Communicating with a Controller MN1278 05.2001 3 2. Communicating with a Controller 2 This chapter covers general communication with Mint contr

Pagina 6

Mint v4 PC Programming Guide 4 MN1278 05.2001 The Mint Interface Library is a common API that allows access to Mint controllers. It can be use

Pagina 7

Communicating with a Controller MN1278 05.2001 5 The main features and uses of DPR are: • Support for the Mint Comms protocol. This is a method

Pagina 8

Mint v4 PC Programming Guide 6 MN1278 05.2001 /* COMMS location uses */#define CONTROL_LOCATION 1#define PARAM_1 2/* Flags for control location

Pagina 9 - Contents

Communicating with a Controller MN1278 05.2001 7 2.5 Interfacing with Mint The Mint command line allows manual execution of Mint keywords. Usin

Pagina 10

Mint v4 PC Programming Guide 8 MN1278 05.2001 The following is a summary of the functions used to access the Mint command line: Function Name

Pagina 11 - 1. Introduction

Using the Library with Various Languages MN1278 05.2001 9 3. Using the Library with Various Languages 3 This chapter details the use various di

Pagina 12 - 1.2 Installation

Mint v4 PC Programming Guide ii MN1278 05.2001

Pagina 13 - MN1278 05.2001

Mint v4 PC Programming Guide 10 MN1278 05.2001 3.1 C++ The Mint Interface Library was written in C++. The source code is provided and can be

Pagina 14 - 2.2 NextMove PC

Using the Library with Various Languages MN1278 05.2001 11 File Controller nmbase.cpp NextMove PC nmstd.cpp NextMove PC precomp.cpp All serial.cp

Pagina 15

Mint v4 PC Programming Guide 12 MN1278 05.2001 Figure 3-1: Visual C++ 6.0 Project Settings (step 5) 6. Add #include “precomp.h” to the top of

Pagina 16 - Mint v4 PC Programming Guide

Using the Library with Various Languages MN1278 05.2001 13 Figure 3-2: Visual C++ 6.0 Project Settings (step 7) 8. Select precomp.cpp in File Vi

Pagina 17 - 2.5 Interfacing with Mint

Mint v4 PC Programming Guide 14 MN1278 05.2001 Figure 3-3: Visual C++ 6.0 Project Settings (step 8) 9. Rebuild the project. Precomp.cpp shou

Pagina 18

Using the Library with Various Languages MN1278 05.2001 15 1. Open Visual C and select ‘ New’ from the ‘File’ menu. Select ‘MFC Appwizard(exe)’

Pagina 19

Mint v4 PC Programming Guide 16 MN1278 05.2001 2. At Step 1 of the wizard, select ‘Dialog based’ and press ‘Finish’. Figure 3-5: Visual C++

Pagina 20 - 3.1 C++

Using the Library with Various Languages MN1278 05.2001 17 4. Select ‘Settings’ from the ‘Project’ menu. Select ‘All configurations’ from the ‘S

Pagina 21

Mint v4 PC Programming Guide 18 MN1278 05.2001 5. Select ‘Precompiled Headers’ in the ‘Category’ drop list. Change ‘stdafx.h’ to ‘precomp.h’ i

Pagina 22

Using the Library with Various Languages MN1278 05.2001 19 6. Select ‘Preprocessor’ from the ‘Category’ drop list. Add ‘.,’ (dot-comma ) follow

Pagina 23

Copyright MN1278 05.2001 iii Copyright Baldor UK Ltd © 2001. All rights reserved. This manual is copyrighted and all rights are reserved. Thi

Pagina 24

Mint v4 PC Programming Guide 20 MN1278 05.2001 8. Right click on ‘precomp.cpp’ in ‘FileView’ and select ‘Settings’. Select ‘All Configuration

Pagina 25

Using the Library with Various Languages MN1278 05.2001 21 10. Select ‘ClassView’. Right click on ‘CVCTutorialDlg’ and select ‘Add Member Functi

Pagina 26

Mint v4 PC Programming Guide 22 MN1278 05.2001 12. Select ‘ClassView’. Right click on ‘CVCTutorialDlg’ and select ‘Add Member Variable’. Copy

Pagina 27

Using the Library with Various Languages MN1278 05.2001 23 14. The code should now compile, but not link. The following files should be added t

Pagina 28

Mint v4 PC Programming Guide 24 MN1278 05.2001 /*------------------------------------------------*//* Toggle it. *//*--------------------------

Pagina 29

Using the Library with Various Languages MN1278 05.2001 25 3.2.2 The ActiveX Control and Error Handling. The ActiveX control produces COM (Activ

Pagina 30

Mint v4 PC Programming Guide 26 MN1278 05.2001 When using the Active Control, warning messages such as the dialog above ( taken from a Visual

Pagina 31

Using the Library with Various Languages MN1278 05.2001 27 AfxOleGetMessageFilter()->EnableNotRespondingDialog( FALSE );The file will have to

Pagina 32

Mint v4 PC Programming Guide 28 MN1278 05.2001 Figure 3-12: Selection of Mint Component 3. Find ‘Baldor Motion Library XXXX for Mint Build XX

Pagina 33

Using the Library with Various Languages MN1278 05.2001 29 6. In the Form_Load module we will tell the COM server which type of controller we wan

Pagina 34 - 3.1.5 RS485 Networks

Mint v4 PC Programming Guide iv MN1278 05.2001

Pagina 35

Mint v4 PC Programming Guide 30 MN1278 05.2001 Figure 3-13: Example Dialog Box 9. Add the following code to trap this (or any other error). P

Pagina 36

Using the Library with Various Languages MN1278 05.2001 31 3.4 Borland Delphi 5.0 NOTE: Before any programs, including the examples, can be buil

Pagina 37 - 3.3 Visual Basic 6

Mint v4 PC Programming Guide 32 MN1278 05.2001 Figure 3-14: Delphi – Installing Mint Component 3. Select the ActiveX tab on the toolbar. The

Pagina 38

Using the Library with Various Languages MN1278 05.2001 33 - MintDriveprocedure TForm1.FormCreate(Sender: TObject);const NodeNumber = 10;const Co

Pagina 39

Mint v4 PC Programming Guide 34 MN1278 05.2001 6. This code should now run. To add an error handler, change the first parameter to setDriveEn

Pagina 40

PC Based Motion Control MN1278 05.2001 35 4. PC Based Motion Control 4 This chapter covers creating motion applications on the host PC.

Pagina 41 - 3.4 Borland Delphi 5.0

Mint v4 PC Programming Guide 36 MN1278 05.2001 The Mint Interface Library provides all of the functionality that is available in the Mint progr

Pagina 42

PC Based Motion Control MN1278 05.2001 37 Functions called from the host fall into two categories. Those functions that replicate Mint keywords

Pagina 43

Mint v4 PC Programming Guide 38 MN1278 05.2001 4.2 Events and Interrupt Control on NextMove PCI The NextMove PCI controller requires a device

Pagina 44

PC Based Motion Control MN1278 05.2001 39 Priority Event 6 Timer 7 Digital input 8 Comms 9 DPR event 10 Move Buffer Low 11 Axis Idle Note: The

Pagina 45 - 4. PC Based Motion Control

Manual Revision History MN1278 05.2001 v Manual Revision History Issue Date BOCL Reference Comments 1.0 Apr 99 UM00545-000 Raised from MN0024

Pagina 46

Mint v4 PC Programming Guide 40 MN1278 05.2001 DPR The install function for DPR events, it accepts a pointer to a function, if this is a NULL p

Pagina 47 - PC Based Motion Control

PC Based Motion Control MN1278 05.2001 41 Stop Switch The install function for stop switch events, it accepts a pointer to a function, if this is

Pagina 48

Mint v4 PC Programming Guide 42 MN1278 05.2001 // timer event handlervoid myTimerEventHandler ( void *p, __int16 nTimerEventNumber ){cout <&

Pagina 49

PC Based Motion Control MN1278 05.2001 43 4.2.3 Interrupting the Host from a Mint Program ( DPR Events ) Events can be manually generated in bot

Pagina 50

Mint v4 PC Programming Guide 44 MN1278 05.2001 installErrorEventHandlerinstallFastInEventHandlerinstallInputEventHandlerinstallMoveBufferLowEve

Pagina 51

NextMove PCI and Non-Micorsoft Operating Systems MN1278 05.2001 45 5. NextMove PCI and Non-Microsoft Operating Systems 5 This chapter details h

Pagina 52

Mint v4 PC Programming Guide 46 MN1278 05.2001 This Chapter covers implementing an interface to NextMove PCI in under an operating system other

Pagina 53

NextMove PCI and Non-Micorsoft Operating Systems MN1278 05.2001 47 5.3.1 The CMySimplePCI Example. The CMySimplePCI example overloads CSimplePCI

Pagina 54

Mint v4 PC Programming Guide 48 MN1278 05.2001 ……/*================================================================*//* END : Replace this *//*

Pagina 55 - Systems

NextMove PCI and Non-Micorsoft Operating Systems MN1278 05.2001 49 doDeviceClose This function releases any resources which had been taken by the

Pagina 56 - 5.3 The CSimplePCI class

Mint v4 PC Programming Guide vi MN1278 05.2001

Pagina 57

Mint v4 PC Programming Guide 50 MN1278 05.2001 The following files may also be added: • host_def.cpp : if the function getErrorString is being

Pagina 58 - Constructor

Appendix 1: DPR Map MN1278 05.2001 51 6. Appendix 1: DPR Map Each area of the address map is described below. Where an address is shown, that i

Pagina 59

Mint v4 PC Programming Guide 52 MN1278 05.2001 Address Use Read Only0x600 0x5FF 0x5FF ICM expansion  0x500 0x500 0x4FF 0x4FF R

Pagina 60

Appendix 1: DPR Map MN1278 05.2001 53 Address Use Read Only0x130 0x130 0x12F 0x12F IO Data  0x110 0x110 0x10F 0x10F Axis 7 Data  0x0F0

Pagina 61 - 6. Appendix 1: DPR Map

Mint v4 PC Programming Guide 54 MN1278 05.2001 Address Use Read Only 0x002Axis Mix  0x001DPR Status Register 0x000 0x000DPR Control Regist

Pagina 62

Appendix 1: DPR Map MN1278 05.2001 55 Address Use Read Only 0x0CF Axis 5 Data  0x0B0 0x0AF Axis 4 Data  0x090 0x08F Axis 3 Data

Pagina 63 - Appendix 1: DPR Map

Mint v4 PC Programming Guide 56 MN1278 05.2001 6.3 Status and Control Registers Address Use Symbolic Constant Read Only0x000DPR Control Reg

Pagina 64 - 6.2 NextMove PC DPR Map

Appendix 1: DPR Map MN1278 05.2001 57 DPR Control Register – NextMove PC: Bit Meaning Symbolic Constant 0 Lock DPR contents btLOCK 1 Lock axi

Pagina 65

Mint v4 PC Programming Guide 58 MN1278 05.2001 MML Build ID: The build identifier of the Mint Motion Library running on NextMove. Each version

Pagina 66

Appendix 1: DPR Map MN1278 05.2001 59 NextMove PCI: Axis Configurations gives the current configuration of each axis in 4 bits. 31 28 27

Pagina 67

Contents MN1278 05.2001 vii Introduction ...1 1.1 Introduction...

Pagina 68

Mint v4 PC Programming Guide 60 MN1278 05.2001 Offset Use Symbolic Constant Data Size0x00Measured Position roPOSITION float 0x01Reserved

Pagina 69 - 6.4 Axis Data

Appendix 1: DPR Map MN1278 05.2001 61 6.5 I/O Data The I/O data area is as follows: Address Use Symbolic Constant Data Size 0x110Analog 0 roAN

Pagina 70

Mint v4 PC Programming Guide 62 MN1278 05.2001 The layout of the section is compatible to the current layout on NextMove PC. The locations use

Pagina 71 - 6.5 I/O Data

Appendix 1: DPR Map MN1278 05.2001 63 6.8 Pseudo Serial Interface The serial interface works by implementing a 64 word circular buffer within DP

Pagina 72 - 6.7 Immediate Command Mode

Mint v4 PC Programming Guide 64 MN1278 05.2001 6.9 Special Functions Registers Address Use Symbolic Constant 0x3F8ICM Handshaking roICM_HAND

Pagina 73 - 6.8 Pseudo Serial Interface

Appendix 1: DPR Map MN1278 05.2001 65 Functionality Code Register (3FC) This register describes the capabilities of the software running on NextM

Pagina 74

Mint v4 PC Programming Guide 66 MN1278 05.2001 6.10 Data Synchronization It may be desirable to prevent NextMove PC and PCI from updating the

Pagina 75

Appendix 2: Timings MN1278 05.2001 67 7. Appendix 2: Timings These timings show the time taken to call Immediate Command Mode (ICM) functions fro

Pagina 76 - 6.10 Data Synchronization

Mint v4 PC Programming Guide 68 MN1278 05.2001

Pagina 77 - 7. Appendix 2: Timings

Appendix 3: Symbolic Constants MN1278 05.2001 69 8. Appendix 3: Symbolic Constants The library functions can return error codes or can be passed

Pagina 78

Mint v4 PC Programming Guide viii MN1278 05.2001 3.3.2 A Visual Basic Tutorial. ...

Pagina 79

Mint v4 PC Programming Guide 70 MN1278 05.2001 Value Symbolic Constant Meaning disabled 1025 erINVALID_HANDLE The handle had not been correctl

Pagina 80

Appendix 3: Symbolic Constants MN1278 05.2001 71 Value Symbolic Constant Meaning 1054 erCONTROLLER_REPORTS_ERROR The controller detected an erro

Pagina 81

Mint v4 PC Programming Guide 72 MN1278 05.2001 Value Symbolic Constant Meaning 1093 erICM_RX_SIZE_ERROR Error in ICM protocol 1094 erICM_PROCE

Pagina 82

Appendix 3: Symbolic Constants MN1278 05.2001 73 Value Symbolic Constant Meaning 1119 erSQ_INVALID_OUTPUT_FILE_STRING Squash : Name of file to s

Pagina 83

Mint v4 PC Programming Guide 74 MN1278 05.2001 updateFirmware Codes (nBootDevice Parameter): Value Symbolic Constant Meaning 0 tmFLASH Load pr

Pagina 84

Appendix 3: Symbolic Constants MN1278 05.2001 75 Value Symbolic Constant Meaning 4 updateDOWNLOADING Downloading the firmware: use the percentag

Pagina 85

Mint v4 PC Programming Guide 76 MN1278 05.2001

Pagina 86

Bibliography MN1278 05.2001 77 9. Bibliography 6 Bibliography [1] Mint v4 Programming Guide [MN1262] [2] Mint v4 Advanced Programming Gui

Pagina 87 - 9. Bibliography

Mint v4 PC Programming Guide 78 MN1278 05.2001

Pagina 88

Contents MN1278 05.2001 ix 6.10 Data Synchronisation....................66 Appendix 2:

Comentarios a estos manuales

Sin comentarios