📄 parameter.c
字号:
/******************************************************************
* 文件名称: PARAMETER . c *
* 文件用途: 参数模块 *
* *
* *
* *
*******************************************************************/
#include "Public.h"
/**************************函数声明***************************************/
void ParameterInit();
/**************************变量声明***************************************/
struct PARAMETER code PARAMETERTABLE[PARAMATERSIZE]= //参数表
{
//运动参数
{3 , 0 , 8000000 , &ParameterValue.lYPStroke}, //Par1
{3 , -8000000 , 0 , &ParameterValue.lYNStroke}, //Par2
{3 , 0 , 8000000 , &ParameterValue.lZPStroke}, //Par3
{3 , -8000000 , 0 , &ParameterValue.lZNStroke}, //Par4
{0 , 0 , 8000 , &ParameterValue.unYFastSpeed}, //Par5
{0 , 0 , 8000 , &ParameterValue.unZFastSpeed}, //Par6
{0 , 0 , 8000 , &ParameterValue.unYHomeFastSpeed}, //Par7
{0 , 0 , 8000 , &ParameterValue.unZHomeFastSpeed}, //Par8
{0 , 0 , 1000 , &ParameterValue.unYHomeSlowSpeed}, //Par9
{0 , 0 , 1000 , &ParameterValue.unZHomeSlowSpeed}, //Par10
{0 , 8 , 999 , &ParameterValue.unYAccelerateTime}, //Par11
{0 , 8 , 999 , &ParameterValue.unZAccelerateTime}, //Par12
{0 , 8 , 999 , &ParameterValue.unYCutAccelerateTime}, //Par13
{0 , 8 , 999 , &ParameterValue.unZCutAccelerateTime}, //Par14
//传动参数
{1 , 1000 , 10000 , &ParameterValue.unYPitch}, //Par15
{1 , 1000 , 10000 , &ParameterValue.unZPitch}, //Par16
{1 , 0 , 10000 , &ParameterValue.unYBacklash}, //Par17
{1 , 0 , 10000 , &ParameterValue.unZBacklash}, //Par18
{0 , 0 , 255 , &ParameterValue.unYMotorGear}, //Par19
{0 , 0 , 255 , &ParameterValue.unYLeadScrewGear}, //Par20
{0 , 0 , 255 , &ParameterValue.unZMotorGear}, //Par21
{0 , 0 , 255 , &ParameterValue.unZLeadScrewGear}, //Par22
//伺服参数
{0 , 75 , 600 , &ParameterValue.unYVelocitySensitivity}, //Par23
{0 , 75 , 600 , &ParameterValue.unZVelocitySensitivity}, //Par24
{0 , 1000 , 20000 , &ParameterValue.unYEncoderResolution}, //Par25
{0 , 1000 , 20000 , &ParameterValue.unZEncoderResolution}, //Par26
{0 , 2000 , 2096 , &ParameterValue.unYZeroOffset}, //Par27
{0 , 2000 , 2096 , &ParameterValue.unZZeroOffset}, //Par28
{0 , 0 , 65535 , &ParameterValue.unKYp}, //Par29
{0 , 0 , 65535 , &ParameterValue.unKZp}, //Par30
{0 , 0 , 65535 , &ParameterValue.unKYi}, //Par31
{0 , 0 , 65535 , &ParameterValue.unKZi}, //Par32
{0 , 0 , 65535 , &ParameterValue.unKYd}, //Par33
{0 , 0 , 65535 , &ParameterValue.unKZd}, //Par34
{0 , 0 , 65535 , &ParameterValue.unIYlimit}, //Par35
{0 , 0 , 65535 , &ParameterValue.unIZlimit}, //Par36
{0 , 0 , 65535 , &ParameterValue.unKYv}, //Par37
{0 , 0 , 65535 , &ParameterValue.unKZv}, //Par38
{0 , 0 , 30000, &ParameterValue.unYServoError}, //Par39
{0 , 0 , 30000 , &ParameterValue.unZServoError}, //Par40
//其它参数
{2 , 0 , 255 , &ParameterValue.ucBitParameter1}, //Par41
{2 , 0 , 255 , &ParameterValue.ucBitParameter2}, //Par42
{2 , 0 , 255 , &ParameterValue.ucBitParameter3}, //Par43
{2 , 0 , 255 , &ParameterValue.ucBitParameter4}, //Par44
{2 , 0 , 255 , &ParameterValue.ucBitParameter5}, //Par45
{2 , 0 , 255 , &ParameterValue.ucBitParameter6}, //Par46
{0 , 0 , 255 , &ParameterValue.unYPitchOrigin}, //Par47
{0 , 0 , 255 , &ParameterValue.unZPitchOrigin}, //Par48
{1 , 0 , 65535 , &ParameterValue.unYPitchInteral}, //Par49
{1 , 0 , 65535, &ParameterValue.unZPitchInteral}, //Par50
{1 , 0 , 45000 , &ParameterValue.unYDegree}, //Par51
{1 , 0 , 45000 , &ParameterValue.unZDegree}, //Par52
{1 , 0 , 10000 , &ParameterValue.unYHomeGrid}, //Par53
{1 , 0 , 10000 , &ParameterValue.unZHomeGrid}, //Par54
{1 , 0 , 65535 , &ParameterValue.unFastBackStroke}, //Par55
{0 , 0 , 6000 , &ParameterValue.unSpindleLow}, //Par56
{0 , 0 , 6000 , &ParameterValue.unSpindleMiddle}, //Par57
{0 , 0 , 6000 , &ParameterValue.unSpindleHigh}, //Par58
{0 , 1 , 999 , &ParameterValue.unBrakeTime}, //Par59
{0 , 1 , 999 , &ParameterValue.unMTime}, //Par60
{0 , 4 , 255 , &ParameterValue.unNoInterval}, //Par61
};
#if MACHINETYPE
uchar code PARAMETEREXPLAIN[PARAMATERSIZE][10]= //参数含义
{
//运动参数
"X正限位", //Par1
"X负限位", //Par2
"Z正限位", //Par3
"Z负限位", //Par4
"X轴快速", //Par5
"Z轴快速", //Par6
"X回零快速", //Par7
"Z回零快速", //Par8
"X回零低速", //Par9
"Z回零低速", //Par10
"X快进加速",//Par11
"Z快进加速",//Par12
"X切削加速",//Par13
"Z切削加速",//Par14
//传动参数
"X轴螺距", //Par15
"Z轴螺距", //Par16
"X轴间隙", //Par17
"Z轴间隙", //Par18
"X电机齿数", //Par19
"X丝杠齿数", //Par20
"Z电机齿数", //Par21
"Z丝杠齿数", //Par22
//伺服参数
"X灵敏度", //Par23
"Z灵敏度", //Par24
"X线数", //Par25
"Z线数", //Par26
"X零偏补偿", //Par27
"Z零偏补偿", //Par28
"X比例系数", //Par29
"Z比例系数", //Par30
"X积分系数", //Par31
"Z积分系数", //Par32
"X微分系数", //Par33
"Z微分系数", //Par34
"X饱和度", //Par35
"Z饱和度", //Par36
"X速度前馈", //Par37
"Z速度前馈", //Par38
"X跟随误差", //Par39
"Z跟随误差", //Par40
//其他参数
"位参数1", //Par41
"位参数2", //Par42
"位参数3", //Par43
"位参数4", //Par44
"位参数5", //Par45
"位参数6", //Par46
"X补偿原点", //Par47
"Z补偿原点", //Par48
"X补偿间距", //Par49
"Z补偿间距", //Par50
"X轴斜角", //Par51
"Z轴斜角", //Par52
"X轴栅格量",//Par53
"Z轴栅格量",//Par54
"急退距离", //Par55
"主轴低档", //Par56
"主轴中档", //Par57
"主轴高档", //Par58
"制动时间",//Par59
"M码时间", //Par60
"程序行距",//Par61
};
uchar code BITPARAMETER1EXPLAIN[8][20] = // 位参数1各位的含义
{
"X轴电机极性",
"X轴编码器极性",
"Z轴电机极性",
"Z轴编码器极性",
"X轴回零极性",
"Z轴回零极性",
"急退轴选择",
"急退方向"
};
uchar code BITPARAMETER2EXPLAIN[8][20] = // 位参数2各位的含义
{
"X轴直径编程",
"保留",
"X轴回零位0",
"X轴回零位1",
"X轴回零位2",
"Z轴回零位0",
"Z轴回零位1",
"Z轴回零位2",
};
uchar code BITPARAMETER3EXPLAIN[8][20] = // 位参数3各位的含义
{
"X轴静差调节",
"Z轴静差调节",
"X轴启动回零",
"Z轴启动回零",
"保留",
"保留",
"X轴手轮记忆",
"Z轴手轮记忆"
};
uchar code BITPARAMETER4EXPLAIN[8][20] = // 位参数4各位的含义
{
"保留",
"保留",
"保留",
"保留",
"保留",
"保留",
"保留",
"保留",
};
uchar code BITPARAMETER5EXPLAIN[8][20] = // 位参数5各位的含义
{
"保留",
"保留",
"保留",
"保留",
"保留",
"保留",
"保留",
"保留",
};
uchar code BITPARAMETER6EXPLAIN[8][20] = // 位参数6各位的含义
{
"保留",
"保留",
"保留",
"保留",
"保留",
"保留",
"保留",
"保留",
};
uchar code PARAMETERSUBMENU[PARAMETERSUBMENUSIZE][14] = // 参数子菜单
{
"用户密码",
"运动参数",
"传动参数",
"伺服参数",
"其它参数",
"X轴螺距补偿",
"Z轴螺距补偿",
"浮点型宏变量",
"整数型宏变量"
};
#else
uchar code PARAMETEREXPLAIN[PARAMATERSIZE][10]= //参数含义
{
//运动参数
"Y正限位", //Par1
"Y负限位", //Par2
"Z正限位", //Par3
"Z负限位", //Par4
"Y轴快速", //Par5
"Z轴快速", //Par6
"Y回零快速", //Par7
"Z回零快速", //Par8
"Y回零低速", //Par9
"Z回零低速", //Par10
"Y快进加速",//Par11
"Z快进加速",//Par12
"Y切削加速",//Par13
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -