Tews Technologies TPMC500-SW-42 User Manual

Vxworks device driver 32 channel 12 bit adc

Advertisement

Quick Links

The Embedded I/O Company
TPMC500-SW-42
TEWS TECHNOLOGIES GmbH
Am Bahnhof 7
e-mail: info@tews.com
VxWorks Device Driver
32 Channel 12 Bit ADC
Version 2.0.x
User Manual
Issue 2.0.0
October 2004
25469 Halstenbek / Germany
www.tews.com
TEWS TECHNOLOGIES LLC
1 E. Liberty Street, Sixth Floor
Phone: +1 (775) 686 6077
e-mail: usasales@tews.com
Reno, Nevada 89504 / USA
Fax: +1 (775) 686 6024
www.tews.com

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the TPMC500-SW-42 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Tews Technologies TPMC500-SW-42

  • Page 1 VxWorks Device Driver 32 Channel 12 Bit ADC Version 2.0.x User Manual Issue 2.0.0 October 2004 TEWS TECHNOLOGIES GmbH TEWS TECHNOLOGIES LLC Am Bahnhof 7 25469 Halstenbek / Germany 1 E. Liberty Street, Sixth Floor Reno, Nevada 89504 / USA...
  • Page 2 However TEWS TECHNOLOGIES GmbH reserves the right to change the product described in this document at any time without notice. TEWS TECHNOLOGIES GmbH is not liable for any damage arising out of the application or use of the device described herein.
  • Page 3: Table Of Contents

    4.3 read() ..............................13 4.4 ioctl() ..............................15 4.4.1 FIOSTARTSEQ Setup and start the sequencer ..............16 4.4.2 FIOSTOPSEQ Stop the sequencer ...................16 4.4.3 ioctl() example ........................17 APPENDIX........................ 19 5.1 Predefined Symbols........................19 5.2 Error Codes ...........................19 TPMC500-SW-42 - VxWorks Device Driver Page 3 of 19...
  • Page 4: Introduction

    1 Introduction The TPMC500-SW-42 VxWorks device driver software allows the operation of the TPMC500 32 Channel 12-bit ADC PMC conforming to the VxWorks I/O system specification. This includes a device-independent basic I/O interface with open(), read() and ioctl() functions. The TPMC500 driver includes following functions:...
  • Page 5: Installation

    0; 2.2 Including the driver in VxWorks How to include the device drive in the VxWorks system is described in the VxWorks and Tornado manuals. TPMC500-SW-42 - VxWorks Device Driver Page 5 of 19...
  • Page 6: Special Installation For Intel X86 Based Targets

    BSP is used, please refer to BSP documentation or contact the technical support for required adaptation. If strange errors appeared after system startup with the new build system please carrying out a VxWorks build clean and build all. TPMC500-SW-42 - VxWorks Device Driver Page 6 of 19...
  • Page 7: O System Functions

    The call of this function is the first thing the user has to do before adding any device to the system or performing any I/O request. RETURNS OK or ERROR (if the driver cannot be installed) SEE ALSO VxWorks Programmer’s Guide: I/O System TPMC500-SW-42 - VxWorks Device Driver Page 7 of 19...
  • Page 8: Tp500Devcreate()

    The argument type specifies the module type mounted to the address. There are predefined symbols for this argument in tpmc500.h. Allowed values are TPMC500_10, TPMC500_11, TPMC500_12, TPMC500_13, TPMC500_20, TPMC500_21, TPMC500_22 and TPMC500_23. TPMC500-SW-42 - VxWorks Device Driver Page 8 of 19...
  • Page 9 The mounted module is a TPMC500-10 -----------------------------------------------------------*/ status = tp500DevCreate ("/tpmc500", TPMC500_10); RETURNS OK or ERROR (if the driver is not installed or the device already exists or any other error occurred during the creation) TPMC500-SW-42 - VxWorks Device Driver Page 9 of 19...
  • Page 10: O Interface Functions

    The parameter name selects the device which shall be opened. The parameters flags and mode are not used and must be 0. EXAMPLE /*----------------------------------------------------------- Open the device named "/tpmc500" for I/O -----------------------------------------------------------*/ fd = open("/tpmc500", 0, 0); TPMC500-SW-42 - VxWorks Device Driver Page 10 of 19...
  • Page 11 RETURNS A device descriptor number or ERROR (if the device does not exist or no device descriptors are available) INCLUDES ioLib.h, semLib.h SEE ALSO ioLib, basic I/O routine - open() TPMC500-SW-42 - VxWorks Device Driver Page 11 of 19...
  • Page 12: Close()

    = close(fd); RETURNS A device descriptor number or ERROR (if the device does not exist or no device descriptors are available) INCLUDES ioLib.h, semLib.h SEE ALSO ioLib, basic I/O routine - close() TPMC500-SW-42 - VxWorks Device Driver Page 12 of 19...
  • Page 13: Read()

    The flags specify the mode to use. Allowed values are: TP500_DIFFMODE Enable Differential Mode TP500_SNGLMODE Enable Single Ended Mode TP500_CORRENA Enable Data Correction TP500_CORRDIS Disable Data Correction The read value will be returned in value. TPMC500-SW-42 - VxWorks Device Driver Page 13 of 19...
  • Page 14 = 2; buf.flags = TP500_CORRENA | TP500_DIFFMODE; result = read (fd, &buf, 0); RETURNS ERROR if an error occurred INCLUDE FILES ioLib.h, semLib.h, tpmc500.h SEE ALSO ioLib, basic I/O routine - read() TPMC500-SW-42 - VxWorks Device Driver Page 14 of 19...
  • Page 15: Ioctl()

    OK or ERROR (if the device descriptor does not exist or the function code is unknown or an error occurred) INCULDES ioLib.h, semLib.h, tpmc500.h SEE ALSO ioLib, basic I/O routine - ioctl(), VxWorks Programmer’s Guide: I/O System TPMC500-SW-42 - VxWorks Device Driver Page 15 of 19...
  • Page 16: Fiostartseq Setup And Start The Sequencer

    The pointer buffer points to the user supplied memory area where the sequencer input data will be stored. 4.4.2 FIOSTOPSEQ Stop the sequencer This command stops a running sequence cycles. This command needs no argument. TPMC500-SW-42 - VxWorks Device Driver Page 16 of 19...
  • Page 17: Ioctl() Example

    = 3; seq_rw_par[1].Gain = 5; seq_rw_par[1].Mode = TP500_CORRDIS | TP500_SNGLMODE; result = ioctl(fd, FIOSTARTSEQ , (int)&cntrl_par); if (result == OK) /* Sequencer started */ else /* Error when starting the sequencer */ TPMC500-SW-42 - VxWorks Device Driver Page 17 of 19...
  • Page 18 /*--------------------------------------------------------- Stop Sequencer ---------------------------------------------------------*/ result = ioctl(fd, FIOSTOPSEQ , 0); if (result == OK) /* Sequencer started */ else /* Error when starting the sequencer */ TPMC500-SW-42 - VxWorks Device Driver Page 18 of 19...
  • Page 19: Appendix

    Channel is already in use S_tp500Drv_NOMEM 0x05000007 Can’t allocate memory S_tp500Drv_NXIO 0x05000008 No module or specified module number not found S_tp500Drv_NODRV 0x05000009 Driver has not been started 0x0500000A Illegal model type specified S_tp500Drv_ILLTYPE TPMC500-SW-42 - VxWorks Device Driver Page 19 of 19...

Table of Contents