📄 mpc07.bas
字号:
Attribute VB_Name = "FunctionDeclare"
Option Explicit
Declare Function auto_set Lib "MPC07" () As Long
Declare Function init_board Lib "MPC07" () As Long
Declare Function get_max_axe Lib "MPC07" () As Long
Declare Function set_outmode Lib "MPC07" (ByVal ch As Long, ByVal mode As Long, ByVal logic As Long) As Long
Declare Function set_maxspeed Lib "MPC07" (ByVal ch As Long, ByVal maxspeed As Double) As Long
Declare Function set_conspeed Lib "MPC07" (ByVal ch As Long, ByVal conspeed As Double) As Long
Declare Function get_conspeed Lib "MPC07" (ByVal ch As Long) As Double
Declare Function set_profile Lib "MPC07" (ByVal ch As Long, ByVal vl As Double, ByVal vh As Double, ByVal ad As Double) As Long
Declare Function set_profile_ex Lib "MPC07" (ByVal ch As Long, ByVal vl As Double, ByVal vh As Double, ByVal ad As Double, ByVal dd As Double) As Long
Declare Function get_profile Lib "MPC07" (ByVal ch As Long, ByRef vl As Double, ByRef vh As Double, ByRef ad As Double) As Long
Declare Function get_profile_ex Lib "MPC07" (ByVal ch As Long, ByRef vl As Double, ByRef vh As Double, ByRef ad As Double, ByRef ad As Double) As Long
Declare Function get_rate Lib "MPC07" (ByVal ch As Long) As Double
'运动指令函数
Declare Function con_pmove Lib "MPC07" (ByVal ch As Long, ByVal step As Long) As Long
Declare Function fast_pmove Lib "MPC07" (ByVal ch As Long, ByVal step As Long) As Long
Declare Function con_pmove2 Lib "MPC07" (ByVal ch1 As Long, ByVal step1 As Long, ByVal ch2 As Long, ByVal step2 As Long) As Long
Declare Function fast_pmove2 Lib "MPC07" (ByVal ch1 As Long, ByVal step1 As Long, ByVal ch2 As Long, ByVal step2 As Long) As Long
Declare Function con_pmove3 Lib "MPC07" (ByVal ch1 As Long, ByVal step1 As Long, ByVal ch2 As Long, ByVal step2 As Long, ByVal ch3 As Long, ByVal step3 As Long) As Long
Declare Function fast_pmove3 Lib "MPC07" (ByVal ch1 As Long, ByVal step1 As Long, ByVal ch2 As Long, ByVal step2 As Long, ByVal ch3 As Long, ByVal step3 As Long) As Long
Declare Function con_vmove Lib "MPC07" (ByVal ch As Long, ByVal Dir As Long) As Long
Declare Function fast_vmove Lib "MPC07" (ByVal ch As Long, ByVal Dir As Long) As Long
Declare Function con_vmove2 Lib "MPC07" (ByVal ch1 As Long, ByVal dir1 As Long, ByVal ch2 As Long, ByVal dir2 As Long) As Long
Declare Function fast_vmove2 Lib "MPC07" (ByVal ch1 As Long, ByVal dir1 As Long, ByVal ch2 As Long, ByVal dir2 As Long) As Long
Declare Function con_vmove3 Lib "MPC07" (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 "MPC07" (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_hmove Lib "MPC07" (ByVal ch As Long, ByVal Dir As Long) As Long
Declare Function fast_hmove Lib "MPC07" (ByVal ch As Long, ByVal Dir As Long) As Long
Declare Function con_hmove2 Lib "MPC07" (ByVal ch1 As Long, ByVal dir1 As Long, ByVal ch2 As Long, ByVal dir2 As Long) As Long
Declare Function fast_hmove2 Lib "MPC07" (ByVal ch1 As Long, ByVal dir1 As Long, ByVal ch2 As Long, ByVal dir2 As Long) As Long
Declare Function con_hmove3 Lib "MPC07" (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 "MPC07" (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 set_vector_conspeed Lib "MPC07" (ByVal conspeed As Double) As Long
Declare Function set_vector_profile Lib "MPC07" (ByVal vec_vl As Double, ByVal vec_vh As Double, ByVal vec_ad As Double) As Long
Declare Function get_vector_conspeed Lib "MPC07" () As Double
Declare Function get_vector_profile Lib "MPC07" (ByRef vec_vl As Double, ByRef vec_vh As Double, ByRef vec_ad As Double) As Long
Declare Function con_line2 Lib "MPC07" (ByVal CHx As Long, ByVal pos1 As Long, ByVal CHy As Long, ByVal pos2 As Long) As Long
Declare Function con_line3 Lib "MPC07" (ByVal CHx As Long, ByVal pos1 As Long, ByVal CHy As Long, ByVal pos2 As Long, ByVal CHz As Long, ByVal pos3 As Long) As Long
Declare Function fast_line2 Lib "MPC07" (ByVal ch1 As Long, ByVal pos1 As Long, ByVal ch2 As Long, ByVal pos2 As Long) As Long
Declare Function fast_line3 Lib "MPC07" (ByVal ch1 As Long, ByVal pos1 As Long, ByVal ch2 As Long, ByVal pos2 As Long, ByVal ch3 As Long, ByVal pos3 As Long) As Long
'制动函数
Declare Function sudden_stop Lib "MPC07" (ByVal ch As Long) As Long
Declare Function sudden_stop2 Lib "MPC07" (ByVal ch1 As Long, ByVal ch2 As Long) As Long
Declare Function sudden_stop3 Lib "MPC07" (ByVal ch1 As Long, ByVal ch2 As Long, ByVal ch3 As Long) As Long
Declare Function decel_stop Lib "MPC07" (ByVal ch As Long) As Long
Declare Function decel_stop2 Lib "MPC07" (ByVal ch1 As Long, ByVal ch2 As Long) As Long
Declare Function decel_stop3 Lib "MPC07" (ByVal ch1 As Long, ByVal ch2 As Long, ByVal ch3 As Long) As Long
'位置和状态设置函数
Declare Function set_abs_pos Lib "MPC07" (ByVal ch As Long, ByVal pos As Long) As Long
Declare Function reset_pos Lib "MPC07" (ByVal ch As Long) As Long
Declare Function reset_cmd_counter Lib "MPC07" () As Long
'位置和状态查询函数
Declare Function set_dir Lib "MPC07" (ByVal ch As Long, ByVal Dir As Long) As Long
Declare Function enable_sd Lib "MPC07" (ByVal ch As Long, ByVal flag As Long) As Long
Declare Function set_dir_delay Lib "MPC07" (ByVal us As Long) As Long
Declare Function get_abs_pos Lib "MPC07" (ByVal ch As Long, ByRef pos As Long) As Long
Declare Function get_rel_pos Lib "MPC07" (ByVal ch As Long, ByRef pos As Long) As Long
Declare Function get_cur_dir Lib "MPC07" (ByVal ch As Long) As Long
'状态查询函数
Declare Function check_status Lib "MPC07" (ByVal ch As Long) As Long
Declare Function check_done Lib "MPC07" (ByVal ch As Long) As Long
Declare Function check_board Lib "MPC07" () As Long
Declare Function check_limit Lib "MPC07" (ByVal ch As Long) As Long
Declare Function check_home Lib "MPC07" (ByVal ch As Long) As Long
Declare Function check_SD Lib "MPC07" (ByVal ch As Long) As Long
Declare Function check_alarm Lib "MPC07" (ByVal ch As Long) As Long
Declare Function get_cmd_counter Lib "MPC07" () As Long
'I/O口操作函数
Declare Function checkin_byte Lib "MPC07" (ByVal cardno As Long) As Long
Declare Function checkin_bit Lib "MPC07" (ByVal cardno As Long, ByVal bitno As Long) As Long
Declare Function outport_bit Lib "MPC07" (ByVal cardno As Long, ByVal bitno As Long, ByVal status As Long) As Long
Declare Function outport_byte Lib "MPC07" (ByVal cardno As Long, ByVal bytedata As Long) As Long
'其它函数
Declare Function set_backlash Lib "MPC07" (ByVal axis As Long, ByVal blash As Long) As Long
Declare Function start_backlash Lib "MPC07" (ByVal axis As Long) As Long
Declare Function end_backlash Lib "MPC07" (ByVal axis As Long) As Long
Declare Function change_speed Lib "MPC07" (ByVal ch As Long, ByVal speed As Double) As Long
Declare Function Outport Lib "MPC07" (ByVal PortID As Long, ByVal OutPortData As Byte) As Long
Declare Function Inport Lib "MPC07" (ByVal PortID As Long) As Long
Declare Function get_lib_ver Lib "MPC07" (ByRef major As Long, ByRef minor1 As Long, ByRef minor2 As Long) As Long
Declare Function get_sys_ver Lib "MPC07" (ByRef major As Long, ByRef minor1 As Long, ByRef minor2 As Long) As Long
Declare Function get_card_ver Lib "MPC07" (ByVal cardno, ByRef cardtype As Long, ByRef major As Long, ByRef minor1 As Long, ByRef minor2 As Long) As Long
Declare Function get_axe Lib "MPC07" (ByVal board_no As Long) As Long
'Declare Function set_home_logic Lib "MPC07" (ByVal ch As Long, ByVal logic As Long) As Long
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -