Home

Delta Electronics PCI-DMC-A01 Computer Hardware User Manual

image

Contents

1. 14 1 14 1 _DMC_01_emg_ stop 14 2 14 2 DMC 01 Sd StOp 14 3 14 3 _DMC_01_sd_abort 14 4 14 4 _DMC_01_set_sd_mode 14 5 Chapter 15 Motion Status AP l 15 1 15 1 DMC 01 motion GONE 15 2 15 2 DMC 01 MOtion SEAtUS 15 3 Chapter 16 Motion Counter Value API 2 2 00 20nnennennennen 16 1 16 1 _DMC_01_get_command 16 2 16 2 DMC 01 set COMMANd 16 2 16 3 _DMC_01_get_position 16 3 16 4 _DMC_01_set_position 16 3 16 5 _DMC_01_get_target_pos 16 4 16 6 DMC 01 get tOorGUe
2. 16 5 16 7 _DMC_01_get_current_speed 16 6 16 8 DMC 01 get current speed fPDM 16 7 Chapter 17 Software Limit API 22 17 1 17 1 DMC 01 set SOft limit 17 2 17 2 DMC 01 enable SOft limit 17 3 17 3 _DMC_01_disable_soft_limit 17 3 17 4 DMC 01 get soft limit Status 17 4 Revised March 2012 vii PCI DMC A01 PCI DMC B01 Programming Manual Chapter 18 1 Axis Motion Control API 18 1 18 11 DMC 01 start tr MOVE 18 2 18 2 _DMC_01_start_sr_move 18 3 18 3 _DMC_01_start_ta_move 18 4 18 4 DMC 01 start Sa MOvVe 18 5 18 5 DMC 01 p Change
3. 25 3 25 3 DMC 01 set rm input filter enable 25 4 25 4 _DMC_01_set_rm_output_value 25 5 25 5 _DMC_01_set_rm_output_value_error_handle 25 6 25 6 _DMC_01_get_rm_output_value 25 7 25 7 _DMC_01_get_rm_output_value_error_handle 25 8 Revised March 2012 ix PCI DMC A01 PCI DMC B01 Programming Manual 25 8 DMC 01 set rm output 2Ctive 25 9 Chapter 26 MPG and JOG Operation APl 26 1 26 1 DMC 01 set rm mpg axes enable 26 2 26 2 DMC 01 set rm mpg 8xes ENAPIEL 26 4 26 3 _DMC_01_set_rm_jog_axes_enable 26 6 Chapter 27 4 Channel Pulse Interface API 27 1 27 1 _DMC_01_set_rm_04pi_ipulse_mode 27 2 27 2 _DMC_01_set_rm_04pi_opulse_mode 27 3 27 3 _DMC_01_set_rm_04pi_svon
4. 3 130 3 33 1 Function List 3 130 3 33 2 Sample Application 3 130 Chapter 4 Control API 0 2 2 0 02 0 0 enseennennennn 4 1 4 1 Data Type and Range 4 1 4 2 Function Description 4 2 Chapter 5 Hardware Initialization API 00 20 0 020020200 5 1 5 1 _DMC_01_open 5 2 5 2 _DMC_01_close 5 2 5 3 DMC 01 get CardNO SEG 5 3 5 4 DMC 01 pei initial 5 4 5 5 _DMC_01_get_card_version 5 4 Chapter 6 Interface API 0 0 0n nen nen nese ene n ence nn mmm anname 6 1 6 1 DMC_01_initial_bus 6 2 6 2 DMC 01
5. 37 8 37 12 _misc_slave_get_serialno 37 9 37 13 _misc_security 37 10 37 14 _misc_slave_write_verifykey 37 11 37 15 _misc_slave_check_verifykey 37 12 37 16 _misc_slave_user_data_buffer_read 37 13 37 17 _misc_slave_user_data_buffer_write 37 14 37 18 _misc_slave_user_data_to_flash 37 15 xii Revised March 2012 PCI DMC A01 PCI DMC B01 Programming Manual Chapter 38 Limit Reversal API 2 2 2 38 1 38 1 _ DMC 01 rm Od4pi set MEL polarity 38 2 38 2 DMC 01 rm Od4pi get MEL pOlarity 38 3 38 3 _ DMC_01_rm_04pi_set_PEL_polarity 38 4 38 4 DMC_01_rm_04pi_get_PEL_polarity 38 5 Chapter 39 Compare API 0 0 2 0000esenennnennsnsnensnenennnennnennenenenenenenene
6. 3 83 3 23 2 Sample Application 3 83 Get Calculate Arc Information 3 87 3 24 1 Function List 3 87 3 24 2 Sample Application 3 87 Control Interrupt 3 90 3 25 1 Function List 3 90 3 25 2 Sample Application 3 90 MasterCard Security 3 94 3 26 1 Function List 3 94 3 26 2 Sample Application 3 95 Remote Analog Input Output Module 3 100 3 27 1 Function List 3 100 3 27 2 Sample Application 3 101 Spiral Interpolation Motion Control Spiral 3 106 3
7. Name Data Type Unit Description CardNo U16 ee CardNo is between 0 15 NodelD U16 MU sa Unit Cmd U16 Number Index of object dictionary COBID U16 Number CAN object ID 0x580 current Node ID DataType U16 Number Datatype of object dictionary VALUE 46 KESE Message buffer Data1 Idx low High byte CMD Low byte Message buffer Data2 Sub Idx High byte Value1 U16 Number Idx high Low byte Value2 U16 Number Message buffer Data3 Data Low byte Value2 U16 Number Message buffer Data3 Data Low byte cnt U16 Number Number of commands completed m Example U16 CardNo 0 Cmd COBID Value0 Value1 Value2 Value3 cnt temp U16 Index 0x6060 Subldx 0 DataType 0x2f value0 0x1 value1 0 value2 0 value3 0 116 status DMC 01 read message2 CardNo NodelD amp Cmd amp COBID amp DataType 8Value0 8 Value1 amp Value2 8 Value3 amp cnt temp cnt status DMC 01 send message3 CardNo Index Subldx DataType value0 value1 value2 value3 status DMC 01 read message2 CardNo NodelD 8Cmd amp COBID amp DataType 8Value0 amp Value1 amp Value2 amp Value3 amp cnt if cnt temp status DMC 01 send message3 CardNo Index Subldx DataType value0 value value2 value3 8 12 Revised March 2012 Chapter 8 Using SDO Protocol API PCI DMC A01 PCI DMC B01 8 9 DMC 01 get message m FORMAT 116 PASCAL DMC 01 get message 116 CardNo U16 NodelD
8. 6 9 6 16 _DMC_01_initial_bus2 6 10 6 17 DMC_01_motion_cnt 6 10 Chapter 7 Servo Drive Parameter Read Write API 7 1 7 4 DMC 01 read servo paraMEter 7 2 7 2 DMC 01 write servo parameter 7 3 Chapter 8 Using SDO Protocol APl esennenmenmmmmmmmmmmmn mmm 8 1 8 1 CANopen SDO protocol 8 2 8 2 _DMC_01_check_canopen_lock 8 6 8 3 _DMC_01_get_canopen_ret 8 7 8 4 _DMC_01_set_pdo_mode 8 8 8 5 _DMC_01_send_message 8 9 8 6 _DMC_01_send_message3 8 10 8 7 _DMC_01_read_message 8 11 8 8 DMC 01 read message2 8 12 8 9 _DMC_01_get_
9. 20 25 viii Revised March 2012 PCI DMC A01 PCI DMC B01 Programming Manual 20 13 _DMC_01_start_spiral_xy 20 27 20 14 _DMC_01_start_spiral2_xy 20 29 20 15 _DMC_01_start_v3_arc_xy 20 31 20 16 _DMC_01_start_v3_arc2_xy 20 33 20 17 _DMC_01_start_v3_arc3_ xy 20 35 20 18 _DMC_01_start_v3_spiral_xy 20 37 20 19 _DMC_01_start_v3_spiral2_xy 20 39 Chapter 21 3 Axis Linear Interpolation Motion Control API 21 1 21 1 DMC 01 start tr MOVE XYZ 21 2 21 2 _DMC_01_start_sr_move_xyZ 21 3 21 3 _DMC_01_start_ta_move_xyZ 21 4 21 4 _DMC_01_start_sa_move_xyZ 21 5 21 5 _DMC_01_start_v3_move_xyZ 21 6 Chapter 22 3 Axis
10. 3 31 3 10 1 Overview 3 31 3 10 2 Function List 3 31 3 10 3 Sample Application 3 32 Spiral Interpolation Motion Control Helix 3 37 3 11 1 Function List 3 37 3 11 2 Sample Application 3 37 Continuous Interpolation Motion Control 3 42 3 12 1 OvervieWw 3 42 3 12 2 Function List 3 42 3 12 3 Sample Application 3 43 Software Limit Control 3 47 3 13 1 Function List 3 47 3 13 2 Sample Application 3 47 Synchronization Motion Control 3 51 3 14 1 Fun
11. Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID Dist 132 Number of pulses Relative coordinates for first segment Dist2 132 Number of pulses Relative coordinates for second segment StrVel 132 Pulses per second Starting velocity MaxVel 132 Pulses per second Maximum velocity for first segment MaxVel2 132 Pulses per second Maximum velocity for second segment Tacc F64 Second Specified acceleration time Acceleration deceleration time when Tsec F64 Second switching from first segment to second segment Tdec F64 Second Deceleration time m Description V MaxVel MaxVel 2 MaxVel2 MaxVel ji i e Teed Tdec Tacc Tsec Tdec Figure 18 6 Motion displacement using relative coordinates with T curve velocity cross section Gray area indicates Dist white area indicates Dist2 18 14 Revised March 2012 Chapter 18 1 Axis Motion Control API PCI DMC A01 PCI DMC B01 m Example U16 CardNo 0 NodelD 1 SlotlD 0 132 Dist 500000 Dist2 500000 132 StrVel 1000 132 MaxVel 10000 MaxVel2 30000 F64 Tacc 0 1 F64 Tsec 0 1 F64 Tdec 0 1 116 status DMC 01 start tr move 2seg2 CardNo NodelD SlotlD Dist Dist2 StrVel MaxVel MaxVel2 Tacc Tsec Tdec Revised March 2012 18 15 Chapter 18 1 Axis Motion Control API PCI DMC A01 PCI DMC B01 18 12 DMC 01 start sr move 2s
12. Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID Pulses per A A MaxVel U32 Maximum velocity parameter second acc F64 Second Specified acceleration time dec F64 Second Specified deceleration time E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 If Slot ID is set to 0 then the Slave is a servo drive U16 MaxVel 1000000 F64 acc 0 1 F64 dec 0 1 116 status DMC 01 set sdo driver speed profile CardNo NodelD SlotID MaxVel acc dec 9 2 Revised March 2012 Chapter 9 Point to Point Motion Control Packet Protocol API PCI DMC A01 PCI DMC B01 9 2 DMC 01 start sdo driver r move E FORMAT 116 PASCAL DMC 01 start sdo driver r move U16 CardNo U16 NodelD U16 SlotlD 132 Distance E Purpose Starts relative motion displacement E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID Number of s l Distance 132 Relative motion distance pulses H Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 If Slot ID is set to 0 then the Slave is a servo drive 132 Distance 10000000 116 status DMC 01 start sdo driver r move CardNo NodelD SlotID Distance Revised March 2012 9 3 Chapter 9 Point to Point Motion Control Packet Protocol API PCI DMC A01 P
13. 30 10 30 10 DMC 01 set 04ad average Mode 30 11 30 11 DMC 01 get 04ad average __mode 30 12 30 12 _DMC_01_set_04ad_input_enable 30 13 Chapter 31 Slave Data API 202 nsennen nen nen nnn anne nenennennens 31 1 31 1 _DMC_01_get_devicetype 31 2 31 2 _DMC_01_get_slave_version 31 4 Chapter 32 Parameter Monitoring API 0 0 00 e202 32 1 32 1 _DMC_01_set_monitor 32 2 32 2 _DMC_01_get_monitor 32 5 32 3 _DMC_01_get_servo _command 32 6 32 4 _DMC_01_get_servo_Dl 32 7 32 5 DMC 01 get SErvo DO 32 8 Chapter 33 Alarm Message APl 2 2 33 1 33 1 _DMC_01_set_ralm 33 2
14. MaxYel 1280000 pps P Limit ery 0 1 i sec EMG Stop ec 1 see Soft limit Enable r Status Soft limit status CMD pls N Limit SPD pps 1088 ooo SYON A RESET Motion Ta STOP pa ponvanei Figure 3 67 Revised March 2012 3 47 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 48 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 2 1 Set node id NodeID SlotID 0f 0 Timer Figure 3 68 Input Node ID and check Timer checkbox to enable motion status display NodelD item API function s argument variable NodelD Timer Checkbox Check to display the motion status Uncheck to disable display Enter the values of the arguments for motion control m 2 2 Set vel prof StYel O pps MaxYel 1280000 pps hee O1 see Dec O01 see Figure 3 69 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 Select motion mode and set motion distan
15. 29 7 29 7 _DMC_01_rm_04da_set_output_error_clear 29 8 29 8 _DMC_01_rm_04da_read_data 29 9 29 9 _DMC_01_rm_04da_set_output_error_handle 29 10 29 10 _DMC_01_rm_04da_set_output_offset_value 29 11 29 11 _DMC_01_rm_04da_get_output_offset_value 29 12 Chapter 30 4 Channel Analog Input Remote Module API 30 1 30 11 DMC 01 set 04ad input range 30 2 30 2 _DMC_01_get_04ad_input_range 30 3 30 3 _DMC_01_set_04ad_zero_scale 30 4 30 4 _DMC_01_get_04ad_zero_scale_status 30 5 30 5 _DMC_01_set_04ad_full_scale 30 6 30 6 _DMC_01_get_04ad_full_scale_status 30 7 30 7 _DMC_01_set_04ad_conversion_time 30 8 30 8 _DMC_01_get_04ad_conversion_time 30 9 30 9 _DMC_01_get_04ad_data
16. 3 63 3 18 2 Sample Application 3 63 Remote I O Module I O Port 3 67 3 19 1 Function List 3 67 3 19 2 Sample Application 3 67 Remote I O Module Manual Pulse Generator 1 3 70 3 20 1 Function List 3 70 3 20 2 Sample Application 3 70 Remote I O Module Manual Pulse Generator 2 3 73 3 21 1 Function List 3 73 3 21 2 Sample Application 3 73 Remote Pulse Interface Module Mode 1 3 76 3 22 1 Function List 3 76 3 22 2 Sample Application 3 77 Remote Pulse Interface Module Mode 2 3 83 3 23 1 Function List
17. Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID 0 No contact with positive software limit PLimit_sts U16 Flag os ies ale 7 1 Contact with positive software limit 0 No contact with negati ft limit NLimit_sts U16 Flag Cee a 1 Contact with negative software limit E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 PLimit_sts NLimit_sts 116 status DMC 01 get soft limit status CardNo NodelD SlotID amp PLimit_sts amp NLimit_sts 17 4 Revised March 2012 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 cross section _DMC_01_start_sa_move Motion displacement using absolute coordinates with S curve velocity cross section DMC 01 p change Replace current position with new position value DMC 01 v change Replace current motion velocity with new velocity value DMC 01 start tr move 2seg 2nd motion displacement using relative coordinates with T curve velocit
18. ASD DMC RM32PT 0x04130191 ASD DMC GE01PG 0x21200191 ASD DMC GE01PI 0x11200191 ASD DMC GE16MN 0x08230191 ASD DMC GE01PH 0x11210191 ASD DMC GE16NT Note 1 Note 1 For ASD DMC GE s I O module GE16MN GE16NT its 64 point I O is treated as 1 Device type i e It is one Node Table of the object dictionary codes for each device type Object Dictionary Code A2 Series Servo Drives 0x6000 M Series Servo Drives 0x6030 A2R Series Servo Drives 0x6040 S Series Servo Drives 0x6050 Remote module 0x1000 Gateway module 0x2000 Revised March 2012 31 3 Chapter 31 Slave Data API PCI DMC A01 PCI DMC B01 31 2 DMC 01 get slave version E FORMAT 116 PASCAL DMC 01 get slave version 116 CardNo U16 NodelD U16 SlotID U16 version E Purpose Retrieves slave device firmware version H Parameters Name Data Type Unit Description CardNo 116 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID version U16 Version number Slave firmware version E Example 116 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 version 116 status DMC 01 get slave version CardNo NodelD SlotID amp version 31 4 Revised March 2012 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 paramet
19. Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID group U16 Number Device Servo group number idx U16 Number Index value for Servo parameter group data U32 Number Data returned by group index E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 group 3 U16 idx 0 In this example you will read Servo parameter P3 00 U32 data 116 status DMC 01 read servo parameter CardNo NodelD SlotID group idx amp data 7 2 Revised March 2012 Chapter 7 Servo Drive Parameter Read Write API PCI DMC A01 PCI DMC B01 7 2 DMC 01 write servo parameter E FORMAT 116 PASCAL DMC 01 write servo parameter U16 CardNo U16 NodelD U16 SlotID U16 group U16 idx U32 data E Purpose Writes servo drive parameter H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID group U16 Number Device Servo group number idx U16 Number Index value for Servo parameter group data U32 Number Data to write to group index E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 group 3 U16 idx 0 In this example you will write the data to Servo parameter P3 00 U32 data 1 116 status DMC 01 write servo parameter CardNo NodelD SlotID group idx data Rev
20. 18 6 18 6 DMC_01_v_change 18 7 18 7 DMC 01 start tr move 28 G 18 9 18 8 DMC_01_start_sr_move_2seg 18 11 18 9 _DMC_01_start_ta_move_2seg 18 12 18 10 _DMC_01_start_sa_move_2seg 18 13 18 11 _DMC_01_start_tr_move_2seg2 18 14 18 12 DMC 01 start sr move 28 G2 18 16 18 13 DMC 01 start ta move 28 G2 18 17 18 14 DMC 01 start sa move 28 G2 18 18 18 15 DMC 01 feedrate Overwrite 18 19 18 16 DMC 01 start V3 MOVE 18 21 Chapter 19 2 Axis Linear Interpolation Motion Control API 19 1 19 1 _DMC_01_start_tr_move_xy 19 2 19 2 _DMC_01_start_sr_move_xy 19 4 19 3 DMC 01 start ta MO
21. Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID is between 0 12 SlotID U16 Number Unit 0 ChannelNo U16 Number Unit Channel ID is between 0 3 On Off U16 Sendo 0 Disable CleanError T 1 Enable CleanError H Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 ChannelNo 0 U16 On_Off 1 Clear Error 116 status _DMC_01_rm_04da_set_output_error_clear CardNo NodelD SlotlD ChannelNo On Off 29 8 Revised March 2012 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 E FORMAT 116 PASCAL DMC 01 rm 04da read data U16 CardNo U16 NodelD U16 SlotID U16 ChannelNo U16 data E Purpose Retrieves current DA number H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID is between 0 63 SlotID U16 Number Unit 0 ChannelNo U16 Number Unit Channel ID is between 0 3 Data U16 Number Unit Get data 0 65535 E Example U16 CardNo 0 U16 NodelD 1 U16 Slotld 0 U16 ChannelNo 2 U16 Data 0 116 status DMC 01 rm 04da read data CardNo NodelD SlotID ChannelNo 8Data Revised March 2012 29 9 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 E FORMAT 116 PASCAL DMC
22. Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID Number of Dist 132 Absolute coordinates for first segment pulses i Number of l Dist2 132 Absolute coordinates for second segment pulses Pulses per StrVel 132 5 Starting velocity second Pulses per i MaxVel 132 Maximum velocity for first segment second Pulses per A MaxVel2 132 Maximum velocity for second segment second Tacc F64 Second Specified acceleration time Acceleration deceleration time when switching Tsec F64 Second from first segment to second segment Tdec F64 Second Deceleration time m Example U16 CardNo 0 NodelD 1 SlotID 0 132 Dist 500000 Dist2 500000 132 StrVel 1000 132 MaxVel 10000 MaxVel2 30000 F64 Tacc 0 1 F64 Tsec 0 1 F64 Tdec 0 1 116 status DMC 01 start sa move 2seg CardNo NodelD SlotiD Dist Dist2 StrVel MaxVel MaxVel2 Tacc Tsec Tdec Revised March 2012 18 13 Chapter 18 1 Axis Motion Control API PCI DMC A01 PCI DMC B01 18 11 DMC 01 start tr move 2seg2 E FORMAT 116 PASCAL DMC 01 start tr move 2seg2 U16 CardNo U16 NodelD U16 SlotID 132 Dist 132 Dist2 132 StrVel 132 MaxVel 132 MaxVel2 F64 Tacc F64 Tsec F64 Tdec E Purpose 2nd motion displacement using relative coordinates with T curve velocity cross section gt lt Motion Buffer will be cleared before this function is executed H Parameters
23. nn nn nnn nnn 3 16 3 6 1 Function List 3 16 3 6 2 Sample Application 3 16 Revised March 2012 3 7 3 8 3 9 3 11 3 13 3 14 3 16 3 17 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 3 9 2 Function List 3 26 3 9 3 Sample Application 3 27 Arc Interpolation Motion Control
24. 11 3 11 3 _DMC_01_set_velocity_stop 11 4 11 4 _DMC_01_set_velocity_torque_limit 11 5 vi Revised March 2012 PCI DMC A01 PCI DMC B01 Programming Manual Chapter 12 Torque Motion Control Packet Protocol API 12 1 12 1 _DMC_01_set_torque_mode 12 2 12 2 DMC 01 set tOrGUE 12 3 12 3 DMC 01 set torgue StOp 12 4 12 4 DMC_01_set_torque_velocity_limit 12 5 Chapter 13 Using PDO Protocol API 02 2 2 nnenenennnennennene 13 1 13 1 DMC 01 ipo Set SVON 13 2 13 2 DMC 01 get buffer length 13 3 13 3 _DMC_01_command_buf_clear 13 4 13 4 DMC 01 buf AWEI 13 5 13 5 DMC 01 Set GfOUp 13 6 Chapter 14 Stop Motion Control API
25. DMC 01 channel1 position compare table DMC 01 channel1 position compare table level DMC 01 channel1 position compare table cnt DMC 01 set compare channel polarity Revised March 2012 3 111 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 29 2 Sample Application Program Appearance x Dpen Cand Command 300000 Resat lt lt cPoPMove STOP Famer gt gt gt Triger Compare m Card select Exit Card 0 7 Polarity MPC kd Mo G High 7 Low Inpulse Type 5 AB Phase Cw CCW r Select GEP Compare Type Reset QEP1 Inverse QEP2 Inverse ee Ia EE EEE r Operate Trigger Time 4 us Trigger Count 50000 times One Shot lt lt lt Set Set gt gt gt Abs l Level Start Position 100000 Pulse Interval fio Pulse 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 2 Card ID Node ID and QEP option Card select Card 0 Node 1 r Select QEP DEPI QEP2 Figure 3 148 3 112 Revised March 2012 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 th
26. DMC 01 sync move config 3 14 2 Sample Application Program Appearance Ae PCI DMC 1 1 Initial Card num O Slave num Ff 1 2 Sync Enable all nodes 2 PDO Syne move k set node id 2 3 Set distance NodeID Slot ID 6 ri oO Timer E Abs E S Curve Dist 1280000 pls 2 2 Set vel prof St Vel O pps SYON Sync Move MaxYel 1280000 pps Acc 002 Oi sec 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 and Card initialization in Section 3 1 2 Revised March 2012 3 51 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 2 3 52 Choose whether to enable synchronization motion control 1 1 Initial C 1 2 Sync Enable all nodes 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 gpNodelDfi SlotID enable lf enable argument is 1 then synchronized motion control is enabled Set Servo Node ID and enable motion status display 2 1 Set node id NodeID Slot ID 0 0 7 Timer Figure 3 76 Input Node ID and check Timer checkbox to enable motion status display NodelD item API function s argument variable NodelD Timer Checkbox Check to display the motion status
27. 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 reguired to go from maximum velocity to 0 API function s argument variable dec Dist item Set motion distance API function s argument variable Distance Enter value of new position change New position Oo P change Figure 3 86 New Position item Enter value of new position API function s argument variable NewPos 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 NodelD SlotID ON OFF ON OFF 0 Servo Power OFF 1 Servo Power ON Start motion control Using point to point motion control as an example Click on the gt or lt button to execute the following procedure rt DMC 01 start ta move gDMCCardNo NodelD SlotlD Distance StrVel MaxVel acc dec Motion displacement using absolute coordinates with T curve velocity cross section Revised March 2012 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 NodelD
28. 1 Absolute motion displacement 20 37 Chapter 20 2 Axis Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 m Example U16 CardNo 0 U16 NodelD 2 1 2 U16 SlotID 2 0 0 132 Center X 25000 Center_Y 25000 132 Spiral_interval 20000 Spiral angle 1800 132 StrVel 0 MaxVel 50000 132 EndVel 20000 F64 TPhase1 0 2 F64 TPhase2 0 1 U16 m curve 1 m r a 0 116 status DMC 01 start spiral xy CardNo NodelD SlotID Center X Center Y Spiral interval Spiral angle StrVel ConstVel EndVel TPhase1 TPhase2 m curve m r a 20 38 Revised March 2012 Chapter 20 2 Axis Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 20 19 DMC 01 start v3 spiral2 xy E FORMAT 116 PASCAL DMC 01 start v3 spiral2 xy U16 CardNo U16 NodelD U16 SlotID 132 center x 132 center y 132 end x 132 end y U16 dir U16 circlenum 132 StrVel 32 ConstVel 132 EndVel F64 TPhase1 F64 TPhase2 U16 m_curve U16 m r a E Purpose 2 axis spiral motion with EndVel added Known conditions center coordinates for X and Y axes endpoint coordinates for X and Y axes Values of StrVel and EndVel can be greater than MaxVel H Parameters Name Data Type Unit Description Gardno U16 dunner Unt Ngge ID of card used or moton displacement along X axis and Y axis Holds Node ID sets used for carrying out NodelD U16 NumberUnit neuen NodelD 0 holds 1st set of Node ID NodelD 1
29. E Purpose Reads product serial number in the Master Card memory E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 Serialno U32 Number Product serial number in memory E Example U16 CardNo 0 U32 Serialno 116 status DMC 01 read serialno CardNo amp Serialno 37 6 Revised March 2012 Chapter 37 Security API PCI DMC A01 PCI DMC B01 37 10 misc slave check userpassword H FORMAT 116 PASCAL misc slave check userpassword U16 CardNo U16 NodelD U16 SlotID U32 Password data U16 Password state E Purpose Before read write data on Slave 04P1 checks that user has permission to read write to memory H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Selection Node ID SlotID U16 Number Unit Slot ID Password_data U32 Number Enter password to check Based ai U16 Flag Response after password check 0 gt Fail 1 gt 0K H Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U32 Password data 64bit data U16 Password state 116 status misc slave check userpassword CardNo NodelD SlotID Password data 8Password state Revised March 2012 37 7 Chapter 37 Security API PCI DMC A01 PCI DMC B01 37 11 misc slave write userpassword E FORMAT 116 PASCAL misc slave write userpassword U16 CardNo U16 NodelD U16 SlotID U32 Password datae E Purpose
30. 90 0 360 0 Pitch 0 MaxVel 2 MaxVel 0 1 0 1 DMC 01 start tr heli xy CardNo NodelD3 SlotID3 0 10000 Pitch 90 0 360 0 Pitch 1 MaxVel 2 MaxVel 0 1 0 1 Revised March 2012 3 129 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 33 Logger 3 33 1 Function List Table 3 99 misc set record debuging misc open record debuging file 3 33 2 Sample Application Program Appearance 1 1 Initial Card num 0 Slave num 1 2 Debug Log O Debug Enable Clog outputtxt C Output to dbg m2 PDO P2P operate 2 1 Set node id rStatus NodelD 0 Seen 0 CMD 00 m FBK pk 2 2 Set vel prof SPD EESTI pps Stel 0 pps 10 Sts at MaxVel 1280000 pps Motion INN RESET Acc 0 1 gee Dec DI gee SVON Timer Dist x 12800000 pls 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 and Card initialization in Section 3 1 2 3 130 Revised March 2012 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 2 Debug enable and disable 1 2 Debug Log Debug Enable CAlog_output txt Output to dbg 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
31. Chapter 20 2 Axis Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 20 6 DMC 01 start sr arc2 xy m FORMAT 116 PASCAL DMC 01 start sr arc2 xy U16 CardNo U16 NodelD U16 SlotID 132 End X 132 End Y F64 Angle 132 StrVel 132 MaxVel F64 Tacc F64 Tdec E Purpose 2 axis arc interpolation motion using relative coordinates with S curve velocity cross section Known conditions endpoint coordinates angle E Parameters Name Data Type Unit Description A Node ID of card used for motion displacement CardNo U16 Number Unit i along X axis and Y axis Holds Node ID sets used for arc interpolation NodelDArray U16 Number Unit NodelDArray 0 holds the 1st set of Node ID NodelDArray 1 holds the 2nd set of Node ID SlotID U16 Number Unit Slot ID Relative endpoint X coordinate on the specified End_X 132 Number of pulses axis Relative endpoint Y coordinate on the specified End_Y 132 Number of pulses i axis Angle F64 Degree Set arc angle One full arc is 360 Pulses per i A StrVel 132 Starting velocity parameter second Pulses per A MaxVel 132 Tangential velocity parameter second Tacc F64 Second Specified acceleration time Tdec F64 Second Specified deceleration time Revised March 2012 20 13 Chapter 20 2 Axis Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 m Example U16 CardNo 0 U16 NodelDArray 2 f 1 2 U16 SlotlD 2 0 0 132 End X
32. DMC 01 rm Odpi md1 set sid Enable SLD port DI3 and set profile DMC 01 rm 04pi md1 get mc error c ode When alarm code is 299 get motion control error message under RMO4PI Mode 1 DMC 01 set rm Od4pi ref counter DMC 01 rm 04da set output value Select reference counter for re connection under RMO4PI Mode 1 4 Channel Analog Output Remote I O Module API Set DA output value DMC 01 rm 04da get output value Read DA output DMC 01 rm 04da get return code DMC 01 rm 04da set output range DMC 01 rm 04da set output enable Read DA status Set DA output range Enable disable pin output DMC 01 rm 04da set output overrange Increase output range by 10 DMC 01 rm 0O4da set output error clear Clear error status DMC 01 rm 04da read data Get current DA number DMC 01 rm 04da set output error ha ndle Keep original DA settings if the connection is broken DMC 01 rm 0O4da set output offset va lue Set DA offset DMC 01 rm 04da get output offset va lue Read DA offset Revised March 2012 4 9 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 ca
33. Motion counter value rt DMC 01 get command gDMCCardNo NodelD SlotlD amp cmd Get value of command counter rt DMC 01 get position gDMCCardNo NodelD SlotID amp pos Get value of feedback counter Motion status rt DMC 01 get current speed gDMCCardNo NodelD SlotiID amp speed Get velocity of current motion Revised March 2012 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 rt DMC 01 motion status gDMCCardNo NodelD SlotlD 8MC status Get current status rt DMC 01 motion done gDMCCardNo NodelD SlotID 8MC done Get current motor status 3 Enterthe argument values and chosen velocity cross section for motion control StVell 0 pps MaxVel ee 0 pps Acc 2 0 sec Dec O sec Cea 5 OQ Cea Y D Depth 0 Pitch 0 Di 0 7 Abs O S Curve Figure 3 56 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 Cen X item Center s x coordinate API function s argument variable helix cen x Cen Y item Center s y coordinate API function s argument variable helix cen y Depth item Total distance of 3rd axis See Fig 3 55 Pitch item Distance in the 3rd axis when one revo
34. Param F64 Number Unit Relative mode distance StrVel 132 Pulses per second Starting velocity ConstVel 132 Pulses per second Constant velocity EndVel 132 Pulses per second End velocity TPhase1 F64 Second Time from StartVel to ConstVel TPhase2 F64 Second Time from ConstVel to EndVel m curve U16 Selection US s 2 S curve 0 Relative motion displacement m ra U16 Selection E 1 Absolute motion displacement Revised March 2012 40 9 Chapter 40 Linear and Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 m Example U16 CardNo 0 NodelD 1 SlotlD 0 I32 pos1 x 0 132 pos1 y 10000 132 pos1 z 10000 132 pos2_x 10000 132 pos2 y 10000 132 pos2_z 10000 U16 mode 1 param 3000 I32 StrVel 100 MaxVel 50000 I32 EndVel 20000 F64 TPhase1 0 2 F64 TPhase2 0 1 U16 m_curve 1 m_r_a 0 Set as multi axis motion control using absolute coordinates with T curve velocity cross section 116 status DMC 01 start rline xyz CardNo 8NodelD amp SlotID pos1_x pos1_y pos1 z pos2 x pos2_y pos2_z mode param StrVel ConstVel EndVel TPhase1 TPhase2 m_curve m_r_a 40 10 Revised March 2012 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
35. Revised March 2012 Chapter 30 4 Channel Analog Input Remote I O Module API PCI DMC A01 PCI DMC B01 30 10 DMC 01 set 04dad average mode E FORMAT 116 DMC 01 set 04ad average mode U16 CardNo U16 NodelD U16 SlotID U16 channelno U16 mode E Purpose Sets AD average mode E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID is between 0 63 SlotID U16 Number Unit 0 ChannelNo U16 Number Unit Channel ID is between 0 3 Input value 0 5 Set frequency of Number average value 0 0 Mode U16 Number Unit 1 2 2 4 3 8 4 16 5 32 H Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 channelno 1 U16 mode 1 116 status DMC 01 set 04ad average mode CardNo NodelD SlotID channelno mode Revised March 2012 30 11 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 E FORMAT 116 DMC 01 get 04ad average mode U16 CardNo U16 NodelD U16 SlotID U16 channelno U16 mode E Purpose Retrieves AD average mode H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID is between 0 63 SlotID U16 Number Unit 0 ChannelNo U16 Number Unit Channel I
36. Status mrem oF Check the Timer checkbox to enable motion status display Timer Checkbox Check to display the motion status Uncheck to disable display Enter the values of the arguments for motion control StYel 0 pps MaxYel 0 pps Acc O ge Dec f 0 sec Figure 3 63 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 reguired to go from maximum velocity to 0 API function s argument variable dec Enter edge length and corner radius 2 2 Set radius edge Edge 1280000 pk Radius 640000 Figure 3 64 Edge item Edge length Unit Pulses API function s argument variable edge Radius item Corner radius Unit Pulses API function s argument variable radius Revised March 2012 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 5 Set Servo Motor Power ON OFF servo on servo off SVON Move STOP Figure 3 65 Click on the SVON button to execute the following procedure rt DMC 01 ipo set svon gDMCCardNo NodelD SlotID ON OFF II ON OFF 0 Servo Power OFF 1 Servo Power ON 6 x Click on the Move button to start executing continuous interpolation motion The following procedures 1 8 will realize the continuous interpo
37. 116 status misc set record debuging Enable 42 4 _misc_open_record_debuging_file E FORMAT 116 PASCAL _misc_open_record_debuging_file Char file_name U16 open E Purpose Sets Debug output log file path H Parameters Name Data Type Unit Description file name Char Character Array Debug document file path 0 Store in VC6 compiler development open U16 Selection environment s debug window 1 Store log at file path specified in file_name E Example Char file_name 20 log_output txt U16 open 1 116 status misc open record debuging file file name U16 open 42 4 Revised March 2012 Chapter 42 Other API PCI DMC A01 PCI DMC B01 42 5 DMC 01 enable dda mode m FORMAT 116 PASCAL DMC 01 enable dda mode U16 CardNo U16 enable E Purpose Enables DDA Table writing function E Parameters Name Data Type Unit Description CardNo U16 Number Unit Interface card CardNo are 0 15 0 Disable DDA Table writing function 1 Enable DDA Table writing function Bit0 Node1 Bit1 Node2 Bit2 Node3 Bit3 Node4 Bit4 Node5 Bit5 Node6 Bit6 Node7 Bit7 Node8 Bit8 Node9 Bit9 Node10 Bit10 Node11 Bit11 Node12 Enable U16 Selection H Example U16 CardNo 0 U16 Enable 5 Enable Node1 3 116 status DMC 01 enable dda mode CardNo Enable Revised March 2012 42 5 Chapter 42 Other API PCI DMC A01 PCI DMC B01 42 6 DMC 01 set dda data mE FORMAT 116 PA
38. Chapter 16 Motion Counter Value API PCI DMC A01 PCI DMC B01 16 7 DMC 01 get current speed mE FORMAT 116 PASCAL DMC 01 get current speed U16 CardNo U16 NodelD U16 SlotlD I32 speed E Purpose Retrieves motion speed E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID Pulses per A speed 132 Retrieves motion speed second mE Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 132 speed 116 status DMC 01 get current speed CardNo NodelD SlotID amp speed 16 6 Revised March 2012 Chapter 16 Motion Counter Value API PCI DMC A01 PCI DMC B01 16 8 DMC 01 get current speed rpm H FORMAT 116 PASCAL DMC 01 get current speed rpm U16 CardNo U16 NodelD U16 SlotID 132 rpm E Purpose Retrieves current RPM x 10 E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID rpm 132 Revolutions second Actual torgue is 1 10 ofthis variable RPM E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 132 rpm 116 status DMC 01 get current speed rpm CardNo NodelD SlotID 8rpm lf you get a torque value of 1000 the actual speed is 100RPM Revised March 2012 16 7 Chapter 16 Motion Counter Value API PCI DMC A01 PCI DMC B01 This
39. Countine motion rt DMC 01 rm O4pi md1 v move CardNo NodelD SlotID StrVel MaxVel Tacc Tdec dir m curve 13 Homing motion control If you wish to carry out the Homing action please click on the Home button to execute the following procedure Set homing mode 1 35 offset and velocity parameters rt DMC 01 set home config gDMCCardNo NodelD SlotID home mode home offset StrVel MaxVel acc Start homing motion rt DMC 01 set home move gDMCCardNo NodelD SlotID 14 Change position Under mode 1 RM04PI will replace the current position with the new position value You must click on the Pch button to execute the following procedure P Change Revised March 2012 3 81 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 82 rt DMC 01 rm Odpi md1 p change CardNo NodelD 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 NodelD SlotID NewsPeed sec 16 Stop motion Hit the STOP button to execute an emergency stop rt DMC 01 emg stop gDMCCardNo NodelD SlotID In this example emergency stop is used to stop motion This method guickly stops motion by setting deceleration time to 0 For more information about the Stop Motion function refer to the later section on Stop Motio
40. Depth DistanceZ axis is to move equal to angle of circle divided by 360 then multiplied by Pitch Pitch Net distance for one revolution of the Z axis always positive Dir Direction of circular motion 0 is CW 1 is CCW Revised March 2012 3 123 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 When Example 1 and Normal are selected the result is as shown below ii DMC NET n 1 Open card Card num Slave num 5 r Example 2 Select example Ex ample 1 3 Select follow type Normal 4 Speed 1x v Stop Z Axis Knife Figure 3 163 3 124 Revised March 2012 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 When Example 2 and Tangent are selected the result is as shown below i DMC NET x 1 Open card Card num Slave num 6 Example 2 Select example E sample 2 v 3 Select follow type T angent 4 Speed 1x v Stop Z Axis Knife 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 The tool on the Z axis is always at a normal or tangent to the outer edge of the shape The following explanation u
41. Exit procedure for the function operations Revised March 2012 3 75 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 22 Remote Pulse Interface Module Mode 1 3 22 1 Function List Table 3 22 DMC 01 get buffer length DMC 01 get servo DI DMC 01 get servo DO DMC 01 rm O4pi md1 get soft limit status DMC 01 set rm 0O4pi ipulse mode DMC 01 set rm Odpi opulse mode DMC 01 rm O4pi md1 set soft limit DMC 01 set rm Odpi svon polarity DMC 01 rm 0O4pi md1 v move DMC 01 rm 0O4pi md1 start move DMC 01 set rm Odpi DO2 DMC 01 rm 0O4pi md1 p change DMC 01 rm O4pi md1 v change 3 76 Revised March 2012 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 22 2 Sample Application Program Appearance Ee PCI DMC x Initial CardNum 1 SlaveNum 1 NodelD Node1 Axis Axis2 Akis3 Set vel prof Command 0 Command 0 Command 0 Command Distanca 10000 ills Feedsack 0 Feedback 0 Feedback 0 Feedback Suvel 1000 pls Speed EG Speed 0 Speed 0 Speed Max Vel 3000 pls Lerh poo Length 0 TES D Sae p rist Acc 0 1 sec 10 Sts 051401 10 Sts 01481 10 Sts 0 1401 10 Sts 0 1081 Das or soe Molion Stop Motion Stop Motion Stop Motion Stop Abs J SCurve Reset Reset Reset Reset J Continue ES i Powe On z 3 Power On Power Cn a i Pawer On Home Raln Ralm Ralm Ralm Mode Offset 1 0 Heme Output Mode
42. MPG2 checkboxes then click on the RESET button to execute the following procedure rt DMC 01 set command gDMCCardNo NodelD SlotID 0 Reset Command to 0 rt DMC 01 set position gDMCCardNo NodelD SlotID 0 Reset Position to 0 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 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 DMC 01 get m input value DMC 01 set rm mpg axes enable DMC 01 set rm jog axes enable 3 21 2 Sample Application Program Appearance w DMC NET XI 1 Initial Card num Slave num 1 Exit 2 MPG RM I0 status 2 1 Set Servo Node ID Timer NodelD 1 SVON MN ID gt 2 2 MPG setting 7 r 2 3 JOG setting Ratio q Slope 10 Jog spd 128000 Pulse ratio 4 17 MPG Jog mode fo v M Jog Servo status CMD sg pls 10 Sts 0x6020000 Reset 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 and Card initialization in Section 3 1 2 Revised March 2012 3 73 Chapter 3 Operat
43. PCI DMC A01 PCI DMC B01 5 Set Servo Motor Power ON OFF servo on servo off 6 3 62 Click on the SVON button to execute the following procedure rt DMC 01 ipo set svon gDMCCardNo NodelD SlotID ON OFF II ON OFF 0 Servo Power OFF 1 Servo Power ON Start motion control Using point to point motion control as an example Click on the gt or lt button to execute the following procedure rt DMC 01 start ta move gDMCCardNo NodelD SlotlD Distance StrVel MaxVel acc dec Motion displacement using absolute coordinates with T curve velocity cross section If you want to change velocity of current motion to a new velocity you must click on V change to execute the following procedure rt DMC 01 v change CardNo NodelD SlotID NewSpeed sec Replace current velocity with new velocity Stop motion Hit the STOP button to execute an emergency stop rt DMC 01 emg stop gDMCCardNo NodelD SlotID In this example emergency stop is used to stop motion This method guickly 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 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
44. Read Comparez2 status DMC 01 channel1 set gpio out Set GPIO output pin status DMC 01 channel1 position compare table Set Compare2 to standard Compare data _DMC_01_channel1_position_compare_table_level Set Compare2 to custom Compare data _DMC_01_channel1_position_compare_table_cnt Read Compare counter _DMC_01_set_compare_channel_polarity Set Compare polarity DMC 01 channel0 position cmp by gpio Set Compare trigger to GPIO control DMC 01 channel1 position re compare table DMC 01 channel1 position re compare table level Use previous Compare condition and execute Channel1 Compare again Use previous Compare condition and execute Channel1 Compare Level mode again Revised March 2012 39 1 Chapter 39 Compare API PCI DMC A01 PCI DMC B01 39 1 DMC 01 set compare channel position H FORMAT 116 PASCAL DMC 01 set compare channel position U16 CardNo U16 compare channel 132 position E Purpose Sets new value for Position counter of Channel H Parameters ame Data Descriptio CardNo U16 Jaa CardNo is between 0 15 Compare Channel U16 pene Channel No is 0 1 Position 132 ae New position value to set E Example U16 CardNo 0 U16 Compare_Channel 0 132 Position 0 116 status DMC 01 set compare channel position CardNo compare channel position 39 2 Revised March 2012 Chapter 39 Compare API PCI DMC
45. Revised March 2012 Chapter 23 Velocity Motion Control API PCI DMC A01 PCI DMC B01 23 2 DMC 01 sv move H FORMAT 116 PASCAL DMC 01 sv move U16 CardNo U16 NodelD U16 SlotID 132 StrVel 132 MaxVel F64 Tacc 116 Dir E Purpose Velocity motion control with S curve velocity cross section E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID Pulses per A A StrVel 132 Starting velocity parameter second Pulses per i MaxVel 132 Maximum velocity parameter second Tacc F64 Second Specified acceleration time A A 0 In positive direction Dir 116 Selection ane 1 In negative direction M Description Vipos Max Velocity Start Velocity Acc Time Figure 23 2 Illustration of S curve motion speed constant E Example U16 CardNo 0 NodelD 1 SlotID 0 PDO_enable 1 132 StrVel 100 MaxVel 5000 F64 Tacc 0 1 116 Dir 1 116 status DMC 01 sv move CardNo NodelD SlotID StrVel MaxVel Tacc Dir Revised March 2012 23 3 Chapter 23 Velocity Motion Control API PCI DMC A01 PCI DMC B01 This page intentionally left blank 23 4 Revised March 2012 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_sy
46. Revised March 2012 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 4 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 ofthe machine bench s position can be in one ofthree states First position is stopped at the homing position awaiting the next command second position is stopped at the ORG sensor third position is stopped somewhere between ORG and Limit Switch PEL and MEL Please refer to the block diagram in Fig 3 15 below PEL Figure 3 15 PCI DMC A01 provides different functions for each of the above conditions For homing mode in a normal position PCI DMC A01 offers up to 35 different reset to home functions including the reserved part The user can simply use software settings to have the hardware perform the user selected homing operation Once the homing motion is complete the corresponding command and feedback position will be cleared to 0 The target position will however not be cleared to 0 The following graph shows the conditions for executing homing 1 Set Motor home return configuration 2 The configuration include slave information and speed high speed and low speed 3 if you have ever change home configuration parameter please turn off servo power after change the parameter set 4 Set home
47. Revised March 2012 39 11 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 level table 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 status 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 11000 12000 13000 14000 15000 16000 Trigger On Table Trigger Time PLL LL Figure 39 2 Compare Output s custom mode gt XIn custom mode Trigger On s position table is set using the level table parameter in API _DMC_01_channel1_ position compare table level XTrigger time is the time reguired to reach the next position ex time taken to move from position 1000 to position 2000 m Example U16 CardNo 0 U16 Mode 1 116 status DMC 01 channel1 output mode CardNo mode 39 12 Revised March 2012 Chapter 39 Compare API PCI DMC A01 PCI DMC B01 39 11 DMC 01 channel1 get io status m FORMAT 116 PASCAL DMC 01 channel1 get io status U16 CardNo U16 io status E Purpose Reads Compare2 status H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 lo_status U16 Number Unit Compare2 status E Example U16 CardNo 0 U16 lo_status 1 116 status DMC 01 channel1 get io status CardNo amp io status Revised March 2012 39 13 Chapter 39 Compare API PCI DMC A01 PCI DMC B01 39 12 DMC 01 channel1 set gpio out E FORMAT 116 PASCAL DMC 01 chan
48. Set multi axis linear motion control velocity DMC 01 start v3 multi axes Buffer Operation API DMC 01 set trigger buf function Interrupt API DMC 01 set int factor Multi axis more than 2 axes motion control with added EndVel Use DI3 SLD trigger to get buffer data Set interrupt mode Total of 8 modes available DMC 01 int enable Enable interrupt feedback DMC 01 int disable Disable disable interrupt 4 10 Revised March 2012 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 Security API _DMC_01_read_security Link handling procedure Called if interrupt enabled 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 writing security data _DMC_01_check_userpassword Master Card check user has read write access to memory _DMC_01_write_ userpassword Master Card change password _DMC_01_check_verifykey Master Card check verify key DMC 01 write verifykey Master Card write verify key DMC 01 read serialno Master Card read product se
49. 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 torgue limit DMC 01 set torgue mode Set torgue limit for velocity mode Torgue Motion Control Packet Protocol API Torgue motion control parameter profile DMC 01 set torgue Start torgue motion DMC 01 set torgue stop Stop torgue motion DMC 01 set torgue velocity limit Set velocity limit in torgue mode ol AP 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 DMC 01 emg stop Set group Stop Motion Control API All motion commands in buffer will execute immediate stop Revised March 2012 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 DMC 01 motion done Return current motion stage ofthe Master Card DMC 01 motion status Return current motion status of t
50. 132 Pitch 116 Dir 132 StrVel 132 MaxVel F64 Tacc F64 Tdec E Purpose 3 axis Spiral interpolation motion using absolute coordinates with S curve velocity cross section H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 Holds Node ID sets used for spiral interpolation NodelDArray 0 Node 1 NodelDArray U16 Number Unit vio NodelDArray 1 Node 2 NodelDArray 2 Node 3 SlotID U16 Number Unit Slot ID N f Absolut t int X i AS 132 umber o esol e sal er point X coordinate on the Z pulses specified axis N f Absolut t int Y i GSE 132 umber o PON e can er point Y coordinate on the a pulses specified axis Depth 132 Number of puss gepin to position on specified axis pulses height in direction of Z Number of Pitch 132 Absolute height between two spirals pulses Direction of spiral arc motion Clockwise 1 Dir 116 Selection mee p SAU Counterclockwise 0 Pulses per StrVel 132 p Starting velocity parameter second Pulses per MaxVel 132 E Maximum velocity parameter second Tacc F64 Second Specified acceleration time Tdec F64 Second Specified deceleration time 22 8 Revised March 2012 Chapter 22 3 Axis Spiral Interpolation Motion Control API PCI DMC A01 PCI DMC B01 m Example U16 CardNo 0 U16 NodelDArray 3 1 2 3 U16 SlotID 3 0 0 0 132 Center X 25000 Center Y 50000 Depth 10000 Pitch 20000 116
51. 2012 Chapter 18 1 Axis Motion Control API PCI DMC A01 PCI DMC B01 18 15 DMC 01 feedrate overwrite E FORMAT 116 PASCAL DMC 01 feedrate overwrite U16 CardNo U16 NodelD U16 SlotID U16 Mode 132 New Speed F64 sec E Purpose Changes motion speed or speed ratio E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID 0 Like V_Change this changes speed of current motion 1 Can be executed whether there is a motion in progress or not Changes the velocity for the Mode U16 Selection current and all subsequent motions 2 Can be executed whether there is a motion in progress or not Changes the speed ratio of current and all subsequent motions Range is 0 1000 Pulses per A NewSpeed 132 Velocity parameter to be changed second Specified acceleration deceleration time for sec F64 Second velocity change m Description Vins Vms Max Velocity New Velocity Max Velocity New Velocity e Acc Time Change Change Time Time Acc Time Figure 18 7 Mode 0 change to new speed Revised March 2012 18 19 Chapter 18 1 Axis Motion Control API PCI DMC A01 PCI DMC B01 A V 005 Max Velocity Max Velocity 15000 15000 Max Velocity 12000 Max Velocity 11000 Max Velocity 10000 Starting
52. 33 2 _DMC_01_get_alm_code 33 3 Revised March 2012 xi PCI DMC A01 PCI DMC B01 Programming Manual 33 3 DMC 01 master alm COde 33 4 33 4 DMC_01_slave_error 33 5 Chapter 34 Multi Axis Motion Control API 34 1 34 1 DMC 01 multi axES MOVE 34 2 34 2 _DMC_01_liner_speed_master 34 4 34 3 _DMC_01_start_v3_multi_axes 34 5 Chapter 35 Buffer Operation API 0 0 000 2 nsnennn nen nnn cen nennnne 35 1 35 1 _DMC_01_set_trigger_buf_function 35 2 Chapter 36 Interrupt API 0 20 2 2 2nn seen ence nen nen nnn nn nnnnennen eens 36 1 36 1 DMC 01 set_int_factor 36 2 36 2 DMC 01 int enable 36 3 36 3 DMC 01 int disable 36 3 36 4 _DMC_01
53. 50000 132 End Y 50000 132 StrVel 0 132 MaxVel 50000 F64 Angle 180 F64 Tacc 0 1 F64 Tdec 0 1 116 status DMC 01 start sr arc2 xy CardNo NodelDArray SlotID End X End Y Angle StrVel MaxVel Tacc Tdec 20 14 Revised March 2012 Chapter 20 2 Axis Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 20 7 DMC 01 start ta arc2 xy m FORMAT 116 PASCAL DMC 01 start ta arc2 xy U16 CardNo U16 NodelD U16 SlotID 132 End X 132 End Y F64 Angle 132 StrVel 132 MaxVel F64 Tacc F64 Tdec E Purpose 2 axis arc interpolation motion using absolute coordinates with T curve velocity cross section Known conditions endpoint coordinates angle E Parameters Name Data Type Unit Description Node ID of card used for motion displacement CardNo U16 Number Unit EIK along X axis and Y axis Holds Node ID sets used for arc interpolation NodelDArray U16 Number Unit NodelDArray 0 holds the 1st set of Node ID NodelDArray 1 holds the 2nd set of Node ID SlotID U16 Number Unit Slot ID Absolute endpoint X coordinate on the End X 132 Number of pulses ae 3 4 specified axis Absolute endpoint Y coordinate on the End Y 132 Number of pulses MA i j specified axis Angle F64 Degree Set arc angle One full arc is 360 Pulses per i A StrVel 132 Starting velocity parameter second Pulses per A MaxVel 132 Tangential velocity parameter second Tacc F64 Second Specified a
54. CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 116 status DMC 01 escape home move CardNo NodelD SlotID 10 8 Revised March 2012 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 torgue limit Set torgue limit for velocity mode Revised March 2012 11 1 Chapter 11 Velocity Motion Control Packet Protocol API PCI DMC A01 PCI DMC B01 11 1 DMC 01 set velocity mode mE FORMAT 116 PASCAL DMC 01 set velocity mode U16 CardNo U16 NodelD U16 SlotID F64 Tacc F64 Tdec E Purpose Sets the velocity motion control parameter profile H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID Tacc F64 Second Specified acceleration time Tdec F64 Second Specified deceleration time E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 F64 Tacc 0 1 Tdec 0 1 Set velocity mode parameter value for acceleration and deceleration time 116
55. DMC 01 motion done Revised March 2012 3 21 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 8 3 Sample Application Program Appearance e PCI DMC x asust Card num 1 Slave num 12 eet pose 2 PDO P2P operate 2 1 Set node id Status NodelD Slot ID CMD pi 1 0 O Timer FEK E T Ta aal E Stel O ps 1o s A MaxVel OO pps Motion 0 Acc 0 sec SYON lt STOP gt Dec a 9 3 Set distance_ _______ RALM Abs M S Curve Dist 0 pls 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 in Section 3 1 2 2 Set Servo Node ID and enable motion status display 2 1 Set node id ls Slot ID 0 0 7 Timer Figure 3 34 Input Node ID and check the Timer checkbox to enable motion status display NodelD item API function s argument variable NodelD Timer Checkbox Check to display the motion status Uncheck to disable display 3 22 Revised March 2012 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 Enter the values of the arguments for motion control m 2 2 Set vel prof Str el 0 pps MaxYel 0 pps Acc O sec Dec O sec Figure 3 35 StrVel item Starting velocity API f
56. DMC 01 start ta arc2 xy gDMCCardNo gArcNode gSlot2 arc2 end x arc2 end y arc2 angle StrVel MaxVel acc dec Arc interpolation motion using absolute coordinates under the T curve velocity cross section rt DMC 01 start sr arc2 xy gDMCCardNo gArcNode gSlot2 arc2 end x arc2 end y arc2 angle StrVel MaxVel acc dec Arc interpolation motion using relative coordinates under the S curve velocity cross section rt DMC 01 start tr arc2 xy gDMCCardNo gArcNode gSlot2 arc2 end x arc2 end y arc2 angle StrVel MaxVel acc dec Arc interpolation motion using relative coordinates under the T curve velocity cross section 2 axis arc interpolation using interpolation method 3 Arc3 rt DMC 01 start sa arc3 xy gDMCCardNo gArcNode gSlot2 arc3 cen x arc3 cen y arc3 end x arc3 end y arc3 dir StrVel MaxVel acc dec Arc interpolation motion using absolute coordinates under the S curve velocity cross section rt DMC 01 start ta arc3 xy gDMCCardNo gArcNode gSlot2 arc3_cen_x arc3 cen y arc3 end x arc3 end y arc3 dir StrVel MaxVel acc dec Arc interpolation motion using absolute coordinates under the T curve velocity cross section rt DMC 01 start sr arc3 xy gDMCCardNo gArcNode gSlot2 arc3_cen_x arc3 cen y arc3 end x arc3 end y arc3 dir StrVel MaxVel acc dec Arc interpolation motion using relative coordinates under the S curve velocity cross section rt DMC 01 start tr arc3 xy gDMCCardNo gArcNode
57. E Purpose Initializes all external buses H Parameters Function has no parameters E Example 116 status DMC 01 initial bus2 6 17 DMC 01 motion cnt H FORMAT 116 PASCAL DMC 01 motion cnt U16 CardNo U16 NodelD U16 SlotID U16 pc_mc_cnt U16 dsp mc cnt E Purpose Retrieves MailBox and DSP counter values H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID pc_mc_cnt U16 Number MailBox Command count on PC dsp_mc_cnt U16 Number Command count that DSP got from MailBox E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 pc_mc_cnt U16 dsp_mc_cnt 116 status DMC 01 motion cnt CardNo NodelD SlotID amp pc_mc_cnt amp pc_mc_cnt 6 10 Revised March 2012 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 7 1 Chapter 7 Servo Drive Parameter Read Write API PCI DMC A01 PCI DMC B01 TA DMC 01 read servo parameter E FORMAT 116 PASCAL DMC 01 read servo parameter U16 CardNo U16 NodelD U16 SlotID U16 group U16 idx U32 data E Purpose Reads servo drive parameter H Parameters
58. Establish communications Setting the SDO mode will use the following API function Set Slave communications to SDO mode rt DMC 01 set pdo mode gDMCCardNo gpNodelD i SlotID 0 3 4 Revised March 2012 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 This means PDO mode is disabled during Slave communication If you set PDO mode to disabled then Slave communications will use the SDO protocol If you need to use the SDO protocol to control the slave you must set the value of this argument to zero 2 Input the servo to change Including Node ID Group No and Index value NodeID SlotID Group Index ip of 0 0 Figure 3 8 For example you can enter the values shown below in Fig 3 8 1st field Node ID If the value is 1 then it will operate the servo with Node ID 1 2nd field Slot ID This field cannot be changed It shows the current Slave device Servo s Slot ID is 0 3rd Field Group Refers to the group number of the device usually a servo For a more detailed description of group number please refer to the ASDA A2 User Manual If Group is set to 0 as shown in Fig 3 8 this means this will set the servo parameter for
59. MaxVel 132 Tangential velocity parameter second Tacc F64 Second Specified acceleration time Tdec F64 Second Specified deceleration time Revised March 2012 20 5 Chapter 20 2 Axis Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 m Example U16 CardNo 0 U16 NodelDArray 2 1 2 U16 SlotlD 2 0 0 132 Center X 50000 132 Center Y 50000 132 StrVel 0 132 MaxVel 50000 F64 Angle 180 F64 Tacc 0 1 F64 Tdec 0 1 116 status DMC 01 start sr arc xy CardNo NodelDArray SlotID Center X Center Y Angle StrVel MaxVel Tacc Tdec 20 6 Revised March 2012 Chapter 20 2 Axis Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 20 3 DMC 01 start ta arc xy E FORMAT 116 PASCAL DMC 01 start ta arc xy U16 CardNo U16 NodelD U16 SlotID 132 Center X 132 Center Y F64 Angle 132 StrVel 132 MaxVel F64 Tacc F64 Tdec E Purpose 2 axis arc interpolation motion using absolute coordinates with T curve velocity cross section Known conditions center point coordinates angle E Parameters Name Data Type Unit Description Node ID of card used f ti CardNo U16 Number Unit ee displacement along X axis and Y axis Holds Node ID sets used for arc interpolation NodelDArray U16 Number Unit NodelDArray 0 holds the 1st set of Node ID NodelDArray 1 holds the 2nd set of Node ID SlotID U16 Number Unit Slot ID EA 132 Number of ka cener point X coor
60. Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID Event int status U16 Selection Current interrupt mode E Example U16 CardNo 0 U16 NodelD 1 U16 event int status 116 status DMC 01 get int status CardNo NodelD 8 event int status Revised March 2012 36 5 Chapter 36 Interrupt API PCI DMC A01 PCI DMC B01 36 6 DMC 01 link interrupt E FORMAT 116 PASCAL DMC 01 link interrupt U16 CardNo void __stdcall callbackAddr U16 CardNo U16 NodelD E Purpose Sets a handler procedure When interrupt occurs enter this handler H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 IpCallBackProc U16 Handler Default interrupt handler E Example U16 CardNo 0 stdcall callbackAddr 116 status DMC 01 link interrupt CardNo CallBack void _stdcall CallBack U16 CardNo U16 NodelD U16 i i CardNo NodelD 36 6 Revised March 2012 Chapter 37 Security API Chapter 37 Security API PCI DMC A01 PCI DMC B01 Function Name Description DMC 01 read security Table 37 1 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
61. Node 2 NodelDArray 2 Node 3 SlotID U16 Number Unit Slot ID Relative path parameter for motion of Node DisX 132 Number of pulses i ID on X axis A Relative path parameter for motion of Node DisY 132 Number of pulses i ID on Y axis A Relative path parameter for motion of Node DisZ 132 Number of pulses A ID on Z axis StrVel 132 Pulses per second Starting velocity parameter MaxVel 132 Pulses per second Maximum velocity parameter Tacc F64 Second Specified acceleration time Tdec F64 Second Specified deceleration time m Example U16 CardNo 0 U16 NodelDArray 3 1 2 3 U16 SlotID 3 0 0 O 132 DisX 25000 DisY 50000 DisZ 75000 I32 StrVel 0 MaxVel 50000 F64 Tacc 0 1 Tdec 0 1 116 status DMC 01 start sr move xyz CardNo NodelDArray SlotID DisX DisY DisZ StrVel MaxVel Tacc Tdec Revised March 2012 21 3 Chapter 21 3 Axis Linear Interpolation Motion Control API PCI DMC A01 PCI DMC B01 21 3 DMC 01 start ta move xyz E FORMAT 116 PASCAL DMC 01 start ta move xyz U16 CardNo U16 NodelD U16 SlotID 132 DisX 132 DisY 132 DisZ 132 StrVel 132 MaxVel F64 Tacc F64 Tdec E Purpose 3 axis linear interpolation motion using absolute coordinates with T curve velocity cross section H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 Holds Node ID sets used for linear interpolation NodelDArray U16 Number Unit NodelDArra
62. PCI DMC A01 PCI DMC B01 m Example U16 CardNo 0 U16 NodelDArray 2 0 1 U16 SlotID 2 0 O 132 DisX 50000 132 DisY 100000 132 StrVel 0 132 MaxVel 50000 F64 Tacc 0 1 F64 Tdec 0 1 116 status DMC 01 start sa move xy CardNo NodelDArray SlotID DistX DistY StrVel MaxVel Tacc Tdec Revised March 2012 19 9 Chapter 19 2 Axis Linear Interpolation Motion Control API PCI DMC A01 PCI DMC B01 19 5 DMC 01 start v3 move xy H FORMAT 116 PASCAL DMC 01 start v3 move xy U16 CardNo U16 NodelD U16 SlotID 132 DisX 132 DisY 132 StrVel 132 ConstVel 132 EndVel F64 TPhase1 F64 TPhase2 U16 m curve U16 m r a E Purpose 2 axis linear interpolation motion with EndVel added Values of StrVel and EndVel can be greater than MaxVel H Parameters Name Data Type Unit Description Node ID of card used for motion displacement CardNo U16 Number Unit i i along X axis and Y axis Holds Node ID sets used for linear interpolation NodelDArray U16 Number Unit NodelDArray 0 holds the 1st set of Node ID NodelDArray 1 holds the 2nd set of Node ID SlotID U16 Number Unit Slot ID j Number of Distance corresponding to motion of Node ID on DisX 132 pulses X axis Number of i DisY 132 Path for motion of Node ID on Y axis pulses Pulses per 4 StrVel 132 Starting velocity parameter second Pulses per ConstVel 132 Constant velocity second Pulses per r EndVel 132 End veloc
63. Timer MN ID v Slope 10 Ratio 10 Deno 26 SVON Pulse ratio 4 w MPG J MPG2 Servo status Reset 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 and Card initialization in Section 3 1 2 2 Set Servo Node ID and enable motion status display 2 1 Set Servo Node ID NodelD i gt Timer SVON Figure 3 99 3 70 Revised March 2012 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 Input Node ID and check Timer checkbox to enable motion status display NodelD item API function s argument variable NodelD Timer Checkbox Check to display the motion status Uncheck to disable display 3 Enter parameter value of manual pulse control 2 2 MPG setting MN ID v Slope 10 Ratio 10 Deno 26 TF MPG TI MPG2 Figure 3 100 Pulse ratio 4 MN ID item API function s argument variable MNNodelD Ratio item Ratio between each MPG rotation and motor rotation API function s argument variable ratio Slope item MPG speed slope API function s argument variable slope Deno item Denominator for motor rotations per MPG revolution API function s argument variable denominator Pulse ratio item Ratio of pulses per MPG revolution API function s argument variable pulse ratio 4 Set Servo Motor Power ON OFF servo o
64. U16 SlotID U16 Index U16 Cmd U16 COBID U16 DataType U16 Value0 U16 Value1 U16 Value2 U16 Value3 E Purpose Retrieves the SDO command message and places it in the data buffer H Parameters Name Data Type Unit Description Numb CardNo U16 ae CardNo is between 0 15 Number NodelD U16 Bh Node ID Unit N SlotID U16 IST eter Unit Index U16 Number Index of object dictionary Subldx U16 Number Sub index of object dictionary Cmd U16 Number Index of object dictionary COBID U16 Number CAN object ID DataType U16 Number Datatype of object dictionary vaiet U16 ane Message buffer Data1 Idx low High byte u CMD Low byte M buffer Data2 Sub Idx High byt Value U16 Nat E a 07190010 el Gaye Idx high Low byte Value2 U16 Number Message buffer Data3 Data Low byte Value3 U16 Number Message buffer Data4 Data High byte m Example U16 CardNo 0 NodelD 1 SlotID 0 Index 0x6060 Subldx 0 U16 Cmd COBID DataType Value0 Value1 Value2 Value3 116 status DMC 01 get message CardNo NodelD SlotID Index Subindex 8Cmd amp COBID amp DataType 8Value0 amp Value1 amp Value2 8Value3 Revised March 2012 8 13 Chapter 8 Using SDO Protocol API PCI DMC A01 PCI DMC B01 8 10 DMC 01 reset sdo choke E FORMAT 116 PASCAL DMC 01 reset sdo choke U16 CardNo E Purpose Resets SDO when SDO command is blocked H Parameters Name Dat
65. U16 SlotID 0 116 status misc slave user data to flash CardNo NodelD SlotlD Revised March 2012 37 15 Chapter 37 Security API PCI DMC A01 PCI DMC B01 This page intentionally left blank 37 16 Revised March 2012 Chapter 38 Limit Reversal API PCI DMC A01 PCI DMC B01 Chapter 38 Limit Reversal API Function Name _DMC_01_rm_04pi_set_MEL_polarity Table 38 1 Description 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 Chapter 38 Limit Reversal API PCI DMC A01 PCI DMC B01 38 1 DMC 01 rm Odpi set MEL polarity H FORMAT 116 PASCAL DMC 01 rm Odpi set MEL polarity U16 CardNo U16 NodelD U16 SlotID U16 inverse E Purpose Reverses direction of negative limit H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Selection Node ID SlotID U16 Number Unit Slot ID Inverse U16 Selection data Bose 1 Negative E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 Inverse 1 Reverse direction of negative limit 116 status _DMC_01_rm_04pi_set_MEL_polarity CardNo NodelD SlotID inverse 38 2 Revised March 2012 Chapter 38 Limit Reversal API PCI DMC A01 PCI DMC B01 38 2 DMC 01 rm Od
66. Uncheck to disable display Enter the values of the arguments for motion control 2 2 Set vel prof St el O pps MaxYell 0 pps Acc Osc Dec 0 sec Figure 3 77 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 Revised March 2012 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 5 Select motion mode and set motion distance m 2 3 Set distance Abs S Curve Dist 0 pls 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 Dist item Motion distance API function s argument variable Distance 6 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 NodelD SlotID ON OFF ON OFF 0 Servo Power OFF 1 Servo Power ON 7 Click on the gt or C button to execute point to point single axis motion command As you have only set up motion in one axis this motion will not be executed right away You must go back to 3 Set
67. cross section 116 status DMC 01 start v3 rline xy CardNo amp NodelD amp SlotID pos1 x pos1 y pos2 x pos2 y mode param StrVel ConstVel EndVel TPhase1 TPhase2 m Ccurve M r a Revised March 2012 Chapter 40 Linear and Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 40 4 DMC 01 start v3 rline xyz H FORMAT 116 PASCAL DMC 01 start v3 rline xyz U16 CardNo U16 NodelD U16 SlotID I32 pos1_x 132 pos1 y I32pos1 z 132 pos2 x 132 pos2 y pos2 z U16 mode F64 param 132 StrVel 132 ConstVel 132 EndVel F64 TPhase1 F64 TPhase2 U16 m curve U16 m r a E Purpose 3 axis linear arc interpolation motion control with added EndVel Values of StrVel and EndVel can be greater than MaxVel E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID Pos1 x 132 Number Unit X coordinate of first position Pos1 y 132 Number Unit Y coordinate of first position Pos1 zZ 132 Number Unit Z coordinate of first position Pos2 x 132 Number Unit X coordinate of second position Pos2 y 132 Number Unit Y coordinate of second position Pos2 z 132 Pulses per second Z coordinate of second position 0 Perpendicular distance from arc to right angle A gt B Mode U16 Selection 1 Perpendicular distance from start of arc to right angle A gt B 2 Arc radius A gt B
68. m Example U16 CardNo 0 NodelD 1 SlotID 0 132 Dist 100000 132 StrVel 0 MaxVel 50000 F64 Tacc 0 1 Tdec 0 1 116 status DMC 01 start ta move CardNo NodelD SlotID Dist StrVel MaxVel Tacc Tdec 18 4 Revised March 2012 Chapter 18 1 Axis Motion Control API PCI DMC A01 PCI DMC B01 18 4 DMC 01 start sa move H FORMAT 116 PASCAL DMC 01 start sa move U16 CardNo U16 NodelD U16 SlotID 132 Dist 132 StrVel 132 MaxVel F64 Tacc F64 Tdec E Purpose Carries out motion displacement using absolute coordinates with S curve velocity cross section H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID Number of Dist 132 Specified distance in absolute coordinates pulses Pulses per StrVel 132 E Starting velocity second Pulses per MaxVel 132 2 Maximum velocity second Tacc F64 Second Specified acceleration time Tdec F64 Second Specified deceleration time E Example U16 CardNo 0 NodelD 1 SlotID 0 132 Dist 100000 132 StrVel 0 MaxVel 30000 F64 Tacc 0 1 Tdec 0 1 116 status DMC 01 start sa move CardNo NodelD SlotID Dist StrVel MaxVel Tacc Tdec Revised March 2012 18 5 Chapter 18 1 Axis Motion Control API PCI DMC A01 PCI DMC B01 18 5 DMC 01 p change H FORMAT 116 PASCAL DMC 01 p change U16 CardNo U16 NodelD U16 SlotID 132 NewPos E
69. more than 2 axes motion control with added EndVel Revised March 2012 34 1 Chapter 34 Multi Axis Motion Control API PCI DMC A01 PCI DMC B01 34 1 DMC 01 multi axes move H FORMAT 116 PASCAL DMC 01 multi axes move U16 CardNo U16 AxisNum U16 NodelD U16 SlotID 132 DistArrary 132 StrVel 132 MaxVel F64 Tacc F64 Tdec U16 m curve U16 m r a E Purpose Sets motion control for more than 2 axes H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 AxisNum U16 Number Unit Axis ID NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID Number of DistArrary 132 Motion to be executed by each axis pulses array Pulses per A i StrVel 132 Starting velocity second Pulses per A A MaxVel 132 Maximum velocity second Tacc F64 Second Specified acceleration time Tdec F64 Second Specified deceleration time A 1 T curve m curve U16 Selection 2 S curve 0 Relative motion displacement m ra U16 Selection 1 Absolute motion displacement 34 2 Revised March 2012 Chapter 34 Multi Axis Motion Control API PCI DMC A01 PCI DMC B01 m Example U16 CardNo 0 AxisNum 4 U16 NodelD 4 1 2 3 4 SlotID 4 0 1 2 3 132 DistArrary 4 1000 2000 3000 6000 132 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
70. write memory to function enable before writing security data DMC 01 check userpassword DMC 01 write userpassword Master Card check user has read write access to memory Master Card change password DMC 01 check verifykey Master Card check verify key DMC 01 write verifykey Master Card write verify key DMC 01 read serialno Master Card read product serial number misc slave check userpassword Slave 04PI check user has read write access to memory misc slave write userpassword Slave 04PI1 change password misc slave get serialno Slave 04PI read product serial no misc security Encrypt and generate verify key from User Key and SerialNo misc slave write verifykey Slave 04PI write verify key misc slave check verifykey Slave 04PI1 check verify key misc slave user data buffer read misc slave user data buffer write Slave 04PI read data from specified memory block Slave 04P1 write security data to specified memory block _misc_slave_user_data_to_flash Slave 04P1 write data from Buffer to Flash Revised March 2012 37 1 Chapter 37 Security API PCI DMC A01 PCI DMC B01 37 1 DMC 01 read security E FORMAT 116 PASCAL DMC 01 read security U16 CardNo U16 page U16 array E Purpose Reads security data specified by the Master Card from memory H Parameters Name Data Type
71. 0 End X 0 Angle 0 Calc Cen_X RT E Start Y 0 End_ 0 Cen Y 2 2 Set vel prof StrVel O pps Ari CenX 0 Cen Y 0 Angle o MaxVel 1280000 pps C a2 Enix ro End Y oO Ange 5 Acc 01 sec Dec PT oe C Arc3 Cen X 0 Cen Y 0 Dir 0 O Ats O Curve End_X 0 End Y i EET Figure 3 118 3 87 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 Card num O Slave num O Timer Figure 3 119 Check the Timer checkbox to enable motion status display Timer Checkbox Check to display the motion status Uncheck to disable display 3 Enter Known conditions and select the method of calculation to use End Y 0 Angle 0 Calc ConX PT Cen Y Figure 3 120 Ifyou know the starting point s XY coordinates the center point s XY coordinates and the corresponding angle you can use these to calculate the XY coordinates of the endpoint Clicking on Calc then executes the following procedure Get the X and Y values for the endpoint coordinates rt misc app get circle endpoint Start X Start_Y Center X Center Y Angle 8End X 8End Y Ifyou know the starting point s XY coordinates
72. 01 rm 04da set output error handle U16 CardNo U16 NodelD U16 SlotID U16 ChannelNo U16 On Off E Purpose Keeps original DA settings if the connection is broken E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID is between 0 12 SlotID U16 Number Unit 0 ChannelNo U16 Number Unit Channel ID is between 0 3 0 Disable ErrorHandle Onon kl a 1 Enable ErrorHandle E Example U16 CardNo 0 U16 NodelD 1 U16 Slotld 0 U16 ChannelNo 3 U16 On Off 1 enable ErrorHandle 116 status DMC 01 rm 04da set output error handle CardNo NodelD SlotlD ChannelNo On Off 29 10 Revised March 2012 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 E FORMAT 116 PASCAL DMC 01 rm 04da set output offset value U16 CardNo U16 NodelD U16 SlotID U16 ChannelNo 116 Value E Purpose Sets the DA offset value H Parameters Name Bole Unit Description Type CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID is between 0 63 SlotID U16 Number Unit 0 ChannelNo U16 Number Unit Channel ID is between 0 3 Value is 127 128 H 1 Step of Value 38 14uv m Adjust the offset of the channel by 16 LSBs to 15 875 LSBs in increments of 1 8 LSB Definition S
73. 01 start v3 multi axes U16 CardNo U16 AxisNum U16 NodelD U16 SlotID 132 DistArrary 132 StrVel 132 ConstVel 132 EndVel F64 TPhase1 F64 TPhase2 U16 m curve U16 m r a E Purpose Multi axis more than 2 axes motion control with added EndVel Values of StrVel and EndVel can be greater than MaxVel E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 AxisNum U16 Number Unit Axis ID NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID Number of DistArrary 132 Motion to be executed by each axis pulses array Pulses per StrVel 132 5 Starting velocity second Pulses per ConstVel 132 Constant velocity second Pulses per EndVel 132 End velocity second TPhase1 F64 Second Time from StartVel to ConstVel TPhase2 F64 Second Time from ConstVel to EndVel A 1 T curve m curve U16 Selection 2 S curve i 0 Relative motion displacement m ra U16 Selection A 1 Absolute motion displacement Revised March 2012 34 5 Chapter 34 Multi Axis Motion Control API PCI DMC A01 PCI DMC B01 m Description V pps V pps Endvel Const el Constvel Strvel jEndvel Strvel TPhase1 TPhase2 TPhase1 TPhase2 V pps V pps Strvel End el Constvel Const el TPhase1 TPhase2 TPhase 1 TPhase2 TPhase 1 Time of StrVel to ConstVel TPhase2 Time of ConstVel to EndVel Figure 34 1 Explanation of TPha
74. 1 SlotID 6 rc 6 speed 6 _DHC_61_motion_status CardNo 15 6 NodeID 1 SlotID 6 rc 6 MC_status 22655 DMC 81 motion _done CardNo 15 6 NodeID 1 SlotID 6 rce 6 motion done 8 112x start tr move CardNo 15 6 NodeID 1 SlotID 6 rc 6 Dist 12888888 StrUe1 8 MaxUe DMC 61 get comnand CardNo 15 8 Node1D 1 Sl1ot1D 8 rc 8 Gommand 28456968 DHC 61 get position CardNo 15 6 NodeID 1 SlotID 6 rc 6 Position 12437 04 DHG 81 get current speed CardNo 15 6 NodeID 1 SlotID 6 rc 6 speed 128 6666 Figure 3 169 3 132 Revised March 2012 Chapter 4 Control API PCI DMC A01 PCI DMC B01 Chapter 4 Control API 4 11 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 Range 0 to 255 32768 to 32767 0 to 65535 2147483648 to 2147483647 0 to 4294967295 Point 64 bit Double Precision Floating 1 797683134862315E308 to Point 1 797683134862315E309 TRUE FALSE Revised March 2012 4 1 Chapter 4 Control API PCI DMC A01 PCI DMC B01 4 2 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 seg Get the number of all PCI DMC A01 interface cards on the syste
75. 132 Number of pulses MA i j specified axis Angle F64 Degree Set arc angle One full arc is 360 Pulses per i A StrVel 132 Starting velocity parameter second Pulses per A MaxVel 132 Tangential velocity parameter second Tacc F64 Second Specified acceleration time Tdec F64 Second Specified deceleration time Revised March 2012 20 17 Chapter 20 2 Axis Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 m Example U16 CardNo 0 U16 NodelDArray 2 f 1 2 U16 SlotlD 2 0 0 132 End X 50000 132 End Y 50000 132 StrVel 0 132 MaxVel 50000 F64 Angle 180 F64 Tacc 0 1 F64 Tdec 0 1 116 status DMC 01 start sa arc2 xy CardNo NodelDArray SlotID End X End Y Angle StrVel MaxVel Tacc Tdec 20 18 Revised March 2012 20 9 DMC 01 start tr arc3 xy E FORMAT Chapter 20 2 Axis Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 116 PASCAL DMC 01 start tr arc3 xy U16 CardNo U16 NodelD U16 SlotID 132 Center X 132 Center Y 132 End X 132 End Y 116 Dir 132 StrVel 132 MaxVel F64 Tacc F64 Tdec E Purpose 2 axis arc interpolation motion using relative coordinates with T curve velocity cross section Known conditions center point coordinates endpoint coordinates H Parameters Name Data Type Unit Description Node ID of card used for motion displacement CardNo U16 Number Unit LT TANTS A along X axis and Y axis Holds Node ID sets
76. 28 13 DMC 01 rm Odpi md1 set soft limit H FORMAT 116 PASCAL DMC 01 rm O4pi md1 set soft limit U16 CardNo U16 NodelD U16 SlotID 132 PLimit 132 NLimit U16 Enable E Purpose Enables disables software limit under RMO4PI Mode 1 E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID PLimit 132 Number Unit Value of positive software limit NLimit 132 Number Unit Value of negative software limit 0 Disable software limit Enable U16 Selection A 1 Enable software limit E Example U16 CardNo 0 U16 NodelD 1 SlotID 0 132 PLimit 5000 NLimit 5000 U16 Enable 1 116 status _DMC_01_rm_04pi_md1_set_soft_limit CardNo NodelD SlotlD PLimit NLimit Enable Revised March 2012 28 23 Chapter 28 4 Channel Pulse Interface Mode 1 Motion Control API PCI DMC A01 PCI DMC B01 28 14 DMC 01 rm 0O4pi md1 get soft limit status H FORMAT 116 PASCAL DMC 01 rm O4pi md1 get soft limit status U16 CardNo U16 NodelD U16 SlotID U16 NLimit status U16 PLimit status E Purpose Retrieves current 4 axis software limit contact status under RM04PI Mode 1 H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID NLimit_status U16 Number Unit Return con
77. 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 3 106 Revised March 2012 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 2 Enable motion status display JV Timer Figure 3 142 Timer Checkbox Check to display the motion status Uncheck to disable display 3 Spiral motion parameter settings m 2 1 Set vel prof Centex og Pulse Cent YO g Pulse Pitch Pulse Angle Pulse Strvel pps Marel pps Acc sec Dec sec Figure 3 143 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 Pitch item Interval between circles in Spiral API function s argument variable Pitch Angle item Total sum of angles in Spiral For example 720 degrees is 2 circles API function s argument variable Angle 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 reguired to go from maximum velocity to 0 API function s argument variable dec Revised March 2012 3 107 Chapter 3 Operating Principles PCI DM
78. 3000 132 StrVel 100 MaxVel 5000 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 116 status DMC 01 start rline xy CardNo 8NodelD amp SlotID pos1 x pos1_y pos2 x pos2_y mode param StrVel MaxVel Tacc Tdec m curve m r a Revised March 2012 40 3 Chapter 40 Linear and Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 40 2 DMC 01 start rline xyz E FORMAT 116 PASCAL DMC 01 start rline xyz U16 CardNo U16 NodelD U16 SlotlD I32 pos1_x 132 pos1 y I32pos1 z 132 pos2 x 132 pos2_y pos2 Zz U16 mode F64 param 132 StrVel 132 MaxVel F64 Tacc F64 Tdec U16 m curve U16m r a E Purpose 3 axis linear arc R angle interpolation motion control E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID Pos1_x 132 Number Unit X coordinate of first position Pos1 y 132 Number Unit Y coordinate of first position Pos1 zZ 132 Number Unit Z coordinate of first position Pos2 x 132 Number Unit X coordinate of second position Pos2 y 132 Number Unit Y coordinate of second position Pos2 z 132 a bel Z coordinate of second position second 0 Perpendicular distance from arc to right angle A gt B Mode U16 Selection 1 Perpendicular distance from start of
79. 39 1 39 1 _ DMC 01 set compare channel poSiti on 39 2 39 22 DMC 01 get compare channel pOSiti ON 39 3 39 3 _DMC_01_set_compare_ipulse_mode 39 4 39 4 _DMC_01_set_compare_channel_direction 39 5 39 5 _DMC_01_set_compare_channel_trigger_time 39 6 39 6 _DMC_01_set_compare_channel_one_shot 39 7 39 7 _DMC_01_set_compare_channel_source 39 8 39 8 _DMC_01_channel0_position CMp 39 9 39 9 _DMC_01_channel1_output_enable 39 10 39 10 _DMC_01_channel1_output_mode 39 11 39 11 _DMC_01_channel1_get_io_status 39 13 39 12 _DMC_01_channel1_set_gpio_out 39 14 39 13 _DMC_01_channel1_position_compare_table 39 15 39 14 _DMC_01_channel1_position_compare_table_level 39 16 39 15 _DMC_01_channel1_position_compare_table_cnt 39 17 39 16 _DMC_01_s
80. A01 PCI DMC B01 39 2 DMC 01 get compare channel position E FORMAT 116 PASCAL DMC 01 get compare channel position U16 CardNo U16 compare Channel 132 position E Purpose Reads current value of Position counter for that Channel H Parameters Name Data Type Unit Description Number CardNo U16 aa CardNo is between 0 15 Number Compare_Channel U16 Unit Channel No is 0 1 Number of Position 132 Read positive value pulses H Example U16 CardNo 0 U16 Compare channel 0 132 Position 100000 116 status DMC 01 get compare channel position CardNo compare channel amp position Revised March 2012 39 3 Chapter 39 Compare API PCI DMC A01 PCI DMC B01 39 3 DMC 01 set compare ipulse mode H FORMAT 116 PASCAL DMC 01 set compare ipulse mode U16 CardNo U16 mode E Purpose Sets input phase mode for pulse interface module H Parameters Data Ae Name Unit Description Type Number E CardNo U16 Unit CardNo is between 0 15 Number 0 AB Phase Mode U16 Unit 1 CW CCW H Example U16 CardNo 0 U16 mode 0 AB Phase 116 status DMC 01 set compare ipulse mode CardNo mode 39 4 Revised March 2012 Chapter 39 Compare API PCI DMC A01 PCI DMC B01 39 4 DMC 01 set compare channel direction E FORMAT 116 PASCAL DMC 01 set compare channel direction U16 CardNo U16 compare channel U16 dir E Purpose Sets Channel pulse direction H
81. CardNo NodelD3 2 SlotID3 2 Pitch 90 0 360 0 MaxVel 2 MaxVel 0 1 0 1 MotionStep6 Wait for Z axis tool to move into position End action rt 2 DMC 01 get command CardNo NodelD3 2 SlotID3 2 8Cmdf2 if rt 2 0 88 Cmd 2 TempSaveData MotionStep 7 MotionStep7 Start 2nd step of job straight line _DMC_01_start_ta_move_xy CardNo NodelD2 SlotID2 30000 30000 MaxVel 2 MaxVel 0 1 0 1 MotionStep8 Wait for 2nd step of job to finish rt 0 DMC 01 get command CardNo NodelD3 0 SlotID3 0 8Cmd O0 rt 1 DMC 01 get command CardNo NodelD3 1 SlotID3 1 8Cmd 1 if rt 0 rt 1 0 amp amp Cmd 0 30000 88 Cmd 1 30000 MotionStep 9 MotionStep9 Rotate Z axis to keep tool on a tangent or normal DMC 01 start tr move CardNo NodelD3 2 SlotID3 2 Pitch 90 0 360 0 MaxVel 2 MaxVel 0 1 0 1 3 128 Revised March 2012 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 MotionStep10 Wait for Z axis tool to move into position End action rt 2 DMC 01 get command CardNo NodelD3 2 SlotID3 2 8Cmdf2 if rt 2 0 amp amp Cmd 2 TempSaveData MotionStep 11 MotionStep11 Start job Continuous Arc DMC 01 start tr heli xy CardNo NodelD3 SlotID3 0 10000 Pitch 90 0 360 0 Pitch 1 MaxVel 2 MaxVel 0 1 0 1 DMC 01 start tr heli xy CardNo NodelD3 SlotID3 10000 0 Pitch
82. Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID Number of Dist 132 Absolute coordinates for first segment pulses i Number of l Dist2 132 Absolute coordinates for second segment pulses Pulses per StrVel 132 5 Starting velocity second Pulses per i MaxVel 132 Maximum velocity for first segment second Pulses per A MaxVel2 132 Maximum velocity for second segment second Tacc F64 Second Specified acceleration time Acceleration deceleration time when switching Tsec F64 Second from first segment to second segment Tdec F64 Second Deceleration time m Example U16 CardNo 0 NodelD 1 SlotID 0 132 Dist 500000 Dist2 500000 132 StrVel 1000 132 MaxVel 10000 MaxVel2 30000 F64 Tacc 0 1 F64 Tsec 0 1 F64 Tdec 0 1 116 status DMC 01 start ta move 2seg CardNo NodelD SlotlD Dist Dist2 StrVel MaxVel MaxVel2 Tacc Tsec Tdec 18 12 Revised March 2012 Chapter 18 1 Axis Motion Control API PCI DMC A01 PCI DMC B01 18 10 DMC 01 start sa move 2seg mE FORMAT 116 PASCAL DMC 01 start sa move 2seg U16 CardNo U16 NodelD U16 SlotID 132 Dist 132 Dist2 132 StrVel 132 MaxVel 132 MaxVel2 F64 Tacc F64 Tsec F64 Tdec E Purpose 2nd motion displacement using absolute coordinates with S curve velocity cross section gt lt Motion Buffer will be cleared before this function is executed H Parameters
83. Enter AD voltage or current display position 6 AD reset and maximum r Regulate Zero JEE Full Figure 3 140 Zero item Click this button to carry out re zero e g selectDA Mode 5 5 set lever to 0 position then click on Zero button to complete zeroing operation Full item Click this button to set maximum e g select DA Mode 10 10 set lever to 10 then click on Full button to complete the set maximum operation Revised March 2012 3 103 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 104 7 Ifthe 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 DANodelD SlotlD ChannelDA 0 Next Output Disable rt DMC 01 rm 04da set output enable gDMCCardNo DANodelD SlotlD ChannelDA 0 Set DA selection mode rt DMC 01 rm 04da set output range gDMCCardNo DANodelD SlotlD ChannelDA DAmode If the Apply option in Fig 3 136 is selected execute the following procedure Set DA output value rt _DMC_01_rm_04da_set_output_value gDMCCardNo DANodelD SlotID ChannelDA AppValue If the Error Handle option in Fig 3 137 is checked execute the following procedure Enable Error Handle rt _DMC_01_rm_04da_set_output_error_handle gDMCCardNo DANodelID SlotID ChannelDA 1 If the Over Range option in Fig 3 137 is checked execute the following procedure V Enable Over Rang
84. Interface API PCI DMC A01 PCI DMC B01 6 5 DMC 01 check card running E FORMAT 116 PASCAL DMC 01 check card running U16 CardNo U16 running E Purpose Checks to see ifthe card is running H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 0 Not executed running U16 Selection 1 Already executed E Example U16 CardNo 0 U16 running 0 116 status DMC 01 check card running CardNo amp running 6 6 DMC 01 reset card m FORMAT 116 PASCAL DMC 01 reset card U16 CardNo E Purpose Resets the selected card H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 E Example U16 CardNo 0 116 status DMC 01 reset card CardNo 6 4 Revised March 2012 Chapter 6 Interface API PCI DMC A01 PCI DMC B01 6 7 DMC 01 check nodeno H FORMAT 116 PASCAL DMC 01 check nodeno U16 CardNo U16 NodelD U16 SlotID U16 exist E Purpose Checks to see ifthe node already exists H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID Re U16 seer Si 0 Node ID gee not exist 1 Node ID exists E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 If Slot ID is set to 0 then the Slave is a servo drive U16 exist 0 116 status DMC 01 check nodeno CardNo NodelD SlotID amp
85. MaxVel acc dec Motion displacement using absolute coordinates with T curve velocity cross section rt DMC 01 start sr move gDMCCardNo NodelD SlotlD Distance StrVel MaxVel acc dec Motion displacement using relative coordinates with S curve velocity cross section rt DMC 01 start tr move gDMCCardNo NodelD SlotID Distance StrVel MaxVel acc dec Motion displacement using relative coordinates with T curve velocity cross section Reset motion displacement counter Command and Feedback Status CMD pls EBK pls SPD pps 10 Sts i Motion RESET Figure 3 38 Click on the RESET button to execute reset command If you wish to reset the command and feedback counters you must first set drive motor to servo off if gbIsSVON rt DMC 01 ipo set svon gDMCCardNo NodelD SlotID 0 The motion counters can only be cleared when the motor is confirmed to be servo off rt DMC 01 set command gDMCCardNo NodelD SlotID 0 Clear command rt DMC 01 set position gDMCCardNo NodelD SlotID 0 Clear feedback Once the command and feedback counters are cleared set drive motors to servo on again if gbIsSVON rt DMC 01 ipo set svon gDMCCardNo NodelD SlotID 1 Revised March 2012 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 Motion counter value rt DMC 01 get command gDMCCardNo NodelD SlotlD amp cmd Get value of command counter rt DMC 0
86. Node 3 U16 enable 1 pulse_ratio 4 Set ratio of MPG click to output pulse ratio U32 ratio 4 10 10 0 0 Set ratio of one full MPG turn to pulse output motor rotations U32 slope 4 1000 Set slope of MPG Maximum velocity to 1000 U16 denominator 4 36 36 36 36 Set output ratio numerator for every turn of MPG rt DMC 01 set rm mpg axes enable2 CardNo MasterNodelD MasterSlotID NodelD SlotID enable pulse ratio ratio slope denominator 26 4 Revised March 2012 Chapter 26 MPG and JOG Operation API PCI DMC A01 PCI DMC B01 OMG 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 This is sufficient to rotate the disc driven by the motor by 1 degree 1 360 1280000 355 55 Formula One full turn of MPG 100 clicks Number of motor rotation pulses 128000 MPG ratio ratio Denominator P1 45 P1 44 Conversion Ratio MPG rotation MPG ratio Ratio Denominator Servo rotation 1 full turn X1 1 1 1000 100 128000 X10 1 1 1000 1000 1280000 X100 1 1 1000 10000 12800000 X1 2 1 1000 100 256000 X1 1 2 1000 100 64000 Example using Delta servo P1 44 and P1 45 MPG rotates X clicks Se
87. NodelDArray 2 1 2 U16 SlotID 2 0 0 132 Center X 50000 132 Center Y 50000 132 StrVel 0 132 MaxVel 50000 F64 Angle 180 F64 Tacc 0 1 F64 Tdec 0 1 116 status DMC 01 start tr arc xy CardNo NodelDArray SlotID Center X Center Y Angle StrVel MaxVel Tacc Tdec 20 4 Revised March 2012 Chapter 20 2 Axis Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 20 2 DMC 01 start sr arc xy E FORMAT 116 PASCAL DMC 01 start sr arc xy U16 CardNo U16 NodelD U16 SlotlD 132 Center X 132 Center Y F64 Angle 132 StrVel 132 MaxVel F64 Tacc F64 Tdec E Purpose 2 axis arc interpolation motion using relative coordinates with S curve velocity cross section Known conditions center point coordinates angle E Parameters Name Data Type Unit Description A Node ID of card used for motion displacement CardNo U16 Number Unit i along X axis and Y axis Holds Node ID sets used for arc interpolation NodelDArray U16 Number Unit NodelDArray 0 holds the 1st set of Node ID NodelDArray 1 holds the 2nd set of Node ID SlotID U16 Number Unit Slot ID Relative center point X coordinate on the Center_X 132 Number of pulses re i specified axis Relative center point Y coordinate on the Center_Y 132 Number of pulses pi specified axis Angle F64 Degree Set arc angle One full arc is 360 Pulses per i A StrVel 132 Starting velocity parameter second Pulses per 3 A
88. Num U16 enable E Purpose Sets a group H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID NodelD Num U16 Number Group number 0 Clear group Enable U16 Number Unit 1 Set as group E Example U16 CardNo 0 U16 NodelDf4 1 3 5 U16 SlotID 4 0 0 0 U16 NodelD Num 3 Set 3 cards in the same group U16 enable 1 116 status DMC 01 set group CardNo NodelD SlotID NodelD Num enable 13 6 Revised March 2012 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 DMC 01 set sd mode Set Sd stop mode Revised March 2012 14 1 Chapter 14 Stop Motion Control API PCI DMC A01 PCI DMC B01 14 1 DMC 01 emg stop M FORMAT 116 PASCAL DMC 01 emg stop U16 CardNo U16 NodelD U16 SlotID E Purpose All motion commands in the buffer will execute an emergency stop H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node
89. Number Unit Channel No is 0 1 E Example U16 CardNo 0 U16 Compare channel 0 116 status DMC 01 set compare channel one shot CardNo compare channel Revised March 2012 39 7 Chapter 39 Compare API PCI DMC A01 PCI DMC B01 39 7 DMC 01 set compare channel source E FORMAT 116 PASCAL DMC 01 set compare channel source U16 CardNo U16 compare channel U16 source E Purpose Sets comparison Source H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 Compare_channel U16 Number Unit Channel No is 0 1 Source U16 Number Unit PORN 1 QEP2 H Example U16 CardNo 0 U16 Compare channel 0 U16 Source 0 116 status _DMC_01_set_compare_channel_source CardNo compare_channel Source 39 8 Revised March 2012 Chapter 39 Compare API PCI DMC A01 PCI DMC B01 39 8 DMC 01 channel0 position cmp E FORMAT 116 PASCAL DMC 01 channel0 position cmp U16 CardNo 132 start U16 dir U16 interval U32 trigger cnt E Purpose Executes Compare1 H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 Start 132 Number Unit Starting position for Compare Dir U16 Number Unit 0 Positive 1 Negative Number of A Interval U16 Pulse Compare intervals pulses Trigger cnt U32 Number Unit Trigger Compare total H Example U16 CardNo 0 132 Start 100000 U16
90. Number Unit 1 Inverse E Example U16 CardNo 0 U16 Inverse 1 116 status DMC 01 set compare channel polarity CardNo inverse 39 18 Revised March 2012 Chapter 39 Compare API PCI DMC A01 PCI DMC B01 39 17 DMC 01 channel0 position cmp by gpio H FORMAT 116 PASCAL DMC 01 channel0 position cmp by gpio U16 CardNo U16 dir U16 interval 132 trigger cnt E Purpose Sets Compare trigger to GPIO control E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 Dir U16 Number Unit 0 Positive 1 Negative Interval U16 Number Unit Pulse Compare intervals Trigger cnt 132 Number Unit Trigger Compare total E Example U16 CardNo 0 U16 Dir 1 U16 Interval 132 trigger cnt 116 status DMC 01 channel0 position cmp by gpio CardNo Dir Interval trigger cnt Revised March 2012 39 19 Chapter 39 Compare API PCI DMC A01 PCI DMC B01 39 18 DMC 01 channel1 position re compare table m FORMAT 116 PASCAL DMC 01 channel1 position re compare table U16 CardNo E Purpose Uses previous Compare condition and re executes Channel1 Compare H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 E Example U16 CardNo 0 116 status _DMC_01_channel1_position_re_compare_table CardNo 39 19 DMC 01 channel1 position re compare table level H FORMAT 116 PASCAL DMC 01 channel1 position re
91. O4pi md1 start line3 U16 CardNo U16 NodelD U16 SlotID 132 Dist 132 StrVel 132 MaxVel F64 Tacc F64 Tdec U16 m curve U16 m r a E Purpose Performs 3 axis linear interpolation motion control under RM04PI Mode 1 H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotlD 0 holds first set of Slot ID SlotID U16 Number Unit SlotID 1 holds second set of Slot ID SlotID 2 holds third set of Slot ID Path parameter corresponding to SlotID 0 motion Dist 132 Number of Path parameter corresponding to SlotID 1 pulses motion Path parameter corresponding to SlotID 2 motion StrVel 132 ad Starting velocity parameter second MaxVel 132 a ia Maximum velocity parameter second Tacc F64 Second Specified acceleration time Tdec F64 Second Specified deceleration time 1 Referenced against T curve velocity m curve U16 Selection eee i 2 Referenced against S curve velocity cross section Anes U16 Neen 0 pee cca vent 0 relative Coe ladies 1 Displacement in absolute coordinates 28 8 Revised March 2012 Chapter 28 4 Channel Pulse Interface Mode 1 Motion Control API PCI DMC A01 PCI DMC B01 m Example U16 CardNo 0 NodelD 1 SlotlD 3 0 1 2 132 Dist 3 10000 20000 30000 132 StrVel 0 MaxVel 3000 F64 Tacc 0 1 Tdec 0 1 U16 m curve 1 Referenced against T curve velocity cross section U16 m r a 1 Use displ
92. OFF 0 Servo Power OFF 1 Servo Power ON Start 2 axis arc interpolation motion control Click on the gt or C button to execute the following procedure 2 axis arc interpolation using interpolation method 1 Arc1 rt DMC 01 start sa arc xy gDMCCardNo gArcNode gSlot2 arc1 cen x arc1 cen y arc1 angle StrVel MaxVel acc dec Arc interpolation motion using absolute coordinates under the S curve velocity cross section rt DMC 01 start ta arc xy gDMCCardNo gArcNode gSlot2 arc1 cen x arc1 cen y arc1 angle StrVel MaxVel acc dec Arc interpolation motion using absolute coordinates under the T curve velocity cross section rt DMC 01 start sr arc xy gDMCCardNo gArcNode gSlot2 arc1 cen x arc1 cen y arc1 angle StrVel MaxVel acc dec Arc interpolation motion using relative coordinates under the S curve velocity cross section rt DMC 01 start tr arc xy gDMCCardNo gArcNode gSlot2 arc1 cen x arc1 cen y arc1 angle StrVel MaxVel acc dec Arc interpolation motion using relative coordinates under the T curve velocity cross section Revised March 2012 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 2 axis arc interpolation using interpolation method 2 Arc2 rt DMC 01 start sa arc2 xy gDMCCardNo gArcNode gSlot2 arc2 end x arc2 end y arc2 angle StrVel MaxVel acc dec Arc interpolation motion using absolute coordinates under the S curve velocity cross section rt
93. PO xx the value of xx is explained below under Index 4th field Index As noted above this value depends on the value for Group In Fig 3 8 index has a value of 0 so in this case read write will be carried on the PO 00 parameter of Servo with Node ID of 1 3 Read servo parameter RC Data 0 FEIS 0 Write Figure 3 9 Click on the Read button to execute the following procedure rt DMC 01 read servo parameter gDMCCardNo NodelD SlotID group idx amp data A data value will be returned The value will be current value set for this servo parameter The value of rt will be displayed in the RC field while the value of data will be displayed in the Data field Revised March 2012 3 5 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 6 4 Write servo parameter 5 RC Dat 0 1736 O Write 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 NodelD SlotID group idx data The value will be written to the servo group parameter you set Please refer to the previous section for a detailed description Exit procedure Click on the Exit button to quit and exit the procedure DMC 01 reset card and DMC 01 close must be execut
94. Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 Compare_channel U16 Number Unit Channel No7 0 1 Dir U16 Number Unit 0 Normal 1 Inverse E Example U16 CardNo 0 U16 Compare channel 0 U16 Dir 1 Inverse 116 status DMC 01 set compare channel direction CardNo compare channel dir Revised March 2012 39 5 Chapter 39 Compare API PCI DMC A01 PCI DMC B01 39 5 DMC 01 set compare channel trigger time E FORMAT 116 PASCAL DMC 01 set compare channel trigger time U16 CardNo U16 compare channel U32 time us E Purpose Sets Trigger enable duration H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 Compare_channel U16 Number Unit Channel No is 0 1 Time us U32 Time Enter the duration for each Trigger enable E Example U16 CardNo 0 U16 Compare channel 0 U16 Time us 20 20us 116 status DMC 01 set compare channel trigger time CardNo compare channel time Us 39 6 Revised March 2012 Chapter 39 Compare API PCI DMC A01 PCI DMC B01 39 6 DMC 01 set compare channel one shot H FORMAT 116 PASCAL DMC 01 set compare channel one shot U16 CardNo U16 compare channel E Purpose Sets Trigger to one time enable H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 Compare channel U16
95. Purpose Replaces the current position with a new position value H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID Number of 2 NewPos 132 Position parameter to be replaced pulses E Example U16 CardNo 0 U16 NodelD 1 SlotID 0 132 NewPos 100000 116 status DMC 01 p change CardNo NodelD SlotID NewPos 18 6 Revised March 2012 Chapter 18 1 Axis Motion Control API PCI DMC A01 PCI DMC B01 18 6 DMC 01 v change H FORMAT 116 PASCAL DMC 01 v change U16 CardNo U16 NodelD U16 SlotID 132 NewSpeed F64 sec E Purpose Replaces the current motion velocity with a new velocity value H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID Pulses per gt NewSpeed 132 Velocity parameter to be changed second Specified acceleration deceleration time for sec F64 Second velocity change m Description T Curve S Curve Vios Vors Max Velocity Max Velocity Start Velocity New Velocity Faea l l l l l i New Velocity l l l l I I ei lt Change 1 Acc Time Change 1 Time Time Acc Time Figure 18 3 Changing the velocity parameter E Example U16 CardNo 0 U16 NodelD 1 SlotlD 0 132 NewSp
96. SlotID NewPos Replaces the current position with a new position value 8 Stop motion Hit the STOP button to execute an emergency stop rt DMC 01 emg stop gDMCCardNo NodelD SlotID In this example emergency stop is used to stop motion This method guickly 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 9 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 59 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 17 Change Position 3 17 1 Function List Table 3 17 _DMC_01_start_ta_move _DMC_01_v_change 3 17 2 Sample Application Program Appearance is DMC NET x Card num 0 Slave num 0 2 P2P operate 2 1 Set Node ID Status Node ID Slot ID CMD sg pls 0 Le T Timer pos 7 9 pi 2 2 Set vel prof SPD C g am Strel pps nan C g MaxVel 1280000 pps Motion C g Acc a Sec Position change Dee aij see New 9 Vchenge Dist 12800000 pls RALM SVON Figure 3 87 Reset 1 Card initialization Click on the Initial button to open and initializ
97. TG Trigger mode bit MoSt U32 Selection ENE LSA 8 PWRON i enable bit 9 DriverErr Servo error bit 10 Target Target reached bit R fault 11 N A a cor ae au value is 0 12 MDSO Mode specific 13 MDS1 Mode specific 14 PEL Positive limit bit 15 MEL Negative limit bit Revised March 2012 15 3 Chapter 15 Motion Status API PCI DMC A01 PCI DMC B01 a se rss 0 Toon See reo J 14 13 12 11 10 9 8 Bit 1 Pepe De es ewan Bit 7 6 5 4 3 2 1 0 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 MODEG6 bit 1 and bit 2 are ON Table 15 2 Mode specific bit description for motion status Mode specific Mode item A x Bit 13 is 1 Bit 12 is 1 Homing mode MODE6 Homing error eel oot moming motion DMCNET mode MODE1 No Definition Mode enabled H Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U32 MoSt 0 116 status DMC 01 motion status CardNo NodelD SlotlD amp MoSt 15 4 Revised March 2012 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
98. TUT M ie ee ee ee SlotID 1 holds second set of Slot ID Center 0 holds first set of center point Number of dinat Sea 32 u coordinates pulses Center 1 holds second set of center point coordinates Angle F64 Degree Set arc angle One full arc is 360 Pulses per StrVel 132 a Starting velocity parameter second Pulses per MaxVel 132 Maximum velocity parameter second Tacc F64 Second Specified acceleration time Tdec F64 Second Specified deceleration time 1 Referenced against T curve velocity cross secti m_curve U16 Selection TEA A i 2 Referenced against S curve velocity cross section TA U16 Sektid 0 Displacement in relative coordinates 1 Displacement in absolute coordinates 28 12 Revised March 2012 Chapter 28 4 Channel Pulse Interface Mode 1 Motion Control API PCI DMC A01 PCI DMC B01 m Example U16 CardNo 0 NodelD 1 SlotID 2 0 1 132 Center 2 5000 5000 StrVel 0 MaxVel 1000 F64 Tacc 0 1 Tdec 0 1 U16 m_curve 1 m_r_a 1 Perform motion in absolute coordinates with T curve velocity cross section 116 status DMC 01 rm 0O4pi md1 start arc CardNo NodelD SlotID Center Angle StrVel MaxVel Tacc Tdec m curve m r a Revised March 2012 28 13 Chapter 28 4 Channel Pulse Interface Mode 1 Motion Control API PCI DMC A01 PCI DMC B01 28 7 DMC 01 rm 0O4pi md1 start arc2 E FORMAT 116 PASCAL DMC 01 rm 0O4pi md1 start arc2 U16 CardNo U16 NodelD U16 SlotID 132 End F64 Angl
99. U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID is between 0 12 SlotID U16 Number Unit 0 ChannelNo U16 Number Unit Channel ID is between 0 3 Value U16 Number Unit Output is between 0 65535 E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 ChannelNo 0 U16 Value 0 116 status _DMC_01_rm_04da_get_output_value CardNo NodelD SlotID ChannelNo amp Value Revised March 2012 29 3 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 E FORMAT 116 PASCAL DMC 01 rm 04da get return code U16 CardNo U16 NodelD U16 SlotlD U16 ChannelNo U16 ReturnCode E Purpose Reads DA status H Parameters Bir ame BIS eile z CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID is between 0 63 SlotID U16 Number Unit 0 ChannelNo U16 Number Unit Channel ID is between 0 3 Get return status parameter out range mode Data U16 Number Unit handle return code D15 D14 D13 D12 return code E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 ChannelNo 1 U16 ReturnCode 0 116 status DMC 01 rm 04da get return code CardNo NodelD SlotID ChannelNo amp ReturnCode 29 4 Revised March 2012 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 E FORM
100. U16 mode E Purpose Selects the reference position after re connecting to module under MO4PI Mode 1 gt XCheck that link feedback is enabled when using this function If yes set mode parameter to 1 ifthere is no feedback set parameter to 0 H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID ES U16 aeon 0 Reference command counter 1 Reference position counter H Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 mode 0 Reference command counter 116 status DMC 01 set rm 04pi ref counter CardNo NodelD SlotID mode Revised March 2012 28 27 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 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 Enable disable pin output _DMC_01_rm_04da_set_output_overrange Increase output range by 10 _DMC_01_rm_04da_set_output_error_clear Clear error status _DMC_01_rm_04da_read_da
101. and send the output value to target E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 ChannelNo 3 U16 Enable 1 Enable 116 status _DMC_01_rm_04da_set_output_enable CardNo NodelD SlotID ChannelNo Enable 29 6 Revised March 2012 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 H FORMAT 116 PASCAL DMC 01 rm 04da set output overrange U16 CardNo U16 NodelD U16 SlotID U16 ChannelNo U16 On Off E Purpose Increases output range by 10 H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID is 0 12 SlotID U16 Number Unit 0 ChannelNo U16 Number Unit Channel ID is between 0 3 i 0 Disable Overrange On Off U16 Selection 1 Enable Overrange E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 ChannelNo 0 U16 On_Off 1 enable OverRange 116 status DMC 01 rm 04da set output overrange CardNo NodelD SlotID ChannelNo Revised March 2012 On Off 29 7 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 H FORMAT 116 PASCAL DMC 01 rm 04da set output error clear U16 CardNo U16 NodelD U16 SlotID U16 ChannelNo U16 On Off E Purpose Clears error status E Parameters
102. at point A set NewSpeed to 15000 Speed now 200 or double the original from now on including the buffer Start Velocity Tiec Acc Time l Change Time Figure 18 8 Mode 1 change to new speed V oos Max Velocity Max Velocity 24000 22000 Max Velocity Max Velocity 12000 11000 Max Velocity 10000 X Starting at point A set NewSpeed to 200 i Start Speed now 200 or double the original Velocity from now on for all commands including f those in the buffer Tisec Acc Time Chan ange Time Figure 18 9 Mode 2 change to new speed ratio E Example U16 CardNo 0 U16 NodelD 1 SlotID 0 Mode 0 132 NewSpeed 3000 F64 sec 0 1 116 status DMC 01 feedrate overwrite CardNo NodelD SlotID Mode NewSpeed sec 18 20 Revised March 2012 18 16 DMC 01 start v3 move H FORMAT 116 PASCAL DMC 01 start v3 move U16 CardNo U16 NodelD U16 SlotID 132 Dist Chapter 18 1 Axis Motion Control API PCI DMC A01 PCI DMC B01 132 StrVel 132 ConstVel 132 EndVel F64 TPhase1 F64 TPhase2 U16 m curve U16m r a E Purpose Single axis motion displacement with EndVel added Values of StrVel and EndVel can be greater than ConstVel H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID Number of Dist 132 Specified motion
103. clear position in Manual Pulse 15 ERR_MPG_Mode Generator MPG mode Unable to return acknowledgement when sending 16 ERR_PDO_TG T a command to module in PDO mode 17 ERR_ConfigFileOpenError Error opening configuration file 18 ERR_Ctrl_value Command code error 19 ERR_Security_Fifo Write error using Security Fpga 20 ERR_Security_Fifo_busy Security Fpga is busy Revised March 2012 2 1 Chapter 2 Command Return Values and Messages PCI DMC A01 PCI DMC B01 Error Return xeye Error Code Error Description Decimal 21 ERR_SpeedLimitError Defined velocity exceeds maximum velocity 22 ERR Security Page Security page must be smaller than 16 23 ERR Slave Security op Security slave operate command failed 24 ERR channel no channel no error DMC 01 pci initial AP function must be 25 ERR start ring first launched first 26 ERR_NodelDError NodelD does not exist 27 ERR_MailBoxErr DSP busy unable to send command 28 ERR_SdoData SDO data sent but no response received 29 ERR_IOCTL Operating system unable to process this IRP 30 ERR_SdoSvonFirst Servo On required to use SDO axis control 31 ERR_SlotIDError No such Slot ID for Slave module GA or RM 32 ERR_PDO First PDO protocol mode required to use PDO protocol 33 ERR Protocal build Protocol not built 34 ERR Maching TimeOut Module matching time out 35 ERR Maching NG Module matching fai
104. compare table level U16 CardNo E Purpose Uses previous Compare condition and re executes Channel1 Compare Level mode E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 E Example U16 CardNo 0 116 status _DMC_01_channel1_position_re_compare_table_level CardNo 39 20 Revised March 2012 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 with added EndVel DMC 01 start v3 rline xyz 3 axis linear arc interpolation motion control with added EndVel Revised March 2012 40 1 Chapter 40 Linear and Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 40 1 DMC 01 start rline xy H FORMAT 116 PASCAL DMC 01 start rline xy U16 CardNo U16 NodelD U16 SlotID 132 pos1 x 132 pos1 y 132 pos2 x 132 pos2_y U16 mode F64 param 132 StrVel 132 MaxVel F64 Tacc F64 Tdec U16 m curve U16 m r a E Purpose 2 axis linear arc R angle interpolation motion control H Parameters Name Data Type Unit Description CardNo U16 Number Uni
105. continue combine ratio Revised March 2012 41 1 Chapter 41 Speed Continue API PCI DMC A01 PCI DMC B01 41 1 DMC 01 speed continue H FORMAT 116 PASCAL DMC 01 speed continue U16 CardNo U16 NodelD U16 SlotID U16 enable E Purpose Enables disables speed continue E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID 0 Disable speed continue Enable U16 Selection i 1 Enable speed continue E Example U16 CardNo 0 U16 NodelD 1 SlotlD 0 U16 enable 1 116 status DMC 01 speed continue CardNo NodelD SlotID enable mein OTE XWhen you set DMC 01 speed continue parameter enable 1 all further motion commands must have StrVel parameter set to 0 in order to achieve the Speed Continue effect 41 2 Revised March 2012 Chapter 41 Speed Continue API PCI DMC A01 PCI DMC B01 41 2 DMC 01 speed continue mode H FORMAT 116 PASCAL DMC 01 speed continue mode U16 CardNo U16 NodelD U16 SlotID U16 mode E Purpose Sets Speed Continue mode H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID 0 Equivalent Acceleration mode Mode U16 Selection 1 Acceleration deceleration mode 2 Maximum velocity mode E Description Mode is 0 Assu
106. cy CCw Output Mode occ Duput Mode Joyce v Output Model C CO v eve S oft Limit az stailt llaz le sic en dz ei sep i a MM so UE MI PERE oo eL onf e Sci G2 Ba on Moo I Soft Limit Enable met oz mee ofl ore poi ore poi DriverErr DriverErr j i MEL ji DI2 i HEL E DI2 ORG E D01 ON ORG es D01 ON pozi 0 pozl DriverErr DriverErr N Limil IV AxisO P Arist I Axis2 Axis3 P Change V Change Stop Exit NewPos 5000 PCh New Vel 16000 sec 01 VCh 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 in Section 3 1 2 2 Set Servo Node ID and enable motion status display CardNurm 1 SlaveNum 1 NodelD Node 1 v Figure 3 105 Enter Node ID and check Timer checkbox to enable motion status display NodelD item API function s argument variable NodelD Timer Checkbox Check to display the motion status Uncheck to disable display Revised March 2012 3 77 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 78 3 Enter the values of the arguments for motion control Set vel prof Dist ance 10000 pls Str Vel 1000 pls Max Vel 3000 pls Abs S Curve Continue Figure 3 106 Dist item Set motion distance API function s argument
107. description of this function please refer to the section on Slave Information API Digital Input DI and Digital Output DO operation When you wish to perform DO operations you must use the ASD DMC RM32NT module and execute the following procedure Set the value of DO Port 0 rt DMC 01 set rm output value gDMCCardNo NodelD SlotID 0 output value 0 The Output value 0 variable will store the value to be output for bit O to bit 15 of Port 0 Set the value of DO Port 1 rt DMC 01 set rm output value gDMCCardNo NodelD SlotID 1 output value 1 Revised March 2012 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 The Output value 1 variable will store the value to be output for bit O to bit 15 of Port 1 Enable output rt DMC 01 set rm output active gDMCCardNo NodelD SlotID Enable This function must be enabled before the output value set above can be outputted from the output port If you wish to get the data you sent through the DO module on the DI side you must use the ASD DMC RM32MN module and execute the following procedure Get value of DI Port 0 rt DMC 01 get rm input value gDMCCardNo NodelD SlotID 0 Binput value 0 The Input value 0 value will return the data from bit 0 to bit 15 of Port 0 Get value of DI Port 1 rt DMC 01 get rm input value gDMCCardNo NodelD SlotID 1 amp input_value 1 The Input_value 1 value will return t
108. encryption algorithm to derive 128bit verify key H Parameters Name Data Type Unit Description OtherWordO0 U32 Number 32bit 0 user specified key OtherWord1 U32 Number 32bit 1 user specified key SyntekWord0O U32 Number 32bit 0 Serialno SyntekWord1 U32 Number 32bit 1 Serialno Baselo U32 nines een verify key generated by encryption function 32bit 1 ify k t ti Des a 032 KLAS i verify key generated by encryption function 32bit 2 ify k t ti PassWord U32 KIA i verify key generated by encryption function S2bit 3 ify k t ti a 032 TEEDE i verify key generated by encryption function m Example U32 OtherWord0 32bit U32 OtherWord1 32bit U32 SyntekWord0 32bit U32 SyntekWord1 32bit U32 Password0 U32 Password1 U32 Password2 U32 Password3 116 status misc security OtherWord0 OtherWord1 SyntekWord0 SyntekWord1 amp Password0 amp Password1 amp Password2 amp Password3 37 10 Revised March 2012 Chapter 37 Security API PCI DMC A01 PCI DMC B01 37 14 misc slave write verifykey H FORMAT 116 PASCAL misc slave write verifykey U16 CardNo U16 NodelD U16 SlotID U32 Verifykey E Purpose Writes verify key to Slave 04PIl E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Selection Node ID SlotID U16 Number Unit Slot ID Verifykey U32 Number Write verify key
109. ends Mode2 4 Deceleration Start Triggers when deceleration starts Mode2 5 Sdo Finish Function not available 6 DMC Cycle Start Triggers when DMC Cycle starts 7 RMO4PI FIFO Triggers when 04PI FIFO starts Mode1 8 User define Function not available 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 NodelD SlotID ON OFF ON OFF 0 Servo Power OFF 1 Servo Power ON Revised March 2012 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 gt or button to execute the following procedure rt DMC 01 start sa move gDMCCardNo NodelD SlotID Distance StrVel MaxVel acc dec Motion displacement using absolute coordinates with S curve velocity cross section rt DMC 01 start ta move gDMCCardNo NodelD SlotlD Distance StrVel MaxVel acc dec Motion displacement using absolute coordinates with T curve velocity cross section rt DMC 01 start sr move gDMCCardNo NodelD SlotlD Distance StrVel MaxVel acc dec Motion displacement using relative coordinates with S curve velocity cross section rt DMC 01 start tr move gDMCCardNo NodelD SlotlD Distance StrVel MaxVel acc dec Motion displacement using relative coordinates with T curve velocity cross
110. for bit 0 to bit 15 of Port 0 1 2 3 on digital output module ON OFF E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 Port 0 U16 Value 0 116 status DMC 01 get rm output value CardNo NodelD SlotID Port amp Value Revised March 2012 25 7 Chapter 25 Remote Module Control API PCI DMC A01 PCI DMC B01 25 7 DMC 01 get rm output value error handle E FORMAT 116 PASCAL DMC 01 get m output value error handle U16 CardNo U16 NodelD U16 SlotID U16 port U16 value E Purpose Retrieves output value of the remote I O module and determines whether to retain or discard the value if an error occurs H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID 0 Port 0 A 1 Port 1 port U16 Selection 2 Port 2 3 Port 3 Get value If value is 0 When an error occurs the error output value value U16 Selection will be reset to 0 1 When an error occurs retain the value until system is powered off E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 Port 0 U16 Value 0 116 status DMC 01 get rm output value error handle CardNo NodelD SlotID port amp Value 25 8 Revised March 2012 Chapter 25 Remote Module Control API PCI DMC A01 PCI DMC B01 25 8 DMC 01 set rm output active H FORMAT 116 PASCAL DMC 01 set rm output active U16 CardNo U16 NodelD U16 Slotl
111. gSlot2 arc3_cen_x arc3 cen y arc3 end x arc3 end y arc3 dir StrVel MaxVel acc dec Arc interpolation motion using relative coordinates under the T curve velocity cross section 7 Stop motion lt STOP gt Figure 3 53 Revised March 2012 3 35 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 NodelD SlotlD In this example emergency stop is used to stop motion This method guickly 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 8 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 3 36 Revised March 2012 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 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 1 Initial Card num O Slave num 2 PDO Helix operate O Timer Status 2 1 Set vel prof StrVel O pps MaxVel O pps Acc 0 sec 1
112. 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 Clicking on Write button in Fig 3 134 below executes the following procedure Write the data in the Write position to the Memory at the selected Page rt DMC 01 write security gDMCCardNo page ary 0 Checking the WriteEnable option in Fig 3 134 executes the following procedure Write the data in the Write position to the Memory at the selected Page rt DMC 01 write security status gDMCCardNo on off 2 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 Revised March 2012 3 99 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 27 Remote Analog Input Output Module 3 27 1 Function List 3 100 Table 3 27 DMC 01 rm 04da set output value DMC 01 rm 0O4da get output value DMC 01 rm 04da get return code DMC 01 rm 04da read data DMC 01 rm 04da set output range DMC 01 rm 0Odda set output enable DMC 01 rm 04da set output overrange DMC 01 rm 04da set output error clear DMC 01 rm 04da set output error handle DMC 01 rm Odda set output offset value DMC 01 rm 0dda get output offset value DMC 0
113. include inc VC PCL_DMC_01_Err h 2 Under the Visual C development environment select Project Setting Link Under Object Library modules input lib PCI_DMC_01 lib 3 Once set you can begin using the API to control PCI DMC A01 1 2 2 Using Borland C 1 Add the following command to your project include inc BCB PCI DMC 01 h include AincIBCBIPCI DMC 01 Err h Revised March 2012 1 1 Chapter 1 Introduction to the API Function Library PCI DMC A01 PCI DMC B01 2 Underthe Borland C Build development environment select View Project Manager Add the function library lib BCBPCIl_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 you will find PCI_DMC_01 bas and PCI DMC 01 Err bas Add these two files to your new project to use the API to control PCI DMC A01 1 2 4 Using Delphi Under the installation directory PCI DMC A01 inc Delphi you will find PCI DMC 01 pas Add this file to your new project to use the API to control PCI DMC A01 1 2 5 Using VB Net Under the installation directory PCI DMC A01 inc VB Net you will find PCI_DMC_01 vb and PCI DMC 01 ERR vb Add these two files to your new project to use the API to control PCI DMC A01 1 2 6 Using C In the installation directory PCI DMC A0
114. input range H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID is between 0 12 SlotID U16 Number Unit 0 ChannelNo U16 Number Unit Channel ID is between 0 3 Input value is 0 3 0 Input range 10V 10V Range U16 Number Unit 1 TE TN 2 Input range 5V 5V 3 Input range OV 5V E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 channelno 0 U16 range 1 Select Range 10 10V 116 status DMC 01 set 04ad input range CardNo NodelD SlotlD channelno range 30 2 Revised March 2012 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 H FORMAT 116 DMC 01 get 04ad input range U16 CardNo U16 NodelD U16 SlotID U16 channelno U16 range E Purpose Retrieves the current AD Input range H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID is between 0 63 SlotID U16 Number Unit 0 ChannelNo U16 Number Unit Channel ID is between 0 3 Get return parameter Value is 0 3 Number Definition A 0 Input range 10V 10V Range U16 Number Unit 1 TE 2 Input range 5V 5V 3 Input range OV 5V E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 channelno 1 U16 range 116 status DMC
115. level H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID polarity U16 Selection M Aa 1 Normal low E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 ON OFF 1 U16 polarity 0 Set as Normal high Enable POWER ON Servo ON 116 status DMC 01 0O4pi set poweron CardNo NodelD SlotID polarity When servo is Low active the polarity value of this function must be set to 0 Normal high status DMC 01 set rm 04pi svon polarity CardNo NodelD SlotlD polarity 27 4 Revised March 2012 Chapter 27 4 Channel Pulse Interface API PCI DMC A01 PCI DMC B01 27 4 DMC 01 set rm 04pi DO2 m FORMAT 116 PASCAL DMC 01 set rm Odpi DO2 U16 CardNo U16 NodelD U16 SlotID U16 ON OFF E Purpose Enables DO2 port configuration H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID 0 Disable DO2 port ON OFF U16 Selecti eechHon 4 Enable DO2 port mE Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 ON_OFF 1 Enable DO2 port 116 status _DMC_01_set_rm_04pi_DO2 CardNo NodelD SlotID ON OFF Revised March 2012 27 5 Chapter 27 4 Channel Pulse Interface API PCI DMC A01 PCI DMC B01 27 5 DMC 01 set rm Odpi ho
116. message H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 If Slot ID is set to 0 then the Slave is a servo drive 116 status DMC 01 set ralm CardNo NodelD SlotlD 33 2 Revised March 2012 Chapter 33 Alarm Message API PCI DMC A01 PCI DMC B01 33 2 DMC 01 get alm code H FORMAT 116 PASCAL DMC 01 get alm code U16 CardNo U16 NodelD U16 SlotID U32 alm code E Purpose Retrieves slave alarm code H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID alm_code U32 Number Unit Slave error code E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U32 alm_code Value of alm_code represents Slave error information Please refer to the server manual for details on server error codes 116 status DMC 01 get alm code CardNo NodelD SlotID amp alm_code Revised March 2012 33 3 Chapter 33 Alarm Message API PCI DMC A01 PCI DMC B01 33 3 DMC 01 master alm code H FORMAT 116 PASCAL DMC 01 master alm code U16 CardNo U16 alm code E Purpose Retrieves the Master Card connection alarm code H Parameters Name Data Type Unit Description CardNo U16 Numbe
117. motion Clockwise 1 Dir 116 Selection a ny Counterclockwise 0 Pulses per StrVel 132 i Starting velocity parameter second Pulses per MaxVel 132 gt Maximum velocity parameter second Tacc F64 Second Specified acceleration time Tdec F64 Second Specified deceleration time 22 4 Revised March 2012 Chapter 22 3 Axis Spiral Interpolation Motion Control API PCI DMC A01 PCI DMC B01 m Example U16 CardNo 0 U16 NodelDArray 3 1 2 3 U16 SlotlD 3 0 0 03 132 Center X 25000 Center Y 50000 Depth 10000 Pitch 20000 116 Dir 1 132 StrVel 0 MaxVel 50000 F64 Tacc 0 1 Tdec 0 1 116 status DMC 01 start sr heli xy CardNo NodelDArray SlotID Center X Center Y Depth Pitch Dir StrVel MaxVel Tacc Tdec Revised March 2012 22 5 Chapter 22 3 Axis Spiral Interpolation Motion Control API PCI DMC A01 PCI DMC B01 22 3 DMC 01 start ta heli xy E FORMAT 116 PASCAL DMC 01 start ta heli xy U16 CardNo U16 NodelD U16 SlotlD 132 Center X 132 Center Y 132 Depth 132 Pitch 116 Dir 132 StrVel 132 MaxVel F64 Tacc F64 Tdec E Purpose 3 axis Spiral interpolation motion using absolute coordinates with T curve velocity cross section E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 Holds Node ID sets used for spiral interpolation NodelDArray U16 Number Unit NodelDArray 0 Node 1 NodelDArr
118. motion control with linear interpolation in 2 or 3 axes Click on the gt or C 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 Linear interpolation motion using absolute coordinates with S curve velocity cross section rt DMC 01 start ta move xy gDMCCardNo gLine2 gSlot2 Distance Distance StrVel MaxVel acc dec Linear interpolation motion using absolute coordinates with T curve velocity cross section rt DMC 01 start sr move xy gDMCCardNo gLine2 gSlot2 Distance Distance StrVel MaxVel acc dec Linear interpolation motion using relative coordinates with S curve velocity cross section rt DMC 01 start tr move xy gDMCCardNo gLine2 gSlot2 Distance Distance StrVel MaxVel acc dec Linear interpolation motion using relative coordinates with T curve velocity cross section 3 axis linear interpolation rt DMC 01 start sa move xyz gDMCCardNo gLine3 gSlot3 Distance Distance Distance StrVel MaxVel acc dec Linear interpolation motion using absolute coordinates with S curve velocity cross section rt DMC 01 start ta move xyz gDMCCardNo gLine3 gSlot3 Distance Distance Distance StrVel MaxVel acc dec Linear interpolation motion using absolute coordinates with T curve velocity cross section rt DMC 01 start sr move xyz gDMCCardNo gLine3 g
119. point coordinates angle DMC 01 start v3 arc2 xy 2 axis arc interpolation motion with EndVel added Known conditions Endpoint coordinates angle 4 6 Revised March 2012 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 DMC 01 start tr move xyz 3 Axis Linear Interpolation Motion Control API 2 axis spiral motion with EndVel added Known conditions Center coordinates for X and Y axes endpoint coordinates for X and Y axes 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 coordinates with T curve velocity cross section DMC 01 start sa move xyz 3 axis Linear interpolation motion using absolute coordinates with S curve velocity cross section DMC 01 start v3 move xyz DMC 01 start tr heli xy 3 Axis Spiral Interpolation Motion Control API 3 axis linear interpolation motion with EndVel added 3 axis Spiral interpolation mot
120. point is PO X0 YO and end point is P1 X1 Y1 The path from PO to P1 forms an arc The maximum velocity is the tangential velocity Cent P1 Figure 3 47 3 10 2 Function List Table 3 10 DMC 01 start tr arc xy DMC 01 start sr arc xy DMC 01 start ta arc xy DMC 01 start sa arc xy DMC 01 start tr arc2 xy DMC 01 start sr arc2 xy DMC 01 start ta arc2 xy DMC 01 start sa arc2 xy DMC 01 start tr arc3 xy DMC 01 start sr arc3 xy DMC 01 start ta arc3 xy DMC 01 start sa arc3 xy Revised March 2012 3 31 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 10 3 Sample Application Program Appearance S PCI DMC M xi 1 Initial Card num O Slave num ARES 2 PDO ARC operate on Drm e 2 1 Set vel prof SPD EEA EE StrVel 0 pps Acc 0 sec IO Sts SSi CD MaxVel pF pps Dec pF sec Motion KS O tis O S Curve RESET 2 2 Arc mode G Awl Cm X 0 CenY 0 Angk 0 SYON lt STOP C Am2 Em X 0 EM Y 0 Angle 0 C Aw3 Cen X 0 Cen_Y 0 En X 0 Em Y 0 Dirf 0 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 in Section 3 1 2 2 Get Slot ID and enable motion status display 1 Initial 2 PDO ARC operate Card num 0 Sla
121. return start Software Translate data Driver 1 Home return complete 2 Clear position countet Figure 3 16 Revised March 2012 3 9 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 4 2 Function List Table 3 4 DMC 01 set home config DMC 01 set home move DMC 01 escape home move 3 4 3 Sample Application Program Appearance e PCI DMC x i A i Card num 1 Slave num 12 2 SDO Homing operate 2 1 Set node id Status NodeID Slot ID CMD EES pls 1 0 D Timer PBK ps 2 2 Set vel prof SPD pps 10 Sts sel 0 pps i Oa eee a RESET MaxVel 0 pps Acc O sec SYON Move STOP 2 3 Homing setting Mode i Offset 0 Exit 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 and Card initialization in Section 3 1 2 3 10 Revised March 2012 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 2 Enterthe values of the arguments for motion control x x m 2 1 Set node id NodelD Slot ID oO 0 Timer 2 2 Set vel prof Str el 0 pps MaxYel 0 pps Acc D sec Figure 3 18 NodelD item API function s argument variable NodelD Timer Checkbox Check to display the motion status Uncheck to disable display Vel item Number of pulses per second API fun
122. section 9 x Set Interrupt function to Normal Stop Interrupt After moving a set distance or pressing the Stop button halfway using the following API to read Int_Count will increase the value by 1 This is shown above in Figure 3 128 Normal Stop Counter rt DMC 01 get int counter gDMCCardNo NodelD 8lnt Count 10 Stop motion Click on the STOP button to execute slow down stop for current point to point motion rt DMC 01 sd stop gDMCCardNo NodelD 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 For a detailed description of Stop motion please refer to Chapter 14 Stop Motion API 11 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 Revised March 2012 3 93 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 26 MasterCard Security 3 94 3 26 1 Function List Table 3 26 _DMC_01_check_userpassword _DMC_01_write_userpassword _DMC_01_read_serialno DMC 01 write verifykey DMC 01 check verifykey DMC 01 read security DMC 01 read security status DMC 01 write security DMC 01 write security status misc security Revised March 2012 Chapt
123. security status m FORMAT 116 PASCAL DMC 01 write security status U16 CardNo U16 status E Purpose Before the Master Card writes security data writes function enable to memory H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 Write function enable 0 disable 1 enable to status U16 Flag memory E Example U16 CardNo 0 U16 status 1 116 status DMC 01 write security status CardNo status Revised March 2012 37 3 Chapter 37 Security API PCI DMC A01 PCI DMC B01 37 5 DMC 01 check userpassword E FORMAT 116 PASCAL DMC 01 check userpassword U16 CardNo U32 password data U16 password state E Purpose Before reading writing data on the Master Card checks that user has permission to read write to memory H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 Password data U32 Number Enter password to check Password state U16 Flag Response after password check 0 gt Fail 1 gt OK E Example U16 CardNo 0 U32 Password data 64bit data U16 Password state 116 status DMC 01 check userpassword CardNo Password data Password state 37 6 DMC 01 write userpassword E FORMAT 116 PASCAL DMC 01 write userpassword U16 CardNo U32 password data E Purpose Master Card Changes user password H Parameters Name Data Type Unit Description CardNo U16 Number Un
124. server E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 servo DI 116 status DMC 01 get servo DI CardNo NodelD SlotID 8servo DI Revised March 2012 32 7 Chapter 32 Parameter Monitoring API PCI DMC A01 PCI DMC B01 32 5 DMC 01 get servo DO m FORMAT 116 PASCAL DMC 01 get servo DO U16 CardNo U16 NodelD U16 SlotID U16 servo DO E Purpose Retrieves server DO message value E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID servo_DO U16 Number Value of signals DO1 DOS on server E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 servo_DO 116 status DMC 01 get servo DO CardNo NodelD SlotID amp servo_DO 32 8 Revised March 2012 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 33 1 Chapter 33 Alarm Message API PCI DMC A01 PCI DMC B01 33 1 DMC 01 set ralm E FORMAT 116 PASCAL DMC 01 set ralm U16 CardNo U16 NodelD U16 SlotID E Purpose Resets output servo drive alarm
125. status DMC 01 set velocity mode CardNo NodelD SlotID Tacc Tdec 11 2 Revised March 2012 Chapter 11 Velocity Motion Control Packet Protocol API PCI DMC A01 PCI DMC B01 11 2 DMC 01 set velocity E FORMAT 116 PASCAL DMC 01 set velocity U16 CardNo U16 NodelD U16 SlotID 132 rpm E Purpose Starts velocity motion control H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID rpm 132 Number Actual torque is 1 10 of this variable RPM E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 132 rpm 1000 In this case motion is counterclockwise so actual value of torque is 1000 10 gt 100RPM 116 status DMC 01 set velocity CardNo NodelD SlotID rpm Revised March 2012 11 3 Chapter 11 Velocity Motion Control Packet Protocol API PCI DMC A01 PCI DMC B01 11 3 DMC 01 set velocity stop m FORMAT 116 PASCAL DMC 01 set velocity stop U16 CardNo U16 NodelD U16 SlotID U16 stop E Purpose Stops velocity motion control E Parameters NET Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID 0 Maintain current velocity motion status stop U16 Selection i i 1 Stop velocity motion H Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 stop 1 116
126. the endpoint s XY coordinates and the corresponding angle you can use these to calculate the XY coordinates of the center point Clicking on Calc then executes the following procedure Get the X and Y values for the center point coordinates rt _misc_app_get_circle_center_point Start_X Start_Y End X End Y Angle amp Center_X amp Center_Y The results calculated by executing procedure or procedure is displayed in block 9 3 88 Revised March 2012 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 reguired for arc interpolation as shown in Fig 390 select the arc interpolation motion you wish to use For a detailed description of arc interpolation please refer to 2 axis Arc Interpolation Motion Control API 2 2 Set vel prof StrVel pps Ari Cen X il op Eod Acc 01 see Dec m Do S O Abs O 8 Cuve Eod X Figure 3 121 Revised March 2012 Cen_Y E 0 Angle l 0 0 Angle 0 End_Y Cen Y End Y 0 0 Dir 0 3 89 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 25 Control Interrupt 3 25 1 Function List Table 3 26 DMC 01 int enable DMC 01 int disable DMC 01 set int factor DMC 01 get int count 3 25 2 Sample Application Program
127. time used for homing X The unit of lowSpeed and highSpeed parameters will vary depending on the connected Slave module Servo Drive ASDA A2F gt Revolutions per minute Pulse interface module RMO4PI GEO1PI GEO1PH gt Pulse Sec Linear motor gt um sec m Example U16 CardNo 0 NodelD 1 SlotID 0 Mode 1 132 offset 200 U16 lowSpeed 200 highSpeed 2000 F64 acc 0 1 Use Homing mode 116 status _DMC_01_set_home_config CardNo NodelD SlotlD Mode offset lowSpeed highSpeed acc 10 2 Revised March 2012 Chapter 10 Homing Motion Control Packet Protocol API PCI DMC A01 PCI DMC B01 AE 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 Index Puise Negative Limit Switch 1 Figure 10 1 2 Homing mode using positive limit and index pulse message Using this method if the positive limit switch is disabled low voltage level then it will begin by moving right The home position is the index pulse offset to the left when it touches the negative limit switch Index Puise Positive Limit Switch Figure 10 2 Revised March 2012 10 3 Chapter 10 Homing Motion Control Packet Protocol API PCI DMC A01 PCI DMC B01 3 and 4 Homing using p
128. to memory E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U32 Verifykey 128bit data 116 status misc slave write verifykey CardNo NodelD SlotID Verifykey Revised March 2012 37 11 Chapter 37 Security API PCI DMC A01 PCI DMC B01 37 15 misc slave check verifykey H FORMAT 116 PASCAL misc slave check verifykey U16 CardNo U16 NodelD U16 SlotID U32 Verifykey U16 Lock state E Purpose Checks verify key against Slave 04PI E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Selection Node ID SlotID U16 Number Unit Slot ID Verifykey U32 Number Verify key to check Response after verify key check Lock_state U16 Flag 0 LOCK 1 PASS E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U32 Verifykey 128bit data U16 Lock_state 116 status _misc_slave_check_verifykey CardNo NodelD SlotID Verifykey amp Lock_state 37 12 Revised March 2012 Chapter 37 Security API PCI DMC A01 PCI DMC B01 37 16 misc slave user data buffer read H FORMAT 116 PASCAL misc slave user data buffer read U16 CardNo U16 NodelD U16 SlotID U16 Address U32 Data E Purpose Reads data from memory specified by Slave 04PI H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Selection Node ID SlotID U16 Number Unit Slot I
129. used for arc interpolation NodelDArray U16 Number Unit NodelDArray 0 holds the 1st set of Node ID NodelDArray 1 holds the 2nd set of Node ID SlotID U16 Number Unit Slot ID EER 132 Number of Reale center point X coordinate on the i pulses specified axis Cate Y 132 Number of Relalive center point Y coordinate on the pulses specified axis Number of Relative endpoint X coordinate on the specified End x 132 fd pulses axis Number of Relative endpoint Y coordinate on the specified End y 132 pulses axis j Specified direction Clockwise if value is 1 Dir 116 Selection CCW if value is 0 Pulses per StrVel 132 E Starting velocity parameter second Pulses per MaxVel 132 p Tangential velocity parameter second Tacc F64 Second Specified acceleration time Tdec F64 Second Specified deceleration time Revised March 2012 20 19 Chapter 20 2 Axis Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 m Description End X End Y ku Dir 0 gt CenterX Center Y Specified End Position I g l Center X Center Y Recent Position Actual End Position I f n va j P N F ie M Put N 4 N gt 4 0 Dir 1 Actual End Position Specified End Position Actual End Position lt gt Specified End Position Radius Recent Position To Center Figure 20 3 m Example U16 CardNo 0 U16 NodelDArray 2 1 2 U16 SlotID 2 0 0 132 Center X 25000 132 Center Y 25000 13
130. value of enable argument is 1 debug is enabled 3 Enter the path of the record file and select output method for record 1 2 Debug Log Debug Enable CAlog_output txt C Output to dbg Figure 3 167 If you wish to view the log record generated by motion control you must execute the following procedure rt misc open record debuging file file name open file name is a character array variable used for storing the file path of the debug record The open variable is used to decide whether the debug record should be output to the document at the file path you selected When open has a value of 1 the debug record will be output and stored in the document at your selected file path If the value is 0 then the record will only appear in the debug window of Visual Studio 6 s development environment Revised March 2012 3 131 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 Figure 3 168 E log_output txt 51KB ZEN 2010 1 27 F 05 22 P log_output txt MBA 20 GEO KAO RRAV RAY _DHC_01_get_current_speed CardNo 15 6 NodeID
131. variable Distance 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 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 Continue checkbox Check if you wish to use the Continue motion mode Select motion mode and set motion distance Reset Reset Reset Reset i A Power On 5 h Power On i i Power On i Power On t Ralm L Ralm Ralm Ralm Output Mode Cuy CCw v Output Mode e CCw w Ouput Mode acc v Output Mode CuCC v Figure 3 107 Power On checkbox Click Power On to turn on power to that axis H L Checkbox Select active voltage level Output Mode item Output phase is either ABphase or CW CCW Ralm item Resets alarm error codes produced during operation Reset item Reset Command and feedback data Revised March 2012 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 5 Set Home motion mode and offset Home Mode Offset 1 0 Home Figure 3 108 Mode item Select Home motion mode API function s argument variable home_mode Offset item Set Home mot
132. with T curve velocity cross section 116 status DMC 01 multi axes move CardNo AxisNum NodelD SlotID DistArrary StrVel MaxVel Tacc Tdec m_curve m_r_a Revised March 2012 34 3 Chapter 34 Multi Axis Motion Control API PCI DMC A01 PCI DMC B01 34 2 DMC 01 liner speed master E FORMAT 116 PASCAL DMC 01 liner speed master U16 CardNo U16 AxisNum U16 NodelD U16 SlotID 132 DistArrary 132 StrVel 132 MaxVel F64 Tacc F64 Tdec U16 m curve U16 m r a E 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 velocities for other axes will be automatically calculated based on the value of the Master axis E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID 0 Velocity Default setting Mode U16 Selection 1 Maximum component velocity for axis with longest travel m Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 Mode 1 116 status DMC 01 liner speed master CardNo NodelD SlotID Mode 34 4 Revised March 2012 Chapter 34 Multi Axis Motion Control API PCI DMC A01 PCI DMC B01 34 3 DMC 01 start v3 multi axes H FORMAT 116 PASCAL DMC
133. 0 116 ratio 50 If ratio is 50 then 50 divided by 1000 means rated torgue is 5 and motor is running CCW Set ratio and begin torque motion 116 status DMC 01 set torgue CardNo NodelD SlotID ratio lf value of ratio is less than 0 then motor is running CCW If value is greater than 0 motor is running clockwise Revised March 2012 12 3 Chapter 12 Torque Motion Control Packet Protocol API PCI DMC A01 PCI DMC B01 12 3 DMC 01 set torgue stop H FORMAT 116 PASCAL DMC 01 set torgue stop U16 CardNo U16 NodelD U16 SlotID U16 stop E Purpose Stops torgue motion H Parameters NES DEC MAY els Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID 0 Current motion status stop U16 Selection i 1 Stop torgue motion E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 stop 1 116 ratio 100 If value of ratio is 100 then 100 divided by 1000 means rated torgue is 10 and motor is running clockwise Set ratio and begin torque motion 116 status DMC 01 set torgue CardNo NodelD SlotlD ratio Stop torque motion status DMC 01 set torgue stop CardNo NodelD SlotID stop 12 4 Revised March 2012 Chapter 12 Torque Motion Control Packet Protocol API PCI DMC A01 PCI DMC B01 12 4 DMC 01 set torgue velocity limit E FORMAT 116 PASCAL DMC 01 set torgue velocity limit U16 Car
134. 0 5v v CECE CCPC PECs 0 50 100 Figure 3 136 Channel item Enter the ID of the DA Channel to be used 0 3 Mode item Select DA display range API function s argument variable mode Appro item Show approximate voltage or current based on the selected display range and lever position Read item Display actual output voltage or current Apply item Click on Apply button converts estimated current or voltage from Appro to actual output DA Data Choice Data Choice Error Handle OffSet 0 Set Offset P OverRange An Code OA Clear Error Figure 3 137 Error Handle item Check this item to keep previous status when re executing this program Over Range item Check this item to increase voltage or current output by 10 Set Offset item Set DA offset ClearError item Clear the Error status indicated by Rtn Code Revised March 2012 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 4 Select AD Conversion Time mode Conversion Timel 3 dB 2 1040 v He Figure 3 138 Conversion Time item Select Conversion Time mode 5 Select AD Channel Display mode Average data r Select Mode Data Select Channel fo Channel 0 Mode 3 0 5V kd Average 0 No avg Data 29702 V Figure 3 139 Channel item Select Channel for AD enable input Mode item Select AD display range Average item Select wave display calculation frequency Data item
135. 0 Sts Dec 0 sec Motion Cenk 0 RESET Cen_ 0 Depth pF OO Pitch 0 Dir o O Abs O S Curve KES E Figure 3 54 Revised March 2012 3 37 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 38 1 Card initialization 2 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 Get Slot ID and enable motion status display O Timer Status CMD FBK SPD 108ts Motion Figure 3 55 Check the Timer checkbox to enable motion status display Timer Checkbox Check to display the motion status Uncheck to disable display Below motion status is the RESET button Click on the RESET button to execute the reset command If you wish to reset the command and feedback counters you must first set drive motor to servo off if gbIsSVON rt DMC 01 ipo set svon gDMCCardNo NodelD SlotID 0 The motion counters can only be cleared when the motor is confirmed to be servo off rt DMC 01 set command gDMCCardNo NodelD SlotID 0 Clear command rt DMC 01 set position gDMCCardNo NodelD SlotID 0 Clear feedback Once the command and feedback counters are cleared set drive motors to servo on again if gbIsSVON rt DMC 01 ipo set svon gDMCCardNo NodelD SlotID 1
136. 01 get 04ad input range CardNo NodelD SlotID channelno amp range Revised March 2012 30 3 Chapter 30 4 Channel Analog Input Remote I O Module API PCI DMC A01 PCI DMC B01 30 3 DMC 01 set 0dad zero scale H FORMAT 116 DMC 01 set 04ad zero scale U16 CardNo U16 NodelD U16 SlotID U16 channelno E Purpose Sets AD zero level for range calibration E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID is between 0 63 SlotID U16 Number Unit 0 ChannelNo U16 Number Unit Channel ID is between 0 3 E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 channelno 2 116 status DMC 01 set 04ad zero scale CardNo NodelD SlotlD channelno 30 4 Revised March 2012 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 E FORMAT 116 DMC 01 get 04ad zero scale status U16 CardNo U16 NodelD U16 SlotID U16 channelno U16 status E Purpose Checks if AD zero calibration is complete H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID is between 0 63 SlotID U16 Number Unit 0 ChannelNo U16 Number Unit Channel ID is between 0 3 2 0 Zero calibration completed Status U16 Selection ase 1 Zero calibration not completed E Examp
137. 012 Chapter 14 Stop Motion Control API PCI DMC A01 PCI DMC B01 14 4 DMC 01 set sd mode H FORMAT 116 PASCAL DMC 01 set sd mode U16 CardNo U16 NodelD U16 SlotID U16 mode E Purpose Sets the Sd stop slow down stop mode H Parameters AEG Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID 0 position and command have the same value Mode U16 Selection Cae 1 value of position may be greater than command M Description Vipps When slow down command is issued at B start deceleration time stop Stop when Position Command Figure 14 1 Sd Mode instructions Mode 0 Acc Time Dec Time Vipps When slow down command is issued at B start deceleration time stop Stop when Position gt Figure 14 2 Sd Mode instructions Mode 1 Acc Time Revised March 2012 14 5 Chapter 14 Stop Motion Control API PCI DMC A01 PCI DMC B01 m Example U16 CardNo 0 U16 NodelD 1 SlotlD 0 U16 Mode 1 F64 Tdec 0 1 116 status DMC 01 set sd mode CardNo NodelD SlotID Mode 14 6 Revised March 2012 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 R
138. 012 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 _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 coordinates with T curve velocity cross section _DMC_01_start_sa_move_xyz 3 axis Linear interpolation motion using absolute coordinates with S curve velocity cross section _DMC_01_start_v3_move_xyz 3 axis linear interpolation motion with EndVel added Revised March 2012 21 1 Chapter 21 3 Axis Linear Interpolation Motion Control API PCI DMC A01 PCI DMC B01 21 1 DMC 01 start tr move xyz E FORMAT 116 PASCAL DMC 01 start tr move xyz U16 CardNo U16 NodelD U16 SlotID 132 DisX 132 DisY 132 DisZ 132 StrVel 132 MaxVel F64 Tacc F64 Tdec E Purpose 3 axis linear interpolation motion using relative coordinates with T curve velocity cross section E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 Holds Node ID sets used for linear interpolation NodelDArray U16 Number Unit NodelDArray 0 Node 1 NodelDArray 1 Node 2 NodelDArray 2 Node 3 Slo
139. 1 18 13 DMC 01 start ta move 2seg2 E FORMAT 116 PASCAL DMC 01 start ta move 2seg2 U16 CardNo U16 NodelD U16 SlotlD 132 Dist 132 Dist2 132 StrVel 132 MaxVel 132 MaxVel2 F64 Tacc F64 Tsec F64 Tdec E Purpose 2nd motion displacement using absolute coordinates with T curve velocity cross section gt lt Motion Buffer will be cleared before this function is executed H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID Number of Dist 132 Absolute coordinates for first segment pulses i Number of l Dist2 132 Absolute coordinates for second segment pulses Pulses per StrVel 132 5 Starting velocity second Pulses per i MaxVel 132 Maximum velocity for first segment second Pulses per A MaxVel2 132 Maximum velocity for second segment second Tacc F64 Second Specified acceleration time Acceleration deceleration time when switching Tsec F64 Second from first segment to second segment Tdec F64 Second Deceleration time m Example U16 CardNo 0 NodelD 1 SlotID 0 132 Dist 500000 Dist2 500000 132 StrVel 1000 132 MaxVel 10000 MaxVel2 30000 F64 Tacc 0 1 F64 Tsec 0 1 F64 Tdec 0 1 116 status DMC 01 start ta move 2seg2 CardNo NodelD SlotID Dist Dist2 StrVel MaxVel MaxVel2 Tacc Tsec Tdec Revised March 2012 18 17 Chapter 18 1 Axis Motion Co
140. 1 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 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 6 Velocity Motion Control 1 3 6 1 Function List Table 3 6 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 fe PO DMC xj Card num 1 Slave num 12 2 SDO Mode operate 2 1 Set node id Status NodeID Slot ID CMD mE pls l 0 J Timer FBK SCO 2 2 Set vel prof pai 10 pm Tace 0 1 Tdec 0 1 Je RESET Motion AORPM SYON co STOP gt Exit 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 and Card initialization in Section 3 1 2 2 Set Servo Node ID and enable motion status display NodelD Slot ID 1 0 F Timer Figure 3 26 lu i 3 16 Revised March 2012 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 Input Node ID and check the Timer checkbox to enable motion status display NodelD item API function s argument vari
141. 1 m Example U16 CardNo 0 U16 NodelD 2 1 2 U16 SlotlD 2 0 0 132 center x 25000 center y 25000 132 end x 25000 end y 25000 U16 dir 1 circelnum 5 132 StrVel 0 MaxVel 50000 F64 Tacc 0 1 Tdec 0 1 U16 m curve 1 U16 m_r_a 0 116 status DMC 01 start spiral2 xy CardNo NodelD SlotID center x center_y end x end y dir circelnuml StrVel MaxVel Tacc Tdec m curve m r a 20 30 Revised March 2012 20 15 DMC 01 start v3 arc xy E FORMAT Chapter 20 2 Axis Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 116 PASCAL DMC 01 start v3 arc xy U16 CardNo U16 NodelD U16 SlotID 132 Center X 132 Center Y F64 Angle 132 StrVel 132ConstVel 132 EndVel F64 TPhase1 F64 TPhase2 U16 m curve U16m r a E Purpose 2 axis arc interpolation motion with EndVel added Known conditions center point coordinates angle Values of StrVel and EndVel can be greater than MaxVel H Parameters Name Data Type Unit Description Node ID of card used for motion displacement CardNo U16 Number Unit a ee ee along X axis and Y axis Holds Node ID sets used for arc interpolation NodelDArray U16 Number Unit NodelDArray 0 holds the 1st set of Node ID NodelDArray 1 holds the 2nd set of Node ID SlotID U16 Number Unit Slot ID Genti X 132 Number of AD oug center point X coordinate on the pulses specified axis eie 132 Number of Absolute conter point Y coordinate on the a pulse
142. 1 get position gDMCCardNo NodelD SlotID amp pos Get value of feedback counter Motion status rt DMC 01 get current speed gDMCCardNo NodelD SlotID amp speed Get velocity of current motion rt DMC 01 motion status gDMCCardNo NodelD SlotlD 8MC status Get current status rt DMC 01 motion done gDMCCardNo NodelD SlotID 8MC done Get current motor status 8 x Stop motion g STOP Figure 3 39 Hit the STOP button to execute an emergency stop rt DMC_01_emg_stop gDMCCardNo NodelD SlotID In this example emergency stop is used to stop motion This method guickly 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 9 lt 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 25 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 9 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 2 axis l
143. 1 inc C you will find PCI DMC 01 css and PCI DMC 01 ERR cs Add these two files to your new project to use the API to control PCI DMC A01 Revised March 2012 Chapter 2 Command Return Values and Messages PCI DMC A01 PCI DMC B01 Chapter 2 Command Return Values and Messages 2 1 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 If the API function returns some other error code then an error may have occurred during operation or in the hardware connection You can troubleshoot the problem by referring to the error code description Table 2 1 Error Return Code Error Code Error Description Decimal 0 ERR_NoError API executed successfully Card number error Please check the number set 3 ERR CardNoError E by the DIP Switch on the card 5 ERR bootmodeErr Unable to boot DSP procedure 6 ERR downloadcode DSP memory program read write error 7 ERR downloadinit DSP memory data read write error DM 1 pci initial AP functi g ERR PCI boot first DMC 0 Spania unction must be al hai launched first 11 ERR_AxisNoError Axis number error too large 12 ERR_IPO_First Must be in IPO mode 13 ERR_Target_reach Target must be in position for Mode 1 operation 14 ERR_Servo_on_first Must be set to Servo on Unable to
144. 1 rm Odpi md1 start arc3 DMC 01 rm 04pi md1 start heli DMC 01 rm 0O4pi md1 p change DMC 01 rm 0O4pi md1 v change DMC 01 rm 0O4pi md1 set gear Revised March 2012 28 1 Chapter 28 4 Channel Pulse Interface Mode 1 Motion Control API PCI DMC A01 PCI DMC B01 DMC 01 m Odpi mei set soft limit Enable disable software limit under RMO4PI Mode 1 Get current 4 axis software limit contact status under RM04PI Mode 1 DMC 01 rm Odpi md1 set sid Enable SLD port DI3 and set profile When alarm code is 299 get motion control error message under RMO4PI Mode 1 DMC 01 set rm Od4pi ref counter Select reference counter for re connection under RMO4PI Mode 1 DMC 01 rm Od4pi md1 get soft limit status DMC 01 rm Odpi md1 get mc error code 28 2 Revised March 2012 Chapter 28 4 Channel Pulse Interface Mode 1 Motion Control API PCI DMC A01 PCI DMC B01 28 1 DMC 01 rm 0O4pi md1 start move H FORMAT 116 PASCAL DMC 01 rm 0O4pi md1 start move U16 CardNo U16 NodelD U16 SlotID 132 Dist 132 StrVel 132 MaxVel F64 Tacc F64 Tdec U16 m_curve U16 m r a E Purpose Performs 1 axis motion control under RMO4PI Mode 1 When setting StrVel make sure its value is smaller than MaxVel H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID Numb
145. 1 set 04ad input range DMC 01 get 04ad input range DMC 01 set 04ad zero scale DMC 01 get 04ad zero scale DMC 01 set 04ad full scale DMC 01 get 04ad full scale DMC 01 set 04ad conversion time DMC 01 get 04ad conversion time DMC 01 get 04da data DMC 01 set 04ad average mode DMC 01 get 04ad average mode DMC 01 set 04ad input enable Revised March 2012 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 27 2 Sample Application Program Appearance Open Card Card Num 1 DA NodelD AD NodelD RMO4DA Channel 0 Satus Appro 29731 y Read 23731 y Channel fo Channel 0 Mode 0 0 5v 0 50 100 Data Choice J Eror Handle OffSet 0 Set Offset M Over Range Rtn Code 0 8 Clear Error RMO44D Channel 0 Satus Conversion Time 3 dB Select Channel 2 1040 v He 0 Channel 0 Zero ees Full 3 0757 Average JO No ava x Data 2 9702 Exit Figure 3 135 Revised March 2012 3 101 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 1 2 3 3 102 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 DA Channel and display mode selection Appro 2 9731 Yy Read 29731 Channel fo Channel 0 Mode 0
146. 12 40 5 Chapter 40 Linear and Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 40 3 DMC 01 start v3 rline xy E FORMAT 116 PASCAL DMC 01 start v3 rline xy U16 CardNo U16 NodelD U16 SlotID I32 pos1 x 132 pos1 y 132 pos2 x 132 pos2_y U16 mode F64 param 132 StrVel I32 ConstVel 132 EndVel F64 TPhase1 F64 TPhase2 U16 m curve U16 m r a E Purpose 2 axis linear arc interpolation motion control with added EndVel Values of StrVel and EndVel can be greater than MaxVel H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID Pos1 x 132 Number Unit X coordinate of first position Pos1 y 132 Number Unit Y coordinate of first position Pos2 x 132 Number Unit X coordinate of second position Pos2 y 132 Number Unit Y coordinate of second position 0 Perpendicular distance from arc to right angle A gt B Mode U16 Selection 1 Perpendicular distance from start of arc to right angle A gt B 2 Arc radius A gt B Param F64 Number Unit Relative mode distance StrVel 132 Saund Starting velocity second ConstVel 132 Aa ai Constant velocity second EndVel 132 Bee ad second TPhase1 F64 Second Time from StartVel to ConstVel TPhase2 F64 Second Time from ConstVel to EndVel m curve U16 Selection ks 2 S curve a U16 ED 0 Relative monon aep emeni 1 Absolute motion disp
147. 16 Number Unit Channel ID is between 0 3 A 0 Zero calibration completed Status U16 Selection Ea 1 Zero calibration not completed E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 channelno U16 status 116 status DMC 01 get 04ad full scale status CardNo NodelD SlotID channelno 0 amp status Revised March 2012 30 7 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 E FORMAT 116 DMC 01 set 04ad conversion time U16 CardNo U16 NodelD U16 SlotID U16 mode E Purpose Sets AD conversion time H Parameters Name vale Unit Description Type CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID is 0 12 SlotID U16 Number Unit 0 Input value is 0 6 Output 3 dB i RMS noise Number frequency frequency Hz Hz a 0 372 200 9 6 Mode U16 Selection 1 1001 920 15 5 2 2005 1040 22 7 3 2534 1300 26 1 4 4826 2500 39 2 5 6041 3100 46 0 6 12166 6300 120 0 H Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 mode 1 116 status _DMC_01_set_04ad_conversion_time CardNo NodelD SlotID mode 30 8 Revised March 2012 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 E FORMAT 116 DMC 01 get 04ad conversion time U16 CardNo U16
148. 2 StrVel 0 132 MaxVel 50000 132 End x 50000 132 End y 50000 116 Dir 1 This value is 1 indicating a clockwise arc interpolation F64 Tacc 0 1 F64 Tdec 0 1 116 status DMC 01 start tr arc3 xy CardNo NodelDArray SlotID Center X Center Y End x End y Dir StrVel MaxVel Tacc Tdec 20 20 Revised March 2012 Chapter 20 2 Axis Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 20 10 DMC 01 start sr arc3 xy E FORMAT 116 PASCAL DMC 01 start sr arc3 xy U16 CardNo U16 NodelD U16 SlotID 132 Center X 132 Center Y 132 End X 132 End Y 116 Dir 132 StrVel 132 MaxVel F64 Tacc F64 Tdec E Purpose 2 axis arc interpolation motion using relative coordinates with S curve velocity cross section Known conditions center point coordinates endpoint coordinates E Parameters Name Data Type Unit Description A Node ID of card used for motion displacement CardNo U16 Number Unit i i along X axis and Y axis Holds Node ID sets used for arc interpolation NodelDArray U16 Number Unit NodelDArray 0 holds the 1st set of Node ID NodelDArray 1 holds the 2nd set of Node ID SlotID U16 Number Unit Slot ID Relative center point X coordinate on the Center_X 132 Number of pulses Pa A specified axis Relative center point Y coordinate on the Center Y 132 Number of pulses a i specified axis Relative endpoint X coordinate on the specified End x 132 Number of pulses axis Re
149. 2 axis arc interpolation motion using absolute coordinates with T curve velocity cross section Known conditions Endpoint coordinates angle DMC 01 start sa arc2 xy 2 axis arc interpolation motion using absolute coordinates with S curve velocity cross section Known conditions Endpoint coordinates angle 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 DMC 01 start ta arc3 xy 2 axis arc interpolation motion using absolute coordinates with T curve velocity cross section Known conditions Center point coordinates endpoint coordinates DMC 01 start sa arc3 xy 2 axis arc interpolation motion using absolute coordinates with S curve velocity cross section Known conditions Center point coordinates endpoint coordinates DMC 01 start spiral xy 2 axis spiral motion Known conditions Center coordinates for X and Y axes DMC 01 start spiral2 xy 2 axis spiral motion Known conditions Center coordinates for X and Y axes endpoint coordinates for X and Y axes DMC 01 start v3 arc xy 2 axis arc interpolation motion with EndVel added Known conditions Center
150. 20 24 Revised March 2012 Chapter 20 2 Axis Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 20 12 DMC 01 start sa arc3 xy H FORMAT 116 PASCAL DMC 01 start sa arc3 xy U16 CardNo U16 NodelD U16 SlotID 132 Center X 132 Center Y 132 End X 132 End Y 116 Dir 132 StrVel 132 MaxVel F64 Tacc F64 Tdec E Purpose 2 axis arc interpolation motion using absolute coordinates with S curve velocity cross section Known conditions center point coordinates endpoint coordinates E Parameters Name Data Type Unit Description Node ID of card used for motion displacement CardNo U16 Number Unit ne AA ee roe along X axis and Y axis Holds Node ID sets used for arc interpolation NodelDArray U16 Number Unit NodelDArray 0 holds the 1st set of Node ID NodelDArray 1 holds the 2nd set of Node ID SlotID U16 Number Unit Slot ID Absolute center point X coordinate on the Center_X 132 Number of pulses eal a specified axis Absolute center point Y coordinate on the Center_Y 132 Number of pulses T l p specified axis Absolute endpoint X coordinate on the End x 132 Number of pulses ah E E specified axis Absolute endpoint Y coordinate on the End y 132 Number of pulses DA i 4 specified axis j Specified direction Clockwise if value is 1 Dir 116 Selection CCW if value is 0 Pulses per StrVel 132 E Starting velocity parameter second Pulses per MaxVel 132 i Tangential velocity pa
151. 2012 Chapter 20 2 Axis Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 20 1 DMC 01 start tr arc xy E FORMAT 116 PASCAL DMC 01 start tr arc xy U16 CardNo U16 NodelD U16 SlotID 132 Center X 132 Center Y F64 Angle 132 StrVel 132 MaxVel F64 Tacc F64 Tdec E Purpose 2 axis arc interpolation motion using relative coordinates with T curve velocity cross section Known conditions center point coordinates angle H Parameters Name Data Type Unit Description Node ID of card used for motion displ t CardNo U16 Number Unit Raa aaa ec along X axis and Y axis Holds Node ID sets used for arc interpolation NodelDArray U16 Number Unit NodelDArray 0 holds the 1st set of Node ID NodelDArray 1 holds the 2nd set of Node ID SlotID U16 Number Unit Slot ID EA 132 Number of als cemer point X coordinate on the pulses specified axis GS 132 Number of Rolava center point Y coordinate on the pulses specified axis Angle F64 Degree Set arc angle One full arc is 360 Pulses per StrVel 132 x Starting velocity parameter second Pulses per MaxVel 132 Tangential velocity parameter second Tacc F64 Second Specified acceleration time Tdec F64 Second Specified deceleration time Revised March 2012 20 3 Chapter 20 2 Axis Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 m Description Center X Center Y Figure 20 1 m Example U16 CardNo 0 U16
152. 2012 8 5 Chapter 8 Using SDO Protocol API PCI DMC A01 PCI DMC B01 8 2 DMC 01 check canopen lock E FORMAT 116 PASCAL DMC 01 check canopen lock U16 CardNo U16 lock E Purpose Checks to see ifthe next command can be executed under SDO mode E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 0 Not locked Can execute next command lock U16 Selection 1 Locked must wait for current execution to finishing executing H Example U16 CardNo 0 U16 lock 116 status _DMC_01_check_canopen_lock CardNo amp lock 8 6 Revised March 2012 Chapter 8 Using SDO Protocol API PCI DMC A01 PCI DMC B01 8 3 DMC 01 get canopen ret m FORMAT 116 PASCAL _DMC_01_get_canopen_ret U16 CardNo U16 COBID U8 value E Purpose Retrieves data returned by CANOPEN SDO related data H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 COBID U16 Number CAN object ID Data contained within object Value 0 SDO Message response If content is 32 bit long value is 43 If content is 16 bit long value is 4b If content is 8 bit long value is 4f Write successful value is 60 Error report value is 80 Mane a Mamee eifo ides Low byl Value 2 Index High byte Value 3 Sub index Value 4 Data low word Low byte Value 5 Data low word High byte Value 6 Data high word Low byte Value
153. 25 Remote Module Control API PCI DMC A01 PCI DMC B01 25 5 DMC 01 set rm output value error handle E FORMAT 116 PASCAL DMC 01 set rm output value error handle U16 CardNo U16 NodelD U16 SlotID U16 port U16 value E Purpose Sets the output value returned when remote I O module encounters an error E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID 0 Port 0 port U16 Selection coon 2 Port 2 3 Port 3 0 When an error occurs the error output value value U16 Selection j ksa 1 When an error occurs retain the value until system is powered off H Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 Port 0 U16 Value 1 116 status DMC 01 set rm output value error handle CardNo NodelD SlotlD port 25 6 Value Revised March 2012 Chapter 25 Remote Module Control API PCI DMC A01 PCI DMC B01 25 6 DMC 01 get rm output value E FORMAT 116 PASCAL DMC 01 get rm output value U16 CardNo U16 NodelD U16 SlotID U16 port U16 value E Purpose Retrieves output value of the remote I O module H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID 0 Port 0 A 1 Port 1 port U16 Selection Deane 3 Port 3 ee 16 Numba Get value set
154. 267 NORTH SOUTH AMERICA DELTA PRODUCTS CORPORATION USA Raleigh Office P O BOX 12173 5101 DAVIS DRIVE RESEARCH TRIANGLE PARK NC 27709 U S A TEL 1 919 767 3813 FAX 1 919 767 3969 Revised March 2012 JAPAN DELTA ELECTRONICS JAPAN INC Tokyo Office DELTA SHIBADAIMON BUILDING 2 1 14 SHIBADAIMON MINATO KU TOKYO 105 0012 JAPAN TEL 81 3 5733 1111 FAX 81 3 5733 1211 EUROPE DELTRONICS THE NETHERLANDS B V Eindhoven Office DE WITBOGT 15 5652 AG EINDHOVEN THE NETHERLANDS TEL 31 40 259 2850 FAX 31 40 259 2851 PCI DMC A01 PCI DMC B01 Programming Manual Table of Contents Chapter 1 Introduction to the API Function Library 0 00 s00nss00nna0 1 1 1 1 Using the Function Libraries 1 1 1 2 Edit New PrOJEGt rss 1 1 1 2 1 Using JA JOE 1 1 1 2 2 Using Borland C 1 1 1 2 3 Using VB 1 2 LSA Upg Doph nena ie rete 1 2 1 2 5 Using VB Net 1 2 1 2 6 USING CH neeme neenameeeee 1 2 Chapter 2 Command Return Values and Messages 2 1 2 4 Error COAES eos nnn nnn nnn nr enn ern eee 2 1 2 2 Error Code Example anna nnn nn
155. 28 1 Function List 3 106 3 28 2 Sample Application 3 106 Position Compare 3 111 3 29 1 Function List 3 111 3 29 2 Sample Application 3 112 Revised March 2012 PCI DMC A01 PCI DMC B01 Programming Manual 3 30 Axis Group OJ 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
156. 4 Tdec U16 m curve U16m r a E Purpose Carries out 2 axis spiral motion Known conditions center coordinates for X and Y axes endpoint coordinates for X and Y axes E Parameters Name Data Type Unit Description Node ID of card used for motion displacement CardNo U16 Number Unit See SE N along X axis and Y axis Holds Node ID sets used for carrying out spiral i motion NodelD U16 Number Unit NodelD 0 holds 1st set of Node ID NodelD 1 holds 2nd set of Node ID SlotID U16 Number Unit Slot ID center_X 132 Number of pulses Center X coordinate on specified axis center_Y 132 Number of pulses Center Y coordinate on specified axis end X 132 Number of pulses Endpoint X coordinate on specified axis end Y 132 Number of pulses Endpoint Y coordinate on specified axis A A Direction of spiral arc motion Clockwise 1 dir U16 Selection Counterclockwise 0 circlenum U16 Number Number of circles in spiral motion Pulses per StrVel 132 i Starting velocity parameter second Pulses per MaxVel 132 E Tangential velocity parameter second Tacc F64 Second Specified acceleration time Tdec F64 Second Specified deceleration time 1 T curve m curve U16 Selection n 2 S curve 0 Relative motion displacement mra U16 Selection AASA EEA 1 Absolute motion displacement Revised March 2012 20 29 Chapter 20 2 Axis Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B0
157. 6 MPG and JOG Operation API PCI DMC A01 PCI DMC B01 26 2 _DMC_01_set_rm_mpg_axes_enable2 E FORMAT 116 PASCAL DMC 01 set rm mpg axes enable2 U16 CardNo U16 MasterNodelD U16 MasterSlotID U16 NodelD U16 SlotID U16 enable U16 pulse ratio U32 ratio U32 slope U16 denominator E Purpose MPG motion control can set numerator for motor rotation ratio E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 MasterNodelD U16 Number Unit RM MN64 Node ID used MasterSlotID U16 Number Unit RM MN64 Slot ID used NodelD U16 Number Unit Node ID in use Up to 4 axes SlotID U16 Number Unit Servo Slot ID in use Up to 4 axes aren U16 EON 0 Disable MPG function 1 Enable MPG function Ratio between each click of MPG and pulse output pulse_ratio U16 Selection 1 Four clicks of MPG produces 1 pulse output 4 One click of MPG produces 1 pulse output l Adjust ratio denominator of one full MPG turn to Ratio U32 Number Unit pulse output motor rotations Slope U32 Number Unit Set Maximum velocity slope for MPG PPS sec Max 1000 Adjust ratio numerator of one full MPG turn to Denominator U16 Number Unit pulse output motor rotations m Example 116 rt 0 U16 CardNo 0 MasterNodelD 1 MasterSlotID 0 RM 64 Node ID is 1 U16 NodelD 4 2 3 0 0 SlotID 4 0 Use two ASD A2F servo motors assigned to Node 2 and
158. 64 now provides GPIO with Input x 8 Output x 4 E Example U16 CardNo 0 U16 ver _ DMC 01 get card version CardNo 8ver 5 4 Revised March 2012 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 DMC 01 check nodeno Reset selected card Check to see if node already exists DMC 01 get master connect status Get the connection status between the Master Card and expansion module DMC 01 get mailbox Error Get number of MailBox errors DMC 01 get mailbox cnt Get MailBox counter value DMC 01 get dsp cent Get Interrupt counter value DMC 01 set dio output Set GPIO output pin status DMC 01 get dio output Get GPIO output pin status DMC 01 get dio input Get GPIO input pin status DMC 01 get cycle time Get current cycle time for finding checking devices Revised March 2012 6 1 Chapter 6 Interface API PCI DMC A01 PCI DMC B01 6 1 DMC 01 initial bus m FORMAT 116 PASCAL DMC 01 initial bus U16 CardNo E Purpose Initializes the external bus H Parameters Name Data Type
159. 7 Data high word High byte E Example U16 CardNo 0 U16 COBID 0 U8 value 8 0 116 status _DMC_01_get_canopen_ret CardNo amp COBID value Revised March 2012 8 7 Chapter 8 Using SDO Protocol API PCI DMC A01 PCI DMC B01 8 4 DMC 01 set pdo mode E FORMAT 116 PASCAL DMC 01 set pdo mode U16 CardNo U16 NodelD U16 SlotID U16 Enable E Purpose Sets the use of CANopen protocol PDO or SDO H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID ESE U16 AS a 0 PDO DisablePDO use SDO 1 PDO enable PDO H Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 If Slot ID is set to 0 then the Slave is a servo drive U16 Enable 1 116 status DMC 01 set pdo mode CardNo NodelD SlotlD Enable 8 8 Revised March 2012 Chapter 8 Using SDO Protocol API PCI DMC A01 PCI DMC B01 8 5 DMC 01 send message E FORMAT 116 PASCAL DMC 01 send message U16 CardNo U16 NodelD U16 SlotlD U16 Index U16 Subldx U16 DataType U16 Value0 U16 Value1 U16 Value2 U16 Value3 E Purpose Sends SDO command message to the data buffer This API function will wait for the command to be sent before exiting H Parameters Name Data Type Unit Description CardNo U16 Number CardNo is between 0 15 Unit NodelD U16 Number Node ID Unit SlotID U16 Number Slot ID
160. A NELTA DELTA ELECTRONICS CO LTD PCI DMC A01 PCI DMC B01 High Speed PCI 12 Axis Motion Control Card Programming Manual Version 1 11 1 About this Manual User Information Please keep this manual in a safe place PCI DMC A01 PCI DMC B01 Programming Manual This manual is subject to change without notice due to the release of new products improvements and changes in technologies and or modifications to data and forms 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 BCB Borland C Builder is a registered trademark of Borland Corporation The names of other products are only used for identification purposes and the registered trademarks remain the property of their respective owners Technical Support and Service If you require technical support service or other information or should you have any questions about the use of this product please visit our website http www delta com tw industrialautomation or contact us directly We look forward to providing you the best possible support and service Our contact details are provided below ASIA DELTA ELECTRONICS INC Taoyuan Plant 1 31 1 XINGBANG ROAD GUISHAN INDUSTRIAL ZONE TAOYUAN COUNTY 33370 TAIWAN R O C TEL 886 3 362 6301 FAX 886 3 362 7
161. AL DMC 01 enable soft limit U16 CardNo U16 NodelD U16 SlotID 116 Action E Purpose Enables disables the software limit and stop method after touching the limit H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID 1 Emergency st fter touching limit Action 116 Selection A A aida SAT eo Be 2 Slow down stop after touching limit E Example U16 CardNo 0 NodelD 1 SlotID 0 116 Action 1 Select emergency stop after touching limit 116 status DMC 01 enable soft limit CardNo NodelD SlotID Action 17 3 DMC 01 disable soft limit m FORMAT 116 PASCAL DMC 01 disable soft limit U16 CardNo U16 NodelD U16 SlotID E Purpose Disables the software limit H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID mE Example U16 CardNo 0 NodelD 1 SlotlD 0 116 status DMC 01 disable soft limit CardNo NodelD SlotID Revised March 2012 17 3 Chapter 17 Software Limit API PCI DMC A01 PCI DMC B01 17 4 DMC 01 get soft limit status E FORMAT 116 PASCAL DMC 01 get soft limit status U16 CardNo U16 NodelD U16 SlotID U16 PLimit_sts U16 NLimit sts E Purpose Retrieves the positive negative status of the software limit during motion H Parameters
162. AT 116 PASCAL _DMC_01_rm_04da_set_output_range U16 CardNo U16 NodelD U16 SlotID U16 ChannelNo U16 Range E Purpose Sets the DA output range H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID is between 0 63 SlotID U16 Number Unit 0 ChannelNo U16 Number Unit Channel ID is between 0 3 Gain is 0 7 0 Output range 0 5V default 1 Output range 0 10V Range U16 Number Unit 2 Output range 5V 3 Output range 10V 5 Output range 4 20mA 6 Output range 0 20mA 7 Output range 0 24mA H Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 ChannelNo 2 U16 Range 3 Select mode 3 116 status _DMC_01_rm_04da_set_output_range CardNo NodelD SlotID ChannelNo range Revised March 2012 29 5 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 E FORMAT 116 PASCAL DMC 01 rm 04da set output enable U16 CardNo U16 NodelD U16 SlotlD U16 ChannelNo U16 Enable E Purpose Enables disables pin output H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID is 0 12 SlotID U16 Number Unit 0 ChannelNo U16 Number Unit Channel ID is between 0 3 0 Output disable Enable U16 Selection 1 Output enable Set
163. Appearance w DMC HET 1 Initial Card num Slave num 1 2 P2P operate 2 1 Set Node ID 1 r Status Node ID Slot ID CMD 100000 pls Lo M Timer POS 100000 pls spo 9 m 2 2 Set vel prof stvel ders 03 or Reset Motion Stop RALM lt Stop ere ee a SYON m Normal Stop Interrupt M Abs S Curve E Normal Stop Dist 100000 pls Counter Marvel 50000 pps Figure 3 124 3 90 Revised March 2012 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 2 1 Set Node ID Node ID Slot ID nom v Timer Figure 3 125 Input Node ID and check Timer checkbox to enable motion status display NodelD item API function s argument variable NodelD Timer Checkbox Check to display the motion status Uncheck to disable display 2 Enterthe values of the arguments for motion control 2 2 Set vel prof Stivel pps Manvel 50000 pps Acc 0 1 sec LIH Dec 0 1 sec Figure 3 126 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
164. Array U16 Number Unit NodelDArray 0 Node 1 NodelDArray 1 Node 2 NodelDArray 2 Node 3 SlotID U16 Number Unit Slot ID Absolute path parameter for motion of Node DisX 132 Number of pulses A ID on X axis A Absolute path parameter for motion of Node DisY 132 Number of pulses i ID on Y axis A Absolute path parameter for motion of Node DisZ 132 Number of pulses A ID on Z axis StrVel 132 Pulses per second Starting velocity parameter MaxVel 132 Pulses per second Maximum velocity parameter Tacc F64 Second Specified acceleration time Tdec F64 Second Specified deceleration time m Example U16 CardNo 0 U16 NodelDArray 3 1 2 3 U16 SlotID 3 0 0 O 132 DisX 25000 DisY 50000 DisZ 75000 I32 StrVel 0 MaxVel 50000 F64 Tacc 0 1 Tdec 0 1 116 status _DMC_01_start_sa_move_xyz CardNo NodelDArray SlotID DisX DisY DisZ StrVel MaxVel Tacc Tdec Revised March 2012 21 5 Chapter 21 3 Axis Linear Interpolation Motion Control API PCI DMC A01 PCI DMC B01 21 5 DMC 01 start v3 move xyz H FORMAT 116 PASCAL DMC 01 start v3 move xyz U16 CardNo U16 NodelD U16 SlotID 132 DisX 132 DisY 132 DisZ 132 StrVel 132 ConstVel 132 EndVel F64 TPhase1 F64 TPhase2 U16 m curve U16 m r a E Purpose 3 axis linear interpolation motion with EndVel added Values of StrVel and EndVel can be greater than MaxVel E Parameters Name Data Type Unit Description CardNo U16 N
165. C 01 buf dwell 3 15 2 Sample Application Program Appearance is DMC NET xj Card num 0 Slave num 0 2 Dwell conf Status Node ID 0 Slot ID 0 CMD C g pls Dwell cnt 9 POS sg pls SVON 10 Sts C g Move Stop Reset Exit 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 and Card initialization in Section 3 1 2 1S Set Servo Node ID and enable motion status display 2 Dwell conf Node ID 0 Slot ID 0 Dwell cnt 4 Figure 3 81 NodelD item API function s argument variable NodelD SlotID item API function s argument variable slotID Dwell cnt item Enter the delay time Mini Sec between the execution of two API functions Revised March 2012 3 55 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 56 3 Inthe following example adding the dwell command between continuous motion 5 6 x x x commands will ensure the execution of continuous motion rt DMC 01 start ta move gDMCCardNo NodelD SlotID Distance StrVel MaxVel acc dec Motion displacement using absolute coordinates with T curve velocity cross section rt DMC 01 buf dwell CardNo NodelD SlotlD dwell cnt Set the dwell buffer interval If dwell_cnt is 0 the delay is 4ms In this
166. C 01 ipo set svon gDMCCardNo NodelD SlotID ON OFF ON OFF 0 Servo Power OFF 1 Servo Power ON 7 Start motion control Using point to point motion control as an example Click on the gt or button to execute the following procedure rt DMC 01 start sa move gDMCCardNo NodelD SlotID Distance StrVel MaxVel acc dec Motion displacement using absolute coordinates with S curve velocity cross section 8 If you wish to change the current motion velocity to a new velocity please click on the 2 nd seg button to execute the following procedure rt DMC 01 start sa move 2seg CardNo NodelD SlotID Dist Dist2 StrVel MaxVel MaxVel2 Tacc Tsec Tdec 2nd motion displacement using absolute coordinates with S curve velocity cross section rt DMC 01 start ta move 2seg CardNo NodelD SlotlD Dist Dist2 StrVel MaxVel MaxVel2 Tacc Tsec Tdec 2nd motion displacement using absolute coordinates with T curve velocity cross section rt DMC 01 start sr move 2seg CardNo NodelD SlotlD Dist Dist2 StrVel MaxVel MaxVel2 Tacc Tsec Tdec 2nd motion displacement using relative coordinates with S curve velocity cross section rt DMC 01 start tr move 2seg CardNo NodelD SlotID Dist Dist2 StrVel MaxVel MaxVel2 Tacc Tsec Tdec 2nd motion displacement using relative coordinates with T curve velocity cross section Revised March 2012 3 65 Chapter 3 O
167. C 01 start sr move xy CardNo NodelDArray SlotID DistX DistY StrVel MaxVel Tacc Tdec Revised March 2012 19 5 Chapter 19 2 Axis Linear Interpolation Motion Control API PCI DMC A01 PCI DMC B01 19 3 DMC 01 start ta move xy E FORMAT 116 PASCAL DMC 01 start ta move xy U16 CardNo U16 NodelD U16 SlotID 132 DisX 132 DisY 132 StrVel 132 MaxVel F64 Tacc F64 Tdec E Purpose 2 axis linear interpolation motion using absolute coordinates with T curve velocity cross section H Parameters Name Data Type Unit Description Node ID of card used for motion displacement CardNo U16 Number Unit KEAK KAL along X axis and Y axis Holds Node ID sets used for linear interpolation NodelDArray U16 Number Unit NodelDArray 0 holds the 1st set of Node ID NodelDArray 1 holds the 2nd set of Node ID SlotID U16 Number Unit Slot ID DisX 132 Number of Absolute path parameter for motion of Node pulses ID on X axis DisY 132 Number of Absolute pani parameter for motion of Node pulses ID on Y axis Pulses per StrVel 132 i Starting velocity parameter second Pulses per i MaxVel 132 Maximum velocity parameter second Tacc F64 Second Specified acceleration time Tdec F64 Second Specified deceleration time 19 6 Revised March 2012 Chapter 19 2 Axis Linear Interpolation Motion Control API PCI DMC A01 PCI DMC B01 m Example U16 CardNo 0 U16 NodelDArray 2 f 1 2 U16 SlotID 2 0 0 132 D
168. C A01 PCI DMC B01 4 Spiral2 motion parameter settings m 2 1 Set vel prof Center Pulse Center Y Pulse Strel 1000 pps Mazel 12980000 pps sec oO oO T KANNA SIS S ILSILS sec End x 60000 Pulse End Y gooool Pulse Dir Cir_Num 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 API function s argument variable MaxVel Acc item Time required to reach maximum velocity API function s argument variable acc Dec item Time reguired to go from maximum velocity to 0 API function s argument variable dec Dir item Direction of spiral motion 0 clockwise 1 counterclockwise API function s argument variable Dir Cir Num item Number of Spiral circles API function s argument variable Cir Num End X item Spiral endpoint s X coordinate API function s argument variable End X End Y item Spiral endpoint s Y coordinate API function s argument variable End _Y 3 108 Revised March 2012 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 m 2 2 Parameter Set PO Abs S Curve Figure 3 145 Abs Checkbox You must check this if you want motion displacement to u
169. CI DMC B01 9 3 DMC 01 start sdo driver a move E FORMAT 116 PASCAL DMC 01 start sdo driver a move 116 CardNo U16 NodelD U16 SlotID 132 Position E Purpose Starts absolute motion displacement H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID Position 132 Number of pulses Absolute motion position E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 If Slot ID is set to 0 then the Slave is a servo drive 132 Position 10000000 116 status DMC 01 start sdo driver a move CardNo NodelD SlotlD Position 9 4 Revised March 2012 Chapter 9 Point to Point Motion Control Packet Protocol API PCI DMC A01 PCI DMC B01 9 4 DMC 01 start sdo driver new position move E FORMAT 116 PASCAL DMC 01 start sdo driver new position move 116 CardNo U16 NodelD U16 SlotID 132 Position U16 abs rel E Purpose Performs motion displacement with new position value H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID Position 132 Number Value of new position i U16 EE 0 Use apsolute cones as reference 1 Use relative coordinates as reference E Example U16 CardNo 0 U16 NodelD 1 132 Position 20000000 U16 abs_rel 1 Motion displacement using re
170. CardNo NodelD SlotID cmd 16 2 Revised March 2012 Chapter 16 Motion Counter Value API PCI DMC A01 PCI DMC B01 16 3 DMC 01 get position m FORMAT 116 PASCAL DMC 01 get position U16 CardNo U16 NodelD U16 SlotID 132 pos E Purpose Retrieves the current position counter value H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID Number of ae pos 132 Returned current value of position counter pulses H Example U16 CardNo 0 NodelD 1 SlotID 0 132 pos 116 status DMC 01 get position CardNo NodelD SlotID amp pos 16 4 DMC 01 set position m FORMAT U16 PASCAL DMC 01 set position U16 CardNo U16 NodelD U16 SlotID 132 pos E Purpose Sets the new position counter value E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID Number of t pos 132 Set position counter value pulses E Example U16 CardNo 0 NodelD 1 SlotID 0 132 pos 500000 116 status DMC 01 set position CardNo NodelD SlotID pos Revised March 2012 16 3 Chapter 16 Motion Counter Value API PCI DMC A01 PCI DMC B01 16 5 DMC 01 get target pos m FORMAT 116 PASCAL DMC 01 get target pos U16 CardNo U16 NodelD U16 SlotID 132 pos E Purpose Retrieves the curre
171. CardNo will be the SW1 value on the first 1 PCI DMC A01 detected The CardNo of other cards are then acquired one by one For more information about setting SW1 please see PCI DMC A01 User Manual Section 1 5 5 When one PCI DMC A01 is installed in the system U16 CardNo seg 0 U16 CardNo U16 status DMC 01 get CardNo seg CardNo seg amp CardNo When two or more PCI DMC A01 are installed in the system U16 CardNo seg 0 U16 CardNo U16 status 116 existCards For the value of existCards please see DMC 01 open API in Section 5 1 of the Programming Manual for CardNo seg 0 CardNo seg lt existCards CardNo seg status DMC 01 get CardNo seg CardNo seg 8CardNo Revised March 2012 5 3 Chapter 5 Hardware Initialization API PCI DMC A01 PCI DMC B01 5 4 DMC 01 peci initial H FORMAT 116 PASCAL DMC 01 pci initial U16 CardNo E Purpose Initializes this PCI card H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 E Example U16 CardNo 0 DMC 01 pci initial CardNo 5 5 DMC 01 get card version m FORMAT 116 PASCAL DMC 01 get card version U16 CardNo U16 ver E Purpose Retrieves the motion card version H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 Motion card version data Ver U16 Number 0X6x is PCI DMC A01 0X7x is PCI DMC B01 m XPCI DMC A01 Motion Card Version 0x
172. D U16 Enable E Purpose Enables disables output from the remote I O module H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID 0 Disable output Enable U16 Selection 1 Enable output and send output value to target E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 Enable 1 116 status DMC 01 set rm output active CardNo NodelD SlotID Enable Revised March 2012 25 9 Chapter 25 Remote Module Control API PCI DMC A01 PCI DMC B01 This page intentionally left blank 25 10 Revised March 2012 Chapter 26 MPG and JOG Operation API PCI DMC A01 PCI DMC B01 Chapter 26 MPG and JOG Operation API Function Name _DMC_01_set_rm_mpg_axes_enable Table 26 1 Description 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 Chapter 26 MPG and JOG Operation API PCI DMC A01 PCI DMC B01 26 1 DMC 01 set rm mpg axes enable H FORMAT 116 PASCAL DMC 01 set rm mpg axes enable U16 CardNo U16 MasterNodelD U16 MasterSlotID U16 NodelD U16 SlotID U32 slope E Purpose Sets MPG motion control H Parameters U16 enable U16 pulse ratio U32 ratio Nam
173. D Address U16 Number Position to read Data U32 Number Data stored in memory E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 Address U32 Data 116 status misc slave user data buffer read CardNo NodelD SlotID Address amp Data Revised March 2012 37 13 Chapter 37 Security API PCI DMC A01 PCI DMC B01 37 17 misc slave user data buffer write H FORMAT 116 PASCAL misc slave user data buffer write U16 CardNo U16 NodelD U16 SlotID U16 Address U32 Data E Purpose Writes data to buffer E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Selection Node ID SlotID U16 Number Unit Slot ID Address U16 Number Position to write to Data U32 Number Data to write E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 Address U32 Data 116 status misc slave user data buffer write CardNo NodelD SlotID Address Data 37 14 Revised March 2012 Chapter 37 Security API PCI DMC A01 PCI DMC B01 37 18 misc slave user data to flash H FORMAT 116 PASCAL misc slave user data to flash U16 CardNo U16 NodelD U16 SlotID E Purpose Writes data in buffer to position specified by Slave 04PI H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Selection Node ID SlotID U16 Number Unit Slot ID H Example U16 CardNo 0 U16 NodelD 1
174. D enable 35 2 Revised March 2012 Chapter 36 Interrupt API PCI DMC A01 PCI DMC B01 Chapter 36 Interrupt API Table 36 1 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 Called if interrupt enabled Revised March 2012 36 1 Chapter 36 Interrupt API PCI DMC A01 PCI DMC B01 36 1 DMC 01 set int factor E FORMAT 116 PASCAL DMC 01 set int factor U16 CardNo U16 NodelD U16 int factor E Purpose Sets interrupt mode H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID There are 8 modes in total 1 Normal Stop 2 Next Buffer 3 Acceleration End int factor U16 Selection 4 Deceleration Start 5 Sdo Finish unavailable 6 DMC Cycle Start 7 RMO4PI FIFO 8 User Defined unavailable E Example U16 CardNo 0 U16 NodelD 1 U16 int facter 1 Normal Stop 116 status DMC 01 set int factor CardNo NodelD int factor 36 2 Revised March 2012 Chapter 36 Interrupt API PCI DMC A01 PCI DMC B01 36 2 DMC 01 int enable FORMAT 116 PASCAL DMC 01 int enable U16 CardNo U16 NodelD Purpose Enables interrupt Parame
175. D enable sd logic mode Revised March 2012 28 25 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 E FORMAT 116 PASCAL DMC 01 rm 0O4pi md1 get mc error code U16 CardNo U16 NodelD U16 SlotID U16 error code E Purpose When the alarm code is 299 retrieves the motion control error message under RM04PI Mode 1 H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID error_code U16 Number Unit Motion control error code E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 error code U32 alm code Get Slave error message 116 status DMC 01 get alm code CardNo NodelD SlotID galm code Use this function when alm code has a value of 299 Get error code for current motion of RMO4PI 116 status DMC 01 rm 0O4pi md1 get mc error code CardNo NodelD SlotID Gerror code Example error code of 127 means Motion command buffer is full For a detailed description of erro code please refer to PCI DMC 01 Err h 28 26 Revised March 2012 Chapter 28 4 Channel Pulse Interface Mode 1 Motion Control API PCI DMC A01 PCI DMC B01 28 17 DMC 01 set rm Odpi ref counter E FORMAT 116 PASCAL DMC 01 set rm O4pi ref counter U16 CardNo U16 NodelD U16 SlotID
176. D is between 0 3 Read value 0 5 Set frequency of Number average value 0 0 Mode U16 Number Unit 1 2 2 4 3 8 4 16 5 32 H Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 channelno 1 U16 mode 116 status DMC 01 get 04ad average mode CardNo NodelD SlotID channelno 30 12 amp mode Revised March 2012 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 E FORMAT 116 DMC 01 set 04ad input enable U16 CardNo U16 NodelD U16 SlotID U16 channelno U16 ON OFF E Purpose Enables disables AD Channel Input feedback E Parameters Data 3 aes Name Unit Description Type CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID is between 0 63 SlotID U16 Number Unit 0 ChannelNo U16 Number Unit Channel ID is between 0 3 On_ Off U16 Number Unit 0 Disable 1 Enable E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 channelno 1 U16 ON OFF 1 116 status DMC 01 set 04ad input enable CardNo NodelD SlotID channelno ON OFF Revised March 2012 30 13 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 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 device
177. Dir 0 U16 Interval 10 10 pulse U32 Trigger_cnt 50000 116 status DMC 01 channel0 position cmp CardNo start dir interval trigger cnt Revised March 2012 39 9 Chapter 39 Compare API PCI DMC A01 PCI DMC B01 39 9 DMC 01 channel1 output enable m FORMAT 116 PASCAL DMC 01 channel1 output enable U16 CardNo U16 on off E Purpose Sets Compare2 output to enable disable H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 0 Off On off U16 Number Unit 1 On E Example U16 CardNo 0 U16 On_off 1 116 status _DMC_01_channel1_output_enable CardNo on_off 39 10 Revised March 2012 Chapter 39 Compare API PCI DMC A01 PCI DMC B01 39 10 DMC 01 channel1 output mode m FORMAT 116 PASCAL _DMC_01_channel1_output_mode U16 CardNo U16 Mode E Purpose Compare2 output mode E Parameters NETIS Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 0 Normal mode Mod U16 Number Unit s 1 Custom mode m Description Normal mode 1000 2000 3000 4000 Tigger On Table Sus Sus Sus Sus Trigger Time set 5us Figure 39 1 Compare Output Normal mode Trigger On s position table is set using the table_size parameter in API DMC 01 channel1 position compare table Trigger time is set using the time us parameter in API DMC 01 set compare channel trigger time
178. Dir 1 132 StrVel 0 MaxVel 50000 F64 Tacc 0 1 Tdec 0 1 116 status DMC 01 start sa heli xy CardNo NodelDArray SlotlD Center X Center Y Depth Pitch Dir StrVel MaxVel Tacc Tdec Revised March 2012 22 9 Chapter 22 3 Axis Spiral Interpolation Motion Control API PCI DMC A01 PCI DMC B01 22 5 DMC 01 start v3 heli xy H FORMAT 116 PASCAL DMC 01 start v3 heli xy U16 CardNo U16 NodelD U16 SlotID 132 Center X 132 Center Y 132 Depth 132 Pitch 116 Dir 132 StrVel 32 ConstVel 132 EndVel F64 TPhase1 F64 TPhase2 U16 m curve U16 m r a E Purpose 3 axis Spiral interpolation motion with EndVel added Values of StrVel and EndVel can be greater than MaxVel E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 Holds Node ID sets used for spiral interpolation NodelDArray U16 Number Unit NodelDArray 0 Node_1 NodelDArray 1 Node_2 NodelDArray 2 Node_3 SlotID U16 Number Unit Slot ID Absolute center point X coordinate on the Center_X 132 Number of pulses E specified axis Absolute center point Y coordinate on the Center Y 132 Number of pulses a specified axis Absolute depth to position on specified axis Depth 132 Number of pulses height in direction of Z Pitch 132 Number of pulses Absolute height between two spirals Direction of spiral arc motion Clockwise 1 Dir 116 Selection i Counterclockwise 0 S
179. Figure 3 111 Click on the POWERON button to execute the following procedure rt DMC 01 ipo set svon gDMCCardNo NodelD SlotID ON OFF II ON OFF 0 Servo Power OFF 1 Servo Power ON 10 Start motion control using point to point motion control as an example Stop Figure 3 112 Click on the gt or button to execute the following procedure rt DMC 01 rm 0O4pi md1 start move CardNo NodelD SlotID Dist StrVel MaxVel Tacc Tdec m curve m r a Carry out motion displacement 3 80 Revised March 2012 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 11 Enable software limit S oft Limit P Limit 10000 N Limit 10000 M Soft Limit Enable N Limil 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 0O4pi md1 set soft limit CardNo NodelD SlotID PLimit NLimit Enable PLimit argument is the set value for positive limit NLimit is the set value for negative limit XFor a detailed description of software limit examples please refer to section 3 13 Software Limit 12 Countine motion control If you wish to carry out Countine motion you must check the Countine checkbox then click on the gt or lt button to execute the following procedure
180. Figure 41 3 m Example U16 CardNo 0 U16 NodelD 1 U16 SlotlD 0 U16 mode 1 116 status DMC 01 speed continue mode CardNo NodelD SlotlD mode 41 4 Revised March 2012 Chapter 41 Speed Continue API PCI DMC A01 PCI DMC B01 41 3 DMC 01 speed continue combine ratio H FORMAT 116 PASCAL DMC 01 speed continue combine ratio U16 CardNo U16 NodelD U16 SlotID U16 ratio E Purpose Sets Speed Continue combined percentage E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID Ratio U16 Number Unit Combined percentage m Description Ratio is 100 Figure 41 4 Ratio is 50 Figure 41 5 E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 ratio 100 116 status DMC 01 speed continue combine ratio CardNo NodelD SlotID ratio Revised March 2012 41 5 Chapter 41 Speed Continue API PCI DMC A01 PCI DMC B01 siin oTe 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 Speed Continue must be disabled for axes 7 12 to carry out further motions 41 6 Revised March 2012 Chapter 42 Other API PCI DMC A01 PCI DMC B01 Chapter 42 Other API Table 42 1 Function Name Description misc app get circle
181. I DMC A01 PCI DMC B01 25 2 DMC 01 set rm input filter E FORMAT 116 PASCAL DMC 01 set rm input filter U16 CardNo U16 NodelD U16 SlotID U16 port U16 value E 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 When the value is 1 the software filter time becomes 2 ms and so on E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID 0 Port 0 port U16 Selection one 2 Port 2 3 Port 3 Value of software filter Value of 0 means filter value U16 Number time of 1 ms E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 Port 0 U16 Value 2 In this example the value is 2 so software filter time is 3 ms Set software filter time of Port 0 on Remote digital input module to 3 ms 116 status _DMC_01_set_rm_input_filter CardNo NodelD SlotID Port Value Revised March 2012 25 3 Chapter 25 Remote Module Control API PCI DMC A01 PCI DMC B01 25 3 DMC 01 set rm input filter enable E FORMAT 116 PASCAL DMC 01 set rm input filter enable U16 CardNo U16 NodelD U16 SlotID U16 port U16 enable E Purpose Enables software mask for bit 0 to bit 15 of the remote I O module s input port H Parameters Name Data Type Unit Description CardNo
182. ID SlotID U16 Number Unit Slot ID E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 116 status DMC 01 emg stop CardNo NodelD SlotlD 14 2 Revised March 2012 14 2 DMC 01 sd stop E FORMAT 116 PASCAL DMC 01 sd stop U16 CardNo U16 NodelD U16 SlotID F64 Tdec E Purpose Chapter 14 Stop Motion Control API PCI DMC A01 PCI DMC B01 All motion commands in the buffer will execute a slow down stop based on deceleration time H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID Tdec F64 Second Specified deceleration time E Example U16 CardNo 0 U16 NodelD 1 SlotID 0 F64 Tdec 0 1 116 status DMC 01 sd stop CardNo NodelD SlotID Tdec Revised March 2012 14 3 Chapter 14 Stop Motion Control API PCI DMC A01 PCI DMC B01 14 3 DMC 01 sd abort m FORMAT 116 PASCAL DMC 01 sd abort U16 CardNo U16 NodelD U16 SlotID F64 Tdec E Purpose Current motion command will execute a slow down stop H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID Tdec F64 Second Specified deceleration time E Example U16 CardNo 0 U16 NodelD 1 SlotID 0 F64 Tdec 0 1 116 status DMC 01 sd abort CardNo NodelD SlotID Tdec 14 4 Revised March 2
183. MC 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 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 5 Torque Motion Control 3 5 1 Function List Table 3 5 DMC 01 set torgue mode DMC 01 set torgue DMC 01 set torgue stop DMC 01 get torgue 3 5 2 Sample Application Program Appearance Se PCI DMC x 1 Initial Card num O Slave num 2 SDO Torque operate 2 1 Set node id Status NodeID Slot ID CMD pls 0 0 0 Timer BBK Ops er s 10 Sts 1000 milliseconds A RESET a Motion 1000 rated torque SVON STOP nk 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 and Card initialization in Section 3 1 2 2 Set Servo Node ID and enable motion status display 2 1 Set node id lm Slot ID 0 0 C Timer Figure 3 22 Revised March 2012 3 13 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 14 5 x Input Node ID and check the Timer checkbox to enable motion status display NodelD item API function argument variable NodelD Timer Checkbox Check to display the motion status Uncheck to disable display E
184. MC 01 set rm output value error ha ndle Set the output value returned when remote I O module encounters an error _DMC_01_get_rm_output_value Get output of remote I O module _DMC_01_get_rm_output_value_error_ha ndle Get output of remote I O module and decide whether to retain or discard value if there is an error _DMC_01_set_rm_output_active MPG and JOG Operation API _DMC_01_set_rm_mpg_axes_enable Enable disable output from remote I O module Set MPG motion control _DMC_01_set_rm_mpg_axes_enable2 MPG motion control can numerator for motor rotation ratio _DMC_01_set_rm_jog_axes_enable 4 Channel Pulse Interface API _DMC_01_set_rm_04pi_ipulse_mode Set JOG motion control Set input phase mode for pulse interface module _DMC_01_set_rm_04pi_opulse_mode _DMC_01_set_rm_04pi_svon_polarity _DMC_01_set_rm_04pi_DO2 Set output phase mode for pulse interface module Set POWER ON SVON level Enable DO2 port _DMC_01_set_rm_04pi_homing_ratio Set homing torque ratio _DMC_01_04pi_set_poweron Enable disable POWER ON SVON _DMC_01_rm_04PI_get_buffer Get buffered motion command 4 Channel Pulse Interface Mode 1 Motion Control API _DMC_01_rm_04pi_md1_start_move Perform 1 axis motion control under RMO4PI Mode 1 _DMC_01_rm_04pi_md1_v_move Perform velocity motion control under RMO4PI Mode 1 _DMC_01_rm_04pi_md1_start_line2 Perform 2 axis linear interpolation motion contr
185. MC 01 start v3 arc2 xy E FORMAT 116 PASCAL DMC 01 start v3 arc2 xy U16 CardNo U16 NodelD U16 SlotID 132 End X I32 End Y F64 Angle 132 StrVel 132 ConstVel 132 EndVel F64 TPhase1 F64 TPhase2 U16 m curve U16 m r a E Purpose 2 axis arc interpolation motion with EndVel added Known conditions endpoint coordinates angle Values of StrVel and EndVel can be greater than MaxVel H Parameters Name Data Type Unit Description Node ID of card used for motion displacement CardNo U16 Number Unit a ee ee along X axis and Y axis Holds Node ID sets used for arc interpolation NodelDArray U16 Number Unit NodelDArray 0 holds the 1st set of Node ID NodelDArray 1 holds the 2nd set of Node ID SlotID U16 Number Unit Slot ID Number of Absolute endpoint X coordinate on the End X 132 a z pulses specified axis Number of Absolute endpoint Y coordinate on the End_Y 132 pulses specified axis Angle F64 Degree Set arc angle One full arc is 360 Pulses per StrVel 132 Starting velocity parameter second Pulses per ConstVel 132 R Constant velocity second Pulses per A EndVel 132 End velocity second TPhase1 F64 Second Time from StartVel to ConstVel TPhase2 F64 Second Time from ConstVel to EndVel 1 T curve m_curve U16 Selection ae 2 S curve 0 Relative motion displacement m ra U16 Selection ASK 1 Absolute motion displacement Revised March 2012 20 33 Chapter 20 2 Axis A
186. Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 _ Calculate the Pos Table for compare based on the Pos table 132 Number Unit given data Level table U32 Number Unit Set Level table for Compare Table size U32 Number Unit Size of Pos table to Compare mE Example U16 CardNo 0 I32 Pos table 4 1000 2000 3000 4000 U32 Level table 4 1 0 0 0 U32 Table size 50000 116 status DMC 01 channel1 position compare table level CardNo pos table level table table size 39 16 Revised March 2012 39 15 DMC 01 channel1 position compare table cnt H FORMAT 116 PASCAL DMC 01 channel1 position compare table cnt U16 CardNo U32 cnt E Purpose Reads Compare counter H Parameters Chapter 39 Compare API PCI DMC A01 PCI DMC B01 Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 Cnt U32 Number Unit Read Compare counter E Example U16 CardNo 0 U32 Cnt 12000 116 status DMC 01 channel1 position compare table cnt CardNo amp cnt Revised March 2012 39 17 Chapter 39 Compare API PCI DMC A01 PCI DMC B01 39 16 DMC 01 set compare channel polarity H FORMAT 116 PASCAL DMC 01 set compare channel polarity U16 CardNo U16 inverse E Purpose Sets Compare level H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 _ 0 Normal Inverse U16
187. No is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID StrVel 132 as Starting velocity second MaxVel 132 SPEE E VAISI second Tacc F64 Second Specified acceleration time Tdec F64 Second Specified deceleration time 0 Move in positive direction dir 116 Selection KAD 1 Move in negative direction 1 Referenced against T curve velocity m curve U16 Selection VK A 2 Referenced against S curve velocity cross section m Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 132 StrVel 1000 MaxVel 12800 F64 Tacc 0 1 Tdec 0 1 116 dir 0 Direction is positive U16 m curve 1 Referenced against T curve velocity cross section RM04PI MODE1 moving in positive direction 116 status DMC 01 rm 0O4pi md1 v move CardNo NodelD SlotID StrVel MaxVel Tacc Tdec dir m curve Revised March 2012 28 5 Chapter 28 4 Channel Pulse Interface Mode 1 Motion Control API PCI DMC A01 PCI DMC B01 28 3 DMC 01 rm 04pi md1 start line2 HM FORMAT 116 PASCAL DMC 01 rm O4pi md1 start line2 U16 CardNo U16 NodelD U16 SlotID 132 Dist 132 StrVel 132 MaxVel F64 Tacc F64 Tdec U16 m curve U16 m r a E Purpose Performs 2 axis linear interpolation motion control under RM04PI Mode 1 gt For motion description please see Chapter 19 2 Axis Linear Interpolation Motion Control API E Parameters Name Data Type Unit Description CardNo U16
188. NodelD U16 SlotID U16 mode E Purpose Retrieves current AD conversion time E Parameters Name Data Type Unit Description Number CardNo U16 aa CardNo is between 0 15 Number NodelD U16 ae Node ID is 0 12 Unit Numb SlotID U16 eee IG Unit Output is between 0 6 Output 3 dB Number frequency frequency a mele Hz Hz Hv 2 372 200 9 6 Mode U16 Selection 1 1001 520 15 5 2 2005 1040 22 7 3 2534 1300 26 1 4 4826 2500 39 2 5 6041 3100 46 0 e 12166 6300 120 0 H Example U16 CardNo 0 U16 NodelD 1 U16 Slotld 0 U16 mode 116 status DMC 01 get 04ad conversion time CardNo NodelD SlotID amp mode Revised March 2012 30 9 Chapter 30 4 Channel Analog Input Remote I O Module API PCI DMC A01 PCI DMC B01 30 9 DMC 01 get 04ad data mE FORMAT 116 DMC 01 get 04ad data U16 CardNo U16 NodelD U16 SlotID U16 channelno U16 value E Purpose Reads input voltage H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID is between 0 63 SlotID U16 Number Unit 0 ChannelNo U16 Number Unit Channel ID is between 0 3 ReturnData U16 Number Unit 0 65535 E Example U16 CardNo 0 U16 NodelD 1 U16 Slotld 0 U16 channelno 2 U16 value 116 status DMC 01 get 04ad data CardNo NodelD SlotID channelno amp value 30 10
189. Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotlDf0 holds first set of Slot ID SlotID U16 Number Unit 0 SlotID 1 holds second set of Slot ID Path parameter corresponding to SlotID 0 Number of moti Dist 132 j a pulses Path parameter corresponding to SlotID 1 motion Pulses per StrVel 132 E Starting velocity parameter second Pulses per MaxVel 132 e Maximum velocity parameter second Tacc F64 Second Specified acceleration time Tdec F64 Second Specified deceleration time 1 Referenced against T curve velocity cross section m_curve U16 Selection 2 Referenced against S curve velocity cross section 0 Displacement in relati dinat m ra U16 Selection i NARA ae Se 1 Displacement in absolute coordinates 28 6 Revised March 2012 Chapter 28 4 Channel Pulse Interface Mode 1 Motion Control API PCI DMC A01 PCI DMC B01 m Example U16 CardNo 0 NodelD 1 SlotlD 2 0 1 132 Dist 2 30000 40000 132 StrVel 0 MaxVel 3000 F64 Tacc 0 1 Tdec 0 1 U16 m curve 2 Referenced against S curve velocity cross section U16 m r a 1 Use displacement in absolute coordinates 116 status DMC 01 rm Odpi md1 start line2 CardNo NodelD SlotID Dist StrVel MaxVel Tacc Tdec m curve m r a Revised March 2012 28 7 Chapter 28 4 Channel Pulse Interface Mode 1 Motion 28 4 DMC 01 rm Odpi mdf start line3 E FORMAT Control API PCI DMC A01 PCI DMC B01 116 PASCAL DMC 01 rm
190. Revised March 2012 3 115 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 orc vet AT Card num Slave num e 2 AxisGroup J Node1 J Node P Node 2 M Node8 M Node3 F Nodedg TF Node 4 PE Node 10 T Node 5 Mode i T Node 6 M Node 12 Set Group Clear All Group Figure 3 153 3 116 Revised March 2012 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 Card num Slave num 6 Figure 3 154 Card num item Display number of cards Slave num item Display number of slaves 2 Group settings and reset 2 AxisGroup M Node 1 Node Node Node8 Nade J Nodeg F Node 4 E Node 10 M Node 5 M Node11 M Node 6 Node 12 Set Group Clear All Group Figure 3 155 Nodexx item Display details for Node ID Set Group item 1 Up to 6 groups can be set per card 2 If Node 7 and Node 8 are set as one group and a link error occurs nearby both Node 7 amp Node 8 will stop Nodes 1 4 5 6 will remain unaffected and continue working normally 3 Once you have selected the nodes to place in a group c
191. S curve velocity cross section Known conditions Center point coordinates endpoint coordinates DMC 01 start ta arc3 xy 2 axis arc interpolation motion using absolute coordinates with T curve velocity cross section Known conditions Center point coordinates endpoint coordinates DMC 01 start sa arc3 xy 2 axis arc interpolation motion using absolute coordinates with S curve velocity cross section Known conditions Center point coordinates endpoint coordinates DMC 01 start spiral xy 2 axis spiral motion Known conditions Center coordinates for X and Y axes DMC 01 start spiral2 xy 2 axis spiral motion Known conditions Center coordinates for X and Y axes endpoint coordinates for X and Y axes DMC 01 start v3 arc xy 2 axis arc interpolation motion with EndVel added Known conditions Center point coordinates angle DMC 01 start v3 arc2 xy 2 axis arc interpolation motion with EndVel added Known conditions Endpoint coordinates angle 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 20 2 Revised March
192. SCAL DMC 01 set dda data U16 CardNo U32 abs pos E Purpose Enters DDA Table data H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 Abs_Pos U32 Numerical data This field is a an array for data from 12 axes E Example U16 CardNo 0 U32 Abs_Pos 0 11 1000 2000 0 0 0 0 0 0 0 0 0 0 Abs_Pos is a 12 axis data array Maximum Buffer is 1000 entries One DDA Table entry is executed each ms Please note that other commands will not be accepted before the Buffer finishes executing e g Sd_Stop 116 status DMC 01 set dda data CardNo Abs Pos Other Node without DDA Table enabled can continue to execute other actions as normal 42 7 DMC 01 get dda cnt H FORMAT 116 PASCAL DMC 01 get dda cnt U16 CardNo U16 dda cnt E Purpose Retrieves number of remaining entries in DDA Table E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 Current number of remaining entries in DDA dda cnt U16 Numerical data 9 Table E Example U16 CardNo 0 U16 dda cnt 116 status DMC 01 get dda cnt CardNo 8 dda cnt 42 6 Revised March 2012
193. Se Secs LF a i i ee eee eee el eee nce gg Ne ee r beitet Yeager Sekt Dee De ee ed Erinin nia Figure 3 66 7 Stop motion Hit the STOP button to execute an emergency stop rt _DMC_01_emg_stop gDMCCardNo NodelD 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 8 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 3 46 Revised March 2012 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 13 Software Limit Control 3 13 1 Function List Table 3 13 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 xl 1 Initial Card num 0 Slave num 2 PDO Soft limit 2 1 Set node id ___ 2 3 Set distance NodeID Slot ID Abs J Curve 0 0 O Timer Dist 12800000 pls 2 2 Set vel prof 24 Setsoftlimit Stel OPPS NLiit 1500000
194. Servo Node ID to set the motion commands for other axes first Once the setting have been completed click on the Syn Move button to execute synchronized motion control command SYON Sync Move lt STOP gt Figure 3 79 The synchronized motion control command is executed as shown in the following function rt DMC 01 sync move gDMCCardNo After synchronized motion control is complete the synchronized motion control setting will be disabled If you wish to use the synchronized motion control command again you must re enable synchronized motion control Revised March 2012 3 53 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 54 8 Stop motion Hit the STOP button to execute an emergency stop rt DMC 01 emg stop gDMCCardNo NodelD SlotID In this example emergency stop is used to stop motion This method guickly 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 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 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 15 Dwell Command 3 15 1 Function List Table 3 15 DMC 01 start ta move DM
195. Slot3 Distance Distance Distance StrVel MaxVel acc dec Linear interpolation motion using relative coordinates with S curve velocity cross section rt DMC 01 start tr move xyz gDMCCardNo gLine3 gSlot3 Distance Distance Distance StrVel MaxVel acc dec I Linear interpolation motion using relative coordinates with T curve velocity cross section Revised March 2012 3 29 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 g STOP Figure 3 46 7 Stop motion Hit the STOP button to execute an emergency stop rt DMC_01_emg_stop gDMCCardNo NodelD 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 8 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 3 30 Revised March 2012 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
196. Spiral Interpolation Motion Control API 22 1 22 1 _DMC_01_start_tr_heli_xy 22 2 22 2 _DMC_01_start_sr_heli_xy 22 4 22 3 DMC 01 _start_ta_heli_xy 22 6 22 4 DMC 01 start sa MEli Xy 22 8 22 5 DMC 01 start v3 Heli Xy 22 10 Chapter 23 Velocity Motion Control API 23 1 23 1 DMC O 1 tv MOVE 23 2 23 2 _DMC_01_sv_move 23 3 Chapter 24 Synchronization Motion Control API 24 1 24 1 _DMC_01_sync_move 24 2 24 2 DMC 01 Sync Move config 24 2 Chapter 25 Remote Module Control API 25 1 25 1 DMC 01 get rm input VAIUB 25 2 25 2 DMC 01 set rm input Filter
197. Start ring 6 2 6 3 A DMC 01 get device table 6 3 6 4 DMC 01 get node table 6 3 6 5 _DMC_01_check_card_running 6 4 6 6 _DMC_01_reset_card 6 4 6 7 _DMC_01_check_nodeno 6 5 6 8 _DMC_01_get_master_connect_status 6 6 6 9 _DMC_01_get_mailbox_Error 6 6 6 10 _DMC_01_get_mailbox_cnt 6 7 6 11 DMC 01 get ASp cnt 6 7 6 12 DMC_01_set_dio_output 6 8 6 13 _DMC_01_get_dio_output 6 8 Revised March 2012 v PCI DMC A01 PCI DMC B01 Programming Manual 6 14 DMC_01_get_dio_input 6 9 6 15 _DMC_01_get_cycle_time
198. Sub index Data1 Data2 Data3 Data4 Command Table description 1 Read Feedback PUU CANopen s Index is set as 0x6064 and Subldx set as 0x00 2 Datatype is set as 0x40 to indicate read 3 Datatype is then returned as 0x43 If the returned Datatype is 0x43 then the data received is 32bit Data1 Data4 all valid If value is 0x4b then the data received is 16bit Data1 Data2 are valid If value is 0x4f then the data received is 8bit Data1 is valid 4 Data1 Data4 fields are read from the low Word first Higher invalid data are all O The value returned by the above table to indicate that it has received Feedback PUU is therefore 0x44332211 When Index write is Success the return value is in the following format Table 8 3 Field ane Datatype Indexlow Indexhigh Subindex Data1 Data2 Data3 Data4 Command Ox2b 0x40 0x60 0x00 0x08 0x00 0x00 0x00 Return 0x60 0x40 0x60 0x00 0x00 0x00 0x00 0x00 Table description 1 Write control code ControlWord CANopen s Index is set as 0x6040 and Subldx set as 0x00 2 Datatype set to 0x2b to indicate write 3 If entered Datatype value is 0x23 this means the data being written is 32bit Data1 Data4 all valid Input value of 0x2b means data being written is 16bit Data1 Data2 are valid Input value of 0x2f means data being written 8bit Data1 is valid 4 If the returned Datatype is 0x60 this means the write was successful Data1 Data4 returne
199. U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID 0 Port 0 port U16 Selection coor 2 Port 2 3 Port 3 Port 0 1 2 3 bitO bit15 software filter Value enable U16 Number 0 OxFFFF E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 Port 0 U16 Enable 0xFF Set bit 0 bit 7 of filter mask for Port 0 of Remote digital input module to ON 116 status DMC 01 set rm input filter enable CardNo NodelD SlotID Port Enable 25 4 Revised March 2012 Chapter 25 Remote Module Control API PCI DMC A01 PCI DMC B01 25 4 DMC 01 set rm output value E FORMAT 116 PASCAL DMC 01 set rm output value U16 CardNo U16 NodelD U16 SlotID U16 port U16 value E Purpose Sets the value for bit 0 to bit 15 ofthe remote I O module s output port H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID 0 Port 0 port U16 Selection TEO 2 Port 2 3 Port 3 Value to set for bit O to bit 15 of Port 0 1 2 3 on value U16 Number y digital output module ON OFF H Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 Port 0 U16 Value 0xF Set bit 0 bit 3 of Port 0 of Remote digital input module to ON 116 status DMC 01 set rm output value CardNo NodelD SlotlD Port Value Revised March 2012 25 5 Chapter
200. Unit Index U16 Number Index of object dictionary Subldx U16 Number Sub index of object dictionary DataType U16 Number Datatype of object dictionary Value0 U16 ui Message buffer Data1 index cow byte CMD High byte Value1 U16 KAL Message buffer Data2 bl High byte index high Low byte Value2 U16 Number Message buffer Data3 Data Low byte Value3 U16 Number Message buffer Data4 Data High byte m Example r CardNo Card No NodelD NodelD SlotID SlotlD Index SDO Index Subldx SDO Subindex DataType Read Command Read data set as 0x40 Write Command Write 8 bit set as 0x2f Write Command Write 16 bit set as 0x2f Write Command Write 32 bit set as Ox23f Value0 SDO data low word Low byte Value1 SDO data low word High byte Value2 GSDO data high word Low byte Value3 GSDO data high word High byte a U16 CardNo 0 NodelD 1 SlotID 0 U16 Index 0x6060 Subldx 0 DataType 0x2f value0 0x1 value1 0 value2 0 value3 0 116 status DMC 01 send message CardNo NodelD SlotID Index Subldx DataType value0 value1 value2 value3 Revised March 2012 8 9 Chapter 8 Using SDO Protocol API PCI DMC A01 PCI DMC B01 8 6 DMC 01 send message3 E FORMAT 116 DMC 01 send message 116 CardNo U16 Index U16 Subldx U16 DataType U16 Value0 U16 Value1 U16 Value2 U16 Value3 E Purpose Sends SDO command message to the data buffer and exits the data buffer once the command is sent H Paramete
201. Unit Description CardNo U16 Number Unit CardNo is between 0 15 E Example U16 CardNo 0 116 status DMC 01 initial bus CardNo 6 2 DMC 01 start ring H FORMAT 116 PASCAL DMC 01 start ring U16 CardNo U8 RingNo E Purpose Starts ring communication E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 RingNo U8 Number Unit Number of ring to operate E Example U16 CardNo 0 U8 RingNo 0 116 status DMC 01 start ring CardNo RingNo 6 2 Revised March 2012 Chapter 6 Interface API PCI DMC A01 PCI DMC B01 6 3 DMC 01 get device table m FORMAT 116 PASCAL DMC 01 get device table U16 CardNo U16 value E Purpose Retrieves the device table H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 value U16 Number Unit Device number table E Example U16 CardNo 0 U16 value 0 116 status DMC 01 get device table CardNo value 6 4 DMC 01 get node table m FORMAT 116 PASCAL DMC 01 get node table U16 CardNo U32 NodelDTable E Purpose Retrieves the Node ID table H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelDTable U32 Number Unit Node ID table E Example U16 CardNo 0 U32 NodelDTable 0 116 status DMC 01 get node table CardNo 8NodelDTable Revised March 2012 6 3 Chapter 6
202. Unit Description CardNo U16 Number Unit CardNo is between 0 15 Page U16 Number Unit Specified memory page number for read array U16 Number Read data from specified memory E Example U16 CardNo 0 U16 Page 0 0 F 16 pages in total U16 array 116 status DMC 01 read security CardNo page amp array 37 2 DMC 01 read security status H FORMAT 116 PASCAL DMC 01 read security status U16 CardNo U16 status E Purpose Reads current read write status of the Master Card H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 status U16 Flag amp H4 Read Only or amp H6 Read Write E Example U16 CardNo 0 U16 status 116 status _DMC_01_read_seacurity_status CardNo amp status 37 2 Revised March 2012 Chapter 37 Security API PCI DMC A01 PCI DMC B01 37 3 DMC 01 write security m FORMAT 116 PASCAL DMC 01 write security U16 CardNo U16 page U16 array E Purpose Writes security data to memory block specified by the Master Card H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 Page U16 Number Unit Specified memory page number for write array U16 Number Security data to write to specified memory E Example U16 CardNo 0 U16 page 0 U16 array 1 4 7 11 0a ff 12 8 0b 10 3 5 c1 14 0d 6 116 status DMC 01 wtite security CardNo page array 37 4 DMC 01 write
203. VE Ky 19 6 19 4 DMC 01 start sa MOVE KXy 19 8 19 5 DMC 01 start V3 MOVE XY 19 10 Chapter 20 2 Axis Arc Interpolation Motion Control API 20 1 20 1 DMC 01 start tr AFC Xy 20 3 20 2 DMC 01 start Sr AFC Xy 20 5 20 3 DMC 01 start ta AFC Xy 20 7 20 4 _DMC_01_start_sa_arc_xy 20 9 20 5 DMC 01 start tr ArC2 Xy 20 11 20 6 _DMC_01_start_sr_arc2_xy 20 13 20 7 DMC 01 start_ta_arc2_xy 20 15 20 8 _DMC_01_start_sa_arc2_xy 20 17 20 9 DMC 01 start tr ArC3 XY 20 19 20 11 _DMC_01_start_ta_arc3_xy 20 23 20 12 _DMC_01_start_sa_arc3_xy
204. Writes user password to Slave 04PlI E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Selection Node ID SlotID U16 Number Unit Slot ID Password_data U32 Number Password change data to be written to memory E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U32 Password_data 116 status misc slave write userpassword CardNo NodelD SlotID Password data 37 8 Revised March 2012 Chapter 37 Security API PCI DMC A01 PCI DMC B01 37 12 misc slave get serialno H FORMAT 116 PASCAL misc slave get serialno U16 CardNo U16 NodelD U16 SlotID U32 Serialno E Purpose Reads Slave 04P1 product serial number H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Selection Node ID SlotID U16 Number Unit Slot ID Serialno U32 Number Read product serial number in memory E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U32 Serialno 116 status misc slave get serialno CardNo NodelD SlotID amp Serialno Revised March 2012 37 9 Chapter 37 Security API PCI DMC A01 PCI DMC B01 37 13 misc security m FORMAT 116 PASCAL misc security U32 OtherWord0 U32 OtherWord1 U32 SyntekWord0 U32 SyntekWord1 U32 Password0 U32 Password1 U32 Password2 U32 Password3 E Purpose Slave 04P1 Feeds user specified 64bit key and 64bit Serialno into
205. Y 50000 DisZ 75000 132 StrVel 0 MaxVel 50000 132 EndVel 20000 F64 TPhase1 0 2 F64 TPhase2 0 1 U16 m curve 1 m r a 0 116 status DMC 01 start sa move xyz CardNo NodelDArray SlotID DisX DisY DisZ StrVel ConstVel EndVel TPhase1 TPhase2 m curve m r a Revised March 2012 21 7 Chapter 21 3 Axis Linear Interpolation Motion Control API PCI DMC A01 PCI DMC B01 This page intentionally left blank 21 8 Revised March 2012 Chapter 22 3 Axis Spiral Interpolation Motion Control API PCI DMC A01 PCI DMC B01 Chapter 22 3 Axis Spiral Interpolation Motion Control API Table 22 1 _DMC_01_start_tr_heli_xy 3 axis Spiral interpolation motion using relative coordinates with T curve velocity cross section DMC 01 start sr heli xy 3 axis Spiral interpolation motion using relative coordinates with S curve velocity cross section DMC 01 start ta heli xy 3 axis Spiral interpolation motion using absolute coordinates with T curve velocity cross section DMC 01 start sa heli xy 3 axis Spiral interpolation motion using absolute coordinates with S curve velocity cross section DMC 01 start v3 heli xy 3 axis Spiral interpolation motion with EndVel added Revised March 2012 22 1 Chapter 22 3 Axis Spiral Interpolation Motion Control API PCI DMC A01 PCI DMC B01 22 1 DMC 01 start tr heli xy E FORMAT 116 PASCAL DMC 01 start tr heli xy U16 CardNo U16 NodelD U16 SlotID 132 Center X 132 Cent
206. _get_int_count 36 4 36 5 DMC 01 get int SEAtUS 36 5 36 6 DMC 01 link interrupt 36 6 Chapter 37 Security API oossssesoeseneeseenennemmmmmmm mmm mmm mmm 37 1 37 1 DMC 01 read Security 37 2 37 2 DMC 01 read security SEAtUS 37 2 37 3 DMC 01 write SeCurity 37 3 37 4 DMC 01 write security status 37 3 37 5 DMC 01 check_userpassword 37 4 37 6 DMC 01 write userpassword 37 4 37 7 DMC 01 Check VeErifyKEy 37 5 37 8 DMC 01 write verifykEy 37 5 37 9 DMC 01 read_serialno 37 6 37 10 misc slave check USerpASSWOrd 37 7 37 11 _misc_slave_write_userpassword
207. _polarity 27 4 27 4 _DMC_01_set_rm_04pi_DO2 27 5 27 5 DMC 01 set rm 0O4pi homing ratiO 27 6 27 6 DMC 01 Odpi set POWEFON 27 7 27 7 DMC 01 rm OAPI get PUFFEr 27 8 Chapter 28 4 Channel Pulse Interface Mode 1 Motion Control API 28 1 28 1 DMC 01 m Odpi md1 start MOvVe 28 3 28 2 DMC 01 mm Odpi md1 Vv MOVE 28 5 28 3 DMC 01 rm Odpi md1 start line2 28 6 28 4 DMC 01 rm Odpi md1 start line3 28 8 28 5 DMC 01 rm Odpi md1 Start line4 28 10 28 6 DMC 01 rm Odpi md1 Start AFC 28 12 28 7 DMC 01 rm Odpi md1 start ArC2 28 14 28 8 DMC 01 rm Odpi md1 start ArC3 28 16 28 9 _DMC_01_rm_04pi_md_1_start_heli 28 18 28 10 _DMC_01_rm_04p
208. a Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 E Example U16 CardNo 0 116 status DMC 01 reset sdo choke CardNo 8 11 DMC 01 get sdo retry history H FORMAT 116 PASCAL DMC 01 get sdo retry history U16 CardNo U32 cnt E Purpose Retrieves the number of SDO resends E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 cnt U32 Frequency Return number of SDO message resends E Example U16 CardNo 0 U32 cnt 0 116 status DMC 01 get sdo retry history CardNo amp cnt 8 14 Revised March 2012 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 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 position value Revised March 2012 9 1 Chapter 9 Point to Point Motion Control Packet Protocol API PCI DMC A01 PCI DMC B01 9 1 DMC 01 set sdo driver speed profile E FORMAT 116 PASCAL DMC 01 set sdo driver speed profile U16 CardNo U16 NodelD U16 SlotID U32 MaxVel F64 acc F64 dec E Purpose Sets the speed profile for packet protocol E Parameters
209. a ad Index Pulse Figure 10 8 35 Homing based on current position Mode 35 uses the current position as the Home 10 6 Revised March 2012 Chapter 10 Homing Motion Control Packet Protocol API PCI DMC A01 PCI DMC B01 10 2 DMC 01 set home move FORMAT 116 PASCAL DMC 01 set home move U16 CardNo U16 NodelD U16 SlotID E Purpose Starts home motion E Parameters NETIS Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 If Slot ID is set to 0 then the Slave is a servo drive 116 status DMC 01 set home move CardNo NodelD SlotID D Oma XAfter executing DMC 01 set home move MDS0 in MC status returned by DMC 01 motion status API can be used to judge the Home status Please set dwell time of 30 100 ms after executing DMC 01 set home move this value can be adjusted based on CPU performance and programming approach before executing DMC 01 motion status to ensure that the data is correct Revised March 2012 10 7 Chapter 10 Homing Motion Control Packet Protocol API PCI DMC A01 PCI DMC B01 10 3 DMC 01 escape home move E FORMAT 116 PASCAL DMC 01 escape home move U16 CardNo U16 NodelD U16 SlotID E Purpose Stops homing motion H Parameters Name Data Type Unit Description CardNo U16 Number Unit
210. able NodelD Timer Checkbox Check to display the motion status Uncheck to disable display 2 Enter the values for acceleration deceleration time and rotations per minute RPM 2 2 Set vel prof Tace 0 1 Tdec 0 1 1 110 RPM Figure 3 27 Tacc item API function s argument variable Tacc Tdec item API function s argument variable Tdec RPM item API function s argument variable rpm Actual RPM is 10 of rpm variable E Set Servo Motor Power ON OFF servo on servo off SYON Kasai STOP gt Figure 3 28 Click on the SVON button to execute the following procedure rt DMC 01 ipo set svon gDMCCardNo NodelD SlotID ON OFF ON OFF 0 Servo Power OFF 1 Servo Power ON g Velocity Motion Control Click on the gt or button to execute the following procedure Set velocity mode parameter value for acceleration and deceleration time rt DMC 01 set velocity mode gDMCCardNo NodelD SlotlD Tacc Tdec Start velocity mode motion rt DMC 01 set velocity gDMCCardNo NodelD SlotlD rpm lf value of RPM is greater than 0 then drive motor rotates clockwise if value is less than 0 then rotates counterclockwise Press the STOP button to execute velocity stop or not Set whether to stop velocity motion control If stop value is 1 then velocity motion stops rt DMC 01 set velocity stop gDMCCardNo NodelD S
211. able 1 U16 jog mode 0 Use RM module IO to select X Y and Z axes 132 jog speed 4 128000 128000 128000 03 Set JOG speed as 128000 pps 0 1 rps F64 sec 0 1 rt DMC 01 set rm jog axes enable CardNo MasterNodelD MasterSlotID NodelD SlotID enable jog mode jog speed sec Motor Node 2 is X axis Node 3 is Y axis Node 4 is Z axis Three axes in total Revised March 2012 Chapter 27 4 Channel Pulse Interface API PCI DMC A01 PCI DMC B01 Chapter 27 4 Channel Pulse Interface API 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 Set homing torque ratio _DMC_01_04pi_set_poweron Set POWER ON SVON level DMC 01 rm 04PI get buffer Get buffered motion command Revised March 2012 27 1 Chapter 27 4 Channel Pulse Interface API PCI DMC A01 PCI DMC B01 27 1 DMC 01 set rm 0O4pi ipulse mode E FORMAT 116 PASCAL DMC 01 set rm O4pi ipulse mode U16 CardNo U16 NodelD U16 SlotID U16 mode E Purpose Sets input phase mode for pulse interface module E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Num
212. acement in absolute coordinates 116 status DMC 01 rm Odpi md1 start line3 CardNo NodelD SlotID Dist StrVel MaxVel Tacc Tdec m curve m r a Revised March 2012 28 9 Chapter 28 4 Channel Pulse Interface Mode 1 Motion Control API PCI DMC A01 PCI DMC B01 28 5 DMC 01 rm 0O4pi md1 start line4 E FORMAT 116 PASCAL DMC 01 rm Od4pi md1 start line4 U16 CardNo U16 NodelD U16 SlotID 132 Dist 132 StrVel 132 MaxVel F64 Tacc F64 Tdec U16 m curve U16 m r a E Purpose Performs 4 axis linear interpolation motion control under RM04PI Mode 1 H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Holds Node ID sets used for linear interpolation SlotID O holds first set of Slot ID SlotID 1 holds second set of Slot ID SlotID U16 Number Unit M Kd A SlotID 2 holds third set of Slot ID SlotID 3 holds fourth set of Slot ID Path parameter corresponding to SlotID 0 motion Path parameter corresponding to SlotID 1 Number of ti Dist 132 u ro motion pulses Path parameter corresponding to SlotID 2 motion Path parameter corresponding to SlotID 3 motion Pulses per StrVel 132 Starting velocity parameter second Pulses per A A MaxVel 132 Maximum velocity parameter second Tacc F64 Second Specified acceleration time Tdec F64 Second Specified deceleration time 1 Referenced against T curve velocity cross section m curve U16 Select
213. alization in Section 3 1 2 Set Servo Node ID and enable motion status display 2 1 Set Node ID NodelD 4 iee Figure 3 115 Enter Node ID and check Timer checkbox to enable motion status display NodelD item API function s argument variable NodelD Timer Checkbox Check to display the motion status Uncheck to disable display Select the control argument value 2 2 04PI setting Mode AB phase CO CwCCw SVON active High active Low active Set Figure 3 116 AB phase item Input Output mode set to AB phase CW CCW item Input Output mode set to CW CCW High active item Trigger when level is high Low active item Trigger when level is low Revised March 2012 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 4 Enterthe values of the arguments for motion control 2 3 Set vel prof P Abs M Curve Stel sg pps Mael pps Acc sec Dec sec 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 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 variab
214. ame _DMC_01_start_tr_heli_xy 3 32 2 Sample Application Program Appearance r Example 2 Select example Example 1 3 Select follow type Norma 7 4 Speed fix gt Start Stop Z Axis Knife Figure 3 160 3 122 Revised March 2012 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 x Card number Slave number Card num Slave num 6 Figure 3 161 Card num item Display number of cards Slave num item Display number of slaves 3 x Example of parameter setting and operation Example 2 Select example Ex ample 1 3 Select follow type Normal 4 Speed 1s v Start Stop Figure 3 162 Select example item Can choose Example1 or Example2 Select follow type item Can choose Normal or Tangent Speed item Select default speed ratio Start item Click on the Start button to execute the following settings DMC 01 start tr heli xy CardNo NodelD SlotlD CenterX CenterY Depth Pitch Dir StartVel MaxVel Tacc Tdec Parameters CardNo Card number NodelD 3 axis Node ID array SlotID 3 axis Slot ID array CenterX Center point X coordinate for circular motion on X Y axes CenterY Center point Y coordinate for circular motion on X Y axes
215. angle _DMC_01_start_ta_arc_xy 2 axis arc interpolation motion using absolute coordinates with T curve velocity cross section Known conditions Center point coordinates angle _DMC_01_start_sa_arc_xy 2 axis arc interpolation motion using absolute coordinates with S curve velocity cross section Known conditions Center point coordinates angle _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 Known conditions Endpoint coordinates angle _DMC_01_start_sa_arc2_xy Revised March 2012 2 axis arc interpolation motion using absolute coordinates with S curve velocity cross section Known conditions Endpoint coordinates angle 20 1 Chapter 20 2 Axis Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 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
216. annel rt DMC 01 set 04ad zero scale gDMCCardNo ADNodelD SlotlD Channel rt DMC 01 get 04ad zero scale status gDMCCardNo ADNodelD SlotlD Channel flag flag 1 means setup incomplete flag 0 means setup completed If the Full option in Fig 3 140 is selected execute the following procedure Adjust maximum value of selected Channel rt DMC 01 set 04ad full scale gDMCCardNo ADNodelD SlotlD Channel rt DMC 01 get 04ad full scale status gDMCCardNo ADNodelD SlotlD Channel flag flag 1 means setup incomplete flag 0 means setup completed 8 x 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 Revised March 2012 3 105 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 DMC 01 start spiral xy DMC 01 start spiral2 xy 3 28 2 Sample Application Program Appearance ii DMC NET XI 1 Initial Card num jail Slave num ja 2 Spiral Data 2 1 Set vel prof Status Center Pulse CMD Center Y Mi Angle 360 Pulse Stivel 1000 Pps i 0x159F 0x15 sec 1 sec 2 2 Parameter Set 2 3 Select mode Abs 7 Curve Spiral C Spiral2 SVON MOVE Stop V Timer Figure
217. arameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID 0 Servo OFF ON_OFF U16 Selection ESN ON H Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 ON OFF 1 116 status DMC 01 ipo set svon CardNo NodelD SlotID ON OFF 13 2 Revised March 2012 Chapter 13 Using PDO Protocol API PCI DMC A01 PCI DMC B01 13 2 DMC 01 get buffer length H FORMAT 116 PASCAL DMC 01 get buffer length U16 CardNo U16 NodelD U16 SlotID U16 bufferLength E Purpose Retrieves the motion command which has yet to be executed H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID bufferLength U16 Integer Un executed motion command E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 bufferLength 116 status Start synchronized motion control command status _DMC_01_sync_move CardNo Get un executed motion commands from each Node status DMC 01 get buffer length CardNo NodelD SlotID amp bufferLength Revised March 2012 13 3 Chapter 13 Using PDO Protocol API PCI DMC A01 PCI DMC B01 13 3 DMC 01 command buf clear H FORMAT 116 PASCAL DMC 01 command buf clear U16 CardNo U16 NodelD U16 SlotID E Purpose Resets dwell time buffe
218. arc to right angle 4 gt B 2 Arc radius A gt B Param F64 Number Unit Relative mode distance StrVel 132 bt letting velocity second MaxVel 132 pee CClaa Wan mumiaice ty second Tacc F64 Second Specified acceleration time Tdec F64 Second Specified deceleration time m_curve U16 Selection HCE 2 S curve marae U16 Sa 0 Relative menon aate 1 Absolute motion displacement 40 4 Revised March 2012 Chapter 40 Linear and Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 m Description Mode Parameter Settings C pos2_x pos2_y pos2_z C pos2_x pos2_y pos2_z B Start A B Start posl x Posl y posl z posl x Posl y posl z Figure 40 4 Mode 0 Perpendicular Figure 40 5 Mode 1 Perpendicular distance from arc to tight angle AB distance from start of arc to right angle C pos2_x pos2_y pos2_z Start B posl_x Posl_y posl_z Figure 40 6 Mode 2 Arc radius A gt B m Example U16 CardNo 0 NodelD 1 SlotID 0 I32 pos1 x 0 132 pos1 y 10000 132 pos1_z 10000 I32 pos2 x 10000 132 pos2 y 10000 132 pos2_z 10000 U16 mode 1 param 3000 132 StrVel 100 MaxVel 5000 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 116 status DMC 01 start rline xyz CardNo 8NodelD amp SlotID pos1 x pos1_y pos1 z pos2 x pos2_y pos2_z mode param StrVel MaxVel Tacc Tdec m curve m r a Revised March 20
219. argument variable acc Dec item Time required to go from maximum velocity to 0 API function s argument variable dec 3 Select motion mode and set motion distance 2 3 Set distance Abs 7 Curve Dist pls Figure 3 127 Revised March 2012 3 91 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 92 6 7 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 Enable or disable Normal Stop Interrupt Normal Stop Interrupt Normal Stop Enable Counter Ea Figure 3 128 Enable item Enables disables Normal Stop Interrupt Normal Stop Counter item Counts number of normal stops after Normal Stop Interrupt is enabled If you wish to use Normal Stop Interrupt you must click on the Enable button and execute the following procedure Enable Interrupt rt DMC 01 int enable gDMCCardNo NodelD Disable Interrupt rt DMC 01 int disable gDMCCardNo NodelD Set Interrupt function to Normal Stop Interrupt rt DMC 01 set int factor gDMCCardNo NodelD 1 1 Normal Stop Triggers after any kind of motion is completed Mode2 2 Next Buffer Triggers when executing Buffer action Mode2 3 Acceleration End Triggers when acceleration
220. art torgue motion DMC 01 set torgue stop Stop torgue motion DMC 01 set torgue velocity limit Set velocity limit in torgue mode Revised March 2012 12 1 Chapter 12 Torque Motion Control Packet Protocol API PCI DMC A01 PCI DMC B01 12 1 DMC 01 set torgue mode H FORMAT 116 PASCAL DMC 01 set torgue mode U16 CardNo U16 NodelD U16 SlotID U16 slope E Purpose Sets the torgue motion control parameter profile slope value E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID Time required to go from 0 to 100 rate slope U16 ms torque E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 slope 500 500 ms 116 status DMC 01 set torgue mode CardNo NodelD SlotID slope 12 2 Revised March 2012 Chapter 12 Torque Motion Control Packet Protocol API PCI DMC A01 PCI DMC B01 12 2 DMC 01 set torgue E FORMAT 116 PASCAL DMC 01 set torgue U16 CardNo U16 NodelD U16 SlotID 116 ratio E Purpose Starts torgue motion H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID Thousandths of rated torque CCW if less than ratio 116 Number rae E zero and clockwise if otherwise E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID
221. ay 1 Node 2 NodelDArray 2 Node 3 SlotID U16 Number Unit Slot ID Absolute center point X coordinate on the Center X 132 Number of pulses AR specified axis Absolute center point Y coordinate on the Center_Y 132 Number of pulses TE specified axis Absolute depth to position on specified axis Depth 132 Number of pulses KA e T height in direction of Z Pitch 132 Number of pulses Absolute height between two spirals 4 i Direction of spiral arc motion Clockwise 1 Dir 116 Selection Counterclockwise 0 StrVel 132 Pulses per second Starting velocity parameter MaxVel 132 Pulses per second Maximum velocity parameter Tacc F64 Second Specified acceleration time Tdec F64 Second Specified deceleration time 22 6 Revised March 2012 Chapter 22 3 Axis Spiral Interpolation Motion Control API PCI DMC A01 PCI DMC B01 m Example U16 CardNo 0 U16 NodelDArray 3 1 2 3 U16 SlotID 3 0 0 0 132 Center X 25000 Center Y 50000 Depth 10000 Pitch 20000 116 Dir 1 132 StrVel 0 MaxVel 50000 F64 Tacc 0 1 Tdec 0 1 116 status DMC 01 start ta heli xy CardNo NodelDArray SlotID Center X Center Y Depth Pitch Dir StrVel MaxVel Tacc Tdec Revised March 2012 22 7 Chapter 22 3 Axis Spiral Interpolation Motion Control API PCI DMC A01 PCI DMC B01 22 4 DMC 01 start sa heli xy H FORMAT 116 PASCAL DMC 01 start sa heli xy U16 CardNo U16 NodelD U16 SlotID 132 Center X 132 Center Y 132 Depth
222. ber Unit Node ID SlotID U16 Number Unit Slot ID mode U16 Selection A asas 1 CW CCW E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 mode 0 Set input phase as AB phase 116 status _DMC_01_set_rm_04pi_ipulse_mode CardNo NodelD SlotlD mode 27 2 Revised March 2012 Chapter 27 4 Channel Pulse Interface API PCI DMC A01 PCI DMC B01 27 2 DMC 01 set rm 04pi opulse mode E FORMAT 116 PASCAL DMC 01 set rm 0O4pi opulse mode U16 CardNo U16 NodelD U16 SlotID U16 mode E Purpose Sets output phase mode for pulse interface module H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID 0 AB phase mode U16 Selection ON 2 Pulse Direction DIR in low level 3 Pulse Direction DIR in high level m Description Mode 2 ll tl a Os Se DIR Mode 3 M A 1 n EE DIR Figure 27 1 Parameter mode function E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 mode 0 Set input phase as AB phase 116 status DMC 01 set rm 04pi opulse mode CardNo NodelD SlotID mode Revised March 2012 Chapter 27 4 Channel Pulse Interface API PCI DMC A01 PCI DMC B01 27 3 DMC 01 set rm 0O4pi svon polarity E FORMAT 116 PASCAL DMC 01 set rm O4pi svon polarity U16 CardNo U16 NodelD U16 SlotID U16 polarity E Purpose Sets POWER ON SVON
223. cceleration time Tdec F64 Second Specified deceleration time Revised March 2012 20 15 Chapter 20 2 Axis Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 m Example U16 CardNo 0 U16 NodelDArray 2 f 1 2 U16 SlotlD 2 0 0 132 End X 50000 132 End Y 50000 132 StrVel 0 132 MaxVel 50000 F64 Angle 180 F64 Tacc 0 1 F64 Tdec 0 1 116 status DMC 01 start ta arc2 xy CardNo NodelDArray SlotID End X End Y Angle StrVel MaxVel Tacc Tdec 20 16 Revised March 2012 Chapter 20 2 Axis Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 20 8 DMC 01 start sa arc2 xy mE FORMAT 116 PASCAL DMC 01 start sa arc2 xy U16 CardNo U16 NodelD U16 SlotID 132 End X 132 End Y F64 Angle 132 StrVel 132 MaxVel F64 Tacc F64 Tdec E Purpose 2 axis arc interpolation motion using absolute coordinates with S curve velocity cross section Known conditions endpoint coordinates angle E Parameters Name Data Type Unit Description Carano U16 NimbeR Unit Node ID oleate used tof motion displacement along X axis and Y axis Holds Node ID sets used for arc interpolation NodelDArray U16 Number Unit NodelDArray 0 holds the 1st set of Node ID NodelDArray 1 holds the 2nd set of Node ID SlotID U16 Number Unit Slot ID Absolute endpoint X coordinate on the End X 132 Number of pulses ae 3 4 specified axis Absolute endpoint Y coordinate on the End Y
224. ce 2 3 Set distance Abs S Curve Dist 12800000 pls Figure 3 70 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 Revised March 2012 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 2 4 Set soft limit N Limit 1500000 P Limit 1500000 EMG Stop z I Soft limit Enable 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 API function s argument variable action Soft limit Checkbox Enables disables software limit 6 If software limit is enabled you must check the Soft limit Enable checkbox and execute the following procedure Start software limit configuration rt DMC 01 enable soft limit gDMCCardNo NodelD SlotID action action argument specifies the stop mode to use when limit is reached A value of 1 means an emergency stop A value of 2 means a slow down stop Set the values for positive and negatives rt DMC 01 set soft limit gDMCCardNo NodelD SlotlD PLimit NLimit PLimi
225. 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 coordinates with T curve velocity cross section DMC 01 start sa move xy 2 axis Linear interpolation motion using absolute coordinates with S curve velocity cross section DMC 01 start v3 move xy 2 axis linear interpolation motion with EndVel added Revised March 2012 19 1 Chapter 19 2 Axis Linear Interpolation Motion Control API PCI DMC A01 PCI DMC B01 19 1 DMC 01 start tr move xy mE FORMAT 116 PASCAL DMC 01 start tr move xy U16 CardNo U16 NodelD U16 SlotID 132 DisX 132 DisY 132 StrVel 132 MaxVel F64 Tacc F64 Tdec E Purpose 2 axis linear interpolation motion using relative coordinates with T curve velocity cross section When setting StrVel make sure that its value is smaller than MaxVel E Parameters Name Data Type Unit Description Node ID of card used for motion displac t CardNo U16 Number Unit A re re ste wren ne along X axis and Y axis Holds Node ID sets used for linear interpolation NodelDArray U16 Number Unit POs NodelDArray 0 holds the 1st set of Node ID NodelDArray 1 holds the 2nd set of Node ID SlotID U16 Number Unit Slot ID Relative path parameter for motion of Node DisX 132 Number of pulses i i gt ID on X axis Relative path parameter for motio
226. ction List 3 51 3 14 2 Sample Application 3 51 Dwell Command 3 55 3 15 1 Function List 3 55 3 15 2 Sample Application 3 55 Change Position 3 57 3 16 1 Function List 3 57 3 16 2 Sample Application 3 57 Change Position 3 60 3 17 1 Function List 3 60 3 17 2 Sample Application 3 60 Revised March 2012 iii PCI DMC A01 PCI DMC B01 Programming Manual 3 18 3 19 3 20 3 21 3 22 3 23 3 24 3 25 3 26 3 27 3 28 3 29 Change Velocity 3 63 3 18 1 Function List
227. ction s argument variable MaxVel Acc item Time required to reach maximum velocity API function s argument variable acc Set homing parameter Homing mode and offset 2 3 Homing setting Mode E Offset 0 Figure 3 19 Mode item Homing modes 1 to 35 API function s argument variable home mode Offset item Homing offsetAPI function s argument variable home offset Set Servo Motor Power ON OFF servo on servo off SYON Move STOP Figure 3 20 Click on the SVON button to execute the following procedure rt DMC 01 ipo set svon gDMCCardNo NodelD SlotID ON OFF I ON OFF 0 Servo Power OFF 1 Servo Power ON Revised March 2012 3 11 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 12 5 Homing operation 7 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 NodelD SlotID home mode home offset StrVel MaxVel acc Start homing motion rt DMC 01 set home move gDMCCardNo NodelD SlotID Stop homing motion If you wish to stop the homing motion operation you must hit the STOP button to execute the following procedure Interrupt homing motion rt DMC 01 escape home move gDMCCardNo NodelD SlotID Exit procedure Click on the Exit button to quit and exit the procedure D
228. 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 torgue Get and return current torgue counter value DMC 01 get current speed Get motion speed DMC 01 get current speed rpm Get current RPM multiplied by 10 Revised March 2012 16 1 Chapter 16 Motion Counter Value API PCI DMC A01 PCI DMC B01 16 1 DMC 01 get command m FORMAT 116 PASCAL DMC 01 get command U16 CardNo U16 NodelD U16 SlotID 132 cmd E Purpose Retrieves the Command counter value H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID Number of cmd 132 i Current value of Command counter pulses H Example U16 CardNo 0 NodelD 1 SlotID 0 132 cmd 116 status DMC 01 get command CardNo NodelD SlotlD amp cmd 16 2 DMC 01 set command m FORMAT 116 PASCAL DMC 01 set command U16 CardNo U16 NodelD U16 SlotID 132 cmd E Purpose Sets the new Command counter value H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID Numb f cmd 132 GS New Command counter value to be set pulses H Example U16 CardNo 0 NodelD 1 SlotID 0 132 cmd 1000000 116 status DMC 01 set command
229. d March 2012 Chapter 23 Velocity Motion Control API PCI DMC A01 PCI DMC B01 Chapter 23 Velocity Motion Control API 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 Chapter 23 Velocity Motion Control API PCI DMC A01 PCI DMC B01 23 1 DMC 01 tv move H FORMAT 116 PASCAL DMC 01 tv move U16 CardNo U16 NodelD U16 SlotID 132 StrVel 132 MaxVel F64 Tacc 116 Dir E Purpose Velocity motion control with T curve velocity cross section H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID Pulses per i A StrVel 132 Starting velocity parameter second Pulses per A MaxVel 132 Maximum velocity parameter second Tacc F64 Second Specified acceleration time A A 0 In positive direction Dir 116 Selection ae 1 In negative direction M Description Max Velocity Start Velocity Acc Time Figure 23 1 Illustration of trapezoidal motion speed constant H Example U16 CardNo 0 NodelD 1 SlotID 0 PDO enable 1 132 StrVel 100 MaxVel 5000 F64 Tacc 0 1 116 Dir 1 116 status DMC 01 tv move CardNo NodelD SlotID StrVel MaxVel Tacc Dir Velocity motion control under PDO mode 23 2
230. d at this time are not applicable 8 2 Revised March 2012 Chapter 8 Using SDO Protocol API PCI DMC A01 PCI DMC B01 5 Data1 Data4 fields use low Word first Higher Data that are invalid is replaced by 0 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 8 3 Chapter 8 Using SDO Protocol API PCI DMC A01 PCI DMC B01 XSample SDO Packet Format for CANopen2 Index Read Write failure When index read is Failed no such index the return value is in the following format Table 8 4 Field Sub Datatype Index low Index high Data1 Data2 Data3 Data4 name index Command 0x40 0x59 0x60 0x00 0x00 0x00 0x00 0x00 Return 0x80 0x59 0x60 0x00 0x00 0x00 0x02 0x06 Table description 1 Read an invalid index Here CANopen s Index is set as 0x6059 and Subldx as 0x00 2 Datatype is set as 0x40 to indicate read 3 There is no such index in the servo so read fails Datatype is then returned 0x80 to indicate read failure 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 When Index writ
231. d data you wish to set Valid data Byte Once you enter the above data click on the Send button to execute the following API function rt DMC 01 send message gDMCCardNo NodelD SlotID Index Subldx DataType Value0 Value1 Value2 Value3 Command for reading SDO protocol COBID Cmd Type DO Di D2 D3 P id IO Read Figure 3 13 Click on the Read button to execute the following procedure Get the returned data for the last SDO command you sent rt DMC 01 read message gDMCCardNo 8Cmd 8 COBID amp DataType 8Value0 amp Value1 amp Value2 amp Value3 You can create some variables to store the data returned by SDO commands For detailed description of the returned data please see Section 8 8 Command for getting SDO protocol NodeID SlotID Index SubldxCOBID Cmd Type DO Di D2 D3 KI QD Figure 3 14 You must enter the corresponding Node ID Object Dictionary OD index and sub index to get the information you want to know from the CANopen interface protocol Once you enter the data click on the Get button to execute rt DMC 01 get message gDMCCardNo NodelD SlotID Index Sublindex amp COBID amp Cmd amp DataType 8 Value0 amp Value1 amp Value2 8 Value3 You can create some variables to store the data returned by SDO commands For detailed description of the returned data please see Section 8 9 Exit procedure Click on the Exit button to quit and exit the procedure
232. dNo U16 NodelD U16 SlotID U32 velocity limit E Purpose Sets the velocity limit in torgue mode H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID velocity_limit U32 Number Velocity limit E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U32 velocity_limit 2000 Set limit for Velocity velocity limit may not exceed 30000 116 status DMC 01 set torgue velocity limit CardNo NodelD SlotID velocity limit Revised March 2012 12 5 Chapter 12 Torque Motion Control Packet Protocol API PCI DMC A01 PCI DMC B01 This page intentionally left blank 12 6 Revised March 2012 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 Set group Revised March 2012 13 1 Chapter 13 Using PDO Protocol API PCI DMC A01 PCI DMC B01 13 1 DMC 01 ipo set svon E FORMAT 116 PASCAL DMC 01 ipo set svon U16 CardNo U16 NodelD U16 SlotID U16 ON OFF E Purpose Sets Servo ON OFF under PDO protocol mode H P
233. di ee 127 Offset Adjustment 15 875 LSBs 4 844mv eer at 126 Offset Adjustment 15 75 LSBs 4 806mv 0 No Adjustment default 127 Offset Adjustment 15 875 LSBs 4 844mv 128 Offset Adjustment 16 LSBs 4 882mv E Example U16 CardNo 0 U16 NodelD 1 U16 Slotld 0 U16 ChannelNo 0 116 Value Oxf Set offset as Oxf 116 status DMC 01 rm 04da set output offset value CardNo NodelD SlotID ChannelNo Value Revised March 2012 29 11 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 E FORMAT 116 PASCAL DMC 01 rm 04da get output offset value U16 CardNo U16 NodelD U16 SlotID U16 ChannelNo 116 Value E Purpose Reads the DA offset value H Parameters Data A TH Name Unit Description Type CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID is between 0 63 SlotID U16 Number Unit 0 ChannelNo U16 Number Unit Channel ID is between 0 3 Value is 127 128 H 1 Step of Value 38 14uv m Adjust the offset of the channel by 16 LSBs to 15 875 LSBs in increments of 1 8 LSB Number Definition 127 Offset Adjustment 15 875 LSBs 4 844mv eae ue selection 126 Offset Adjustment 15 75 LSBs 4 806mv 0 No Adjustment default 127 Offset Adjustment 15 875 LSBs 4 844mv 128 Offset Adjustment 16 LSBs 4 882mv E Exam
234. dinate on the pulses specified axis GS 132 Number of pwsolute center point Y coordinate on the pulses specified axis Angle F64 Degree Set arc angle One full arc is 360 Pulses per StrVel 132 E Starting velocity parameter second Pulses per MaxVel 132 p Tangential velocity parameter second Tacc F64 Second Specified acceleration time Tdec F64 Second Specified deceleration time Revised March 2012 20 7 Chapter 20 2 Axis Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 m Example U16 CardNo 0 U16 NodelDArray 2 1 2 U16 SlotlD 2 0 0 132 Center X 50000 132 Center Y 50000 132 StrVel 0 132 MaxVel 50000 F64 Angle 180 F64 Tacc 0 1 F64 Tdec 0 1 116 status DMC 01 start ta arc xy CardNo NodelDArray SlotID Center X Center Y Angle StrVel MaxVel Tacc Tdec 20 8 Revised March 2012 Chapter 20 2 Axis Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 20 4 DMC 01 start sa arc xy E FORMAT 116 PASCAL DMC 01 start sa arc xy U16 CardNo U16 NodelD U16 SlotID 132 Center X 132 Center Y F64 Angle 132 StrVel 132 MaxVel F64 Tacc F64 Tdec E Purpose 2 axis arc interpolation motion using absolute coordinates with S curve velocity cross section Known conditions center point coordinates angle E Parameters Name Data Type Unit Description Node ID of card used for motion CardNo U16 Number Unit i displacement al
235. e rt _DMC_01_rm_04da_set_output_overrange gDMCCardNo DANodelID SlotID ChannelDA 1 If Set Offset option in Fig 3 137 is selected execute the following procedure Set the entered Offset value in DA rt _DMC_01_rm_04da_set_output_offset_value gDMCCardNo DANodelD SlotID ChannelDA offset If Clear Error option in Fig 3 137 is selected execute the following procedure Clear Error status rt _DMC_01_rm_04da_set_output_error_clear gDMCCardNo DANodelD SlotID ChannelDA 1 If the Conversion Time option in Fig 3 138 is selected execute the following procedure Set Conversion Time mode rt DMC 01 set 04ad conversion time gDMCCardNo ADNodelD SlotlD mode If the Mode option in Fig 3 139 is selected execute the following procedure Revised March 2012 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 Set AD input range mode rt DMC 01 set 04ad input range gDMCCardNo ADNodelD SlotID ChannelAD mode If the Average option in Fig 3 139 is selected execute the following procedure Set AD waveform output calculation freguency rt _DMC_01_set_04ad_average_mode gDMCCardNo ADNodelD SlotID ChannelAD mode For the Data display in Fig 3 139 execute the following procedure Display AD input voltage or current rt _DMC_01_get_04ad_data gDMCCardNo ADNodelD SlotID ChannelAD data If the Zero option in Fig 3 140 is selected execute the following procedure Reset selected Ch
236. e fail The value is out of the set range the return value is in the following format Table 8 5 Field Index i Sub Datatype Index high i DEIGH Data2 Data3 Data4 name low index Command Ox2f 0x60 0x60 0x00 OxOF 0x00 0x00 0x00 Return 0x80 0x60 0x60 0x00 0x30 0x00 0x09 0x06 Table description 1 Write operation mode Here CANopen s Index value is set as 0x6060 and Subldx is set as 0x00 2 Datatype is set as 0x2f to indicate the data being written is 8 bit Data1 is valid 3 As the operating range is between 0x00 0x07 this command is written as operation failed Subsequent datatype then returns a value of 0x80 to indicate write failed 4 The field in above table The above table shows that the data made up of Data1 Data4 is the 0x06090030 Write value out of range error code 5 The Index data length is based on Delta Electronics ASDA A2 CANopen Technical Guide For a detailed explanation please refer to Delta Electronics SDA A2 CANopen Technical Guide s section on SDO Abort Code 8 4 Revised March 2012 Chapter 8 Using SDO Protocol API PCI DMC A01 PCI DMC B01 XSample 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 ae Datatype Indexlow Indexhigh Subindex Data1 Data2 Data3 Command 0x40 0x00 0x23 0x00 0x00 0x00 0x00 0x00 Return 0x4b 0x00 0x23 0x00 0x7F 0
237. e 132 StrVel 132 MaxVel F64 Tacc F64 Tdec U16 m curve U16 m r a E Purpose Performs 2 axis arc interpolation motion control under RM04PI Mode 1 Known conditions endpoint coordinates angle For motion description please see Chapter 20 2 Axis Arc Interpolation Motion Control API H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID 0 holds first set of Slot ID SlotID U16 Number Unit AES s e SlotID 1 holds second set of Slot ID End 0 holds first set of endpoint coordinates Number of End 1525 End 1 holds second set of endpoint pulses 3 coordinates Angle F64 Degree Set arc angle One full arc is 360 Pulses per StrVel 132 gt Starting velocity parameter second Pulses per MaxVel 132 E Maximum velocity parameter second Tacc F64 Second Specified acceleration time Tdec F64 Second Specified deceleration time 1 Referenced against T curve velocity ti m_curve U16 Selection poe ate 2 Referenced against S curve velocity cross section ied U16 SUSA 0 isal ent JD relative coordinates 1 Displacement in absolute coordinates 28 14 Revised March 2012 Chapter 28 4 Channel Pulse Interface Mode 1 Motion Control API PCI DMC A01 PCI DMC B01 m Example U16 CardNo 0 NodelD 1 SlotID 2 0 1 132 End 2 5000 5000 StrVel 0 MaxVel 1000 F64 Tacc 0 1 Tdec 0 1 U16 m curve 1 m_r_a 1 Perf
238. e 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_handle Set the output value returned when remote I O module encounters an error _DMC_01_get_rm_output_value Get output of remote I O module _DMC_01_get_rm_output_value_error_handle Get output of remote I O module and decide whether to retain or discard value if there is an error _DMC_01_set_rm_output_active Enable disable output from remote I O module Revised March 2012 25 1 Chapter 25 Remote Module Control API PCI DMC A01 PCI DMC B01 25 1 DMC 01 get rm input value H FORMAT 116 PASCAL DMC 01 get rm input value U16 CardNo U16 NodelD U16 SlotID U16 port U16 value E Purpose Retrieves the value for bit 0 to bit 15 of the remote I O module s input port H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID 0 Port 0 A 1 Port 1 Port U16 Selection Dean 3 Port 3 Value U16 Number Received data E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 Port 0 U16 Value Data received by Port 0 of Remote digital input module 116 status DMC 01 get rm input value CardNo NodelD SlotID Port amp Value 25 2 Revised March 2012 Chapter 25 Remote Module Control API PC
239. e Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 MasterNodelD U16 Number Unit RM MN64 Node ID used MasterSlotID U16 Number Unit RM MN64 Slot ID used NodelD U16 Number Unit Node ID in use Up to 4 axes SlotID U16 Number Unit Servo Slot ID in use Up to 4 axes Sere U16 A 0 Disable MPG function 1 Enable MPG function Ratio between each click of MPG and pulse pulse_ratio U16 Selection eee 1 Four clicks of MPG produces 1 pulse output 4 One click of MPG produces 1 pulse output Adjust ratio of one full MPG turn to pulse output ratio U32 Number motor rotations sipe U32 Nimke Set Maximum velocity slope for MPG PPS sec Max 1000 26 2 Revised March 2012 Chapter 26 MPG and JOG Operation API PCI DMC A01 PCI DMC B01 m Example 116 rt 0 U16 CardNo 0 MasterNodelD 1 MasterSlotID 0 RM 64 Node ID is 1 U16 NodelD 4 2 3 0 0 SlotID 4 0 Use two ASD A2F servo motors assigned to Node 2 and Node 3 U16 enable 1 pulse_ratio 4 Set ratio of MPG click to output pulse ratio U32 ratio 4 1 1 0 0 Set ratio of one full MPG turn to pulse output motor rotations U32 slope 4 100 Set slope of MPG Maximum velocity to 100 rt DMC 01 set rm mpg axes enable CardNo MasterNodelD MasterSlotID NodelD SlotID enable pulse ratio ratio slope If the same conditions are used in step motor and 04PI the results are as follows One tu
240. e 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 3 Compare Type Select and Polarity settings Polarity High Low Compare Type Type CMP 2 TCount 20001 Figure 3 149 High item Check this item to execute the following settings 0 High rt DMC 01 set compare channel polarity CpCardNo 0 Low item Check this item to execute the following settings 1 Low rt DMC 01 set compare channel polarity CpCardNo 1 Type item Select Compare1 or Compare2 function rt DMC 01 set compare channel source CpCardNo Compare Type CpoaEP Compare_type 0O COMP1 1 COMP2 TCount item Trigger counter 4 MPC parameter settings MPC Inpulse Type AB Phase Cw CCW Reset QEP1 Inverse GEP2 Inverse GEPI GEP2 MPC Count 300000 0 Figure 3 150 Inpulse Type item Select AB Phase or CW CCW mode Execute the following settings rt DMC 01 set compare ipulse mode CpCardNo mode 1 0 AB Phase 1 CW CCW Reset item Click this button to clear MPC Count for AEP1 and QEP2 Execute the following settings rt DMC 01 set compare channel position CpCardNo channel 0 Revised March 2012 3 113 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 114 5 QEP1 Inverse item Reverse Click on this button to execute the following settings rt DMC 01
241. e Sdo command retum error Please check network connection 137 ERR VelChange buff feedh Feedhold function must be enabled first Unable old to change velocity 138 ERR_VelChange_sync_move Waiting for sync command unable to change velocity 139 ERR VelChange SD On Waiting for decelerate command unable to change velocity ERR P Change Mode Single axis point to point mode Acceleration 140 segment s velocity is 0 Non single axis point to point mode When mode is 141 ERR BufferLength Path p change Path velocity change ontfly j _Path_Start_Move_2seg then Buffer Length must be 0 142 ERR_2segMove_Dist Distance must be in same direction 143 ERR_CenterMatch Center must match 144 ERR_EndMatch Center must match 145 ERR_AngleCalcu Angle calculation error 146 ERR_RedCalcu Radius calculation error 147 ERR_GearSetting Gear numerator or denominator is 0 Table Setting First Array Point Error Table 148 ERR_CamTable setting cannot be negative table 1 does not exist 149 ERR AxesNum Number of axes must be set to at least 2 for multiple axes settings 150 ERR_SpiralPos Final position will be the center of the spiral Revised March 2012 2 3 Chapter 2 Command Return Values and Messages PCI DMC A01 PCI DMC B01 2 2 Error Code Example The following example is a return function You can use itas a reference to create new functions that meet your control reguirements E Example Void error unsigned short rc F
242. e the card For a detailed description of card initialization please refer to Open card and Card initialization in Section 3 1 2 3 60 Revised March 2012 2 Revised March 2012 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 Set Servo Node ID and enable motion status display m 2 1 Set Node ID Node ID Slot ID 0 0 Timer Figure 3 88 Input Node ID and check Timer checkbox to enable motion status display NodelD item API function s argument variable NodelD Timer Checkbox Check to display the motion status Uncheck to disable display Enter the values of the arguments for motion control m 2 2 Set vel prof Strel MaxVel pps 1280000 pps Acc 0 1 sec Dec 01 Dist 12800000 pls Figure 3 89 sec LiL 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 Dist item Set motion distance API function s argument variable Distance Enter value of new velocity r Position change New Figure 3 90 New Velocity item Enter value of new velocity API function s argument variable NewSpeed 3 61 Chapter 3 Operating Principles
243. ed to exit this function Please refer to Section 3 12 Exit procedure for the function operations Revised March 2012 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 3 CANopen Protocol 3 3 1 Function List Table 3 3 DMC 01 set pdo mode DMC 01 send message DMC 01 read message DMC 01 get message 3 3 2 Sample Application Program Appearance Ae PCI DMC x Card Num E E i A Slave Num 12 2 CANOPEN operate NodelD SlotID Index Sub Type DO DI D2 D3 rtf Oy oo O 0 0 0 o sen COBID Cmd Type DO Di D2 D3 GA ss sd s i jas gt NodelD SlotID Index Subldx COBID Cmd Type DO Di D2 D3 Mi mi Get 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 A description of this button is provided in Section 3 2 2 Card Initialization and Mode Switching 2 Send SDO protocol command NodelD SlotID Index Sub Type DO DI D2 D3 EE EEE Figure 3 12 Revised March 2012 3 7 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 8 3 5 x x You input the value of the NodelD 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 values The values DO to D3 are used to input the SDO comman
244. eed 3000 F64 sec 0 1 116 status DMC 01 v change CardNo NodelD SlotID NewSpeed sec Revised March 2012 18 7 Chapter 18 1 Axis Motion Control API PCI DMC A01 PCI DMC B01 siin oTE 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 Chapter 18 1 Axis Motion Control API PCI DMC A01 PCI DMC B01 18 7 DMC 01 start tr move 2seg H FORMAT 116 PASCAL DMC 01 start tr move 2seg U16 CardNo U16 NodelD U16 SlotID 132 Dist 132 Dist2 132 StrVel 132 MaxVel 132 MaxVel2 F64 Tacc F64 Tsec F64 Tdec E Purpose 2nd motion displacement using relative coordinates with T curve velocity cross section H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID Dist 132 Number of pulses Relative coordinates for first segment Dist2 132 Number of pulses Relative coordinates for second segment StrVel 132 Pulses per second Starting velocity MaxVel 132 Pulses per second Maximum velocity for first segment MaxVel2 132 Pulses per second Maximum velocity for second segment Tacc F64 Second Specified acceleration time Acceleration deceleration time when Tsec F64 Second switching from first segment to second segment Tdec F64 Second Deceleration time m Descripti
245. eg2 H FORMAT 116 PASCAL DMC 01 start sr move 2seg2 U16 CardNo U16 NodelD U16 SlotID 132 Dist 132 Dist2 132 StrVel 132 MaxVel 132 MaxVel2 F64 Tacc F64 Tsec F64 Tdec E Purpose 2nd motion displacement using relative coordinates with S curve velocity cross section X Motion Buffer will be cleared before this function is executed H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID Number of Dist 132 Relative coordinates for first segment pulses Number of Dist2 132 Relative coordinates for second segment pulses Pulses per gt StrVel 132 Starting velocity second Pulses per i MaxVel 132 Maximum velocity for first segment second Pulses per A MaxVel2 132 Maximum velocity for second segment second Tacc F64 Second Specified acceleration time Acceleration deceleration time when switching Tsec F64 Second from first segment to second segment Tdec F64 Second Deceleration time m Example U16 CardNo 0 NodelD 1 SlotID 0 132 Dist 500000 Dist2 500000 132 StrVel 1000 132 MaxVel 10000 MaxVel2 30000 F64 Tacc 0 1 F64 Tsec 0 1 F64 Tdec 0 1 116 status DMC 01 start sr move 2seg2 CardNo NodelD SlotID Dist Dist2 StrVel MaxVel MaxVel2 Tacc Tsec Tdec 18 16 Revised March 2012 Chapter 18 1 Axis Motion Control API PCI DMC A01 PCI DMC B0
246. endpoint Get endpoint coordinates X Y reguired for arc interpolation misc app get circle center point Get center point coordinates X Y reguired 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 Enter DDA Table data DMC 01 get dda cnt Get number of remaining entries in DDA Table Revised March 2012 42 1 Chapter 42 Other API PCI DMC A01 PCI DMC B01 42 1 _misc_app_get_circle_endpoint mE FORMAT 116 PASCAL misc app get circle endpoint 132 Start X 132 Start Y 132 Center X 132 Center Y F64 Angle 132 End x 132 End y E Purpose Retrieves endpoint coordinates X Y reguired for arc interpolation H Parameters Name Data Type Unit Description Start X 132 Number of pulses Starting X coordinate Start Y 132 Number of pulses Starting Y coordinate Center X 132 Number of pulses Center point s X coordinate Center Y 132 Number of pulses Center point s Y coordinate Angle F64 Degree Set arc angle One full arc is 360 End x 132 Number of pulses Endpoint s X coordinate End y 132 Number of pulses Endpoint s Y coordinate E Example 132 Start X 0 Start Y 0 132 Center X 100000 Center Y 0 132 End x End y F64 Angle 180 116 status misc app get circle endpoint Start X Start Y Cen
247. er 3 Operating Principles PCI DMC A01 PCI DMC B01 3 26 2 Sample Application Program Appearance in DMC NET XI Card num 1 1 Open card Slave num E 2 Driver parameters Page fi i i Write Sync TFEFEEERFE EW ll call all all Gall ii a a a a a a EEEE i Status Read Only Write Enable 3 User Write Password Change Password Serial No Verify Key 4A3FF EF2F7E5F Repeat FE123456 22B5D65B Read Serial No SESFBAB i 346E 3404 ln Change Input User Key lt Pass a 12345678 Make Verily Key 12345678 write Verify Key 4 Check Verify Key Input Verify Key EF2F7ESF 22B5D65B BE9F6A67 946E3404 sire Check Verify Key Exit 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 Revised March 2012 3 95 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 96 2 Start motion card login operation SerialNo Verifykey Memory Read Write all reguire Check Password Pass to operate Password Login JAAN Figure 3 130 Password item Enter two sets of 1 8 bit 0 F hexadecimal values Default motion card passwords Password1 FFFFFFFF Password2 FFFFFFFF Login item Check password Status item If password is correct then Pass is displayed i
248. er Y 132 Depth 132 Pitch 116 Dir 132 StrVel 132 MaxVel F64 Tacc F64 Tdec E Purpose 3 axis Spiral interpolation motion using relative coordinates with T curve velocity cross section E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 Holds Node ID sets used for spiral interpolation NodelDArray 0 Node 1 NodelDArray U16 Number Unit yl0 E NodelDArray 1 Node 2 NodelDArray 2 Node 3 SlotID U16 Number Unit Slot ID E 132 Number of Reale center point X coordinate on the a pulses specified axis Gane y 132 Number of Relalive center point Y coordinate on the g pulses specified axis Depth 132 Number of Reale geen t9 position on specified axis pulses height in direction of Z Number of Pitch 132 Relative height between two spirals pulses Direction of spiral arc motion Clockwise 1 Dir 116 Selection a K Counterclockwise 0 Pulses per StrVel 132 E Starting velocity parameter second Pulses per MaxVel 132 p Maximum velocity parameter second Tacc F64 Second Specified acceleration time Tdec F64 Second Specified deceleration time 22 2 Revised March 2012 Chapter 22 3 Axis Spiral Interpolation Motion Control API PCI DMC A01 PCI DMC B01 m Description Pitch Current Point Cen X CenY Figure 22 1 m Example U16 CardNo 0 U16 NodelDArray 3 1 2 3 U16 SlotID 3 0 0 O 132 Center X 25000 132 Ce
249. er 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 Please see Sample for details N J MotionStep1 Move the three axes to job start point DMC 01 start sa move CardNo NodelD3 0 SlotlD3 0 0 0 MaxVel 0 1 0 1 DMC 01 start sa move CardNo NodelD3 1 SlotID3 1 0 0 MaxVel 0 1 0 1 DMC 01 start sa move CardNo NodelD3 2 SlotID3 2 0 0 MaxVel 0 1 0 1 MotionStep2 Wait for Motion Done and confirm that Step 1 was completed for i 0 i lt 3 i rt i DMC 01 get command CardNo NodelD3 i SlotID3fi 8Cmdfi if rt 0 rt 1 rt 2 0 amp amp Cmd 0 0 amp amp Cmd 1 0 amp amp Cmd 2 0 MotionStep 3 MotionStep3 start 1st step of job straight line _DMC_01_start_ta_move_xy CardNo NodelD2 SlotID2 30000 0 MaxVel 2 MaxVel 0 1 0 1 Revised March 2012 3 127 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 MotionStep4 Wait for first step of job to finish executing rt 0 DMC 01 get command CardNo NodelD3f0 SlotID3 0 8Cmd 0 rt 1 DMC 01 get command CardNo NodelD3 1 SlotID3 1 8Cmd 1 if rt 0 rt 1 0 amp amp Cmd 0 30000 88 Cmde 1 0 MotionStep 5 MotionStep5 Rotate Z axis to keep tool on a tangent or normal rt 0 DMC 01 start tr move
250. er of Dist 132 Specified path pulses Pulses per StrVel 132 E Starting velocity second Pulses per MaxVel 132 2 Maximum velocity second Tacc F64 Second Specified acceleration time Tdec F64 Second Specified deceleration time 1 Referenced against T curve velocity cross section m curve U16 Selection i 2 Referenced against S curve velocity cross section 0 Displacement in relative dinat m ra U16 Selection ne T ae 1 Displacement in absolute coordinates Revised March 2012 28 3 Chapter 28 4 Channel Pulse Interface Mode 1 Motion Control API PCI DMC A01 PCI DMC B01 m Example U16 CardNo 0 U16 NodelD 1 U16 SlotlD 0 132 Dist 1280000 U16 StrVel 1000 MaxVel 12800 F64 Tacc 0 1 Tdec 0 1 U16 m curve 1 U16m r a 0 RM04PI MODE 1 carries out motion displacement in relative coordinates with T curve velocity cross section 116 status _DMC_01_rm_04pi_md1_start_move CardNo NodelD SlotID Dist StrVel MaxVel Tacc Tdec m_curve m_r_a 28 4 Revised March 2012 Chapter 28 4 Channel Pulse Interface Mode 1 Motion Control API PCI DMC A01 PCI DMC B01 28 2 DMC 01 rm 04pi md1 v move H FORMAT 116 PASCAL DMC 01 rm 0O4pi md1 v move U16 CardNo U16 NodelD U16 SlotID 132 StrVel 132 MaxVel F64 Tacc 116 dir U16 m curve E Purpose Performs velocity motion control under RM04PI Mode 1 E Parameters Name Data Type Unit Description CardNo U16 Number Unit Card
251. er 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 32 1 Chapter 32 Parameter Monitoring API PCI DMC A01 PCI DMC B01 32 1 DMC 01 set monitor E FORMAT 116 PASCAL DMC 01 set monitor U16 CardNo U16 NodelD U16 SlotID U16 monitorw E Purpose Sets parameter to monitor H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID monitorw U16 Number Parameter to monitor E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 monitorw 122 Set DMCNET operation time 116 status DMC 01 set monitor CardNo NodelD SlotID monitorw Please see table 32 2 for monitor values 32 2 Revised March 2012 Chapter 32 Parameter Monitoring API PCI DMC A01 PCI DMC B01 E Reference Monitor item Table 32 2 Monitor item Data length index Motor feedback pulse after MA 0 User 32 bit signed integer 2 E electronic gear comparison Pulse command input count 1 after electronic gear User 32 bit signed integer O E comparison Difference between control 2 command pulse and feedback User 32 bit signed integer O E pulse 3 Motor
252. er_point 42 3 42 3 _misc_set_record_debuging 42 4 42 4 _misc_open_record_debuging_file 42 4 42 5 DMC 01 enable dda mode 42 5 42 6 _DMC_01_set_dda_data 42 6 42 7 _DMC_01_get_dda_cnt 42 6 Revised March 2012 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 reguire The following sections will detail how you can incorporate these function libraries into your development environment 1 1 Using the Function Libraries Once you have installed the program you will find two libraries under the lib folder These libraries are intended for use in Visual Studio C or Borland development environments Table 1 1 PCIl_DMC_01 lib Visual Studio C function library BCBPCI_DMC_01 lib Borland C function library 1 2 Edit New Project 1 2 1 Using VC 1 Add the following command to your project include inc VC PCI_DMC_01 h
253. es with T curve velocity cross section Revised March 2012 3 109 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 NodelD 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 For a detailed description of Stop motion please refer to Chapter 14 Stop Motion API 10 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 3 110 Revised March 2012 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 29 Position Compare 3 29 1 Function List Table 3 29 DMC 01 set compare channel position DMC 01 get compare channel position DMC 01 set compare ipulse mode DMC 01 set compare channel direction DMC 01 set compare channel trigger time DMC 01 set compare channel one shot DMC 01 set compare channel source DMC 01 channel0 position cmp DMC 01 channel1 output enable DMC 01 channel1 output mode DMC 01 channel1 get io status DMC 01 channel1 get gpio out DMC 01 channel1 get fifo status DMC 01 channel1 get fifo counter
254. et_compare_channel_polarity 39 18 39 17 DMC 01 channel0 position CMp by GpiO 39 19 39 18 DMC 01 channel1 position re compare table 39 20 39 19 DMC 01 channel1 position re compare table lEvel 39 20 Chapter 40 Linear and Arc Interpolation Motion Control APl 40 1 40 1 DMC 01 start_rline_xy 40 2 40 2 DMC 01 start rlinE XYZ 40 4 40 4 DMC 01 start_v3_rline_xyZ 40 9 Chapter 41 Speed Continue API 0 2 0 0 020 00nenenennnnnnnnennnenenenenenennens 41 1 41 1 _DMC_01_speed_continue 41 2 41 2 _DMC_01_speed_continue_mo0de 41 3 41 3 _DMC_01_speed_continue_combine_ratio 41 5 Revised March 2012 xiii PCI DMC A01 PCI DMC B01 Programming Manual Chapter 42 Other APl 2 77 22 222222 22 22 42 1 42 1 _misc_app_get_circle_endpoint 42 2 42 2 _misc_app_get_circle_cent
255. evised March 2012 15 1 Chapter 15 Motion Status API PCI DMC A01 PCI DMC B01 15 1 DMC 01 motion done H FORMAT 116 PASCAL DMC 01 motion done U16 CardNo U16 NodelD U16 SlotID U16 MC status E Purpose Returns the current stage of motion of the Master Card H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit SlotID U16 Number Unit 0 Stop motion displacement 1 Carry out motion displacement according to acceleration time Most U16 Selection 2 Carry out motion displacement according to 3 Carry out motion displacement according to deceleration time m Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 MoSt 0 15 2 116 status DMC 01 motion done CardNo NodelD SlotID amp MoSt Revised March 2012 Chapter 15 Motion Status API PCI DMC A01 PCI DMC B01 15 2 _DMC_01_motion_status H FORMAT 116 PASCAL DMC 01 motion status U16 CardNo U16 NodelD U16 SlotID U32 MC status E Purpose Returns current motion status of the Master Card H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID Motion status bitO bit15 Byte Tag Description Enable selection O0 3 Mode0 Mode3 mode DI3 SLD status 4 DI3 map 5 WR Alarm message Data error 6 DR message i 7
256. ex of object dictionary COBID U16 Number CAN object ID 0x580 current Node ID DataType U16 Number Datatype of object dictionary Valued U16 Humber Message buffer Data1 Idx low High byte CMD Low byte V U16 KEE Message buffer Data2 Sub Idx High byte Idx high Low byte Value2 U16 Number Message buffer Data3 Data Low byte Value3 U16 Number Message buffer Data4 Data High byte m Example JE CardNo Card No NodelD NodelD Index SDO Index Subldx SDO Subindex DataType Read Command Read data set as 0x40 Write Command Write 8 bit set as Ox2f Write Command Write 16 bit set as 0x2f Write Command Write 32 bit set as 0x23f Value0 SDO data low word Low byte Value1 SDO data low word High byte Value2 SDO data high word Low byte Value3 SDO data high word High word U16 CardNo 0 U16 Cmd COBID DataType Value0 Value1 Value2 Value3 116 status _DMC_01_read_message CardNo amp Cmd amp COBID amp DataType Revised March 2012 8Value0 amp Value1 amp Value2 amp Value3 8 11 Chapter 8 Using SDO Protocol API PCI DMC A01 PCI DMC B01 8 8 DMC 01 read message2 H FORMAT 116 PASCAL DMC 01 read message 116 CardNo U16 NodelD U16 Cmd U16 COBID U16 DataType U16 Value0 U16 Value1 U16 Value2 U16 Value3 U16 cnt E Purpose Reads the last SDO command message into the data buffer and returns the number of reads H Parameters
257. example the value is 3 so delay is 2 3 2 8ms rt DMC 01 start ta move gDMCCardNo NodelD SlotlD Distance StrVel MaxVel acc dec Motion displacement using absolute coordinates with T curve velocity cross section Set Servo Motor Power ON OFF servo on servo off SVON Move Stop Figure 3 82 Click on the SVON button to execute the following procedure rt DMC 01 ipo set svon gDMCCardNo NodelD SlotID ON OFF I ON OFF 0 Servo Power OFF 1 Servo Power ON Start motion control Using point to point motion control as an example Click on the Move button to execute the following procedure rt DMC 01 start ta move gDMCCardNo NodelD SlotlD Distance StrVel MaxVel acc dec Motion displacement using absolute coordinates with T curve velocity cross section Stop motion Hit the STOP button to execute an emergency stop rt DMC 01 emg stop gDMCCardNo NodelD SlotID In this example emergency stop is used to stop motion This method guickly 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 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 Chapter 3 Operatin
258. exist Revised March 2012 6 5 Chapter 6 Interface API PCI DMC A01 PCI DMC B01 6 8 DMC 01 get master connect status E FORMAT 116 PASCAL DMC 01 get master connect status U16 CardNo U16 Protocol E Purpose Retrieves the connection status between the Master Card and the expansion module H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 1 No link to module Node1 Protocol U16 Selection 3 Link with module Node1 normal 4 Link with module Node1 broken E Example U16 CardNo 0 U16 Protocol 0 116 status DMC 01 get master connect status CardNo 8 Protocol 6 9 DMC 01 get mailbox Error H FORMAT 116 PASCAL DMC 01 get mailbox Error U16 CardNo U32 error cnt E Purpose Retrieves the number of MailBox errors H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 error cnt U32 Number Unit Value of MailBox error counter E Example U16 CardNo 0 U32 error cnt 0 116 status DMC 01 get mailbox Error CardNo amp error_cnt 6 6 Revised March 2012 Chapter 6 Interface API PCI DMC A01 PCI DMC B01 6 10 DMC 01 get mailbox cnt M FORMAT 116 PASCAL DMC 01 get mailbox ent U16 CardNo U32 PC cnt U32 DSP cnt E Purpose Retrieves the MailBox counter value H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo i
259. f the value is 0 then the card has not been initialized rt DMC 01 check card running gpDMCCardNoList i amp running if running 0 rt DMC 01 peci initial gpDMCCardNoList i Initialize card if rt 0 AfxMessageBox Can t boot PCI DMC 01 Master Card rt DMC 01 initial bus gpDMCCardNoList i Initialization communications protocol gbpDSPBoot gpDMCCardNoList i true Establish communications Slave num 12 Figure 3 4 Click on the Find slave button to execute the following procedure rt DMC 01 start ring gDMCCardNo 0 Begin communications rt DMC 01 get device table gDMCCardNo 8gpDevicelnfofgDMCCardNo rt DMC 01 get node table gDMCCardNo amp gpSlaveTable 0 gDMCCardNo Once the above procedure has been executed the detected Slave device is displayed in the Slave nun field Revised March 2012 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 DiE _DMC_01_get_device_table gt Get the Slot ID using the PDO protocol Example gpDevicelnfo 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 and 3 exist _DMC_01_get_node_table gt Get Node ID using SDO protocol Example gpSlaveTable 0 gDMCCardNo is a DWORD type variable If its value is 7 the binary form is expressed as 0000 0000 0000 0000 0000 0000 0000 0111 so Slave de
260. feedback pulse ka 32 bit signed integer o am Pulse rev Pulse command input count Number of nat 4 before electronic gear 32 bit signed integer O a comparison Ree 5 E pulses after Number of 32 bit signed integer 0 electronic gear pulses Number of 6 Pulse command input frequency forwarded 16 bit signed integer O a packets K sec 0 1 7 Motor rotation speed revolutions min 32 bit signed integer O a ute 8 Velocity input command 0 01V 16 bit signed integer O a 0 1 9 Velocity input command revolutions min 32 bit signed integer O a ute 10 Torque input command 0 01V 16 bit signed integer O E 11 Torque input command Percentage 16 bit signed integer O a 12 Average torque Percentage 16 bit signed integer O a 13 Peak torque Percentage 16 bit signed integer O a 14 Main circuit voltage BUS Volt TE hiiunsigned E 7 voltage integer Revised March 2012 32 3 Chapter 32 Parameter Monitoring API PCI DMC A01 PCI DMC B01 Monitor item Monitor item Data length index 16 bit unsigned 15 Load motor inertia ratio 0 1 times i Al oO a integer 16 IGBT temperature C 16 bit signed integer O a 16 bit unsigned 17 Resonant frequency Hertz Hanne oO a integer Value at Z phase Home add 18 5000 5000 16 bit signed integer O a Number of pulses 32 bit unsigned 19 Parameter map 1 PO 25 Number oO a
261. function operations Revised March 2012 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 18 Change Velocity 3 18 1 Function List Table 3 18 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 w DMC HET Hai Card num 0 Slave num 0 2 P2P operate 2 1 Set Node ID Status Node ID Slot ID CMD sg pls 0 070 Timer pos a ak 2 2 Set vel prof Lg as Strvel pps SiE C 4 Fleset MaxVel pps ete Lg a a Sec 2nd motion Pee ose anat J ang 2 3 Set distance 2nd vel sis Seg Abs J S Curve Dist 12800000 pls RALM SVIN Stop 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 and Card initialization in Section 3 1 2 Revised March 2012 3 63 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 2 4 3 64 Set Servo Node ID and enable motion status display m 21 Set Node ID Node ID Slot ID 0 0 Timer Figure 3 92 Input Node ID and check Timer checkbox to enable motion status display NodelD item API function s argument variable NodelD Timer Checkbox Check to display the motion sta
262. g Principles PCI DMC A01 PCI DMC B01 3 16 Change Position 3 16 1 Function List Table 3 16 _DMC_01_start_ta_move _DMC_01_p change 3 16 2 Sample Application Program Appearance is DMC NET x ET AAVA A 2 P2P operate 2 1 Set Node ID Status Node ID Slot ID CMD sg pls 0 Le JP Timer pos q pi 2 2 Set vel prof SPD OC g RER Strvel pps nan Lg MaxVel 1280000 pps Motion C g Acc OO sec Position change Dist 12800000 pls RALM SVON Figure 3 83 Reset 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 2 1 Set Node ID Node ID Slot ID 0 EH J Timer Figure 3 84 Revised March 2012 3 57 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 58 Input Node ID and check Timer checkbox to enable motion status display NodelD item API function s argument variable NodelD Timer Checkbox Check to display the motion status Uncheck to disable display Enter the values of the arguments for motion control m 2 2 Set vel prof Stivel pps MaxVel 1280000 pps Acc 0 1 sec Dec 0 1 sec Dist 12800000 pls Figure 3 85 LJ
263. gDMCCardNo NodelD SlotlD Distance StrVel MaxVel acc dec Motion displacement using relative coordinates with S curve velocity cross section rt DMC 01 start tr move gDMCCardNo NodelD SlotID Distance StrVel MaxVel acc dec Motion displacement using relative coordinates with T curve velocity cross section Stop motion Hit the STOP button to execute an emergency stop rt DMC 01 emg stop gDMCCardNo NodelD SlotID In this example emergency stop is used to stop motion This method guickly 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 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 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 24 Get Calculate Arc Information 3 24 1 Function List Table 3 24 _misc_app_get_circle_endpoint _misc_app_get_circle_center_point 3 24 2 Sample Application Program Appearance Revised March 2012 E PCI DMC 1 Initial Card num 0 Slave num O Timer 2 PDO ARC operate 2 1 Coordinate calculation Known Start X 0 Cen X 0 Angle 0 Cale End X RT m Stat_Y 0 Cen Y 0 End Y Known Start X
264. gency stop rt DMC 01 emg stop gDMCCardNo NodelD SlotID In this example emergency stop is used to stop motion This method guickly 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 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 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 8 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 e Q PO P1 Figure 3 32 Fig 3 32 for example shows motion displacement from PO to P1 along a single axis You can choose to use T curve or S curve motion modes based on relative or absolute coordinates for motion displacement 3 8 2 Function List Table 3 8 _DMC_01_ipo_set_svon _DMC_01_start_tr_move DMC 01 start sr move DMC 01 start ta move DMC 01 start sa move DMC 01 sd stop DMC 01 set command DMC 01 set position DMC 01 get command DMC 01 get position DMC 01 get current speed DMC 01 motion status
265. gument variable arc1 cen y Angle item Angle API function s argument variable arc1 angle Arc 2 Interpolation method 2 Must enter the endpoint coordinates X Y and angle 0 to 359 OB End Xitem Endpoint s x coordinate API function s argument variable arc2 end x End Y item Endpoint s Y coordinate API function s argument variable arc2 end y Angle item Angle API function s argument variable arc2 angle Arc 3 Interpolation method 3 Must provide the center coordinates X Y endpoint coordinates X Y and direction Revised March 2012 3 33 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 34 Cen_X item Center s x coordinate API function s argument variable arc3_cen_x Cen Y item Center s y coordinate API function s argument variable arc3 cen y End X item Endpoint s x coordinate API function s argument variable arc3 end x End Y item Endpoint s Y coordinate API function s argument variable arc3 end y Dir item Direction API function s argument variable arc3 dir When this value is 0 the servo motor will rotate clockwise CW When this value is 1 the servo motor will counterclockwise CCW 5 Set Servo Motor Power ON OFF servo on servo off 6 x SYON STOP gt Figure 3 52 Click on the SVON button to execute the following procedure rt DMC 01 ipo set svon gDMCCardNo NodelD SlotID ON OFF I ON
266. he Master Card 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 torgue Get and return the current torgue counter value DMC 01 get current speed Get motion speed DMC 01 get current speed rpm Get current RPM multiplied by 10 DMC 01 set soft limit Set 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 Get status of software positive negative limit during motion 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 cross section DMC 01 start sa move Motion displacement using absolute coordinates with S curve velocity cross section DMC 01 p change Replace current position with new position value DMC 01 v change Replace current motion velocity with new velocity value DMC 01 start tr move 2seg 2nd motion displacement using relative coordinates with T curve velocity cros
267. he data from bit 0 to bit 15 of Port 1 Data cannot be retrieved from Port 0 of ASD DMC RM32MN module as shown in the following figure In Port 1 bit 0 is ON and the remaining bits are OFF ASD DMC RM32MN 00000001 00000000 High Low Mf MMA Mf TO TOTT on Ea Figure 3 97 6 Maintain output port s output status value To maintain the current output until power to the module is turned off use the following procedure rt DMC 01 set rm output value error handle gDMCCardNo gpNodelD gNodeNum 0 port gErrorHandle 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 A value of 1 corresponds to Port 1 The value of the gErrorHandle variable determines whether the system should retain the incorrect output value in the event of an error If the value is 1 system will retain the output value until module is powered off or removed if value is 0 then the incorrect output will be reset to 0 Revised March 2012 3 69 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 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 w DMC NET E x 1 Initial Card num Slave num E 2 MPG CRM I0 status 2 1 Set Servo Node ID 2 2 MPG setting NodelD 1 gt
268. holds 2nd set of Node ID SlotID U16 Number Unit Slot ID center_X 132 Number of pulses Center X coordinate on specified axis center Y 132 Number of pulses Center Y coordinate on specified axis end X 132 Number of pulses Endpoint X coordinate on specified axis end Y 132 Number of pulses Endpoint Y coordinate on specified axis f Direction of spiral arc motion Clockwise 1 dir U16 Selection Counterclockwise 0 circlenum U16 Number Number of circles in spiral motion StrVel 132 Pulses per second Starting velocity parameter ConstVel 132 Pulses per second Constant velocity EndVel 132 Pulses per second End velocity TPhase1 F64 Second Time from StartVel to ConstVel TPhase2 F64 Second Time from ConstVel to EndVel m curve U16 Selection Je 2 S curve A 0 Relative motion displacement m ra U16 Selection 1 Absolute motion displacement Revised March 2012 20 39 Chapter 20 2 Axis Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 m Example U16 CardNo 0 U16 NodelD 2 1 2 U16 SlotlD 2 0 0 132 center x 25000 center y 25000 132 end x 25000 end y 25000 U16 dir 1 circelnum 5 132 StrVel 0 MaxVel 50000 132 EndVel 20000 F64 TPhase1 0 2 F64 TPhase2 0 1 U16 m curve 1 m r a 0 116 status DMC 01 start v3 spiral2 xy CardNo NodelD SlotID center x center y end x end y dir circelnuml StrVel ConstVel EndVel TPhase1 TPhase2 m curve m ra 20 40 Revised March 2
269. i_md1_p_change 28 20 28 11 _DMC_01_rm_04pi_md1_v_change 28 21 28 12 DMC_01_rm_04pi_md1_set_gear 28 22 28 13 DMC 01 rm Odpi md1 set SOft limit 28 23 28 14 DMC 01 rm Odpi md1 get soft limit Status 28 24 28 15 DMC 01 rm Odpi md1 Set SId 28 25 28 16 _DMC_01_rm_04pi_md1_get_mc_error_code 28 26 28 17 DMC 01 set rm O4pi ref COUNtEr 28 27 Chapter 29 4 Channel Analog Output Remote Module API 29 1 29 1 _DMC_01_rm_04da_set_output_value 29 2 29 2 DMC 01 rm Odda get output VAlUB 29 3 x Revised March 2012 PCI DMC A01 PCI DMC B01 Programming Manual 29 3 DMC 01 rm 04da get return COde 29 4 29 4 DMC 01 rm 04da set output range 29 5 29 5 _DMC_01_rm_04da_set_output_enable 29 6 29 6 _DMC_01_rm_04da_set_output_overrange
270. ialization please refer to Open card and Card initialization in Section 3 1 2 Revised March 2012 3 67 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 68 2 When setting the ASD DMC RM32MN module initialization parameters you must 3 4 5 x execute the following procedure rt DMC 01 set rm input filter gDMCCardNo goNodelD gNodeNun 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 A value of 1 corresponds to Port 1 The filter variable sets the level of the software filter A value of 0 means software filter time is 1 ms a value of 1 means filter time becomes 2 ms and so on rt DMC 01 set rm input filter enable gDMCCardNo gpNodelD gNodeNunm 0 port filter enable The filter enable variable has range of 0 0xFFFF It is used to control the software filter mask for bit O to bit 15 on the Port To set the ASD DMC RM32NT module initialization parameters you can execute the following procedure rt DMC 01 get rm output value gDMCCardNo gpNTNode gNTNodeNunm 0 port amp value The value variable shows the number of signals that the RM32NT module is outputting on that port Get slave device type To getthe type of this slave device you must execute the following procedure rt DMC 01 get devicetype gDMCCardNo NodelD SlotlD amp DeviceType 8ldentityObject For a detailed
271. inear interpolation is as shown in Fig 3 30 This is a straight line that starts and PO and ends at P1 in 2 dimensions Velocity is the vector speeds dX dY along the X and Y axes as shown in Fig 3 37 Figure 3 40 3 9 2 Function List Table 3 9 DMC 01 start tr move xy DMC 01 start sr move xy DMC 01 start ta move xy DMC 01 start sa move xy DMC 01 start tr move xyz DMC 01 start sr move xyz DMC 01 start ta move xyz DMC 01 start sa move xyz DMC 01 sd stop 3 26 Revised March 2012 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 9 3 Sample Application Program Appearance x p a Card num Slave num 12 2 PDO multi axes operate J Timer Status CMD MaxVel 0 pps So E EE mai Acc O sec oss m i i Dec 0 see Moon 77 ss gt 2 2 Set distance RESET O Abs O 8 Curve Dist 0 pls SYON 1 STOP gt 2 1 Set vel prof Str el 0 pps 2 3 Select mode Lie C Line 3 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 2 Get Slot ID and enable motion status display Card num FI Slave num 12 2 PDO multi axes operate l C Timer m Status Figure 3 42 Check the Timer checkbox to enable motion
272. ing Principles PCI DMC A01 PCI DMC B01 3 74 2 Set Servo Node ID and enable motion status display 3 5 x x x 2 1 Set Servo Node ID Figure 3 101 Enter Node ID and check Timer checkbox to enable motion status display NodelD item API function s argument variable NodelD NNID item API function s argument variable slotID Timer command checkbox Click to display motion status Click again to turn off display Enter parameter value of manual pulse control 2 2 MPG setting Ratio 1 Slope 10 Pulse ratio 4 MPG Figure 3 102 MN ID item API function s argument variable MNNodelD Ratio item Ratio between each MPG rotation and motor rotation API function s argument variable ratio Slope item MPG speed slope API function s argument variable slope Pulse ratio item Ratio of pulses per MPG revolution API function s argument variable pulse_ratio Enter the argument values for Jog control 2 3 JOG setting Jog spd 128000 Jog mode 0 11 od tt Figure 3 103 Jog spd item Set the Jog speed API function s argument variable jog speed Jog mode item Choose JOG axis API function s argument variable jog mode 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 NodelD SlotID ON OFF I ON OFF 0 Servo Power OFF 1 Servo Power ON Re
273. integer 32 bit unsigned 20 Parameter map 2 PO 26 Number i o E integer 32 bit unsigned 21 Parameter map 3 PO 27 Number Oo a integer 32 bit unsigned 22 Parameter map 4 PO 28 Number i oO E integer 23 Monitored variable 1 PO 09 Number 32 bit signed integer O E 24 Monitored variable 2 PO 10 Number 32 bit signed integer O E 25 Monitored variable 3 PO 11 Number 32 bit signed integer O a 26 Monitored variable 4 PO 12 Number 32 bit signed integer O a Value at Z phase Home after Half circle 27 a a 32 bit signed integer oO m electronic gear comparison Half circle 2 bit unsi 28 Error code Number AL a a integer 16 bit unsigned 39 DI status kaa na integer 16 bit unsigned 40 DO status Asia a integer ee 16 bit unsigned 120 DMCNET communication status Oo a integer 32 bit unsigned 121 DMCNET packet error counter A oO E integer vent 16 bit unsigned 122 DMCNET operation time Second O a integer 32 4 Revised March 2012 Chapter 32 Parameter Monitoring API PCI DMC A01 PCI DMC B01 32 2 DMC 01 get monitor m FORMAT 116 PASCAL DMC 01 set command U16 CardNo U16 NodelD U16 SlotID U32 cmd E Purpose Retrieves value of monitored parameter H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID value U32 Number Current value
274. ion f 2 Referenced against S curve velocity cross section mra U16 Ssieciich 0 Displacement in relative coordinates 1 Displacement in absolute coordinates 28 10 Revised March 2012 Chapter 28 4 Channel Pulse Interface Mode 1 Motion Control API PCI DMC A01 PCI DMC B01 m Example U16 CardNo 0 NodelD 1 SlotlD 4 0 1 2 3 132 Dist 4 10000 20000 30000 40000 132 StrVel 0 MaxVel 3000 F64 Tacc 0 1 Tdec 0 1 U16 m curve 1 m r a 1 Perform motion in absolute coordinates with T curve velocity cross section 116 status DMC_01_rm_04pi_md_1_start_line4 CardNo NodelD SlotID Dist StrVel MaxVel Tacc Tdec m_curve m_r_a Revised March 2012 28 11 Chapter 28 4 Channel Pulse Interface Mode 1 Motion Control API PCI DMC A01 PCI DMC B01 28 6 DMC 01 rm 0O4pi md1 start arc mE FORMAT 116 PASCAL DMC 01 rm O4pi md1 start arc U16 CardNo U16 NodelD U16 SlotlD 132 Center F64 Angle 132 StrVel 132 MaxVel F64 Tacc F64 Tdec U16 m curve U16 m ra E Purpose Performs 2 axis arc interpolation motion control under RM04PI Mode 1 Known conditions center point coordinates angle gt For motion description please see Chapter 20 2 Axis Arc Interpolation Motion Control API H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotlD 0 holds first set of Slot ID SlotID U16
275. ion 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 Soft Limit P Limit 10000 N Limit 1 40000 M Soft Limit Enable Status P Limit N Limit Figure 3 109 P Limit item Value of positive limit API function s argument variable PLimit N Limit item Value of negative limit API function s argument variable NLimit Soft limit Checkbox Enables disables software limit P Limit limit Display contact with positive software limit is ON N Limit item Display contact with negative software limit is ON 7 Setnew position value and execute change of position P Change New Pos 5000 PCh Figure 3 110 New Pos item Value of new position API function s argument variable NewPos PCh item Enable position change Revised March 2012 3 79 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 8 Setthe new velocity deceleration time and enable position change for new position Change New Vel 6000 sec 0 1 VCh 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 PCh item Enable position change 9 Set Servo Motor Power ON OFF servo on servo off Reset r g Powe On r L Raln Output Mode OWCOW
276. ion using relative coordinates with T curve velocity cross section _DMC_01_start_sr_heli_xy 3 axis Spiral interpolation motion using relative coordinates with S curve velocity cross section DMC 01 start ta heli xy 3 axis Spiral interpolation motion using absolute coordinates with T curve velocity cross section DMC 01 start sa heli xy 3 axis Spiral interpolation motion using absolute coordinates with S curve velocity cross section DMC 01 start v3 heli xy DMC 01 tv move Velocity Motion Control API 3 axis Spiral interpolation motion with EndVel added Velocity motion control with T curve velocity cross section _DMC_01_sv_move Synchronization Motion Control API _DMC_01_sync_move Velocity motion control with S curve velocity cross section Start motion sync _DMC_01_sync_move_config Remote I O Module Control API DMC 01 get rm input value Enable disable motion sync Retrieve the value for bit 0 to bit 15 of the remote I O module s input port Revised March 2012 4 7 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 D
277. iption Node ID of card used for moti CardNo U16 Number Unit AGAN displacement along X axis and Y axis Holds Node ID sets used for arc interpolation NodelDArray U16 Number Unit NodelDArray 0 holds the 1st set of Node ID NodelDArray 1 holds the 2nd set of Node ID SlotID U16 Number Unit Slot ID Absolute center point X coordinate on the Center_X 132 Number of pulses BS E specified axis Absolute center point Y coordinate on the Center Y 132 Number of pulses is E specified axis Absolute endpoint X coordinate on the End x 132 Number of pulses be i 2 specified axis Absolute endpoint Y coordinate on the End y 132 Number of pulses Li t E specified axis Specified direction Clockwise if value is 1 Dir 116 Selection CCW if value is 0 StrVel 132 Pulses per second Starting velocity parameter MaxVel 132 Pulses per second Tangential velocity parameter Tacc F64 Second Specified acceleration time Tdec F64 Second Specified deceleration time Revised March 2012 20 23 Chapter 20 2 Axis Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 m Example U16 CardNo 0 U16 NodelDArray 2 1 2 U16 SlotID 2 0 0 I32 Center X 25000 Center Y 25000 132 StrVel 0 MaxVel 50000 132 End x 50000 End y 50000 116 Dir 1 F64 Tacc 0 1 Tdec 0 1 116 status DMC 01 start ta arc3 xy CardNo NodelDArray SlotID Center X Center Y End x End y Dir StrVel MaxVel Tacc Tdec
278. isX 50000 132 DisY 100000 132 StrVel 0 132 MaxVel 50000 F64 Tacc 0 1 F64 Tdec 0 1 116 status DMC 01 start ta move xy CardNo NodelDArray SlotID DistX DistY StrVel MaxVel Tacc Tdec Revised March 2012 19 7 Chapter 19 2 Axis Linear Interpolation Motion Control API PCI DMC A01 PCI DMC B01 19 4 DMC 01 start sa move xy E FORMAT 116 PASCAL DMC 01 start sa move xy U16 CardNo U16 NodelD U16 SlotID 132 DisX 132 DisY 132 StrVel 132 MaxVel F64 Tacc F64 Tdec E Purpose 2 axis linear interpolation motion using absolute coordinates with S curve velocity cross section H Parameters Name Data Type Unit Description Node ID of card used for motion displacement CardNo U16 Number Unit KEAK KAAL along X axis and Y axis Holds Node ID sets used for linear interpolation NodelDArray U16 Number Unit NodelDArray 0 holds the 1st set of Node ID NodelDArray 1 holds the 2nd set of Node ID SlotID U16 Number Unit Slot ID DisX 132 Number of Absolute path parameter for motion of Node pulses ID on X axis DisY 132 Number of Absolute pani parameter for motion of Node pulses ID on Y axis Pulses per StrVel 132 i Starting velocity parameter second Pulses per i MaxVel 132 Maximum velocity parameter second Tacc F64 Second Specified acceleration time Tdec F64 Second Specified deceleration time 19 8 Revised March 2012 Chapter 19 2 Axis Linear Interpolation Motion Control API
279. ised March 2012 7 3 Chapter 7 Servo Drive Parameter Read Write API PCI DMC A01 PCI DMC B01 This page intentionally left blank 7 4 Revised March 2012 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 DMC 01 send message Send SDO command message to data buffer DMC 01 send message3 DMC 01 read message Send SDO command message to data buffer and exit data buffer once command is set 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 buffer DMC 01 reset sdo choke When SDO command is blocked reset SDO DMC 01 get sdo retry history Get number of SDO resends Revised March 2012 8 1 Chapter 8 Using SDO Protocol API PCI DMC A01 PCI DMC B01 8 1 CANopen SDO protocol XSample 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 ER Datatype Index low Index high
280. it CardNo is between 0 15 Password_data U32 Number Enter password to change E Example U16 CardNo 0 U32 Password_data 64bit data 116 status _DMC_01_ write_userpassword CardNo Password data 37 4 Revised March 2012 Chapter 37 Security API PCI DMC A01 PCI DMC B01 37 7 DMC 01 check verifykey m FORMAT 116 PASCAL DMC 01 check verifykey U16 CardNo U32 Verifykey U16state E Purpose Master Card Checks verify key matches H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 Verifykey U32 Number Verify key to check Response after verify key check 0 gt Lock State U16 Flag oie 1 gt Pass E Example U16 CardNo 0 U32 Verifykey 128bit data U16 State 116 status DMC 01 check verifykey CardNo Verifykey amp state 37 8 DMC 01 write verifykey E FORMAT 116 PASCAL DMC 01 write verifykey U16 CardNo U32 Verifykey E Purpose Writes verify key to the Master Card H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 Verifykey U32 Number Verify key data to write E Example U16 CardNo 0 U32 Verifykey 128bit data 116 status DMC 01 write_verifykey CardNo Verifykey Revised March 2012 37 5 Chapter 37 Security API PCI DMC A01 PCI DMC B01 37 9 DMC 01 read serialno E FORMAT 116 PASCAL DMC 01 read serialno U16 CardNo U32 Serialno
281. ith T curve velocity cross section DMC 01 start sa move xy 2 axis Linear interpolation motion using absolute coordinates with S curve velocity cross section DMC 01 start v3 move xy 2 Axis Arc Interpolation Motion Control API 2 axis linear interpolation motion with EndVel added 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 coordinates with S curve velocity cross section Known conditions Center point coordinates angle DMC 01 start ta arc xy 2 axis arc interpolation motion using absolute coordinates with T curve velocity cross section Known conditions Center point coordinates angle DMC 01 start sa arc xy 2 axis arc interpolation motion using absolute coordinates with S curve velocity cross section Known conditions Center point coordinates angle Revised March 2012 4 5 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
282. its value is smaller than MaxVel H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID Dist 132 Number of pulses Specified distance in relative coordinates StrVel 132 Pulses per second Starting velocity MaxVel 132 Pulses per second Maximum velocity Tacc F64 Second Specified acceleration time Tdec F64 Second Specified deceleration time m Description Vipps l Max Velocity Figure 18 1 m Example Start velocity Acc Time Dec Time Motion displacement using relative coordinates with T curve velocity cross section U16 CardNo 0 NodelD 1 SlotID 0 132 Dist 100000 StrVel 0 MaxVel 50000 F64 Tacc 0 1 Tdec 0 1 116 status DMC 01 start tr move CardNo NodelD SlotID Dist StrVel MaxVel Tacc Tdec 18 2 Revised March 2012 Chapter 18 1 Axis Motion Control API PCI DMC A01 PCI DMC B01 18 2 DMC 01 start sr move E FORMAT 116 PASCAL DMC 01 start sr move U16 CardNo U16 NodelD U16 SlotlD 132 Dist 132 StrVel 132 MaxVel F64 Tacc F64 Tdec E Purpose Motion displacement using relative coordinates with S curve velocity cross section Please see Fig 18 2 for more detailed information H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number U
283. ity second TPhase1 F64 Second Time from StartVel to ConstVel TPhase2 F64 Second Time from ConstVel to EndVel m_curve U16 Selection kalda 7 2 GS curve i 0 Relative motion displacement m ra U16 Selection i 1 Absolute motion displacement 19 10 Revised March 2012 Chapter 19 2 Axis Linear Interpolation Motion Control API PCI DMC A01 PCI DMC B01 m Example U16 CardNo 0 U16 NodelDArray 2 0 1 U16 SlotID 2 0 O 132 DisX 50000 132 DisY 100000 132 StrVel 0 132 ConstVel 50000 132 EndVel 20000 F64 TPhase1 0 2 F64 TPhase2 0 1 U16 m curve 1 m r a 0 116 status DMC 01 start v3 move xy CardNo NodelDArray SlotID DistX DistY StrVel ConstVel EndVel TPhase1 TPhase2 m curve m r a Revised March 2012 19 11 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 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 coordinates with S curve velocity cross section Known conditions Center point coordinates
284. lD U16 SlotID U16 data E Purpose Retrieves positive limit status H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Selection Node ID SlotID U16 Number Unit Slot ID Data U16 Flag meee 1 Negative E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 Data 116 status _DMC_01_rm_04pi_get_PEL_polarity CardNo NodelD SlotID amp data Revised March 2012 38 5 Chapter 38 Limit Reversal API PCI DMC A01 PCI DMC B01 This page intentionally left blank 38 6 Revised March 2012 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 DMC 01 set compare channel source Set Trigger to one time enable Compare source DMC 01 channel0 position cmp DMC 01 channel1 output enable Set Compare Type to Compare1 Set Compare2 output to enable disable DMC 01 channel1 output mode Compare2 output mode DMC 01 channel1 get io status
285. lacement 40 6 Revised March 2012 Chapter 40 Linear and Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 m Description V pps Constvel strvel jEndvel Stryel TPhase1 TPhase2 V pps Strvel Strvel Constvel j Endvel l TPhase1 V pps Endel Constvel TPhase2 V pps EndYvel Constvel T Sec TPhase 1 TPhase2 TPhase1 Time of StrVel to ConstVel TPhase2 Time of ConstVel to EndVel TPhase1 TPhase2 Figure 40 7 Explanation of TPhase1 and TPhase2 Mode Parameter Settings C pos2_x pos2_y pos2_z B Start posl_x Posl_y posl_z Figure 40 8 Mode 0 Perpendicular distance from arc to right angle AB C pos2_x pos2_y pos2_z Start B posl_x Posl_y posl_z Figure 40 10 Mode 2 Arc radius AB gt Revised March 2012 C pos2_x pos2_y pos2_z Start A B posl_x Posl_y posl_z Figure 40 9 Mode 1 Perpendicular distance from start of arc to right angle AB gt 40 7 Chapter 40 Linear and Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 40 8 Example U16 CardNo 0 NodelD 1 SlotID 0 132 pos1 x 0 132 pos1 y 10000 I32 pos2 x 10000 132 pos2_y 10000 U16 mode 1 param 3000 I32 StrVel 100 MaxVel 50000 I32 EndVel 20000 F64 TPhase1 0 2 F64 TPhase2 0 1 U16 m_curve 1 m_r_a 0 Set as multi axis motion control using absolute coordinates with T curve velocity
286. lation motion shown in Fig 3 60 t rt DMC 01 start ta move xy gDMCCardNo gLine2 gSlot2 0 edge 0 radius 0 1 0 Deceleration set to 0 rt DMC 01 start ta arc xy gDMCCardNo gLine2 gSlot2 radius edge 90 0 radius 0 0 Acceleration and deceleration set to 0 rt DMC 01 start ta move xy gDMCCardNo gLine2 gSlot2 edge radius edge radius 0 radius 0 0 Acceleration and deceleration set to 0 rt DMC 01 start ta arc xy gDMCCardNo gLine2 gSlot2 edge radius edge 90 0 radius 0 0 Acceleration and deceleration set to 0 rtt DMC 01 start ta move xy gDMCCardNo gLine2 gSlot2 edge radius 2 0 0 radius 0 0 Acceleration and deceleration set to 0 rt DMC 01 start ta arc xy gDMCCardNo gLine2 gSlot2 edge radius 0 90 0 radius 0 0 Acceleration and deceleration set to 0 D rt DMC 01 start ta move xy gDMCCardNo gLine2 gSlot2 radius 0 radius 0 radius 0 0 Acceleration and deceleration set to 0 rt DMC 01 start ta arc xy gDMCCardNo gLine2 gSlot2 radius 0 90 0 radius 0 0 1 Acceleration set to 0 Revised March 2012 3 45 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 V T diagram of actual X axis motion AASIAAT we nn E E Ss es pak sc nea Pr TE t n oo E E a a a N kaso m 7 an aja aasa maana aan aas aaa ga amaan aa sage ass ere CCL aasa aa naaeposadamaas Se SS cee ce Soest he Gece os onooetStsesecddeeds ede ster Ses nese
287. lative coordinates as a reference 116 status DMC 01 start sdo driver r move CardNo NodelD SlotID Position abs rel Revised March 2012 9 5 Chapter 9 Point to Point Motion Control Packet Protocol API PCI DMC A01 PCI DMC B01 This page intentionally left blank 9 6 Revised March 2012 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 Chapter 10 Homing Motion Control Packet Protocol API PCI DMC A01 PCI DMC B01 10 1 DMC 01 set home config H FORMAT 116 PASCAL DMC 01 set home config U16 CardNo U16 NodelD U16 SlotlD U16 Mode 132 offset U16 lowSpeed U16 highSpeed F64 acc E Purpose Sets home configuration H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID Mode U16 Selection Homing mode 1 35 See notes on next page Number of offset 132 Homing offset pulses SS U16 Revolutions Find the velocity parameter used by each limit per minute Range 1 500 pighepecd U16 Revolutions Velocity parameter to use for homing Range per minute 1 2000 acc F64 Second Acceleration
288. lative endpoint Y coordinate on the specified End y 132 Number of pulses axis Specified direction Clockwise if value is 1 Dir 116 Selection N A CCW if value is 0 Pulses per StrVel 132 E Starting velocity parameter second Pulses per MaxVel 132 g Tangential velocity parameter second Tacc F64 Second Specified acceleration time Tdec F64 Second Specified deceleration time Revised March 2012 20 21 Chapter 20 2 Axis Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 m Example U16 CardNo 0 U16 NodelDArray 2 1 2 U16 SlotlD 2 0 0 132 Center X 25000 Center Y 25000 132 StrVel 0 MaxVel 50000 132 End x 50000 End y 50000 116 Dir 1 This value is 1 indicating a clockwise arc interpolation F64 Tacc 0 1 Tdec 0 1 116 status DMC 01 start sr arc3 xy CardNo NodelDArray SlotID Center X Center_Y End x End y Dir StrVel MaxVel Tacc Tdec 20 22 Revised March 2012 Chapter 20 2 Axis Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 20 11 DMC 01 start ta arc3 xy E FORMAT 116 PASCAL DMC 01 start ta arc3 xy U16 CardNo U16 NodelD U16 SlotlD 132 Center X 132 Center Y 132 End X 132 End Y 116 Dir 132 StrVel 132 MaxVel F64 Tacc F64 Tdec E Purpose 2 axis arc interpolation motion using absolute coordinates with T curve velocity cross section Known conditions center point coordinates endpoint coordinates E Parameters Name Data Type Unit Descr
289. le dec Dist item Set motion distance API function s argument variable Distance 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 NodelD SlotID ON OFF I ON OFF 0 Servo Power OFF 1 Servo Power ON 6 Once AB Phase CW CCW as well as High active and Low active have been set click on the Set button to execute the following procedure rt DMC 01 set rm O4pi ipulse mode CardNo NodelD SlotID mode Set input phase mode for pulse interface module rt DMC 01 set rm O4pi opulse mode CardNo NodelD SlotID mode Set output phase mode for pulse interface module rt DMC_01_set_rm_04pi_svon_polarity CardNo NodelD SlotID polarity Set POWER ON SVON level Revised March 2012 3 85 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 7 Start motion control Using point to point motion control as an example 8 9 3 86 x Click on the gt or button to execute the following procedure rt DMC 01 start sa move gDMCCardNo NodelD SlotID Distance StrVel MaxVel acc dec Motion displacement using absolute coordinates with S curve velocity cross section rt DMC 01 start ta move gDMCCardNo NodelD SlotlD Distance StrVel MaxVel acc dec Motion displacement using absolute coordinates with T curve velocity cross section rt DMC 01 start sr move
290. le U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 channelno U16 status 3 116 status DMC 01 get 04ad zero scale status CardNo NodelD SlotID channelno amp status Revised March 2012 30 5 Chapter 30 4 Channel Analog Input Remote I O Module API PCI DMC A01 PCI DMC B01 30 5 DMC 01 set 0dad full scale E FORMAT 116 DMC 01 set 04ad full scale U16 CardNo U16 NodelD U16 SlotID U16 channelno E Purpose Sets AD maximum level for range calibration E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID is 0 12 SlotID U16 Number Unit 0 ChannelNo U16 Number Unit Channel ID is between 0 3 E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 channelno 0 116 status DMC 01 set 04ad full scale CardNo NodelD SlotlD channelno 30 6 Revised March 2012 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 E FORMAT 116 DMC 01 get 04ad full scale status U16 CardNo U16 NodelD U16 SlotID U16 channelno U16 status E Purpose Checks if AD maximum level calibration is complete E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID is 0 12 SlotID U16 Number Unit 0 ChannelNo U
291. led 40 ERR Master Security Wr Security Master Write command failed 41 ERR Master Security Rd Security Master Read command failed 42 ERR Master Security Pw Correct password reguired 50 ERR NonSupport CardVer Master Card version error Please contact T distributor to purchase the correct Master Card 51 ERR_Compare_Source Ver Type B Compare Source selection error oy oe Compare direction error dir must be set to 1 or 0 52 ERR_Compare_Direction 1 ccw 0 cw 112 ERR_RangeError Axis number error 114 ERR_MotionBusy Motion command overlap 116 ERR_SpeedError Maximum velocity set to 0 447 ERR_AccTimeError Acceleration deceleration time greater than 1000 sec 124 ERR_PitchZero Screw displacement parameter pitch set to 0 127 ERR_BufferFull Motion command buffer is full 128 ERR_PathError Motion command error 130 ERR_NoSupportMode Velocity change not supported 132 ERR FeedHold support Feedhold Stop enabled Unable to receive new commands 2 2 Revised March 2012 Error Return xeye Chapter 2 Command Return Error Code Values and Messages PCI DMC A01 PCI DMC B01 Error Description Decimal 133 ERR_SDStop_On Currently executing deceleration stop command Unable to receive new commands 134 ERR VelChange supper Unable to execute velocity change function Feedhold Synch and Deceleration 135 ERR Command set Unable to repeat FeedHold command 136 ERR sdo message chok
292. libration is complete DMC 01 set 04ad full scale Set AD maximum level for range calibration DMC 01 get 04ad full scale status Check if AD maximum level calibration is complete DMC 01 set 04ad conversion time Set AD conversion time DMC 01 get 04ad conversion time Get current AD conversion time DMC 01 get 04ad data Read input voltage DMC 01 set 04ad average mode Set AD average mode DMC 01 get 04ad average mode Get AD average mode DMC 01 set 04ad input enable Slave Data DMC 01 get devicetype DMC 01 get slave version Parameter Monitoring API DMC 01 set monitor Enable disable AD Channel Input feedback Get Slave device type Get Slave device firmware version 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 Alarm Message API DMC 01 set ralm Get servo drive DO message value 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 Multi Axis Motion Control API DMC 01 multi axes move Get number of consecutive errors during Slave communication Set motion control for more than 2 axes _ DMC 01 liner speed master
293. lick on Set Group to execute the following settings rt DMC 01 DMC 01 set group gDMCCardNo NodelD SlotID NodeNum 1 1 Set all selected Node to the same group Clear All Group item When Clear All Group is clicked this will execute the following settings rt DMC 01 set group gDMCCardNo U16 1 0 1 0 10 Clear all group settings on this card Revised March 2012 3 117 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 3 118 Revised March 2012 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 31 Speed Continue 3 31 1 Function List Table 3 31 _DMC_01_speed_continue _DMC_01_speed_continue_mode _DMC_01_speed_continue_combine_ratio 3 31 2 Sample Application Program Appearance ii DMC NET XI 1 Initial Card num 7 Slave num 6 V Timer 2 Speed Continue I S C Enable S C Combine Ratio T00 5 eee POS C S C Mode 5 ee or g 0 Sts ee 0x158F Example Example OOOO a e Figure 3 156 Revised March 2012 3 119 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 120 1 Card initialization 2 Click on the Open card button to sta
294. lotID stop Revised March 2012 3 17 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 6 Display current RPM value rt DMC 01 get rpm gDMCCardNo NodelD SlotID 8 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 and DMC 01 close must be executed to exit this function Please refer to Section 3 12 Exit procedure for the function operations 3 18 Revised March 2012 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 7 Velocity Motion Control 2 3 7 1 Function List Table 3 7 _DMC_01_tv_move _DMC_01_sv_move _DMC_01_emg_stop 3 7 2 Sample Application Program Appearance e PCI DMC xj o Liin Card num O Slave num 2 PDO Move 2 1 Set node id Status NodeID Slot ID CMD a pls 0 0 O Timer FEK a nt 2 2 Set vel prof SPD eee BEE i RESET MaxVel 0 pps Motion aaa OO sec I S Curve SYON STOP ma 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 and Card initialization in Section 3 1 2 2 Set Servo Node ID and enable motion status display 2 1 Set node id Slot ID 0 0 Timer Figure 3 30 Inp
295. lses per NewSpeed 132 5 Velocity parameter to be changed second Specified acceleration deceleration time for sec F64 Second N velocity change E Example U16 CardNo 0 NodelD 1 SlotID 0 132 NewSpeed 3000 F64 sec 0 1 116 status DMC 01 rm 04pi md1 v change CardNo NodelD SlotID NewSpeed sec Revised March 2012 28 21 Chapter 28 4 Channel Pulse Interface Mode 1 Motion Control API PCI DMC A01 PCI DMC B01 28 12 DMC 01 rm 0O4pi md1 set gear mE FORMAT 116 PASCAL DMC 01 rm 0O4pi md1 set gear U16 CardNo U16 NodelD U16 SlotID 116 numerator 116 denominator U16 Enable E Purpose Enables and sets Gear parameters under RM04PI Mode 1 XAs a step motor does not offer an electronic gear ratio this function is used instead H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID numerator 116 Number Unit Electronic gear denominator denominator 116 Number Unit Electronic gear numerator 0 Disable Gear Enable U16 Selection 1 Enable Gear H Example U16 CardNo 0 NodelD 1 SlotID 0 116 numerator 1 denominator 2 U16 Enable 1 116 status DMC 01 rm 0O4pi md1 set gear CardNo NodelD SlotID numerator 28 22 denominator Enable Revised March 2012 Chapter 28 4 Channel Pulse Interface Mode 1 Motion Control API PCI DMC A01 PCI DMC B01
296. lution is completed in axis 1 and axis 2 Dir item The direction of the arc path in axis 1 and axis 2 0 Clockwise 1 Counterclockwise 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 Revised March 2012 3 39 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 40 third axis second axis Current Point first Cen X Cen Y axis Figure 3 57 4 Set Servo Motor Power ON OFF servo on servo off 5 Sepa Figure 3 58 Click on the SVON button to execute the following procedure rt DMC 01 ipo set svon gDMCCardNo NodelD SlotID ON OFF II ON OFF 0 Servo Power OFF 1 Servo Power ON Start spiral interpolation motion control Click on the gt or C button to execute the following procedure rt DMC 01 start sa heli xy gDMCCardNo gHelix gSlot3 helix cen x helix cen y helix depth helix pitch helix dir StrVel MaxVel acc dec III Spiral interpolation motion using absolute coordinates with S curve velocity cross section rt DMC 01 start ta heli xy gDMCCardNo gHelix gSlot3 helix cen x helix cen y helix depth helix pitch helix dir StrVel MaxVel acc dec III Spiral interpolation motion using absolute coordinates with T curve velocity cross section rt DMC 01 start sr heli xy gDMCCardNo gHelix gSlot3 helix_ce
297. m DMC 01 pci initial Initialize this PCI card DMC 01 get card version Interface API DMC 01 initial bus DMC 01 start ring Get motion card version Initialize external bus 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 Check to see if node already exists DMC 01 get master connect status Get the connection status between the Master Card and expansion module DMC 01 get mailbox Error Get number of MailBox errors DMC 01 get mailbox cent Get MailBox counter value DMC 01 get dsp cent Get Interrupt counter value DMC 01 set dio output Set GPIO output pin status DMC 01 get dio output Get GPIO output pin status DMC 01 get dio input DMC 01 get cycle time DMC 01 initial bus2 Get GPIO input pin status Get current cycle time for finding checking devices Initialize all external bus DMC 01 motion cnt Servo Drive Parameter Read Write API DMC 01 read Sservo parameter Get MailBox and DSP counter values Read servo drive parameter DMC 01 write servo parameter Use SDO protocol API _DMC_01_check_canopen_lock Write servo drive parameter Under SDO mode check to see if next command can be executed _DMC 01 get can
298. me 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 When mode is set to 0 MaxVel Tacc and Tdec are reduced proportionally Carry out with equivalent acceleration Fig 41 1 shows the original path in black and the actual path in red Tacc 0 1 Tdec 0 1 Figure 41 1 Revised March 2012 41 3 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 So when mode is 1 Tac and Tdec will stay as 0 1 but MaxVel is automatically reduced Fig 41 2 shows the original path in black and the actual path in red o gt Tace D 1 Tdec 0 1 Tacc 0 1 Tdec 0 1 Figure 41 2 Modeis 2 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 When mode is 2 MaxVel will remain unchanged but Tacc and Tdec will vary as reguired Fig 41 3 shows the original path in black and the actual path in red 2 0 0 0 Tacc 0 1 Tdec 0 1 Tacc Tdec
299. mer provided Userkey to generate four sets of VerifyKey Write Verify Key item Write the generated Verifykey to the motion card Status item If Verifykey is successfully written then Write Done appears in the status display If write fails then Failed appears in the status display g Check Verify key Input Verify Key EF2F7E5F 22B5D65B Sync BE 9F6467 946E3404 Check Verify Key Figure 3 133 Input Verify key item Enter the motion card Verify key to check Sync item Copy the Verify key value generated by the above procedure to the Input Verify key field Check Verify key item Check Verify Key If the Key value is correct then Check Pass appears in the status display If Key value is wrong then Lock appears in the status display Revised March 2012 3 97 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 6 Check Verify key 3 98 7 Page 1 l j Write Sync am 7 fe ft a fe ee 7 fw ss aa eB cc oo fee FF 2 a eee E N O E i i op i ie Status ReadOnly 0090 Write Enable 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 The status bar will now display Write Read Sync item Clicking on Sync button copies the value from the Read to W
300. message 8 13 8 10 _DMC_01_reset_sdo_choke 8 14 8 11 DMC 01 get sdo retry HiStOry 8 14 Chapter 9 Point to Point Motion Control Packet Protocol API 9 1 9 1 DMC 01 set sdo driver speed prOfile 9 2 9 2 DMC 01 start sdo driver_r_move 9 3 9 3 DMC 01 start sdo driver 9 MOVE 9 4 9 4 DMC 01 start sdo driver new position MOvVe 9 5 Chapter 10 Homing Motion Control Packet Protocol API 10 1 10 1 DMC_01_set_home_config 10 2 10 2 _DMC_01_set_home_move 10 7 10 3 _DMC_01_escape_home_move 10 8 Chapter 11 Velocity Motion Control Packet Protocol API 11 1 11 1 _DMC_01_set_velocity_mode 11 2 11 2 DMC 01 set VEIOGity
301. ming ratio H FORMAT 116 PASCAL DMC 01 set rm O4pi homing ratio U16 CardNo U16 NodelD U16 SlotID U16 ratio E Purpose Sets the rated torgue multiplier for Homing mode When using RMO4PI to carry out Homing motion this executes DMC 01 set home config function The velocity parameter of the function has type of unsigned short 16 bit so Maximum velocity can only be set up to 65535 to use a velocity higher than 65535 the _DMC_01_set_rm_04pi_homing_ratio function must be used H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID ratio U16 Number Unit Home velocity gain ratio E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 27 6 U16 ratio 100 Execute DMC 01 set home config function to carry out Homing motion Function parameter lowSpeed has a value of 200 and highSpeed has a value of 2000 The ratio here is 100 The actual velocity of RMO4PI during Homing motion is then lowSpeed ratio 200 100 2000 _ highSpeed ratio 2000 100 200000 116 status DMC 01 set rm 04pi homing ratio CardNo NodelD SlotlD ratio Revised March 2012 Chapter 27 4 Channel Pulse Interface API PCI DMC A01 PCI DMC B01 27 6 DMC 01 Odpi set poweron E FORMAT 116 PASCAL DMC 01 Od4pi set poweron U16 CardNo U16 NodelD U16 SlotID U16 ON OFF E Purpose Enables disable
302. n 2 4 Chapter 3 Operating Principles 02 s0 00nssncennnnnnnnnnnncennnncnennnsanennans 3 1 3 1 Card Initialization n 3 1 3 1 1 Function List 3 1 3 1 2 Sample Application 3 1 3 2 Read Write Driver Parameters 3 4 3 2 1 Function List 3 4 3 2 2 Sample Application 3 4 3 3 CANopen Protocol 3 7 3 3 1 Function List essent 3 7 3 3 2 Sample Application 3 7 3 4 Homing Motion Control 3 9 3 4 1 OvervieW 3 9 3 4 2 Function List 3 10 3 4 3 Sample Application 3 10 3 5 Torque Motion Control nnn nnn nnn enn 3 13 3 5 1 Function List 3 13 3 5 2 Sample Application 3 13 3 6 Velocity Motion Control 1
303. n Control API 17 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 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 DMC 01 start sa move DMC 01 start ta mov DMC 01 start sr move DMC 01 start tr move DMC 01 set rm Odpi ipulse mode DMC 01 set rm Od4pi opulse mode DMC 01 set rm O4pi svon polarity DMC 01 set monitor DMC 01 get monitor DMC 01 send message 3 23 2 Sample Application Program Appearance fe PCI DMC xi Alita Card num 7 Slave num 7 Exit 2 RMO4PI 10 status 2 1 Set Node ID 2 3 Set vel prof NodelD 7 A Abs M SCurve Stivel 0 pps 2 2 04PI setting MaxVel s pore A 128000 PPS 5 AB phase Acc sec ilis Dec o SVON active Dist 12900000 pls Do1 D02 High active C Low active Set Status r SVON Stop Figure 3 114 Revised March 2012 3 83 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 1 Card initialization 2 3 84 x x 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 initi
304. n control with added EndVel DMC 01 start v3 rline xyz DMC 01 speed continue 3 axis linear arc interpolation motion control with added EndVel Speed Continue API Get endpoint coordinates X Y required for arc interpolation _DMC_01_speed_continue_mode Get center point coordinates X Y required for arc interpolation _DMC_01_speed_continue_combine_ratio 4 12 Is Debug log function enabled Revised March 2012 Chapter 4 Control API PCI DMC A01 PCI DMC B01 Other API misc app get circle endpoint Get endpoint coordinates X Y reguired for arc interpolation misc app get circle center point Get center point coordinates X Y reguired 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 Enter DDA Table data DMC 01 get dda cnt Get number of remaining entries in DDA Table Revised March 2012 4 13 Chapter 4 Control API PCI DMC A01 PCI DMC B01 This page intentionally left blank 4 14 Revised March 2012 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 run DMC 01 close Release all system resource
305. n of Node DisY 132 Number of pulses E j ID on Y axis StrVel 132 Pulses per second Starting velocity parameter MaxVel 132 Pulses per second Maximum velocity parameter Tacc F64 Second Specified acceleration time Tdec F64 Second Specified deceleration time 19 2 Revised March 2012 Chapter 19 2 Axis Linear Interpolation Motion Control API PCI DMC A01 PCI DMC B01 m Description As shown in Fig 19 1 2 axis linear interpolation means Position moving by X and Y from PO to P1 The two axes will start and end at the same time Motion displacement will also be on the same straight line Y Axis Y Axis X Axis K Axis Figure 19 1 Figure 19 2 The relationship between speed ratio and velocity when moving along the X and Y axes DistX DistY is as follows AP 222 A 282 At At At From the above as shown in Fig 19 2 it can be seen that the relationship between Maximum velocity MaxVel speed of X axis speed X and speed of Y axis speed Y is as follows MaxVel x Dist X MaxVel x Dist Y Speed x Speed Y _ _ Dist Dist m Example U16 CardNo 0 U16 NodelDArray 2 1 2 U16 SlotID 2 0 0 132 DisX 30000 132 DisY 40000 132 StrVel 0 132 MaxVel 3000 F64 Tacc 0 1 F64 Tdec 0 1 116 status DMC 01 start tr move xy CardNo NodelDArray SlotID DistX DistY StrVel MaxVel Tacc Tdec When MaxVel is set as 3000RPM speed X is then 1800RPM speed Y is 2400RPM Revi
306. n servo off Click on the SVON button to execute the following procedure rt DMC 01 ipo set svon gDMCCardNo NodelD SlotID ON OFF I ON OFF 0 Servo Power OFF 1 Servo Power ON 5 If you wish to execute Manual Motion Control 1 you must check the MPG checkbox and execute the following procedure rt DMC 01 get rm input value CardNo NodelD SlotID Port amp 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 MasterNodelD MasterSlotID NodelD SlotID enable pulser ratio ratio slope Manual motion control 1 If you wish to execute Manual Motion Control 2 you must check the MPG2 checkbox and execute the following procedure rt DMC 01 set rm mpg axes enable2 CardNo MasterNodelD MasterSlotID NodelD SlotID enable pulser ratio ratio slope denominator Manual motion control 2 ratio is the numerator for motor rotations per revolution denominator is the denominator for motor rotations per revolution These two parameters can be used to customize the MPG outputs Revised March 2012 3 71 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 72 6 Stop manual position control 8 x x If you wish to stop using the MPG simply uncheck the MPG or MPG2 checkboxes Reset SERVON status If you wish to reset the SERVON status you must uncheck the MPG or
307. n the status below If password is wrong Failed appears in the status display Change motion card password Change Password E ee Repeat E ooo o o Change Figure 3 131 Change Password item Enter two sets of 1 8 bit O F hexadecimal values Repeat item Enter the two sets of 1 8 bit 0 F hexadecimal values again Same inputs as Change Password Change item Click on Change button to change password Status item If the passwords entered in Change Password and Repeat are the same then when the Change button is clicked the password is successfully changed and Pass appears in the status display If the passwords entered in Change Password and Repeat do not match Please rewrite it appears in the status display in which case please try Change Password again Revised March 2012 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 4 Setup Verifykey Serial No Verify Key 4A3FF EF2F7E5F FE123456 2285D65B Read Serial No BESFEAG 946E 3404 Input User Key 12345678 2345678 Make Verify Key 12345678 Write Verify Key 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 O F hexadecimal values as the Key values Verify key display The generated verifykey is displayed here Make Verify Key item Encrypt the SerialNo and custo
308. n_x helix cen y helix depth helix pitch helix dir StrVel MaxVel acc dec I II Spiral interpolation motion using relative coordinates with S curve velocity cross section rt DMC 01 start tr heli xy gDMCCardNo gHelix gSlot3 helix_cen_x helix cen y helix depth helix pitch helix dir StrVel MaxVel acc dec I Spiral interpolation motion using relative coordinates with T curve velocity cross section Revised March 2012 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 NodelD SlotID In this example emergency stop is used to stop motion This method guickly 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 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 41 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 sguare path with rounded corners PCI DMC A01 supports using the 20 unit software FIFO in Motion ASIC for motion control during continuous inter
309. nc_move_config Enable disable motion sync Revised March 2012 24 1 Chapter 24 Synchronization Motion Control API PCI DMC A01 PCI DMC B01 24 1 DMC 01 sync move m FORMAT 116 PASCAL _DMC_01_sync_move l16 CardNo E Purpose Starts motion sync H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 E Example U16 CardNo 0 116 status DMC 01 sync move 116 CardNo 24 2 DMC 01 sync move config H FORMAT 116 PASCAL DMC 01 sync move config 116 CardNo U16 NodelD U16 SlotID 116 enable E Purpose Enables disables motion sync H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID A 0 Disable sync enable 116 Selection 1 Enable sync H Example U16 CardNo 0 NodelD 1 SlotlD 0 116 enable 1 116 status DMC 01 sync move config 116 CardNo U16 NodelD U16 SlotlD 116 enable 24 2 Revised March 2012 Chapter 25 Remote Module Control API PCI DMC A01 PCI DMC B01 Chapter 25 Remote Module Control API 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 th
310. nel1 set gpio out U16 CardNo U16 on off E Purpose Sets GPIO output pin status E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 0 Off On_ off U16 Number Unit 1 On E Example U16 CardNo 0 U16 On_off 1 116 status DMC 01 channel1 set gpio out CardNo on off 39 14 Revised March 2012 Chapter 39 Compare API PCI DMC A01 PCI DMC B01 39 13 DMC 01 channel1 position compare table m FORMAT 116 PASCAL DMC 01 channel1 position compare table U16 CardNo 132 pos table U32 table size E Purpose Sets Compare2 to standard Compare data E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 Calculate the Pos Table for compare based on the Pos table 132 Number Unit i given data Table_size U32 Number Unit Size of Pos_table to Compare H Example U16 CardNo 0 I32 Pos table 4 1000 2000 3000 4000 U32 Table size 50000 116 status DMC 01 channel1 position compare table t CardNo pos table table size Revised March 2012 39 15 Chapter 39 Compare API PCI DMC A01 PCI DMC B01 39 14 DMC 01 channel1 position compare table level E FORMAT 116 PASCAL DMC 01 channel1 position compare table level U16 CardNo 132 pos table U32 level table U32 table size E Purpose Sets Compare2 to custom Compare data E Parameters
311. nit Slot ID Dist 132 Number of pulses Specified distance in relative coordinates StrVel 132 Pulses per second Starting velocity MaxVel 132 Pulses per second Maximum velocity Tacc F64 Second Specified acceleration time Tdec F64 Second Specified deceleration time m Description Vipos Max Velocity Acc Time Figure 18 2 Motion displacement using relative coordinates with S curve velocity cross section E Example U16 CardNo 0 NodelD 1 SlotID 0 132 Dist 100000 StrVel 0 MaxVel 30000 F64 Tacc 0 1 Tdec 0 1 116 status DMC 01 start sr move CardNo NodelD SlotID Dist StrVel MaxVel Tacc Tdec Revised March 2012 18 3 Chapter 18 1 Axis Motion Control API PCI DMC A01 PCI DMC B01 18 3 DMC 01 start ta move H FORMAT 116 PASCAL DMC 01 start ta move U16 CardNo U16 NodelD U16 SlotID 132 Dist 132 StrVel 132 MaxVel F64 Tacc F64 Tdec E Purpose Motion displacement using absolute coordinates with T curve velocity cross section H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID Number of Dist 132 Specified distance in absolute coordinates pulses Pulses per StrVel 132 Starting velocity second Pulses per A s MaxVel 132 Maximum velocity second Tacc F64 Second Specified acceleration time Tdec F64 Second Specified deceleration time
312. nt value ofthe target position H Parameters NETIS Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID paS 32 Number of Position counter value for current position see pulses the Notes below for explanation E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 132 pos 0 116 status DMC 01 get target pos CardNo NodelD 8pos siin oTE XAfter issuing a motion command if you are relying on DMC 01 get target pos to return the pos so you can decide the next step put in a delay of 10 100ms this value can be adjusted based on CPU performance and programming approach before executing DMC 01 get target pos to ensure that the data is correct 16 4 Revised March 2012 16 6 DMC 01 get torgue E FORMAT Chapter 16 Motion Counter Value API PCI DMC A01 PCI DMC B01 116 PASCAL DMC 01 get torgue U16 CardNo U16 NodelD U16 SlotID U16 torque E Purpose Retrieves and returns the current torgue counter value H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID torque U16 Number Current torque E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 torgue 116 status DMC 01 get torgue CardNo NodelD SlotID 8torgue Revised March 2012 16 5
313. nter Y 50000 132 Depth 10000 132 Pitch 20000 116 Dir 1 Value is 1 indicating a spiral arc motion in the clockwise direction 132 StrVel 0 132 MaxVel 50000 F64 Tacc 0 1 F64 Tdec 0 1 116 status DMC 01 start tr heli xy CardNo NodelDArray SlotID Center X Center Y Depth Pitch Dir StrVel MaxVel Tacc Tdec Revised March 2012 22 3 Chapter 22 3 Axis Spiral Interpolation Motion Control API PCI DMC A01 PCI DMC B01 22 2 DMC 01 start sr heli xy E FORMAT 116 PASCAL DMC 01 start sr heli xy U16 CardNo U16 NodelD U16 SlotlD 132 Center X 132 Center Y 132 Depth 132 Pitch 116 Dir 132 StrVel 132 MaxVel F64 Tacc F64 Tdec E Purpose 3 axis Spiral interpolation motion using relative coordinates with S curve velocity cross section E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 Holds Node ID sets used for spiral interpolation NodelDArray 0 Node 1 NodelDArray U16 Number Unit yl0 E NodelDArray 1 Node 2 NodelDArray 2 Node 3 SlotID U16 Number Unit Slot ID E 132 Number of Reale center point X coordinate on the a pulses specified axis Gane y 132 Number of Relalive center point Y coordinate on the g pulses specified axis Depth 132 Number of Reale geen t9 position on specified axis pulses height in direction of Z Number of Pitch 132 Relative height between two spirals pulses Direction of spiral arc
314. nter values for slope and ratio m 2 2 Set vel prof 1000 milliseconds 50 11000 rated torque Figure 3 23 Slope item Time required to go from 0 to 100 rate torque Unit ms Ratio item Thousandths of rated torque For example a value of 100 represents 10 of rated torque Set Servo Motor Power ON OFF servo on servo off SYON z STOP gt Figure 3 24 Click on the SVON button to execute the following procedure rt DMC 01 ipo set svon gDMCCardNo NodelD SlotID ON OFF II ON OFF 0 Servo Power OFF 1 Servo Power ON Torgue Motion Control Click on the gt or button to execute the following procedure Set torque parameter slope value rt DMC 01 set torgue mode gDMCCardNo NodelD SlotID slope Start torque motion rt DMC 01 set torgue gDMCCardNo NodelD SlotlD ratio f ratio is greater than 0 the motor rotates clockwise If ratio is less than 0 the motor rotates counterclockwise Press the STOP button to execute torgue stop or not Whether the motor s torgue motion has stopped or not depends on the Stop value If Stop value is 1 then torque motion has stopped rt DMC 01 set torgue stop gDMCCardNo NodelD SlotlD stop Display current torgue value rt DMC 01 get torgue gDMCCardNo NodelD SlotID 8torgue torque variable will return current torque value Revised March 2012 Chapter 3 Operating Principles PCI DMC A0
315. ntrol API PCI DMC A01 PCI DMC B01 18 14 DMC 01 start sa move 2seg2 H FORMAT 116 PASCAL DMC 01 start sa move 2seg2 U16 CardNo U16 NodelD U16 SlotID 132 Dist 132 Dist2 132 StrVel 132 MaxVel 132 MaxVel2 F64 Tacc F64 Tsec F64 Tdec E Purpose 2nd motion displacement using absolute coordinates with S curve velocity cross section gt lt Motion Buffer will be cleared before this function is executed H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID Number of Dist 132 Absolute coordinates for first segment pulses i Number of l Dist2 132 Absolute coordinates for second segment pulses Pulses per StrVel 132 5 Starting velocity second Pulses per i MaxVel 132 Maximum velocity for first segment second Pulses per A MaxVel2 132 Maximum velocity for second segment second Tacc F64 Second Specified acceleration time Acceleration deceleration time when switching Tsec F64 Second from first segment to second segment Tdec F64 Second Deceleration time m Example U16 CardNo 0 NodelD 1 SlotID 0 132 Dist 500000 Dist2 500000 132 StrVel 1000 132 MaxVel 10000 MaxVel2 30000 F64 Tacc 0 1 F64 Tsec 0 1 F64 Tdec 0 1 116 status DMC 01 start sa move 2seg2 CardNo NodelD SlotiD Dist Dist2 StrVel MaxVel MaxVel2 Tacc Tsec Tdec 18 18 Revised March
316. observe the contact with positive negative limits during point to point motion control you can execute the following procedure Observe feedback status from contact with positive negative limits rt DMC 01 get soft limit status gDMCCardNo NodelD SlotID amp PLimit_sts 8NLimit sts In the figure below the left side indicates no contact with positive negative limits during motion the center indicates contact with positive limit during motion the right side indicates contact with negative limit during motion Soft limit status Soft limit status Soft limit status N Limit 0 N Limit 0 N Limit 1 P Limit 0 P Limit 1 P Limit 0 Figure 3 73 11 Stop motion Hit the STOP button to execute an emergency stop rt DMC 01 emg stop gDMCCardNo NodelD SlotID In this example emergency stop is used to stop motion This method guickly 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 12 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 3 50 Revised March 2012 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 14 Synchronization Motion Control 3 14 1 Function List Table 3 14 DMC 01 sync move
317. of monitored parameter E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U32 value Please refer to Table 32 2 for returned value 116 status DMC 01 get monitor CardNo NodelD SlotID amp value Revised March 2012 32 5 Chapter 32 Parameter Monitoring API PCI DMC A01 PCI DMC B01 32 3 DMC 01 get servo command mE FORMAT 116 PASCAL DMC 01 get servo command U16 CardNo U16 NodelD U16 SlotID U32 servo cmd E Purpose Retrieves servo drive command value H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID servo_cmd U32 Number Server command value E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U32 servo_cmd Value of servo cmd is the value of the command for returning to servo position 116 status DMC 01 get servo command CardNo NodelD SlotID 8servo cmd 32 6 Revised March 2012 Chapter 32 Parameter Monitoring API PCI DMC A01 PCI DMC B01 32 4 DMC 01 get servo DI m FORMAT 116 PASCAL DMC 01 get servo DI U16 CardNo U16 NodelD U16 SlotID U16 servo DI E Purpose Retrieves server DI message value E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID servo DI U16 Number Value of signals DI1 DI8 on
318. ol under RM04PI Mode 1 _DMC_01_rm_04pi_md1_start_line3 Perform 3 axis linear interpolation motion control under RM04PI Mode 1 _DMC_01_rm_04pi_md1_start_line4 Perform 4 axis linear interpolation motion control under RM04PI Mode 1 _DMC_01_rm_04pi_md1_start_arc Perform 2 axis arc interpolation motion control under RM04PI Mode 1 Known conditions Center point coordinates angle 4 8 Revised March 2012 Chapter 4 Control API PCI DMC A01 PCI DMC B01 DMC 01 rm 0O4pi md1 start arc2 Perform 2 axis arc interpolation motion control under RM04PI Mode 1 Known conditions Endpoint coordinates angle DMC 01 rm 0O4pi md1 start arc3 DMC 01 rm 04pi md1 start heli Perform 2 axis arc interpolation motion control under RM04PI Mode 1 Known conditions Center point coordinates endpoint coordinates Perform 3 axis spiral interpolation motion control under RMO4PI Mode 1 DMC 01 rm 04pi md1 p change Replace current position value with new position value under RM04PI Mode 1 DMC 01 rm 04pi md1 v change Replace current velocity with new velocity value under RM04PI Mode 1 DMC 01 rm 0O4pi md1 set gear Enable and set Gear parameters under RM04PI Mode 1 DMC 01 rm 0O4pi md1 set soft limit Enable disable software limit under RMO4PI Mode 1 DMC 01 rm 0O4pi md1 get soft limit st atus Get current 4 axis software limit contact status under RM04PI Mode 1
319. on V MaxVel MaxVel2 ji vl e Tdec Tsec MaxVel 2 MaxVel Tdec Tsec Figure 18 4 Motion displacement using relative coordinates with T curve velocity cross section Gray area indicates Dist white area indicates Dist2 Revised March 2012 18 9 Chapter 18 1 Axis Motion Control API PCI DMC A01 PCI DMC B01 m Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 132 Dist 500000 132 Dist2 500000 132 StrVel 1000 132 MaxVel 10000 132 MaxVel2 30000 F64 Tacc 0 1 F64 Tsec 0 1 F64 Tdec 0 1 116 status DMC 01 start tr move 2seg CardNo NodelD SlotID Dist Dist2 StrVel MaxVel MaxVel2 Tacc Tsec Tdec Please note that Dist and Dist2 in the API parameters must be in the same direction An example of incorrect settings is shown in Fig 18 5 V Figure 18 5 Incorrect settings Dist and Dist2 are not in the same direction 18 10 Revised March 2012 Chapter 18 1 Axis Motion Control API PCI DMC A01 PCI DMC B01 18 8 DMC 01 start sr move 2seg H FORMAT 116 PASCAL DMC 01 start sr move 2seg U16 CardNo U16 NodelD U16 SlotID 132 Dist 132 Dist2 132 StrVel 132 MaxVel 132 MaxVel2 F64 Tacc F64 Tsec F64 Tdec E Purpose 2nd motion displacement using relative coordinates with S curve velocity cross section X Motion Buffer will be cleared before this function is executed H Parameters Name Data Type Unit Description CardNo U16 Numbe
320. ond Pulses per MaxVel 132 i Tangential velocity parameter second Tacc F64 Second Specified acceleration time Tdec F64 Second Specified deceleration time 1 Referenced against T curve velocity cross section m_curve U16 Selection E i 2 Referenced against S curve velocity cross section 0 Displacement in relative coordinates m ra U16 Selection KR He 1 Displacement in absolute coordinates 28 16 Revised March 2012 Chapter 28 4 Channel Pulse Interface Mode 1 Motion Control API PCI DMC A01 PCI DMC B01 m Example U16 CardNo 0 NodelD 1 SlotID 2 0 1 m curve 1 m r a 1 132 Center 2 5000 2500 End 2 10000 5000 StrVel 0 MaxVel 1000 116 dir 1 Clockwise F64 Tacc 0 1 Tdec 0 1 116 status DMC 01 rm 0O4pi md1 start arc3 CardNo NodelD SlotID Center End dir StrVel MaxVel Tacc Tdec m curve m r a Revised March 2012 28 17 Chapter 28 4 Channel Pulse Interface Mode 1 Motion Control API PCI DMC A01 PCI DMC B01 28 9 DMC 01 rm 0O4pi md1 start heli E FORMAT 116 PASCAL DMC 01 rm O4pi md1 start heli U16 CardNo U16 NodelD U16 SlotID 132 Center 132 Depth 132 Pitch 116 dir 132 StrVel 132 MaxVel F64 Tacc F64 Tdec U16 m curve U16 m r a E Purpose Performs 3 axis spiral interpolation motion control under RMO4PI Mode 1 lt For motion description please see Chapter 22 3 Axis Spiral Interpolation Motion Control API H Parameters Name Data Ty
321. ong X axis and Y axis Holds Node ID sets used for arc interpolation NodelDArray U16 Number Unit NodelDArray 0 holds the 1st set of Node ID NodelDArray 1 holds the 2nd set of Node ID SlotID U16 Number Unit Slot ID Absolute center point X coordinate on the Center_X 132 Number of pulses AR specified axis Absolute center point Y coordinate on the Center_Y 132 Number of pulses fe specified axis Angle F64 Degree Set arc angle One full arc is 360 StrVel 132 Pulses per second Starting velocity parameter MaxVel 132 Pulses per second Tangential velocity parameter Tacc F64 Second Specified acceleration time Tdec F64 Second Specified deceleration time Revised March 2012 20 9 Chapter 20 2 Axis Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 m Example U16 CardNo 0 U16 NodelDArray 2 1 2 U16 SlotlD 2 0 0 132 Center X 50000 132 Center Y 50000 132 StrVel 0 132 MaxVel 50000 F64 Angle 180 F64 Tacc 0 1 F64 Tdec 0 1 116 status DMC 01 start sa arc xy CardNo NodelDArray SlotID Center X Center Y Angle StrVel MaxVel Tacc Tdec 20 10 Revised March 2012 Chapter 20 2 Axis Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 20 5 DMC 01 start tr arc2 xy m FORMAT 116 PASCAL DMC 01 start tr arc2 xy U16 CardNo U16 NodelD U16 SlotID 132 End X 132 End Y F64 Angle 132 StrVel 132 MaxVel F64 Tacc F64 Tdec E Purpose 2 axis arc interpolation motion using
322. open ret Get data returned by CANOPEN SDO related data DMC 01 set pdo mode Set to use CANopen protocol PDO or SDO DMC 01 send message 4 2 Send SDO command message to data buffer Revised March 2012 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 buffer DMC 01 reset sdo choke When SDO command is blocked reset SDO DMC 01 get sdo retry history DMC 01 set sdo driver speed profile Get number of SDO resends Point to Point Motion Control Packet Protocol API Set speed parameter 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 DMC 01 set home config Perform motion displacement with new position value Homing Motion Control Packet Protocol API Set home configuration _DMC_01_set_home_move _DMC_01_escape_home_move DMC 01 set velocity mode Start home motion Stop homing motion Velocity Motion Control Packet Protocol API
323. orm motion in absolute coordinates with T curve velocity cross section 116 status DMC 01 rm Odpi md1 start arc2 CardNo NodelD SlotID End Angle StrVel MaxVel Tacc Tdec m curve m r a Revised March 2012 28 15 Chapter 28 4 Channel Pulse Interface Mode 1 Motion Control API PCI DMC A01 PCI DMC B01 28 8 DMC 01 rm Odpi md start arc3 E FORMAT 116 PASCAL DMC 01 rm O4pi md1 start arc3 U16 CardNo U16 NodelD U16 SlotID 132 Center 132 End 116 dir 132 StrVel 132 MaxVel F64 Tacc F64 Tdec U16 m curve U16 m_r a H Purpose Performs 2 axis arc interpolation motion control under RM04PI Mode 1 Known conditions center point coordinates endpoint coordinates gt For motion description please see Chapter 20 2 Axis Arc Interpolation Motion Control API E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotlD 0 holds first set of Slot ID SlotID 1 holds second set of Slot ID Center 0 holds first set of center point Number of coordinates pulses Center 1 holds second set of center point coordinates SlotID U16 Number Unit Center 132 End 0 holds first set of endpoint coordinates Number of End 132 End 1 holds second set of endpoint ulses E coordinates Specified direction Clockwise if value is 1 dir 116 Selection 7 j d CCW if value is 0 Pulses per StrVel 132 P Starting velocity parameter sec
324. ositive 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 The Home position depends on the index pulse to the left or right when the Home switch status changes If the initial position of the Homing is index pulse then it must reverse direction of motion Any further changes after the direction is reversed depends on the current status of the Home switch index Pulse i Home Switch Figure 10 3 5 and 6 Homing using negative voltage level at Home Switch and index pulse message When using method 5 or 6 the initial direction will depend on the current status of the Home switch The Home position depends on the index pulse to the left or right when the Home switch status changes If the initial position of the Homing is index pulse then it must reverse direction of motion Any further changes after the direction is reversed depends on the current status of the Home switch Index Pulse Home Swit gt Figure 10 4 10 4 Revised March 2012 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 With methods 7 to 10 initial movement is to the right With methods 11 to 14 initial mo
325. p specified axis Absolute center point Y coordinate on the Center_Y 132 Number of pulses E p i specified axis Absolute endpoint X coordinate on the End x 132 Number of pulses i gt specified axis Absolute endpoint Y coordinate on the End y 132 Number of pulses se a i specified axis Specified direction Clockwise if value is 1 Dir 116 Selection CCW if value is 0 StrVel 132 Pulses per second Starting velocity parameter ConstVel 132 Pulses per second Constant velocity EndVel 132 Pulses per second End velocity TPhase1 F64 Second Time from StartVel to ConstVel TPhase2 F64 Second Time from ConstVel to EndVel 1 T m_curve U16 Selection A 2 S curve 0 Relati ti ispl t wins U16 OA elative motion displacemen 1 Absolute motion displacement Revised March 2012 20 35 Chapter 20 2 Axis Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 m Example U16 CardNo 0 U16 NodelDArray 2 1 2 U16 SlotID 2 0 0 132 Center X 25000 Center_Y 25000 132 End x 50000 End_y 50000 116 Dir 1 132 StrVel 0 ConstVel 50000 EndVel 20000 F64 TPhase1 0 2 F64 TPhase2 0 1 U16 m curve 1 m r a 0 116 status DMC 01 start v3 arc3 xy CardNo NodelDArray SlotID Center X Center Y End x End y Dir StrVel ConstVel EndVel TPhase1 TPhase2 m curve m r a 20 36 Revised March 2012 Chapter 20 2 Axis Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 20 18 DMC 01 start v3 spi
326. page intentionally left blank 16 8 Revised March 2012 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 Revised March 2012 17 1 Chapter 17 Software Limit API PCI DMC A01 PCI DMC B01 17 1 DMC 01 set soft limit E FORMAT 116 PASCAL DMC 01 set soft limit U16 CardNo U16 NodelD U16 SlotID 132 PLimit 132 NLimit E Purpose Sets reference values for software positive negative limits E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID PLimit 132 Number Value of positive software limit NLimit 132 Number Value of negative software limit E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 132 PLimit 8000 132 NLimit 2000 116 status DMC 01 set soft limit CardNo NodelD SlotID PLimit NLimit 17 2 Revised March 2012 Chapter 17 Software Limit API PCI DMC A01 PCI DMC B01 17 2 DMC 01 enable soft limit H FORMAT 116 PASC
327. pare channel trigger time Set Trigger enable time DMC 01 set compare channel one shot Set Trigger to one time enable 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 Compare output mode _DMC_01_channel1_get_io_status Read Compare status _DMC_01_channel1_set_gpio_out Set GPIO output pin status DMC 01 channel1 position compare table Set Compare 1 to standard Compare data DMC 01 channel1 position compare table level Set Compare1 to custom Compare data DMC 01 channel1 position compare table cnt Read Compare counter DMC 01 set compare channel polarity Set Compare polarity DMC 01 channel0 position cmp by gpio DMC 01 channel1 position re compare table DMC 01 channel1 position re compare table level DMC 01 start rline xy Set Compare trigger to GPIO control Use previous Compare condition and execute Channel1 Compare again Use previous Compare condition and execute Channel1 Compare Level mode again Linear and Arc Interpolation Motion Control API 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 motio
328. path pulses Pulses per A StrVel 132 Starting velocity second Pulses per ConstVel 132 i Constant velocity second Pulses per EndVel 132 E End velocity second TPhase 1 F64 Second Time from StartVel to ConstVel TPhase2 F64 Second Time from ConstVel to EndVel 1 T curve m_curve U16 Selection 2 S curve A 0 Relative motion displacement m ra U16 Selection 1 Absolute motion displacement Revised March 2012 18 21 Chapter 18 1 Axis Motion Control API PCI DMC A01 PCI DMC B01 m Description V pps V pps Endvel Const el Constvel Strvel jEndvel Strvel TPhase1 TPhase2 TPhase1 TPhase2 V pps V pps Strvel End el Constvel Const el TPhase1 TPhase2 TPhase 1 TPhase2 TPhase 1 Time of StrVel to ConstVel TPhase2 Time of ConstVel to EndVel Figure 18 10 Explanation of TPhase1 and TPhase2 m Example U16 CardNo 0 U16 NodelD 1 SlotID 0 132 Dist 100000 StrVel 0 ConstVel 50000 EndVel 20000 F64 TPhase1 0 2 TPhase2 0 1 U16 m_curve 1 m_r_a 0 116 status DMC 01 start v3 move CardNo NodelD SlotID Dist StrVel ConstVel EndVel TPhase1 TPhase2 m_curve m_r_a 18 22 Revised March 2012 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 _DMC_01_start_tr_move_xy 2 axis Linear interpolation motion using relative coordinates with T curve velocity
329. pe Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID O holds first set of Slot ID SlotID U16 Number Unit SlotID 1 holds second set of Slot ID SlotID 2 holds third set of Slot ID Center 0 holds first set of center point coordinates re 132 Number or Pulss s holds second set of center point coordinates Center 2 holds third set of center point coordinates Depth 132 Numero pike Relative depth to position on specified axis height in direction of Z Pitch 132 Number of pulses Relative height between two spirals dir 16 SBER Direction of apita arc motion Clockwise 1 Counterclockwise 0 StrVel 132 Pulses per second Starting velocity parameter MaxVel 132 Pulses per second Tangential velocity parameter Tacc F64 Second Specified acceleration time Tdec F64 Second Specified deceleration time 1 Referenced against T curve velocity m_curve U16 Selection DA i 2 Referenced against S curve velocity cross section Mka U16 SHE 0 Displacement in relative coordinates 1 Displacement in absolute coordinates 28 18 Revised March 2012 Chapter 28 4 Channel Pulse Interface Mode 1 Motion Control API PCI DMC A01 PCI DMC B01 m Example U16 CardNo 0 NodelD 1 SlotID 3 0 1 2 m curve 1 m r a 1 132 Center 3 5000 2500 2500 Depth 2500 Pitch 500 StrVel 0 MaxVel 1000 116 dir 1 Clockwise F64 Tacc 0 1 Tdec 0 1 116 status DMC 01 rm Odpi md1
330. perating Principles PCI DMC A01 PCI DMC B01 3 66 9 Stop motion Hit the STOP button to execute an emergency stop rt DMC 01 emg stop gDMCCardNo NodelD SlotID In this example emergency stop is used to stop motion This method guickly 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 10 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 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 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 m input value 3 19 2 Sample Application Program Appearance Se PCI DMC WW gt 1 Initial Card Num 0 2 Timer Slave Num ASD DMC RM32MN High Low JE E E m ASD DMC RM32NT EmorHandle Active Figure 3 96 1 Card initialization Click on the Initial button to open and initialize the card For a detailed description of card init
331. pi get MEL polarity H FORMAT 116 PASCAL DMC 01 rm 0O4pi get MEL polarity U16 CardNo U16 NodelD U16 SlotID U16 data E Purpose Retrieves current status of negative limit H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Selection Node ID SlotID U16 Number Unit Slot ID Data U16 Selection data Bose 1 Negative E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 Data 116 status _DMC_01_rm_04pi_get_MEL_polarity CardNo NodelD SlotID amp data Revised March 2012 38 3 Chapter 38 Limit Reversal API PCI DMC A01 PCI DMC B01 38 3 DMC 01 rm Odpi set PEL polarity m FORMAT 116 PASCAL _DMC_01_rm_04pi_set_PEL_polarity U16 CardNo U16 NodelD U16 SlotID U16 inverse E Purpose Reverses direction of positive limit H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Selection Node ID SlotID U16 Number Unit Slot ID Inverse U16 Selection data Bose 1 Negative E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 Inverse 1 Reverse direction of positive limit 116 status _DMC_01_rm_04pi_set_PEL_polarity CardNo NodelD SlotID inverse 38 4 Revised March 2012 Chapter 38 Limit Reversal API PCI DMC A01 PCI DMC B01 38 4 DMC 01 rm Odpi get PEL polarity E FORMAT 116 PASCAL DMC 01 rm O4pi get PEL polarity U16 CardNo U16 Node
332. ple U16 CardNo 0 NodelD 1 Slotld 0 U16 ChannelNo 0 116 Value 0 116 status _DMC_01_rm_04da_get_output_offset_value CardNo NodelD SlotlD ChannelNo amp Value 29 12 Revised March 2012 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 Set AD maximum level for range calibration _DMC_01_get_04ad_full_scale_status Check if AD maximum level calibration is complete _DMC_01_set_04ad_conversion_time Set AD conversion time _DMC_01_get_04ad_conversion_time Get current AD conversion time _DMC_01_get_04ad_data Read input voltage _DMC_01_set_04ad_average_mode Set AD average mode _DMC_01_get_04ad_average_mode Get AD average mode _DMC_01_set_04ad_input_enable Enable disable AD Channel Input feedback Revised March 2012 30 1 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 H FORMAT 116 DMC 01 set 04ad input range U16 CardNo U16 NodelD U16 SlotID U16 channelno U16 range E Purpose Sets the AD
333. polation Please refer to the following diagram System Command Motor Program Read Displacement Get buffer Execute FIFO length No 0 Figure 3 59 3 12 2 Function List Table 3 12 Function Name _DMC_01_start_ta_move_xy DMC 01 start ta arc xy 3 42 Revised March 2012 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 8 pe Ede gt Figure 3 60 Program Appearance E PCI DMC x 1 Initial Card num O Slave num r2 PDO continue motion C timer pts 2 1 Set vel prof E StVel 0 Pps ee MaxVel 1280000 pps ice Acc O1 see o Dec 0 0 sec alea E RESET 2 2 Set radius edge Edge 1280000 pls Radius 640000 SYON Move STOP Figure 3 61 Revised March 2012 3 43 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 1 2 3 4 3 44 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 Get Slot ID and enable motion status display 1 Initial Card num 0 Slave num 2 PDO continue motion C Timer Figure 3 62
334. r Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID Number of Dist 132 Relative coordinates for first segment pulses Number of Dist2 132 Relative coordinates for second segment pulses Pulses per 4 A StrVel 132 Starting velocity second Pulses per i MaxVel 132 Maximum velocity for first segment second Pulses per A E MaxVel2 132 Maximum velocity for second segment second Tacc F64 Second Specified acceleration time Acceleration deceleration time when switching Tsec F64 Second i from first segment to second segment Tdec F64 Second Deceleration time m Example U16 CardNo 0 NodelD 1 SlotID 0 132 Dist 500000 Dist2 500000 132 StrVel 1000 132 MaxVel 10000 MaxVel2 30000 F64 Tacc 0 1 F64 Tsec 0 1 F64 Tdec 0 1 116 status DMC 01 start sr move 2seg CardNo NodelD SlotlD Dist Dist2 StrVel MaxVel MaxVel2 Tacc Tsec Tdec Revised March 2012 18 11 Chapter 18 1 Axis Motion Control API PCI DMC A01 PCI DMC B01 18 9 DMC 01 start ta move 2seg mE FORMAT 116 PASCAL DMC 01 start ta move 2seg U16 CardNo U16 NodelD U16 SlotID 132 Dist 132 Dist2 132 StrVel 132 MaxVel 132 MaxVel2 F64 Tacc F64 Tsec F64 Tdec E Purpose 2nd motion displacement using absolute coordinates with T curve velocity cross section Motion Buffer will be cleared before this function is executed E Parameters Name Data Type Unit
335. r Unit CardNo is between 0 15 alm code U16 Number Error code for Master Card connection failure E Example U16 CardNo 0 U16 alm code 116 status DMC 01 master alm code CardNo 8alm code E Error Code List Error code Error Description 185 Unstable link 33 4 Revised March 2012 Chapter 33 Alarm Message API PCI DMC A01 PCI DMC B01 33 4 DMC 01 slave error E FORMAT 116 PASCAL DMC 01 slave error U16 CardNo U16 NodelD U16 SlotID U16 alm cnt E Purpose Retrieves number of consecutive errors during slave communications H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID Number of consecutive errors during Slave alm_cnt U16 Frequency A communications E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 alm code 116 status DMC 01 slave error CardNo NodelD SlotID galm code Revised March 2012 33 5 Chapter 33 Alarm Message API PCI DMC A01 PCI DMC B01 This page intentionally left blank 33 6 Revised March 2012 Chapter 34 Multi Axis Motion Control API PCI DMC A01 PCI DMC B01 Chapter 34 Multi Axis Motion Control API 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
336. r dwell counter value H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 132 dwell_cnt 3 116 status _DMC_01_buf_dwell CardNo NodelD SlotID dwell_cnt Set dwell buffer interval status _DMC_01_command_buf_clear CardNo NodelD SlotlD Clear dwell buffer interval 13 4 Revised March 2012 Chapter 13 Using PDO Protocol API PCI DMC A01 PCI DMC B01 13 4 DMC 01 buf dwell H FORMAT 116 PASCAL DMC 01 buf dwell 116 CardNo U16 NodelD U16 SlotID 132 dwell cnt E Purpose The interval time between two motion commands H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID Dwell buffer interval Delay time is 2 x dwell cnt dwell_cnt 132 Frequency Y F 2 H Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 132 dwell_cnt 3 If dwell cnt has a value of 0 then delay time is 4 ms In this example the value is 3 so delay time is 2 3 2 8ms 116 status _DMC_01_buf_dwell CardNo NodelD SlotID dwell_cnt Revised March 2012 13 5 Chapter 13 Using PDO Protocol API PCI DMC A01 PCI DMC B01 13 5 DMC 01 set group E FORMAT 116 PASCAL DMC 01 set group U16 CardNo U16 NodelD U16 SlotID U16 NodelD
337. ral xy H FORMAT 116 PASCAL DMC 01 start v3 spiral xy U16 CardNo U16 NodelD U16 SlotID 132 Center X 132 Center Y 132 spiral interval 132 spiral angle 132 StrVel 132 ConstVel 132 EndVel F64 TPhase1 F64 TPhase2 U16 m curve U16 m r a E Purpose 2 axis spiral motion with EndVel added Known conditions center coordinates for X and Y axes Values of StrVel and EndVel can be greater than MaxVel H Parameters Name Data Type Unit Description Node ID of card used for motion CardNo U16 Number Unit j ee displacement along X axis and Y axis Holds Node ID sets used for carrying out serine NodelD U16 Number unit Po Monon NodelD 0 holds 1st set of Node ID NodelD 1 holds 2nd set of Node ID SlotID U16 Number Unit Slot ID Center_X 132 Number of pulses Center X coordinate on specified axis Center Y 132 Number of pulses Center Y coordinate on specified axis spiral interval 132 Number of pulses Relative distance between spirals Total angle of spiral motion one revolution spiral angle 132 Number g k is 360 degrees StrVel 132 Pulses per second Starting velocity parameter ConstVel 132 Pulses per second Constant velocity EndVel 132 Pulses per second End velocity TPhase1 F64 Second Time from StartVel to ConstVel TPhase2 F64 Second Time from ConstVel to EndVel 1 T m curve U16 Selection cee 2 S curve mae U16 LEN 0 Relative motion displacement Revised March 2012
338. rameter second Tacc F64 Second Specified acceleration time Tdec F64 Second Specified deceleration time Revised March 2012 20 25 Chapter 20 2 Axis Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 m Example U16 CardNo 0 U16 NodelDArray 2 1 2 U16 SlotID 2 0 0 I32 Center X 25000 Center Y 25000 132 StrVel 0 MaxVel 50000 132 End x 50000 End y 50000 116 Dir 1 F64 Tacc 0 1 Tdec 0 1 116 status DMC 01 start sa arc3 xy CardNo NodelDArray SlotID Center X Center Y End x End y Dir StrVel MaxVel Tacc Tdec 20 26 Revised March 2012 20 13 DMC 01 start spiral xy H FORMAT Chapter 20 2 Axis Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 116 PASCAL DMC 01 start spiral xy U16 CardNo U16 NodelD U16 SlotlD 132 Center X 132 Center Y 132 spiral interval 132 spiral angle 132 StrVel 132 MaxVel F64 Tacc F64 Tdec U16 m curve U16 m r a E Purpose Carries out 2 axis spiral motion Known conditions center coordinates for X and Y axes H Parameters Name Data Type Unit Description Node ID of card used f tion displ t CardNo U16 Number Unit en he ge AD along X axis and Y axis Holds Node ID sets used for carrying out spiral motion NodelD U16 Number Unit NodelD 0 holds 1st set of Node ID NodelD 1 holds 2nd set of Node ID SlotID U16 Number Unit Slot ID Number of Center_X 132 Center X coordinate on specified axis pulses N
339. rc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 m Example U16 CardNo 0 U16 NodelDArray 2 f 1 2 U16 SlotlD 2 0 0 132 End X 50000 132 End Y 50000 132 StrVel 0 132 MaxVel 50000 132 EndVel 20000 F64 TPhase1 0 2 F64 TPhase2 0 1 U16 m curve 1 m r a 0 116 status DMC 01 start ta arc2 xy CardNo NodelDArray SlotID End X End Y Angle StrVel ConstVel EndVel TPhase1 TPhase2 m curve m r a 20 34 Revised March 2012 Chapter 20 2 Axis Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 20 17 DMC 01 start v3 arc3 xy E FORMAT 116 PASCAL DMC 01 start v3 arc3 xy U16 CardNo U16 NodelD U16 SlotID 132 Center X 132 Center Y 132 End X 132 End Y 116 Dir 132 StrVel 132 ConstVel 132 EndVel F64 TPhase1 F64 TPhase2 U16 m curve U16 m r a E Purpose 2 axis arc interpolation motion with EndVel added Known conditions center point coordinates endpoint coordinates Values of StrVel and EndVel can be greater than MaxVel H Parameters Name Data Type Unit Description Node ID of card used for motion CardNo U16 Number Unit i SAAN displacement along X axis and Y axis Holds Node ID sets used for arc interpolation NodelDArray U16 Number Unit NodelDArray 0 holds the 1st set of Node ID NodelDArray 1 holds the 2nd set of Node ID SlotID U16 Number Unit Slot ID Absolute center point X coordinate on the Center_X 132 Number of pulses E
340. re channel position rt DMC 01 set compare channel trigger time CpCardNo compare channel time us time us Trigger time If CompareType CMP1 Compare1 rt DMC 01 channel0 position cmp CpCardNo start dir interval II dir gt 0 CMP1jA1 CMP2 Revised March 2012 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 O off 1 on E If Level checkbox is checked then execute the following setting rt DMC 01 channel1 position compare table CpCardNo pos table tab size H If not checked then execute the following settings 6 9 x x rt DMC 01 channel1 position compare table level CpCardNo pos table level table tab size Atthe end set output to enable rt DMC 01 channel1 output enable CpCardNo 1 O off 1 on Command display and testing area Command 300000 Reset lt lt lt P2PWove STOP P2PMove gt gt gt Figure 3 152 Reset item Click this button to execute Reset motion P2PMove item Click this button to move in positive or negative direction STOP item Click this button to stop motion Command item Display current motion position 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
341. relative coordinates with T curve velocity cross section Known conditions endpoint coordinates angle H Parameters Name Data Type Unit Description Node ID of card used for motion CardNo U16 Number Unit i n displacement along X axis and Y axis Holds Node ID sets used for arc interpolation NodelDArray 0 holds the 1st set of Node NodelDArray U16 Number Unit ID NodelDArray 1 holds the 2nd set of Node ID SlotID U16 Number Unit Slot ID Relative endpoint X coordinate on the End_X 132 Number of pulses A specified axis Relative endpoint Y coordinate on the End Y 132 Number of pulses 5 i specified axis Angle F64 Degree Set arc angle One full arc is 360 StrVel 132 Pulses per second Starting velocity parameter MaxVel 132 Pulses per second Tangential velocity parameter Tacc F64 Second Specified acceleration time Tdec F64 Second Specified deceleration time Revised March 2012 20 11 Chapter 20 2 Axis Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 m Description Angle End X End Y Recent Position Angle i Figure 20 2 H Example U16 CardNo 0 U16 NodelDArray 2 1 2 U16 SlotID 2 0 0 132 End X 50000 132 End_Y 50000 132 StrVel 0 132 MaxVel 50000 F64 Angle 180 F64 Tacc 0 1 F64 Tdec 0 1 116 status DMC 01 start tr arc2 xy CardNo NodelDArray SlotID End X End Y Angle StrVel MaxVel Tacc Tdec 20 12 Revised March 2012
342. rial number misc slave check userpassword misc slave write userpassword misc slave get serialno Slave 04PI check user has read write access to memory Slave 04PI change password Slave 04PI read product serial number misc security Encrypt and generate verify key from User Key and SerialNo misc slave write verifykey Slave 04Pl write verify key misc slave check verifykey Slave 04PI1 check verify key misc slave user data buffer read Slave 04PI read data from specified memory block misc slave user data buffer write Slave 04PlI write security data to specified memory block misc slave user data to flash Limit Reversal API DMC 01 rm 0O4pi set MEL polarity Slave 04PI write data from Buffer to Flash Set negative limit direction DMC 01 rm Odpi get MEL polarity Get negative limit status DMC 01 rm 0Od4pi set PEL polarity Set positive limit direction DMC 01 rm Od4pi get PEL polarity Compare API DMC 01 set compare channel position Get positive limit status 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 Revised March 2012 4 11 Chapter 4 Control API PCI DMC A01 PCI DMC B01 DMC 01 set compare channel direction Set Channel pulse direction DMC 01 set com
343. rite Write item Write the value in the Write position to Memory Status item Default is Read Only When Write Enable option is checked Write Read will be displayed Clicking on the Login button in Fig 3 130 below executes the following procedure Check Password function rt DMC 01 check userpassword gDMCCardNo Password 0 state Clicking on Change button in Fig 3 131 below executes the following procedure Change Password operation rt DMC 01 write userpassword gDMCCardNo chpassword 0 Clicking on the Read Serial No button in Fig 3 132 below executes the following procedure Read Serial No operation rt DMC 01 read serialno gDMCCardNo serial 0 Clicking on the Make Verify Key button in Fig 3 132 below executes the following procedure Makes encrypted Verify Key rt misc security userkey 0 userkey 1 SerialNo 0 SerialNo 1 verifykey 0 verifykey 1 verifykey 2 verifykey 3 Clicking on the Write Verify Key button in Fig 3 132 below executes the following procedure Write Verify Key to Memory rt DMC 01 write verifykey gDMCCardNo verifykey 0 Clicking on the Check Verify Key button in Fig 3 133 below executes the following procedure Revised March 2012 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
344. rn MPG 100 clicks Pulse output of 100 10 1000 Example 2 ratio setting Conditions Assume that if MPG has 100 clicks in a revolution then it is equal to MPG ratio x 10 pulse_ratio 4 ratio 2 slope 1000 Results One full turn of MPG 100 clicks 2 motor rotations 128000 10 2 2560000 If the same conditions are used in step motor and 04PI the results are as follows One full turn of the MPG 100 clicks Pulse output is 100 10 1000 Value of ratio does not affect output pulse It only affects the MPG ratio setting Example 3 slope setting Conditions Assume that if MPG has 100 clicks in a revolution then it is equal to MPG ratio x 100 pulse_ratio 4 ratio 1 slope 100 The correct result is then One full turn of MPG 100 clicks 1 motor rotation 128000 100 1 12800000 Actual result One full turn of MPG 100 clicks 1 actual motor rotation 12531200 Because the maximum slope for MPG is 100 PPS sec the excess speed of the MCG is filtered out Example For step motor and 04PI the result is as follows Conditions Assume that if MPG has 100 clicks in a revolution then it is equal to MPG ratio x 100 pulse_ratio 4 ratio 1 slope 100 The correct result is then One full turn of MPG 100 clicks Pulse output of 100 100 10000 Actual result One full turn of MPG 100 clicks Pulse output 3560 Like the servo the part above the slope is filtered out Revised March 2012 26 3 Chapter 2
345. rpm 2000 In this case motion is clockwise so actual value of torque is 2000 10 gt 200RPM Start velocity motion 116 status DMC 01 set velocity CardNo NodelD SlotID rpm Stop current velocity motion status DMC 01 set velocity stop CardNo NodelD SlotID stop 11 4 Revised March 2012 Chapter 11 Velocity Motion Control Packet Protocol API PCI DMC A01 PCI DMC B01 11 4 DMC 01 set velocity torgue limit E FORMAT 116 PASCAL DMC 01 set velocity torgue limit U16 CardNo U16 NodelD U16 SlotlD U32 torgue limit E Purpose Sets the torgue limit for velocity mode H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID torque_limit U32 Number Maximum torque E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U32 torque_limit 50 116 status DMC 01 set velocity torgue limit CardNo NodelD SlotID torgue limit Revised March 2012 11 5 Chapter 11 Velocity Motion Control Packet Protocol API PCI DMC A01 PCI DMC B01 This page intentionally left blank 11 6 Revised March 2012 Chapter 12 Torque Motion Control Packet Protocol API PCI DMC A01 PCI DMC B01 Chapter 12 Torgue Motion Control Packet Protocol API Table 12 1 Function Name Description DMC 01 set torgue mode Torgue motion control parameter profile DMC 01 set torgue St
346. rs Name Data Type Unit Description CardNo U16 Number CardNo is between 0 15 Unit Index U16 Number Index of object dictionary Subldx U16 Number Sub index of object dictionary DataType U16 Number Datatype of object dictionary Value0 U16 Message buffer Data1 index Low byte Number CMD High byte Value1 U16 Nera Bete Message buffer Data2 Sub Idx High byte index high Low byte Value2 U16 Number Message buffer Data3 Data Low byte Value3 U16 Number Message buffer Data4 Data High byte E Example U16 CardNo 0 U16 lock U16 Index 0x6060 Subldx 0 DataType 0x2f value0 0x1 value1 0 value2 0 value3 0 116 status DMC 01 send message3 CardNo Index Subldx DataType value0 value value2 value3 status DMC 01 check canopen lock CardNo amp lock while lockY value0 0x2 status DMC 01 send message3 CardNo Index Subldx DataType value0 value1 value2 value3 8 10 Revised March 2012 Chapter 8 Using SDO Protocol API PCI DMC A01 PCI DMC B01 8 77 DMC 01 read message mE FORMAT 116 PASCAL DMC 01 read message 116 CardNo U16 Cmd U16 COBID U16 DataType U16 Value0 U16 Value1 U16 Value2 U16 Value3 E Purpose Reads the last SDO command message into the data buffer H Parameters Name Data Type Unit Description CardNo U16 Number CardNo is between 0 15 Unit Cmd U16 Number Ind
347. rt card initialization For a detailed description of card initialization please refer to Section 3 1 2 1 Open card Card number Slave number and Timer setting Card num O Slave num 6 V Timer Figure 3 157 Card num item Display number of cards Slave num item Display number of slaves Timer Checkbox Check to display the motion status Uncheck to disable display Speed Continue parameter setting 2 Speed Continue S C Enable S C Combine Ratio 100 y Set ME Mode o Figure 3 158 S CEnable checkbox Check this to enter Speed Continue mode and execute the following setting rt DMC 01 speed continue gDMCCardNo gpNodelDfO 0 flag flag 1 means set as Speed Continue mode flag 0 means cancel Speed Continue mode S CCombine Ratio item Set Speed Continue Combine Percentage Clicking on Set button will execute the following setting rt DMC 01 speed continue combine ratio gDMCCardNo gpNodelDfO 0 Ratio Ratio Indicates the Speed Continue Combine Percentage see 41 3 Speed Continue API for details S C Mode item Clicking on S C Mode will execute the following settings rt DMC 01 speed continue mode gDMCCardNo gpNodelDf0 0 Mode Mode 0 set as Equivalent Acceleration mode Mode 1 set as Acceleration Deceleration mode Mode 2 set as Maximum Velocity mode Please refer to 41 2 Speed Continue API for details Revised March 2012 Chapter 3 Operating Principle
348. rvo moves Y pulses A Basic P1 44 P1 45 adjustment ratio 640 1280000 2000 B Basic et rm mpg axes enable2 Ratio Denominator value 1 C This is the current ratio for P1 44 p1 45 adjustment D Need to find value of Ratio Denominator in set rm mpg axes enable2 Algorithm is D B C A Y X gt D 0 5 C 640 Y X Revised March 2012 26 5 Chapter 26 MPG and JOG Operation API PCI DMC A01 PCI DMC B01 26 3 DMC 01 set rm jog axes enable E FORMAT 116 PASCAL DMC 01 set rm jog axes enable U16 CardNo U16 MasterNodelD U16 MasterSlotID U16 NodelD U16 SlotID U16 enable U16 jog mode 132 jog speed F64 sec E Purpose Sets JOG motion control H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 MasterNodelD U16 Number Unit RM MN64 Node ID used MasterSlotID U16 Number Unit RM MN64 Slot ID used NodelD U16 Number Unit Node ID in use Up to 4 axes SlotID U16 Number Unit Servo Slot ID in use Up to 4 axes enable U16 Selection eg eae helt 1 Enable JOG JOG axis selection method jog_mode U16 Selection 0 RM mode 1 MPG mode z Pulses per jog_speed 132 roe JOG speed Pulses per ia sec F64 JOG acceleration time second m Example 116 rt U16 CardNo 0 MasterNodelD 1 MasterSlotID 0 RM 64 Node ID is 1 U16 NodelD 4 2 3 4 0 SlotID 4 0 Using three ASD A2F servo motors assigned to Node 2 3 and 4 U16 en
349. s DMC 01 get CardNo seg 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 Get motion card version Revised March 2012 5 1 Chapter 5 Hardware Initialization API PCI DMC A01 PCI DMC B01 5 1 DMC 01 open HM FORMAT 116 PASCAL DMC 01 open 116 existcard E Purpose Initializes system resources when program is run H Parameters Data Type Description A To get the number of these cards installed in the Existcard 116 cards system E Example 116 existCards 116 status _DMC_01_open amp existCards 5 2 _DMC_01_ close m FORMAT Void PASCAL DMC 01 close E Purpose Releases all system resources E Parameters No parameters E Example U16 CardNo 0 _DMC_01 close 5 2 Revised March 2012 Chapter 5 Hardware Initialization API PCI DMC A01 PCI DMC B01 5 3 DMC 01 get CardNo seg H FORMAT 116 PASCAL DMC 01 get CardNo seg U16 CardNo seg U16 CardNo E Purpose Retrieves the number of all PCI DMC A01 interface cards in the system H Parameters Name Data Type Unit Description CardNo seg U16 Number Unit Serial number Interface Card No is between 0 15 and is Set CardNo U16 Number Unit using SW1 E Example When there is only one PCI DMC A01 in the system and the SW1 is set to 3 then the Card No is 3 for that card When 2 or more PCI DMC A01 are connected to the system the
350. s PCI DMC A01 PCI DMC B01 4 Demonstration Example 1 Figure 3 159 Example 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 NodelD SlotID 0 10000 0 5000 01 0 1 rt DMC 01 start tr arc xy gDMCCardNo NodelD SlotID 2000 0 90 0 2500 0 1 0 1 rt DMC 01 start tr move xy gDMCCardNo NodelD SlotID 10000 0 0 5000 0 1 0 1 rt DMC 01 start tr arc xy gDMCCardNo NodelD SlotID 0 2000 90 0 2500 0 1 0 1 rt DMC 01 start tr move xy gDMCCardNo NodelD SlotID 0 10000 0 5000 0 1 0 1 rt DMC 01 start tr arc xy gDMCCardNo NodelD SlotID 2000 0 90 0 2500 0 1 01 rt DMC 01 start tr move xy gDMCCardNo NodelD SlotlD 10000 0 0 5000 0 1 0 1 rt DMC 01 start tr arc xy gDMCCardNo NodelD SlotID 0 2000 90 0 2500 0 1 0 1 5 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 Revised March 2012 3 121 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 N
351. s PWR ON SVON H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID 0 OFF ON_OFF U16 Selection 1 ON enable SVON H Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 ON OFF 1 U16 polarity 0 Set as Normal high Please see section 27 3 Description 116 status DMC 01 O4pi set poweron CardNo NodelD SlotlD polarity status DMC 01 set rm 0O4pi svon polarity CardNo NodelD SlotID polarity Revised March 2012 27 7 Chapter 27 4 Channel Pulse Interface API PCI DMC A01 PCI DMC B01 27 7 DMC 01 rm 04PI get buffer H FORMAT 116 PASCAL DMC 01 rm 04PI get buffer U16 CardNo U16 NodelD U16 SlotID U16 bufferLength E Purpose Retrieves the buffered motion command H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID inuse Up to 4 axes SlotID U16 Number Unit Servo Slot ID in use Up to 4 axes bufferLength U16 Number Un executed motion command E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 bufferLength 116 status Start synchronized motion control command status _DMC_01_sync_move CardNo Get un executed motion commands from each Node status DMC 01 get buffer length CardNo NodelD SlotID amp bufferLength 27 8 Revi
352. s between 0 15 PC cent U32 Freguency Mailbox counter value from PC DSP cnt U32 Freguency Mailbox counter value from DSP E Example U16 CardNo 0 U32 PC_cnt 0 DSP_cnt 0 116 status DMC 01 get mailbox cnt CardNo amp PC_cnt amp DSP_cnt 6 11 _DMC_01_get_dsp_cnt H FORMAT 116 PASCAL _DMC_01_get_dsp_cnt U16 CardNo U32 int cnt U32 main cnt E Purpose Retrieves the Interrupt counter value H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 Number of interrupts generated while int_cnt U32 Frequency Ad i 3 establishing communications f Number of interrupts generated while main_cnt U32 Frequenc aie quency establishing DSP E Example U16 CardNo 0 U32 int_cnt 0 main_cnt 0 116 status _DMC_01_get_dsp_cnt CardNo amp int_cnt amp main_cnt Revised March 2012 6 7 Chapter 6 Interface API PCI DMC A01 PCI DMC B01 6 12 DMC 01 set dio output H FORMAT 116 PASCAL DMC 01 set dio output U16 CardNo U16 On Off E Purpose Sets GPIO output pin status H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 0 Disabl On Off U16 Selection E 1 Enable E Example U16 CardNo 0 U16 On Off 1 116 status DMC 01 set dio output CardNo On Off 6 13 DMC 01 get dio output E FORMAT 116 PASCAL DMC 01 get dio output U16 CardNo U16 On Off E Purpose Retrieves GPIO outp
353. s section 4 4 Revised March 2012 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 DMC 01 start sr move 2seg2 2nd motion displacement using relative coordinates with S curve velocity cross section DMC 01 start ta move 2seg2 2nd motion displacement using absolute coordinates with T curve velocity cross section DMC 01 start sa move 2seg2 2nd motion displacement using absolute coordinates with S curve velocity cross section DMC 01 feedrate overwrite Change motion speed or speed ratio DMC 01 start v3 move Single axis motion displacement with EndVel added 2 Axis Linear Interpolation Motion Control API 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 coordinates w
354. s specified axis Angle F64 Degree Set arc angle One full arc is 360 Pulses per StrVel 132 E Starting velocity parameter second Pulses per ConstVel 132 R Constant velocity second Pulses per EndVel 132 E End velocity second TPhase1 F64 Second Time from StartVel to ConstVel TPhase2 F64 Second Time from ConstVel to EndVel 1 T curve m curve U16 Selection ae 2 S curve 0 Relative motion displacement m ra U16 Selection A AE 1 Absolute motion displacement Revised March 2012 20 31 Chapter 20 2 Axis Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 m Description V pps V pps Endvel Const el Constvel Strvel jEndvel Strvel TPhase1 TPhase2 TPhase1 TPhase2 V pps V pps Strvel End el Constvel Const el TPhase1 TPhase2 TPhase1 TPhase2 TPhase 1 Time of StrVel to ConstVel TPhase2 Time of ConstVel to EndVel Figure 20 4 Explanation of TPhase1 and TPhase2 m Example U16 CardNo 0 NodelDArray 2 1 2 SlotID 2 0 0 132 Center X 50000 132 Center Y 50000 F64 Angle 180 132 StrVel 0 132 MaxVel 50000 132 EndVel 20000 F64 TPhase1 0 2 F64 TPhase2 0 1 U16 m curve 1 m r a 0 116 status DMC 01 start sa arc xy CardNo NodelDArray SlotID Center X Center Y Angle StrVel ConstVel EndVel TPhase1 TPhase2 m curve m r a 20 32 Revised March 2012 Chapter 20 2 Axis Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 20 16 D
355. se absolute coordinates S Curve checkbox You must check this box if you wish to use the S curve velocity curve 5 Select motion mode 6 Select Spiral motion mode m 2 3 Select mode Spiral Spiral2 Figure 3 146 Spiral item Click this if you wish to perform Spiral motion Spiral2 item Click this if you wish to perform Spiral 2 motion 7 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 NodelD SlotID ON OFF I ON OFF 0 Servo Power OFF 1 Servo Power ON 8 x Start motion control Click on the MOVE button to execute the following procedure rt DMC 01 start spiral xy gDMCCardNo gLine2 gSlot2 Center X Center Y StrVel MaxVel acc dec 2 1 Motion displacement using absolute coordinates with S curve velocity cross section rt DMC 01 start spiral xy gDMCCardNo gLine2 gSlot2 Center X Center Y StrVel MaxVel acc dec 1 1 Motion displacement using absolute coordinates with T curve velocity cross section rt DMC 01 start spiral xy gDMCCardNo gLine2 gSlot2 Center X Center Y StrVel MaxVel acc dec 2 0 Motion displacement using relative coordinates with S curve velocity cross section rt DMC 01 start spiral xy gDMCCardNo gLine2 gSlot2 Center X Center Y StrVel MaxVel acc dec 1 0 Motion displacement using relative coordinat
356. se1 and TPhase2 m Example U16 CardNo 0 AxisNum 4 U16 NodelD 4 1 2 3 4 SlotID 4 0 1 2 3 132 DistArrary 4 1000 2000 3000 6000 132 StrVel 1000 MaxVel 50000 132 EndVel 20000 F64 TPhase1 0 2 F64 TPhase2 0 1 U16 m curve 1 m r a 0 116 status DMC 01 multi axes move CardNo AxisNum NodelD SlotlD DistArrary StrVel ConstVel EndVel TPhase1 TPhase2 m curve m r a 34 6 Revised March 2012 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 Chapter 35 Buffer Operation API PCI DMC A01 PCI DMC B01 35 1 DMC 01 set trigger buf function E FORMAT 116 PASCAL DMC 01 set trigger buf function 116 CardNo U16 NodelD U16 SlotID U16 enable E Purpose Uses servo drive DI3 SLD to trigger Motion command E Parameters Name Data Type Unit Description CardNo 116 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID 0 Execute any motion command in buffer enable U16 Selection 1 Use to DI to trigger motion command in buffer E Example 116 CardNo 0 U16 NodelD 1 SlotiID 0 U16 enable 1 Enable this functionTrigger DI3 SLD to get motion command in buffer 116 status DMC 01 set trigger buf function CardNo NodelD Slotl
357. sed March 2012 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 RMO4PI Mode 1 Perform velocity motion control under RMO4PI Mode 1 Perform 2 axis linear interpolation motion control under RM04PI Mode 1 Perform 3 axis linear interpolation motion control under RMO4PI Mode 1 Perform 4 axis linear interpolation motion control under RM04PI Mode 1 Perform 2 axis arc interpolation motion control under RM04PI Mode 1 Known conditions Center point coordinates angle Perform 2 axis arc interpolation motion control under RM04PI Mode 1 Known conditions Endpoint coordinates angle Perform 2 axis arc interpolation motion control under RMO4PI Mode 1 Known conditions Center point coordinates endpoint coordinates Perform 3 axis spiral interpolation motion control under RM04PI Mode 1 Replace current position value with new position value under RM04PI Mode 1 Replace current velocity with new velocity value under RM04PI Mode 1 Enable and set Gear parameters under RM04PI Mode 1 DMC 01 rm 0O4pi md1 start move DMC 01 rm Odpi md1 v move DMC 01 rm 04pi md1 start line2 DMC 01 rm Odpi md1 start line3 DMC 01 rm 04pi md1 start line4 DMC 01 rm 0O4pi md1 start arc DMC 01 rm 04pi md1 start arc2 DMC 0
358. sed March 2012 19 3 Chapter 19 2 Axis Linear Interpolation Motion Control API PCI DMC A01 PCI DMC B01 19 2 DMC 01 start sr move xy E FORMAT 116 PASCAL DMC 01 start sr move xy U16 CardNo U16 NodelD U16 SlotID 132 DisX 132 DisY 132 StrVel 132 MaxVel F64 Tacc F64 Tdec E Purpose 2 axis linear interpolation motion using relative coordinates with S curve velocity cross section H Parameters Name Data Type Unit Description Node ID of card used for motion displacement CardNo U16 Number Unit KEAK KAL along X axis and Y axis Holds Node ID sets used for linear interpolation NodelDArray U16 Number Unit NodelDArray 0 holds the 1st set of Node ID NodelDArray 1 holds the 2nd set of Node ID SlotID U16 Number Unit Slot ID DisX 132 Number of Relative path parameter for motion of Node pulses ID on X axis DisY 132 Number of Relative path parameter for motion of Node pulses ID on Y axis Pulses per StrVel 132 i Starting velocity parameter second Pulses per i MaxVel 132 Maximum velocity parameter second Tacc F64 Second Specified acceleration time Tdec F64 Second Specified deceleration time 19 4 Revised March 2012 Chapter 19 2 Axis Linear Interpolation Motion Control API PCI DMC A01 PCI DMC B01 m Example U16 CardNo 0 U16 NodelDArray 2 f 1 2 U16 SlotlD 2 0 0 132 DisX 50000 132 DisY 100000 132 StrVel 0 132 MaxVel 50000 F64 Tacc 0 1 F64 Tdec 0 1 116 status DM
359. ses the C language and is executed using a state machine Please see Sample for details pS Revised March 2012 3 125 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 MotionStep1 Move the three axes to job start point DMC 01 start sa move CardNo NodelD3 0 SlotlD3 0 0 0 MaxVel 0 1 0 1 DMC 01 start sa move CardNo NodelD3 1 SlotID3 1 0 0 MaxVel 0 1 0 1 DMC 01 start sa move CardNo NodelD3 2 SlotID3 2 13500 0 MaxVel 0 1 0 1 MotionStep2 Wait for Motion Done and confirm that Step 1 was completed for i 0 i lt 3 i rt i DMC 01 get command CardNo NodelD3 i SlotID3fi 8Cmdfi if rt 0 rt 1 rt 2 0 amp amp Cmd 0 0 amp amp Cmd 1 0 amp amp Cmd 2 13500 MotionStep 3 MotionStep3 Start processing _DMC_01_start_tr_move_xy CardNo NodelD2 SlotID2 40000 40000 MaxVel 2 MaxVel 0 1 0 1 _DMC_01_start_tr_heli_xy CardNo NodelD3 SlotID3 10000 10000 Pitch 180 0 360 Pitch 1 MaxVel 2 MaxVel 0 1 0 1 _DMC_01_start_tr_move_xy CardNo NodelD2 SlotID2 40000 40000 MaxVel 2 MaxVel 0 1 0 1 _DMC_01_start_tr_heli_xy CardNo NodelD3 SlotID3 10000 10000 Pitch 180 0 360 Pitch 1 MaxVel 2 MaxVel 0 1 0 1 3 126 Revised March 2012 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 corn
360. set compare channel direction CpCardNo 0 dir dir 0 or 1 AEP2 Inverse item Reverse Click on this button to execute the following settings rt DMC 01 set compare channel direction CpCardNo 1 dir dir 0 or 1 Operate data settings Operate Trigger Time 4 us lt lt lt Set Abs M Level Trigger Count 50000 times One Shot Set gt gt gt Interval jj Pulse Pulse Start Position 100000 Figure 3 151 Trigger Time item Enter a Trigger enable time Trigger count item Enter Trigger enable total count Start Position item Enter Trigger enable starting position Interval item Enter Trigger enable frequency For example 10 means enable once every 10 pulses Abs Checkbox Check this option if you wish to use absolute coordinates for trigger enable Level Checkbox Check this to execute the following settings rt DMC 01 channel1 output mode CpCardNo mode mode 0 is Normal mode 1 is Custom mode See Chapter 39 Compare API for details One Shot item Click this button to set only one Trigger for executing the following settings rt DMC 01 set compare channel trigger time CpCardNo compare channel time us time_us Trigger time rt DMC 01 set compare channel one shot CpCardNo compare channel Set item Select a direction from gt gt gt and lt lt lt then click this button to execute the following settings rt DMC 01 get compare channel position CpCardNo compa
361. start heli CardNo NodelD SlotID Center Depth Pitch dir StrVel MaxVel Tacc Tdec m curve m r a Revised March 2012 28 19 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 H FORMAT 116 PASCAL DMC 01 rm 0O4pi md1 p change U16 CardNo U16 NodelD U16 SlotID 132 NewPos E Purpose Replaces the current position with a new position value under RM04PI Mode 1 H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID Number of E NewPos 132 Position parameter to be replaced pulses H Example U16 CardNo 0 NodelD 1 SlotlD 0 132 NewPos 100000 116 status DMC 01 rm 04pi md1 p change CardNo NodelD SlotID NewPos 28 20 Revised March 2012 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 H FORMAT 116 PASCAL DMC 01 rm 0O4pi md1 v change U16 CardNo U16 NodelD U16 SlotID I32 NewSpeed F64 sec E Purpose Replaces the current velocity with a new velocity value under RM04PI Mode 1 Please refer to section 18 6 DMC 01 v change for details H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID Pu
362. status display Timer Checkbox Check to display the motion status Uncheck to disable display Revised March 2012 3 27 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 28 3 Enter the values of the arguments for motion control 4 5 x StrVel O pps MaxVel O pps Acc 0 sec Dec 0 sec 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 Dec item Time reguired to go from maximum velocity to 0 API function s argument variable dec Select motion mode and set motion distance 2 3 Set distance Abs T S Curve Dist 0 pls Figure 3 44 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 Set Servo Motor Power ON OFF servo on servo off SYON STOP gt Figure 3 45 Click on the SVON button to execute the following procedure rt DMC 01 ipo set svon gDMCCardNo NodelD SlotID ON OFF II ON OFF 0 Servo Power OFF 1 Servo Power ON Revised March 2012 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 6 Start
363. t CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID Pos1_x 132 Number Unit X coordinate of first position Pos1 y 132 Number Unit Y coordinate of first position Pos2 x 132 Number Unit X coordinate of second position Pos2_y 132 Number Unit Y coordinate of second position 0 Perpendicular distance from arc to right angle A gt B Mode U16 Selection 1 Perpendicular distance from start of arc to right angle A gt B 2 Arc radius A gt B Param F64 Number Unit Relative mode distance StrVel 132 Pulses per Starting velocity second MaxVel 132 Pulses per Maximum velocity second Tacc F64 Second Specified acceleration time Tdec F64 Second Specified deceleration time m_curve U16 Selection ad 2 S curve me U16 S si 0 Relative monon SISI AGEE 1 Absolute motion displacement 40 2 Revised March 2012 Chapter 40 Linear and Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 m Description Mode Parameter Settings C pos2_x pos2_y C pos2_x pos2_y A B Start A B posl_z Posl_y posl_x Posl_y Figure 40 1 Mode 0 Perpendicular Figure 40 2 Mode 1 Perpendicular distance distance from arc to right ange AB gt from start of arc to right angle A gt B C pos2_x pos2_y Start B posl x Posl y Figure 40 3 Mode 2 Arc radius A gt B m Example U16 CardNo 0 NodelD 1 SlotlD 0 132 pos1 x 0 132 pos1 y 10000 132 pos2 x 10000 132 pos2_y 10000 U16 mode 1 param
364. t argument is the set value for positive limit NLimit is the set value for negative limit 7 To disable software limit you must use the following procedure rt DMC 01 disable soft limit gDMCCardNo NodelD SlotID 8 Set Servo Motor Power ON OFF servo on servo off SYON lt STOP gt Figure 3 72 Click on the SVON button to execute the following procedure rt DMC 01 ipo set svon gDMCCardNo NodelD SlotID ON OFF I ON OFF 0 Servo Power OFF 1 Servo Power ON Revised March 2012 3 49 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 gt or button to execute the following procedure rt DMC 01 start sa move gDMCCardNo NodelD SlotID Distance StrVel MaxVel acc dec Motion displacement using absolute coordinates with S curve velocity cross section rt DMC 01 start ta move gDMCCardNo NodelD SlotlD Distance StrVel MaxVel acc dec Motion displacement using absolute coordinates with T curve velocity cross section rt DMC 01 start sr move gDMCCardNo NodelD SlotlD Distance StrVel MaxVel acc dec Motion displacement using relative coordinates with S curve velocity cross section rt DMC 01 start tr move gDMCCardNo NodelD SlotID Distance StrVel MaxVel acc dec Motion displacement using relative coordinates with T curve velocity cross section 10 If you wish to
365. tID U16 Number Unit Slot ID Relative path parameter for motion of Node DisX 132 Number of pulses i ID on X axis A Relative path parameter for motion of Node DisY 132 Number of pulses i ID on Y axis A Relative path parameter for motion of Node DisZ 132 Number of pulses A ID on Z axis StrVel 132 Pulses per second Starting velocity parameter MaxVel 132 Pulses per second Maximum velocity parameter Tacc F64 Second Specified acceleration time Tdec F64 Second Specified deceleration time m Example 21 2 U16 CardNo 0 U16 NodelDArray 3 1 2 3 U16 SlotID 3 0 0 O 132 DisX 25000 DisY 50000 DisZ 75000 I32 StrVel 0 MaxVel 50000 F64 Tacc 0 1 Tdec 0 1 116 status DMC 01 start tr move xyz CardNo NodelDArray SlotID DisX DisY DisZ StrVel MaxVel Tacc Tdec Revised March 2012 Chapter 21 3 Axis Linear Interpolation Motion Control API PCI DMC A01 PCI DMC B01 21 2 DMC 01 start sr move xyz H FORMAT 116 PASCAL DMC 01 start sr move xyz U16 CardNo U16 NodelD U16 SlotID 132 DisX 132 DisY 132 DisZ 132 StrVel 132 MaxVel F64 Tacc F64 Tdec E Purpose 3 axis linear interpolation motion using relative coordinates with S curve velocity cross section H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 Holds Node ID sets used for linear interpolation NodelDArray U16 Number Unit NodelDArray 0 Node 1 NodelDArray 1
366. ta Get current DA number Keep original DA settings if the connection is _DMC_01_rm_04da_set_output_error_handle broken _DMC_01_rm_04da_set_output_offset_value Set DA offset _DMC_01_rm_04da_get_output_offset_value Read DA offset Revised March 2012 29 1 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 H FORMAT 116 PASCAL DMC 01 rm 04da set output value U16 CardNo U16 NodelD U16 SlotID U16 ChannelNo U16 Value E Purpose Sets value of DA output H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID is between 0 12 SlotID U16 Number Unit 0 ChannelNo U16 Number Unit Channel ID is between 0 3 Value U16 Number Unit Output is between 0 65535 E Example U16 CardNo 0 U16 NodelD 1 U16 SlotID 0 U16 ChannelNo 0 U16 Value Oxdff 116 status _DMC_01_rm_04da_set_output_value CardNo NodelD SlotID ChannelNo 29 2 Value Revised March 2012 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 E FORMAT 116 PASCAL DMC 01 rm 04da get output value U16 CardNo U16 NodelD U16 SlotlD U16 ChannelNo U16 Value E Purpose Reads the value of the DA output E Parameters Name Data Type Unit Description CardNo
367. tact status of negative software limit PLimit_status U16 Number Unit Return contact status of positive software limit E Example U16 CardNo 0 U16 NodelD 1 SlotlD 0 U16 NLimit_status PLimit_status 116 status _DMC_01_rm_04pi_md1_get_soft_limit_status CardNo NodelD SlotID 28 24 amp NLimit_status amp PLimit_status f there is contact with negative software limit NLimit status returns 1 Return 0 otherwise IE there is contact with positive software limit PLimit status returns 1 Return 0 otherwise Revised March 2012 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 sid E FORMAT 116 PASCAL DMC 01 rm 0O4pi md1 set sid U16 CardNo U16 NodelD U16 SlotlD 116 enable 116 sd logic 116 mode E Purpose Enables SLD port DI3 and sets the profile H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID enable 116 Selection Pepe er wren 1 Enable SLD port 0 Normal high sd_logic 116 Selection 1 Normal low 1 Use EMG stop emergency stop megs Ja A 2 Use Slow down stop slow down stop E Example U16 CardNo 0 NodelD 1 SlotID 0 116 enable 1 116 sd logic 1 Port polarity is Normal high 116 mode 1 Stop mode used is EMG stop 116 status DMC 01 rm 04pi md1 set sid CardNo NodelD SlotI
368. ter X Center Y Angle 8End x amp End_y 42 2 Revised March 2012 Chapter 42 Other API PCI DMC A01 PCI DMC B01 42 2 misc app get circle center point H FORMAT 116 PASCAL misc app get circle center point 132 Start X 132 Start Y 132 End x I32 End y F64 Angle 132 Center X 132 Center Y E Purpose Retrieves center point coordinates X Y reguired for arc interpolation E Parameters Name Data Type Unit Description Start_X 132 Number of pulses Starting X coordinate Start Y 132 Number of pulses Starting Y coordinate End x 132 Number of pulses Endpoint s X coordinate End y 132 Number of pulses Endpoint s Y coordinate Angle F64 Degree Set arc angle One full arc is 360 Center X 132 Number of pulses Center point s X coordinate Center Y 132 Number of pulses Center point s Y coordinate E Example 132 Start X 0 Start Y 0 I32 End x 100000 End y0 132 Center X Center Y F64 Angle 180 116 status misc app get circle center point Start X Start Y End x End y Angle 8Center X 8Center Y Revised March 2012 42 3 Chapter 42 Other API PCI DMC A01 PCI DMC B01 42 3 misc set record debuging m FORMAT 116 PASCAL misc set record debuging U16 enable E Purpose Shows whether Debug log function is enabled H Parameters Data Type Description 0 Disable Debug log Enable U16 Selection 1 Enable Debug log E Example U16 Enable 1
369. ters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID Example U16 CardNo 0 U16 NodelD 1 116 status DMC 01 int enable CardNo NodelD 36 3 DMC 01 int disable H FORMAT 116 PASCAL DMC 01 int disable U16 CardNo U16 NodelD E Purpose Enables disable interrupt E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID E Example U16 CardNo 0 U16 NodelD 1 116 status DMC 01 int disable CardNo NodelD Revised March 2012 36 3 Chapter 36 Interrupt API PCI DMC A01 PCI DMC B01 36 4 DMC 01 get int count E FORMAT 116 PASCAL DMC 01 get int count U16 CardNo U16 NodelD U16 count E Purpose Reads interrupt count H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID Number of count U16 Number of successful interrupts interrupts H Example U16 CardNo 0 U16 NodelD 1 U16 count 116 status DMC 01 get int count CardNo NodelD amp count 36 4 Revised March 2012 Chapter 36 Interrupt API PCI DMC A01 PCI DMC B01 36 5 DMC 01 get int status E FORMAT 116 PASCAL DMC 01 get int status U16 CardNo U16 NodelD U16 event int status E Purpose Reads current interrupt mode H Parameters
370. trVel 132 Pulses per second Starting velocity parameter ConstVel 132 Pulses per second Constant velocity EndVel 132 Pulses per second End velocity TPhase1 F64 Second Time from StartVel to ConstVel TPhase2 F64 Second Time from ConstVel to EndVel i 1 T curve m curve U16 Selection 2 S curve i 0 Relative motion displacement m ra U16 Selection 1 Absolute motion displacement 22 10 Revised March 2012 Chapter 22 3 Axis Spiral Interpolation Motion Control API PCI DMC A01 PCI DMC B01 m Description V pps V pps Endvel Const el Constvel Strvel jEndvel Strvel TPhase1 TPhase2 TPhase1 TPhase2 V pps V pps Strvel Endel Constvel Const el TPhase1 TPhase2 TPhase 1 TPhase2 TPhase 1 Time of StrVel to ConstVel TPhase2 Time of ConstVel to EndVel Figure 22 2 Explanation of TPhase1 and TPhase2 H Example U16 CardNo 0 U16 NodelDArray 3 41 2 33 U16 SlotID 3 0 0 0 132 Center X 25000 Center Y 50000 Depth 10000 Pitch 20000 116 Dir 1 132 StrVel 0 MaxVel 50000 132 EndVel 20000 F64 TPhase1 0 2 F64 TPhase2 0 1 U16 m curve 1 m r a 0 116 status DMC 01 start sa heli xy CardNo NodelDArray SlotID Center X Center Y Depth Pitch Dir StrVel ConstVel EndVel TPhase1 TPhase2 m curve m r a Revised March 2012 22 11 Chapter 22 3 Axis Spiral Interpolation Motion Control API PCI DMC A01 PCI DMC B01 This page intentionally left blank 22 12 Revise
371. tus Uncheck to disable display Enter the values of the arguments for motion control m 2 2 Set vel prof Stivel MaxVel Pps 1280000 Pps Acc 0 1 sec Dec 0 1 sec LL Figure 3 93 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 Select motion mode and set motion distance m 2 3 Set distance Abs 77 S Curve Dist 12800000 pls Figure 3 94 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 Revised March 2012 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 5 Set distance and velocity for 2nd motion m 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 6 lt x Set Servo Motor Power ON OFF servo on servo off Click on the SVON button to execute the following procedure rt DM
372. type Get Slave device type DMC 01 get slave version Get Slave device firmware version Revised March 2012 31 1 Chapter 31 Slave Data API PCI DMC A01 PCI DMC B01 31 1 DMC 01 get devicetype m FORMAT 116 PASCAL DMC 01 get devicetype 116 CardNo U16 NodelD U16 SlotID U32 DeviceType U32 IdentityObject E Purpose Retrieves slave device type E Parameters Name Data Type Unit Description CardNo 116 Number Unit CardNo is between 0 15 NodelD U16 Number Unit Node ID SlotID U16 Number Unit Slot ID Slave device type see Notes on the following DeviceType U32 Number page for details IdentityObject U32 Number Object dictionary code for device E Example 116 CardNo 0 NodelD 1 SlotID 0 U32 DeviceType IdentityObject 116 status DMC 01 get devicetype CardNo NodelD SlotID amp DeviceType amp ldentityObject 31 2 Revised March 2012 Chapter 31 Slave Data API PCI DMC A01 PCI DMC B01 E XTable of device type codes used for the DeviceType variable Device Type O7ofe Device Type Code A2 Series Servo Drives 0x04020192 M Series Servo Drives 0x06020192 A2R Series Servo Drives 0x08020192 S Series Servo Drives 0x09020192 ASD DMC RM32MN 0x04110191 ASD DMC RM64MN 0x08110191 ASD DMC RM32NT 0x04120191 ASD DMC RM64NT 0x08120191 ASD DMC RMO4PI MD1 0x1C100191 ASD DMC RMO4AD 0x08140191 ASD DMC RMO4PI MD2 0x14100191 ASD DMC RM04DA 0x08180191
373. umber Unit CardNo is between 0 15 Holds Node ID sets used for linear interpolation NodelDArray 0 Node 1 NodelDArray U16 Number Unit yl0 NodelDArray 1 Node_2 NodelDArray 2 Node 3 SlotID U16 Number Unit Slot ID Number of Absolute path parameter for motion of Node DisX 132 t pulses ID on X axis A Number of Absolute path parameter for motion of Node DisY 132 pulses ID on Y axis A Number of Absolute path parameter for motion of Node DisZ 132 pulses ID on Z axis Pulses per A StrVel 132 Starting velocity parameter second Pulses per A ConstVel 132 Constant velocity second Pulses per f EndVel 132 End velocity second TPhase1 F64 Second Time from StartVel to ConstVel TPhase2 F64 Second Time from ConstVel to EndVel m_curve U16 Selection IERS 2jGS curve f 0 Relative motion displacement mra U16 Selection 1 Absolute motion displacement 21 6 Revised March 2012 Chapter 21 3 Axis Linear Interpolation Motion Control API PCI DMC A01 PCI DMC B01 m Description V pps V pps Endvel Constvel Constvel strvel jEndvel Strvel TPhase 1 TPhase2 TPhase1 TPhase2 V pps V pps Strel Endvel Constvel Constvel TPhase1 TPhase2 TPhase 1 TPhase2 TPhase 1 Time of StrVel to ConstVel TPhase2 Time of ConstVel to EndVel Figure 21 4 Explanation of TPhase1 and TPhase2 m Example U16 CardNo 0 U16 NodelDArray 3 41 2 33 U16 SlotID 3 0 0 0 132 DisX 25000 Dis
374. umber of A E Center Y 132 Center Y coordinate on specified axis pulses AEDA Number of E spiral interval 132 Relative distance between spirals pulses Total angle of spiral motion one revolution is spiral angle 132 Number 9 i 360 degrees Pulses per StrVel 132 R Starting velocity parameter second Pulses per MaxVel 132 E Tangential velocity parameter second Tacc F64 Second Specified acceleration time Tdec F64 Second Specified deceleration time 1 T curve m_curve U16 Selection gi 2 S curve 0 Relative motion displacement mra U16 Selection a A 1 Absolute motion displacement Revised March 2012 20 27 Chapter 20 2 Axis Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 m Example U16 CardNo 0 U16 NodelD 2 1 2 U16 SlotID 2 0 0 132 Center X 25000 Center_Y 25000 132 Spiral_interval 20000 Spiral angle 1800 132 StrVel 0 MaxVel 50000 F64 Tacc 0 1 Tdec 0 1 U16 m_curve 1 U16 m_r_a 0 116 status DMC 01 start spiral xy CardNo NodelD SlotID Center X Center_Y Spiral interval Spiral angle StrVel MaxVel Tacc Tdec m curve m r a 20 28 Revised March 2012 20 14 DMC 01 start spiral2 xy mE FORMAT Chapter 20 2 Axis Arc Interpolation Motion Control API PCI DMC A01 PCI DMC B01 116 PASCAL DMC 01 start spiral2 xy U16 CardNo U16 NodelD U16 SlotID 132 center x 132 center y 132 end x 132 end y U16 dir U16 circlenum 132 StrVel 132 MaxVel F64 Tacc F6
375. unction 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 4 Select motion mode and set motion distance 2 3 Set distance Abs S Curve Dist Os Figure 3 36 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 Set Servo Motor Power ON OFF servo on servo off SYON E STOP gt Figure 3 37 Click on the SVON button to execute the following procedure rt DMC 01 ipo set svon gDMCCardNo NodelD SlotID ON OFF ON OFF 0 Servo Power OFF 1 Servo Power ON Revised March 2012 3 23 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 24 6 Start point to point motion control 7 Click on the gt or C button to execute the following procedure rt DMC 01 start sa move gDMCCardNo NodelD SlotID Distance StrVel MaxVel acc dec Motion displacement using absolute coordinates with S curve velocity cross section rt DMC 01 start ta move gDMCCardNo NodelD SlotlD Distance StrVel
376. unction that returns error code rc is the parsed return value Switch rc Case 3 printf Card No Error Please check Card No again break default break 2 4 Revised March 2012 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 Chapter 3 Operating Principles 3 1 Card Initialization 3 1 1 Function List Table 3 1 _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 x 1 Open card Card num 1 2 Card init Figure 3 1 1 Open card 1 Open card Card num 1 Figure 3 2 Revised March 2012 3 1 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 2 3 x x 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 8gDMCExistCards Card initialization 2 Card init Figure 3 3 Click on the Card init button to execute the following procedure for i 0 i lt gDMCExistCards i Get the card number of the i th card on the PC Card number is the value set by the DIP Switch rt DMC 01 get CardNo sea i amp CardNo gpDMCCardNoList i CardNo Check to see if the card has been initialized I
377. ut Node ID and check the Timer checkbox to enable motion status display NodelD item API function s argument variable NodelD Timer Checkbox Check to display the motion status Uncheck to disable display Revised March 2012 3 19 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 20 3 Enter the values of the arguments for motion control 4 5 7 x lt x 2 2 Set vel prof StrVel 0 pps MaxVel 0 pps Acc 0 sec SCurve 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 S Curve checkbox You must check this box if you wish to use the S curve velocity curve 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 NodelD SlotID ON OFF I ON OFF 0 Servo Power OFF 1 Servo Power ON Start velocity motion control Click on the gt or C button to execute the following procedure S curve velocity curve rt DMC 01 sv move gDMCCardNo NodelD SlotID StrVel MaxVel acc 0 T curve velocity curve rt DMC 01 tv move gDMCCardNo NodelD SlotID StrVel MaxVel acc 0 Stop motion Hit the STOP button to execute an emer
378. ut pin status E Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 i 0 Disable On Off U16 Selection 1 Enable E Example U16 CardNo 0 U16 On Off 0 116 status DMC 01 get dio output CardNo 8On Off 6 8 Revised March 2012 Chapter 6 Interface API PCI DMC A01 PCI DMC B01 6 14 DMC 01 get dio input m FORMAT 116 PASCAL DMC 01 get dio input U16 CardNo U16 On Off E Purpose Retrieves GPIO input pin status H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 0 Disabl On Off U16 Selection ie 1 Enable E Example U16 CardNo 0 U16 On_Off 0 116 status DMC 01 get dio input CardNo amp On_Off 6 15 DMC 01 get cycle time m FORMAT 116 PASCAL DMC 01 get cycle time U16 CardNo 132 time E Purpose Retrieves current cycle time for finding checking devices Time must be less than 1000 us H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 time 132 Number Time value must be less than 1000 E Example U16 CardNo 0 132 taskTime 0 Get device cycle time Value of taskTime must be less than 1000 116 status _DMC_01_get_cycle_time CardNo amp taskTime Revised March 2012 6 9 Chapter 6 Interface API PCI DMC A01 PCI DMC B01 6 16 DMC 01 initial bus2 m FORMAT 116 PASCAL DMC 01 initial bus2
379. ve num O Timer Figure 3 49 Check the Timer checkbox to enable motion status display Timer Checkbox Check to display the motion status Uncheck to disable display 3 Enter the values of the arguments for motion control 2 1 Set vel prof StrVel 0 pps Acc O sec Maxel 0 pps Dec 0 sec O Abs O Curve Figure 3 50 3 32 Revised March 2012 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 reguired to go from maximum velocity to 0 API function s argument variable dec 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 4 Select the type of 2 axis arc interpolation and enter the corresponding values 2 2 Arc mode ri Cen Z OF Cen Y 0 Angle e 0 C Arc2 End X 0 Em Y O Angle O C c23 CenX 0 Cen Y 0 EdX 0 Eni 0 Dir 0 Figure 3 51 Arc 1 Interpolation method 1 Must provide the center coordinates X Y and angle 0 to 359 Cen Xitem Center s x coordinate API function s argument variable arc1 cen x Cen Y item Center s y coordinate API function s ar
380. vement is to the left If the Home switch is already activated at the start of motion then the direction it initially moves in will depend on the edge it finds The home position for this mode is at the index pulse on a Home switch located on either side of the positive or negative edge The two diagrams below show how if initial direction did not the Home switch this motion must come into contact with a limit switch before it reverses direction Index Pulse Home Switch 7 2 Positive Limit Switch tig 4 299 Figure 10 5 Index Pulse Home Sw M p Negative Limit Switch dk Ss oss a Figure 10 6 Revised March 2012 10 5 Chapter 10 Homing Motion Control Packet Protocol API PCI DMC A01 PCI DMC B01 415 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 Homing depends solely on switching Home and limit switches Example Method 19 and 20 uses a homing mode similar to methods 3 and 4 as shown below in Fig 11 7 Home Switch Figure 10 7 31 and 32 Reserved This is reserved for adding other homing modes in the future 33 and 34 Homing mode related to index pulse With methods 33 and 34 the positive and negative direction of homing is determined by the index pulse it detects i 1 0 ol l M k
381. vices with Node ID 1 2 and 3 exist gt XYou can use the following algorithm to find the Node ID for SDO IMask 0x1 for i 0 i lt 32 i Condition is met when the i th bit is 1 if gpSlaveTable 0 gDMCCardNo gt gt i amp IMask The derived i th value 1 is the Node ID and corresponds to servo parameter P3 00 gpNodelD gNodeNum unsigned short i 1 gNodeNum 4 Exit procedure Exit Figure 3 5 Click on the Exit button to execute the following procedure for i 0 i lt gDMCExistCards i rt DMC 01 reset card gpDMCCardNokist i Reset card DMC 01 close Shut down PCI DMC A01 Revised March 2012 3 3 Chapter 3 Operating Principles PCI DMC A01 PCI DMC B01 3 2 Read Write Driver Parameters 3 2 1 Function List Table 3 2 DMC 01 set pdo mode DMC 01 read servo parameter DMC 01 write servo parameter 3 2 2 Sample Application Program Appearance e PCI DMC x 1 Open card iba i Slave num 12 2 Driver parameters Node ID SlotID Group Index 1 f oy oy 0 RC Data 1736 Red Figure 3 6 1 Card Initialization and Mode Switching 1 Open card EE E Slave num 12 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 and
382. vised March 2012 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 NodelD SlotID Port 8 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 MasterNodelD MasterSlotID NodelD SlotID enable pulse ratio ratio slope 7 If you wish to use the JOG function you must check the Jog checkbox and execute the following procedure rt DMC 01 set rm jog axes enable CardNo MasterNodelD MasterSlotID NodelD SlotID enable jog mode jog speed sec Execute JOG motion control 8 Stop MPG and JOG motion control If you wish to stop MPG or JOG motion control please uncheck the MPG or JOG checkboxes to stop their motion control 9 Reset SERVON status If you wish to reset the SERVON status you must uncheck the MPG or JOG checkboxes then click on the RESET button to execute the following procedure rt DMC 01 set command gDMCCardNo NodelD SlotID 0 Reset Command to 0 rt DMC 01 set position gDMCCardNo NodelD SlotID 0 Reset Position to 0 x 10 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
383. x00 0x00 0x00 Table description 1 Can use the standard CANopen SDO format to read from A2 parameter 2 P3 00 Node ID CANopen s Index is set as 0x2300 and Subldx is set as 0x00 Format PA OO Servo parameter 0x2A 00 Index value O1Expressed as OOhexadecimal If Index is set as 0x2300 this means read parameter at P3 00 If Index is set as 0x212D this means read parameter at P1 45 2D is the hexadecimal notation for 45 3 Subldx are all set to 0x00 To write to ASDA A2 parameter the return value is in the following format Table 8 7 Field Sub Datatype Index low Index high i Data1 Data2 Data3 Data4 name index Command Ox2b 0x00 0x23 0x00 Ox7F 0x00 0x00 0x00 Return 0x60 0x00 0x23 0x00 0x00 0x00 0x00 0x00 Table description 1 Can use the standard CANopen SDO format to write to A2 parameter 2 P3 00 Node ID CANopen s Index is set as 0x2300 and Subldx is set as 0x00 Format PA OO Servo parameter 0x2A 00 Index value UOExpressed as OOhexadecimal 3 Subldx are all set to 0x00 4 ASDA A2 parameter s data length is 16bit or 32bit 5 You may refer to the ASDA A2 EDS file to find the DataType for the corresponding parameter Index If DataType 3 data length is 16 bit and the DataType for command write should be 0x2b If DataType 4 data length is 32 bit and the DataType for command write should be 0x23b Revised March
384. y 0 Node 1 NodelDArray 1 Node 2 NodelDArray 2 Node 3 SlotID U16 Number Unit Slot ID Absolute path parameter for motion of Node DisX 132 Number of pulses i ID on X axis A Absolute path parameter for motion of Node DisY 132 Number of pulses i ID on Y axis A Absolute path parameter for motion of Node DisZ 132 Number of pulses A ID on Z axis StrVel 132 Pulses per second Starting velocity parameter MaxVel 132 Pulses per second Maximum velocity parameter Tacc F64 Second Specified acceleration time Tdec F64 Second Specified deceleration time m Example 21 4 U16 CardNo 0 U16 NodelDArray 3 1 2 3 U16 SlotID 3 0 0 O 132 DisX 25000 DisY 50000 DisZ 75000 I32 StrVel 0 MaxVel 50000 F64 Tacc 0 1 Tdec 0 1 116 status DMC 01 start ta move xyz CardNo NodelDArray SlotID DisX DisY DisZ StrVel MaxVel Tacc Tdec Revised March 2012 Chapter 21 3 Axis Linear Interpolation Motion Control API PCI DMC A01 PCI DMC B01 21 4 DMC 01 start sa move xyz E FORMAT 116 PASCAL DMC 01 start sa move xyz U16 CardNo U16 NodelD U16 SlotID 132 DisX 132 DisY 132 DisZ 132 StrVel 132 MaxVel F64 Tacc F64 Tdec E Purpose 3 axis linear interpolation motion using absolute coordinates with S curve velocity cross section H Parameters Name Data Type Unit Description CardNo U16 Number Unit CardNo is between 0 15 Holds Node ID sets used for linear interpolation NodelD
385. y cross section 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 _DMC_01_start_sr_move_2seg2 2nd motion displacement using relative coordinates with S curve velocity cross section _DMC_01_start_ta_move_2seg2 2nd motion displacement using absolute coordinates with T curve velocity cross section _DMC_01_start_sa_move_2seg2 2nd motion displacement using absolute coordinates with S curve velocity cross section _DMC_01_feedrate_overwrite Change motion speed or speed ratio _DMC_01_start_v3_move Revised March 2012 Single axis motion displacement with EndVel added 18 1 Chapter 18 1 Axis Motion Control API PCI DMC A01 PCI DMC B01 18 1 DMC 01 start tr move H FORMAT 116 PASCAL DMC 01 start tr move U16 CardNo U16 NodelD U16 SlotID 132 Dist 132 StrVel 132 MaxVel F64 Tacc F64 Tdec E Purpose Motion displacement using relative coordinates with T curve velocity cross section Please see Fig 18 1 for more detailed information When setting StrVel make sure

Download Pdf Manuals

image

Related Search

Related Contents

Epson DW420 User's Manual    Philips Bluetooth stereo headset SHB7100  3次元CADを導入し 解析や干渉のチェックで手戻りを削減 2  Dacor Oven DR30GIS User's Manual  ASUS Pad(TF701T) User's Manual  T'nB MGVWHEEL mice  Operating instructions  Organisation: panorama d`une méthode de diagnostic  Dossier de présentation  

Copyright © All rights reserved.
Failed to retrieve file