LMMS MN1278 Instrukcja Użytkownika Strona 1

Przeglądaj online lub pobierz Instrukcja Użytkownika dla Oprogramowanie LMMS MN1278. LMMS MN1278 User's Manual Instrukcja obsługi

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj

Podsumowanie treści

Strona 1 - Mint™ version 4

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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 12 - 1.2 Installation

Mint v4 PC Programming Guide ii MN1278 05.2001

Strona 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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 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)’

Strona 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++

Strona 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

Strona 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

Strona 22

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

Strona 23

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

Strona 24

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

Strona 25

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

Strona 26

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

Strona 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

Strona 28

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

Strona 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

Strona 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

Strona 31

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

Strona 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

Strona 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

Strona 34 - 3.1.5 RS485 Networks

Mint v4 PC Programming Guide iv MN1278 05.2001

Strona 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

Strona 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

Strona 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

Strona 38

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

Strona 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

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

Strona 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

Strona 42

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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 48

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

Strona 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

Strona 50

Mint v4 PC Programming Guide 44 MN1278 05.2001 installErrorEventHandlerinstallFastInEventHandlerinstallInputEventHandlerinstallMoveBufferLowEve

Strona 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

Strona 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

Strona 53

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

Strona 54

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

Strona 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

Strona 56 - 5.3 The CSimplePCI class

Mint v4 PC Programming Guide vi MN1278 05.2001

Strona 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

Strona 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

Strona 59

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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 67

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

Strona 68

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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 76 - 6.10 Data Synchronization

Mint v4 PC Programming Guide 68 MN1278 05.2001

Strona 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

Strona 78

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

Strona 79

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

Strona 80

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

Strona 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

Strona 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

Strona 83

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

Strona 84

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

Strona 85

Mint v4 PC Programming Guide 76 MN1278 05.2001

Strona 86

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

Strona 87 - 9. Bibliography

Mint v4 PC Programming Guide 78 MN1278 05.2001

Strona 88

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

Komentarze do niniejszej Instrukcji

Brak uwag