all_value.h
4.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
#ifndef __ALL_VALUE_H
#define __ALL_VALUE_H
#include "sys.h"
#include "my_data.h"
#include "My_GetAdc.h"
#include "math.h"
#include "Message.h"
#include "Axis.h"
#include "PauseCourse.h"
#include "ErrCourse.h"
#include "BasicMath.h"
#include "WorkCourse.h"
#include "IN_OUT.h"
#include "ActionCourse.h"
#include "Commun_TCP.h"
/********************硬件使用***********************/
#define ZHUANJDZen 1u
#define WeightEn 0//存在测重
# define ConveyorEn 0u//是否有输送
#define TZMiss 0u
#define AngLineDeltaMax 4 // 点点间直线角度允许的最大变化,单位度
#define AngLineDuanDeltaMax 20 // 短距离最大变化,单位度
#define DisLineDuan 400
extern u16 Tim5_SystemTimeNums;
extern u8 F_WheelTy;
//typedef struct
//{
// u8 step; //逻辑步骤
// u8 act; //动作步骤
// u8 act_t; //动作步骤返回值
// u8 over; //任务完成
// double distance; //距离
// double distancearc;
//// double distancey;
//}TASK;
typedef struct
{
double circle; //计算旋转弧度
double trayphi; //计算托盘旋转角度
// int traytime; //计算托盘旋转时间
}MATH;
/**TIM区域选择输出**/
extern u8 Out_LRadarBIn1; //TIM_IN1
extern u8 Out_LRadarBIn2; //TIM_IN2
extern u8 Out_LRadarBIn3; //TIM_IN3
extern u8 Out_LRadarBIn4; //TIM_IN4
extern u8 radararea; //
extern u8 radarstop; //
extern u8 LIMIT_1; //下限位开关
extern u8 LIMIT_2; //上限位开关
extern u8 LIMIT_3;
extern u8 LIMIT_4;
/**********************my_map****************************************/
extern u8 Map_fresh1; //地图起点更新标志
extern u8 Map_fresh2; //地图终点更新标志
//extern u8 Code_fresh1; //码值更新标志 1//用于上位机交互
//extern u8 Code_fresh2; //码值更新标志 2//用于计算延时距离
extern u8 Code_fresh3; //码值更新标志 3//用于心跳自身状态管理
//extern u8 Task_fresh; //任务更新标志
extern u32 get_startstopcode_dir[4];//地图信息
extern u8 validCode; //有效码值
/***********************内存*********************************/
//extern int Wheelkk; //驱动轮减速比
//extern int Trayrotkk; //托盘旋转减速比
//extern int Trayupdownkk; //托盘升降减速比
//extern double Wheelddis;
//extern int Traygear1; //托盘大齿轮数
//extern int Traygear2; //托盘小齿轮数
//extern double codexkk; //相机x机械偏差
//extern double codeykk; //相机y机械偏差
//extern double codexykk; //相机精度
extern signed long yspeed;
extern double ykk;
//extern signed long rot_speedh;
//extern signed long rot_speedl;
//extern signed long tray_speedh;
//extern signed long tray_speedl;
extern signed long up_speed;
extern signed long down_speed;
extern double chargedistance;
extern double charge_speed;
extern int powertimes;
extern double codedistance;
extern double rectifykk;
//extern double ratiokk;
//extern double runkk1; //修正系数
//extern double runkk2;
//extern double runkk3;
//extern double runkk4;
extern double runkk;
extern u8 BatteryAh;
//extern u8 tray_initial_step;
//extern u8 tray_initial_ok;
//extern u8 rottray_ok;
extern int wqq;
extern int wq;
extern float Voltage1;//采集的电压
extern float Voltage2;//采集的电压
extern u8 Handnum1 ;
extern u8 Ceshi[30] ;
extern u8 Electrify_En;
extern float PulseAng_Helm;
extern float Pulsemm_Helm;
extern float F_XDis_Helm;
extern float F_YDis_Helm;
extern float F_DX_ScanLaInstall;
extern float F_DY_ScanLaInstall;
extern float Dis_AgvC_Helm;//舵轮中心距离车中心的距离
extern float Dis_LaToAgvInStall;//雷达中心相对车中心距离
extern float R_DisMin;//弧形旋转时最小半径
extern short F_Ang_HelmZerToAgvX;//舵轮的安装偏角
/****AGV基础参数信息****/
# define AgvStypeNo 1 //1-差速车;2-舵轮车;
#define PulsemmK_Helm 1.0f//轮子直径系数
# define DisK_AgvC_Helm 1.0f//舵轮中心距系数
# define Ang_LaInstall 45.0f //雷达安装方向角度
# define Ang_LaS_AllS 45.0f
# define Ang_DeltaMax 30.0f
# define PulseS_Circle 65535u//电机单圈脉冲量
#define Pi 3.14159f;
extern float AngCw_Helm;
extern u8 Tim3_XCNums[1];//线程计时器
extern char F_Agvname[8];//AGV名称 A02_0112
void Value1Init(void);
void Value2Init(void);
typedef union {
u8 ConyUpTy;
u8 ConyDownTy;
}Union_u8;
extern Union_u8 Unionu8_1;
extern Union_u8 Unionu8_2;
typedef union {
u16 Weight;
}Union_u16;
extern Union_u16 Union16_1;
#endif