2024-05-11 17:43:38 +08:00

76 lines
1.5 KiB
C++

#pragma once
#include <string>
#include <vector>
#include "../Communication/BaseData.h"
#include "../UI/Base.h"
using namespace std;
#define GTS_AXIS_ID_LOAD 1
#define GTS_AXIS_ID_MOLD 2
#define GTS_AXIS_ID_ARM 3
#define GTS_AXIS_ID_SUPPLY 4
#define GTS_AXIS_ID_CLEAN 5
#define GTS_AXIS_ID_ELE 6
#pragma pack(1)
class AxisCfg : public Base
{
public:
enum ActiveDirect {
UP=0,
DOWN,
LEFT,
RIGHT,
FRONT,
BACK
};
enum ServoType {
MITSUBISHI = 0,
SANYO,
SIEMENS,
MITSUBISHI_JE
};
AxisCfg(short id = 0);
~AxisCfg();
void GetUpdateSql(vector<string>& vecf);
short GetId() { return m_axis_id; }
void SetId(short id) { m_axis_id = id; }
public:
static string TABLE_NAME;
static string FIELD_ID;
static string FIELD_AXIS_ID;
static string FIELD_CODE;
static string FIELD_VALUE;
static string CODE_NAME;
static string CODE_ACTIVE_LIMIT;
static string CODE_NEGACTIVE_LIMIT;
static string CODE_ACTIVE_DIRECT;
static string CODE_OVER_LOAD_LIMIT;
static string CODE_SHOW_POS_INV; //显示位置置反
static string CODE_SHOW_REF_ZERO;
static string CODE_MAX_LOAD_VALUE;
static string CODE_SAFE_LIMIT;
public:
short m_axis_id;
string m_name;
char m_startFlag;
IntData* m_active_limit; //微米
IntData* m_negactive_limit; //微米
IntData* m_active_direct;
FloatData* m_OverLoadLimit; //负载越限值
FloatData* m_ShowRefZero; //微米
BoolData* m_ShowPosInv;
BoolData* m_IsUse;
FloatData* m_MaxLoadValue;
BoolData* m_SafeLimit;
char m_endFlag;
};
#pragma pack()