Home

Deva037 Manual V10 - Deva Electronic Controls Ltd

image

Contents

1. 13 3 1 15 User event information 13 Inpubevent InfOrmatiol 13 Overview DEVA001 PCI User s Manual 3 1 17 Digital information u 15 3 1 18 FIFO buffer information 15 3 1 19 Software call back information 17 3 1 20 Optical edge 3 2 17 3 2 Function compatibility 19 3 3 Device driver programming from 22 3 3 1 short open encoder void aanne nun 22 3 3 2 void close encoder void 2 22222 22 3 3 3 long read encoder short command short channel 22 3 3 4 void write encoder short command short channel long value 22 3 3 5 short enclib callback short receive long priority 23 3 3 6 Example programming 24 3 4 Device driver programming from Visual Basic 25 3 4 1 Function open encoder As 25 3 4 2 Function close encoder As Integer 25
2. u 3 2 2 2 Device driver installation 4 3 Device Driver 22 5 3 1 Device driver functions 5 Sat System infOFMAUOM diddl 5 3 1 2 Channel information 5 3 1 3 Marker information nenne nnne 7 3 1 4 Zero information i ee E 8 3 1 5 Extended axes U 8 91 6 IBDUPSIIIUS 2 23 mE NEN 9 3 1 7 Timer nnne nenne an nun nennen 9 3 1 8 DAC GC ON Ol 10 3 1 9 Output CONITOl 2 2 u u 10 3 1 10 Probe information 10 3 1 11 Probe information 11 3 1 12 T me stamper information 11 3 1 13 Pulse generator information 12 3 1 14 Axis compare information
3. 31 4 3 Connection details 32 4 3 1 Encoder input connections 32 4 3 2 Touch probe input connections 33 4 3 3 USB Connection nr ee 33 4 3 4 Internal Encoder Power 34 uuu eu 34 1 1 1 2 1 2 1 Overview Product Features The DEVA037 3 axis incremental encoder interface cards have been designed to enable simultaneous reading of 3 encoders using a PC based system They can be used for a wide range of measurement applications such as optical projectors and co ordinate measuring machines The range includes support for PCle PCI and ISA bus interfaces All three types share many common features however the PCI PCle variants have several additional facilities Features Three encoder inputs for differential or single ended input 32 bit counters for each encoder channel Marker input freeze capture for each encoder channel 5v and 12v Power supply pass through on encoder connectors Digital filters on all channels Timer Event driven interrupt logic Touch probe input I Optical edge input Support software A variety of software drivers and libraries are provided with the interface card to enable software
4. 5 0 0 0 0 7 BOARDS 0 0 Number of cards Number of cards 8 CARD TYPE Yes Yes Yes Yes 9 VERSION NUM Yes Yes Yes Yes 10 CNT 16 Yes Yes Yes Yes 11 MODE Mode 5 551 Mode 5 551 INC or SSI mode Mode 5 12 AXIS SIZE 2 x 16 bits 2 x 16 bits 2 x 16 bits 2 x 16bits 13 ENCODER TYPE Yes Yes Yes Yes 14 AXIS INPUTS NO NO Yes Yes 15 AXIS STATUS NO NO Yes Yes 16 AXIS OUT EN NO NO Yes No 19 INUM CHANNELS PER BOARD 3 20 IMARK_16 Yes Yes Yes Yes 21 Yes Yes Yes Yes 22 MARK_INT Yes No Yes 23 MARK Yes Yes Yes Yes 24 MARK INT VECT Yes Yes Yes No 25 MARK INT OCCUR Yes Yes Yes Yes 26 MARK LATCH SEL Defaults to marker Defaults to marker Yes No 27 MARK OUT EN NO NO Yes No 28 MARK NO NO NO Yes 30 ZERO INPUT Yes channel 0 shared with No Yes NO probe input 31 ZERO INT Yes Yes No 32 IZERO FUNC Zero function performed Zero function performed in software software 33 ZERO INT Yes No Yes No 34 ZERO INT OCCUR Yes NO Yes NO 40 AXIS 32 32 bit hardware counter 32 bit hardware counter 32 bit hardware counter Yes 41 MARK 32 32 bit hardware latch value 32 bit hardware latch valug32 bit hardware latch value Yes 42 VEL INST Software generated using Yes based on software Yes timer 1 interrupt system timer 43 VEL FILT Software generated using Yes based on software Yes timer 1 interrupt system timer 44 ACCEL INST Software generated using Yes
5. associated latch of each axis Writing a value of 1 0 enables disables the marker digital output Operation Returns either O or 1 depending on the state of the zero input Allows access to the card interrupt controller mask Writing a value of 1 0 enables disables an interrupt from the zero input This function is for special applications only Writing a value of 1 0 enables disables the channel zero function Allows access to the interrupt vector or interrupt call back executed by a zero input interrupt Returns a value of 1 every time an encoder zero interrupt has occurred Operation Allows access to the 32 bit counter register values or to pseudo incremental 32 bit position for absolute SSI encoders 3 1 7 41 42 43 44 45 46 47 48 49 _32 VEL_INST VEL_FILT ACCEL_INST ACCEL_FILT PROBE_32 ABSOLUTE_ 32 TIMER_32 OPTICAL 32 Input status Command amp equate 50 INPUT Timer information Command amp equate 60 61 62 63 64 TIMER TIMER INT TIMER INT VECT TIMER INT OCCUR TIMER LATCH SEL Axis no Axis no Axis no Axis no Axis no Axis no Axis no Axis no Axis no Channel Input no Channel Timer no Timer no Timer no Timer no Axis no Rd Rd Rd Rd Rd Rd Rd Rd Rd Rd Wr Rd Rd Wr Rd Wr Rd Wr Rd Wr Rd Rd Wr Returns the value of a 32
6. 173BUF NUM DATA Buffer no Rd Wr Specifies the number of data elements to be captured in a FIFO buffer block on each clock pulse 174BUF DATA INDEX Buffer no Rd Wr Selects which data element of a FIFO buffer block is accessed by data element functions BUF DATA CHANNEL and BUF DATA TYPE 175BUF DATA CHANNEL Bufferno Rd Wr Controls the channel buffer board axis of the data to be captured 176BUF DATA TYPE Buffer no Rd Wr Controls the type of data to be captured Value Buffer Data Note 0 Buffer clock counter Resets on a buffer Enable Flush or Configuration Value Board Data 1 Time Stamp Now See command 110 TIMESTAMP_NOW 2 Time Stamp Event See command 111 TIMESTAMP_EVENT 3 Digital I O See command 16510 32 Value Axis Data 16 Timer Latch SSI Latch See command 48 TIMER 32 47 ABSOLUTE 32 17 Marker Latch See command 41 MARK 32 18 Probe Latch See command 46 PROBE 32 19 Incremental Position See command 40 AXIS 32 180 BUF SIZE Buffer no Rd Wr Allows the user to detect or specify the FIFO buffer size in data elements Writing to this function disables and initialises data in the buffer Buffer memory allocation succeeds if a non zero value is returned 181 BUF MODE Buffer no Rd Wr Controls the mode of operation of the FIFO buffer Bit Mode 0 Logging mode 1 0 Discard old data when full Discard new data when full Writing a value of 1 0 enables disables FIFO buffer logging Writing to this function clears the contents
7. generator Bit Function 0 Direction when in Uni directional mode 1 0 1 Bi directional operation 1 0 Bi directional Uni directional 2 Hardware Start Stop by Axis Comparators 1 0 On Off 3 Deglitch Do not repeat the same pulse sequentially 1 0 On Off 122PULSEGEN0_EN Axis no Rd Wr Writing a value of 1 0 enables disables the pulse generator function 123 PULSEGENO OCCUR Axis Rd Returns a value of 1 every time a pulse generator interrupt has occurred 124 PULSEGENO OUT EN Axis Rd Wr Enables the pulse generator 0 digital outputs Specifying 1 0 in each bit field enables disables the equivalent digital output Bit Status Pulse Width 0 Pulse Generator 0 Occur to serviced 1 Pulse Generator 0 Terminal Count Quadrature count width 125 PULSEGENO INT VECT Axis no Rd Wr Allows access to the interrupt vector or interrupt call back executed by a pulse generator 0 interrupt 3 1 14 Axis compare information Command amp equate Channel 130 COMPARE0 Axis no 131 COMPARE0_FUNC Axis no 132 COMPARE0_OCCUR Axis no 133 COMPAREO OUT EN Axis 134 COMPAREO INT Axis no 135 COMPARE1 Axis no 136 COMPARE1_FUNC Axis no 137 COMPARE1_OCCUR Axis no 139COMPARE1 INT VECT Axis no 3 1 15 User event information Command amp equate Channel 140USEREVENTO OCCUR Board no 141USEREVENTO OUT EN no 3 1 16 Input event information Command amp equate Channel 15
8. 3 4 3 Function read encoder ByVal com As Integer ByVal chan As Integer As Long l a qva Coruna LEE ANUS 25 3 4 4 Function write encoder ByVal com As Integer ByVal chan As Integer ByVal value As Long As Integer 25 3 4 5 Example Visual Basic 26 3 5 Device driver programming from CZ Net 28 3 5 1 public static short open encodery 28 3 5 2 public static void close 28 3 5 3 public static int read encoder short command short channel 28 3 5 4 public static void write encoder short command short channel int a ae aa aaa aaa 28 3 5 5 Example C programming 29 4 USB incremental encoder interface hardware 30 4 1 Functional description 30 AAT Ouadrature inpD tiyu k g u u u i u iei W s a s gus 30 30 4 1 3 Zero 30 DEVA001 PCI User s Manual Overview 4 1 4 Touch Probe Interface 31 4 2 Optical edge detector input
9. INC INPUTS Status Quadrature input Quadrature input B Marker input M Zero input Z Limit input 0 Limit input 1 inverter inputs The bit fields indicate 0 or 1 depending on the state of the axis inputs Incremental inputs register formed from a variety of bit fields SSI_INPUTS Bit Status 0 SSI data input 15 AXIS STATUS INC STATUS Axis no Status 0 supply failure 1 Quadrature error SSI STATUS Bit Status 0 supply failure 1 Parity failure 2 Read complete occur 16 AXIS OUT EN INC OUT EN SSI OUT EN Axis no Bit Status 0 55 Read Trigger 1 6551 Read Complete Marker information Command amp equate 20 MARK 16 21 MARK INPUT 22 MARK INT Channel Axis no Axis no Axis no Rd Rd Rd Wr Rd Rd Rd Wr SSI inputs register formed from a variety of bit fields Returns the axis status register The bit fields indicate O or 1 depending on the status bit Incremental status register formed from a variety of bit fields SSI status register formed from a variety of bit fields Enables the axis digital outputs Specifying 1 0 in each bit field enables disables the equivalent digital output N A SSI axis digital output enable register formed from a variety of bit fields Operation Returns
10. based on software Yes timer 1 interrupt system timer 45 ACCEL FILT Software generated using Yes based on software Yes timer 1 interrupt system timer 46 PROBE 32 32 bit hardware latch value 32 bit hardware latch value32 bit hardware latch value Yes 47 ABSOLUTE 32 Yes Yes Yes 48 TIMER_32 32 bit hardware latch value No 49 OPTICAL 32 NO NO NO Yes No Equate DEVA001 issue 3 x DEVA001 issue 4 1 DEVA001 issue 4 2 5 0 Deva037 issue 1 x 50 INPUT Yes No No No 60 TIMER Timer 1 value x 0 1ms Timer 1 value x 0 1ms Timer 1 value x 0 1ms No 61 Timer 1 Yes No 62 TIMER INT VECT ITimer 1 NO Yes NO 63 TIMER INT OCCUR ITimer 1 NO Yes NO 64 TIMER LATCH SEL NO NO Yes NO 65 TIMER1 FUNC NO NO Yes No 66 TIMER OUT No No Yes No 70 IDAC_MV No No No No 71 DAC UV NO NO NO NO 80 OUTPUT NO NO NO NO 81 SERVO ENABLE 90 PROBE 16 Yes Yes Yes Yes 91 PROBE INPUT ZX Renishaw option Renishaw option Renishaw option Yes 92 PROBE INT Yes No Yes Yes 93 PROBE Yes Yes Yes Yes 94 PROBE INT VECT Yes Yes Yes Yes 5 PROBE INT OCCUR Yes Yes Yes Yes 96 PROBE SENSE Yes NO NO Yes 97 PROBE LED MODE Yes Auto Auto Yes 98 PROBE SOUND Yes Yes Yes Yes 99 PROBE FOOTSWITCH Yes Yes Yes Yes 100PROBE LATCH SEL Defaults to prob
11. development to be performed within a number of operating systems and applications Software support is an ongoing activity if support for a particular application or operating system is not currently provided please call the Deva office to determine its availability Windows 8 7 Vista XP 32 64 The Deva037 is supported in Windows 8 7 Vista XP 32 64 by a Windows driver model driver WDM The driver supports a standard programming interface Please refer to section 3 Device Driver Usage for more details 1 2 2 Digital Readout 1 3 A powerful digital readout is supplied which is capable of exercising all the common facilities of the DEVA037 This is useful to allow users to quickly verify that the DEVA037 is installed correctly and to make checks of their system without having to write their own software The DRO will handle up to four cards 12 axes and displays both absolute and incremental positions The DRO also displays the Marker register Probe register and allows control of the Probe and Footswitch options To allow the user to read meaningful values each axis of the DRO may be independently scaled to display real units For the incremental card all facilities such as Marker Probe and Optical edge detect may be toggled on and off If a Probe is activated the probed values are shown in the Probe register if a Marker is activated the value is shown in the Marker register an if the Optical edge is activated the values are sho
12. enclibNet dll This section describes the Net functions provided for device driver access The DEVA001 Net assembly consists of a single namespace Deva In which is a single static class Enclib Within Enclib all necessary methods and types commonly found in the C header file public static short open_encoder Opens the device driver and provides access to the functions provided Entry returns if no error returns 1 if error public static void close_encoder Closes the device driver Entry returns 0 if no error returns 1 if error public static int read_encoder short command short channel Returns a 32bit integer which contains the result from the device driver See section 3 1 for a description of the command and channel parameters Entry command 16 bit command channel 16 bit channel Exit returns 32 bit value public static void write encoder short command short channel int value Writes a 32bit integer to the device driver See section 3 1 for a description of the command and channel parameters Entry command 16 bit command channel 16 bit channel value 32 bit value Exit none 3 5 5 Example C programming Encoder card MSCS example WO Ca S re a nach ec SENSE ay ee ee es ed ee Sa using System using Deva namespace Deva_mscsExample class Program stati
13. of axes and I O available from all the cards in a system This section describes the functions provided by the device driver whilst the compatibility chart in section 3 2 details the functions available from particular cards System information Command amp equate 0 VECTOR 1 AXES 2 NUM TIMERS 3 NUM INPUTS 4 NUM DACS 5 NUM OUTPUTS 7 NUM BOARDS 8 CARD TYPE 9 VERSION NUM Channel information Command amp equate 10 CNT 16 Channel Not used Not used Not used Not used Not used Not used Not used Not used Not used Channel Axis no Rd Wr Rd Rd Rd Rd Rd Rd Rd Rd Rd Rd Wr Rd Wr Operation Provides a vector to the device driver command handler Returns the total number of axis channels available from the installed cards Returns the total number of timers available from the installed cards Returns the total number of digital inputs available from the installed cards Returns the total number of digital to analog converters available from the installed cards Returns the total number of digital outputs available from the installed cards Returns the number of encoder cards present in the system Returns the card type identifier Returns the device driver version number multiplied by 100 Operation Allows direct 16 bit read write of the counter chip registers 11 MODE Axis no Rd Wr Allows access to the mode registers o
14. of the FIFO buffer The value parameter passed to this command is ignored Allows access to the status register of the FIFO 182BUF EN Buffer no Rd Wr 183 BUF_FLUSH Buffer no Wr 184BUF_STATUS Buffer no Rd buffer Value Status 1 Overflow 0 Empty ve Number of data elements currently in buffer 185BUF_READ Buffer no 187 BUF MEMFREE Not used 188 BUF MAXDATA Not used 189 BUFFERS Not used Rd Rd Rd Rd 3 1 19 Software call back information Command amp equate Channel 200NUM LOSTCALLBACKS Not used 3 1 20 Optical edge detector Command amp equate Channel 210 OPTICAL LIGHT LEVEL Board no 211 OPTICAL INPUT 213 OPTICAL _FUNC 215 OPTICAL _INT_OCCUR Board no 220 OPTICAL TRIGGER LEVEL 221 OPTICAL HYSTERESIS LEVEL Board no Board no Board no Board no Rd Wr Rd Rd Wr Rd Rd Rd Wr Rd Rd Wr Rd Wr Returns a single data element from the FIFO buffer Returns the total amount of free memory available to FIFO buffers in units of data elements Returns the maximum number of data elements that can be captured by a FIFO buffer on each clock pulse Returns the total number of FIFO buffers available to the system Operation Returns the number of lost software call backs since this function was last read Operation Returns the current light level in lowest 15 bits Returns either O or 1 depending on the state of the probe input
15. the value of a 16 bit counter register latched by the last marker function or any other function the marker latch source is set to See commands 23 and 26 Returns either 0 or 1 depending on the state of the marker input Allows access to the card interrupt controller mask Writing a value of 1 0 enables disables an interrupt from the marker input This function is for special applications only 3 1 4 3 1 5 23 MARK_FUNC Axis no 24 MARK_INT_VECT Axis no 25 MARK_INT_OCCUR Axis no 26 MARK_LATCH_SEL Axis no Rd Wr Rd Wr Rd Rd Wr Value Source Marker Occur Zero Occur Pulse Generator 0 Sync Occur User Event 0 Occur Channel Digital Input 0 Occur Axis Compare 0 Sync Occur Axis Compare 1 Sync Occur NOD O N A Axis Compare 0 Enable 27 MARK_OUT_EN Axis no Zero information Command amp equate Channel 30 ZERO INPUT Axis no 31 ZERO INT Axis no 32 ZERO FUNC Axis no 33 ZERO INT VECT Axis no 34 ZERO INT OCCUR Axis no Extended axes Command amp equate Channel 40 AXIS 32 Axis no Rd Wr Rd Wr Rd Rd Wr Rd Wr Rd Wr Rd Rd Wr Rd Wr Writing a value of 1 0 enables disables the channel marker function Allows access to the interrupt vector or interrupt call back executed by a marker input interrupt Returns a value of 1 every time a marker input interrupt has occurred Controls the source event of the Marker
16. 0BOARD INPUT EN 151 BOARD INPUT OCCUR Board no 152 BOARD INPUT INT VECT Board no Board no Rd Wr Rd Wr Rd Wr Rd Rd Wr Rd Wr Rd Wr Rd Wr Rd Rd Wr Rd Wr Rd Wr Rd Wr Rd Wr Rd Wr Rd Rd Wr Operation Allows access to the 32 bit axis compare 0 register Writing a value of 1 0 enables disables the axis compare 0 function Returns a value of 1 every time an axis position compare 0 has occurred Writing a value of 1 0 enables disables the axis compare 0 digital output Allows access to the interrupt vector or interrupt call back executed by an axis compare 0 interrupt Allows access to the 32 bit axis compare 1 register Writing a value of 1 0 enables disables the axis compare 1 function Returns a value of 1 every time an axis position compare 1 has occurred Allows access to the interrupt vector or interrupt call back executed by an axis compare 1 interrupt Operation Returns a value of 1 every time a board user event 0 has been triggered and acknowledged Writing any value triggers the board user event Writing a value of 1 0 enables disables the user event O digital output at the specified I O bit provided such mapping is possible Operation Writing a value of 1 0 enables disables the equivalent board digital input positive edge detector Returns a value of 1 every time a board digital input interrupt has occurred Allows access to the interrupt vector o
17. 1 if already enabled for this process returns 2 if a resource allocation error occurs 3 3 6 Example C programming Example program to demonstrate device driver access X include lt stdlib h gt include conio h include lt stdio h gt include enclib h void main void long axis position 12 up to 4 cards x 3 axes short num channels short i open device driver exit if error if open encoder 1 exit 1 read number of installed encoder channels num channels read encoder NUM AXES OL loop while not key pressed while kbhit display axis positions for i 0 i num channels i axis position i read_encoder AXIS 32 1 printf 1u 081x i axis position i prance Nr close device driver close encoder 3 4 3 4 1 3 4 2 3 4 3 3 4 4 Device driver programming from Visual Basic In order to simplify the user software required to access the Windows 8 7 Vista XP 32 64 bit device drivers a selection of Visual Basic functions is supplied on the distribution disk The functions are declared in the enclib bas module This section describes the Visual Basic functions provided for device driver access Function open_encoder As Integer Opens the device driver and provides access to the functions provided Entry none Exit returns if no error returns 1 if error Functio
18. DEVA037 USB encoder interface card with optical edge detection User s Manual A B M Am C 5 V1 0 eva ELECTRONIC CONTROLS 52 Woodside Business Park Birkenhead Wirral 41 1EL United Kingdom Tel 44 0 151 647 3222 Fax 44 0 151 647 4511 Email support deva co uk Web www deva co uk All information of a technical nature and particulars of the product and its use are given by Deva Electronic Controls Ltd in good faith However it is acknowledged that there may be errors and omissions in this manual We shall not be liable for loss or damage whatsoever arising from the use of any information or particulars in or any omissions from this document V1 0 DEVA001 PCI User s Manual Overview 1 OVERVIEW Lu us senseo entend alas l abe 1 1 1 Product Features 1 Teat 7 7 11 8 1 1 2 Support 1 1 2 1 Windows 8 7 Vista XP 32 64 nnn nnnm nn 1 1 2 2 Digital REAGG ut 2 1 3 ACCOSSOTIOS ied otio ede eae s 2 2 Installation and configuration 3 2 4 Software support CDROM 3 2 2 USB Plug and Play cards 3 2 2 1 System requirements
19. DEVAO37 incorporates a touch probe input This input provides the correct signal conditioning to allow a volt free contact type touch probe to be used The probe function works like the marker function but latches all three axis counters simultaneously Unlike the marker function it operates asynchronously and hence does not require that the A and B signals are at a logic one level The probe function has its own enable bit The card also incorporates an output to drive the probe led an output to drive an audible sounder and a further input to allow the probe to be controlled via a footswitch Optical edge detector input The Deva037 incorporates a dual input optical edge detector system Encoder positions can be latched when the optical level present at the signal input crosses a pre programmed threshold Furthermore the reference input can be used improve the signal quality by receiving light from the illumination source and cancelling out any disturbances present in the light signal 4 33 Connection details The layout of the DEVA037 is shown below Power Int USB 4 3 1 Encoder input connections Each encoder is connected via a 15 way female HD type connector in accordance with the following pin out table and simplified input circuit Pin Number Signal Function 1 Ai A phase input 2 Bi B phase input 3 Zi Zero input 4 Mi Marker input 5 nLimO Limit 0 Aix 6 nAi nA phase i
20. K DIV No No Yes No 173 BUF NUM DATA No No Yes No 174 BUF DATA INDEX No No Yes No 175 BUF DATA CH Yes No 176 DATA TYPE No No Yes No 180 BUF SIZE No No Yes No 181 MODE No No Yes No 182 BUF EN No No Yes No 183 BUF_FLUSH No No Yes No 184 BUF STAT No No Yes No 185 READ No No Yes No 187 BUF MEMFREE No No Yes No 188 MAXDATA No No Yes No 189 INUM BUFFERS No No Yes No 200 INUM_LOSTCALLBACKS No Yes Yes No 210 OPTICAL LIGHT LEVEL No No No Yes 211 OPTICAL INPUT No No No Yes 213 OPTICAL FUNC No No No Yes 215 OPTICAL INT OCCUR Yes 220 OPTICAL_TRIGGER_LEVEL No No No Yes 221 OPTICAL HYSTERESIS LEVEL No No No Yes 222 OPTICAL GAIN No Yes 223 OPTICAL REF LEVEL No No No Yes 224 OPTICAL REF GAIN No No No Yes 225 OPTICAL REF NOM LEVEL No No No Yes 3 3 3 3 1 3 3 2 3 3 3 3 3 4 Device driver programming from C In order to simplify the user software required to access the Windows 8 7 Vista XP device drivers a selection of functions are supplied on the distribution CDROM The functions are prototyped in the C header file enclib h This section describes the C functions provided for device driver access short open_encoder void Opens the device driver and provides access to the functions provided Entry 2 Exit returns if no error returns 1 if error void close_encoder void Closes the device driver Entry none Exit returns if
21. Writing a value of 1 0 enables disables the channel optical function The optical function is level triggered by the optical input and the function reset automatically after execution of the function Returns a value of 1 or 2 every time a optical input interrupt has occurred 1 pos 2 neg Trigger level Hysteresis level 222 OPTICAL GAIN Board no Rd Wr Sets the gain of the system PGA for the optical light level 1 to 256 almost scaled by 128 so use 128 to 32767 223 OPTICAL REF LEVEL Board no Rd Returns the current reference light level 224 OPTICAL REF GAIN Board no Rd Wr Sets the gain of the system PGA for the optical reference level 1 to 256 almost scaled by 128 so use 128 to 32767 225 OPTICAL REF NOM LEVEL Board Rd Wr Sets the nominal reference level non zero value enables compensation of the signal input with respect to this reference level Suggested value 80 of range 26214 3 2 Function compatibility No Equate DEVA001 issue 3 x DEVA001 issue 4 1 DEVA001 issue 4 2 5 0 Deva037 issue 1 x VECTOR Yes No No No 1 AXES 3 channel 0 2 3 channel 0 2 3 channel 0 2 3 channel 0 2 2 TIMERS 2 timer 1 for user only 2 timer 1 for user only 12 timer 1 for user only No 3 INPUTS 6 input 0 5 0 0 0 4 NUM DACS 0 0 0 0 5
22. abelPosition Channel Top Top Height Channel Visible True End With oad LabelMark Channel with LabelMark Channel Top Top Height Channel Visible True End With LabelVelocity Channel vbExclamation 1 Digital With LabelVelocity Channel Top Top Height Channel Visible True End With LabelAccel Channel With LabelAccel Channel Top Top Height Channel Enabled True Visible True End With Next Channel End Sub Private Sub Form Unload Cancel As Integer Call close encoder End Sub Private Sub TimerUpdate Timer abelName 1 Caption x abelName 2 Caption y abelName 3 Caption z For Channel 1 To 3 abelPosition Channel Caption read encoder AXIS 32 Channel 1 abelMark Channel Caption read encoder MARK 32 Channel 1 abelVelocity Channel Caption read encoder VEL INST Channel 1 abelAccel Channel Caption read encoder ACCEL INST Channel 1 Next Channel End Sub 3 5 3 5 1 3 5 2 3 5 3 3 5 4 Device driver programming from C Net In order to simplify the user software required to access the Windows 8 7 Vista XP 32 64 bit device drivers a selection of Net functions are supplied on the distribution disk as the
23. bit counter register latched by the last marker function or any other function the marker latch source is set to See commands 23 and 26 Returns the counter velocity per interrupt time Returns 10 times the counter velocity per interrupt period filtered over 10 samples Returns the counter acceleration per interrupt time Returns 10 times the counter acceleration per interrupt period filtered over 10 samples Returns the value of a 32 bit counter register latched by the last probe function or any other function the probe latch source is set to See commands 93 and 100 Returns the 32 bit absolute position latched by the last read of an absolute SSI encoder Returns the value of a 32 bit counter value latched by the last timer 1 function or any other function the timer latch source is set to See commands 65 and 64 Returns the 32 bit latched encoder value of the last optical trigger Operation Returns either O or 1 depending on the state of the input Operation This command allows access to the interval values of the on board user timers The timer intervals are programmed in units of 0 1 ms Writing a value of 1 0 enables disables the user timer interrupt Allows access to the interrupt vector or interrupt call back executed by the user timer interrupt Returns a value of 1 every time a user timer interrupt has occurred Controls the source event of the timer latch of each axis Value Sour
24. c void Main Console WriteLine DEVA 1 MSC Example int num_channels 12 up to 4 cards x 3 axes int axis_position new int num_channels open device driver exit if error if Enclib open_encoder 1 return read number of installed encoder channels num_channels Enclib read_encoder short Enclib COMMANDS NUM_AXES 0 loop while key not pressed while Console KeyAvailable display axis positions for short index 0 index lt num_channels index axis position index Enclib read_encoder short Enclib COMMANDS AXIS 32 index Console WriteLine Axis index ToString tPosition axis_position index Console SetCursorPosition 1 close device driver Enclib close_encoder 4 1 USB incremental encoder interface hardware Functional description The DEVA037 is designed to interface up to three incremental encoders or linear scales to the USB bus The following sections describe the various functions of the interface Quadrature input Each encoder channel has four differential single ended input circuits designated A B Z and M The and B inputs accept the quadrature signals from the encoder and drive an up down counter via a x4 directional discriminator circuit The counter has 32bit resolution and may be read at any time The maximum count rate is in excess of 10MHz Marker input The M input circuit designated marker is a positive edge trigge
25. ce Timer 1 Sync Occur N A Read Counter Pulse Generator 0 Sync Occur lt User Event 0 Occur 65 TIMER1_FUNC 66 TIMER_OUT_EN Rd Wr Timer Rd Wr Writing a value of 1 0 enables disables the user timer function for the specific axis This allows for position readings latched on every timer 1 interval of the equivalent board Enables the timer digital outputs Specifying 1 0 in each bit field enables disables the equivalent digital output Bit Status Pulse Width 0 Timer Occur Occur to serviced 1 Timer Terminal Count 1us 3 1 8 DAC Control Command amp equate Channel Rd Wr 70 DAC MV Axis no Rd Wr 71 DAC_UV Axis no Rd Wr 3 1 9 Output control Command amp equate Channel Rd Wr 80 OUTPUT 81 SERVO_ENABLE 3 1 10 Probe Command amp equate 90 PROBE_16 91 PROBE_INPUT Output no Rd Wr Axis no Rd Wr information Channel Rd Wr Axis no Rd Boardno Rd Operation Allows access to the analog output channel for each axis in a system The value is in units of mV Allows access to the analog output channel for each axis in a system The value is in units of uV Operation Allows access to the system digital outputs The output is energised with a logical 1 Allows access to the system servo enable outputs for each axis The output is energised with a logical 1 Operation Returns the value of a 16 bit counter regis
26. e Defaults to probe Yes No 101PROBE OUT Yes No 110 TIMESTAMP NOW Yes No 111 TIMESTAMP_EVENT No No Yes No 112 TIMESTAMP SEL Yes No 120 PULSEGENO Yes No 121PULSEGENO MODE Yes No 122PULSEGENO EN NO Yes No 123PULSEGENO OCCUR Yes No 124PULSEGENO OUT No Yes No 125 PULSEGENO INT VECT No Yes No 130 COMPAREO No No Yes No 131 COMPAREO_FUNC Yes No 132 OCCUR Yes No 133 COMPAREO OUT No No Yes No 134 INT VECT No Yes No 135 COMPARE1 Yes No 136 COMPARE1 FUNC NO Yes No 137 COMPARE1_OCCUR No No Yes No 139 COMPARE1_INT_VECT No Yes No 140USEREVENTO OCCUR NO Yes NO 141USEREVENTO OUT EN No NO Yes NO 1ms granularity Equate DEVA001 issue 3 x issue 4 1 DEVA001 issue 4 2 5 0 Deva037 issue 1 x 150 BOARD INPUT No No Yes No 151 BOARD INPUT OCCUR No No Yes No 152 BOARD INPUT INT OCCUR No No Yes No 155 5 Yes No 156 AXIS INPUT OCCUR No No Yes No 157 AXIS INPUT INT No No Yes No 160 IO No No Yes No 161 O DIR 165 IO_32 Yes No 166 lO 32 DIR Yes No 169 IOS No No Yes No 170 BUF No No Yes No 171 BUF CLK TYPE No No Yes No 172 BUF CL
27. f the incremental encoder counter chip or the SSI mode register INC MODE Incremental mode number formed from a variety of bit fields Bit Function Count mode 0 3 5 QUADx4AB quadrature AB decode default 8 CNTAx2DIRB count rising and falling edges of A B selects count up down direction 9 CNTADIRB count rising edges of A B selects count up down direction 4 Invert quadrature signal A 5 Invert quadrature signal B 6 Invert marker signal M 7 Invert zero signal Z 8 Disable marker synchronisation with signals A amp B 9 Count inhibit SSI MODE SSI mode number formed from a variety of bit fields Bit Function 0 2 ISA Frequency 0 2 50Mhz 1 1 25Mhz 2 625kHz 3 313kHz 4 156 2 5 7 78 1kHz 0 2 PCI Frequency 0 2 78Mhz 1 1 39Mhz 2 694kHz 3 347kHz 4 174kHz 5 7 86 8kHz 3 7 Reserved 8 11 Offset 0 to 15 bits 12 13 Extra bit 0 1 Power fail 2 Even Parity 3 Odd parity 14 O Binary 1 Gray 15 Output control O Off 1 On 16 18 Acquisition mode 0 Shot 1 Timer 2 3 Continuous 4 Channel Digital Input 0 18 22 Reserved 23 Read Complete Interrupt Enable 0 Off Default 1 On 24 29 Data length 1 to 32 30 31 Reserved 12 AXIS SIZE Axis no Rd Returns the number of 16 bit registers allocated to an input channel 13 ENCODER TYPE Axis no Rd 0 Incremental 1 SSI 14 AXIS INPUTS Axis no Rd Returns the status of the axis post filter amp
28. interrupt vector or interrupt call back executed by a probe input interrupt Returns a value of 1 every time a probe input interrupt has occurred Allows access to the probe sense control Writing a value of 0 1 sets probe operation to active high low 0 Off 1 On 2 Auto 0 Off 1 On n time in ms 0 Off 1 Auto 2 Auto Inverted Operation Controls the source event of the Probe associated latch of each axis Enables the probe digital outputs Specifying 1 0 in each bit field enables disables the equivalent digital output Operation 110 TIMESTAMP NOW Board no Rd Wr Allows access to the current value of the 32 bit time stamper register in units of 1us 111 TIMESTAMP EVENT Board no Rd Allows access to the latched value of the 32 bit time stamper register in units of 1us 112TIMESTAMP SEL Board no Rd Wr Controls the source event of the Time stamper latch Value Source Probe Occur Timer 1 Sync Occur User Event 0 Occur Board Digital Input 0 Occur Pulse Generator 0 Sync Occur Axis Compare 0 Sync Occur Axis Compare 1 Sync Occur Reserved NOD OO INI 3 1 13 Pulse generator information Command amp equate Channel Rd Wr Operation 120 PULSEGENO Axis no Rd Wr Allows access to the 16 bit pulse generator register in units of 1 quadrature count 121 PULSEGENO_MODE Axis no Rd Wr Controls the mode of operation of the pulse
29. n close encoder As Integer Closes the device driver Entry none Exit 5 returns 0 if no error returns 1 if error Function read_encoder ByVal com As Integer ByVal chan As Integer As Long Returns in a 32 bit integer the result of reading the device driver See section 3 1 for a description of the command and channel parameters Entry 3 command 16 bit command channel 16 bit channel Exit returns 32 bit value Function write encoder ByVal com As Integer ByVal chan As Integer ByVal value As Long As Integer Writes a 32 bit integer to the device driver See section 3 1 for a description of the command and channel parameters Entry command 16 bit command channel 16 bit channel value 32 bit value Exit none 3 4 5 Example Visual Basic programming Encoder card MSVB example Option Explicit Dim Axes name 1 To 12 As String Dim Version string As String Dim Channel As Integer Dim temp As Integer Private Sub Form Load If open encoder lt gt 0 Then Call MsgBox Unable to load Driver Info Read Out End End If Call write encoder TIMER 1 10 Call write encoder TIMER INT 1 1 For Channel 1 To 3 Call write encoder MARK FUNC Channel 1 Load LabelName Channel With LabelName Channel Top Top Height Channel Visible True End With LabelPosition Channel With L
30. nd the demonstration software require a PC computer with one spare USB connector and Windows 8 7 Vista or XP 32 64 bit operating systems Both 32 and 64 bit operating systems are fully supported 2 2 2 Device driver installation 2 2 2 1 Windows 8 7 Vista XP installation When the card is connected windows will indicate that a new device has been found and will start the standard driver installation procedure If this does not occur it is possible to initiate this process manually via the add new hardware icon in the control panel or via the windows device manager Follow the instructions and when requested select have disk and then browse to the directory on the installation CDROM containing the Deva037 inf file For example NPC interface products Deva037 lssue1 x Drivers Click ok and follow instructions to complete the installation The installation may be tested using the supplied DRO program which may be found on the CD in the utils Win32 or utils Win64 directories 3 1 3 1 1 Device Driver Usage Device driver functions The supplied Windows 8 7 Vista XP 32 64 bit device drivers provide a simple method of accessing card functions and remove the need for direct register programming Use of the device driver ensures that the user s application software is compatible with other Deva products and is protected from any future changes in the card hardware or register layout The device driver determines the total number
31. nnector is at the top of the stack eva ELECTRONIC CONTROLS 52 Woodside Business Park Birkenhead Wirral CH41 1EL United Kingdom Tel 44 0 151 647 3222 Fax 44 0 151 647 4511 Email support deva co uk Web www deva co uk
32. no error returns 1 if error long read encoder short command short channel Returns in a 32 bit integer the result of reading the device driver See section 3 1 for a description of the command and channel parameters Entry command 16 bit command channel 16 bit channel Exit returns 32 bit value void write encoder short command short channel long value Writes a 32 bit integer to the device driver See section 3 1 for a description of the command and channel parameters Entry command 16 bit command channel 16 bit channel value 32 bit value Exit gt none 3 3 5 short enclib_callback short receive long priority Enables software call backs A user level function can be defined as call back function by setting the function address function pointer as the interrupt vector value using the appropriate INT VECT function of section 3 1 Please note that this function is required only for Microsoft Windows operating systems Call backs are currently available only to a single software application process Entry receive 16 bit flag 1 to enable to disable priority 32 bit call back thread priority defined in winbase h For high speed operations THREAD PRIORITY TIME CRITICAL THREAD PRIORITY HIGHEST THREAD PRIORITY ABOVE NORMAL THREAD PRIORITY NORMAL e For not real time notifications THREAD PRIORITY BELOW NORMAL THREAD PRIORITY LOWEST THREAD PRIORITY IDLE Exit returns 0 if no error returns
33. nput 7 nBi nB phase input nAix 8 nZi nZero input 9 nMi NMarker input RS422 line receiver 10 nLim1 nLimit 1 11 12V 12 volts supply oon k 12 5V 5 volt supply nLim0x nLimit0 13 OV volt common 14 15 Note Do not connect the 15 way HD type plug from a VGA monitor into one of the encoder input channels as damage may result 4 3 1 1 Input signal descriptions The Ai amp nAi Bi amp nBi inputs are differential pairs for connection to the A phase and B phase quadrature outputs of an incremental encoder The Mi amp nMi inputs are differential inputs for the channel marker signal This function will latch the counter reading for the relevant channel allowing an accurate reading of the position of a moving encoder to be made at a specific instant The marker function does not stop the counter itself which is able to continue reading the encoder position and so it will not cause the card to lose track of the system s datum position The Zi amp nZi may be used as an alternative to the Mi amp nMi inputs In this case the driver will zero the counter readings in software The inputs nLim0 and nLim1 are digital inputs intended to be used to connect normally closed overtravel inputs The differential inputs use RS422 levels which accept OV for logic low and from 5V to 12V for logic high Because they are differential inputs one input should be low when the other is high For Example to trigger the marker f
34. r Reference source not found of this manual Returns the total number of digital I O available Set up task Related Function s operation Configure buffer clock which event triggers a data capture BUF_CLK_CHANNEL BUF_CLK_TYPE BUF_CLK_DIV Configure buffer data block how many and which data elements to be captured per buffer clock pulse BUF NUM DATA BUF DATA INDEX BUF DATA CHANNEL BUF DATA TYPE Set buffer size BUF SIZE Set buffer mode BUF MODE Command amp equate 170BUF CLK CHANNEL 171BUF CLK TYPE Usage task Related Function Enable buffer BUF EN Monitor amount of buffer contents BUF STATUS Read buffer contents BUF READ Channel Rd Wr Operation Buffer Rd Wr Controls the channel timer board axis of the event that triggers a buffer data capture Buffer no Rd Wr Controls the type of event that triggers a buffer data capture Value Timer Event 0 Timer 1 Occur Value Board Event 1 Probe Occur 2 Board Digital Input 0 Occur 3 User Event 0 Occur Value Axis Event 16 Marker Occur 17 Zero Occur 18 Pulse Generator 0 Occur 19 Axis Compare 0 Occur 20 Axis Compare 1 Occur 21 Channel Digital Input 0 Occur 22 SSI Read Complete Interrupt Occur 172BUF CLK DIV Buffer no Rd Wr Controls the buffer clock divider
35. r interrupt call back executed by an board digital input interrupt 155AXIS_INPUT_EN Axis no Rd Wr Writing a value of 1 0 enables disables the equivalent axis digital input positive edge detector 156AXIS_INPUT_OCCUR Axis no Rd Returns a value of 1 every time an axis digital input positive edge has occurred 157 AXIS INPUT INT Axis Rd Wr Allows access to the interrupt vector or interrupt call back executed by an axis digital input interrupt 3 1 17 Digital I O information Command amp equate 16010 16110 DIR 16510 32 16610 32 DIR 169NUM IOS Channel Rd Wr I O no Rd Wr I O no Rd Wr Reg no Rd Wr Reg no Rd Wr N A Rd 3 1 18 FIFO buffer information The following tables list a number of tasks to be carried out when setting up and using a FIFO buffer Operation Allows access to individual digital I O register bits Allows access to the direction of individual digital I Os This function only affects I Os that be individually configured For further hardware details please refer to section Error Reference source not found Error Reference source not found of this manual Allows access to 32 digital I O register bits Allows access to the direction of 32 digital I Os For I Os whose direction can only be configured in groups all bits of the group need to be set to the same_ direction For further hardware details please refer to section Error Reference source not found Erro
36. red input which can synchronously latch the counter value To gain the most accurate result the input conditioning circuit latches the counter when both A and B inputs are at a logic one level The user must therefore phase the A and B signals carefully to meet this criteria Should this not be achievable circuit operation is still possible although the latched value will not be accurate to a single count Correct phasing may also be achieved by using the input invertors on signals A B amp M To use the marker input the marker circuit must be enabled Once a positive edge has occurred on the marker input the counter is latched when both and B are at logic one The marker latch register may now be read while the counter continues to maintain position To enable the maker latch to capture a further marker event the marker function should be disabled and then re enabled Marker synchronisation with signals A amp B can optionally be disabled Zero input The Z input circuit designated zero is a positive edge triggered input which can asynchronously latch the counter value It has been provided to maintain compatibility with previous issues and offer more flexibility when connecting encoders The marker function which accurately latches the counter value is equally suited to performing a zero type operation by using the latched value as an offset which is subsequently subtracted from the counter reading 4 1 4 Touch Probe Interface 4 2 The
37. ter latched by the last probe function or any other function the probe latch source is set to See commands 93 and 100 Returns either 0 or 1 depending on the state of the probe input 92 PROBE_INT Boardno Rd Wr 93 PROBE FUNC Board no Rd Wr 94 PROBE INT VECT Board no Rd Wr 95 PROBE INT OCCUR Board no Rd 96 PROBE SENSE Board no Rd Wr 97 PROBE LED Board no Rd Wr 98 PROBE SOUND Board Rd Wr 99 PROBE FOOTSWITCH Board Rd Wr 3 1 11 Probe information extended Command amp equate Channel Rd Wr 100PROBE LATCH SEL Axis no Rd Wr Value Source 0 Probe Occur N A Read Counter Pulse Generator 0 Sync Occur User Event 0 Occur Channel Digital Input 0 Occur Axis Compare 0 Sync Occur Axis Compare 1 Sync Occur ND BWIN N A Axis Compare 1 Enable 101 PROBE OUT EN Board no Rd Wr Status Pulse Width 0 Probe Occur to serviced 1 Footswitch Occur to serviced 3 1 12 Time stamper information Command amp equate Channel Rd Wr Allows access to the card interrupt controller mask Writing a value of 1 0 enables disables the probe input interrupt This function is for special applications only Writing a value of 1 0 enables disables the channel probe function The probe function is level triggered by the probe input and the function reset automatically after execution of the function Allows access to the
38. unction set Mi input to high and set nMi input to low To turn the marker function off reverse these voltages An internal resistor network is provided which allows connection of single ended signals to the non inverting inputs The 12V and 5V power supply pins may be used to supply the dc power requirements for the encoders and are derived from the external power connector 4 3 2 Touch probe input connections A touch probe footswitch and sounder may be connected via a 9 way female D connector with reference to the following pin out table Pin Number Signal Function 1 Led C Led cathode 2 Ov Ov 3 Led A Led anode 4 Probe Probe 5 Probe Ov 6 Sounder Siren 5v 7 Sounder Ov 8 FootSw Footswitch input 9 FootSw Ov 4 3 3 USB connection USB connection will be via a B connector The internal USB connection will be via a 4 pin header Pin Number Signal 1 5v 2 Data0 3 Data0 4 Ov 4 3 4 Internal Encoder Power The internal encoder power will be via a 4 pin right angle male molex 8981 connector The 5v and 12v from this connector are routed via 1amp resettable fuses to the encoder connections Pin Number Signal 1 12 2 3 4 5v 4 3 5 Optical Optical connections will be via a Fibre SMA connector The optical signal connector is at the bottom of the stack and the reference co
39. wn in the Optical register Accessories The DEVA037 incremental encoder interface is supplied with three high density 15 way D type connectors one 9 way D type connector and matching shells 2 1 2 2 Installation and configuration Software support CDROM The DEVA037 3 axis encoder interface card is supplied with a software support CDROM containing support for all DEVA037 encoder interfaces along with support and information for many of Deva s other products The CDROM includes the following items e Windows 8 7 Vista XP 32 64 bit device drivers providing coherent encoder interface card hardware management e Windows 8 7 Vista XP 32 64 bit DLL and import library containing the driver access functions e C language library routines and header files which create a simple interface to device driver functions e Example programs illustrating card read write using device driver functions e Visual Basic 6 Module which provides constant and function definitions to allow simple DLL access e Example Visual Basic 6 programs illustrating card read write using device driver functions e Net 2 0 Assembly which provides a complete interface to the standard DLL e Example C programs illustrating card read write using device driver functions e Demonstration Digital Readout Program for Windows 8 7 Vista XP 32 and 64 bit USB Plug and Play cards 2 2 1 System requirements The device driver library functions a

Download Pdf Manuals

image

Related Search

Related Contents

APmax™ - Innovative Systems  Mora OK 635 G  CLUB3D CGAX-H56724I AMD 1GB graphics card  LET-42107Y-LD9  d。wsing.jp  MTP3200 Feature User Guide  Frigidaire FGGF3058RB Use and Care Manual  FXAQ-P_IM_IT_3P156215-16Z  Stirling User Manual  

Copyright © All rights reserved.
Failed to retrieve file