Sensoray 2600 User Manual

Page 2

Advertising
background image

Sensoray 2600 Programming Guide

i

Table of Contents

Table of Contents

Introduction

1.1

Scope ............................................................. 1

1.2

Description ................................................... 1

1.2.1

Block Diagram ................................................. 1

Installation

2.1

Executable Software Components ............. 2

2.1.1

Windows .......................................................... 2

2.1.2

Linux ................................................................ 2

2.1.3

Other ................................................................ 2

2.2

Application SDK Components ................... 2

2.2.1

Windows .......................................................... 2

2.2.2

Linux ................................................................ 2

Fundamentals of Usage

3.1

Board Addressing ........................................ 3

3.1.1

MM Handles .................................................... 3

3.1.2

IP Address ........................................................ 3

3.1.2.1 Setting the MM’s IP Address.................... 3

3.2

Thread-Safety .............................................. 3

3.3

Programming Examples ............................. 3

3.3.1

Data Types ....................................................... 4

3.4

Library Linking........................................... 4

3.4.1

Windows .......................................................... 4

3.4.2

Linux ................................................................ 4

3.5

Required Function Calls ............................. 4

Initialization and Status Functions

4.1

Overview ...................................................... 5

4.2

Middleware Initialization and Shutdown . 5

4.2.1

S26_DriverOpen() ........................................... 5

4.2.2

S26_DriverClose() ........................................... 5

4.2.3

S26_DriverVersion() ....................................... 6

4.3

MM Initialization and Shutdown............... 6

4.3.1

S26_BoardOpen() ............................................ 6

4.3.2

S26_BoardClose()............................................ 7

4.4

Status and Control ...................................... 7

4.4.1

S26_ResetNetwork()........................................ 7

4.4.2

S26_ResetIom() ............................................... 8

4.4.3

S26_RegisterAllIoms() .................................... 8

4.4.4

Programming Examples................................... 9

4.4.4.1 Windows ................................................... 9

4.4.4.2 Linux ....................................................... 10

Transactions

5.1

Overview .....................................................12

5.2

Gateway Transaction Process ...................12

5.2.1

Thread Safety................................................. 13

5.3

Transaction Buffers ...................................13

5.4

Blocking Behavior ......................................13

5.5

Errors ..........................................................13

5.5.1

Gateway Error Propagation ........................... 15

5.5.2

Scope of Errors .............................................. 15

5.5.3

Error Handling ............................................... 15

5.6

Time-outs ....................................................15

5.7

Retries .........................................................16

Gateway Transaction Control

6.1

Overview .....................................................17

6.2

Transaction Control Functions .................17

6.2.1

S26_SchedOpen() .......................................... 17

6.2.2

S26_SchedExecute() ...................................... 17

6.2.3

S26_SchedExecuteStart() .............................. 18

6.2.4

S26_SchedExecuteIsResponded() ................. 19

6.2.5

S26_SchedExecuteWait() .............................. 19

6.2.6

S26_SchedExecuteFinish() ............................ 19

Gateway Action Scheduling

7.1

Overview .....................................................21

7.1.1

Performance Benchmarks .............................. 21

7.1.2

Returned IOM Status ..................................... 21

7.1.3

Argument Lifetime ........................................ 21

7.1.3.1 Outgoing Data ......................................... 21

7.1.3.2 Incoming Data......................................... 21

7.2

Common IOM Actions...............................22

7.2.1

Type-Specific Errors...................................... 22

7.2.2

S26_Sched2600_ClearStatus() ...................... 22

7.2.3

S26_Sched2600_GetAddress() ...................... 22

7.2.4

S26_Sched2600_GetFirmwareVersion()....... 23

7.2.5

S26_Sched2600_IomGetProductID() ............ 23

7.2.6

S26_Sched2600_Nop() .................................. 24

Advertising