⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mpc2810.bas

📁 MPC2810是乐创自动化技术有限公司开发的一款高性能四轴运动控制器。 MPC2810基于PC机PCI总线
💻 BAS
📖 第 1 页 / 共 2 页
字号:
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 + -