LMMS MN1278 Bedienungsanleitung Seite 1

Stöbern Sie online oder laden Sie Bedienungsanleitung nach Software LMMS MN1278 herunter. LMMS MN1278 User's Manual Benutzerhandbuch

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken

Inhaltsverzeichnis

Seite 1 - Mint™ version 4

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

Seite 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

Seite 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

Seite 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

Seite 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

Seite 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

Seite 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

Seite 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

Seite 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

Seite 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

Seite 12 - 1.2 Installation

Mint v4 PC Programming Guide ii MN1278 05.2001

Seite 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

Seite 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

Seite 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

Seite 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

Seite 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

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

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

Seite 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

Seite 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

Seite 22

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

Seite 23

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

Seite 24

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

Seite 25

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

Seite 26

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

Seite 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

Seite 28

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

Seite 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

Seite 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

Seite 31

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

Seite 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

Seite 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

Seite 34 - 3.1.5 RS485 Networks

Mint v4 PC Programming Guide iv MN1278 05.2001

Seite 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

Seite 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

Seite 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

Seite 38

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

Seite 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

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

Seite 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

Seite 42

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

Seite 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

Seite 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

Seite 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

Seite 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

Seite 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

Seite 48

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

Seite 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

Seite 50

Mint v4 PC Programming Guide 44 MN1278 05.2001 installErrorEventHandlerinstallFastInEventHandlerinstallInputEventHandlerinstallMoveBufferLowEve

Seite 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

Seite 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

Seite 53

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

Seite 54

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

Seite 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

Seite 56 - 5.3 The CSimplePCI class

Mint v4 PC Programming Guide vi MN1278 05.2001

Seite 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

Seite 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

Seite 59

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

Seite 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

Seite 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

Seite 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

Seite 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

Seite 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

Seite 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

Seite 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

Seite 67

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

Seite 68

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

Seite 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

Seite 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

Seite 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

Seite 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

Seite 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

Seite 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

Seite 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

Seite 76 - 6.10 Data Synchronization

Mint v4 PC Programming Guide 68 MN1278 05.2001

Seite 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

Seite 78

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

Seite 79

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

Seite 80

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

Seite 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

Seite 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

Seite 83

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

Seite 84

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

Seite 85

Mint v4 PC Programming Guide 76 MN1278 05.2001

Seite 86

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

Seite 87 - 9. Bibliography

Mint v4 PC Programming Guide 78 MN1278 05.2001

Seite 88

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

Kommentare zu diesen Handbüchern

Keine Kommentare