Analytica GmbH AnaGate CAN duo Manuel d'utilisateur

Naviguer en ligne ou télécharger Manuel d'utilisateur pour Passerelles/contrôleurs Analytica GmbH AnaGate CAN duo. Analytica GmbH AnaGate CAN duo User manual Manuel d'utilisatio

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 83
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 0
AnaGate Programmer's Manual
Analytica GmbH
A. Schmidt, Analytica GmbH
S. Welisch, Analytica GmbH
Vue de la page 0
1 2 3 4 5 6 ... 82 83

Résumé du contenu

Page 1 - Analytica GmbH

AnaGate Programmer's ManualAnalytica GmbHA. Schmidt, Analytica GmbHS. Welisch, Analytica GmbH

Page 2

3 © 2007-2010 Analytica GmbHChapter 1. The Programming interfaceof AnaGate devicesThe AnaGate product line consist of several hardware devices, which

Page 3 - Table of Contents

The Programming interfaceof AnaGate devices4 © 2007-2010 Analytica GmbHTipIt is possible to extend individually the newer device models with embedded

Page 4

5 © 2007-2010 Analytica GmbHChapter 2. Notes concerning thecommunication protocol TCPAccess to the different models of the AnaGate product line is al

Page 5 - List of Figures

Notes concerning thecommunication protocol TCP6 © 2007-2010 Analytica GmbHTo amend this problematic nature TCP provides an internal keep alive mechani

Page 6 - List of Tables

7 © 2007-2010 Analytica GmbHChapter 3. Common function reference

Page 7 - Introduction

Common function reference8 © 2007-2010 Analytica GmbHDLLInfoDLLInfo — Determines the current version information of the AnaGate DLL.Syntax#include <

Page 8 - Part I. AnaGate API

9 © 2007-2010 Analytica GmbHChapter 4. CAN API referenceThe CAN API can be used with all CAN gateway models of the AnaGate series. The program

Page 9

CAN API reference10 © 2007-2010 Analytica GmbHCANOpenDevice, CANOpenDeviceExCANOpenDevice, CANOpenDeviceEx — Opens an network connection (TCP or UDP)

Page 10

CAN API reference11 © 2007-2010 Analytica GmbHReturn valueReturns Null if successful, or an error value otherwise (Appendix A, Return Codes).Descript

Page 11

CAN API reference12 © 2007-2010 Analytica GmbHCANCloseDeviceCANCloseDevice — Closes an open network connection to an AnaGate CAN device.Syntax#include

Page 12 - Important

AnaGate Programmer's ManualAnalytica GmbHby A. Schmidt and S. WelischThis document was generated with DocBook at 2010-09-09 17:22:53.Hilfe-Datei

Page 13

CAN API reference13 © 2007-2010 Analytica GmbHCANSetGlobalsCANSetGlobals — Sets the global settings, which are to be used on the CAN busSyntax#include

Page 14 - 7 © 2007-2010 Analytica GmbH

CAN API reference14 © 2007-2010 Analytica GmbHbTimeStampOn Use time stamp mode (TRUE= yes, FALSE= no). This setting is not supported by allAnaGate CAN

Page 15 - Return value

CAN API reference15 © 2007-2010 Analytica GmbHCANGetGlobalsCANGetGlobals — Returns the currently used global settings on the CAN bus.Syntax#include &l

Page 16 - Chapter 4. CAN API reference

CAN API reference16 © 2007-2010 Analytica GmbHRemarksThe settings of the integrated CAN bus termination, the high speed mode and the time stamp are no

Page 17

CAN API reference17 © 2007-2010 Analytica GmbHCANSetFilterCANSetFilter — Sets the current filter settings for the connection.Syntax#include <AnaGat

Page 18 - See also

CAN API reference18 © 2007-2010 Analytica GmbHCANGetFilterCANGetFilter — Returns the current filter settings for the connection.Syntax#include <Ana

Page 19 - CANCloseDevice

CAN API reference19 © 2007-2010 Analytica GmbHCANSetTimeCANSetTime — Sets the current system time on the AnaGate device.Syntax#include <AnaGateDllC

Page 20 - CANSetGlobals

CAN API reference20 © 2007-2010 Analytica GmbHCANWrite, CANWriteExCANWrite, CANWriteEx — Send a CAN telegram to the CAN bus via the AnaGate device.Syn

Page 21

CAN API reference21 © 2007-2010 Analytica GmbHSee the following example for sending a data telegram to the connected CAN bus.#include <AnaGateCANDl

Page 22 - CANGetGlobals

CAN API reference22 © 2007-2010 Analytica GmbHCANSetCallback, CANSetCallbackExCANSetCallback, CANSetCallbackEx — Defines an asynchronous callback func

Page 23

iii © 2007-2010 Analytica GmbHTable of ContentsIntroduction ...

Page 24 - CANSetFilter

CAN API reference23 © 2007-2010 Analytica GmbHvoid WINAPI MyCallbackEx(int nIdentifier, const char * pcBuffer, int nBufferLen, int nFlags,

Page 25 - CANGetFilter

CAN API reference24 © 2007-2010 Analytica GmbHCANReadDigitalCANReadDigital — Reads the current values of digital input and output registers of the Ana

Page 26 - CANSetTime

CAN API reference25 © 2007-2010 Analytica GmbH}See alsoCANWriteDigital

Page 27 - CANWrite, CANWriteEx

CAN API reference26 © 2007-2010 Analytica GmbHCANWriteDigitalCANWriteDigital — Writes a new value to the digital output register of the AnaGate device

Page 28

CAN API reference27 © 2007-2010 Analytica GmbHCANRestartCANRestart — Restarts a AnaGate CAN device.Syntax#include <AnaGateDllCan.h>int CANRestar

Page 29

CAN API reference28 © 2007-2010 Analytica GmbHCANDeviceConnectStateCANDeviceConnectState — Retrieves the current network connection state of

Page 30

CAN API reference29 © 2007-2010 Analytica GmbHCANStartAliveCANStartAlive — Starts the ALIVE mechanism, which checks periodically the state of th

Page 31 - CANReadDigital

CAN API reference30 © 2007-2010 Analytica GmbHCANErrorMessageCANErrorMessage — Returns a description of the given error code as a text string.Syntax#i

Page 32

31 © 2007-2010 Analytica GmbHChapter 5. SPI API referenceThe Serial Peripheral Interface (SPI) is a synchroneous data link standard named by Motorola

Page 33 - CANWriteDigital

SPI API reference32 © 2007-2010 Analytica GmbHSPIOpenDeviceSPIOpenDevice — Opens a network connection to an AnaGate SPI device.Syntax#include <AnaG

Page 34 - CANRestart

AnaGate Programmer's Manualiv © 2007-2010 Analytica GmbHBibliography ...

Page 35 - CANDeviceConnectState

SPI API reference33 © 2007-2010 Analytica GmbHSee alsoSPICloseDevice

Page 36 - CANStartAlive

SPI API reference34 © 2007-2010 Analytica GmbHSPICloseDeviceSPICloseDevice — Closes an open network connection to an AnaGate SPI device.Syntax#include

Page 37 - CANErrorMessage

SPI API reference35 © 2007-2010 Analytica GmbHSPISetGlobalsSPISetGlobals — Sets the global settings, which are to be used on the AnaGate SPI.Syntax#in

Page 38 - Chapter 5. SPI API reference

SPI API reference36 © 2007-2010 Analytica GmbHReturn valueReturns Null if successful, or an error value otherwise (Appendix A, Return Codes).Descript

Page 39 - SPIOpenDevice

SPI API reference37 © 2007-2010 Analytica GmbHSPIGetGlobalsSPIGetGlobals — Returns the currently used global settings of the AnaGate SPI.Syntax#includ

Page 40

SPI API reference38 © 2007-2010 Analytica GmbHSee alsoSPISetGlobals

Page 41 - SPICloseDevice

SPI API reference39 © 2007-2010 Analytica GmbHSPIDataReqSPIDataReq — Writes and reads data to/from SPI bus.Syntax#include <AnaGateDllSPI.h>int S

Page 42 - SPISetGlobals

SPI API reference40 © 2007-2010 Analytica GmbH nRC = SPIDataReq( hHandle, cBufWrite, 1, cBufReceive, 5 ); // send 2 byte and receive 1 by

Page 43

SPI API reference41 © 2007-2010 Analytica GmbHSPIReadDigitalSPIReadDigital — Reads the current values of digital input and output registers of the Ana

Page 44 - SPIGetGlobals

SPI API reference42 © 2007-2010 Analytica GmbH}See alsoSPIWriteDigital

Page 45

v © 2007-2010 Analytica GmbHList of Figures7.1. Input form of SPI example (VB6) ...

Page 46 - SPIDataReq

SPI API reference43 © 2007-2010 Analytica GmbHSPIWriteDigitalSPIWriteDigital — Write a new value to the digital output register of the AnaGate device.

Page 47

SPI API reference44 © 2007-2010 Analytica GmbHSPIErrorMessageSPIErrorMessage — Returns a description of the given error code as a text string.Syntax#i

Page 48 - SPIReadDigital

45 © 2007-2010 Analytica GmbHChapter 6. I2C API referencePhilips Semiconductors (now NXP Semiconductors) has developed a simple bidirectional 2-wire

Page 49

I2C API reference46 © 2007-2010 Analytica GmbHI2COpenDeviceI2COpenDevice — Opens a network connection to an AnaGate I2C or an AnaGate Uni

Page 50 - SPIWriteDigital

I2C API reference47 © 2007-2010 Analytica GmbHint main() { int hHandle; int nRC = I2COpenDevice(&hHandle, 100000, "192.168.0.254",

Page 51 - SPIErrorMessage

I2C API reference48 © 2007-2010 Analytica GmbHI2CCloseDeviceI2CCloseDevice — Closes an open network connection to an AnaGate I2C device.Syntax#include

Page 52 - Chapter 6. I2C API reference

I2C API reference49 © 2007-2010 Analytica GmbHI2CResetI2CReset — Resets the I2C Controller in an AnaGate I2C device.Syntax#include <AnaGateDllI2C.h

Page 53 - I2COpenDevice

I2C API reference50 © 2007-2010 Analytica GmbHI2CReadI2CRead — Reads data from an I2C partner.Syntax#include <AnaGateDllI2C.h>int I2CRead(int

Page 54

I2C API reference51 © 2007-2010 Analytica GmbHI2CWriteI2CWrite — Writes data to an I2C partner.Syntax#include <AnaGateDllI2C.h>int I2CWrite(int

Page 55 - I2CCloseDevice

I2C API reference52 © 2007-2010 Analytica GmbHI2CSequenceI2CSequence — This command is used to write a sequence of write and read commands to an I2C d

Page 56 - I2CReset

vi © 2007-2010 Analytica GmbHList of Tables1.1. Library files for Windows ...

Page 57

I2C API reference53 © 2007-2010 Analytica GmbHpnByteNumberLastError Number of byte in the pcWriteBuffer buffer, which raises an error.Return valueRetu

Page 58 - I2CWrite

I2C API reference54 © 2007-2010 Analytica GmbHI2CReadDigitalI2CReadDigital — Reads the current values of digital input and output registers of the Ana

Page 59 - I2CSequence

I2C API reference55 © 2007-2010 Analytica GmbH}See alsoI2CWriteDigital

Page 60

I2C API reference56 © 2007-2010 Analytica GmbHI2CWriteDigitalI2CWriteDigital — Writes a new value to the digital output register of the AnaGate device

Page 61 - I2CReadDigital

I2C API reference57 © 2007-2010 Analytica GmbHI2CErrorMessageI2CErrorMessage — Returns a description of the given error code as a text string.Syntax#i

Page 62

I2C API reference58 © 2007-2010 Analytica GmbH6.1. Programming I2C EEPROMThe AnaGate I2C is very well suited for programming serial I2C EEPROM.

Page 63 - I2CWriteDigital

I2C API reference59 © 2007-2010 Analytica GmbHI2CReadEEPROMI2CReadEEPROM — Reads data from an EEPROM on the I2C bus.Syntax#include <AnaGateDllI2C.h

Page 64 - I2CErrorMessage

I2C API reference60 © 2007-2010 Analytica GmbHDescriptionThe I2CReadEEPROM function reads data from an I2C EEPROM.Of course all access to the memory o

Page 65 - 6.1. Programming I2C EEPROM

I2C API reference61 © 2007-2010 Analytica GmbHI2CWriteEEPROMI2CWriteEEPROM — Writes data to an I2C EEPROM.Syntax#include <AnaGateDllI2C.h>int I

Page 66 - I2CReadEEPROM

I2C API reference62 © 2007-2010 Analytica GmbHDescriptionThe I2CWriteEEPROM function writes data to an I2C EEPROM.Of course all access to the memory o

Page 67

vii © 2007-2010 Analytica GmbHIntroductionThe AnaGate Programmer's Manual includes the exact description of the programming interfaces to allmode

Page 68 - I2CWriteEEPROM

63 © 2007-2010 Analytica GmbHChapter 7. Programming examples7.1. Programming language C/C++The AnaGate programming API can be used on Windows system

Page 69

Programming examples64 © 2007-2010 Analytica GmbH7.2. Programming language Visual Basic 6As already described in the previous chapters, the libraries

Page 70 - Windows operating systems

Programming examples65 © 2007-2010 Analytica GmbHDialog fieldsNetwork address Network address of the AnaGate SPI.Check address Establishs a connection

Page 71 - 7.2.1.1. User interface

Programming examples66 © 2007-2010 Analytica GmbH1A call to SPIOpenDevice establishes a network connection to the device. If the function fails, atext

Page 72 - Dialog fields

Programming examples67 © 2007-2010 Analytica GmbH End If Me.lblDeviceInfo.Caption = GetAnagateInfo(hHandle) nBufferWriteLen =

Page 73

Programming examples68 © 2007-2010 Analytica GmbH Console.Out.Write( ",Data=" ) For I As Integer = 0 To BufferLen - 1 Console.Out.Write

Page 74

69 © 2007-2010 Analytica GmbHAppendix A. Return CodesAPI return codesFollowed a list of the return values of the API functions. This valu

Page 75 - 68 © 2007-2010 Analytica GmbH

Return Codes70 © 2007-2010 Analytica GmbHTable A.4. Return values for AnaGate RenesasValue Name Description0x000920 ERR_RENESAS_TIMEOUT Renesas timeo

Page 76 - Appendix A. Return Codes

71 © 2007-2010 Analytica GmbHAppendix B. I2C slave address formatsA standard I2C address is the first byte sent be the I2C master, whereas only the f

Page 77

I2C slave address formats72 © 2007-2010 Analytica GmbHDevice Type Identifier Chip Enable 1 2R/Wb7 b6 b5 b4 b3 b2 b1 b0EEPROM-MemoryM24C08 1 0 1 0 E2 A

Page 79

73 © 2007-2010 Analytica GmbHAppendix C. FAQ - Frequent askedquestionsHere is a list of frequently asked questions.C.1. Common questionsQ:No LAN conn

Page 80 - C.1. Common questions

FAQ - Frequent asked questions74 © 2007-2010 Analytica GmbHunsigned char CalcCRC( char * pBuffer, int nBufferLength ){ int i; unsigned char nCRC =

Page 81 - 74 © 2007-2010 Analytica GmbH

75 © 2007-2010 Analytica GmbHAppendix D. Technical supportThe AnaGate hardware series and all existing programming interfaces are developed and suppo

Page 82 - Internet

76 © 2007-2010 Analytica GmbHBibliographyBooksOther publications[NXP-I2C] NXP Semiconductors. Copyright © 2007 NXP Semiconductors. UM10204. I2C-bus sp

Page 83 - Bibliography

2 © 2007-2010 Analytica GmbHTable of Contents1. The Programming interface of AnaGate devices ...............

Commentaires sur ces manuels

Pas de commentaire