Page 4
Change speed on the fly..............81 4.6.2 Change position on the fly..............85 ..............87 OSITION COMPARE AND ATCH 4.7.1 Comparators of PPCI7443..............87 4.7.2 Position compare................88 4.7.3 Position Latch ..................91 ..92 ARDWARE BACKLASH COMPENSATOR AND VIBRATION SUPPRESSION ................
Page 5
5.3.1 Main form..................103 5.3.2 Interface I/O Configuration Form............ 103 5.3.3 Pulse IO & Interrupt Configuration Form ........104 5.3.4 Operate form:................... 105 FUNCTION LIBRARY ..................111 ................... 111 IST OF UNCTIONS C/C++ P ............... 118 ROGRAMMING IBRARY ..................119 NITIALIZATION .............
Page 7
This manual is designed to help you use the PPCI7443. The manual describes how to modify various settings on the PPCI7443 card to meet your requirements. It is divided into six chapters: “ Introduction ” , gives an overview of the product features, Chapter 1 applications, and specifications.
Page 9
The PPCI7443 is an advanced 4 axes motion controller card with PCI interface. It can generate high frequency pulses (6.4MHz) to drive stepping/micro stepping motors and servo motors. In motion functions, it provides 2-axis circular, 4-axis linear interpolation, continuous interpolation with velocity continuity.
Page 11
Hardware Instllation Jumper Setting Chapter 2 & 3 Wiring Run PPCI7443 Utility Chapter 5 To Configure System Run PPCI7443 Utility Chapter 4 & 5 To Verify Operation Use Function Library Chapter 4 & 6 To develop Applications System is OK? Figure 1.2 Flowchart of building an application...
1 . 1 F e a t u r e s The following lists summarize the main features of the PPCI7443 motion control system. 32-bit PCI-Bus plug and play. 4 axes of step and direction pulse output for controlling stepping or servomotor.
1 . 2 S p e c i f i c a t i o n s Applicable Motors: Stepping motors with pulse train input stepping drivers. AC or DC servomotors with pulse train input servo drivers. Performance: Number of controllable axes: 4 axes. Maximum pulse output frequency: 6.55Mpps, linear, trapezoidal or S- curve velocity profile drive.
1.3.1 Programming Library For the customers who are writing their own programs, we provide MS-DOS Borland C/C++ (Version: 3.1) programming library and Windows- 95/98/NT/2000/XP DLL for PPCI7443. These function libraries are shipped with the board. 1.3.2 PPCI7443 Utility A Windows-based Utility for users to setup cards, motors and system. It can help users to debug their hardware and software.
This chapter describes how to install the PPCI7443. Please follow these steps below to install the PPCI7443. Check what you have (section 2.1) Check the PCB (section 2.2) Install the hardware (section 2.3) Install the software driver (section 2.4) Understanding the I/O signal connections (chapter 3) and their operation (chapter 4) Understanding the connectors’...
P P C I 7 4 4 3 O u t l i n e D r a w i n g 185mm PCL6045 Figure 2.1 PCB Layout of the PPCI7443 Figure 2.1 PCB Layout of the PPCI7443 CN1: External Power Input Connector...
2.3.2 PCI slot selection Your computer will probably have both PCI and ISA slots. Do not force the PCI card into a PC/AT slot. The PPCI7443 can be used in any PCI slot. 2.3.3 Installation Procedures 1. Read through this manual, and setup the jumper according to your application 2.
Naked wire length:10mm standard The following diagram shows the external power supply system of the PPCI7443. The external +24V power must be provided, an on-board regulator generates +5V for both internal and external usage. Note: Please don’t use the +5V power source to drive too many devices, especially stepping drivers or external encoders.
2 . 6 C N 2 P i n A s s i g n m e n t s : M a i n c o n n e c t o r The CN2 is the major connector for the motion control I/O signals. Name Function(axis / ) Name...
2 . 7 C N 3 P i n A s s i g n m e n t s : M a n u a l P u l s e r I n p u t The signals on CN3 are for manual pulser input. Name Function(Axis ) Bus power ground...
2 . 9 C N 5 P i n A s s i g n m e n t : T T L O u t p u t The signals on CN5 are for general-purposed TTL output signals. Pin No. Name Function DGND...
2 . 1 1 S w i t c h S e t t i n g f o r E L L o g i c The switch S1 is used to set the EL limit switch ’ s type. The default setting of EL switch type is “...
The signal connections of all the I/O signals are described in this chapter. Please refer the contents of this chapter before wiring the cable between the PPCI7443 and the motor drivers. This chapter contains the following sections: Section 3.1 Pulse output signals OUT and DIR Section 3.2...
Page 24
P u l s e O u t p u t S i g n a l s O U T a n d D I R There are 4 axes pulse output signals on PPCI7443. For every axis, two pairs of OUT and DIR signals are used to send the pulse train and to indicate the direction.
Page 25
DIR4- The default setting of OUT and DIR signals are the as differential line driver mode. The following wiring diagram is for the OUT and DIR signals of the 4 axes. Inside PPCI7443 EX+5V J1-J8 OUT+ , DIR+ OUT- , DIR-...
Page 26
EZ2+ EZ4+ EZ2- EZ4- The input circuits of the EA, EB, and EZ signals are shown as follows. Inside PPCI7443 PCL6045 EA+ , EB+ , EZ+ EA , EB , EZ EA- , EB- , EZ- Please note that the voltage across every differential pair of encoder input signals (EA+, EA-), (EB+, EB-) and (EZ+, EZ-) should be at least 3.5V or...
Page 27
which are equipped with: (1) differential line driver or (2) open collector output. Single Connections • 19...
Page 28
Connection to Line Driver Output To drive the PPCI7443 encoder input, the driver output must provide at least 3.5V across the differential pairs with at least 6 mA driving capability. The ground level of the two sides must be tight together too.
Page 29
The specifications of the limit switches should with contact capacity of +24V, 6mA minimum. An internal filter circuit is used to filter out the high frequency spike, which may cause wrong operation. EX+24V Inside PPCI7443 4.7k Filter Circuit To PCL6045 If = 6mA Max.
Page 30
6mA minimum. You can use either ‘ A-type’ (normal open) contact switch or ‘B-type’ (normal closed) contact switch by setting the DIP switch S1. The PPCI7443 is delivered with all bits of S1 set to ON, refer to section 2.10. For the details of the EL operation, please refer to section 4.3.2.
Page 31
The signals connection and relative circuit diagram is shown in the following diagram. Usually, limit switches are used to generate the slow-down signals to make motor operating in a slower speed. For more details of the SD/PCS operation, please refer to section 4.3.1. EX+24V Inside PPCI7443 4.7k Filter Circuit To PCL6045 If = 6mA Max.
Page 32
INP2 INP3 INP4 The input circuit of the INP signals is shown in the following diagram. EX+5V Inside PPCI7443 To PCL6045 If = 12mA Max. If = 5mA Min. The in-position signals are usually from servomotor drivers, which usually provide open collector output signals. The external circuit must provide at least 5 mA current sink capability to drive the INP signal active.
Page 33
The external circuit must provide at least 5 mA current sink capability to drive the ALM signal active. For more details of the ALM operation, please refer to section 4.2.2. EX+5V Inside PPCI7443 To PCL6045 If = 12mA Max. If = 5mA Min.
Page 34
The ERC output circuit is in the open collector with maximum 35 V external power at 50mA driving capability. For more details of the ERC operation, please refer to section 4.2.3. Inside PPCI7443 35V 50mA Max. from PCL6045 EXGND 26 • Single Connections...
Page 35
CN2 Pin No Signal Name Axis # SVON1 SVON2 SVON3 SVON4 The output circuit of SVON signal is shown in the following diagram. Inside PPCI7443 35V 50mA Max. SVON from PCL6045 EXGND Single Connections • 27...
CN2 Pin No Signal Name Axis # RDY1 RDY2 RDY3 RDY4 The input circuit of RDY signal is shown in the following diagram EX+5V Inside PPCI7443 To PCL6045 If = 12mA Max. If = 5mA Min. 28 • Single Connections...
Page 37
3 . 1 1 P o s i t i o n c o m p a r e o u t p u t p i n : C M P The PPCI7443 provides 2 compare output channels, CMP, and they are for the first 2 axes, &...
Page 38
3 . 1 2 P o s i t i o n l a t c h i n p u t p i n : L T C The PPCI7443 provides 2 position latch input channels, LTC, and they are for the last 2 axes, &...
Page 39
3 . 1 3 P u l s e r I n p u t S i g n a l s P A a n d P B The PPCI7443 can accept the input signals from pulser signals through the following pins of connector CN3.
Page 40
You can also use an external open collector or switch to drive the STA/STP signals for simultaneous start/stop. If there are two or more PPCI7443 cards, cascade CN4 connectors of all cards for simultaneous start/stop control on all concerned axes is possible.
Page 41
3 . 1 5 G e n e r a l - p u r p o s e d T T L O u t p u t The PPCI7443 provides 6 general-purposed TTL digital output. The TTL output is in CN5. The relative signal name, pin number and axis number are shown in the following table.
This chapter describes the detail operation of the PPCI7443 card. Contents of the following sections are as following. Section 4.1: The motion control modes Section 4.2: The motor driver interface (INP, ERC, ALM, SVON, RDY) Section 4.3: The limit switch interface and I/O status (SD/PCS, EL, ORG) Section 4.4: The counters (EA, EB, EZ)
Page 44
4.1.1 Pulse Command Output The PPCI7443 uses pulse command to control the servo / stepper motors via the drivers. The pulse command consists of two signals: OUT and DIR. There are two command types: (1) single pulse output mode (OUT/DIR);...
Page 45
pls_outmode = 0: pls_outmode = 1: pls_outmode = 2: pls_outmode = 3: Dual Pulse Output Mode(CW/CCW Mode) In this mode, the waveform of the OUT and DIR pins represent CW (clockwise) and CCW (counter clockwise) pulse output respectively. Pulses output from CW pin makes motor move in positive direction, whereas pulse output from CCW pin makes motor move in negative direction.
Page 46
pls_outmode = 4: (CW) (CCW) Positive direction (CW) (CCW) Negative direction pls_outmode = 5: (CW) (CCW) Positive direction (CW) (CCW) Negative direction Relative Function: _7443_set_pls_optmode(): Refer to section 6.4 38 • Operation Theorem...
4.1.2 Velocity mode motion This mode is used to operate one axis motor at Velocity mode motion. The output pulse accelerates from a starting velocity (StrVel) to the specified constant velocity (MaxVel). The _7443_tv_move() function is used to accelerate constantly while the , _7443_sv_move() function is to accelerate according to S-curve (constant jerk).
Time (second) Tacc Tdec There are 2 trapezoidal point-to-point functions supported by PPCI7443. In the _7443_start_ta_move() function, the absolute target position must be given in the unit of pulse. The physical length or angle of one movement is dependent on the motor driver and the mechanism (includes the motor).
Page 49
2000 counts per phase. The maximum rotating speed of motor is designed to be 3600 rpm. What is the maximum pulse command output frequency that you have to set on PPCI7443? Answer: MaxVel = 3600/60*2000*4 = 48000pps The reason why *4 is because there are four states per AB phase (See Figures in Section 4.4).
If this ratio is not set before issuing the start moving command, it will cause problems when running in “Absolute Mode”. Because the PPCI7443 can’t recognize the actual absolute position during motion. Relative Functions: _7443_start_ta_move() , _7443_start_tr_move() : Refer to section 6.6 _7443_motion_done(): Refer to section 6.11...
Page 51
Normally, the accel/decel period consist of 3 regions, two SVacc/SVdec and one linear. During the SVacc/SVdec, the jerk (second derivative of velocity) is constant, and, during the linear region, the acceleration (first derivative of velocity) is constant. In the first constant jerk region during acceleration, the velocity goes from StrVel to (StrVel + Svacc).
The Following table shows the difference between all the single axis motion functions, including Preset Mode(both trapezoidal and S-curve Motion) and constant velocity mode. Velocity Profile Trapezoidal S-curve Relative Absolute _7443_tv_move ----------- ----------- √ ----------- ----------- _7443_sv_move √ ----------- ----------- _7443_v_change √...
Page 53
– Absolute motion 3 axes linear interpolation Any 3 of the 4 axes of PPCI7443 may perform 3 axes linear interpolation. As the figure below, 3 axes linear interpolation means to move the XYZ (if Operation Theorem • 45...
Page 54
axes 0, 1, 2 are selected and assigned to be X, Y, Z respectively) position from P0 to P1 and start and stop simultaneously. The path is a straight line in space. 46 • Operation Theorem...
Page 55
P1(X1,Y1,Z1) P0(X0,Y0,Z0) X-Axis Z-Axis The speed ratio along X-axis, Y-axis and Z-axis is ( X : respectively, and the vector speed is: ∆ ∆ ∆ ∆ ∆ ∆ ∆ ∆ When calling those 3 axes linear interpolation functions, it is the vector speed to define the start velocity, StrVel, and maximum velocity, MaxVel.
4.1.6 Circular interpolation for 2 axes Any 2 of the 4 axes of PPCI7443 can perform circular interpolation. As the example below, the circular interpolation means XY (if axes 0, 1 are selected and assigned to be X, Y respectively) axes simultaneously start from initial point, (0,0) and stop at end point,(1800,600).
Page 57
(1800,600) (0,0) Center (1000,0) To specify a circular interpolation path, the following parameters must be clearly defined. Center point: The coordinate of the center of arc (In absolute mode) or The off_set distance to the center of arc(In relative mode) End point: The coordinate of end point of arc (In absolute mode) or The off_set distance to center of arc (In relative mode) Direction: The moving direction, either CW or CCW.
Sometimes, users need this kind of speed profile to make their machine run smoothly in circular interpolation mode. PPCI7443 has another groups of circular interpolation functions to perform it but they need Axis3 as an aided axis to run it. It means users can't use Axis3 for other purpose when running these functions.
4.1.8 The Relationship between Velocity and Acceleration Time. The maximum velocity parameter of a motion function has a minimum value of the acceleration time eventually. It means that there has a range in acceleration time over one velocity value. Sometimes, users want to get a smaller acceleration time under these relationships.
Page 60
You can try this function: _ 7443 _verify_speed(0,5000,&minAccT, &maxAccT,5000); The value of minAccT will be 0.0267sec and maxAccT will be 873.587sec. This minimum acceleration time can’t match our requirements, so we must use over speed value to do that. If we use over speed as 20000, _ 7443 _verify_speed(0,5000,&minAccT, &maxAccT,20000);...
Page 61
Velocity MaxV MaxV Target T MiniT MiniT Example: User’s Desired Profile : ( MaxV , Target T ) But this is not possible under this MaxV according to (MaxV, MiniT) relationship. So we must change the (MaxV, MiniT) relationship to a higher one, (MaxV , MiniT ).
_7443_start_tr_move(0,20000.0,100.0,30000.0,0.0,0.2) The second function call won’t affect the first one, actually it will be executed and write into the pre-register in PPCI7443. After the first move is finished, PPCI7443 will continue the second move according to the pre- register value. So, no time interval exists between these two moves. And pulses will be continuously generated at the instant of position “50000.0”...
Page 63
Step 0: All Register and Pre-Register is empty. Step 1: The first motion is executed and CPU writes corresponding values into pre-register 2. _7443_start_ta_move(0,50000.0,100.0,30000.0,0.1,0.0) Step 2: Since Pre-register1 & Register is empty, the data in pre-register 2 is moved to Register automatically and executed instantly by ASIC. Step 3: Then second function is called.
Page 64
Step 6: call the 4 motion function. Step 7: Wait for INT(if under DOS) / EVENT(if under Windows) of pre- register empty. Step 8: call the 5 motion function. (Repeat 7 , 8 ……continue…..) Step n: Call the last motion function and wait for all moves completion. (note: Another way to detect completion of motion is by poling.
Page 65
2 is a arc of constant velocity, which is the as the max vel of the 1 , the PPCI7443 will output constant frequency at intersection between them. 1. Continuous motion between different axes is meaningless, for different axis get its own register and pre-register system.
Page 66
Examples of continuous motion The following are example of continuous motion: 1. Single axes continuous motion: Changing velocity at preset point. Velocity Time Tdec=0 Tacc = 0 This example demonstrates how to use continuous motion function to achieve the velocity changing at pre-set point. The 1 motion (ta) moved axis to point A, with Tdec =0, and then the 2 continued instantly.
4.1.10 Home Return Mode In this mode, you can let the PPCI7443 output pulses until the condition to complete the home return is satisfied after writing the command _7443_home_move (). There are 13 home moving modes provided by home_mode” of _7443_set_home_config() PPCI7443.
Page 68
home_mode = 0: ORG Slow down Stop Ramp-down signal When SD( ) is inactive. Case 1 Case 2 Reset Case 3 Ramp-down signal When SD( ) is active. Reset Case 1 Case 2 Case 3 home_mode = 1 : ORG Slow down Stop at end of ORG Reset...
Page 69
home_mode = 2 : ORG Slow down Stop on EZ signal Reset (EZ_Count = 1) Case 1 (EZ_Count = 2) Case 2 Reset Case 3 Case 4 home_mode = 3 : ORG Slow down Stop Reset Reset (EZ_Count = 1) Case 1 (EZ_Count = 2) Case 2...
Page 70
home_mode = 4 : ORG Slow down Go back at FA speed Stop (EZ_Count = 1) Case 1 Reset (EZ_Count = 0) Case 2 Reset Case 3 Case 4 home_mode = 5 : ORG Slow down Go back Accelerate to MaxVel Slow down Stop...
Page 71
home_mode = 6 : EL only Case 1 Reset home_mode = 7 : EL Go back Stop on EZ signal (EZ_Count = 1) Case 1 Reset home_mode = 8 : EL Go back Accelerate to MaxVel Slow down Stop (EZD = 1) Case 1 Reset Operation Theorem •...
Page 72
home_mode = 9 : ORG Slow down Go back Stop at beginning edge of ORG Case 1 Case 2 Reset Case 3 home_mode = 10 : ORG Slow down Go back Stop at beginning edge of EZ (EZ_Count = 1) Case 1 Reset Case 3...
Page 73
home_mode = 11 : ORG Slow down Go back (backward) Accelerate to MaxVel Slow down Go back again (forward) Stop at beginning edge of EZ Reset (EZ_Count = 1) Case 1 (EZ_Count = 0) Case 2 Case 3 Reset Case 4 home_mode = 12 : EL Stop...
Page 74
Home Search Example (Home mode =1) Start/Direction ( - ) FL=Start Velocity FH=Max Velocity (the sign stands for direction) FA=Search Speed (half of the FH) ORG Offset Relative Functions: Moving Steps Home searching start ( - ) –EL touches, slow down and reverse moving ( + ) ORG touches, slow down Escape from ORG according to ORG offset Start searching again ( - )
4.1.11 Manual Pulser Mode For manual operation of a device, you may use a manual pulser such as a rotary encoder. The PPCI7443 can input signals from the pulser and output corresponding pulses from the OUT and DIR pins, thereby allowing you to simplify the external circuit and control the present position of axis.
4.1.13 Pulser Interpolation It is possible to use pulser for interpolation of motion (any of two axes on linear interpolation or any of two axes on circular interpolation). This mode can only work under incremental mode. Refer to the following diagram, when one of the axes function is used as dummy axis, this axis will not be allowed to used for interpolation.
4 . 2 T h e m o t o r d r i v e r i n t e r f a c e The PPCI7443 provides the INP, ALM, ERC, SVON, RDY signals for servomotor driver’s control interface.
You can change the input logic of ALM by set the parameter “alm_logic” of _7443_set_alm function and the stop mode by “alm_mode”. Whether or not the PPCI7443 is generating pulses, the ALM signal lets it output the INT signal.. The ALM status can be monitored by software function: _7443_get_io_status() .
4.2.3 The ERC signal is an output from PPCI7443. The processing of ERC signal is a hardware build-in procedure, and it is designed to cooperate with the deviation counter clear signal of servomotor driver. The deviation counter clear signal is inserted in the following 4 situations: home return is complete;...
ORG: Origin position In any operation mode, if an ±EL signal is active during moving condition, it will cause PPCI7443 to stop output pulses automatically. If an SD signal is active during moving condition, it will cause PPCI7443 to decelerate. If operating in multi-axes mode, it automatically applied to all related axes.
The EL signal can generate IRQ if the interrupt service is enabled, please refer to section 4.7. You can use either ‘a’ contact switch or ‘b’ contact switch by setting the dip switch S1. The PPCI7443 is delivered from the factory with all bits of S1 set to ON. signal status...
Command position counter The command position counter is a 28-bits binary up/down counter, and its input source is the output pulse from PPCI7443, thus, it provide as exact information of current command position. Note: the command position is different from target position. The command position increases or decreases as pulse output, while the target position changes only when a new motion command was executed.
Page 84
1,2 or 4. 4x AB phase mode is the most commonly used for incremental encoder input. For example, if a rotary encoder has 2000 pulses per phase (A or B phase), then the value read from the counter will be 8000 pulses per turn or –8000 pulses per turn depends on its turning direction.
The position error counter is used to calculate the error between command position and feedback position. The working theory is that it adds one count when PPCI7443 output one pulse and subtracts one count when PPCI7443 receives one pulse (from EA,EB). It is very useful to detect the step-losing situation (stall) of stepping motors when encoder is applied.
Page 86
_7443_set_general_counter(), _7443_get_general_counter() : Refer to section 6.15 Counter Descriptio Counter Function Function description Source Command _ 7443 _set_comm To count pulses output Set a new value for command position the number position of pulses _ 7443 _get_com Read current command output mand position:...
Target position recorder The target position recorder is very useful for providing target position information. For example, if the PPCI7443 is operating in continuous motion with absolute mode, the target position let next absolute motion knows the target position of previous one.
So it is important to identify the axis number before writing application programs. For example, if 3 PPCI7443 cards are plugged in the PCI slots. Then the corresponding axis number on each card will be: Axis No.
C h a n g e p o s i t i o n o r s p e e d o n t h e f l y The PPCI7443 provides powerful position or speed changing function while axis is moving. Changing speed/position on the fly means that the target speed/position can be altered after the motion started.
Page 90
_7443_cmp_v_change() gets almost same function _7443_v_change(), except that the _7443_cmp_v_change() act only when general comparator comes into existence. Please refer to section 4.4.4 for more detail description about general comparator. The last 4 functions are relatively easy to understand and use. So, the discussion will be focused on the _7443_v_change() Work theory of _7443_v_change() : The _7443_v_change() function is used to change the MaxVel on the fly.
Page 91
It cause axis 0 to move for 10000 pulse, and the maximum velocity is 1000 PPS. At 5000 pulse the _7443_v_change(0,NewVel,Tacc) is applied. NewVel Tacc Necessary remaining pulses (PPS) (Sec) Acceleration Deceleration Total Error 5000 5000 3000 3125 6125 Error 10000 1106 50000...
Page 92
100000pps if Sensor 3 is touched. Then the code for this application and the resulting velocity profiles are shown below. Moving part Motor Sensor 1 Sensor 2 Sensor 3 Pos=0 Pos=200000 _7443 _ fix_speed_range(axis, 100000.0); _7443_start_ta_move(axis, 200000.0, 1000, 10000, 0.02,0.01); while(!_7443_motion_done(axis)) // Get Sensor’s information from other I/O card if((Sensor1==High) &&...
4.6.2 Change position on the fly When operating in single-axis absolute pre-set motion, it is possible to change target position during moving function call _7443_p_change(). _7443_P_change() Original _7443_start_ta_move() End Point End Point Work theory of _7443_p_change() : The _7443_p_change() is applicable on _7443_start_ta_move(), and _7443_start_sa_move() only.
Page 94
_7443_start_ta_move(), and _7443_start_sa_move() only 2. Position change on deceleration period is not allowed. 3. There must be enough distance between new target position and current position where _7443_p_change() is executed. Because, PPCI7443 needs enough space to finish deceleration. For example: A trapezoidal absolute motion is applied: _ 7443_start_ta_move(0,10000,0,1000,0.5,1).
LTC3 (Axis 2) and LTC4 (Axis 3) are used to receive latch pulse. 4.7.1 Comparators of PPCI7443 There are 5 comparators in every axis of PPCI7443. Each comparator gets its unique functionality. Here is the table of description: Compare Source Description Function Related...
4.7.2 Position compare The position compare function is performed by the 5 comparator, whose comparing source is the feedback position counter. Only the first 2 axes (0 and 1) can do position compare function. The position compare function is to trigger a pulse output via CMP, when the comparing condition comes into existence.
Page 97
In this application the table is controlled by the motion command and the CCD Camera is controlled by the position comparison output of PPCI7443. The image of moving object can be got in this way easily. Working Spec: 34000 triggering points per stroke, trigger speed is 6000...
Page 98
Results: Period=166us Pulse Width 30us The compare machenism is as following: Trigger Pulse 30us width Comparator Reload Signal Value 4K 32bits FIFO 3584 points background transfer Data transfer Users needn’t to handle this interrupt Host The value block in the figure means a position which is going to be compared and users can use _7443_check_compare_data() to check it.
x moving ratio. Relative Function: _ 7443_set_trigger_comparator(), _7443_build_comp_function(), _7443_build_comp_table(), _7443_set_auto_compare(), _7443_check_compare_data(),_7443_set_trigger_type () : refer to section 6.16 4.7.3 Position Latch Position latch is a contrary function to position compare. The position compare function is to trigger a pulse output via CMP, when the comparing condition comes into existence.
Page 100
_7443_backlash_comp() In order to minimize vibration when a motor stops. The PPCI7443 can output single pulse for negative direction and then single pulse for positive direction right after completion of command movement. Refer to following figure, the function is used to set the T1 &...
Page 101
4 . 9 S o f t w a r e L i m i t F u n c t i o n The PPCI7443 provides 2 software limits for each axis. The soft limit is extremely useful to protect user’s mechanical system, for it works as a physical limit switch, when setting correctly.
Page 102
INT status can be masked by _7443_set_int_factor(). The error_int_status is for abnormal stop of PPCI7443. For example: EL, ALM …etc, these kind of INT can not be masked. The following is the definition of these two...
Page 103
18~31 (Reserved) Use Events to deal with Interrupt under Windows In order to detect the interrupt signal from PPCI7443 under Windows. Users must create events array first. Then use functions provided by PPCI7443 to get the interrupt status. The sample program is as following: Steps: 1.
Page 104
For users who use the library we provide, the names of ISR are fixed, such as: _ 7443_isr0(void), _7443_isr1(void)…etc. The sample program are described as below. It is assumed that two PPCI7443 are plugged on the slot , axis 1 and axis5 are asked to work with ISR.:...
Page 105
_7443_int_control(0,0); // disable int service _7443_close(); // Close PPCI7443 void interrupt _7443_isr0(void) { U16 irq_status; // Declaration U16 int_type; I16 i; U32 i_int_status1[4],i_int_status2[4]; disable(); // Stop all int service _7443_get_irq_status(0, &irq_status); // Check if this card’s int if(irq_status) { for(i=0;i<4;i++) _7443_enter_isr(i);...
Page 106
_OUTPORTB(0xA0, 0x20); enable(); // allow int service void interrupt _7443_isr1(void){} void interrupt _7443_isr2(void){} void interrupt _7443_isr3(void){} void interrupt _7443_isr4(void){} void interrupt _7443_isr5(void){} void interrupt _7443_isr6(void){} void interrupt _7443_isr7(void){} void interrupt _7443_isr8(void){} void interrupt _7443_isr9(void){} void interrupt _7443_isra(void){} void interrupt _7443_isrb(void){} So with the sample, user can get the interrupt signal about each axis in the motion control system.
4 . 1 1 I d l i n g c o n t r o l In this mode, when acceleration or deceleration begins, some idle pulses will be output after the starting velocity (StrVer). It begins to accelerate or decelerate after outputting these pulses.
PPCI7443 Utility provides a simple yet powerful means to setup, configure, test and debug motion control system that uses PPCI7443 cards. Note that PPCI7443 Utility is available only for Windows 95/98 or Windows NT/2000/XP with the screen resolution higher than 800x600 environment and can not run on DOS.
Before Running PPCI7443 Utility for PPCI7443, the following issues should be kept in mind. 1. PPCI7443 Utility is a program written by VB 5.0, and is available only for Windows with the screen resolution higher than 800x600 environment. It can not run on DOS.
P P C I 7 4 4 3 U t i l i t y F o r m I n t r o d u c i n g 5.3.1 Main form Te main form appears after running PPCI7443 Utility. It is used to: Select operating card and axis Go to operation forms ( refer to section 5.3.4)
5.3.3 Back: Click this button to go back main form. 5.3.3 Pulse IO & Interrupt Configuration Form In this form user can set the configuration of pulse input/output, move ration, and INT factor. 104 • PPCI7443 Utility...
Back: Click this button to go back main form. 5.3.4 Operate form: In this form user can learn and manipulate the single axis motion functions provide by PPCI7443, including velocity mode motion, preset relative/absolute motion, manual pulser move and home return. PPCI7443 Utility • 105...
Page 114
6. Show Velocity Curve Button: Clicking this button will open a form showing velocity vs. time curve. In this curve, every 100ms a new velocity data will be added in. To close it, click this button again. To clear data, click on the curve. 106 • PPCI7443 Utility...
Page 115
8. Position: Set the absolute position for “Absolute Mode”. It is only effective when “Absolute Mode” is selected. 9. Distance: Set the relative distance for “Relative Mode”. It is only effective when “Relative Mode” is selected. PPCI7443 Utility • 107...
Page 116
14. Servo On: Set the SVON signal output status. The related function is _7443_set_servo() 15. Play Key: Left play button: Click this button will cause PPCI7443 start to outlet pulses according to previous setting. In “ Absolute Mode ”, it cause axis move to position1.
Page 117
_7443_v_change() 18. Stop Button: Click this button will cause PPCI7443 to decelerate to stop. The deceleration time is defined in “Decel. Time”. The related function is _7443_sd_stop(). 19. I/O Status: The status of motion I/O. Light-On means Active, while...
This chapter describes the supporting software for PPCI7443 cards. User can use these functions to develop application program in C or Visual Basic or C++ language. If Delphi is used as programming environment, it is necessary to transform the header file,7443.h, manually.
Velocity mode motion Section 6.5 Function Name Description _7443_tv_move Accelerate an axis to a constant velocity with trapezoidal profile _7443_sv_move Accelerate an axis to a constant velocity with S-curve profile _7443_v_change Change speed on the fly _7443_sd_stop Decelerate to stop _7443_emg_stop Immediately stop _7443_fix_speed_range...
Linear Interpolated Motion Section 6.7 Function Name Description _7443_start_tr_move_xy Begin a relative 2-axis linear interpolation for X & Y, with trapezoidal profile _7443_start_ta_move_xy Begin a absolute 2-axis linear interpolation for X & Y, with trapezoidal profile _7443_start_sr_move_xy Begin a relative 2-axis linear interpolation for X & Y, with S-curve profile _7443_start_sa_move_xy Begin a absolute 2-axis linear interpolation for X &...
Circular Interpolation Motion Section 6.8 Function Name Description _7443_start_a_arc_xy Begin a absolute circular interpolation for X & Y _7443_start_r_arc_xy Begin a relative circular interpolation for X & Y _7443_start_a_arc_zu Begin a absolute circular interpolation for Z & U _7443_start_r_arc_zu Begin a relative circular interpolation for Z & U _7443_start_a_arc2 Begin a absolute circular interpolation for any 2 of the 4 axes...
Set state of general purpose output pin _7443_set_sd Set SD logic and operating mode _7443_set_el Set EL logic and operating mode Motion I/O Monitoring Section 6.13 Function Name Description _7443_get_io_status Get all the motion I/O status of PPCI7443 Function Library • 115...
Interrupt Control Section 6.14 Function Name Description _7443_int_control Enable/Disable INT service _7443_int_enable Enable event (For Window only) _7443_int_disable Disable event (For Window only) _7443_get_int_status Get INT Status (For Window only) _7443_link_interrupt Set link to interrupt call back function (For Window only) _7443_set_int_factor Set INT factor _7443_get_int_type...
Position Compare and Latch Section 6.16 Function Name Description _7443_set_ltc_logic Set the LTC logic _7443_get_latch_data Get latched counter data _7443_set_soft_limit Set soft limit _7443_enable_soft_limit Enable soft limit function _7443_disable_soft_limit Disable soft limit function _7443_set_error_counter_check Step-losing detection _7443_set_general_comparator Set general-purposed comparator _7443_set_trigger_comparator Set Trigger comparator _7443_set_trigger_type...
Page 126
This section gives the details of all the functions. The function prototypes and some common data types are decelerated in PPCI7443.H. These data types are used by PPCI7443 library. We suggest you to use these data types in your application programs. The following table shows the data type names and their range.
Page 127
_7443_close : This function is used to close PPCI7443 card and release the PPCI7443 related resources, which should be called at the end of an application. _7443_get_irq_channel : This function is used to get the PPCI7443 card’s IRQ number.
Page 128
The PPCI7443 card index number. *irq_no: Irq number of specified PPCI7443 card. *base_addr: base address of specified PPCI7443 card *Filename: The specified filename recording the configuration of PPCI7443. This file must be created by PPCI7443 Utility. AxisNo: axis number designated to move or stop.
Page 129
6 . 4 P u l s e I n p u t / O u t p u t C o n f i g u r a t i o n @ Name _7443_set_pls_outmode – Set the configuration for pulse command output. _7443_set_pls_iptmode –...
Page 130
@ Argument AxisNo: axis number designated to configure pulse Input/Output. pls_outmode: setting of command pulse output mode Value Meaning OUT/DIR OUT Falling edge, DIR+ is high level OUT/DIR OUT Rising edge, DIR+ is high level OUT/DIR OUT Falling edge, DIR+ is low level OUT/DIR OUT Rising edge, DIR+ is low level CW/CCW...
Page 131
6 . 5 V e l o c i t y m o d e m o t i o n @ Name _7443_tv_move – Accelerate an axis to a constant velocity with trapezoidal profile _7443_sv_move – Accelerate an axis to a constant velocity with S-curve profile _7443_v_change –Change speed on the fly _7443_sd_stop –Decelerate to stop _7443_emg_stop –Immediately stop...
Page 132
before starting motion that may contains velocity changing. _7443_unfix_speed_range This function is used to Release the speed range constrain. _7443_get_current_speed This function is used to read current pulse output rate of specified axis. It is applicable in any time and any operating mode. _7443_verify_speed Find a speed profile’s minimum and maximum acc/time time.
Page 133
@ Argument AxisNo: axis number designated to move or stop. StrVel: starting velocity in unit of pulse per second MaxVel: maximum velocity in unit of pulse per second Tacc: specified acceleration time in unit of second SVacc: specified velocity interval in which S-curve acceleration is performed.
Page 134
6 . 6 S i n g l e A x i s P o s i t i o n M o d e @ Name _7443_start_tr_move – Begin a relative trapezoidal profile move _7443_start_ta_move – Begin an absolute trapezoidal profile move _7443_start_sr_move –...
Page 135
Slow-Down signal input or as Position Change Signal (PCS) input. Please refer to section 4.3.1 _7443_backlash_comp : Whenever direction change is occurred, The PPCI7443 outputs backlash corrective pulses before sending commands. This function is used set the compensation pulse numbers.
Page 136
_7443_set_idle_pulse : The idling pulse to control the vibration of the machine is set up. Acceleration is made to start after number pulse idling is outputted at a start speed when a movement starts. Attention : Set up 2 - 7 in the setup value when you use this function. Set up 0 or 1 when you don't use it.
Page 137
Visual Basic (Windows 95/NT) B_7443_start_tr_move (ByVal AxisNo As Integer, ByVal Dist As Double, ByVal StrVel As Double, ByVal MaxVel As Double, ByVal Tacc As Double, ByVal Tdec As Double) As Integer B_7443_start_ta_move (ByVal AxisNo As Integer, ByVal Pos As Double, ByVal StrVel As Double, ByVal MaxVel As Double, ByVal Tacc As Double, ByVal Tdec As Double) As Integer B_7443_start_sr_move (ByVal AxisNo As Integer, ByVal Dist As Double,...
Page 138
@ Argument AxisNo: axis number designated to move or change position. Dist: specified relative distance to move Pos: specified absolute position to move StrVel: starting velocity of a velocity profile in unit of pulse per second MaxVel: maximum velocity of a velocity profile in unit of pulse per second Tacc: specified acceleration time in unit of second Tdec: specified deceleration time in unit of second SVacc: specified velocity interval in which S-curve acceleration is...
Page 139
6 . 7 L i n e a r I n t e r p o l a t e d M o t i o n @ Name _7443_start_tr_move_xy – Begin a relative 2-axis linear interpolation for X & Y, with trapezoidal profile, _7443_start_ta_move_xy –...
Page 142
B_7443_start_sa_move_xy (ByVal CardNo As Integer, ByVal Pos As Double, ByVal Pos As Double, ByVal StrVel As Double, ByVal MaxVel As Double, ByVal Tacc As Double, ByVal Tdec As Double, ByVal SVacc As Double, ByVal SVdec As Double) As Integer B_7443_start_tr_move_zu (ByVal CardNo As Integer, ByVal Dist As Double, ByVal Dist As Double, ByVal StrVel As Double, ByVal MaxVel As Double, ByVal Tacc As Double, ByVal Tdec As Double) As Integer B_7443_start_ta_move_zu (ByVal CardNo As Integer, ByVal Pos As...
Page 143
B_7443_start_sa_line3 (ByVal CardNo As Integer, AxisArray As Integer, ByVal PosX As Double, ByVal PosY As Double, ByVal PosZ As Double, ByVal StrVel As Double, ByVal MaxVel As Double, ByVal Tacc As Double, ByVal Tdec As Double, ByVal SVacc As Double, ByVal SVdec As Double) As Integer B_7443_start_tr_line4 (ByVal CardNo As Integer, ByVal DistX As Double, ByVal DistY As Double, ByVal DistZ As Double, ByVal DistU As...
Page 144
@ Argument CardNo: Card number designated to perform linear interpolation DistX: specified relative distance of axis 0 to move DistY: specified relative distance of axis 1 to move DistZ: specified relative distance of axis 2 to move DistU: specified relative distance of axis 3 to move PosX: specified absolute position of axis 0 to move PosY: specified absolute position of axis 1 to move PosZ: specified absolute position of axis 2 to move...
Page 145
6 . 8 C i r c u l a r I n t e r p o l a t i o n M o t i o n @ Name _7443_start_r_arc_xy – Begin a relative circular interpolation for X & Y _7443_start_a_arc_xy –...
Page 148
B_7443_start_a_arc2 (ByVal CardNo As Integer, AxisArray As Integer, ByVal Cx As Double, ByVal Cy As Double, ByVal Ex As Double, ByVal Ey As Double, ByVal DIR As Integer, ByVal MaxVel As Double) As Integer B_7443_start_r_arc2 (ByVal CardNo As Integer, AxisArray As Integer, ByVal OffsetCx As Double, ByVal OffsetCy As Double, ByVal OffsetEx As Double, ByVal OffsetEy As Double, ByVal DIR As Integer, ByVal MaxVel As Double) As Integer...
Page 149
B_7443_start_ta_arc2 (ByVal CardNo As Integer, AxisArray As Double, ByVal Cx As Double, ByVal Cy As Double, ByVal Ex As Double, ByVal Ey As Double, ByVal DIR As Integer, ByVal StrVel As Double, ByVal MaxVel As Double, ByVal Tacc As Double, ByVal Tdec As Double) As Integer B_7443_start_sr_arc2 (ByVal CardNo As Integer, AxisArray As Double, ByVal OffsetCx As Double, ByVal OffsetCy As Double, ByVal...
Page 150
B_7443_start_sa_arc_zu (ByVal CardNo As Integer, ByVal Cx As Double, ByVal Cy As Double, ByVal Ex As Double, ByVal Ey As Double, ByVal DIR As Integer, ByVal StrVel As Double, ByVal MaxVel As Double, ByVal Tacc As Double, ByVal Tdec As Double, ByVal SVacc As Double, ByVal SVdec As Double) As Integer @ Argument CardNo: Card number designated to perform linear interpolation...
Page 151
6 . 9 H o m e R e t u r n M o d e @ Name _7443_set_home_config – Set the configuration for home return. _7443_home_move – Perform a home return move. _7443_escape_home – Escape Home Function _7443_home_search –Auto-Search Home Switch (Without ORGOffset) _7443_auto_home_search –Auto-Search Home Switch (With ORGOffset) @ Description _7443_set_home_config:...
Page 152
B_7443_auto_home_search(ByVal AxisNo As Integer, ByVal StrVel As Double, ByVal MaxVel As Double, ByVal Tacc As Double, ByVal ORGOffset As Double)As Integer @ Argument AxisNo: axis number designated to configure and perform home returning home_mode: stopping modes for home return, 0~12 (Please refer to section 4.1.8) org_logic: Action logic configuration for ORG signal org_logic=0, active low;...
Page 153
6 . 1 0 M a n u a l P u l s e r M o t i o n @ Name _7443_set_pulser_iptmode - set the input signal modes of pulser _7443_pulser_vmove – manual pulser v_move _7443_pulser_pmove – manual pulser p_moce _7443_pulser_home_move –...
Page 155
@ Argument AxisNo: axis number designated to start manual move InputMode: setting of manual pulser input mode from PA and PB pins ipt_mode=0, 1X AB phase type pulse input. ipt_mode=1, 2X AB phase type pulse input. ipt_mode=2, 4X AB phase type pulse input. ipt_mode=3, CW/CCW type pulse input.
Page 156
6 . 1 1 M o t i o n S t a t u s @ Name _7443_motion_done – Return the motion status @ Description _7443_motion_done: Return the motion status of PPCI7443. @ Syntax C/C++ (DOS, Windows 95/NT) I16 _7443_motion_done(I16 AxisNo); Visual Basic (Windows 95/NT)
Page 157
6 . 1 2 M o t i o n I n t e r f a c e I / O @ Name _7443_set_alm – Set alarm logic and operating mode _7443_set_el – Set EL logic and operating mode _7443_set_inp–...
Page 158
B_7443_set_sd (ByVal AxisNo As Integer, ByVal enable As Integer, ByVal sd_logic As Integer, ByVal sd_latch As Integer, ByVal sd_mode As Integer) As Integer @ Argument AxisNo: axis number designated to configure alm_logic: setting of active logic for ALARM signal alm_logic=0, active LOW. alm_logic=1, active HIGH.
Page 159
6 . 1 3 M o t i o n I / O M o n i t o r i n g @ Name _7443_get_io_status –Get all the motion I/O status of PPCI7443 @ Description _7443_get_io_status: Get all the I/O status for each axis. The definition for each bit is as...
Page 160
_7443_set_int_factor(). The error_int_status is for abnormal stop of PPCI7443, for example: EL, ALM …etc. This kind of INT cannot be masked. The following is the definition of these two int_status. By setting the relative bit as 1, PPCI7443 can generate INT signal to host PC.
Page 161
Description Normal Stop Next command continued Command pre-register 2 is empty (Reserved) Acceleration Start Acceleration End Deceleration Start Deceleration End (Reserved) (Reserved) (Reserved) General Comparator compared Compared triggered for axis 0,1 (Reserved) Latched for axis2,3 ORG on SD on (Reserved) (Reserved) CSTA, Sync.
Page 162
error_int_status : can not be masked Interrupt Factor +SL Stop -SL Stop (Reserved) General Comparator Stop (Reserved) (Reserved) (Reserved) SD on then stop (Reserved) Interpolation Error and stop Other Axis stop on Interpolation Pulser input buffer overflow and stop Interpolation counter overflow Encoder input signal error Pulser input signal error 18~31...
Page 163
ORG on SD on (Reserved) (Reserved) CSTA, Sync. Start on 17~31 (Reserved) _7443_link_interrupt: (For Window only.) This function is used to link interrupt call back function. _7443_get_int_type: ( This function is for DOS only ) This function is used to detect which kind of INT occurred. _7443_enter_isr: ( This function is for DOS only ) This function is used to inform system that process is now entering...
Page 165
@ Argument cardNo: card number 0,1,2,3… AxisNo: axis number 0,1,2,3,4… intFlag: int flag, 0 or 1 (0: Disable, 1:Enable) int_factor: interrupt factor, refer to previous table *int_type: Interrupt type, (1: error int, 2: event int, 3: both happened ) *event_int: event_int_status, , refer to previous table *error_int: error_int_status, refer to previous table *sts: (0: not this card’s IRQ, 1: this card’s IRQ) *phEvent: event handler (Windows)
Page 166
0.5, than the value read will be twice as the counter value. The source of feedback counter is selectable by function _7443_set_feedback_src() to be external EA/EB or pulse output of PPCI7443. _7443_set_position(): This function is used to change the feedback position counter to the specified value.
Page 167
_7443_get_target_pos(): This function is used to read the value of target position recorder. The target position recorder is maintained by PPCI7443 software driver. It records the position to settle down for current running motion. _7443_reset_target_pos(): This function is used to set new value for target position recorder. It...
Page 168
Visual Basic (Windows 95/NT) B_7443_get_position (ByVal AxisNo As Integer, Pos As Double) As Integer B_7443_set_position (ByVal AxisNo As Integer, ByVal Pos As Double) As Integer B_7443_get_command (ByVal AxisNo As Integer, cmd As Long) As Integer B_7443_set_command (ByVal AxisNo As Integer, ByVal cmd As Long) As Integer B_7443_get_error_counter (ByVal AxisNo As Integer, error_counter As Integer) As Integer...
Page 169
@ Description _7443_set_ltc_logic(): This function is used to set the logic of latch input. This function is applicable only for last two axes in every PPCI7443 card. _7443_get_latch_data(): After the latch signal arrived, this function is used to read the latched value of counters.
Page 170
PC. If _7443_set_auto_compare is used, then comparing value set by this function will be ignored automatically. Note: it is applicable only for first two axes in every PPCI7443 card. _7443_set_trigger_type(): This function is used to set the trigger output mode.
Page 172
B_7443_check_compare_status (ByVal AxisNo As Integer, cmp_sts As Integer) As Integer B_7443_set_auto_compare (ByVal AxisNo As Integer, ByVal SelectSrc As Integer) As Integer B_7443_build_compare_function (ByVal AxisNo As Integer, ByVal Start As Double, ByVal End As Double, ByVal Interval As Double, ByVal Device As Integer) As Integer B_7443_build_compare_table (ByVal AxisNo As Integer, TableArray As Double, ByVal Size As Integer, ByVal Device As Integer) As Integer B_7443_cmp_v_change(ByVal AxisNo, ByVal Res_dist as Double, ByVal...
Page 173
CmpAction: The reacting mode when comparison comes into exist CmpAction =0, INT only CmpAction =1, Immediately stop CmpAction =2, slow down then stop CmpAction =3, speed change Data: Comparing value, TriggerType: Selection of type of trigger output mode Hardware Version A2 TriggerType =0, one shoot (default) TriggerType =1, constant high Hardware Version A3...
Page 175
6 . 1 7 C o n t i n u o u s m o t i o n @ Name _7443_set_continuous_move – Enable continuous motion _7443_check_continuous_buffer – check if the buffer is empty @ Description _7443_set_continuous_move(): This function is necessary to placed before and after continuous motion.
Page 176
6 . 1 8 M u l t i p l e A x e s S i m u l t a n e o u s O p e r a t i o n @ Name _7443_set_tr_move_all – Multi-axis simultaneous operation setup. _7443_set_ta_move_all –...
Page 177
_7443_set_sync_option() It has many functions. It lets two or more different command groups start at the same time. For example, if you want a 2-axis linear interpolation and a 1-axis single motion start at the same time, you can turn on this option before command starts.
Page 178
B_7443_set_sync_stop_mode (ByVal AxisNo As Integer, ByVal stop_mode As Integer) As Integer @ Argument TotalAxes: number of axes for simultaneous motion, 1~48. * AxisArray: specified axes number array designated to move. * DistA: specified position array in unit of pulse * StrVelA: starting velocity array in unit of pulse per second * MaxVelA : maximum velocity array in unit of pulse per second * TaccA: acceleration time array in unit of second * TdecA: deceleration time array in unit of second...
Page 179
6 . 1 9 G e n e r a l - p u r p o s e d T T L o u t p u t @ Name _7443_d_output – Digital Output _7443_get_dio_status – Get DIO status @ Description _7443_d_output(): Set the on_off status for general-purposed TTL Digital output pin.
G e n e r a l D e s c r i p t i o n o f W i r i n g CN1: Receives +24V power from external power supply. CN2 :Main connection between PPCI7443 and pulse input servo driver or stepping driver.
C o n n e c t i o n E x a m p l e w i t h S e r v o D r i v e r In this section, we use Panasonic Servo Driver as an example to show how to connect it with PPCI7443 . Figure 7.2 show the wiring. Note that: 1.
Page 182
OA - (50-200 W) EB1 + OB + EB1 - OB - EZ1 + OZ + EZ1 - OZ - EX +5V EX GND PEL1 MEL1 CMP1 ORG1 Table Figure 7.2 Connection of PPCI7443 with Panasonic Driver 174 • Connection Example...
Page 183
Wiring of PPCI7443 with SANYO AC Servo PY2 PPCI7443 Axis 1 Servo Driver OUT1 + OUT1 - DIR + DIR - EX GND DC24V COM EX +24V DC24V EX +24V DC24V SVON 1 Servo ON ERC 1 NROT ALM 1...
Need help?
Do you have a question about the PPCI7443 and is the answer not in the manual?
Questions and answers