aboutsummaryrefslogtreecommitdiffstats
path: root/src/emc/nml_intf/emcglb.h
blob: 6b73535f3606b53ab24d92771e628e54d37271da (plain)
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
/********************************************************************
* Description: emcglb.h
*   Declarations for globals found in emcglb.c
*
*   Derived from a work by Fred Proctor & Will Shackleford
*
* Author:
* License: GPL Version 2
* System: Linux
*    
* Copyright (c) 2004 All rights reserved.
*
* Last change:
********************************************************************/
#ifndef EMCGLB_H
#define EMCGLB_H

#include "linuxcnc.h"           /* LINELEN */
#include "math.h"		/* M_PI */
#include "emcmotcfg.h"          /* EMCMOT_MAX_DIO */
#include "debugflags.h"

#ifdef __cplusplus
extern "C" {
#endif

    extern char emc_inifile[LINELEN];

    extern char emc_nmlfile[LINELEN];

#define DEFAULT_RS274NGC_STARTUP_CODE ""
    extern char rs274ngc_startup_code[LINELEN];

/* debug bitflags */
/* Note: these may be hard-code referenced by the GUI (e.g., emcdebug.tcl).
   If you change the assignments here, make sure and reflect that in
   the GUI scripts that use these. Unfortunately there's no easy way to
   get these into Tk automatically */

    // there's also an emc_Debug function in emc/usr_intf/emcsh.cc
    extern int emc_debug;

    // EMC_DEBUG_* flag definitions moved to debugflags.h

    extern double emc_task_cycle_time;	

    extern double emc_io_cycle_time;

    extern int emc_task_interp_max_len;

    extern struct EmcPose tool_change_position;
    extern unsigned char have_tool_change_position;


/*just used to keep track of unnecessary debug printing. */
    extern int taskplanopen;

    extern int emcGetArgs(int argc, char *argv[]);

typedef struct JointConfig_t {
    int Inited;
    unsigned char Type;   // non-zero means joint called init
    double Units;
    double MaxVel;
    double MaxAccel;
    double MinLimit;
    double MaxLimit;
} JointConfig_t;

typedef struct AxisConfig_t {
    int Inited;
    unsigned char Type;
    double MaxVel;
    double MaxAccel;
    double Home;
    double MinLimit;
    double MaxLimit;
} AxisConfig_t;

typedef struct SpindleConfig_t {
    int Inited;
    double max_pos_speed;
    double max_neg_speed;
    double min_pos_speed;
    double min_neg_speed;
    int home_sequence;
    double home_search_velocity;
} SpindleConfig_t;

typedef struct TrajConfig_t {
    int Inited;	// non-zero means traj called init
    int Joints;
    int Spindles;
    double MaxAccel;
    double MaxVel;
    int AxisMask;
    double LinearUnits;
    double AngularUnits;
    int MotionId;
} TrajConfig_t;

#ifdef __cplusplus
}				/* matches extern "C" at top */
#endif
#endif				/* EMCGLB_H */
bues.ch cgit interface