background image

38

PCL-832  User's Manual

MCC_circle_xy   [MEX6.C]

Function

plots a circle on the xy plane

Sytax

int MCC_circle_xy(float cx1,

     float cx2)

Parameter

cx1, cx2 :

the center point of the circle in
xy plane

Return value

0 if successful, other value if not

MCC_circle_zx   [MEX6.C]

Funtcion

plots a circle on the zx plane

Syntax

int MCC_circle_zx(float cx3,

                                   float cx1)

Parameter

cx3, cx1 :

the center point of the circle in
 zx plane

Return value

0 if successful, other value if not

MCC_circle_yz   [MEX6.C]

Function

plots a circle on the yz plane

Syntax

int MCC_circle_yz(float cx2,

                       float cx3)

Parameter

cx2, cx3 :

the center point of the circle in
yz plane

Return value

0 if successful, other value if not

MCC_arc_xy   [MEX7.C]

Function

plots an arc on the xy plane

Syntax

int MCC_arc_xy(float rx1,

 float rx2, float dx1, float dx2)

Parameter

rx1, rx2

:

any point of the arc between
current point and end point

dx1, dx2 :

the end point of arc in xy plane

Return value

0 if successful, other value if not

Содержание PCL-832

Страница 1: ...PCL 832 3 axis servo motor control card...

Страница 2: ...o Ltd Information provided in this manual is intended to be accurate and reliable However Advantech Co Ltd assumes no responsibility for its use nor for any infringe ments of the rights of third parti...

Страница 3: ...ion 8 Switch and jumper settings 8 Base I O address SW1 8 Quadrature input multiplier JP1 JP2 JP3 10 DDA time and Error counter overflow interrupt levels JP4 10 I O Wait state level JP5 10 Connector p...

Страница 4: ...t C drivers and Turbo C drivers 27 Special Procedures 27 The Microsoft C Driver Parameter Files 28 PCLB PAR 28 HOME PAR 29 MACHINE PAR 30 Microsoft C driver functions 32 System functions 32 Preparator...

Страница 5: ...Chapter 1 General information 1 C H A P T E R 1 General information...

Страница 6: ...o motors A special synchronization circuit synchronizes all three axes The card can supply a simulated tachometer output to the servo motor driver This signal makes a tachometer unnecessary in some ap...

Страница 7: ...or differential encoder interface inputs x1 x2 x4 quadrature feedback input 12 bit analog output with 10 V range Built in F V converter Easy programming from C and other high level languages 3 axis li...

Страница 8: ...hometer simulation output F V converter 10 V at 250 KHz default VR adjustable Home sensor input 1 channel per axis Encoder input Single ended or differential Counts per encoder cycle x1 x2 x4 jumper s...

Страница 9: ...Chapter 1 General information 5 Board layout...

Страница 10: ...6 PCL 832 User s Manual...

Страница 11: ...Chapter 2 Installation 7 2 Installation C H A P T E R...

Страница 12: ...arrange to repair or replace the unit Remove the PCL 832 interface card from its protective packaging carefully Keep the antistatic package Whenever you are not using the board please store it in the...

Страница 13: ...hex Switch position 1 2 3 4 5 200 21F l 220 23F l l 240 25F l l 300 31F l l 3E0 3FF l l l l l On l Off default Note Switches 1 5 control the PC bus address lines as follows Switch 1 2 3 4 5 Address L...

Страница 14: ...and Error counter overflow interrupt levels JP4 The jumper JP4 selects both the DDA time s and the Error counter s interrupt levels 2 3 5 7 10 11 12 15 as shown below Do not select a level that is be...

Страница 15: ...OME 1 2 3 4 5 6 7 10 8 9 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 CH1FV CH1VCMD AGND CH2FV CH3VCMD AGND CH2VCMD AGND CH3FV 1 2 3 4 5 6 7 8 9 Pin Function AGND Analog signal ground CH1VCMD Channel...

Страница 16: ...st Points TP1 CH1 F V output TP2 CH2 F V output TP3 CH3 F V output TP4 CH1 DA output TP5 CH2 DA output TP6 CH3 DA output TP7 Analog ground VR VR1 CH1 DA output full scale adjustment VR2 CH1 DA output...

Страница 17: ...he rear of the unit and choose an unused slot 5 Remove the screw that secures the expansion slot cover to the chassis Save the screw to secure the PCL 832 6 Carefully grasp the upper edge of the PCL 8...

Страница 18: ...14 PCL 832 User s Manual...

Страница 19: ...Chapter 3 Operation 15 C H A P T E R 3 Operation...

Страница 20: ...these commands simultaneously T2 as well The duration of this period T2 T1 is defined as one DDA cycle The duration of the DDA cycle can be set by software from 1 msec to 2 seconds Consider the figur...

Страница 21: ...ues on the P controller The functional block diagram of the PCL 832 motion control card is shown below The DDA generates continuous command pulses through CMD and CMD channels not shown on the figure...

Страница 22: ...ycle You have to set a number in the DDA pulse buffer before the current DDA cycle finishes otherwise the next DDA cycle will output no pulses The DDA generator generates the first of the n pulses The...

Страница 23: ...s that there is a problem with the servo motor the servo motor driver or the encoder on the servo motor Operation will be halted at this stage and the PCL 832 will have to be reset before normal opera...

Страница 24: ...hannels the number of pulses output in the DDA cycle is set for every channel Each channel therefore has its own DDA pulse buffer that contains the desired number of pulses in the next DDA cycle for t...

Страница 25: ...as an independant 13 bit error counter This counter records the difference between the number of desired motor movements and the actual movements as registered by the servo motor s encoder The output...

Страница 26: ...cale CW S a t u r a t i o n 0 FFE 9 995 V full scale 0 801 9 995 V full scale 0 800 9 995 V full scale 0 7FF 9 995 V full scale A c t i v e A r e a 0 7FE 9 990 V full scale 1LSB 0 002 9 765 mV 2 LSB 0...

Страница 27: ...r driver s velocity feedback port This is called closed loop velocity feedback To use this function your servo driver has be equipped with a F V input port or the TG circuitry has to be modified to me...

Страница 28: ...time interrupt open Set the slave cards error counter overflow interrupt the same as the master card s Remove resistor R53 from all the slave cards P r o g r a m m i n g The instructions to enable th...

Страница 29: ...Chapter 4 Programming 25 4 P r o g r a m m i n g C H A P T E R...

Страница 30: ...mplicated than using the supplied drivers it gives you all the flexibility you need to customize the control for your specific application Software installation Insert the utility floppy disk in your...

Страница 31: ...of sense It is advisable to read chapters 3 and 5 before you go any further Special Procedures When you use the Microsoft C libraries the following is important 1 The function main is already used by...

Страница 32: ...ny ASCII editor to make the modifications PCLB PAR This file contains information on the PCL 832 card File contents Base address 240h DDA irq no 5 Over irq no 3 GAIN1 1 GAIN2 1 GAIN3 1 Parameter descr...

Страница 33: ...until it finds home 0 CW 1 CCW Bit2 When the motor arrives at the home position it stops and then starts moving in this direction to leave home sense 0 CW 1 CCW Bit3 When the motor leaves home it sto...

Страница 34: ...P063 5000 P071 0 000 P072 0 000 P073 0 000 Parameter descriptions P a r a m e t e r Function P001 maximum speed mm sec P003 logical and mechanical direction 1 reversed 3 bits bit0 1st bit1 2nd bit3 3r...

Страница 35: ...Chapter 4 Programming 31 X Y Z X Z Y Mechanical Home Logical Home Motor R1 R2 Min X CCW Max X CW Servo motor system physical layout...

Страница 36: ...ons MCC_init_motion all Function This function initializes the PCL 832 and must be called before any other functions Syntax int MCC_init_motion Return value 0 if succesful other value if not MCC_close...

Страница 37: ...r to the 1st axis error counter value cnt2 a pointer to the 2nd axis error counter value cnt3 a pointer to the 3rd axis error counter value Return value 0 if successful other value if not MCC_set_fspd...

Страница 38: ...ep MEX4 C Function sets the deceleration step Syntax int MCC_set_dec_step int step Parameter step the step of DDA cycle Return value deceleration step if successful other value if not MCC_get_dec_step...

Страница 39: ...ental coordinate system mode Motion functions MCC_go_home MEX12 C Function homes the machine Syntax int MCC_go_home float spd1 float spd2 float spd3 int odr1 int odr2 int odr3 Parameter spd1 1st axis...

Страница 40: ...nt by linear interpolation Syntax int MCC_line float dx1 float dx2 float dx3 Parameter dx1 the end position of X axis in absolute coordinate mode the movement length of X axis in incremental coordinat...

Страница 41: ...om the current point to a specified point by linear interpolation Sytax int MCC_line_y float dx Parameter dx the end position of Y axis in absolute coordinate mode the movement length of Y axis in inc...

Страница 42: ...oint of the circle in zx plane Return value 0 if successful other value if not MCC_circle_yz MEX6 C Function plots a circle on the yz plane Syntax int MCC_circle_yz float cx2 float cx3 Parameter cx2 c...

Страница 43: ...Syntax int MCC_arc_yz float rx2 float rx3 float dx2 float dx3 Parameter rx2 rx3 any point of the arc between current point and end point dx2 dx3 the end point of arc in yz plane Return value 0 if suc...

Страница 44: ...to a specified point at maximum velocity and acceleration Syntax int MCC_ptp_y float dx Parameter dx the end position of Y axis in absolute coordinate mode the movement length of Y axis in incremental...

Страница 45: ...char x char d float d_pulse Parameter x x 1 2 3 specifies the axis d the movement direction d 1 CW d 1 CCW d_pulse pulses Return value 0 if successful other value if not MCC_jog_s MEX9 C Function move...

Страница 46: ..._abort Motion function return codes The return codes of the motion functions have the following meaning 0 Function successful 1 The system queue buffer is full Call the function again 2 An error has o...

Страница 47: ...o the X axis current position data x2 the pointer to the Y axis current position data x3 the pointer to the Z axis current position data Return value 0 if successful other value if not MCC_get_ppos ME...

Страница 48: ...parameter file 0xF104 Arc function parameters invalid 0xF201 DDA interrupt error 0xF202 Error counter overflow 0xF301 X axis out of range 0xF302 Y axis out of range 0xF303 Z axis out of range 0xF304 C...

Страница 49: ...e PCL 832 Their only purpose is to show you how easy it is to program the registers of the PCL 832 directly The example program illustrates the use of these functions and how to include them in a C pr...

Страница 50: ...is number 1 2 or 3 dir specified the move direction 0 CW 1 CCW dda_pulse no of pulses 0 4095 Return value 0 success 1 axis number error 2 direction error 3 dda pulse number error PCL832_set_gain Funct...

Страница 51: ...o the error counter data Return value 0 success 1 axis number error PCL832_get_status Function Returns the home index and error counter status Syntax int PCL832_get_status int axis int status Paramete...

Страница 52: ...48 PCL 832 User s Manual...

Страница 53: ...Chapter 5 Register structure and format 49 C H A P T E R 5 Register structure and format...

Страница 54: ...enth register is BASE 6 I O address Map The following table gives the assignment of each of the card s ports I O port assignments Port Read Write BASE 0 CH1 error counter value CH1 DDA pulse buffer BA...

Страница 55: ...D 0 DIR N A E11 E10 E 9 E 8 E 7 E 6 E 5 E 4 E 3 E 2 E1 E 0 DIR The direction of the movement 0 CW 1 CCW E11 E0 The error counter value Write CH1 DDA pulse buffer Base 0 Register Layout Write D15 D14 D...

Страница 56: ...ut is HIGH HOME The home input status 0 The home input is HIGH 1 The home input is LOW Write CH1 Scaling Gain Base 02 Register Layout Write D15 D8 D 7 D 6 D 5 D 4 D 3 D 2 D1 D 0 N A N A N A S 5 S 4 S...

Страница 57: ...ent 0 CW 1 CCW E11 E0 The Error counter value Write CH2 DDA pulse buffer Base 08 Register Layout Write D15 D14 D12 D11 D10 D 9 D 8 D 7 D 6 D 5 D 4 D 3 D 2 D1 D 0 DIR N A D11 D10 D 9 D 8 D 7 D 6 D 5 D...

Страница 58: ...occurred INDEX The index input stauts 0 The index input is LOW 1 The index input is HIGH HOME The home input status 0 The home input is HIGH 1 The home input is LOW BASE 10 Read CH3 Error counter valu...

Страница 59: ...Status Base 12 Register Layout Read D15 D4 D 3 D 2 D1 D 0 N A E OV N A INDEX HOME E OV The Error counter overflow status 0 The Error counter is overflow 1 The Error counter is not overflow INDEX The...

Страница 60: ...erator enable You can write any value to this register as external logic on the address lines enables the DDA cycle generator BASE 1A Write PCL 832 reset You can write any value to this register as ex...

Страница 61: ...Appendix A Calibration 57 A Calibration A P P E N D I X...

Страница 62: ...conjunction with the CALB832 EXE program as it does not contain precise calibration instructions VR Assignments The PCL 832 has 12 on board VRs variable resistors They enable you to make accurate cali...

Страница 63: ...h test point is indicated in the figure below The following can be measured at each test point TP1 CH1 F V output TP2 CH2 F V output TP3 CH3 F V output TP4 CH1 DA output TP5 CH2 DA output TP6 CH3 DA o...

Отзывы: