Page 3
This manual may not be copied or reproduced in whole or in part without the express written consent of Delta Electronics. Trademarks Windows NT/2000/XP, Visual Studio, Visual C++, Visual BASIC are all registered trademarks of Microsoft Corporation.
PCI-DMC-A01 / PCI-DMC-B01 Programming Manual Table of Contents Chapter 1 Introduction to the API Function Library --------------------------------------------------- 1-1 Using the Function Libraries ---------------------------------------------------------------------- 1-1 Edit New Project ------------------------------------------------------------------------------------- 1-1 1.2.1 Using VC ----------------------------------------------------------------------------------- 1-1 1.2.2 Using Borland C -------------------------------------------------------------------------- 1-1 1.2.3 Using VB ------------------------------------------------------------------------------------ 1-2 1.2.4...
Page 5
PCI-DMC-A01 / PCI-DMC-B01 Programming Manual Velocity Motion Control (2) ----------------------------------------------------------------------- 3-19 3.7.1 Function List ------------------------------------------------------------------------------ 3-19 3.7.2 Sample Application ---------------------------------------------------------------------- 3-19 Point to Point Motion Control -------------------------------------------------------------------- 3-21 3.8.1 Overview ----------------------------------------------------------------------------------- 3-21 3.8.2 Function List ------------------------------------------------------------------------------ 3-21 3.8.3 Sample Application ---------------------------------------------------------------------- 3-22 Linear Interpolation Motion Control ------------------------------------------------------------ 3-26 3.9.1 Overview ----------------------------------------------------------------------------------- 3-26...
Page 6
PCI-DMC-A01 / PCI-DMC-B01 Programming Manual 3.18 Change Velocity ------------------------------------------------------------------------------------ 3-63 3.18.1 Function List ------------------------------------------------------------------------------ 3-63 3.18.2 Sample Application ---------------------------------------------------------------------- 3-63 3.19 Remote I/O Module-I/O Port --------------------------------------------------------------------- 3-67 3.19.1 Function List ------------------------------------------------------------------------------ 3-67 3.19.2 Sample Application ---------------------------------------------------------------------- 3-67 3.20 Remote I/O Module- Manual Pulse Generator (1) ----------------------------------------- 3-70 3.20.1 Function List ------------------------------------------------------------------------------ 3-70 3.20.2 Sample Application ---------------------------------------------------------------------- 3-70 3.21 Remote I/O Module- Manual Pulse Generator (2) ----------------------------------------- 3-73...
Page 7
PCI-DMC-A01 / PCI-DMC-B01 Programming Manual 3.30 Axis Group ----------------------------------------------------------------------------------------- 3-116 3.30.1 Function List ---------------------------------------------------------------------------- 3-116 3.30.2 Sample Application -------------------------------------------------------------------- 3-116 3.31 Speed Continue ---------------------------------------------------------------------------------- 3-119 3.31.1 Function List ---------------------------------------------------------------------------- 3-119 3.31.2 Sample Application -------------------------------------------------------------------- 3-119 3.32 Spiral Interpolation - Helix Using -Sp1_ Normal Follow -------------------------------- 3-122 3.32.1 Function List ---------------------------------------------------------------------------- 3-122 3.32.2 Sample Application -------------------------------------------------------------------- 3-122 3.33 Logger ---------------------------------------------------------------------------------------------- 3-130...
Chapter 1 Introduction to the API Function Library | PCI-DMC-A01 / PCI-DMC-B01 Chapter 1 Introduction to the API Function Library PCI-DMC-A01 provides a function library and dynamic-link library (DLL) which can be called upon to perform functions as you require. The following sections will detail how you can incorporate these function libraries into your development environment.
Chapter 1 Introduction to the API Function Library | PCI-DMC-A01 / PCI-DMC-B01 2. Under the Borland C++ Build development environment, select View/ Project Manager Add the function library “..\lib\BCBPCI_DMC_01.lib” to your new project. 3. Once set, you can begin using the API to control PCI-DMC-A01. 1.2.3 Using VB Under the installation directory “..\ \PCI-DMC-A01\inc\VB”...
Chapter 2 Command Return Values and Messages | PCI-DMC-A01 / PCI-DMC-B01 Chapter 2 Command Return Values and Messages Error Codes When you use API for PCI-DMC-A01, the function library will generally return one of the error codes listed in Table 2.1. If the API function's return value is 0, then the API function was executed successfully.
Page 20
Chapter 2 Command Return Values and Messages | PCI-DMC-A01 / PCI-DMC-B01 Error Return Code Error Code Error Description (Decimal) ERR_SpeedLimitError Defined velocity exceeds maximum velocity ERR_Security_Page Security page must be smaller than 16 ERR_Slave_Security_op Security slave_operate command failed ERR_channel_no channel no error “_DMC_01_pci_initial”...
Page 21
Chapter 2 Command Return Values and Messages | PCI-DMC-A01 / PCI-DMC-B01 Error Return Code Error Code Error Description (Decimal) ERR_SDStop_On Currently executing deceleration/stop command, Unable to receive new commands ERR_VelChange_supper Unable to execute velocity change function (Feedhold, Synch, and Deceleration) ERR_Command_set Unable to repeat FeedHold command ERR_sdo_message_choke...
Chapter 2 Command Return Values and Messages | PCI-DMC-A01 / PCI-DMC-B01 Error Code Example The following example is a return function. You can use it as a reference to create new functions that meet your control requirements. Example Void error (unsigned short rc) // Function that returns error code;...
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 Chapter 3 Operating Principles Card Initialization 3.1.1 Function List Table 3.1 Function Name _DMC_01_open _DMC_01_get_CardNo_seq _DMC_01_check_card_running _DMC_01_reset_card _DMC_01_close _DMC_01_pci_initial _DMC_01_initial_bus _DMC_01_start_ring _DMC_01_get_device_table _DMC_01_get_node_table 3.1.2 Sample Application Program Appearance Figure 3.1 1) Open card Figure 3.2 Revised March, 2012...
Page 24
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 Click on the “Open card” button to execute the following procedure: /* gDMCExistCards variable is set as the number of PCI-DMC-A01 on the PC*/ rt = _DMC_01_open(&gDMCExistCards); 2) Card initialization Figure 3.3 Click on the “Card init”...
Page 25
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 NOTE _DMC_01_get_device_table Get the Slot ID using the PDO protocol Example: gpDeviceInfo[gDMCCardNo] is a “WORD” type variable. If its value is 7, the binary form is expressed as “0000 0000 0000 0111”, so Slave devices with Slot IDs “1”, “2”...
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 Read/Write Driver Parameters 3.2.1 Function List Table 3.2 Function Name _DMC_01_set_pdo_mode _DMC_01_read_servo_parameter _DMC_01_write_servo_parameter 3.2.2 Sample Application Program Appearance Figure 3.6 1) Card Initialization and Mode Switching Figure 3.7 Click on “Open card” to execute card initialization and set SDO mode. For detailed instructions on card initialization, please refer to the functions described in Section 3.1 between “Open card”...
Page 27
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 The last argument [Enable] is used to set whether PDO mode is used for Slave communications or not. Please refer to the section on this function for a more detailed description of this argument. In the above example, the value of the argument is 0.
Page 28
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 4) Write servo parameter Figure 3.10 As shown in Fig. 3.10, if you wish to write a parameter value to servo then you must input the desired value in the edit box and then click on the “Write” button to execute the following procedure: rt = _DMC_01_write_servo_parameter(gDMCCardNo, NodeID, SlotID, group, idx, data);...
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 CANopen Protocol 3.3.1 Function List Table 3.3 Function Name _DMC_01_set_pdo_mode _DMC_01_send_message _DMC_01_read_message _DMC_01_get_message 3.3.2 Sample Application Program Appearance Figure 3.11 1) Initialize card and set Slave communications to SDO mode. Click on the “Open card” button shown in Fig. 3.11 to initialize card and set SDO mode.
Page 30
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 You input the value of the “NodeID”. The value will reflect the Slave ID you wish to set up. Please refer to th CANopen manual (DS 402) for setting the “Index”, “Sub” and “Type”...
Page 31
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 Homing Motion Control 3.4.1 Overview Most application programs use an incremental encoder to retrieve position feedback. A homing operation is essential to performing accurate motion control. After the power is switched on, the status of the machine bench's position can be in one of three states.
Page 32
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 3.4.2 Function List Table 3.4 Function Name _DMC_01_set_home_config _DMC_01_set_home_move _DMC_01_escape_home_move 3.4.3 Sample Application Program Appearance Figure 3.17 1) Open card and initialization Click on the “Initial” button to open and initialize the card. For a detailed description of card initialization, please refer to “Open card”...
Page 33
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 2) Enter the values of the arguments for motion control Figure 3.18 NodeID item: API function's argument variable “NodeID”. Timer Checkbox: Check to display the motion status. Uncheck to disable display. Vel. item: Number of pulses per second. API function's argument variable “MaxVel”.
Page 34
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 5) Homing operation See Fig. 3.20. Click on “Move” to begin executing the following procedure; /* Set homing mode: 1~35, offset and velocity parameters */ rt = _DMC_01_set_home_config(gDMCCardNo, NodeID, SlotID, home_mode, home_offset, StrVel, MaxVel, acc); /* Start homing motion */ rt = _DMC_01_set_home_move(gDMCCardNo, NodeID, SlotID);...
Page 35
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 Torque Motion Control 3.5.1 Function List Table 3.5 Function Name _DMC_01_set_torque_mode _DMC_01_set_torque _DMC_01_set_torque_stop _DMC_01_get_torque 3.5.2 Sample Application Program Appearance Figure 3.21 1) Card initialization Click on the “Initial” button to open and initialize the card. For a detailed description of card initialization, please refer to “Open card”...
Page 36
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 Input Node ID and check the “Timer” checkbox to enable motion status display NodeID item: API function argument variable “NodeID”. Timer Checkbox: Check to display the motion status. Uncheck to disable display. 3) Enter values for slope and ratio Figure 3.23 Slope item: Time required to go from 0 to 100% rate torque.
Page 37
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 7) Exit procedure Click on the “Exit” button to quit and exit the procedure. “_DMC_01_reset_card” and “_DMC_01_close” must be executed to exit this function. Please refer to Section 3.12 “Exit procedure” for the function operations. Revised March, 2012 3-15...
Page 38
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 Velocity Motion Control (1) 3.6.1 Function List Table 3.6 Function Name _DMC_01_set_velocity_mode _DMC_01_set_velocity _DMC_01_set_velocity_stop _DMC_01_get_rpm 3.6.2 Sample Application Program Appearance Figure 3.25 1) Card initialization Click on the “Initial” button to open and initialize the card. For a detailed description of card initialization, please refer to “Open card”...
Page 39
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 Input Node ID and check the “Timer” checkbox to enable motion status display NodeID item: API function's argument variable “NodeID”. Timer Checkbox: Check to display the motion status. Uncheck to disable display. 3) Enter the values for acceleration/deceleration time and rotations per minute (RPM) Figure 3.27 Tacc item API function's argument variable “Tacc”.
Page 40
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 6) Display current RPM value rt = _DMC_01_get_rpm (gDMCCardNo, NodeID, SlotID, & rpm); // Value returned by RPM variableActual motion RPM is 10% of RPM variable value 7) Exit procedure Click on the “Exit” button to quit and exit the procedure. “_DMC_01_reset_card”...
Page 41
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 Velocity Motion Control (2) 3.7.1 Function List Table 3.7 Function Name _DMC_01_tv_move _DMC_01_sv_move _DMC_01_emg_stop 3.7.2 Sample Application Program Appearance Figure 3.29 1) Card initialization Click on the “Initial” button to open and initialize the card. For a detailed description of card initialization, please refer to “Open card”...
Page 42
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 3) Enter the values of the arguments for motion control Figure 3.31 StrVel item: Starting velocity. API function's argument variable “StrVel”. MaxVel item: Maximum velocity. API function's argument variable “MaxVel”. Acc. item: Time required to reach maximum velocity. API function's argument variable “acc”.
Page 43
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 Point to Point Motion Control 3.8.1 Overview Point to point motion control can be used with single and multi-axes. For single- or multi-axes point to point motion control, PCI-DMC-A01 absolute or relative coordinate motion modes with a S-Curve or T-curve velocity cross-section. Figure 3.32 Fig.
Page 44
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 3.8.3 Sample Application Program Appearance Figure 3.33 1) Card initialization Click on the “Initial” button to open and initialize the card. For a detailed description of card initialization, please refer to “Open card” and “Card initialization”...
Page 45
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 3) Enter the values of the arguments for motion control Figure 3.35 StrVel item: Starting velocity. API function's argument variable “StrVel”. MaxVel item: Maximum velocity. API function's argument variable “MaxVel”. Acc. item: Time required to reach maximum velocity. API function's argument variable “acc”.
Page 46
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 6) Start point to point motion control Click on the “” or ““ button to execute the following procedure: rt = _DMC_01_start_sa_move(gDMCCardNo, NodeID, SlotID, Distance, StrVel, MaxVel, acc, dec); // Motion displacement using absolute coordinates with S-curve velocity cross-section rt = _DMC_01_start_ta_move(gDMCCardNo, NodeID, SlotID, Distance, StrVel, MaxVel, acc, dec);...
Page 47
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 Motion counter value: rt = _DMC_01_get_command(gDMCCardNo, NodeID, SlotID, &cmd); // Get value of command counter rt = _DMC_01_get_position(gDMCCardNo, NodeID, SlotID, &pos); // Get value of feedback counter Motion status: rt = _DMC_01_get_current_speed(gDMCCardNo, NodeID, SlotID, &speed); // Get velocity of current motion rt = _DMC_01_motion_status(gDMCCardNo, NodeID, SlotID, &MC_status);...
Page 48
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 Linear Interpolation Motion Control 3.9.1 Overview If you wish to use CANopen PDO protocol for motion control you must operate in the CANopen IP mode. PCI-DMC-A01 supports 2~3 axis linear interpolation in absolute or relative coordinate motion modes under the S-curve or T-curve velocity cross-section.
Page 49
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 3.9.3 Sample Application Program Appearance Figure 3.41 1) Card initialization Click on the “Initial” button to start card initialization. For a detailed description of card initialization, please refer to Section 3.1.2 - 1) Open card.
Page 50
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 3) Enter the values of the arguments for motion control Figure 3.43 StrVel item: Starting velocity. API function's argument variable “StrVel”. MaxVel item: Maximum velocity. API function's argument variable “MaxVel”. Acc. item: Time required to reach maximum velocity. API function's argument variable “acc”.
Page 51
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 6) Start motion control with linear interpolation in 2 or 3 axes Click on the “” or ““ button to execute the following procedure: 2-axis linear interpolation: rt = _DMC_01_start_sa_move_xy(gDMCCardNo, gLine2, gSlot2, Distance, Distance, StrVel, MaxVel, acc, dec);...
Page 52
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 7) Stop motion Figure 3.46 Hit the “STOP” button to execute an emergency stop: rt = _DMC_01_emg_stop (gDMCCardNo, NodeID, SlotID); In this example, emergency stop is used to stop motion. This method quickly stops motion by setting deceleration time to 0.
Page 53
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 3.10 Arc Interpolation Motion Control 3.10.1 Overview PCI-DMC-A01 supports 2-axis arc interpolation in absolute or relative coordinate motion modes under the S-curve or T-curve velocity cross-section. Fig. 3.44 illustrates arc interpolation on any 2 axes. The start point is P0 (X0, Y0) and end point is P1(X1, Y1).
Page 54
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 3.10.3 Sample Application Program Appearance Figure 3.48 1) Card initialization Click on the “Initial” button to open and initialize the card. For a detailed description of card initialization, please refer to “Open card” and “Card initialization”...
Page 55
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 StrVel item: Starting velocity. API function's argument variable “StrVel”. MaxVel item: Maximum velocity. API function's argument variable “MaxVel”. Acc. item: Time required to reach maximum velocity. API function's argument variable “acc”. Dec item: Time required to go from maximum velocity to 0. API function's argument variable “dec”.
Page 58
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 Hit the “STOP” button to execute an emergency stop: rt = _DMC_01_emg_stop (gDMCCardNo, NodeID, SlotID); In this example, emergency stop is used to stop motion. This method quickly stops motion by setting deceleration time to 0. For more information about the Stop Motion function, refer to the later section on “Stop Motion Control API”.
Page 59
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 3.11 Spiral Interpolation Motion Control -Helix 3.11.1 Function List Table 3.11 Function Name _DMC_01_start_tr_heli_xy _DMC_01_start_sr_heli_xy _DMC_01_start_ta_heli_xy _DMC_01_start_sa_heli_xy 3.11.2 Sample Application Program Appearance Figure 3.54 Revised March, 2012 3-37...
Page 60
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 1) Card initialization Click on the “Initial” button to open and initialize the card. For a detailed description of card initialization, please refer to “Open card” and “Card initialization” in Section 3.1.2. 2) Get Slot ID and enable motion status display Figure 3.55 Check the “Timer”...
Page 61
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 rt = _DMC_01_motion_status(gDMCCardNo, NodeID, SlotID, &MC_status); // Get current status rt = _DMC_01_motion_done(gDMCCardNo, NodeID, SlotID, &MC_done); // Get current motor status 3) Enter the argument values and chosen velocity cross-section for motion control Figure 3.56 StrVel item: Starting velocity.
Page 62
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 Figure 3.57 4) Set Servo Motor Power ON/OFF(servo on/servo off) Figure 3.58 Click on the “SVON” button to execute the following procedure: rt = _DMC_01_ipo_set_svon(gDMCCardNo, NodeID, SlotID , ON_OFF); // ON_OFF: 0 – Servo Power OFF; 1 – Servo Power ON 5) Start spiral interpolation motion control Click on the “”...
Page 63
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 6) Stop motion Hit the “STOP” button to execute an emergency stop: rt = _DMC_01_emg_stop (gDMCCardNo, NodeID, SlotID); In this example, emergency stop is used to stop motion. This method quickly stops motion by setting deceleration time to 0.
Page 64
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 3.12 Continuous Interpolation Motion Control 3.12.1 Overview A series of motion commands can be used to describe a square path with rounded corners. PCI-DMC-A01 supports using the 20-unit software FIFO in Motion ASIC for motion control during continuous interpolation.
Page 65
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 3.12.3 Sample Application If you wish to perform the continuous interpolation motion illustrated below, you must execute the following procedure and carry out the commands from ➀ ~ ➇: Figure 3.60 Program Appearance Figure 3.61 Revised March, 2012 3-43...
Page 66
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 1) Card initialization Click on the “Initial” button to open and initialize the card. For a detailed description of card initialization, please refer to “Open card” and “Card initialization” in Section 3.1.2. 2) Get Slot ID and enable motion status display Figure 3.62 Check the “Timer”...
Page 67
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 5) Set Servo Motor Power ON/OFF(servo on/servo off) Figure 3.65 Click on the “SVON” button to execute the following procedure: rt = _DMC_01_ipo_set_svon(gDMCCardNo, NodeID, SlotID , ON_OFF); // ON_OFF: 0 – Servo Power OFF; 1 – Servo Power ON 6) Click on the “Move”...
Page 68
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 V-T diagram of actual X-axis motion: Figure 3.66 7) Stop motion Hit the “STOP” button to execute an emergency stop: rt = _DMC_01_emg_stop (gDMCCardNo, NodeID, SlotID); In this example, emergency stop is used to stop motion. This method quickly stops motion by setting deceleration time to 0.
Page 69
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 3.13 Software Limit Control 3.13.1 Function List Table 3.13 Function Name _DMC_01_start_sr_move _DMC_01_start_tr_move _DMC_01_start_sa_move _DMC_01_start_ta_move _DMC_01_set_soft_limit _DMC_01_enable_soft_limit _DMC_01_disable_soft_limit _DMC_01_get_soft_limit_status 3.13.2 Sample Application Program Appearance Figure 3.67 Revised March, 2012 3-47...
Page 70
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 1) Card initialization Click on the “Initial” button to start card initialization. For a detailed description of card initialization, please refer to Section 3.1.2 - 1) Open card. 2) Set Servo Node ID and enable motion status display Figure 3.68 Input Node ID and check “Timer”...
Page 71
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 5) Set positive/negative value limit, stop motion mode, and whether software limit is enabled Figure 3.71 N-Limit item: Value of negative limit. API function's argument variable “NLimit”. P-Limit item: Value of positive limit. API function's argument variable “PLimit”. Stop mode pull-down menu: Stop mode.
Page 72
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 9) Start motion control (Using point to point motion control as an example) Click on the “” or “” button to execute the following procedure: rt = _DMC_01_start_sa_move(gDMCCardNo, NodeID, SlotID, Distance, StrVel, MaxVel, acc, dec);...
Page 73
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 3.14 Synchronization Motion Control 3.14.1 Function List Table 3.14 Function Name _DMC_01_sync_move _DMC_01_sync_move_config 3.14.2 Sample Application Program Appearance Figure 3.74 1) Card initialization Click on the “Initial” button to open and initialize the card. For a detailed description of card initialization, please refer to “Open card”...
Page 74
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 2) Choose whether to enable synchronization motion control Figure 3.75 Sync. Enable checkbox: Enable motor sync or not. You can execute the following procedure to enable sync motion: rt = _DMC_01_sync_move_config(gDMCCardNo, gpNodeID[i], SlotID, enable); // If enable argument is 1, then synchronized motion control is enabled.
Page 75
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 5) Select motion mode and set motion distance. Figure 3.78 Abs. Checkbox: You must check this if you want motion displacement to use absolute coordinates. S-Curve checkbox: You must check this box if you wish to use the S-curve velocity curve.
Page 76
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 8) Stop motion Hit the “STOP” button to execute an emergency stop: rt = _DMC_01_emg_stop (gDMCCardNo, NodeID, SlotID); In this example, emergency stop is used to stop motion. This method quickly stops motion by setting deceleration time to 0.
Page 77
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 3.15 Dwell Command 3.15.1 Function List Table 3.15 Function Name _DMC_01_start_ta_move _DMC_01_buf_dwell 3.15.2 Sample Application Program Appearance Figure 3.80 1) Card initialization Click on the “Initial” button to open and initialize the card. For a detailed description of card initialization, please refer to “Open card”...
Page 78
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 3) In the following example, adding the dwell command between continuous motion commands will ensure the execution of continuous motion: rt = _DMC_01_start_ta_move(gDMCCardNo, NodeID, SlotID, Distance, StrVel, MaxVel, acc, dec); // Motion displacement using absolute coordinates with T-curve velocity cross-section rt = _DMC_01_buf_dwell(CardNo, NodeID, SlotID, dwell_cnt);...
Page 79
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 3.16 Change Position 3.16.1 Function List Table 3.16 Function Name _DMC_01_start_ta_move _DMC_01_p_change 3.16.2 Sample Application Program Appearance Figure 3.83 1) Card initialization Click on the “Initial” button to open and initialize the card. For a detailed description of card initialization, please refer to “Open card”...
Page 80
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 Input Node ID and check “Timer” checkbox to enable motion status display NodeID item: API function's argument variable “NodeID”. Timer Checkbox: Check to display the motion status. Uncheck to disable display. 3) Enter the values of the arguments for motion control Figure 3.85 StrVel item: Starting velocity.
Page 81
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 7) If you want to change position of current motion to a new position, you must click on “P change” to execute the following procedure: rt = _DMC_01_p_change (CardNo, NodeID, SlotID, NewPos); // Replaces the current position with a new position value 8) Stop motion Hit the “STOP”...
Page 82
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 3.17 Change Position 3.17.1 Function List Table 3.17 Function Name _DMC_01_start_ta_move _DMC_01_v_change 3.17.2 Sample Application Program Appearance Figure 3.87 1) Card initialization Click on the “Initial” button to open and initialize the card. For a detailed description of card initialization, please refer to “Open card”...
Page 83
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 2) Set Servo Node ID and enable motion status display Figure 3.88 Input Node ID and check “Timer” checkbox to enable motion status display NodeID item: API function's argument variable “NodeID”. Timer Checkbox: Check to display the motion status. Uncheck to disable display. 3) Enter the values of the arguments for motion control Figure 3.89 StrVel item: Starting velocity.
Page 84
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 5) Set Servo Motor Power ON/OFF(servo on/servo off) Click on the “SVON” button to execute the following procedure: rt = _DMC_01_ipo_set_svon(gDMCCardNo, NodeID, SlotID , ON_OFF); // ON_OFF: 0 – Servo Power OFF; 1 – Servo Power ON 6) Start motion control (Using point to point motion control as an example) Click on the “”...
Page 85
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 3.18 Change Velocity 3.18.1 Function List Table 3.18 Function Name _DMC_01_start_sa_move_2seg _DMC_01_start_ta_move_2seg _DMC_01_start_sr_move_2seg _DMC_01_start_tr_move_2seg 3.18.2 Sample Application Program Appearance Figure 3.91 1) Card initialization Click on the “Initial” button to open and initialize the card. For a detailed description of card initialization, please refer to “Open card”...
Page 86
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 2) Set Servo Node ID and enable motion status display Figure 3.92 Input Node ID and check “Timer” checkbox to enable motion status display NodeID item: API function's argument variable “NodeID”. Timer Checkbox: Check to display the motion status. Uncheck to disable display. 3) Enter the values of the arguments for motion control Figure 3.93 StrVel item: Starting velocity.
Page 87
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 5) Set distance and velocity for 2nd motion Figure 3.95 2 nd dist item: Value of distance for 2nd motion. API function's argument variable “Dist2”. 2 nd vel item: Value of velocity for 2nd motion. API function's argument variable “MaxVel2”.
Page 88
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 9) Stop motion Hit the “STOP” button to execute an emergency stop: rt = _DMC_01_emg_stop (gDMCCardNo, NodeID, SlotID); In this example, emergency stop is used to stop motion. This method quickly stops motion by setting deceleration time to 0.
Page 89
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 3.19 Remote I/O Module-I/O Port 3.19.1 Function List Table 3.19 Function Name _DMC_01_set_rm_input_filter _DMC_01_set_rm_input_filter_enable _DMC_01_set_rm_output_value_error_handle _DMC_01_get_slave_version _DMC_01_get_devicetype _DMC_01_set_rm_output_value _DMC_01_get_rm_input_value 3.19.2 Sample Application Program Appearance Figure 3.96 1) Card initialization Click on the “Initial” button to open and initialize the card. For a detailed description of card initialization, please refer to “Open card”...
Page 90
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 2) When setting the ASD-DMC-RM32MN module initialization parameters, you must execute the following procedure: rt = _DMC_01_set_rm_input_filter(gDMCCardNo, gpNodeID[gNodeNum], 0, port, filter); // The port variable can be set to the 2 ports on the remote module. A value of 0 corresponds to Port 0 on the module.
Page 91
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 // The Output_value[1] variable will store the value to be output for bit 0 to bit 15 of Port 1 /* Enable output */ rt = _DMC_01_set_rm_output_active(gDMCCardNo, NodeID, SlotID, Enable); //This function must be enabled before the output value set above can be outputted from the output port.
Page 92
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 3.20 Remote I/O Module- Manual Pulse Generator (1) 3.20.1 Function List Table 3.20 Function Name DMC_01_get_rm_input_value _DMC_01_set_rm_mpg_axes_enable _DMC_01_set_rm_mpg_axes_enable2 3.20.2 Sample Application Program Appearance Figure 3.98 1) Card initialization Click on the “Initial” button to open and initialize the card. For a detailed description of card initialization, please refer to “Open card”...
Page 93
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 Input Node ID and check “Timer” checkbox to enable motion status display NodeID item: API function's argument variable “NodeID”. Timer Checkbox: Check to display the motion status. Uncheck to disable display. 3) Enter parameter value of manual pulse control. Figure 3.100 MN ID item: API function's argument variable “MNNodeID”.
Page 94
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 6) Stop manual position control If you wish to stop using the MPG, simply uncheck the “MPG” or “MPG2” checkboxes. 7) Reset SERVON status If you wish to reset the SERVON status, you must uncheck the “MPG” or “MPG2” checkboxes then click on the “RESET”...
Page 95
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 3.21 Remote I/O Module- Manual Pulse Generator (2) 3.21.1 Function List Table 3.21 Function Name _DMC_01_get_rm_input_value _DMC_01_set_rm_mpg_axes_enable _DMC_01_set_rm_jog_axes_enable 3.21.2 Sample Application Program Appearance Figure 3.101 1) Card initialization Click on the “Initial” button to open and initialize the card. For a detailed description of card initialization, please refer to “Open card”...
Page 96
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 2) Set Servo Node ID and enable motion status display Figure 3.101 Enter Node ID and check “Timer” checkbox to enable motion status display NodeID item: API function's argument variable “NodeID”. NNID item: API function's argument variable “slotID”. Timer command checkbox: Click to display motion status.
Page 97
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 6) If you wish to use the MPG function, you must check the “MPG” checkbox and execute the following procedure: rt = _DMC_01_get_rm_input_value(CardNo, NodeID, SlotID, Port, &Value); // Retrieve the value for bit 0 to bit 15 of the remote I/O module's input port rt = _DMC_01_set_rm_mpg_axes_enable(CardNo, MasterNodeID, MasterSlotID, NodeID, SlotID, enable, pulse_ratio, ratio, slope);...
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 3.22.2 Sample Application Program Appearance Figure 3.104 1) Card initialization Click on the “Initial” button to open and initialize the card. For a detailed description of card initialization, please refer to “Open card” and “Card initialization”...
Page 100
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 3) Enter the values of the arguments for motion control Figure 3.106 Dist. item: Set motion distance. API function's argument variable “Distance”. StrVel item: Starting velocity. API function's argument variable “StrVel”. MaxVel item: Maximum velocity. API function's argument variable “MaxVel”. Acc.
Page 101
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 5) Set Home motion mode and offset: Figure 3.108 Mode item: Select Home motion mode. API function's argument variable “home_mode”. Offset item: Set Home motion offset. API function's argument variable “home_offset”. 6) Set positive/negative value limit; enable/disable software limit, and whether to touch software limit or not;...
Page 102
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 8) Set the new velocity, deceleration time and enable position change for new position. Figure 3.110 New Vel item: Set new velocity. API function's argument variable “NewSpeed”. sec item: Set acceleration/deceleration time. API function's argument variable “sec”.
Page 103
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 11) Enable software limit Figure 3.113 If you wish to use the software limit function, you must first set the “P Limit” and “N Limit” values then check the “Soft-limit Enable” checkbox to execute the following procedure: /* Start software limit configuration */ rt = _DMC_01_rm_04pi_md1_set_soft_limit(CardNo, NodeID, SlotID, PLimit, NLimit,...
Page 104
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 rt = _DMC_01_rm_04pi_md1_p_change(CardNo, NodeID, SlotID, NewPos); 15) Change velocity Under mode 1, RM04PI will replace the current velocity with the new velocity. You must click on the “Vch” button to execute the following procedure: /* P Change */ rt = _DMC_01_rm_04pi_md1_v_change(CardNo, NodeID, SlotID, NewsPeed,sec);...
Page 105
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 3.23 Remote Pulse Interface Module -Mode 2 3.23.1 Function List Table 3.23 Function Name _DMC_01_start_sa_move _DMC_01_start_ta_mov _DMC_01_start_sr_move _DMC_01_start_tr_move _DMC_01_set_rm_04pi_ipulse_mode _DMC_01_set_rm_04pi_opulse_mode _DMC_01_set_rm_04pi_svon_polarity _DMC_01_set_monitor _DMC_01_get_monitor _DMC_01_send_message 3.23.2 Sample Application Program Appearance Figure 3.114 Revised March, 2012 3-83...
Page 106
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 1) Card initialization Click on the “Initial” button to open and initialize the card. For a detailed description of card initialization, please refer to “Open card” and “Card initialization” in Section 3.1.2. 2) Set Servo Node ID and enable motion status display Figure 3.115 Enter Node ID and check “Timer”...
Page 107
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 4) Enter the values of the arguments for motion control Figure 3.117 Abs. Checkbox: You must check this if you want motion displacement to use absolute coordinates. S-Curve checkbox: You must check this box if you wish to use the S-curve velocity curve.
Page 108
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 7) Start motion control (Using point to point motion control as an example) Click on the “” or “” button to execute the following procedure: rt = _DMC_01_start_sa_move(gDMCCardNo, NodeID, SlotID, Distance, StrVel, MaxVel, acc, dec);...
Page 109
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 3.24 Get (Calculate) Arc Information 3.24.1 Function List Table 3.24 Function Name _misc_app_get_circle_endpoint _misc_app_get_circle_center_point 3.24.2 Sample Application Program Appearance Figure 3.118 Revised March, 2012 3-87...
Page 110
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 1) Card initialization Click on the “Initial” button to open and initialize the card. For a detailed description of card initialization, please refer to “Open card” and “Card initialization” in Section 3.1.2. 2) Get Slot ID and enable motion status display Figure 3.119 Check the “Timer”...
Page 111
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 4) When you complete the arc calculation and get the data you require for arc interpolation motion, you can begin motion control for arc interpolation. Enter the data required for arc interpolation as shown in Fig. 390, select the arc interpolation motion you wish to use.
Page 112
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 3.25 Control Interrupt 3.25.1 Function List Table 3.26 Function Name _DMC_01_int_enable _DMC_01_int_disable _DMC_01_set_int_factor _DMC_01_get_int_count 3.25.2 Sample Application Program Appearance Figure 3.124 3-90 Revised March, 2012...
Page 113
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 1) Card initialization: Click on the “Initial” button to start card initialization. For a detailed description of card initialization, please refer to Section 3.1.2 - 1) Open card. 2) Set Servo Node ID and enable motion status display Figure 3.125 Input Node ID and check “Timer”...
Page 114
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 Abs. checkbox: You must check this if you want motion displacement to use absolute coordinates. S-Curve checkbox: You must check this box if you wish to use the S-curve velocity curve. Dist. item: Motion distance. API function's argument variable “Distance”. 5) Enable or disable Normal Stop Interrupt Figure 3.128 Enable item: Enables/disables Normal Stop Interrupt.
Page 115
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 8) Start motion control (Using point to point motion control as an example) Click on the “” or “” button to execute the following procedure: rt = _DMC_01_start_sa_move(gDMCCardNo, NodeID, SlotID, Distance, StrVel, MaxVel, acc, dec);...
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 3.26.2 Sample Application Program Appearance Figure 3.129 1) Card initialization: Click on the “Open card” button to start card initialization. For a detailed description of card initialization, please refer to Section 3.1.2 - 1) Open card.
Page 118
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 2) Start motion card login operation. (SerialNo, Verifykey, Memory Read/Write all require Check Password Pass to operate). Figure 3.130 Password item: Enter two sets of 1~8 bit 0~F hexadecimal values. Default motion card passwords (Password1: FFFFFFFF Password2:FFFFFFFF).
Page 119
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 4) Set up Verifykey Figure 3.132 SerialNo. display: The motion card's serial number is displayed here. Read Serial No item: Read the serial number of the motion card. Input User Key item: Enter two sets of customer-selected 1~8 bit 0~F hexadecimal values as the Key values.
Page 120
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 6) Check Verify key Figure 3.134 Page item: Enter the value of the Memory Page (0 ~ 9) to read or write. Read item: Execute read of selected Memory Page and display in “Read” item. Write Enable item: Before executing the write operation, the Write Enable checkbox must be checked.
Page 121
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 /* Check to see if value of Verify Key is correct*/ rt =_DMC_01_check_verifykey(gDMCCardNo,verifykey(0),state); Clicking on Read button in Fig. 3.134 below executes the following procedure: /*Read the data from the selected Page and display data in the “Read” position*/ rt =_DMC_01_read_security(gDMCCardNo,page,ary(0));...
Page 124
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 1) Card initialization: Click on the “Initial” button to start card initialization. For a detailed description of card initialization, please refer to Section 3.1.2 - 1) Open card. 2) DA Channel and display mode selection Figure 3.136 Channel item: Enter the ID of the DA Channel to be used (0~3).
Page 125
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 4) Select AD Conversion Time mode: Figure 3.138 Conversion Time item: Select Conversion Time mode. 5) Select AD Channel / Display mode / Average data. Figure 3.139 Channel item: Select Channel for AD enable input. Mode item: Select AD display range.
Page 126
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 7) If the Mode option in Fig. 3.136 is selected, execute the following procedure: /*First, reset Offset to 0 */ rt = _DMC_01_rm_04da_set_output_offset_value(gDMCCardNo,DANodeID,SlotID, ChannelDA,0); /* Next, Output Disable */ rt = _DMC_01_rm_04da_set_output_enable(gDMCCardNo,DANodeID,SlotID, ChannelDA,0);...
Page 127
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 /* Set AD input range mode*/ rt =_DMC_01_set_04ad_input_range(gDMCCardNo,ADNodeID,SlotID,ChannelAD, mode); If the Average option in Fig. 3.139 is selected, execute the following procedure: /* Set AD waveform output calculation frequency*/ rt =_DMC_01_set_04ad_average_mode(gDMCCardNo,ADNodeID,SlotID, ChannelAD,mode); For the Data display in Fig.
Page 128
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 3.28 Spiral Interpolation Motion Control -Spiral 3.28.1 Function List Table 3.28 Function Name _DMC_01_start_spiral_xy _DMC_01_start_spiral2_xy 3.28.2 Sample Application Program Appearance Figure 3.141 1) Card initialization: Click on the “Initial” button to start card initialization. For a detailed description of card initialization, please refer to Section 3.1.2 - 1) Open card.
Page 129
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 2) Enable motion status display Figure 3.142 Timer Checkbox: Check to display the motion status. Uncheck to disable display. 3) Spiral motion parameter settings: Figure 3.143 Center_X item: Spiral center point's X-coordinate, API function's argument variable “Center_X”.
Page 130
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 4) Spiral2 motion parameter settings: Figure 3.144 Center_X item: Spiral center point's X-coordinate, API function's argument variable “Center_X”. Center_Y item: Spiral center point's Y-coordinate, API function's argument variable “Center_Y”. StrVel item: Starting velocity. API function's argument variable “StrVel”. MaxVel item: Maximum velocity.
Page 131
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 5) Select motion mode Figure 3.145 Abs. Checkbox: You must check this if you want motion displacement to use absolute coordinates. S-Curve checkbox: You must check this box if you wish to use the S-curve velocity curve.
Page 132
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 9) Stop motion Click on the “STOP” button to execute slow down stop for current point to point motion. rt = _DMC_01_sd_stop(gDMCCardNo, NodeID, SlotID, dec); In this example, deceleration is used to stop displacement motion. Here the velocity is gradually reduced to 0 over the set deceleration time.
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 3.29.2 Sample Application Program Appearance Figure 3.147 1) Card initialization: ※First, check to ensure hat the card you have installed is the PCI-DMC-B01 interface card. Click on the “Open card” button to start card initialization. For a detailed description of card initialization, please refer to Section 3.1.2 - 1) Open card.
Page 135
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 Card item: Enter ID of PCI_DMC_B01 card to use. Node item: Select Node ID. This should match the QEP1 or QEP2. QEP1 item: Example: If Channel 0 is selected, then Node ID should be Node 1. QEP2 item: Example: If Channel 1 is selected, Node ID should be Node2.
Page 136
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 QEP1 Inverse item: Reverse. Click on this button to execute the following settings: rt = _DMC_01_set_compare_channel_direction(CpCardNo,0,dir); // dir:0 or 1 QEP2 Inverse item: Reverse. Click on this button to execute the following settings: rt = _DMC_01_set_compare_channel_direction(CpCardNo,1,dir);...
Page 137
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 Else //Compare2 First, set output to disable rt = _DMC_01_channel1_output_enable(CpCardNo,0); // 0:off 1:on If Level checkbox is checked, then execute the following setting: rt = _DMC_01_channel1_position_compare_table(CpCardNo,pos_table,tab_size); If not checked, then execute the following settings: rt = _DMC_01_channel1_position_compare_table_level(CpCardNo,pos_table, level_table,tab_size);...
Page 138
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 3.30 Axis Group 3.30.1 Function List Table 3.30 Function Name _DMC_01_set_group 3.30.2 Sample Application Program Appearance Figure 3.153 3-116 Revised March, 2012...
Page 139
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 1) Card initialization: Click on the “Open card” button to start card initialization. For a detailed description of card initialization, please refer to Section 3.1.2 - 1) Open card. 2) Card number, Slave number: Figure 3.154 Card num item: Display number of cards.
Page 140
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 4) Exit procedure Click on the “Exit” button to quit and exit the procedure. Exit function requires “_DMC_01_reset_card” and _DMC_01_close” to be used. For a detailed description of these two API please refer to section 3.1.2 4) Exit procedure.
Page 141
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 3.31 Speed Continue 3.31.1 Function List Table 3.31 Function Name _DMC_01_speed_continue _DMC_01_speed_continue_mode _DMC_01_speed_continue_combine_ratio 3.31.2 Sample Application Program Appearance Figure 3.156 Revised March, 2012 3-119...
Page 142
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 1) Card initialization: Click on the “Open card” button to start card initialization. For a detailed description of card initialization, please refer to Section 3.1.2 - 1) Open card. 2) Card number, Slave number and Timer setting: Figure 3.157 Card num item: Display number of cards.
Page 143
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 4) Demonstration: Figure 3.159 Example 1 item: Clicking on this will enter a Speed Continue demonstration programs shown in Fig. 3.158. The selected Speed Continue parameters will execute the following procedure in order: rt = _DMC_01_start_tr_move_xy(gDMCCardNo, NodeID, SlotID, 0, 10000, 0, 5000, 0.1, 0.1);...
Page 144
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 3.32 Spiral Interpolation - Helix Using -Sp1_ Normal Follow 3.32.1 Function List Table 3.32 Function Name _DMC_01_start_tr_heli_xy 3.32.2 Sample Application Program Appearance Figure 3.160 3-122 Revised March, 2012...
Page 145
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 1) Card initialization: Click on the “Open card” button to start card initialization. For a detailed description of card initialization, please refer to Section 3.1.2 - 1) Open card. 2) Card number, Slave number: Figure 3.161 Card num item: Display number of cards.
Page 146
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 Remarks: If Z-axis completes one revolution CW over the distance of Pitch, then if Dr = 0 Depth is a positive number as well. If Dir = 1 then Depth is a negative number; if Z-axis completes one revolution CCW over the distance of pitch, then the opposite is true.
Page 147
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 When Example 2 and Tangent are selected, the result is as shown below: Figure 3.164 Example 1: In this example, X and Y axes are used to make the tool move along rounded corner and straight lines.
Page 149
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 Example 2: In this example, X and Y axes are used to make the tool move along rounded corner and straight lines. The tool on the Z-axis is always at a normal or tangent to the shape. (The following explanation uses the C language and is executed using a state machine.
Page 152
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 3.33 Logger 3.33.1 Function List Table 3.99 Function Name _misc_set_record_debuging _misc_open_record_debuging_file 3.33.2 Sample Application Program Appearance Figure 3.165 1) Card initialization: Click on the “Initial” button to open and initialize the card. For a detailed description of card initialization, please refer to “Open card”...
Page 153
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 2) Debug enable and disable Figure 3.166 If you wish to enable the Debug function, you must execute the following procedure: rt = _misc_set_record_debuging(enable); // If the value of enable argument is 1, debug is enabled 3) Enter the path of the record file and select output method for record Figure 3.167 If you wish to view the log record generated by motion control, you must execute the...
Page 154
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01 4) Start any kind of motion control under PDO mode 5) Log record output Fig. 3.998 is shows the log of functions and value changes used by motion control displayed in the debug window of the Visual Studio 6 development environment. Fig. 3.123 shows that the functions and value changes of the log record will be output to a file named “log-output.txt”.
Page 155
Chapter 4 Control API | PCI-DMC-A01 / PCI-DMC-B01 Chapter 4 Control API Data Type and Range Under the “inc\VC\” folder in the installation is a file named “TYPE_DEF.H”. The file defines all the standard data types. Table 4.1 below shows the types, names, meanings, and ranges defined in the file. Table 4.1 Name Description...
Chapter 4 Control API | PCI-DMC-A01 / PCI-DMC-B01 Function Description Table 4.2 Hardware Initialization API _DMC_01_open Initialize system resources when program is run _DMC_01_close Release all system resources _DMC_01_get_CardNo_seq Get the number of all PCI-DMC-A01 interface cards on the system _DMC_01_pci_initial Initialize this PCI card _DMC_01_get_card_version...
Page 157
Chapter 4 Control API | PCI-DMC-A01 / PCI-DMC-B01 _DMC_01_send_message3 Send SDO command message to data buffer and exit data buffer once command is set _DMC_01_read_message Read last SDO command message into data buffer _DMC_01_read_message2 Read the last SDO command message into data buffer and return number of reads _DMC_01_get_message Get SDO command message and place in data...
Page 158
Chapter 4 Control API | PCI-DMC-A01 / PCI-DMC-B01 _DMC_01_sd_stop All motion commands in buffer will execute slow down stop based on deceleration time _DMC_01_sd_abort Current motion command will execute deceleration time stop _DMC_01_set_sd_mode Set Sd_stop mode Motion Status API _DMC_01_motion_done Return current motion stage of the Master Card _DMC_01_motion_status Return current motion status of the Master Card...
Page 159
Chapter 4 Control API | PCI-DMC-A01 / PCI-DMC-B01 _DMC_01_start_sr_move_2seg 2nd motion displacement using relative coordinates with S-curve velocity cross-section _DMC_01_start_ta_move_2seg 2nd motion displacement using absolute coordinates with T-curve velocity cross-section _DMC_01_start_sa_move_2seg 2nd motion displacement using absolute coordinates with S-curve velocity cross-section _DMC_01_start_tr_move_2seg2 2nd motion displacement using relative coordinates with T-curve velocity cross-section...
Page 160
Chapter 4 Control API | PCI-DMC-A01 / PCI-DMC-B01 _DMC_01_start_tr_arc2_xy 2-axis arc interpolation motion using relative coordinates with T-curve velocity cross-section (Known conditions: Endpoint coordinates, angle) _DMC_01_start_sr_arc2_xy 2-axis arc interpolation motion using relative coordinates with S-curve velocity cross-section (Known conditions: Endpoint coordinates, angle) _DMC_01_start_ta_arc2_xy 2-axis arc interpolation motion using absolute coordinates with T-curve velocity cross-section...
Page 161
Chapter 4 Control API | PCI-DMC-A01 / PCI-DMC-B01 _DMC_01_start_v3_arc3_xy 2-axis arc interpolation motion with EndVel added (Known conditions: Center point coordinates, endpoint coordinates) _DMC_01_start_v3_spiral_xy 2-axis spiral motion with EndVel added (Known conditions: Center coordinates for X and Y axes) _DMC_01_start_v3_spiral2_xy 2-axis spiral motion with EndVel added (Known conditions: Center coordinates for X and Y axes, endpoint coordinates for X and Y axes)
Page 162
Chapter 4 Control API | PCI-DMC-A01 / PCI-DMC-B01 _DMC_01_set_rm_input_filter Set software filter level for input port of the remote I/O module _DMC_01_set_rm_input_filter_enable Enable software mask for bit 0 to bit 15 of the remote I/O module's input port _DMC_01_set_rm_output_value Set the value for bit 0 to bit 15 of the remote I/O module's output port _DMC_01_set_rm_output_value_error_ha Set the output value returned when remote I/O...
Page 163
Chapter 4 Control API | PCI-DMC-A01 / PCI-DMC-B01 _DMC_01_rm_04pi_md1_start_arc2 Perform 2-axis arc interpolation motion control under RM04PI Mode 1 (Known conditions: Endpoint coordinates, angle) _DMC_01_rm_04pi_md1_start_arc3 Perform 2-axis arc interpolation motion control under RM04PI Mode 1 (Known conditions: Center point coordinates, endpoint coordinates) _DMC_01_rm_04pi_md1_start_heli Perform 3-axis spiral interpolation motion control...
Page 164
Chapter 4 Control API | PCI-DMC-A01 / PCI-DMC-B01 4-Channel Analog Input Remote Module API _DMC_01_set_04ad_input_range Set AD input range _DMC_01_get_04ad_input_range Get current AD Input range _DMC_01_set_04ad_zero_scale Set AD zero level for range calibration _DMC_01_get_04ad_zero_scale_status Check if AD zero calibration is complete _DMC_01_set_04ad_full_scale Set AD maximum level for range calibration _DMC_01_get_04ad_full_scale_status...
Page 165
Chapter 4 Control API | PCI-DMC-A01 / PCI-DMC-B01 _DMC_01_get_int_count Interrupt count. _DMC_01_get_int_status Get current interrupt status _DMC_01_Link_interrupt Link handling procedure. Called if interrupt enabled. Security API _DMC_01_read_security Master Card: read security data at specified memory block _DMC_01_read_security_status Master Card: get read/write status of current memory _DMC_01_write_security Master Card: write security data to specified...
Page 166
Chapter 4 Control API | PCI-DMC-A01 / PCI-DMC-B01 _DMC_01_set_compare_channel_direction Set Channel pulse direction _DMC_01_set_compare_channel_trigger_ Set Trigger enable time time _DMC_01_set_compare_channel_one_ Set Trigger to one-time enable shot _DMC_01_set_compare_channel_source Compare source _DMC_01_channel0_position_cmp Set Compare Type to Compare0 _DMC_01_channel1_output_enable Set Compare1 output to enable/disable _DMC_01_channel1_output_mode Compare1 output mode _DMC_01_channel1_get_io_status...
Page 167
Chapter 4 Control API | PCI-DMC-A01 / PCI-DMC-B01 Other API _misc_app_get_circle_endpoint Get endpoint coordinates (X, Y) required for arc interpolation _misc_app_get_circle_center_point Get center point coordinates (X, Y) required for arc interpolation _misc_set_record_debuging Is Debug log function enabled _misc_open_record_debuging_file Set Debug output log file path _DMC_01_enable_dda_mode Enable DDA Table writing function _DMC_01_set_dda_data...
Page 168
Chapter 4 Control API | PCI-DMC-A01 / PCI-DMC-B01 (This page intentionally left blank.) 4-14 Revised March, 2012...
Page 169
Chapter 5 Hardware Initialization API | PCI-DMC-A01 / PCI-DMC-B01 Chapter 5 Hardware Initialization API Table 5.1 Function Name Description _DMC_01_open Initialize system resources when program is _DMC_01_close Release all system resources _DMC_01_get_CardNo_seq Get the number of all PCI-DMC-A01 interface cards on the system _DMC_01_pci_initial Initialize this PCI card _DMC_01_get_card_version...
Page 170
Chapter 5 Hardware Initialization API | PCI-DMC-A01 / PCI-DMC-B01 _DMC_01_open FORMAT I16 PASCAL _DMC_01_open (I16* existcard) Purpose Initializes system resources when program is run. Parameters Name Data Type Unit Description To get the number of these cards installed in the Existcard I16* cards...
Page 171
Chapter 5 Hardware Initialization API | PCI-DMC-A01 / PCI-DMC-B01 _DMC_01_get_CardNo_seq FORMAT I16 PASCAL _DMC_01_get_CardNo_seq(U16 CardNo_seq,U16* CardNo) Purpose Retrieves the number of all PCI-DMC-A01 interface cards in the system. Parameters Name Data Type Unit Description CardNo_seq Number Unit Serial number Interface Card No is between 0~15 and is Set CardNo...
Page 172
Chapter 5 Hardware Initialization API | PCI-DMC-A01 / PCI-DMC-B01 _DMC_01_pci_initial FORMAT I16 PASCAL _DMC_01_pci_initial (U16 CardNo) Purpose Initializes this PCI card. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 Example U16 CardNo = 0; _DMC_01_pci_initial (CardNo);...
Page 173
Chapter 6 Interface API | PCI-DMC-A01 / PCI-DMC-B01 Chapter 6 Interface API Table 6.1 Function Name Description _DMC_01_initial_bus Initialize external bus _DMC_01_start_ring Start ring communication _DMC_01_get_device_table Get device table _DMC_01_get_node_table Get node table _DMC_01_check_card_running Check to see if card is running _DMC_01_reset_card Reset selected card _DMC_01_check_nodeno...
Page 174
Chapter 6 Interface API | PCI-DMC-A01 / PCI-DMC-B01 _DMC_01_initial_bus FORMAT I16 PASCAL _DMC_01_initial_bus (U16 CardNo) Purpose Initializes the external bus. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 Example U16 CardNo = 0; I16 status = _DMC_01_initial_bus (CardNo);...
Page 175
Chapter 6 Interface API | PCI-DMC-A01 / PCI-DMC-B01 _DMC_01_get_device_table FORMAT I16 PASCAL _DMC_01_get_device_table (U16 CardNo, U16* value) Purpose Retrieves the device table. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 value U16* Number Unit Device number table ...
Page 176
Chapter 6 Interface API | PCI-DMC-A01 / PCI-DMC-B01 _DMC_01_check_card_running FORMAT I16 PASCAL _DMC_01_check_card_running (U16 CardNo, U16* running) Purpose Checks to see if the card is running. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 0: Not executed running U16*...
Page 177
Chapter 6 Interface API | PCI-DMC-A01 / PCI-DMC-B01 _DMC_01_check_nodeno FORMAT I16 PASCAL _DMC_01_check_nodeno(U16 CardNo, U16 NodeID,U16 SlotID,U16* exist) Purpose Checks to see if the node already exists. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 NodeID Number Unit Node ID...
Page 178
Chapter 6 Interface API | PCI-DMC-A01 / PCI-DMC-B01 _DMC_01_get_master_connect_status FORMAT I16 PASCAL _DMC_01_get_master_connect_status (U16 CardNo, U16* Protocol) Purpose Retrieves the connection status between the Master Card and the expansion module. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 1: No link to module Node1...
Page 179
Chapter 6 Interface API | PCI-DMC-A01 / PCI-DMC-B01 6.10 _DMC_01_get_mailbox_cnt FORMAT I16 PASCAL _DMC_01_get_mailbox_cnt (U16 CardNo, U32* PC_cnt, U32* DSP_cnt) Purpose Retrieves the MailBox counter value. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 PC_cnt U32* Frequency...
Page 180
Chapter 6 Interface API | PCI-DMC-A01 / PCI-DMC-B01 6.12 _DMC_01_set_dio_output FORMAT I16 PASCAL _DMC_01_set_dio_output (U16 CardNo, U16 On_Off) Purpose Sets GPIO output pin status. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 0: Disable On_Off Selection...
Page 181
Chapter 6 Interface API | PCI-DMC-A01 / PCI-DMC-B01 6.14 _DMC_01_get_dio_input FORMAT I16 PASCAL _DMC_01_get_dio_input (U16 CardNo, U16* On_Off) Purpose Retrieves GPIO input pin status. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 0: Disable On_Off U16*...
Page 182
Chapter 6 Interface API | PCI-DMC-A01 / PCI-DMC-B01 6.16 _DMC_01_initial_bus2 FORMAT I16 PASCAL _DMC_01_initial_bus2 ( ) Purpose Initializes all external buses. Parameters Function has no parameters. Example I16 status= _DMC_01_initial_bus2 ( ); 6.17 _DMC_01_motion_cnt FORMAT I16 PASCAL _DMC_01_motion_cnt (U16 CardNo, U16 NodeID, U16 SlotID, U16 *pc_mc_cnt, U16 *dsp_mc_cnt) ...
Page 183
Chapter 7 Servo Drive Parameter Read/Write API | PCI-DMC-A01 / PCI-DMC-B01 Chapter 7 Servo Drive Parameter Read/Write API Table 7.1 Function Name Description _DMC_01_read_servo_parameter Read servo drive parameter data _DMC_01_write_servo_parameter Write servo drive parameter data Revised March, 2012...
Page 184
Chapter 7 Servo Drive Parameter Read/Write API | PCI-DMC-A01 / PCI-DMC-B01 _DMC_01_read_servo_parameter FORMAT I16 PASCAL _DMC_01_read_servo_parameter (U16 CardNo, U16 NodeID, U16 SlotID, U16 group,U16 idx,U32* data) Purpose Reads servo drive parameter. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15...
Page 185
Chapter 7 Servo Drive Parameter Read/Write API | PCI-DMC-A01 / PCI-DMC-B01 _DMC_01_write_servo_parameter FORMAT I16 PASCAL _DMC_01_write_servo_parameter (U16 CardNo, U16 NodeID, U16 SlotID, U16 group,U16 idx,U32 data) Purpose Writes servo drive parameter. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15...
Page 187
Chapter 8 Using SDO Protocol API | PCI-DMC-A01 / PCI-DMC-B01 Chapter 8 Using SDO Protocol API Table 8.1 Function Name Description _DMC_01_check_canopen_lock Under SDO mode, check to see if next command can be executed _DMC_01_get_canopen_ret Get data returned by CANopen (SDO related data) _DMC_01_set_pdo_mode Set to use CANopen protocol (PDO or SDO)
Page 188
Chapter 8 Using SDO Protocol API | PCI-DMC-A01 / PCI-DMC-B01 CANopen SDO protocol ※Sample SDO Packet Format for CANopen 1 – Index Read/Write successful When Index read is “Successful”, the return value is in the following format: Table 8.2 Field Datatype Index low Index high Sub index...
Page 189
Based on the above, the control code returned by the array to indicate data has been written is a ControlWord with the value 0x00000008. (6) The Index data length is based on Delta Electronics' ASDA-A2 CANopen Technical Guide. Revised March, 2012...
Page 190
(4) The field in the above table indicates that the returned data made up of Data1~Data4 is 0x06020000 indicating the [No Such Index] error. (5) For a detailed explanation, please refer to Delta Electronics SDA-A2 CANopen Technical Guide's section on SDO Abort Code.
Page 191
Chapter 8 Using SDO Protocol API | PCI-DMC-A01 / PCI-DMC-B01 ※Sample SDO Packet Format for CANopen 3 – Read/Write ASDA-A2 Parameter When reading the ASDA-A2 parameter, the return value is in the following format: Table 8.6 Field Datatype Index low Index high Sub index Data1...
Page 192
Chapter 8 Using SDO Protocol API | PCI-DMC-A01 / PCI-DMC-B01 _DMC_01_check_canopen_lock FORMAT I16 PASCAL _DMC_01_check_canopen_lock (U16 CardNo, U16 *lock) Purpose Checks to see if the next command can be executed under SDO mode. Parameters Name Data Type Unit Description CardNo...
Page 193
Chapter 8 Using SDO Protocol API | PCI-DMC-A01 / PCI-DMC-B01 _DMC_01_get_canopen_ret FORMAT I16 PASCAL _DMC_01_get_canopen_ret (U16 CardNo, U16* COBID, U8* value) Purpose Retrieves data returned by CANOPEN (SDO related data). Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 COBID...
Page 194
Chapter 8 Using SDO Protocol API | PCI-DMC-A01 / PCI-DMC-B01 _DMC_01_set_pdo_mode FORMAT I16 PASCAL _DMC_01_set_pdo_mode (U16 CardNo, U16 NodeID, U16 SlotID, U16 Enable) Purpose Sets the use of CANopen protocol (PDO or SDO). Parameters Name Data Type Unit Description CardNo...
Page 195
Chapter 8 Using SDO Protocol API | PCI-DMC-A01 / PCI-DMC-B01 _DMC_01_send_message FORMAT I16 PASCAL _DMC_01_send_message (U16 CardNo, U16 NodeID,U16 SlotID, U16 Index,U16 SubIdx,U16 DataType,U16 Value0,U16 Value1,U16 Value2,U16 Value3) Purpose Sends SDO command message to the data buffer. (This API function will wait for the command to be sent before exiting) ...
Page 196
Chapter 8 Using SDO Protocol API | PCI-DMC-A01 / PCI-DMC-B01 _DMC_01_send_message3 FORMAT I16 _DMC_01_send_message3 (I16 CardNo, U16 Index,U16 SubIdx,U16 DataType, U16 Value0,U16 Value1,U16 Value2,U16 Value3) Purpose Sends SDO command message to the data buffer and exits the data buffer once the command is sent.
Page 197
Chapter 8 Using SDO Protocol API | PCI-DMC-A01 / PCI-DMC-B01 _DMC_01_read_message FORMAT I16 PASCAL _DMC_01_read_message (I16 CardNo, U16* Cmd, U16* COBID, U16* DataType,U16* Value0,U16* Value1,U16* Value2,U16* Value3) Purpose Reads the last SDO command message into the data buffer. ...
Page 198
Chapter 8 Using SDO Protocol API | PCI-DMC-A01 / PCI-DMC-B01 _DMC_01_read_message2 FORMAT I16 PASCAL _DMC_01_read_message2 (I16 CardNo, U16 NodeID, U16 *Cmd, U16 *COBID ,U16 *DataType,U16 *Value0,U16 *Value1,U16 *Value2,U16 *Value3,U16 *cnt) Purpose Reads the last SDO command message into the data buffer and returns the number of reads. ...
Page 199
Chapter 8 Using SDO Protocol API | PCI-DMC-A01 / PCI-DMC-B01 _DMC_01_get_message FORMAT I16 PASCAL _DMC_01_get_message (I16 CardNo, U16 NodeID, U16 SlotID, U16 Index, U16* Cmd, U16* COBID, U16* DataType, U16* Value0, U16* Value1, U16* Value2, U16* Value3) Purpose Retrieves the SDO command message and places it in the data buffer.
Page 200
Chapter 8 Using SDO Protocol API | PCI-DMC-A01 / PCI-DMC-B01 8.10 _DMC_01_reset_sdo_choke FORMAT I16 PASCAL _DMC_01_reset_sdo_choke (U16 CardNo) Purpose Resets SDO when SDO command is blocked. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 ...
Page 201
Chapter 9 Point to Point Motion Control Packet Protocol API | PCI-DMC-A01 / PCI-DMC-B01 Chapter 9 Point to Point Motion Control Packet Protocol API Table 9.1 Function Name Description _DMC_01_set_sdo_driver_speed_profile Set speed profile for packet protocol _DMC_01_start_sdo_driver_r_move Start relative motion displacement _DMC_01_start_sdo_driver_a_move Start absolute motion displacement _DMC_01_start_sdo_driver_new_position_move Perform motion displacement with new...
Page 202
Chapter 9 Point to Point Motion Control Packet Protocol API | PCI-DMC-A01 / PCI-DMC-B01 _DMC_01_set_sdo_driver_speed_profile FORMAT I16 PASCAL _DMC_01_set_sdo_driver_speed_profile (U16 CardNo, U16 NodeID, U16 SlotID, U32 MaxVel, F64 acc, F64 dec) Purpose Sets the speed profile for packet protocol. ...
Page 203
Chapter 9 Point to Point Motion Control Packet Protocol API | PCI-DMC-A01 / PCI-DMC-B01 _DMC_01_start_sdo_driver_r_move FORMAT I16 PASCAL _DMC_01_start_sdo_driver_r_move (U16 CardNo, U16 NodeID, U16 SlotID, I32 Distance) Purpose Starts relative motion displacement. Parameters Name Data Type Unit Description CardNo Number Unit...
Page 204
Chapter 9 Point to Point Motion Control Packet Protocol API | PCI-DMC-A01 / PCI-DMC-B01 _DMC_01_start_sdo_driver_a_move FORMAT I16 PASCAL _DMC_01_start_sdo_driver_a_move (I16 CardNo, U16 NodeID, U16 SlotID, I32 Position) Purpose Starts absolute motion displacement. Parameters Name Data Type Unit Description CardNo Number Unit...
Page 205
Chapter 9 Point to Point Motion Control Packet Protocol API | PCI-DMC-A01 / PCI-DMC-B01 _DMC_01_start_sdo_driver_new_position_move FORMAT I16 PASCAL _DMC_01_start_sdo_driver_new_position_move (I16 CardNo, U16 NodeID, U16 SlotID, I32 Position,U16 abs_rel) Purpose Performs motion displacement with new position value. Parameters Name Data Type Unit...
Page 206
Chapter 9 Point to Point Motion Control Packet Protocol API | PCI-DMC-A01 / PCI-DMC-B01 (This page intentionally left blank.) Revised March, 2012...
Page 207
Chapter 10 Homing Motion Control Packet Protocol API | PCI-DMC-A01 / PCI-DMC-B01 Chapter 10 Homing Motion Control Packet Protocol API Table 10.1 Function Name Description _DMC_01_set_home_config Set home configuration _DMC_01_set_home_move Start home motion _DMC_01_escape_home_move Stop homing motion Revised March, 2012 10-1...
Page 208
Chapter 10 Homing Motion Control Packet Protocol API | PCI-DMC-A01 / PCI-DMC-B01 10.1 _DMC_01_set_home_config FORMAT I16 PASCAL _DMC_01_set_home_config (U16 CardNo,U16 NodeID,U16 SlotID , U16 Mode,I32 offset,U16 lowSpeed,U16 highSpeed,F64 acc) Purpose Sets home configuration. Parameters Name Data Type Unit Description CardNo...
Page 209
Chapter 10 Homing Motion Control Packet Protocol API | PCI-DMC-A01 / PCI-DMC-B01 NOTE #1. Homing mode using negative limit and index pulse message Using this method, if the negative limit switch is disabled (low voltage level), then it will begin by moving left. The home position is the index pulse offset to the right when it touches the negative limit switch.
Page 210
Chapter 10 Homing Motion Control Packet Protocol API | PCI-DMC-A01 / PCI-DMC-B01 #3 and #4. Homing using positive voltage level at Home Switch and index pulse message When using method 3 or 4, the initial direction will depend on the current status of the Home switch.
Page 211
Chapter 10 Homing Motion Control Packet Protocol API | PCI-DMC-A01 / PCI-DMC-B01 #7 to 14. Homing mode based on index pulse and Home switch These methods use a Home switch that is only activated during some types of motion. In actual fact, it can be activated when Position passes the switch on that axis.
Page 212
Chapter 10 Homing Motion Control Packet Protocol API | PCI-DMC-A01 / PCI-DMC-B01 #15 and 16. Reserved This is reserved for adding other homing modes in the future. #17 to 30. Homing mode independent of index pulse These methods are similar to methods 1 to 14. The difference being that these Homing modes do not require an index pulse.
Page 213
Chapter 10 Homing Motion Control Packet Protocol API | PCI-DMC-A01 / PCI-DMC-B01 10.2 _DMC_01_set_home_move FORMAT I16 PASCAL _DMC_01_set_home_move (U16 CardNo, U16 NodeID, U16 SlotID) Purpose Starts home motion. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 NodeID Number Unit...
Page 214
Chapter 10 Homing Motion Control Packet Protocol API | PCI-DMC-A01 / PCI-DMC-B01 10.3 _DMC_01_escape_home_move FORMAT I16 PASCAL _DMC_01_escape_home_move (U16 CardNo, U16 NodeID, U16 SlotID) Purpose Stops homing motion. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 NodeID Number Unit...
Page 215
Chapter 11 Velocity Motion Control Packet Protocol API | PCI-DMC-A01 / PCI-DMC-B01 Chapter 11 Velocity Motion Control Packet Protocol API Table 11.1 Function Name Description _DMC_01_set_velocity_mode Set velocity motion control parameter profile _DMC_01_set_velocity Start velocity motion control _DMC_01_set_velocity_stop Stop velocity motion control _DMC_01_set_velocity_torque_limit Set torque limit for velocity mode Revised March, 2012...
Page 216
Chapter 11 Velocity Motion Control Packet Protocol API | PCI-DMC-A01 / PCI-DMC-B01 11.1 _DMC_01_set_velocity_mode FORMAT I16 PASCAL _DMC_01_set_velocity_mode (U16 CardNo, U16 NodeID, U16 SlotID, F64 Tacc,F64 Tdec) Purpose Sets the velocity motion control parameter profile. Parameters Name Data Type Unit Description...
Page 217
Chapter 11 Velocity Motion Control Packet Protocol API | PCI-DMC-A01 / PCI-DMC-B01 11.2 _DMC_01_set_velocity FORMAT I16 PASCAL _DMC_01_set_velocity (U16 CardNo, U16 NodeID, U16 SlotID,I32 rpm) Purpose Starts velocity motion control. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 NodeID...
Page 218
Chapter 11 Velocity Motion Control Packet Protocol API | PCI-DMC-A01 / PCI-DMC-B01 11.3 _DMC_01_set_velocity_stop FORMAT I16 PASCAL _DMC_01_set_velocity_stop (U16 CardNo,U16 NodeID,U16 SlotID,U16 stop) Purpose Stops velocity motion control. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 NodeID Number Unit...
Page 219
Chapter 11 Velocity Motion Control Packet Protocol API | PCI-DMC-A01 / PCI-DMC-B01 11.4 _DMC_01_set_velocity_torque_limit FORMAT I16 PASCAL _DMC_01_set_velocity_torque_limit (U16 CardNo, U16 NodeID, U16 SlotID, U32 torque_limit) Purpose Sets the torque limit for velocity mode. Parameters Name Data Type Unit Description CardNo...
Page 220
Chapter 11 Velocity Motion Control Packet Protocol API | PCI-DMC-A01 / PCI-DMC-B01 (This page intentionally left blank.) 11-6 Revised March, 2012...
Page 221
Chapter 12 Torque Motion Control Packet Protocol API | PCI-DMC-A01 / PCI-DMC-B01 Chapter 12 Torque Motion Control Packet Protocol API Table 12.1 Function Name Description _DMC_01_set_torque_mode Torque motion control parameter profile _DMC_01_set_torque Start torque motion _DMC_01_set_torque_stop Stop torque motion _DMC_01_set_torque_velocity_limit Set velocity limit in torque mode Revised March, 2012 12-1...
Page 222
Chapter 12 Torque Motion Control Packet Protocol API | PCI-DMC-A01 / PCI-DMC-B01 12.1 _DMC_01_set_torque_mode FORMAT I16 PASCAL _DMC_01_set_torque_mode (U16 CardNo, U16 NodeID, U16 SlotID, U16 slope) Purpose Sets the torque motion control parameter profile (slope value). Parameters Name Data Type Unit...
Page 223
Chapter 12 Torque Motion Control Packet Protocol API | PCI-DMC-A01 / PCI-DMC-B01 12.2 _DMC_01_set_torque FORMAT I16 PASCAL _DMC_01_set_torque (U16 CardNo, U16 NodeID, U16 SlotID, I16 ratio) Purpose Starts torque motion. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 NodeID...
Page 224
Chapter 12 Torque Motion Control Packet Protocol API | PCI-DMC-A01 / PCI-DMC-B01 12.3 _DMC_01_set_torque_stop FORMAT I16 PASCAL _DMC_01_set_torque_stop (U16 CardNo, U16 NodeID, U16 SlotID, U16 stop) Purpose Stops torque motion. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 NodeID...
Page 225
Chapter 12 Torque Motion Control Packet Protocol API | PCI-DMC-A01 / PCI-DMC-B01 12.4 _DMC_01_set_torque_velocity_limit FORMAT I16 PASCAL _DMC_01_set_torque_velocity_limit (U16 CardNo, U16 NodeID, U16 SlotID, U32 velocity_limit) Purpose Sets the velocity limit in torque mode. Parameters Name Data Type Unit Description CardNo...
Page 226
Chapter 12 Torque Motion Control Packet Protocol API | PCI-DMC-A01 / PCI-DMC-B01 (This page intentionally left blank.) 12-6 Revised March, 2012...
Page 227
Chapter 13 Using PDO Protocol API | PCI-DMC-A01 / PCI-DMC-B01 Chapter 13 Using PDO Protocol API Table 13.1 Function Name Description _DMC_01_ipo_set_svon Set Servo ON/OFF under PDO protocol mode _DMC_01_get_buffer_length Get motion command to be executed _DMC_01_command_buf_clear Reset dwell time (buffer dwell counter value) _DMC_01_buf_dwell Interval between two motion commands _DMC_01_set_group...
Page 228
Chapter 13 Using PDO Protocol API | PCI-DMC-A01 / PCI-DMC-B01 13.1 _DMC_01_ipo_set_svon FORMAT I16 PASCAL _DMC_01_ipo_set_svon (U16 CardNo, U16 NodeID, U16 SlotID, U16 ON_OFF) Purpose Sets Servo ON/OFF under PDO protocol mode. Parameters Name Data Type Unit Description CardNo Number Unit...
Page 229
Chapter 13 Using PDO Protocol API | PCI-DMC-A01 / PCI-DMC-B01 13.2 _DMC_01_get_buffer_length FORMAT I16 PASCAL _DMC_01_get_buffer_length (U16 CardNo, U16 NodeID, U16 SlotID, U16* bufferLength) Purpose Retrieves the motion command which has yet to be executed. Parameters Name Data Type Unit Description...
Page 230
Chapter 13 Using PDO Protocol API | PCI-DMC-A01 / PCI-DMC-B01 13.3 _DMC_01_command_buf_clear FORMAT I16 PASCAL _DMC_01_command_buf_clear (U16 CardNo, U16 NodeID, U16 SlotID) Purpose Resets dwell time (buffer dwell counter value). Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 NodeID...
Page 231
Chapter 13 Using PDO Protocol API | PCI-DMC-A01 / PCI-DMC-B01 13.4 _DMC_01_buf_dwell FORMAT I16 PASCAL _DMC_01_buf_dwell (I16 CardNo, U16 NodeID, U16 SlotID, I32 dwell_cnt) Purpose The interval time between two motion commands. Parameters Name Data Type Unit Description CardNo Number Unit...
Page 232
Chapter 13 Using PDO Protocol API | PCI-DMC-A01 / PCI-DMC-B01 13.5 _DMC_01_set_group FORMAT I16 PASCAL _DMC_01_set_group (U16 CardNo, U16* NodeID,U16* SlotID, U16 NodeID_Num, U16 enable) Purpose Sets a group. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 NodeID Number Unit...
Page 233
Chapter 14 Stop Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 Chapter 14 Stop Motion Control API Table 14.1 Function Name Description _DMC_01_emg_stop All motion commands in buffer will execute immediate stop _DMC_01_sd_stop All motion commands in buffer will execute slow down stop based on deceleration time _DMC_01_sd_abort Current motion command will execute deceleration time stop...
Page 234
Chapter 14 Stop Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 14.1 _DMC_01_emg_stop FORMAT I16 PASCAL _DMC_01_emg_stop (U16 CardNo, U16 NodeID, U16 SlotID) Purpose All motion commands in the buffer will execute an emergency stop. Parameters Name Data Type Unit Description CardNo...
Page 235
Chapter 14 Stop Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 14.2 _DMC_01_sd_stop FORMAT I16 PASCAL _DMC_01_sd_stop (U16 CardNo, U16 NodeID,U16 SlotID,F64 Tdec) Purpose All motion commands in the buffer will execute a slow down stop based on deceleration time. ...
Page 236
Chapter 14 Stop Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 14.3 _DMC_01_sd_abort FORMAT I16 PASCAL _DMC_01_sd_abort (U16 CardNo, U16 NodeID, U16 SlotID, F64 Tdec) Purpose Current motion command will execute a slow down stop. Parameters Name Data Type Unit Description CardNo...
Page 237
Chapter 14 Stop Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 14.4 _DMC_01_set_sd_mode FORMAT I16 PASCAL _DMC_01_set_sd_mode (U16 CardNo, U16 NodeID, U16 SlotID, U16 mode) Purpose Sets the Sd_stop(slow down stop) mode. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15...
Page 239
Chapter 15 Motion Status API | PCI-DMC-A01 / PCI-DMC-B01 Chapter 15 Motion Status API Table 15.1 Function Name Description _DMC_01_motion_done Return current motion stage of the Master Card _DMC_01_motion_status Return current motion status of the Master Card Revised March, 2012 15-1...
Page 240
Chapter 15 Motion Status API | PCI-DMC-A01 / PCI-DMC-B01 15.1 _DMC_01_motion_done FORMAT I16 PASCAL _DMC_01_motion_done (U16 CardNo, U16 NodeID, U16 SlotID, U16* MC_status) Purpose Returns the current stage of motion of the Master Card. Parameters Name Data Type Unit Description CardNo...
Page 241
Chapter 15 Motion Status API | PCI-DMC-A01 / PCI-DMC-B01 15.2 _DMC_01_motion_status FORMAT I16 PASCAL _DMC_01_motion_status (U16 CardNo, U16 NodeID, U16 SlotID, U32* MC_status) Purpose Returns current motion status of the Master Card. Parameters Name Data Type Unit Description CardNo Number Unit...
Page 242
Chapter 15 Motion Status API | PCI-DMC-A01 / PCI-DMC-B01 Figure 15.1 Motion status For a description of “Mode specific” bits” (bit 12 and bit 13), please see Table 15.2. With the mode selection bits (bit 0 ~ bit 3) there are only 2 modes for the user to choose from. These are MODE1 (bit 0 is ON) and MODE6 (bit 1 and bit 2 are ON) Table 15.2 Mode specific bit description for motion status Mode-specific...
Page 243
Chapter 16 Motion Counter Value API | PCI-DMC-A01 / PCI-DMC-B01 Chapter 16 Motion Counter Value API Table 16.1 Function Name Description _DMC_01_get_command Get Command counter value _DMC_01_set_command Set new Command counter value _DMC_01_get_position Get current position counter value _DMC_01_set_position Set new position counter value _DMC_01_get_target_pos Get current position's position value _DMC_01_get_torque...
Page 244
Chapter 16 Motion Counter Value API | PCI-DMC-A01 / PCI-DMC-B01 16.1 _DMC_01_get_command FORMAT I16 PASCAL _DMC_01_get_command (U16 CardNo, U16 NodeID, U16 SlotID, I32* cmd) Purpose Retrieves the Command counter value. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 NodeID...
Page 245
Chapter 16 Motion Counter Value API | PCI-DMC-A01 / PCI-DMC-B01 16.3 _DMC_01_get_position FORMAT I16 PASCAL _DMC_01_get_position (U16 CardNo, U16 NodeID, U16 SlotID, I32* pos) Purpose Retrieves the current position counter value. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15...
Page 246
Chapter 16 Motion Counter Value API | PCI-DMC-A01 / PCI-DMC-B01 16.5 _DMC_01_get_target_pos FORMAT I16 PASCAL _DMC_01_get_target_pos (U16 CardNo, U16 NodeID, U16 SlotID, I32* pos) Purpose Retrieves the current value of the target position. Parameters Name Data Type Unit Description CardNo...
Page 247
Chapter 16 Motion Counter Value API | PCI-DMC-A01 / PCI-DMC-B01 16.6 _DMC_01_get_torque FORMAT I16 PASCAL _DMC_01_get_torque (U16 CardNo, U16 NodeID, U16 SlotID, U16* torque) Purpose Retrieves and returns the current torque counter value. Parameters Name Data Type Unit Description CardNo...
Page 248
Chapter 16 Motion Counter Value API | PCI-DMC-A01 / PCI-DMC-B01 16.7 _DMC_01_get_current_speed FORMAT I16 PASCAL _DMC_01_get_current_speed (U16 CardNo, U16 NodeID, U16 SlotID, I32* speed) Purpose Retrieves motion speed. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 NodeID Number Unit...
Page 249
Chapter 16 Motion Counter Value API | PCI-DMC-A01 / PCI-DMC-B01 16.8 _DMC_01_get_current_speed_rpm FORMAT I16 PASCAL _DMC_01_get_current_speed_rpm (U16 CardNo, U16 NodeID, U16 SlotID, I32 *rpm) Purpose Retrieves current RPM x 10. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 NodeID...
Page 250
Chapter 16 Motion Counter Value API | PCI-DMC-A01 / PCI-DMC-B01 (This page intentionally left blank.) 16-8 Revised March, 2012...
Page 251
Chapter 17 Software Limit API | PCI-DMC-A01 / PCI-DMC-B01 Chapter 17 Software Limit API Table 17.1 Function Name Description _DMC_01_set_soft_limit Sets reference values for software positive/negative limits _DMC_01_enable_soft_limit Enable/disable software limit and stop method after contact with limit _DMC_01_disable_soft_limit Disable software limit _DMC_01_get_soft_limit_status Retrieves the positive/negative status of the software limit during motion...
Page 252
Chapter 17 Software Limit API | PCI-DMC-A01 / PCI-DMC-B01 17.1 _DMC_01_set_soft_limit FORMAT I16 PASCAL _DMC_01_set_soft_limit (U16 CardNo, U16 NodeID, U16 SlotID, I32 PLimit, I32 NLimit) Purpose Sets reference values for software positive/negative limits. Parameters Name Data Type Unit Description CardNo...
Page 253
Chapter 17 Software Limit API | PCI-DMC-A01 / PCI-DMC-B01 17.2 _DMC_01_enable_soft_limit FORMAT I16 PASCAL _DMC_01_enable_soft_limit (U16 CardNo, U16 NodeID, U16 SlotID, I16 Action) Purpose Enables/disables the software limit and stop method after touching the limit. Parameters Name Data Type Unit Description...
Page 254
Chapter 17 Software Limit API | PCI-DMC-A01 / PCI-DMC-B01 17.4 _DMC_01_get_soft_limit_status FORMAT I16 PASCAL _DMC_01_get_soft_limit_status (U16 CardNo, U16 NodeID, U16 SlotID, U16* PLimit_sts,U16* NLimit_sts) Purpose Retrieves the positive/negative status of the software limit during motion. Parameters Name Data Type Unit Description...
Page 255
Chapter 18 1-Axis Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 Chapter 18 1-Axis Motion Control API Table 18.1 Function Name Description _DMC_01_start_tr_move Motion displacement using relative coordinates with T-curve velocity cross-section. _DMC_01_start_sr_move Motion displacement using relative coordinates with S-curve velocity cross-section. _DMC_01_start_ta_move Motion displacement using absolute coordinates with T-curve velocity...
Page 256
Chapter 18 1-Axis Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 18.1 _DMC_01_start_tr_move FORMAT I16 PASCAL _DMC_01_start_tr_move(U16 CardNo, U16 NodeID,U16 SlotID, I32 Dist, I32 StrVel, I32 MaxVel, F64 Tacc, F64 Tdec) Purpose Motion displacement using relative coordinates with T-curve velocity cross-section. Please see Fig.
Page 257
Chapter 18 1-Axis Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 18.2 _DMC_01_start_sr_move FORMAT I16 PASCAL _DMC_01_start_sr_move(U16 CardNo, U16 NodeID,U16 SlotID, I32 Dist, I32 StrVel, I32 MaxVel, F64 Tacc, F64 Tdec) Purpose Motion displacement using relative coordinates with S-curve velocity cross-section. Please see Fig.
Page 258
Chapter 18 1-Axis Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 18.3 _DMC_01_start_ta_move FORMAT I16 PASCAL _DMC_01_start_ta_move(U16 CardNo, U16 NodeID,U16 SlotID, I32 Dist, I32 StrVel, I32 MaxVel, F64 Tacc, F64 Tdec) Purpose Motion displacement using absolute coordinates with T-curve velocity cross-section. ...
Page 259
Chapter 18 1-Axis Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 18.4 _DMC_01_start_sa_move FORMAT I16 PASCAL _DMC_01_start_sa_move(U16 CardNo, U16 NodeID,U16 SlotID, I32 Dist, I32 StrVel, I32 MaxVel, F64 Tacc, F64 Tdec) Purpose Carries out motion displacement using absolute coordinates with S-curve velocity cross-section ...
Page 260
Chapter 18 1-Axis Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 18.5 _DMC_01_p_change FORMAT I16 PASCAL _DMC_01_p_change (U16 CardNo, U16 NodeID, U16 SlotID, I32 NewPos) Purpose Replaces the current position with a new position value. Parameters Name Data Type Unit Description CardNo...
Page 261
Chapter 18 1-Axis Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 18.6 _DMC_01_v_change FORMAT I16 PASCAL _DMC_01_v_change (U16 CardNo, U16 NodeID, U16 SlotID, I32 NewSpeed, F64 sec) Purpose Replaces the current motion velocity with a new velocity value. Parameters Name Data Type Unit...
Page 262
Chapter 18 1-Axis Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 NOTE ※ The V-change command can be used in both single- and multi-axis motions. For multi-axis motion, simply issue the command to the main servo. 18-8 Revised March, 2012...
Page 273
Chapter 18 1-Axis Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 18.15 _DMC_01_feedrate_overwrite FORMAT I16 PASCAL _DMC_01_feedrate_overwrite (U16 CardNo, U16 NodeID, U16 SlotID, U16 Mode, I32 New_Speed, F64 sec) Purpose Changes motion speed or speed ratio. Parameters Name Data Type Unit Description...
Page 274
Chapter 18 1-Axis Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 ※ Starting at point A, set NewSpeed to 15000. Speed now 200%, or double the original from now on including the buffer Figure 18.8 Mode = 1 change to new speed Starting at point A, set NewSpeed to 200.
Page 275
Chapter 18 1-Axis Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 18.16 _DMC_01_start_v3_move FORMAT I16 PASCAL _DMC_01_start_v3_move(U16 CardNo, U16 NodeID,U16 SlotID, I32 Dist, I32 StrVel, I32 ConstVel, I32 EndVel, F64 TPhase1, F64 TPhase2, U16 m_curve, U16 m_r_a) Purpose Single-axis motion displacement with EndVel added. ※Values of StrVel and EndVel can be greater than ConstVel.
Page 277
Chapter 19 2-Axis Linear Interpolation Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 Chapter 19 2-Axis Linear Interpolation Motion Control API Table 19.1 Function Name Description _DMC_01_start_tr_move_xy 2-axis Linear interpolation motion using relative coordinates with T-curve velocity cross-section _DMC_01_start_sr_move_xy 2-axis Linear interpolation motion using relative coordinates with S-curve velocity cross-section _DMC_01_start_ta_move_xy 2-axis Linear interpolation motion using absolute...
Page 278
Chapter 19 2-Axis Linear Interpolation Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 19.1 _DMC_01_start_tr_move_xy FORMAT I16 PASCAL _DMC_01_start_tr_move_xy(U16 CardNo, U16* NodeID,U16* SlotID, I32 DisX, I32 DisY, I32 StrVel, I32 MaxVel, F64 Tacc, F64 Tdec) Purpose 2-axis linear interpolation motion using relative coordinates with T-curve velocity cross-section.
Page 279
Chapter 19 2-Axis Linear Interpolation Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 Description As shown in Fig. 19.1, 2-axis linear interpolation means Position moving by X and Y from P0 to P1. The two axes will start and end at the same time. Motion displacement will also be on the same straight line.
Page 280
Chapter 19 2-Axis Linear Interpolation Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 19.2 _DMC_01_start_sr_move_xy FORMAT I16 PASCAL _DMC_01_start_sr_move_xy(U16 CardNo, U16* NodeID,U16* SlotID, I32 DisX, I32 DisY, I32 StrVel, I32 MaxVel, F64 Tacc, F64 Tdec) Purpose 2-axis linear interpolation motion using relative coordinates with S-curve velocity cross-section.
Page 288
Chapter 19 2-Axis Linear Interpolation Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 (This page intentionally left blank.) 19-12 Revised March, 2012...
Page 289
Chapter 20 2-Axis Arc Interpolation Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 Chapter 20 2-Axis Arc Interpolation Motion Control API Table 20.1 Function Name Description _DMC_01_start_tr_arc_xy 2-axis arc interpolation motion using relative coordinates with T-curve velocity cross-section (Known conditions: Center point coordinates, angle) _DMC_01_start_sr_arc_xy 2-axis arc interpolation motion using relative...
Page 290
Chapter 20 2-Axis Arc Interpolation Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 Function Name Description _DMC_01_start_tr_arc3_xy 2-axis arc interpolation motion using relative coordinates with T-curve velocity cross-section (Known conditions: Center point coordinates, endpoint coordinates) _DMC_01_start_sr_arc3_xy 2-axis arc interpolation motion using relative coordinates with S-curve velocity cross-section (Known conditions: Center point coordinates, endpoint coordinates)
Page 291
Chapter 20 2-Axis Arc Interpolation Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 20.1 _DMC_01_start_tr_arc_xy FORMAT I16 PASCAL _DMC_01_start_tr_arc_xy(U16 CardNo, U16* NodeID,U16* SlotID, I32 Center_X, I32 Center_Y, F64 Angle, I32 StrVel, I32 MaxVel, F64 Tacc, F64 Tdec) Purpose 2-axis arc interpolation motion using relative coordinates with T-curve velocity cross-section (Known conditions: center point coordinates, angle).
Page 329
Chapter 21 3-Axis Linear Interpolation Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 Chapter 21 3-Axis Linear Interpolation Motion Control API Table 21.1 Function Name Description _DMC_01_start_tr_move_xyz 3-axis Linear interpolation motion using relative coordinates with T-curve velocity cross-section _DMC_01_start_sr_move_xyz 3-axis Linear interpolation motion using relative coordinates with S-curve velocity cross-section _DMC_01_start_ta_move_xyz 3-axis Linear interpolation motion using absolute...
Page 330
Chapter 21 3-Axis Linear Interpolation Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 21.1 _DMC_01_start_tr_move_xyz FORMAT I16 PASCAL _DMC_01_start_tr_move_xyz(U16 CardNo, U16* NodeID,U16* SlotID, I32 DisX, I32 DisY, I32 DisZ, I32 StrVel, I32 MaxVel, F64 Tacc, F64 Tdec) Purpose 3-axis linear interpolation motion using relative coordinates with T-curve velocity cross-section.
Page 331
Chapter 21 3-Axis Linear Interpolation Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 21.2 _DMC_01_start_sr_move_xyz FORMAT I16 PASCAL _DMC_01_start_sr_move_xyz(U16 CardNo, U16* NodeID,U16* SlotID, I32 DisX, I32 DisY, I32 DisZ, I32 StrVel, I32 MaxVel, F64 Tacc, F64 Tdec) Purpose 3-axis linear interpolation motion using relative coordinates with S-curve velocity cross-section.
Page 332
Chapter 21 3-Axis Linear Interpolation Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 21.3 _DMC_01_start_ta_move_xyz FORMAT I16 PASCAL _DMC_01_start_ta_move_xyz (U16 CardNo, U16* NodeID,U16* SlotID, I32 DisX, I32 DisY, I32 DisZ, I32 StrVel, I32 MaxVel, F64 Tacc, F64 Tdec) Purpose 3-axis linear interpolation motion using absolute coordinates with T-curve velocity cross-section.
Page 333
Chapter 21 3-Axis Linear Interpolation Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 21.4 _DMC_01_start_sa_move_xyz FORMAT I16 PASCAL _DMC_01_start_sa_move_xyz(U16 CardNo, U16* NodeID,U16* SlotID, I32 DisX, I32 DisY, I32 DisZ, I32 StrVel, I32 MaxVel, F64 Tacc, F64 Tdec) Purpose 3-axis linear interpolation motion using absolute coordinates with S-curve velocity cross-section.
Page 347
Chapter 22 3-Axis Spiral Interpolation Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 Description Figure 22.2 Explanation of TPhase1 and TPhase2 Example U16 CardNo=0; U16 NodeIDArray[3]={1,2,3}; U16 SlotID[3]={0, 0, 0}; I32 Center_X =25000, Center_Y =50000, Depth =10000, Pitch = 20000; I16 Dir=1;...
Page 348
Chapter 22 3-Axis Spiral Interpolation Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 (This page intentionally left blank.) 22-12 Revised March, 2012...
Page 349
Chapter 23 Velocity Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 Chapter 23 Velocity Motion Control Table 23.1 Function Name Description _DMC_01_tv_move Velocity motion control with T-curve velocity cross-section _DMC_01_sv_move Velocity motion control with S-curve velocity cross-section Revised March, 2012 23-1...
Page 350
Chapter 23 Velocity Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 23.1 _DMC_01_tv_move FORMAT I16 PASCAL _DMC_01_tv_move(U16 CardNo, U16 NodeID,U16 SlotID, I32 StrVel, I32 MaxVel, F64 Tacc,I16 Dir) Purpose Velocity motion control with T-curve velocity cross-section. Parameters Name Data Type Unit Description...
Page 351
Chapter 23 Velocity Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 23.2 _DMC_01_sv_move FORMAT I16 PASCAL _DMC_01_sv_move(U16 CardNo, U16 NodeID,U16 SlotID, I32 StrVel, I32 MaxVel, F64 Tacc,I16 Dir) Purpose Velocity motion control with S-curve velocity cross-section. Parameters Name Data Type Unit Description...
Page 352
Chapter 23 Velocity Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 (This page intentionally left blank.) 23-4 Revised March, 2012...
Page 353
Chapter 24 Synchronization Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 Chapter 24 Synchronization Motion Control API Table 24.1 Function Name Description _DMC_01_sync_move Start motion sync _DMC_01_sync_move_config Enable/disable motion sync Revised March, 2012 24-1...
Page 354
Chapter 24 Synchronization Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 24.1 _DMC_01_sync_move FORMAT I16 PASCAL _DMC_01_sync_move(I16 CardNo) Purpose Starts motion sync. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 Example U16 CardNo=0; I16 status = DMC_01_sync_move (I16 CardNo);...
Page 355
Chapter 25 Remote Module Control API | PCI-DMC-A01 / PCI-DMC-B01 Chapter 25 Remote Module Control Table 25.1 Function Name Description _DMC_01_get_rm_input_value Retrieve the value for bit 0 to bit 15 of the remote I/O module's input port _DMC_01_set_rm_input_filter Set software filter level for input port of the remote I/O module _DMC_01_set_rm_input_filter_enable Enable software mask for bit 0 to bit 15 of the...
Page 356
Chapter 25 Remote Module Control API | PCI-DMC-A01 / PCI-DMC-B01 25.1 _DMC_01_get_rm_input_value FORMAT I16 PASCAL _DMC_01_get_rm_input_value(U16 CardNo, U16 NodeID,U16 SlotID, U16 port,U16 *value) Purpose Retrieves the value for bit 0 to bit 15 of the remote I/O module's input port. ...
Page 357
Chapter 25 Remote Module Control API | PCI-DMC-A01 / PCI-DMC-B01 25.2 _DMC_01_set_rm_input_filter FORMAT I16 PASCAL _DMC_01_set_rm_input_filter(U16 CardNo, U16 NodeID,U16 SlotID , U16 port,U16 value) Purpose Sets software filter level for input port of the remote I/O module. (When the value of the variable is 0, the software filter time becomes 1 ms.
Page 358
Chapter 25 Remote Module Control API | PCI-DMC-A01 / PCI-DMC-B01 25.3 _DMC_01_set_rm_input_filter_enable FORMAT I16 PASCAL _DMC_01_set_rm_input_filter_enable(U16 CardNo, U16 NodeID, U16 SlotID,U16 port,U16 enable) Purpose Enables software mask for bit 0 to bit 15 of the remote I/O module's input port. ...
Page 359
Chapter 25 Remote Module Control API | PCI-DMC-A01 / PCI-DMC-B01 25.4 _DMC_01_set_rm_output_value FORMAT I16 PASCAL _DMC_01_set_rm_output_value(U16 CardNo, U16 NodeID,U16 SlotID, U16 port,U16 value) Purpose Sets the value for bit 0 to bit 15 of the remote I/O module's output port. ...
Page 360
Chapter 25 Remote Module Control API | PCI-DMC-A01 / PCI-DMC-B01 25.5 _DMC_01_set_rm_output_value_error_handle FORMAT I16 PASCAL _DMC_01_set_rm_output_value_error_handle(U16 CardNo, U16 NodeID, U16 SlotID,U16 port,U16 value) Purpose Sets the output value returned when remote I/O module encounters an error. Parameters Name Data Type Unit...
Page 361
Chapter 25 Remote Module Control API | PCI-DMC-A01 / PCI-DMC-B01 25.6 _DMC_01_get_rm_output_value FORMAT I16 PASCAL _DMC_01_get_rm_output_value (U16 CardNo, U16 NodeID, U16 SlotID, U16 port, U16* value) Purpose Retrieves output value of the remote I/O module. Parameters Name Data Type Unit Description...
Page 362
Chapter 25 Remote Module Control API | PCI-DMC-A01 / PCI-DMC-B01 25.7 _DMC_01_get_rm_output_value_error_handle FORMAT I16 PASCAL _DMC_01_get_rm_output_value_error_handle (U16 CardNo, U16 NodeID, U16 SlotID,U16 port,U16* value) Purpose Retrieves output value of the remote I/O module and determines whether to retain or discard the value if an error occurs.
Page 363
Chapter 25 Remote Module Control API | PCI-DMC-A01 / PCI-DMC-B01 25.8 _DMC_01_set_rm_output_active FORMAT I16 PASCAL _DMC_01_set_rm_output_active (U16 CardNo, U16 NodeID, U16 SlotID, U16 Enable) Purpose Enables/disables output from the remote I/O module. Parameters Name Data Type Unit Description CardNo Number Unit...
Page 364
Chapter 25 Remote Module Control API | PCI-DMC-A01 / PCI-DMC-B01 (This page intentionally left blank.) 25-10 Revised March, 2012...
Page 365
Chapter 26 MPG and JOG Operation API | PCI-DMC-A01 / PCI-DMC-B01 Chapter 26 MPG and JOG Operation Table 26.1 Function Name Description _DMC_01_set_rm_mpg_axes_enable Set MPG motion control _DMC_01_set_rm_mpg_axes_enable2 MPG motion control (can numerator for servo rotation ratio) _DMC_01_set_rm_jog_axes_enable Set JOG motion control Revised March, 2012 26-1...
Page 367
Chapter 26 MPG and JOG Operation API | PCI-DMC-A01 / PCI-DMC-B01 Example I16 rt = 0; U16 CardNo = 0, MasterNodeID = 1, MasterSlotID = 0; //RM-64 Node ID is 1 U16 NodeID[4] = {2, 3, 0, 0}, SlotID[4] = {0}; //Use two ASD-A2F servo motors assigned to Node 2 and Node 3.
Page 368
Chapter 26 MPG and JOG Operation API | PCI-DMC-A01 / PCI-DMC-B01 26.2 _DMC_01_set_rm_mpg_axes_enable2 FORMAT I16 PASCAL _DMC_01_set_rm_mpg_axes_enable2 (U16 CardNo, U16 MasterNodeID, U16 MasterSlotID, U16* NodeID, U16* SlotID, U16 enable,U16 pulse_ratio, U32 *ratio, U32 *slope, U16 *denominator) Purpose MPG motion control (can set numerator for motor rotation ratio). ...
Page 369
Chapter 26 MPG and JOG Operation API | PCI-DMC-A01 / PCI-DMC-B01 NOTE The above example is explained below: Conditions: Assuming one full turn of MPG is 100 clicks, MPG ratio X10, ratio=10, Denominator=36, pulse_ratio =4, slope=1000, electronic gear ratio is P1.44/P1.45 = 1 1 click of MPG = Number of motor rotation pulses (128000 * 10 / 100 * 10 / 36=355.55) * P1.45/P1.44...
Page 370
Chapter 26 MPG and JOG Operation API | PCI-DMC-A01 / PCI-DMC-B01 26.3 _DMC_01_set_rm_jog_axes_enable FORMAT I16 PASCAL _DMC_01_set_rm_jog_axes_enable (U16 CardNo, U16 MasterNodeID, U16 MasterSlotID, U16* NodeID, U16* SlotID, U16 enable, U16 jog_mode, I32 *jog_speed, F64 *sec) Purpose Sets JOG motion control. ...
Page 371
Chapter 27 4-Channel Pulse Interface API | PCI-DMC-A01 / PCI-DMC-B01 Chapter 27 4-Channel Pulse Interface Table 27.1 Function Name Description _DMC_01_set_rm_04pi_ipulse_mode Set input phase mode for pulse interface module _DMC_01_set_rm_04pi_opulse_mode Set output phase mode for pulse interface module _DMC_01_set_rm_04pi_svon_polarity Set PWR ON (SVON) level _DMC_01_set_rm_04pi_DO2 Enable DO2 port configuration _DMC_01_set_rm_04pi_homing_ratio...
Page 372
Chapter 27 4-Channel Pulse Interface API | PCI-DMC-A01 / PCI-DMC-B01 27.1 _DMC_01_set_rm_04pi_ipulse_mode FORMAT I16 PASCAL _DMC_01_set_rm_04pi_ipulse_mode (U16 CardNo, U16 NodeID, U16 SlotID, U16 mode) Purpose Sets input phase mode for pulse interface module. Parameters Name Data Type Unit Description CardNo...
Page 373
Chapter 27 4-Channel Pulse Interface API | PCI-DMC-A01 / PCI-DMC-B01 27.2 _DMC_01_set_rm_04pi_opulse_mode FORMAT I16 PASCAL _DMC_01_set_rm_04pi_opulse_mode (U16 CardNo, U16 NodeID, U16 SlotID ,U16 mode) Purpose Sets output phase mode for pulse interface module. Parameters Name Data Type Unit Description CardNo...
Page 374
Chapter 27 4-Channel Pulse Interface API | PCI-DMC-A01 / PCI-DMC-B01 27.3 _DMC_01_set_rm_04pi_svon_polarity FORMAT I16 PASCAL _DMC_01_set_rm_04pi_svon_polarity (U16 CardNo, U16 NodeID, U16 SlotID, U16 polarity) Purpose Sets POWER ON (SVON) level. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 NodeID...
Page 375
Chapter 27 4-Channel Pulse Interface API | PCI-DMC-A01 / PCI-DMC-B01 27.4 _DMC_01_set_rm_04pi_DO2 FORMAT I16 PASCAL _DMC_01_set_rm_04pi_DO2 (U16 CardNo, U16 NodeID, U16 SlotID, U16 ON_OFF) Purpose Enables DO2 port configuration. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 NodeID Number Unit...
Page 376
Chapter 27 4-Channel Pulse Interface API | PCI-DMC-A01 / PCI-DMC-B01 27.5 _DMC_01_set_rm_04pi_homing_ratio FORMAT I16 PASCAL _DMC_01_set_rm_04pi_homing_ratio (U16 CardNo, U16 NodeID, U16 SlotID, U16 ratio) Purpose Sets the rated torque multiplier for Homing mode. ※When using RM04PI to carry out Homing motion this executes “_DMC_01_set_home_config”...
Page 377
Chapter 27 4-Channel Pulse Interface API | PCI-DMC-A01 / PCI-DMC-B01 27.6 _DMC_01_04pi_set_poweron FORMAT I16 PASCAL _DMC_01_04pi_set_poweron (U16 CardNo, U16 NodeID, U16 SlotID, U16 ON_OFF) Purpose Enables/disables PWR ON(SVON). Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 NodeID Number Unit...
Page 378
Chapter 27 4-Channel Pulse Interface API | PCI-DMC-A01 / PCI-DMC-B01 27.7 _DMC_01_rm_04PI_get_buffer FORMAT I16 PASCAL _DMC_01_rm_04PI_get_buffer (U16 CardNo, U16 NodeID, U16 SlotID, U16 *bufferLength) Purpose Retrieves the buffered motion command. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 NodeID...
Page 379
Chapter 28 4-Channel Pulse Interface (Mode 1) Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 Chapter 28 4-Channel Pulse Interface (Mode 1) Motion Control API Table 28.1 Function Name Description Perform 1-axis motion control under RM04PI _DMC_01_rm_04pi_md1_start_move Mode 1. Perform velocity motion control under RM04PI _DMC_01_rm_04pi_md1_v_move Mode 1.
Page 380
Chapter 28 4-Channel Pulse Interface (Mode 1) Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 Function Name Description Enable/disable software limit under RM04PI _DMC_01_rm_04pi_md1_set_soft_limit Mode 1 Get current 4-axis software limit contact status _DMC_01_rm_04pi_md1_get_soft_limit_status under RM04PI Mode 1 _DMC_01_rm_04pi_md1_set_sld Enable SLD port (DI3) and set profile When alarm code is 299, get motion control _DMC_01_rm_04pi_md1_get_mc_error_code error message under RM04PI Mode 1...
Page 381
Chapter 28 4-Channel Pulse Interface (Mode 1) Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 28.1 _DMC_01_rm_04pi_md1_start_move FORMAT I16 PASCAL _DMC_01_rm_04pi_md1_start_move(U16 CardNo, U16 NodeID,U16 SlotID, I32 Dist, I32 StrVel, I32 MaxVel, F64 Tacc, F64 Tdec,U16 m_curve,U16 m_r_a) Purpose Performs 1-axis motion control under RM04PI Mode 1. ※When setting StrVel, make sure its value is smaller than MaxVel.
Page 398
Chapter 28 4-Channel Pulse Interface (Mode 1) Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 28.10 _DMC_01_rm_04pi_md1_p_change FORMAT I16 PASCAL _DMC_01_rm_04pi_md1_p_change (U16 CardNo, U16 NodeID, U16 SlotID, I32 NewPos) Purpose Replaces the current position with a new position value under RM04PI Mode 1. ...
Page 399
Chapter 28 4-Channel Pulse Interface (Mode 1) Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 28.11 _DMC_01_rm_04pi_md1_v_change FORMAT I16 PASCAL _DMC_01_rm_04pi_md1_v_change (U16 CardNo, U16 NodeID, U16 SlotID, I32 NewSpeed, F64 sec) Purpose Replaces the current velocity with a new velocity value under RM04PI Mode 1. ※Please refer to section 18.6 “_DMC_01_v_change”...
Page 400
Chapter 28 4-Channel Pulse Interface (Mode 1) Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 28.12 _DMC_01_rm_04pi_md1_set_gear FORMAT I16 PASCAL _DMC_01_rm_04pi_md1_set_gear (U16 CardNo, U16 NodeID, U16 SlotID, I16 numerator,I16 denominator,U16 Enable) Purpose Enables and sets Gear parameters under RM04PI Mode 1. ※As a step motor does not offer an electronic gear ratio, this function is used instead.
Page 401
Chapter 28 4-Channel Pulse Interface (Mode 1) Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 28.13 _DMC_01_rm_04pi_md1_set_soft_limit FORMAT I16 PASCAL _DMC_01_rm_04pi_md1_set_soft_limit(U16 CardNo, U16 NodeID,U16 SlotID, I32 PLimit, I32 NLimit,U16 Enable) Purpose Enables/disables software limit under RM04PI Mode 1. Parameters Name Data Type Unit...
Page 402
Chapter 28 4-Channel Pulse Interface (Mode 1) Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 28.14 _DMC_01_rm_04pi_md1_get_soft_limit_status FORMAT I16 PASCAL _DMC_01_rm_04pi_md1_get_soft_limit_status (U16 CardNo, U16 NodeID, U16 SlotID ,U16* NLimit_status,U16* PLimit_status) Purpose Retrieves current 4-axis software limit contact status under RM04PI Mode 1. ...
Page 403
Chapter 28 4-Channel Pulse Interface (Mode 1) Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 28.15 _DMC_01_rm_04pi_md1_set_sld FORMAT I16 PASCAL _DMC_01_rm_04pi_md1_set_sld (U16 CardNo, U16 NodeID, U16 SlotID, I16 enable, I16 sd_logic,I16 mode) Purpose Enables SLD port (DI3) and sets the profile. ...
Page 404
Chapter 28 4-Channel Pulse Interface (Mode 1) Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 28.16 _DMC_01_rm_04pi_md1_get_mc_error_code FORMAT I16 PASCAL _DMC_01_rm_04pi_md1_get_mc_error_code (U16 CardNo, U16 NodeID, U16 SlotID, U16 error_code) Purpose When the alarm code is 299, retrieves the motion control error message under RM04PI Mode 1. ...
Page 405
Chapter 28 4-Channel Pulse Interface (Mode 1) Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 28.17 _DMC_01_set_rm_04pi_ref_counter FORMAT I16 PASCAL _DMC_01_set_rm_04pi_ref_counter (U16 CardNo, U16 NodeID, U16 SlotID , U16 mode) Purpose Selects the reference position after re-connecting to module under M04PI Mode 1. ※Check that link feedback is enabled when using this function.
Page 406
Chapter 28 4-Channel Pulse Interface (Mode 1) Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 (This page intentionally left blank.) 28-28 Revised March, 2012...
Page 407
Chapter 29 4-Channel Analog Output Remote I/O Module API | PCI-DMC-A01 / PCI-DMC-B01 Chapter 29 4-Channel Analog Output Remote I/O Module API Table 29.1 Function Name Description _DMC_01_rm_04da_set_output_value Set DA output value _DMC_01_rm_04da_get_output_value Read DA output _DMC_01_rm_04da_get_return_code Read DA status _DMC_01_rm_04da_set_output_range Set DA output range _DMC_01_rm_04da_set_output_enable...
Page 408
Chapter 29 4-Channel Analog Output Remote I/O Module API | PCI-DMC-A01 / PCI-DMC-B01 29.1 _DMC_01_rm_04da_set_output_value FORMAT I16 PASCAL _DMC_01_rm_04da_set_output_value (U16 CardNo, U16 NodeID, U16 SlotID, U16 ChannelNo, U16 Value) Purpose Sets value of DA output. Parameters Name Data Type Unit Description...
Page 409
Chapter 29 4-Channel Analog Output Remote I/O Module API | PCI-DMC-A01 / PCI-DMC-B01 29.2 _DMC_01_rm_04da_get_output_value FORMAT I16 PASCAL _DMC_01_rm_04da_get_output_value (U16 CardNo, U16 NodeID,U16 SlotID, U16 ChannelNo, U16 *Value) Purpose Reads the value of the DA output. Parameters Name Data Type Unit...
Page 410
Chapter 29 4-Channel Analog Output Remote I/O Module API | PCI-DMC-A01 / PCI-DMC-B01 29.3 _DMC_01_rm_04da_get_return_code FORMAT I16 PASCAL _DMC_01_rm_04da_get_return_code (U16 CardNo, U16 NodeID, U16 SlotID, U16 ChannelNo, U16* ReturnCode) Purpose Reads DA status. Parameters Data Name Unit Description Type CardNo...
Page 411
Chapter 29 4-Channel Analog Output Remote I/O Module API | PCI-DMC-A01 / PCI-DMC-B01 29.4 _DMC_01_rm_04da_set_output_range FORMAT I16 PASCAL _DMC_01_rm_04da_set_output_range (U16 CardNo, U16 NodeID, U16 SlotID, U16 ChannelNo, U16 Range) Purpose Sets the DA output range. Parameters Name Data Type Unit Description...
Page 412
Chapter 29 4-Channel Analog Output Remote I/O Module API | PCI-DMC-A01 / PCI-DMC-B01 29.5 _DMC_01_rm_04da_set_output_enable FORMAT I16 PASCAL _DMC_01_rm_04da_set_output_enable (U16 CardNo, U16 NodeID,U16 SlotID, U16 ChannelNo, U16 Enable) Purpose Enables/disables pin output. Parameters Name Data Type Unit Description CardNo Number Unit...
Page 413
Chapter 29 4-Channel Analog Output Remote I/O Module API | PCI-DMC-A01 / PCI-DMC-B01 29.6 _DMC_01_rm_04da_set_output_overrange FORMAT I16 PASCAL _DMC_01_rm_04da_set_output_overrange (U16 CardNo, U16 NodeID, U16 SlotID, U16 ChannelNo, U16 On_Off) Purpose Increases output range by 10%. Parameters Name Data Type Unit Description...
Page 414
Chapter 29 4-Channel Analog Output Remote I/O Module API | PCI-DMC-A01 / PCI-DMC-B01 29.7 _DMC_01_rm_04da_set_output_error_clear FORMAT I16 PASCAL _DMC_01_rm_04da_set_output_error_clear (U16 CardNo, U16 NodeID, U16 SlotID, U16 ChannelNo, U16 On_Off) Purpose Clears error status. Parameters Name Data Type Unit Description CardNo...
Page 415
Chapter 29 4-Channel Analog Output Remote I/O Module API | PCI-DMC-A01 / PCI-DMC-B01 29.8 _DMC_01_rm_04da_read_data FORMAT I16 PASCAL _DMC_01_rm_04da_read_data (U16 CardNo, U16 NodeID, U16 SlotID, U16 ChannelNo, U16* data) Purpose Retrieves current DA number. Parameters Name Data Type Unit Description CardNo...
Page 416
Chapter 29 4-Channel Analog Output Remote I/O Module API | PCI-DMC-A01 / PCI-DMC-B01 29.9 _DMC_01_rm_04da_set_output_error_handle FORMAT I16 PASCAL _DMC_01_rm_04da_set_output_error_handle (U16 CardNo, U16 NodeID, U16 SlotID, U16 ChannelNo, U16 On_Off) Purpose Keeps original DA settings if the connection is broken. ...
Page 417
Chapter 29 4-Channel Analog Output Remote I/O Module API | PCI-DMC-A01 / PCI-DMC-B01 29.10 _DMC_01_rm_04da_set_output_offset_value FORMAT I16 PASCAL _DMC_01_rm_04da_set_output_offset_value (U16 CardNo, U16 NodeID, U16 SlotID, U16 ChannelNo, I16 Value) Purpose Sets the DA offset value. Parameters Data Name Unit Description...
Page 418
Chapter 29 4-Channel Analog Output Remote I/O Module API | PCI-DMC-A01 / PCI-DMC-B01 29.11 _DMC_01_rm_04da_get_output_offset_value FORMAT I16 PASCAL _DMC_01_rm_04da_get_output_offset_value (U16 CardNo, U16 NodeID, U16 SlotID, U16 ChannelNo, I16 *Value) Purpose Reads the DA offset value. Parameters Data Name Unit Description...
Page 419
Chapter 30 4-Channel Analog Input Remote I/O Module API | PCI-DMC-A01 / PCI-DMC-B01 Chapter 30 4-Channel Analog Input Remote I/O Module API Table 30.1 Function Name Description _DMC_01_set_04ad_input_range Set AD input range _DMC_01_get_04ad_input_range Get current AD Input range _DMC_01_set_04ad_zero_scale Set AD zero level for range calibration _DMC_01_get_04ad_zero_scale_status Check if AD zero calibration is complete _DMC_01_set_04ad_full_scale...
Page 420
Chapter 30 4-Channel Analog Input Remote I/O Module API | PCI-DMC-A01 / PCI-DMC-B01 30.1 _DMC_01_set_04ad_input_range FORMAT I16 _DMC_01_set_04ad_input_range (U16 CardNo, U16 NodeID, U16 SlotID, U16 channelno, U16 range) Purpose Sets the AD input range. Parameters Name Data Type Unit Description CardNo...
Page 421
Chapter 30 4-Channel Analog Input Remote I/O Module API | PCI-DMC-A01 / PCI-DMC-B01 30.2 _DMC_01_get_04ad_input_range FORMAT I16 _DMC_01_get_04ad_input_range (U16 CardNo, U16 NodeID, U16 SlotID, U16 channelno, U16 *range) Purpose Retrieves the current AD Input range. Parameters Name Data Type Unit Description...
Page 422
Chapter 30 4-Channel Analog Input Remote I/O Module API | PCI-DMC-A01 / PCI-DMC-B01 30.3 _DMC_01_set_04ad_zero_scale FORMAT I16 _DMC_01_set_04ad_zero_scale (U16 CardNo, U16 NodeID, U16 SlotID, U16 channelno) Purpose Sets AD zero level for range calibration. Parameters Name Data Type Unit Description CardNo...
Page 423
Chapter 30 4-Channel Analog Input Remote I/O Module API | PCI-DMC-A01 / PCI-DMC-B01 30.4 _DMC_01_get_04ad_zero_scale_status FORMAT I16 _DMC_01_get_04ad_zero_scale_status (U16 CardNo, U16 NodeID, U16 SlotID, U16 channelno, U16* status) Purpose Checks if AD zero calibration is complete. Parameters Name Data Type Unit...
Page 424
Chapter 30 4-Channel Analog Input Remote I/O Module API | PCI-DMC-A01 / PCI-DMC-B01 30.5 _DMC_01_set_04ad_full_scale FORMAT I16 _DMC_01_set_04ad_full_scale (U16 CardNo, U16 NodeID, U16 SlotID, U16 channelno) Purpose Sets AD maximum level for range calibration. Parameters Name Data Type Unit Description CardNo...
Page 425
Chapter 30 4-Channel Analog Input Remote I/O Module API | PCI-DMC-A01 / PCI-DMC-B01 30.6 _DMC_01_get_04ad_full_scale_status FORMAT I16 _DMC_01_get_04ad_full_scale_status (U16 CardNo, U16 NodeID, U16 SlotID, U16 channelno, U16* status) Purpose Checks if AD maximum level calibration is complete. Parameters Name Data Type Unit...
Page 426
Chapter 30 4-Channel Analog Input Remote I/O Module API | PCI-DMC-A01 / PCI-DMC-B01 30.7 _DMC_01_set_04ad_conversion_time FORMAT I16 _DMC_01_set_04ad_conversion_time (U16 CardNo, U16 NodeID, U16 SlotID, U16 mode) Purpose Sets AD conversion time. Parameters Data Name Unit Description Type CardNo Number Unit CardNo is between 0~15 NodeID...
Page 427
Chapter 30 4-Channel Analog Input Remote I/O Module API | PCI-DMC-A01 / PCI-DMC-B01 30.8 _DMC_01_get_04ad_conversion_time FORMAT I16 _DMC_01_get_04ad_conversion_time (U16 CardNo, U16 NodeID, U16 SlotID, U16* mode) Purpose Retrieves current AD conversion time. Parameters Name Data Type Unit Description Number CardNo...
Page 428
Chapter 30 4-Channel Analog Input Remote I/O Module API | PCI-DMC-A01 / PCI-DMC-B01 30.9 _DMC_01_get_04ad_data FORMAT I16 _DMC_01_get_04ad_data (U16 CardNo, U16 NodeID, U16 SlotID, U16 channelno, U16* value) Purpose Reads input voltage. Parameters Name Data Type Unit Description CardNo Number Unit...
Page 429
Chapter 30 4-Channel Analog Input Remote I/O Module API | PCI-DMC-A01 / PCI-DMC-B01 30.10 _DMC_01_set_04ad_average_mode FORMAT I16 _DMC_01_set_04ad_average_mode (U16 CardNo, U16 NodeID, U16 SlotID, U16 channelno, U16 mode) Purpose Sets AD average mode. Parameters Name Data Type Unit Description CardNo...
Page 430
Chapter 30 4-Channel Analog Input Remote I/O Module API | PCI-DMC-A01 / PCI-DMC-B01 30.11 _DMC_01_get_04ad_average_mode FORMAT I16 _DMC_01_get_04ad_average_mode (U16 CardNo, U16 NodeID, U16 SlotID, U16 channelno, U16* mode) Purpose Retrieves AD average mode. Parameters Name Data Type Unit Description CardNo...
Page 431
Chapter 30 4-Channel Analog Input Remote I/O Module API | PCI-DMC-A01 / PCI-DMC-B01 30.12 _DMC_01_set_04ad_input_enable FORMAT I16 _DMC_01_set_04ad_input_enable (U16 CardNo, U16 NodeID, U16 SlotID, U16 channelno, U16 ON_OFF) Purpose Enables/disables AD Channel Input feedback. Parameters Data Name Unit Description Type...
Page 432
Chapter 30 4-Channel Analog Input Remote I/O Module API | PCI-DMC-A01 / PCI-DMC-B01 (This page intentionally left blank.) 30-14 Revised March, 2012...
Page 433
Chapter 31 Slave Data API | PCI-DMC-A01 / PCI-DMC-B01 Chapter 31 Slave Data API Table 31.1 Function Name Description _DMC_01_get_devicetype Get Slave device type _DMC_01_get_slave_version Get Slave device firmware version Revised March, 2012 31-1...
Page 434
Chapter 31 Slave Data API | PCI-DMC-A01 / PCI-DMC-B01 31.1 _DMC_01_get_devicetype FORMAT I16 PASCAL _DMC_01_get_devicetype (I16 CardNo, U16 NodeID, U16 SlotID, U32 *DeviceType, U32 *IdentityObject) Purpose Retrieves slave device type. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 NodeID...
Page 435
Chapter 31 Slave Data API | PCI-DMC-A01 / PCI-DMC-B01 NOTE ※Table of device type codes used for the DeviceType variable: Device Type Code Device Type Code A2 Series Servo Drives 0x04020192 M Series Servo Drives 0x06020192 A2R Series Servo Drives 0x08020192 S Series Servo Drives 0x09020192...
Page 436
Chapter 31 Slave Data API | PCI-DMC-A01 / PCI-DMC-B01 31.2 _DMC_01_get_slave_version FORMAT I16 PASCAL _DMC_01_get_slave_version (I16 CardNo, U16 NodeID,U16 SlotID, U16* version) Purpose Retrieves slave device firmware version. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 NodeID Number Unit...
Page 437
Chapter 32 Parameter Monitoring API | PCI-DMC-A01 / PCI-DMC-B01 Chapter 32 Parameter Monitoring API Table 32.1 Function Name Description _DMC_01_set_monitor Set parameter to monitor _DMC_01_get_monitor Get value for monitored parameter _DMC_01_get_servo_command Get servo drive command value _DMC_01_get_servo_DI Get servo drive DI message value _DMC_01_get_servo_DO Get servo drive DO message value Revised March, 2012...
Page 438
Chapter 32 Parameter Monitoring API | PCI-DMC-A01 / PCI-DMC-B01 32.1 _DMC_01_set_monitor FORMAT I16 PASCAL _DMC_01_set_monitor (U16 CardNo, U16 NodeID, U16 SlotID, U16 monitorw) Purpose Sets parameter to monitor. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 NodeID Number Unit...
Page 439
Chapter 32 Parameter Monitoring API | PCI-DMC-A01 / PCI-DMC-B01 Reference Table 32.2 Monitor 04PI item Monitor item Unit Data length Servo index Motor feedback pulse (after □ ■ User 32-bit[signed integer] electronic gear comparison) Pulse command input count □ ■...
Page 440
Chapter 32 Parameter Monitoring API | PCI-DMC-A01 / PCI-DMC-B01 Monitor 04PI item Monitor item Unit Data length Servo index 16-bit[unsigned □ ■ Load/motor inertia ratio 0.1 times integer] □ ■ IGBT temperature 16-bit[signed integer] 16-bit[unsigned □ ■ Resonant frequency Hertz integer] Value at Z-phase Home □...
Page 441
Chapter 32 Parameter Monitoring API | PCI-DMC-A01 / PCI-DMC-B01 32.2 _DMC_01_get_monitor FORMAT I16 PASCAL _DMC_01_set_command (U16 CardNo, U16 NodeID, U16 SlotID, U32 cmd) Purpose Retrieves value of monitored parameter. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 NodeID Number Unit...
Page 442
Chapter 32 Parameter Monitoring API | PCI-DMC-A01 / PCI-DMC-B01 32.3 _DMC_01_get_servo_command FORMAT I16 PASCAL _DMC_01_get_servo_command (U16 CardNo, U16 NodeID, U16 SlotID, U32 *servo_cmd) Purpose Retrieves servo drive command value. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 NodeID Number Unit...
Page 443
Chapter 32 Parameter Monitoring API | PCI-DMC-A01 / PCI-DMC-B01 32.4 _DMC_01_get_servo_DI FORMAT I16 PASCAL _DMC_01_get_servo_DI (U16 CardNo, U16 NodeID, U16 SlotID, U16 *servo_DI) Purpose Retrieves server DI message value. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 NodeID Number Unit...
Page 444
Chapter 32 Parameter Monitoring API | PCI-DMC-A01 / PCI-DMC-B01 32.5 _DMC_01_get_servo_DO FORMAT I16 PASCAL _DMC_01_get_servo_DO (U16 CardNo, U16 NodeID, U16 SlotID, U16 *servo_DO) Purpose Retrieves server DO message value. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 NodeID Number Unit...
Page 445
Chapter 33 Alarm Message API | PCI-DMC-A01 / PCI-DMC-B01 Chapter 33 Alarm Message API Table 33.1 Function Name Description _DMC_01_set_ralm Reset output servo drive alarm message _DMC_01_get_alm_code Get Slave alarm code _DMC_01_master_alm_code Get the Master Card connection alarm code _DMC_01_slave_error Get number of consecutive errors during Slave communication Revised March, 2012...
Page 446
Chapter 33 Alarm Message API | PCI-DMC-A01 / PCI-DMC-B01 33.1 _DMC_01_set_ralm FORMAT I16 PASCAL _DMC_01_set_ralm (U16 CardNo, U16 NodeID, U16 SlotID) Purpose Resets output servo drive alarm message. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 NodeID Number Unit...
Page 447
Chapter 33 Alarm Message API | PCI-DMC-A01 / PCI-DMC-B01 33.2 _DMC_01_get_alm_code FORMAT I16 PASCAL _DMC_01_get_alm_code (U16 CardNo, U16 NodeID, U16 SlotID, U32 *alm_code) Purpose Retrieves slave alarm code. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 NodeID Number Unit...
Page 448
Chapter 33 Alarm Message API | PCI-DMC-A01 / PCI-DMC-B01 33.3 _DMC_01_master_alm_code FORMAT I16 PASCAL _DMC_01_master_alm_code (U16 CardNo,U16* alm_code) Purpose Retrieves the Master Card connection alarm code. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 alm_code U16* Number...
Page 449
Chapter 33 Alarm Message API | PCI-DMC-A01 / PCI-DMC-B01 33.4 _DMC_01_slave_error FORMAT I16 PASCAL _DMC_01_slave_error (U16 CardNo, U16 NodeID,U16 SlotID,U16* alm_cnt) Purpose Retrieves number of consecutive errors during slave communications. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 NodeID...
Page 450
Chapter 33 Alarm Message API | PCI-DMC-A01 / PCI-DMC-B01 (This page intentionally left blank.) 33-6 Revised March, 2012...
Page 451
Chapter 34 Multi-Axis Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 Chapter 34 Multi-Axis Motion Control Table 34.1 Function Name Description _DMC_01_multi_axes_move Set motion control for more than 2 axes _ DMC_01_liner_speed_master Set multi-axis linear motion control velocity _DMC_01_start_v3_multi_axes Multi-axis (more than 2 axes) motion control with added EndVel Revised March, 2012 34-1...
Page 452
Chapter 34 Multi-Axis Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 34.1 _DMC_01_multi_axes_move FORMAT I16 PASCAL _DMC_01_multi_axes_move(U16 CardNo,U16 AxisNum, U16* NodeID, U16* SlotID, I32 *DistArrary, I32 StrVel, I32 MaxVel, F64 Tacc, F64 Tdec,U16 m_curve, U16 m_r_a) Purpose Sets motion control for more than 2 axes. ...
Page 453
Chapter 34 Multi-Axis Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 Example U16 CardNo=0, AxisNum=4; U16 NodeID[4]={1,2,3,4}, SlotID[4]={0,1,2,3}; I32 DistArrary[4]={1000, 2000, 3000, 6000}; I32 StrVel=1000, MaxVel=50000; F64 Tacc=0.1, Tdec=0.1; U16 m_curve=1; U16 m_r_a=0; /*Set as multi-axis motion control using absolute coordinates with T-curve velocity cross-section.
Page 454
Chapter 34 Multi-Axis Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 34.2 _ DMC_01_liner_speed_master FORMAT I16 PASCAL _ DMC_01_liner_speed_master (U16 CardNo,U16 AxisNum, U16* NodeID, U16* SlotID, I32 *DistArrary, I32 StrVel, I32 MaxVel, F64 Tacc, F64 Tdec,U16 m_curve, U16 m_r_a) Purpose When setting the multi-axis (Line2, Line3, Multi_Axis) motion velocity, the original motion velocity setting (Mode=0) is for velocity while (Mode=1) has velocity set as the component velocity speed for the axis with the greatest travel (Once the Master axis is configured, the...
Page 455
Chapter 34 Multi-Axis Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 34.3 _DMC_01_start_v3_multi_axes FORMAT I16 PASCAL _DMC_01_start_v3_multi_axes(U16 CardNo,U16 AxisNum, U16* NodeID, U16* SlotID, I32 *DistArrary, I32 StrVel, I32 ConstVel, I32 EndVel, F64 TPhase1, F64 TPhase2, U16 m_curve,U16 m_r_a) Purpose Multi-axis (more than 2 axes) motion control with added EndVel.
Page 456
Chapter 34 Multi-Axis Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 Description Figure 34.1 Explanation of TPhase1 and TPhase2 Example U16 CardNo=0, AxisNum=4; U16 NodeID[4]={1,2,3,4}, SlotID[4]={0,1,2,3}; I32 DistArrary[4]={1000, 2000, 3000, 6000}; I32 StrVel=1000, MaxVel=50000; I32 EndVel=20000; F64 TPhase1=0.2; F64 TPhase2=0.1; U16 m_curve=1, m_r_a=0;...
Page 457
Chapter 35 Buffer Operation API | PCI-DMC-A01 / PCI-DMC-B01 Chapter 35 Buffer Operation API Table 35.1 Function Name Description _DMC_01_set_trigger_buf_function Use servo drive DI3 (SLD) to trigger Motion command Revised March, 2012 35-1...
Page 458
Chapter 35 Buffer Operation API | PCI-DMC-A01 / PCI-DMC-B01 35.1 _DMC_01_set_trigger_buf_function FORMAT I16 PASCAL _DMC_01_set_trigger_buf_function (I16 CardNo, U16 NodeID, U16 SlotID, U16 enable) Purpose Uses servo drive DI3 (SLD) to trigger Motion command. Parameters Name Data Type Unit Description CardNo...
Page 459
Chapter 36 Interrupt API | PCI-DMC-A01 / PCI-DMC-B01 Chapter 36 Interrupt API Table 36.1 Function Name Description _DMC_01_set_int_factor Set interrupt mode. Total of 8 modes available. _DMC_01_int_enable Enable interrupt feedback _DMC_01_int_disable Disable disable interrupt. _DMC_01_get_int_count Interrupt count. _DMC_01_get_int_status Get current interrupt status _DMC_01_Link_interrupt Link handling procedure.
Page 460
Chapter 36 Interrupt API | PCI-DMC-A01 / PCI-DMC-B01 36.1 _DMC_01_ set_int_factor FORMAT I16 PASCAL _DMC_01_set_int_factor (U16 CardNo, U16 NodeID, U16 int_factor) Purpose Sets interrupt mode. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 NodeID Number Unit Node ID...
Page 461
Chapter 36 Interrupt API | PCI-DMC-A01 / PCI-DMC-B01 36.2 _DMC_01_ int_enable FORMAT I16 PASCAL _DMC_01_int_enable (U16 CardNo, U16 NodeID) Purpose Enables interrupt. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 NodeID Number Unit Node ID ...
Page 462
Chapter 36 Interrupt API | PCI-DMC-A01 / PCI-DMC-B01 36.4 _DMC_01_ get_int_count FORMAT I16 PASCAL _DMC_01_get_int_count (U16 CardNo, U16 NodeID, U16 count) Purpose Reads interrupt count. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 NodeID Number Unit Node ID...
Page 463
Chapter 36 Interrupt API | PCI-DMC-A01 / PCI-DMC-B01 36.5 _DMC_01_ get_int_status FORMAT I16 PASCAL _DMC_01_get_int_status (U16 CardNo, U16 NodeID, U16 event_int_status) Purpose Reads current interrupt mode. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 NodeID Number Unit Node ID...
Page 464
Chapter 36 Interrupt API | PCI-DMC-A01 / PCI-DMC-B01 36.6 _DMC_01_link_ interrupt FORMAT I16 PASCAL _DMC_01_link_interrupt (U16 CardNo, void (__stdcall *callbackAddr) (U16 CardNo, U16 NodeID)) Purpose Sets a handler procedure. When interrupt occurs, enter this handler. Parameters Name Data Type Unit Description...
Page 465
Chapter 37 Security API | PCI-DMC-A01 / PCI-DMC-B01 Chapter 37 Security API Table 37.1 Function Name Description _DMC_01_read_security Master Card: read security data at specified memory block _DMC_01_read_security_status Master Card: get read/write status of current memory _DMC_01_write_security Master Card: write security data to specified memory block _DMC_01_write_security_status Master Card: write memory to function enable before...
Page 466
Chapter 37 Security API | PCI-DMC-A01 / PCI-DMC-B01 37.1 _DMC_01_ read_security FORMAT I16 PASCAL _DMC_01_read_security (U16 CardNo, U16 page, U16 array) Purpose Reads security data specified by the Master Card from memory. Parameters Name Data Type Unit Description CardNo Number Unit...
Page 467
Chapter 37 Security API | PCI-DMC-A01 / PCI-DMC-B01 37.3 _DMC_01_write_security FORMAT I16 PASCAL _DMC_01_write_security (U16 CardNo, U16 page, U16 array ) Purpose Writes security data to memory block specified by the Master Card. Parameters Name Data Type Unit Description CardNo...
Page 468
Chapter 37 Security API | PCI-DMC-A01 / PCI-DMC-B01 37.5 _DMC_01_ check_userpassword FORMAT I16 PASCAL _DMC_01_ check_userpassword (U16 CardNo, U32 password_data, U16 password_state) Purpose Before reading/writing data on the Master Card, checks that user has permission to read/write to memory. ...
Page 469
Chapter 37 Security API | PCI-DMC-A01 / PCI-DMC-B01 37.7 _DMC_01_check_verifykey FORMAT I16 PASCAL _DMC_01_check_verifykey (U16 CardNo, U32 Verifykey, U16state) Purpose Master Card: Checks verify key matches. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 Verifykey Number Verify key to check...
Page 470
Chapter 37 Security API | PCI-DMC-A01 / PCI-DMC-B01 37.9 _DMC_01_ read_serialno FORMAT I16 PASCAL _DMC_01_ read_serialno (U16 CardNo, U32 Serialno) Purpose Reads product serial number in the Master Card memory. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 Serialno...
Page 471
Chapter 37 Security API | PCI-DMC-A01 / PCI-DMC-B01 37.10 misc_slave_check_userpassword FORMAT I16 PASCAL _misc_slave_check_userpassword (U16 CardNo, U16 NodeID, U16 SlotID, U32 Password_data, U16 *Password_state) Purpose Before read/write data on Slave (04PI), checks that user has permission to read/write to memory.
Page 472
Chapter 37 Security API | PCI-DMC-A01 / PCI-DMC-B01 37.11 _misc_slave_write_userpassword FORMAT I16 PASCAL _misc_slave_write_userpassword (U16 CardNo, U16 NodeID, U16 SlotID, U32 Password_datae) Purpose Writes user password to Slave(04PI). Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 NodeID Selection...
Page 473
Chapter 37 Security API | PCI-DMC-A01 / PCI-DMC-B01 37.12 _misc_slave_get_serialno FORMAT I16 PASCAL _misc_slave_get_serialno (U16 CardNo, U16 NodeID, U16 SlotID, U32 Serialno) Purpose Reads Slave(04PI) product serial number. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 NodeID Selection...
Page 474
Chapter 37 Security API | PCI-DMC-A01 / PCI-DMC-B01 37.13 _misc_security FORMAT I16 PASCAL _misc_security (U32 OtherWord0, U32 OtherWord1, U32 SyntekWord0, U32 SyntekWord1, U32 *Password0, U32 *Password1, U32 *Password2, U32 *Password3) Purpose Slave(04PI): Feeds user specified 64bit key and 64bit Serialno into encryption algorithm to derive 128bit verify key.
Page 475
Chapter 37 Security API | PCI-DMC-A01 / PCI-DMC-B01 37.14 _misc_slave_write_verifykey FORMAT I16 PASCAL _misc_slave_write_verifykey (U16 CardNo, U16 NodeID, U16 SlotID, U32 Verifykey) Purpose Writes verify key to Slave(04PI). Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 NodeID Selection...
Page 476
Chapter 37 Security API | PCI-DMC-A01 / PCI-DMC-B01 37.15 _misc_slave_check_verifykey FORMAT I16 PASCAL _misc_slave_check_verifykey (U16 CardNo, U16 NodeID, U16 SlotID, U32 Verifykey, U16 *Lock_state) Purpose Checks verify key against Slave (04PI). Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15...
Page 477
Chapter 37 Security API | PCI-DMC-A01 / PCI-DMC-B01 37.16 _misc_slave_user_data_buffer_read FORMAT I16 PASCAL _ misc_slave_user_data_buffer_read (U16 CardNo, U16 NodeID, U16 SlotID U16 Address, U32* Data) Purpose Reads data from memory specified by Slave (04PI). Parameters Name Data Type Unit Description CardNo...
Page 478
Chapter 37 Security API | PCI-DMC-A01 / PCI-DMC-B01 37.17 _misc_slave_user_data_buffer_write FORMAT I16 PASCAL _misc_slave_user_data_buffer_write (U16 CardNo, U16 NodeID, U16 SlotID U16 Address, U32 Data) Purpose Writes data to buffer. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 NodeID Selection...
Page 479
Chapter 37 Security API | PCI-DMC-A01 / PCI-DMC-B01 37.18 _misc_slave_user_data_to_flash FORMAT I16 PASCAL _ misc_slave_user_data_to_flash (U16 CardNo, U16 NodeID, U16 SlotID) Purpose Writes data in buffer to position specified by Slave(04PI). Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15...
Page 480
Chapter 37 Security API | PCI-DMC-A01 / PCI-DMC-B01 (This page intentionally left blank.) 37-16 Revised March, 2012...
Page 481
Chapter 38 Limit Reversal API | PCI-DMC-A01 / PCI-DMC-B01 Chapter 38 Limit Reversal API Table 38.1 Function Name Description _DMC_01_rm_04pi_set_MEL_polarity Set negative limit direction _DMC_01_rm_04pi_get_MEL_polarity Get negative limit status _DMC_01_rm_04pi_set_PEL_polarity Set positive limit direction _DMC_01_rm_04pi_get_PEL_polarity Get positive limit status Revised March, 2012 38-1...
Page 482
Chapter 38 Limit Reversal API | PCI-DMC-A01 / PCI-DMC-B01 38.1 _ DMC_01_rm_04pi_set_MEL_polarity FORMAT I16 PASCAL _DMC_01_rm_04pi_set_MEL_polarity (U16 CardNo, U16 NodeID, U16 SlotID U16 inverse) Purpose Reverses direction of negative limit. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 NodeID...
Page 483
Chapter 38 Limit Reversal API | PCI-DMC-A01 / PCI-DMC-B01 38.2 _ DMC_01_rm_04pi_get_MEL_polarity FORMAT I16 PASCAL _DMC_01_rm_04pi_get_MEL_polarity (U16 CardNo, U16 NodeID, U16 SlotID U16 *data) Purpose Retrieves current status of negative limit. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15...
Page 484
Chapter 38 Limit Reversal API | PCI-DMC-A01 / PCI-DMC-B01 38.3 _ DMC_01_rm_04pi_set_PEL_polarity FORMAT I16 PASCAL _DMC_01_rm_04pi_set_PEL_polarity (U16 CardNo, U16 NodeID, U16 SlotID U16 inverse) Purpose Reverses direction of positive limit. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 NodeID...
Page 485
Chapter 38 Limit Reversal API | PCI-DMC-A01 / PCI-DMC-B01 38.4 _ DMC_01_rm_04pi_get_PEL_polarity FORMAT I16 PASCAL _DMC_01_rm_04pi_get_PEL_polarity (U16 CardNo, U16 NodeID, U16 SlotID U16 *data) Purpose Retrieves positive limit status. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 NodeID Selection...
Page 486
Chapter 38 Limit Reversal API | PCI-DMC-A01 / PCI-DMC-B01 (This page intentionally left blank.) 38-6 Revised March, 2012...
Page 487
Chapter 39 Compare API | PCI-DMC-A01 / PCI-DMC-B01 Chapter 39 Compare API Table 39.1 Function Name Description _DMC_01_set_compare_channel_position Set new Channel Position _DMC_01_get_compare_channel_position Read current Channel position _DMC_01_set_compare_ipulse_mode Set input phase mode for pulse interface module _DMC_01_set_compare_channel_direction Set Channel pulse direction _DMC_01_set_compare_channel_trigger_time Set Trigger enable time _DMC_01_set_compare_channel_one_shot...
Page 488
Chapter 39 Compare API | PCI-DMC-A01 / PCI-DMC-B01 39.1 _ DMC_01_set_compare_channel_position FORMAT I16 PASCAL _ DMC_01_set_compare_channel_position (U16 CardNo, U16 compare_channel, I32 position) Purpose Sets new value for Position counter of Channel. Parameters Name Data Type Unit Description Number CardNo CardNo is between 0~15...
Page 489
Chapter 39 Compare API | PCI-DMC-A01 / PCI-DMC-B01 39.2 _DMC_01_get_compare_channel_position FORMAT I16 PASCAL _DMC_01_get_compare_channel_position (U16 CardNo, U16 compare_Channel, I32 *position) Purpose Reads current value of Position counter for that Channel. Parameters Name Data Type Unit Description Number CardNo CardNo is between 0~15 Unit...
Page 490
Chapter 39 Compare API | PCI-DMC-A01 / PCI-DMC-B01 39.3 _DMC_01_set_compare_ipulse_mode FORMAT I16 PASCAL _DMC_01_set_compare_ipulse_mode (U16 CardNo, U16 mode) Purpose Sets input phase mode for pulse interface module. Parameters Data Name Unit Description Type Number CardNo CardNo is between 0~15 Unit Number 0: AB Phase...
Page 491
Chapter 39 Compare API | PCI-DMC-A01 / PCI-DMC-B01 39.4 _DMC_01_set_compare_channel_direction FORMAT I16 PASCAL _DMC_01_set_compare_channel_direction (U16 CardNo, U16 compare_channel, U16 dir) Purpose Sets Channel pulse direction. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 Compare_channel Number Unit Channel No¬°0~1...
Page 492
Chapter 39 Compare API | PCI-DMC-A01 / PCI-DMC-B01 39.5 _DMC_01_set_compare_channel_trigger_time FORMAT I16 PASCAL _DMC_01_set_compare_channel_trigger_time (U16 CardNo, U16 compare_channel, U32 time_us) Purpose Sets Trigger enable duration. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 Compare_channel Number Unit Channel No is 0~1...
Page 493
Chapter 39 Compare API | PCI-DMC-A01 / PCI-DMC-B01 39.6 _DMC_01_set_compare_channel_one_shot FORMAT I16 PASCAL _DMC_01_set_compare_channel_one_shot (U16 CardNo, U16 compare_channel) Purpose Sets Trigger to one-time enable. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 Compare_channel Number Unit Channel No is 0~1...
Page 494
Chapter 39 Compare API | PCI-DMC-A01 / PCI-DMC-B01 39.7 _DMC_01_set_compare_channel_source FORMAT I16 PASCAL _DMC_01_set_compare_channel_source (U16 CardNo, U16 compare_channel, U16 source) Purpose Sets comparison source. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 Compare_channel Number Unit Channel No is 0~1...
Page 495
Chapter 39 Compare API | PCI-DMC-A01 / PCI-DMC-B01 39.8 _DMC_01_channel0_position_cmp FORMAT I16 PASCAL _DMC_01_channel0_position_cmp (U16 CardNo, I32 start, U16 dir, U16 interval, U32 trigger_cnt) Purpose Executes Compare1. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 Start Number Unit Starting position for Compare...
Page 496
Chapter 39 Compare API | PCI-DMC-A01 / PCI-DMC-B01 39.9 _DMC_01_channel1_output_enable FORMAT I16 PASCAL _DMC_01_channel1_output_enable (U16 CardNo, U16 on_off) Purpose Sets Compare2 output to enable/disable. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 0: Off On_off Number Unit...
Page 497
Chapter 39 Compare API | PCI-DMC-A01 / PCI-DMC-B01 39.10 _DMC_01_channel1_output_mode FORMAT I16 PASCAL _DMC_01_channel1_output_mode (U16 CardNo, U16 Mode) Purpose Compare2 output mode. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 0: Normal mode Mode Number Unit 1: Custom mode...
Page 498
Chapter 39 Compare API | PCI-DMC-A01 / PCI-DMC-B01 Custom mode When set to custom mode, level table's value is set to 0x88880000 as shown in Fig. 39.2. Figure 39.2 Compare Output's custom mode ※ In custom mode, Trigger On's position table is set using the “level_table”...
Page 499
Chapter 39 Compare API | PCI-DMC-A01 / PCI-DMC-B01 39.11 _DMC_01_channel1_get_io_status FORMAT I16 PASCAL _DMC_01_channel1_get_io_status (U16 CardNo, U16* io_status) Purpose Reads Compare2 status. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 Io_status U16* Number Unit Compare2 status ...
Page 500
Chapter 39 Compare API | PCI-DMC-A01 / PCI-DMC-B01 39.12 _DMC_01_channel1_set_gpio_out FORMAT I16 PASCAL _DMC_01_channel1_set_gpio_out (U16 CardNo, U16 on_off) Purpose Sets GPIO output pin status. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 0: Off On_off Number Unit...
Page 501
Chapter 39 Compare API | PCI-DMC-A01 / PCI-DMC-B01 39.13 _DMC_01_channel1_position_compare_table FORMAT I16 PASCAL _DMC_01_channel1_position_compare_table (U16 CardNo, I32* pos_table, U32 table_size,) Purpose Sets Compare2 to standard Compare data. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 Calculate the Pos_Table for compare based on the Pos_table I32*...
Page 502
Chapter 39 Compare API | PCI-DMC-A01 / PCI-DMC-B01 39.14 _DMC_01_channel1_position_compare_table_level FORMAT I16 PASCAL _DMC_01_channel1_position_compare_table_level (U16 CardNo, I32* pos_table, U32* level_table, U32 table_size) Purpose Sets Compare2 to custom Compare data. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 Calculate the Pos_Table for compare based on the Pos_table...
Page 503
Chapter 39 Compare API | PCI-DMC-A01 / PCI-DMC-B01 39.15 _DMC_01_channel1_position_compare_table_cnt FORMAT I16 PASCAL _DMC_01_channel1_position_compare_table_cnt (U16 CardNo, U32* cnt) Purpose Reads Compare counter. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 U32* Number Unit Read Compare counter ...
Page 504
Chapter 39 Compare API | PCI-DMC-A01 / PCI-DMC-B01 39.16 _DMC_01_set_compare_channel_polarity FORMAT I16 PASCAL _DMC_01_set_compare_channel_polarity (U16 CardNo, U16 inverse) Purpose Sets Compare level. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 0: Normal Inverse Number Unit 1: Inverse...
Page 505
Chapter 39 Compare API | PCI-DMC-A01 / PCI-DMC-B01 39.17 _DMC_01_channel0_position_cmp_by_gpio FORMAT I16 PASCAL _DMC_01_channel0_position_cmp_by_gpio (U16 CardNo, U16 dir, U16 interval, I32 trigger_cnt) Purpose Sets Compare trigger to GPIO control. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 Number Unit 0: Positive 1: Negative Interval Number Unit Pulse Compare intervals...
Page 506
Chapter 39 Compare API | PCI-DMC-A01 / PCI-DMC-B01 39.18 _DMC_01_channel1_position_re_compare_table FORMAT I16 PASCAL _DMC_01_channel1_position_re_compare_table (U16 CardNo) Purpose Uses previous Compare condition and re-executes Channel1 Compare. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 ...
Page 507
Chapter 40 Linear and Arc Interpolation Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 Chapter 40 Linear and Arc Interpolation Motion Control API Table 40.1 Function Name Description _DMC_01_start_rline_xy 2-axis linear, arc R-angle interpolation motion control _DMC_01_start_rline_xyz 3-axis linear, arc R-angle interpolation motion control _DMC_01_start_v3_rline_xy 2-axis linear, arc interpolation motion control...
Page 516
Chapter 40 Linear and Arc Interpolation Motion Control API | PCI-DMC-A01 / PCI-DMC-B01 Example U16 CardNo=0, *NodeID=1, *SlotID=0; I32 pos1_x=0, I32 pos1_y=10000, I32 pos1_z=10000; I32 pos2_x=10000, I32 pos2_y=10000, I32 pos2_z=10000; U16 mode=1; param=3000; I32 StrVel=100, MaxVel=50000; I32 EndVel=20000; F64 TPhase1=0.2; F64 TPhase2=0.1;...
Page 517
Chapter 41 Speed Continue API | PCI-DMC-A01 / PCI-DMC-B01 Chapter 41 Speed Continue API Table 41.1 Function Name Description _DMC_01_speed_continue Enable/disable speed continue _DMC_01_speed_continue_mode Speed continue mode _DMC_01_speed_continue_combine_ratio Speed continue combine ratio Revised March, 2012 41-1...
Page 518
Chapter 41 Speed Continue API | PCI-DMC-A01 / PCI-DMC-B01 41.1 _DMC_01_speed_continue FORMAT I16 PASCAL _DMC_01_speed_continue (U16 CardNo, U16 NodeID, U16 SlotID, U16 enable) Purpose Enables/disables speed continue. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 NodeID Number Unit Node ID...
Page 519
Chapter 41 Speed Continue API | PCI-DMC-A01 / PCI-DMC-B01 41.2 _DMC_01_speed_continue_mode FORMAT I16 PASCAL _DMC_01_speed_continue_mode (U16 CardNo, U16 NodeID, U16 SlotID, U16 mode) Purpose Sets Speed Continue mode. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 NodeID Number Unit...
Page 520
Chapter 41 Speed Continue API | PCI-DMC-A01 / PCI-DMC-B01 Mode is 1 Assume conditions are set to Dist is 1000, MaxVel is 20000, Tacc and Tdec are both 0.1. The above conditions mean the MaxVel of 20000 is impossible to reach during this Dist movement using the original acceleration/deceleration time.
Page 521
Chapter 41 Speed Continue API | PCI-DMC-A01 / PCI-DMC-B01 41.3 _DMC_01_speed_continue_combine_ratio FORMAT I16 PASCAL _DMC_01_speed_continue_combine_ratio (U16 CardNo, U16 NodeID, U16 SlotID, U16 ratio) Purpose Sets Speed Continue combined percentage. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 NodeID Number Unit...
Page 522
Chapter 41 Speed Continue API | PCI-DMC-A01 / PCI-DMC-B01 NOTE ※ When axes 1 ~ 6 carry out Speed Continue, the resources of axes 7 ~ 12 will be used. Thus, when axes 1~6 are set to Speed Continue Enable, axes 7~12 cannot perform P2P and Continue motions.
Page 523
Chapter 42 Other API | PCI-DMC-A01 / PCI-DMC-B01 Chapter 42 Other API Table 42.1 Function Name Description _misc_app_get_circle_endpoint Get endpoint coordinates (X, Y) required for arc interpolation _misc_app_get_circle_center_point Get center point coordinates (X, Y) required for arc interpolation _misc_set_record_debuging Is Debug log function enabled _misc_open_record_debuging_file Set Debug output log file path _DMC_01_enable_dda_mode...
Page 525
Chapter 42 Other API | PCI-DMC-A01 / PCI-DMC-B01 42.2 _misc_app_get_circle_center_point FORMAT I16 PASCAL _misc_app_get_circle_center_point (I32 Start_X, I32 Start_Y, I32 End_x, I32 End_y, F64 Angle, I32* Center_X, I32* Center_Y) Purpose Retrieves center point coordinates (X, Y) required for arc interpolation. ...
Page 526
Chapter 42 Other API | PCI-DMC-A01 / PCI-DMC-B01 42.3 _misc_set_record_debuging FORMAT I16 PASCAL _misc_set_record_debuging (U16 enable) Purpose Shows whether Debug log function is enabled. Parameters Name Data Type Unit Description 0: Disable Debug log Enable Selection 1: Enable Debug log ...
Page 527
Chapter 42 Other API | PCI-DMC-A01 / PCI-DMC-B01 42.5 _DMC_01_enable_dda_mode FORMAT I16 PASCAL _DMC_01_enable_dda_mode (U16 CardNo, U16 enable) Purpose Enables DDA Table writing function. Parameters Name Data Type Unit Description CardNo Number Unit Interface card CardNo are 0~15. 0: Disable DDA Table writing function.
Page 528
Chapter 42 Other API | PCI-DMC-A01 / PCI-DMC-B01 42.6 _DMC_01_set_dda_data FORMAT I16 PASCAL _DMC_01_set_dda_data (U16 CardNo, U32* abs_pos) Purpose Enters DDA Table data. Parameters Name Data Type Unit Description CardNo Number Unit CardNo is between 0~15 Abs_Pos U32* Numerical data This field is a an array for data from 12 axes ...