Machine Interface Utility:VER1.0
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,249 @@
|
||||
// protocol for control SevenOcean's Machine
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
#ifndef AFX_ANIMATICS_Proto_H__B422904C_2CEB_495B_B7BD_B45AB30286DD__INCLUDED_
|
||||
#define AFX_ANIMATICS_Proto_H__B422904C_2CEB_495B_B7BD_B45AB30286DD__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#include "..\Tools\UsbUtility\logger.h"
|
||||
#include "..\MicroVu\SsiStatus.h"
|
||||
#include "SMIDefs.h"
|
||||
//#include "IntegMotorInterface.h"
|
||||
|
||||
|
||||
#import "IntegMotorInterface.tlb"
|
||||
using namespace INTEGMOTORINTERFACELib;
|
||||
|
||||
#define MAX_BUFF_SIZE 0x200
|
||||
|
||||
#define THREAD_RUNNING_STATE 0
|
||||
#define THREAD_PAUSED 1
|
||||
#define THREAD_EXIT -1
|
||||
#define HBIT0 0X0001
|
||||
#define HBIT1 0X0002
|
||||
#define HBIT2 0X0004
|
||||
#define HBIT3 0X0008
|
||||
#define HBIT4 0X0010
|
||||
#define HBIT5 0X0020
|
||||
#define HBIT6 0X0040
|
||||
#define HBIT7 0X0080
|
||||
#define HBIT8 0X0100
|
||||
#define HBIT9 0X0200
|
||||
#define HBIT10 0X0400
|
||||
#define HBIT11 0X0800
|
||||
#define HBIT12 0X1000
|
||||
#define HBIT13 0X2000
|
||||
#define HBIT14 0X4000
|
||||
#define HBIT15 0X8000
|
||||
|
||||
|
||||
#pragma pack(push)
|
||||
#pragma pack(1)
|
||||
//====================================================================================================
|
||||
typedef struct s_smartmotor_axis // axis parameters
|
||||
{
|
||||
char _Move_Speed_Gear;
|
||||
long _l_move_dis;
|
||||
double _d_move_dis;
|
||||
long _l_cur_pos;
|
||||
double _d_cur_pos;
|
||||
double _dSet_Zero_Pos;
|
||||
long _lSet_Zero_Pos;
|
||||
long address;
|
||||
struct s_machine_status
|
||||
{
|
||||
int StatusWord[2];
|
||||
|
||||
BOOL DriverRdy;
|
||||
BOOL MotorOff;
|
||||
BOOL VoltageFault;
|
||||
BOOL PosErr;
|
||||
BOOL OverHeat;
|
||||
BOOL NegLimit;
|
||||
BOOL PosLimit;
|
||||
|
||||
|
||||
} s_machine_status;
|
||||
|
||||
} SMARTMOTORAXIS;
|
||||
//====================================================================================================
|
||||
struct s_smartmotor_axis_config // axis configuration
|
||||
{
|
||||
double _motor_precision;//set precision
|
||||
|
||||
int _speed_[5];
|
||||
int _accel_[5];
|
||||
int _decel_[5];
|
||||
|
||||
double _neg_working_limit;
|
||||
double _pos_working_limit;
|
||||
|
||||
double _scale_resolution;
|
||||
};
|
||||
//====================================================================================================
|
||||
typedef struct s_smartmotor_xyzzm
|
||||
{
|
||||
bool bFast;
|
||||
long from;
|
||||
long to;
|
||||
long speed;
|
||||
long acc;
|
||||
long dec;
|
||||
double dFromMM;
|
||||
double dToMM;
|
||||
} SMARTMOTORAXISMOVE;
|
||||
//====================================================================================================
|
||||
struct struct_smartmotor_machine
|
||||
{ // g_machine structure
|
||||
struct s_machine_config
|
||||
{
|
||||
struct s_smartmotor_axis_config x_axis;
|
||||
struct s_smartmotor_axis_config y_axis;
|
||||
struct s_smartmotor_axis_config z_axis;
|
||||
|
||||
} s_machine_config;
|
||||
struct s_status {
|
||||
BOOL _bXHomed;
|
||||
BOOL _bYHomed;
|
||||
BOOL _bZHomed;
|
||||
BOOL _bXYZHomed;
|
||||
|
||||
BOOL _machine_running;
|
||||
BOOL _bXMoving;
|
||||
BOOL _bYMoving;
|
||||
BOOL _bZMoving;
|
||||
BOOL _bXYZMoving;
|
||||
} s_status;
|
||||
|
||||
struct s_smartmotor_axis x;
|
||||
struct s_smartmotor_axis y;
|
||||
struct s_smartmotor_axis z;
|
||||
};
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
//====================================================================================================
|
||||
class SmartMotor_Proto
|
||||
{
|
||||
public:
|
||||
//=============Smart Motor===================
|
||||
//ISMICommPtr CommInterface;
|
||||
//ISMICMotionPtr CMotionInterface;
|
||||
//ISMIPathPtr PathInterface;
|
||||
|
||||
ISMICommPtr CommInterface;
|
||||
ISMICMotionPtr CMotionInterface;
|
||||
ISMIPathPtr PathInterface;
|
||||
|
||||
// machine threads.
|
||||
static int g_machine_Thread_State;
|
||||
static unsigned __stdcall g_machine_Thread(LPVOID pThis);
|
||||
static HANDLE g_machine_Thread_Id;
|
||||
static HANDLE g_machine_Serial_Mutex; // EP02
|
||||
|
||||
static HANDLE g_hHomedEvent;
|
||||
|
||||
//
|
||||
SmartMotor_Proto();
|
||||
virtual ~SmartMotor_Proto();
|
||||
|
||||
// Global Structures
|
||||
static struct_smartmotor_machine g_machine;
|
||||
|
||||
static double TimeInSecs(void);
|
||||
static CLogger* g_pLogger;
|
||||
|
||||
bool m_bHomingActive;
|
||||
|
||||
double ScaleToMM(long lCount, double dResolution);
|
||||
long MMtoScale(double lDistanceMM, double dResolution);
|
||||
static void _swap_byte(unsigned short &Val);
|
||||
static void _reverse_dword(DWORD *);
|
||||
static void _scale2inch(unsigned long scale, double &inch);
|
||||
static void _inch2scale(unsigned long &scale, double inch);
|
||||
static long _4char2long(unsigned char *cBuff);
|
||||
static long _3char2long(unsigned char *cBuff);
|
||||
static void _char2bin(unsigned char *cBuff, BYTE *cBytes, int len);
|
||||
|
||||
SSI_STATUS_SMARTMOTOR Create_thread();
|
||||
SSI_STATUS_SMARTMOTOR Exit_thread();
|
||||
|
||||
|
||||
|
||||
SSI_STATUS_SMARTMOTOR GetAppPath(CString &Path);
|
||||
SSI_STATUS_SMARTMOTOR ExtractAppPath(CString &Path);
|
||||
SSI_STATUS_SMARTMOTOR SaveSmartMotorConfig();
|
||||
SSI_STATUS_SMARTMOTOR LoadSmartMotorConfig();
|
||||
|
||||
BOOL InitSmartMotor();
|
||||
void StartSmartMotor();
|
||||
void StopSmartMotor();
|
||||
void _reset_config_parameter();
|
||||
|
||||
|
||||
SSI_STATUS_SMARTMOTOR smartmotor_motion_startup(double x_scale_resolution, double y_scale_resolution, double z_scale_resolution);
|
||||
SSI_STATUS_SMARTMOTOR smartmotor_motion_Dcc_Home();
|
||||
SSI_STATUS_SMARTMOTOR smartmotor_motion_IS_Homed();
|
||||
|
||||
SSI_STATUS_SMARTMOTOR _start_machine();
|
||||
SSI_STATUS_SMARTMOTOR _shutdown_machine();
|
||||
|
||||
SSI_STATUS_SMARTMOTOR smartmotor_motion_get_position_xyz(double & dX, double & dY, double & dZ);
|
||||
SSI_STATUS_SMARTMOTOR smartmotor_motion_get_pos_pulse_xyz(long & lX, long & lY, long & lZ);
|
||||
SSI_STATUS_SMARTMOTOR smartmotor_motion_set_position_xyz(double dX, double dY, double dZ, bool bWait);
|
||||
SSI_STATUS_SMARTMOTOR smartmotor_motion_move_rel_dis_xyz(double dX, double dY, double dZ, bool bWait);
|
||||
SSI_STATUS_SMARTMOTOR smartmotor_motion_stop_xyz();
|
||||
SSI_STATUS_SMARTMOTOR smartmotor_motion_stop_xyz_S();
|
||||
|
||||
SSI_STATUS_SMARTMOTOR smartmotor_motion_get_home_status();
|
||||
SSI_STATUS_SMARTMOTOR smartmotor_motion_get_motion_status();
|
||||
SSI_STATUS_SMARTMOTOR smartmotor_motion_get_status_word();
|
||||
|
||||
SSI_STATUS_SMARTMOTOR _calculate_straightline_motion(double dSpeedMM);
|
||||
|
||||
SSI_STATUS_SMARTMOTOR _send_cmd_SMARTMOTOR_GET_POS_XYZ();
|
||||
SSI_STATUS_SMARTMOTOR _send_cmd_SMARTMOTOR_MOVETOX_ABS(double dis);
|
||||
SSI_STATUS_SMARTMOTOR _send_cmd_SMARTMOTOR_MOVETOY_ABS(double dis);
|
||||
SSI_STATUS_SMARTMOTOR _send_cmd_SMARTMOTOR_MOVETOZ_ABS(double dis);
|
||||
SSI_STATUS_SMARTMOTOR _send_cmd_SMARTMOTOR_MOVETOX_REL(double dis);
|
||||
SSI_STATUS_SMARTMOTOR _send_cmd_SMARTMOTOR_MOVETOY_REL(double dis);
|
||||
SSI_STATUS_SMARTMOTOR _send_cmd_SMARTMOTOR_MOVETOZ_REL(double dis);
|
||||
SSI_STATUS_SMARTMOTOR _send_cmd_SMARTMOTOR_MOVEX(BOOL dir);
|
||||
SSI_STATUS_SMARTMOTOR _send_cmd_SMARTMOTOR_MOVEY(BOOL dir);
|
||||
SSI_STATUS_SMARTMOTOR _send_cmd_SMARTMOTOR_MOVEZ(BOOL dir);
|
||||
|
||||
SSI_STATUS_SMARTMOTOR _send_cmd_SMARTMOTOR_ABRUPT_STOPX();
|
||||
SSI_STATUS_SMARTMOTOR _send_cmd_SMARTMOTOR_ABRUPT_STOPY();
|
||||
SSI_STATUS_SMARTMOTOR _send_cmd_SMARTMOTOR_ABRUPT_STOPZ();
|
||||
SSI_STATUS_SMARTMOTOR _send_cmd_SMARTMOTOR_DECEL_STOPX();
|
||||
SSI_STATUS_SMARTMOTOR _send_cmd_SMARTMOTOR_DECEL_STOPY();
|
||||
SSI_STATUS_SMARTMOTOR _send_cmd_SMARTMOTOR_DECEL_STOPZ();
|
||||
|
||||
SSI_STATUS_SMARTMOTOR _send_cmd_SMARTMOTOR_COMM_CMDX(CString _command);
|
||||
SSI_STATUS_SMARTMOTOR _send_cmd_SMARTMOTOR_COMM_CMDY(CString _command);
|
||||
SSI_STATUS_SMARTMOTOR _send_cmd_SMARTMOTOR_COMM_CMDZ(CString _command);
|
||||
SSI_STATUS_SMARTMOTOR _send_cmd_SMARTMOTOR_GET_COMM_RESPONSEX(CString &_response);
|
||||
SSI_STATUS_SMARTMOTOR _send_cmd_SMARTMOTOR_GET_COMM_RESPONSEY(CString &_response);
|
||||
SSI_STATUS_SMARTMOTOR _send_cmd_SMARTMOTOR_GET_COMM_RESPONSEZ(CString &_response);
|
||||
|
||||
|
||||
|
||||
SSI_STATUS_SMARTMOTOR _send_cmd_SMARTMOTOR_GET_MOVE_STATUS_X();
|
||||
SSI_STATUS_SMARTMOTOR _send_cmd_SMARTMOTOR_GET_MOVE_STATUS_Y();
|
||||
SSI_STATUS_SMARTMOTOR _send_cmd_SMARTMOTOR_GET_MOVE_STATUS_Z();
|
||||
SSI_STATUS_SMARTMOTOR _send_cmd_SMARTMOTOR_GET_HOME_STATUS_X();
|
||||
SSI_STATUS_SMARTMOTOR _send_cmd_SMARTMOTOR_GET_HOME_STATUS_Y();
|
||||
SSI_STATUS_SMARTMOTOR _send_cmd_SMARTMOTOR_GET_HOME_STATUS_Z();
|
||||
|
||||
SSI_STATUS_SMARTMOTOR _send_cmd_SMARTMOTOR_GET_STATUS_WORD0();
|
||||
SSI_STATUS_SMARTMOTOR _send_cmd_SMARTMOTOR_GET_STATUS_WORD16();
|
||||
|
||||
static SSI_STATUS_SMARTMOTOR _process_SO7_CMD_MOVE_TO_POS_XYZ();
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -0,0 +1,289 @@
|
||||
// ************************************************************************************************
|
||||
// * File : SMIDefs.h
|
||||
// * Project : IntegMotorInterface
|
||||
// * Version : 2.201
|
||||
// * Last Update : 12/16/2009
|
||||
// * Copyright ?2000-2009 Animatics Corp.
|
||||
// * Author :
|
||||
// ************************************************************************************************
|
||||
#ifndef __SMIDEFS_H_
|
||||
#define __SMIDEFS_H_
|
||||
|
||||
#define MAX_STRLEN 256
|
||||
#define MAX_HOST_AXIS 6
|
||||
#define PI ((double)3.14159265358979323846)
|
||||
#define EPSILON 0.0000000001
|
||||
|
||||
#define MAX_PRG_LENGTH 0x00007FFF
|
||||
#define MAX_PRG_LENGTH9 0x0000FFFE
|
||||
#define MAX_PRG_LENGTH6 0x0000FA96
|
||||
|
||||
|
||||
// ************************************************************************************************
|
||||
// *** CommError and Motor Detection Return Values:
|
||||
// ************************************************************************************************
|
||||
#define CER_SUCCESS 0x00000001 // Motors Found (=CER_MOTORSFOUND)
|
||||
#define CER_MOTORSFOUND 0x00000001 // Motors Found (=CER_SUCCESS)
|
||||
#define CER_SOMEADDRESSED 0x00000002 // Some Motors are addressed
|
||||
#define CER_BIGADDRESS 0x00000004 // The address of some motors is bigger than the specified MaxAddress
|
||||
#define CER_DUPLICATEADDR 0x00000008 // Duplicate address
|
||||
#define CER_NOTADDRESSED 0x00000010 // No motor is addressed
|
||||
#define CER_COMMERROR 0x00000020 // Other communication problem
|
||||
#define CER_NOMOTOR 0x00000040 // Failed to find motors
|
||||
#define CER_NETERROR 0x00000080 // Network error
|
||||
#define CER_USBERROR 0x00000100 // USB error
|
||||
#define CER_CANOPENERROR 0x00000200 // CANOpen error
|
||||
#define CER_TRYHIGHBAUD 0x00000400 // no motors found at lower baud rates try higher rates
|
||||
|
||||
#define CER_PORTNOTOPEN 0x00010000 // Port Not Open
|
||||
#define CER_CANCELED 0x00040000 // Canceled
|
||||
|
||||
// CommError and Motor Detection Actions
|
||||
#define CMA_THROWX 0x00100000 // Throw exception if an error occurs
|
||||
#define CMA_READDRESS232 0x00400000 // Re-address RS232 chain if they are not addressed
|
||||
#define CMA_USECURRENTBAUD 0x00800000 // only try at current baud rate
|
||||
#define CMA_NOENDPRG 0x04000000 // Do not Stop the user program before addressing/detecting motors
|
||||
#define CMA_NOESTABLISH 0x08000000 // Do try to establish the communication (it is already established)
|
||||
|
||||
|
||||
//#define CER_CHANGED 0x00010000 // The pointers have been changed.
|
||||
//#define CER_CONTINUE 0x00020000 // The caller can continue
|
||||
//#define CER_CANCELED 0x00040000 // Canceled
|
||||
|
||||
|
||||
// ************************************************************************************************
|
||||
// *** Planes
|
||||
// ************************************************************************************************
|
||||
#define PLN_XY 0
|
||||
#define PLN_XZ 1
|
||||
#define PLN_YZ 2
|
||||
|
||||
// ************************************************************************************************
|
||||
// *** LogFlags
|
||||
// ************************************************************************************************
|
||||
#define LOG_COMM 0x00000001
|
||||
#define LOG_CMOTION 0x00000002
|
||||
#define LOG_PATH 0x00000004
|
||||
#define LOG_SCAN 0x00000008
|
||||
#define LOG_MOTOR 0x00000010
|
||||
#define LOG_ALL 0x0000001F
|
||||
#define LOG_APPEND 0x00010000
|
||||
#define LOG_NEW 0x00020000 // Do not set this flag. It is used internally
|
||||
|
||||
// ************************************************************************************************
|
||||
// *** Notification Codes:
|
||||
// ************************************************************************************************
|
||||
#define SMNOT_STARTDOWNLOAD 0x00000001
|
||||
#define SMNOT_PROGRESS 0x00000002
|
||||
#define SMNOT_END 0x00000003
|
||||
#define SMNOT_STARTUPLOAD 0x00000004
|
||||
#define SMNOT_STARTADDRESS 0x00000005
|
||||
#define SMNOT_STARTDETECT 0x00000006
|
||||
#define SMNOT_STARTCOLISION 0x00000007
|
||||
#define SMNOT_STARTGETINFO 0x00000008
|
||||
|
||||
// ************************************************************************************************
|
||||
// *** Motor Download Flags:
|
||||
// ************************************************************************************************
|
||||
#define MDF_TURNOFF 0x00000001 // Turn it off if it is on
|
||||
#define MDF_BLIND 0x00000010 // Blind Download
|
||||
#define MDF_CAL 0x00000080 // Download Calibration Program
|
||||
#define MDF_FORCEDOWNLOAD 0x00000100 // Download even if motor has no EEPROM
|
||||
|
||||
#define MDF_SKIPPRGINFO 0x00000200
|
||||
|
||||
// ************************************************************************************************
|
||||
// *** Error Codes for IntegMotorInterface exceptions match resourec numbers for SMI and IntegMotorInterface
|
||||
// ************************************************************************************************
|
||||
#define EID_NOERROR 4000
|
||||
#define EID_CX 4001
|
||||
#define EID_OPEN 4002
|
||||
#define EID_SETTIMEOUT 4003
|
||||
#define EID_CONNECTION 4004
|
||||
#define EID_TIMEOUT 4005
|
||||
#define EID_ECHOTIMEOUT 4006
|
||||
#define EID_BADECHO 4007
|
||||
#define EID_PORTNOTOPEN 4008
|
||||
#define EID_OVERRUN 4009
|
||||
#define EID_RXOVER 4010
|
||||
#define EID_RXPARITY 4011
|
||||
#define EID_FRAME 4012
|
||||
#define EID_BREAK 4013
|
||||
#define EID_IOE 4014
|
||||
#define EID_TXFULL 4015
|
||||
#define EID_COMMUNKNOWN 4016
|
||||
#define EID_READ 4017
|
||||
#define EID_WRITE 4018
|
||||
#define EID_INVALIDDATA 4019
|
||||
#define EID_INVALIDTIME 4020
|
||||
#define EID_INVALIDTIMEDELTA 4021
|
||||
#define EID_INVALIDPOSDELTA 4022
|
||||
#define EID_INTDATASPACE 4023
|
||||
#define EID_BUFFOVERFLOW 4024
|
||||
#define EID_BUFFUNDERFLOW 4025
|
||||
#define EID_HMFAILED 4026
|
||||
#define EID_GETSTATUS 4027
|
||||
#define EID_SAMPLERATES 4028
|
||||
#define EID_NOTSUPPORTED 4029
|
||||
#define EID_NOTINIT 4030
|
||||
#define EID_NOMEM 4031
|
||||
#define EID_GETALL 4032
|
||||
#define EID_NOMORE 4033
|
||||
#define EID_OPENFILE 4034
|
||||
#define EID_OPENFILEWRITE 4035
|
||||
#define EID_NOEEPROM 4036
|
||||
#define EID_INVALIDMODE 4037
|
||||
#define EID_RS485 4038
|
||||
#define EID_FILETOOLONG 4039
|
||||
#define EID_CORRUPTEEPROM 4040
|
||||
#define EID_DOWNLOADON 4041
|
||||
#define EID_VERSIONMISMATCH 4042
|
||||
#define EID_SOCKET 4043
|
||||
#define EID_DOWNLOADRCKS 4044
|
||||
#define EID_NETERROR 4045
|
||||
#define EID_USBERROR 4046
|
||||
#define EID_BIGADDRESS 4047
|
||||
#define EID_CALWARNING 4048
|
||||
#define EID_CANCELED 4049
|
||||
#define EID_SOMEADDRESSED 4050
|
||||
#define EID_COMMUNICATION 4051
|
||||
#define EID_DUPLICATEADDR 4052
|
||||
#define EID_COMMRESET 4053
|
||||
#define EID_STOP 4054
|
||||
#define EID_NOTFOUND 4055
|
||||
#define EID_LANGFILE 4056
|
||||
#define EID_INVALID_PROJ 4057
|
||||
#define EID_READFILE 4058
|
||||
#define EID_CHANGEBAUD 4059
|
||||
#define EID_CANERROR 4060
|
||||
#define EID_NOCANDWLD 4061
|
||||
#define EID_NOLEGOACK 4062
|
||||
#define EID_NOMODBUSDWLD 4063
|
||||
#define EID_INCORRECTMICRO 4064
|
||||
#define EID_FILEFORMAT 4065
|
||||
#define EID_DLD_BUFFEREXCEED 4066
|
||||
#define EID_DLD_HEXCHKSUM 4067
|
||||
#define EID_DLD_HEXADDRESS 4068
|
||||
#define EID_HEXTYPE 4069
|
||||
#define EID_DATAINSERT 4070
|
||||
#define EID_CMDNOSUPPORT 4071
|
||||
#define EID_NOTIMEDELTA 4072
|
||||
#define EID_CANINVTIMEDELTA 4073
|
||||
#define EID_CANVOLTAGEFAULT 4074
|
||||
#define EID_CANEXCESSTEMP 4075
|
||||
#define EID_CANEXCESSPOS 4076
|
||||
#define EID_CANVELOCITYLIMIT 4077
|
||||
#define EID_CANDEDTLIMIT 4078
|
||||
#define EID_CANHWPOSHWLIMIT 4079
|
||||
#define EID_CANHWNEGHWLIMIT 4080
|
||||
#define EID_CANSWPOSLIMIT 4081
|
||||
#define EID_CANSWNEGLIMIT 4082
|
||||
#define EID_FIRMVERMISSMATCH 4083
|
||||
#define EID_BADMODEL 4084
|
||||
|
||||
// scanner errors match the resource numbers in SMI and IntegMotorInterface
|
||||
#define ER_CANNOT_OPEN 8672
|
||||
#define ER_ERROR_CLINE 8673
|
||||
#define ER_LINE_TOKENS 8674
|
||||
#define ER_NOLANGFILE 8675
|
||||
#define ER_UNKNOWNERROR 8676
|
||||
|
||||
#define ER_2DEFAULTS 8700
|
||||
#define ER_2ELSE 8701
|
||||
#define ER_2MANYINCLUDES 8702
|
||||
#define ER_ABSEXPECTED 8703
|
||||
#define ER_ASSIGNECXPTD 8704
|
||||
#define ER_BADBREAK 8705
|
||||
#define ER_CASEAFTERDEFAULT 8706
|
||||
#define ER_CASEWOSWITCH 8707
|
||||
#define ER_CASEXPTD 8708
|
||||
#define ER_CBRACKETXPTD 8709
|
||||
#define ER_CLOSEPXPTD 8710
|
||||
#define ER_CMPWOIFX 8711
|
||||
#define ER_COMMAXPTD 8712
|
||||
#define ER_DEFAULTWOSWITCH 8713
|
||||
#define ER_DESTINATION 8714
|
||||
#define ER_DIRECTIVECLOSE 8715
|
||||
#define ER_DOTEXPTD 8716
|
||||
#define ER_DUPLICATELABELS 8717
|
||||
#define ER_ELSEIFAFTERELSE 8718
|
||||
#define ER_ELSEIFWOIF 8719
|
||||
#define ER_ELSEWOIF 8720
|
||||
#define ER_ENDIFWOIF 8721
|
||||
#define ER_ENDSWOSWITCH 8722
|
||||
#define ER_ENDXPTD 8723
|
||||
#define ER_IFFWOCMP 8724
|
||||
#define ER_IFTWOCMP 8725
|
||||
#define ER_IFWOENDIF 8726
|
||||
#define ER_IFXWOCMP 8727
|
||||
#define ER_INVALIDEOP 8728
|
||||
#define ER_INVALIDEXPTERM 8729
|
||||
#define ER_INVALIDNOPARAM 8730
|
||||
#define ER_INVALIDPARAM 8731
|
||||
#define ER_LANGFILE 8732
|
||||
#define ER_LOOPWOWHILE 8733
|
||||
#define ER_LVALUE 8734
|
||||
#define ER_NEWLINESTRING 8735
|
||||
#define ER_NOTINPROGRAM 8736
|
||||
#define ER_NUMSIGNXPTD 8737
|
||||
#define ER_NUMXPTD 8738
|
||||
#define ER_OBRACKETXPTD 8739
|
||||
#define ER_OPENINCLUDE 8740
|
||||
#define ER_OPENPXPTD 8741
|
||||
#define ER_QUOTXPTD 8742
|
||||
#define ER_REDEF 8743
|
||||
#define ER_RESERVED 8744
|
||||
#define ER_SPACEXPTD 8745
|
||||
#define ER_STRXPTD 8746
|
||||
#define ER_SWITCHWOENDS 8747
|
||||
#define ER_SYNTAX 8748
|
||||
#define ER_UNDEFINED 8749
|
||||
#define ER_UPARAMXPTD 8750
|
||||
#define ER_WHILEWOLOOP 8751
|
||||
#define ER_DIVIDEBYZERO 8752
|
||||
#define ER_FLT_NOTALLOW 8753
|
||||
#define ER_NOFLOATVARMATH 8754
|
||||
#define ER_PEERTOPEERTYPE 8755
|
||||
#define ER_MISSINGSEMI 8756
|
||||
#define ER_MISSINGCOLON 8757
|
||||
#define ER_INVALIDADDRESS 8758
|
||||
#define ER_INVALIDAXIS 8759
|
||||
#define ER_REPORTNOTALLOWED 8760
|
||||
|
||||
#define WR_BAUDRATE 8800
|
||||
#define WR_DATARANGE 8801
|
||||
#define WR_DEFAULTLANGUAGE 8802
|
||||
#define WR_MISSINGPOUND 8803
|
||||
#define WR_NUMRANGE 8804
|
||||
#define WR_NUMRANGEMM 8805
|
||||
#define WR_NUMRANGEN 8806
|
||||
#define WR_NUMRANGENN 8807
|
||||
#define WR_NUMRANGENP 8808
|
||||
#define WR_NUMRANGEP 8809
|
||||
#define WR_FLTDECIMALS 8810
|
||||
#define WR_FLTRANGE 8811
|
||||
#define WR_FLTOVERFLOW 8812
|
||||
#define WR_LONGOVERFLOW 8813
|
||||
#define WR_FLTDECIMALSPT 8814
|
||||
|
||||
#define FATAL_ER_2MANYERRORS 8900
|
||||
#define FATAL_ER_2MANYWARNINGS 8901
|
||||
#define FATAL_ER_NESTING 8902
|
||||
|
||||
// warning range
|
||||
#define IS_WARNING_ID(x) (((x) >= WR_BAUDRATE) && ((x) <= (WR_BAUDRATE + 99)))
|
||||
|
||||
// fatal error range (stop scanning)
|
||||
#define IS_FATAL_ID(x) (((x) >= FATAL_ER_2MANYERRORS) && ((x) <= (FATAL_ER_2MANYERRORS + 99)))
|
||||
|
||||
// ************************************************************************************************
|
||||
// used when warnings replaces errors for keywords (no strings associated) only used for ER_UNDEFINED
|
||||
#define ERRTOWARN_START (FATAL_ER_2MANYERRORS + 100) // set start area of converted errors 9000
|
||||
#define ERRTOWARN_END (ERRTOWARN_START + 99) // set start area of converted errors 9099
|
||||
#define IS_ERRTOWWARNING(x) (((x) >= ERRTOWARN_START) && ((x) <= ERRTOWARN_END))
|
||||
#define MAKEWE(x) ((Errors2Warnings)?(ERRTOWARN_START + (x) % 100):(x)) // convert error to warning if Errors2Warnings
|
||||
#define WE2E(x) (IS_ERRTOWWARNING(x)?(ER_2DEFAULTS + (x % 100)):(x)) // convert error to warning back to orignal error
|
||||
|
||||
|
||||
#endif //__SMIDEFS_H_
|
||||
|
||||
Reference in New Issue
Block a user