?? mpc2810.bas
字號:
Attribute VB_Name = "FunctionDeclare"
Option Explicit
Declare Function auto_set Lib "MPC2810" () As Long
Declare Function init_board Lib "MPC2810" () As Long
Declare Function set_unit_flag Lib "MPC2810" (ByVal flag As Long) As Long
'屬性設置函數
Declare Function set_outmode Lib "MPC2810" (ByVal ch As Long, ByVal mode As Long, ByVal logic As Long) As Long
Declare Function set_home_mode Lib "MPC2810" (ByVal ch As Long, ByVal origin_mode As Long) As Long
Declare Function set_dir Lib "MPC2810" (ByVal ch As Long, ByVal dir As Long) As Long
Declare Function enable_sd Lib "MPC2810" (ByVal ch As Long, ByVal flag As Long) As Long
Declare Function enable_el Lib "MPC2810" (ByVal ch As Long, ByVal flag As Long) As Long
Declare Function enable_org Lib "MPC2810" (ByVal ch As Long, ByVal flag As Long) As Long
Declare Function enable_alm Lib "MPC2810" (ByVal ch As Long, ByVal flag As Long) As Long
Declare Function set_sd_logic Lib "MPC2810" (ByVal ch As Long, ByVal flag As Long) As Long
Declare Function set_el_logic Lib "MPC2810" (ByVal ch As Long, ByVal flag As Long) As Long
Declare Function set_org_logic Lib "MPC2810" (ByVal ch As Long, ByVal flag As Long) As Long
Declare Function set_alm_logic Lib "MPC2810" (ByVal ch As Long, ByVal flag As Long) As Long
Declare Function set_getpos_mode Lib "MPC2810" (ByVal ch As Long, ByVal mode As Long) As Long
Declare Function set_encoder_mode Lib "MPC2810" (ByVal ch As Long, ByVal mode As Long, ByVal multip As Long, ByVal count_unit As Long) As Long
'批處理操作函數
Declare Function open_list Lib "MPC2810" () As Long
Declare Function close_list Lib "MPC2810" () As Long
Declare Function add_list Lib "MPC2810" () As Long
Declare Function start_lookahead Lib "MPC2810" () As Long
Declare Function end_lookahead Lib "MPC2810" () As Long
'參數設置函數
Declare Function set_maxspeed Lib "MPC2810" (ByVal ch As Long, ByVal maxspeed As Double) As Long
Declare Function set_conspeed Lib "MPC2810" (ByVal ch As Long, ByVal conspeed As Double) As Long
Declare Function set_profile Lib "MPC2810" (ByVal ch As Long, ByVal vl As Double, ByVal vh As Double, ByVal ad As Double) As Long
Declare Function set_vector_conspeed Lib "MPC2810" (ByVal conspeed As Double) As Long
Declare Function set_vector_profile Lib "MPC2810" (ByVal vec_vl As Double, ByVal vec_vh As Double, ByVal vec_ad As Double) As Long
Declare Function c_set_vector_profile Lib "MPC2810" (ByVal vec_vl As Double, ByVal vec_vh As Double, ByVal vec_ad As Double) As Long
Declare Function c_set_max_accel Lib "MPC2810" (ByVal vec_v As Double) As Long
Declare Function c_set_multiple Lib "MPC2810" (ByVal mul As Double) As Long
Declare Function set_ellipse_ratio Lib "MPC2810" (ByVal ratio As Double) As Long
Declare Function set_s_curve Lib "MPC2810" (ByVal ch As Long, ByVal mode As Long) As Long
Declare Function set_s_section Lib "MPC2810" (ByVal ch As Long, ByVal accel_sec As Double, ByVal decel_sec As Double) As Long
Declare Function set_abs_pos Lib "MPC2810" (ByVal ch As Long, ByVal pos As Double) As Long
Declare Function reset_pos Lib "MPC2810" (ByVal ch As Long) As Long
Declare Function set_unit Lib "MPC2810" (ByVal ch As Long, ByVal dl As Double) As Long
Declare Function set_steps_pr Lib "MPC2810" (ByVal ch As Long, ByVal rd As Long) As Long
Declare Function set_enc_thread Lib "MPC2810" (ByVal ch As Long, ByVal rd As Long) As Long
'運動指令函數
Declare Function con_pmove Lib "MPC2810" (ByVal ch As Long, ByVal Step As Double) As Long
Declare Function con_pmove_to Lib "MPC2810" (ByVal ch As Long, ByVal Step As Double) As Long
Declare Function fast_pmove Lib "MPC2810" (ByVal ch As Long, ByVal Step As Double) As Long
Declare Function fast_pmove_to Lib "MPC2810" (ByVal ch As Long, ByVal Step As Double) As Long
Declare Function con_pmove2 Lib "MPC2810" (ByVal ch1 As Long, ByVal step1 As Double, ByVal ch2 As Long, ByVal step2 As Double) As Long
Declare Function fast_pmove2 Lib "MPC2810" (ByVal ch1 As Long, ByVal step1 As Double, ByVal ch2 As Long, ByVal step2 As Double) As Long
Declare Function con_pmove3 Lib "MPC2810" (ByVal ch1 As Long, ByVal step1 As Double, ByVal ch2 As Long, ByVal step2 As Double, ByVal ch3 As Long, ByVal step3 As Double) As Long
Declare Function fast_pmove3 Lib "MPC2810" (ByVal ch1 As Long, ByVal step1 As Double, ByVal ch2 As Long, ByVal step2 As Double, ByVal ch3 As Long, ByVal step3 As Double) As Long
Declare Function con_pmove4 Lib "MPC2810" (ByVal ch1 As Long, ByVal step1 As Double, ByVal ch2 As Long, ByVal step2 As Double, ByVal ch3 As Long, ByVal step3 As Double, ByVal ch4 As Long, ByVal step4 As Double) As Long
Declare Function fast_pmove4 Lib "MPC2810" (ByVal ch1 As Long, ByVal step1 As Double, ByVal ch2 As Long, ByVal step2 As Double, ByVal ch3 As Long, ByVal step3 As Double, ByVal ch4 As Long, ByVal step4 As Double) As Long
Declare Function con_vmove Lib "MPC2810" (ByVal ch As Long, ByVal dir As Long) As Long
Declare Function fast_vmove Lib "MPC2810" (ByVal ch As Long, ByVal dir As Long) As Long
Declare Function con_vmove2 Lib "MPC2810" (ByVal ch1 As Long, ByVal dir1 As Long, ByVal ch2 As Long, ByVal dir2 As Long) As Long
Declare Function fast_vmove2 Lib "MPC2810" (ByVal ch1 As Long, ByVal dir1 As Long, ByVal ch2 As Long, ByVal dir2 As Long) As Long
Declare Function con_vmove3 Lib "MPC2810" (ByVal ch1 As Long, ByVal dir1 As Long, ByVal ch2 As Long, ByVal dir2 As Long, ByVal ch3 As Long, ByVal dir3 As Long) As Long
Declare Function fast_vmove3 Lib "MPC2810" (ByVal ch1 As Long, ByVal dir1 As Long, ByVal ch2 As Long, ByVal dir2 As Long, ByVal ch3 As Long, ByVal dir3 As Long) As Long
Declare Function con_vmove4 Lib "MPC2810" (ByVal ch1 As Long, ByVal dir1 As Long, ByVal ch2 As Long, ByVal dir2 As Long, ByVal ch3 As Long, ByVal dir3 As Long, ByVal ch4 As Long, ByVal dir4 As Long) As Long
Declare Function fast_vmove4 Lib "MPC2810" (ByVal ch1 As Long, ByVal dir1 As Long, ByVal ch2 As Long, ByVal dir2 As Long, ByVal ch3 As Long, ByVal dir3 As Long, ByVal ch4 As Long, ByVal dir4 As Long) As Long
Declare Function con_hmove Lib "MPC2810" (ByVal ch As Long, ByVal dir As Long) As Long
Declare Function fast_hmove Lib "MPC2810" (ByVal ch As Long, ByVal dir As Long) As Long
Declare Function con_hmove2 Lib "MPC2810" (ByVal ch1 As Long, ByVal dir1 As Long, ByVal ch2 As Long, ByVal dir2 As Long) As Long
Declare Function fast_hmove2 Lib "MPC2810" (ByVal ch1 As Long, ByVal dir1 As Long, ByVal ch2 As Long, ByVal dir2 As Long) As Long
Declare Function con_hmove3 Lib "MPC2810" (ByVal ch1 As Long, ByVal dir1 As Long, ByVal ch2 As Long, ByVal dir2 As Long, ByVal ch3 As Long, ByVal dir3 As Long) As Long
Declare Function fast_hmove3 Lib "MPC2810" (ByVal ch1 As Long, ByVal dir1 As Long, ByVal ch2 As Long, ByVal dir2 As Long, ByVal ch3 As Long, ByVal dir3 As Long) As Long
Declare Function con_hmove4 Lib "MPC2810" (ByVal ch1 As Long, ByVal dir1 As Long, ByVal ch2 As Long, ByVal dir2 As Long, ByVal ch3 As Long, ByVal dir3 As Long, ByVal ch4 As Long, ByVal dir4 As Long) As Long
Declare Function fast_hmove4 Lib "MPC2810" (ByVal ch1 As Long, ByVal dir1 As Long, ByVal ch2 As Long, ByVal dir2 As Long, ByVal ch3 As Long, ByVal dir3 As Long, ByVal ch4 As Long, ByVal dir4 As Long) As Long
Declare Function con_line2 Lib "MPC2810" (ByVal ch1 As Long, ByVal step1 As Double, ByVal ch2 As Long, ByVal step2 As Double) As Long
Declare Function con_line3 Lib "MPC2810" (ByVal ch1 As Long, ByVal step1 As Double, ByVal ch2 As Long, ByVal step2 As Double, ByVal ch3 As Long, ByVal step3 As Double) As Long
Declare Function con_line4 Lib "MPC2810" (ByVal ch1 As Long, ByVal step1 As Double, ByVal ch2 As Long, ByVal step2 As Double, ByVal ch3 As Long, ByVal step3 As Double, ByVal ch4 As Long, ByVal step4 As Double) As Long
Declare Function con_linen_to Lib "MPC2810" (ByVal chnum As Long, ByRef ch As Long, ByRef pos As Double) As Long
Declare Function fast_line2 Lib "MPC2810" (ByVal ch1 As Long, ByVal step1 As Double, ByVal ch2 As Long, ByVal step2 As Double) As Long
Declare Function fast_line3 Lib "MPC2810" (ByVal ch1 As Long, ByVal step1 As Double, ByVal ch2 As Long, ByVal step2 As Double, ByVal ch3 As Long, ByVal step3 As Double) As Long
Declare Function fast_line4 Lib "MPC2810" (ByVal ch1 As Long, ByVal step1 As Double, ByVal ch2 As Long, ByVal step2 As Double, ByVal ch3 As Long, ByVal step3 As Double, ByVal ch4 As Long, ByVal step4 As Double) As Long
Declare Function fast_linen_to Lib "MPC2810" (ByVal chnum As Long, ByRef ch As Long, ByRef pos As Double) As Long
Declare Function arc_center Lib "MPC2810" (ByVal ch1 As Long, ByVal ch2 As Long, ByVal cen1 As Double, ByVal cen2 As Double, ByVal angle As Double) As Long
Declare Function arc_final Lib "MPC2810" (ByVal ch1 As Long, ByVal ch2 As Long, ByVal dir As Long, ByVal fx As Double, ByVal fy As Double, ByVal r As Double) As Long
Declare Function fast_arc_center Lib "MPC2810" (ByVal ch1 As Long, ByVal ch2 As Long, ByVal cen1 As Double, ByVal cen2 As Double, ByVal angle As Double) As Long
Declare Function helical_move Lib "MPC2810" (ByVal ch1 As Long, ByVal ch2 As Long, ByVal ch3 As Long, ByVal cen1 As Double, ByVal cen2 As Double, ByVal angle As Double, ByVal pitch As Double) As Long
'制動函數
Declare Function sudden_stop Lib "MPC2810" (ByVal ch As Long) As Long
Declare Function sudden_stop2 Lib "MPC2810" (ByVal ch1 As Long, ByVal ch2 As Long) As Long
Declare Function sudden_stop3 Lib "MPC2810" (ByVal ch1 As Long, ByVal ch2 As Long, ByVal ch3 As Long) As Long
Declare Function sudden_stop4 Lib "MPC2810" (ByVal ch1 As Long, ByVal ch2 As Long, ByVal ch3 As Long, ByVal ch4 As Long) As Long
Declare Function decel_stop Lib "MPC2810" (ByVal ch As Long) As Long
Declare Function decel_stop2 Lib "MPC2810" (ByVal ch1 As Long, ByVal ch2 As Long) As Long
Declare Function decel_stop3 Lib "MPC2810" (ByVal ch1 As Long, ByVal ch2 As Long, ByVal ch3 As Long) As Long
Declare Function decel_stop4 Lib "MPC2810" (ByVal ch1 As Long, ByVal ch2 As Long, ByVal ch3 As Long, ByVal ch4 As Long) As Long
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -