Tews Technologies TPMC118-SW-95 Скачать руководство пользователя страница 1

 

The Embedded I/O Company

 

 

TPMC118-SW-95 

QNX6-Neutrino Device Driver 

6 Channel Motion Control 

 

 

 

 

 

 

 

User Manual 

Issue 1.0   Version 1.0.0 

December 2002 

 

 

 

 

 

TEWS TECHNOLOGIES GmbH 

Am Bahnhof 7  

25469 Halstenbek / Germany 

Phone: +49-(0)4101-4058-0  

Fax: +49-(0)4101-4058-19 

e-mail: [email protected] 

www.tews.com 

   

TEWS TECHNOLOGIES LLC 

1 E. Liberty Street, Sixth Floor 

Reno, Nevada  89504 / USA 

Phone: +1 (775) 686 6077 

Fax: +1 (775) 686 6024 

e-mail: [email protected] 

www.tews.com 

Содержание TPMC118-SW-95

Страница 1: ...sion 1 0 0 December 2002 TEWS TECHNOLOGIES GmbH Am Bahnhof 7 25469 Halstenbek Germany Phone 49 0 4101 4058 0 Fax 49 0 4101 4058 19 e mail info tews com www tews com TEWS TECHNOLOGIES LLC 1 E Liberty S...

Страница 2: ...ion is forbidden TEWS TECHNOLOGIES GmbH has made any effort to ensure that this manual is accurate and complete However TEWS TECHNOLOGIES GmbH reserves the right to change the product described in thi...

Страница 3: ...rocess 6 3 DEVICE INPUT OUTPUT FUNCTIONS 7 3 1 open 7 3 2 close 8 3 3 devctl 9 3 3 1 DCMD_TP118_READENC 11 3 3 2 DCMD_TP118_READINP 13 3 3 3 DCMD_TP118_SETDAC 15 3 3 4 DCMD_TP118_SETRES 17 3 3 5 DCMD_...

Страница 4: ...ce Manager The standard file I O functions open close and devctl provide the basic interface for opening and closing a file descriptor and for performing device I O and control operations Supported fe...

Страница 5: ...g tpmc118 in the usr src directory and copy the complete driver and example directories with sub directories and all files from the distribution diskette into the new created project directory It is a...

Страница 6: ...tart scanning the PCI bus for TPCM118 modules and creates devices for each TPMC118 The TPMC118 Resource Manager registers created devices in the Neutrinos pathname space under following names dev tpmc...

Страница 7: ...ction creates and returns a new file descriptor for the TPMC118 named by pathname The flags argument controls how the file is to be opened TPMC118 devices must be opened O_RDWR EXAMPLE int fd fd open...

Страница 8: ...unction closes the file descriptor filedes EXAMPLE int fd if close fd 0 handle close error conditions RETURNS The normal return value from close is 0 In the case of an error a value of 1 is returned T...

Страница 9: ...a device specified by filedes causing the corresponding device to perform the requested operation The argument dcmd specifies the control code for the operation The arguments data_ptr and n_bytes depe...

Страница 10: ...8_SYNCOFF Remove the specified encoder channel from the synchronous mode DCMD_TP118_SYNCREAD Read the synchronized encoder channels DCMD_TP118_SETINTR Wait for a specified event on digital inputs See...

Страница 11: ..._READENC and the size of this structure is passed by the parameters data_ptr and n_bytes to the device The TP118_READENC structure has the following layout typedef struct int channel long value TP118_...

Страница 12: ...alue of channel 1 encBuf channel 1 result devctl fd DCMD_TP118_READENC encBuf sizeof encBuf NULL if result EOK successful read ERRORS EINVAL Invalid argument This error code is returned if either the...

Страница 13: ...s passed by the parameters data_ptr and n_bytes to the device The TP118_READINP structure has the following layout typedef struct long value TP118_READINP PTP118_READINP value This parameter will retu...

Страница 14: ...TPMC118 SW 95 QNX6 Neutrino Device Driver Page 14 of 30 ERRORS EINVAL Invalid argument This error code is returned if the size of the message buffer is too small SEE ALSO Library Reference devctl...

Страница 15: ...fer TP118_SETDAC and the size of this structure is passed by the parameters data_ptr and n_bytes to the device The TP118_SETDAC structure has the following layout typedef struct int channel long value...

Страница 16: ...4 to 0x4000 5V dacBuf channel 4 dacBuf value 0x4000 result devctl fd DCMD_TP118_SETDAC dacBuf sizeof dacBuf NULL if result EOK successful set ERRORS EINVAL Invalid argument This error code is returned...

Страница 17: ...he device The TP118_SETMODE structure has the following layout typedef struct int channel unsigned char mode TP118_SETMODE PTP118_SETMODE channel This argument specifies the encoder channel which conf...

Страница 18: ...mode modeBuf channel 2 modeBuf mode TP118_ENCCNT_X4 result devctl fd DCMD_TP118_SETRES modeBuf sizeof modeBuf NULL if result EOK successful set ERRORS EINVAL Invalid argument This error code is return...

Страница 19: ...18_SETPRLD structure has the following layout typedef struct int channel unsigned long value unsigned char flags TP118_SETPRLD PTP118_SETPRLD channel This argument specifies the encoder channel which...

Страница 20: ...preldBuf channel 5 preldBuf value 0x12345678 preldBuf flags TP118_FL_IMMPRLD result devctl fd DCMD_TP118_SETPRELD preldBuf sizeof preldBuf NULL if result EOK successful set ERRORS EINVAL Invalid argu...

Страница 21: ...s to the device The TP118_SETMODE structure has the following layout typedef struct int channel unsigned char mode TP118_SETMODE PTP118_SETMODE channel This argument specifies the encoder channel whic...

Страница 22: ...de modeBuf channel 2 modeBuf mode TP118_ENC_INDEX result devctl fd DCMD_TP118_SETMODE modeBuf sizeof modeBuf NULL if result EOK successful set ERRORS EINVAL Invalid argument This error code is returne...

Страница 23: ...C and the size of this structure is passed by the parameters data_ptr and n_bytes to the device The TP118_SYNC structure has the following layout typedef struct int channel TP118_SYNC PTP118_SYNC chan...

Страница 24: ...rino Device Driver Page 24 of 30 ERRORS EINVAL Invalid argument This error code is returned if either the size of the message buffer is too small or the specified parameter is out of range SEE ALSO Li...

Страница 25: ...and the size of this structure is passed by the parameters data_ptr and n_bytes to the device The TP118_SYNC structure has the following layout typedef struct int channel TP118_SYNC PTP118_SYNC chann...

Страница 26: ...rino Device Driver Page 26 of 30 ERRORS EINVAL Invalid argument This error code is returned if either the size of the message buffer is too small or the specified parameter is out of range SEE ALSO Li...

Страница 27: ...alid TP118_MAX_CHANS TP118_SYNCREAD PTP118_SYNCREAD value This array returns the encoder values of the synchronized channels all channels that are not set to synchronized mode will be returned as 0 Th...

Страница 28: ...ls result devctl fd DCMD_TP118_SYNCREAD syncRdBuf sizeof syncRdBuf NULL if result EOK successful set for i 0 i TP118_MAX_CHANS i if syncRdBuf valid i printf CH d ld n i 1 syncRdBuf value i ERRORS EINV...

Страница 29: ...The TP118_INTR structure has the following layout typedef struct int channel int edge int timeout in seconds 1 forever TP118_INTR PTP118_INTR channel This argument specifies the digital input channel...

Страница 30: ...8_EDGE_HI intrBuf timeout 15 result devctl fd DCMD_TP118_SETINTR intrBuf sizeof intrBuf NULL if result EOK successful waited ERRORS EINVAL Invalid argument This error code is returned if either the si...

Отзывы: