Compare commits
131 Commits
revert-3-V
...
Video9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b1cc8f1717 | ||
|
|
55f7e19e88 | ||
|
|
220daa4408 | ||
|
|
37c14850bf | ||
|
|
ed9af2ec50 | ||
|
|
939470a0c6 | ||
|
|
ec1c8fc70f | ||
|
|
5eda2b451e | ||
|
|
226cbc5035 | ||
|
|
39e2ab31f1 | ||
|
|
b164040829 | ||
|
|
084e6891b6 | ||
|
|
ed8e4d8d39 | ||
|
|
a829b0c6e2 | ||
|
|
ab1a306d86 | ||
|
|
544dd5ed85 | ||
|
|
511e6442e9 | ||
|
|
63fafb4936 | ||
|
|
efa03e3095 | ||
|
|
dcf6c2d18a | ||
|
|
34e60e43d8 | ||
|
|
294831465b | ||
|
|
5c128f49b5 | ||
|
|
9e00caf7c5 | ||
|
|
1d14e1f295 | ||
|
|
5d90765920 | ||
|
|
e6ae2ad3c7 | ||
|
|
ea5a39d300 | ||
|
|
88bd1ead78 | ||
|
|
dccbd97a04 | ||
|
|
1b8721930e | ||
|
|
8710a547fe | ||
|
|
369a795ce5 | ||
|
|
2df0a0980c | ||
|
|
6383d6de89 | ||
|
|
7bff3f3789 | ||
|
|
23fe81afbe | ||
|
|
fa34d81e41 | ||
|
|
30a9f10c7b | ||
|
|
8f26a10224 | ||
|
|
d4fed6cfe8 | ||
|
|
27475eaecd | ||
|
|
71ae242fc4 | ||
|
|
f341eb5074 | ||
|
|
fef934b103 | ||
|
|
31be067dea | ||
|
|
94d68adbb1 | ||
|
|
e8ef618fcc | ||
|
|
a99d0f0eda | ||
|
|
c21d42cf0b | ||
|
|
cbc45bc80b | ||
|
|
7ffd757fb5 | ||
|
|
30dc44d5e6 | ||
|
|
2b2be4f63d | ||
|
|
cbae816bd9 | ||
|
|
c0d2bfcf62 | ||
|
|
f4a15afa8a | ||
|
|
c04ac0e74b | ||
|
|
6d18c2cb3f | ||
|
|
d0433b29cf | ||
|
|
fe3de876fa | ||
|
|
2fb5252d37 | ||
|
|
43854ca4d0 | ||
|
|
dbb4d0f34e | ||
|
|
f9b37cfa6c | ||
|
|
2b2704bb17 | ||
|
|
0384646972 | ||
|
|
133df5662d | ||
|
|
d1eb1d9a40 | ||
|
|
934f3cb028 | ||
|
|
d60822388e | ||
|
|
31d24e2676 | ||
|
|
c444f9a496 | ||
|
|
e234ea7a97 | ||
|
|
eb63adbdc2 | ||
|
|
70014d3b1d | ||
|
|
990801f2d0 | ||
|
|
329474309d | ||
|
|
da2b1f6376 | ||
|
|
a88090a853 | ||
|
|
aa955aec67 | ||
|
|
e641fd04b7 | ||
|
|
ac711cd168 | ||
|
|
ee56f85c53 | ||
|
|
69357d35a4 | ||
|
|
84d790c687 | ||
|
|
e7fc20fec5 | ||
|
|
f8cec1ac69 | ||
|
|
ddffbe5f8b | ||
|
|
e95a098367 | ||
|
|
1d36ffbf69 | ||
|
|
c97e1fa96a | ||
|
|
ef84d552e4 | ||
|
|
d93adac4a2 | ||
|
|
ca3ceac5c6 | ||
|
|
b534e3d4da | ||
|
|
6ac0949f26 | ||
|
|
1f97534133 | ||
|
|
e6bfe4f880 | ||
|
|
8f05f33e58 | ||
|
|
9e311038c1 | ||
|
|
9ab4afabe4 | ||
|
|
38825bbaf3 | ||
|
|
0a04124b35 | ||
|
|
760944afe5 | ||
|
|
044e8fd2c5 | ||
|
|
697ea19dae | ||
|
|
20ca9d4974 | ||
|
|
c6857d0be2 | ||
|
|
f14b0160f6 | ||
|
|
deadd488dd | ||
|
|
25c2aa7b3c | ||
|
|
7a63d27303 | ||
|
|
6176166b3a | ||
|
|
5df911296c | ||
|
|
a4488da9fa | ||
|
|
cd8388ea58 | ||
|
|
6f29a0d492 | ||
|
|
3bbf089d01 | ||
|
|
2e4e768d5e | ||
|
|
6c168d96d9 | ||
|
|
f8fc5fccd6 | ||
|
|
f6abd73c58 | ||
|
|
c5a95074dc | ||
|
|
8614d1dfd3 | ||
|
|
251fd29d23 | ||
|
|
5ad02fae03 | ||
|
|
9adae08b98 | ||
|
|
0b9ce37200 | ||
|
|
120b423f59 | ||
|
|
222e5857dc |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -3,3 +3,4 @@
|
||||
.vscode/c_cpp_properties.json
|
||||
.vscode/launch.json
|
||||
.vscode/ipch
|
||||
Octave
|
||||
|
||||
@@ -9,8 +9,9 @@ Mcu.CPN=STM32F407VGT6
|
||||
Mcu.Family=STM32F4
|
||||
Mcu.IP0=DAC
|
||||
Mcu.IP1=I2C2
|
||||
Mcu.IP10=TIM8
|
||||
Mcu.IP11=USART1
|
||||
Mcu.IP10=TIM5
|
||||
Mcu.IP11=TIM9
|
||||
Mcu.IP12=USART1
|
||||
Mcu.IP2=NVIC
|
||||
Mcu.IP3=RCC
|
||||
Mcu.IP4=SPI1
|
||||
@@ -19,48 +20,44 @@ Mcu.IP6=TIM1
|
||||
Mcu.IP7=TIM2
|
||||
Mcu.IP8=TIM3
|
||||
Mcu.IP9=TIM4
|
||||
Mcu.IPNb=12
|
||||
Mcu.IPNb=13
|
||||
Mcu.Name=STM32F407V(E-G)Tx
|
||||
Mcu.Package=LQFP100
|
||||
Mcu.Pin0=PA0-WKUP
|
||||
Mcu.Pin1=PA1
|
||||
Mcu.Pin10=PB1
|
||||
Mcu.Pin11=PE7
|
||||
Mcu.Pin12=PE8
|
||||
Mcu.Pin13=PE9
|
||||
Mcu.Pin14=PE10
|
||||
Mcu.Pin15=PE11
|
||||
Mcu.Pin16=PE12
|
||||
Mcu.Pin17=PE13
|
||||
Mcu.Pin18=PE14
|
||||
Mcu.Pin19=PE15
|
||||
Mcu.Pin2=PA2
|
||||
Mcu.Pin20=PB10
|
||||
Mcu.Pin21=PB11
|
||||
Mcu.Pin22=PD11
|
||||
Mcu.Pin23=PD12
|
||||
Mcu.Pin24=PD13
|
||||
Mcu.Pin25=PC6
|
||||
Mcu.Pin26=PC7
|
||||
Mcu.Pin27=PC9
|
||||
Mcu.Pin28=PA8
|
||||
Mcu.Pin29=PA9
|
||||
Mcu.Pin3=PA4
|
||||
Mcu.Pin30=PA10
|
||||
Mcu.Pin31=PA11
|
||||
Mcu.Pin32=PA12
|
||||
Mcu.Pin33=PC10
|
||||
Mcu.Pin34=PB4
|
||||
Mcu.Pin35=PB5
|
||||
Mcu.Pin36=PB6
|
||||
Mcu.Pin37=VP_SYS_VS_Systick
|
||||
Mcu.Pin4=PA5
|
||||
Mcu.Pin5=PA6
|
||||
Mcu.Pin6=PA7
|
||||
Mcu.Pin7=PC4
|
||||
Mcu.Pin8=PC5
|
||||
Mcu.Pin9=PB0
|
||||
Mcu.PinsNb=38
|
||||
Mcu.Pin0=PE5
|
||||
Mcu.Pin1=PA0-WKUP
|
||||
Mcu.Pin10=PB0
|
||||
Mcu.Pin11=PB1
|
||||
Mcu.Pin12=PE7
|
||||
Mcu.Pin13=PE8
|
||||
Mcu.Pin14=PE9
|
||||
Mcu.Pin15=PE10
|
||||
Mcu.Pin16=PE11
|
||||
Mcu.Pin17=PE12
|
||||
Mcu.Pin18=PE13
|
||||
Mcu.Pin19=PE14
|
||||
Mcu.Pin2=PA1
|
||||
Mcu.Pin20=PE15
|
||||
Mcu.Pin21=PB10
|
||||
Mcu.Pin22=PB11
|
||||
Mcu.Pin23=PD11
|
||||
Mcu.Pin24=PD12
|
||||
Mcu.Pin25=PC9
|
||||
Mcu.Pin26=PA8
|
||||
Mcu.Pin27=PA9
|
||||
Mcu.Pin28=PA10
|
||||
Mcu.Pin29=PA11
|
||||
Mcu.Pin3=PA2
|
||||
Mcu.Pin30=PA12
|
||||
Mcu.Pin31=PC10
|
||||
Mcu.Pin32=PB6
|
||||
Mcu.Pin33=VP_SYS_VS_Systick
|
||||
Mcu.Pin4=PA4
|
||||
Mcu.Pin5=PA5
|
||||
Mcu.Pin6=PA6
|
||||
Mcu.Pin7=PA7
|
||||
Mcu.Pin8=PC4
|
||||
Mcu.Pin9=PC5
|
||||
Mcu.PinsNb=34
|
||||
Mcu.ThirdPartyNb=0
|
||||
Mcu.UserConstants=
|
||||
Mcu.UserName=STM32F407VGTx
|
||||
@@ -84,8 +81,7 @@ PA10.Signal=USART1_RX
|
||||
PA11.Signal=S_TIM1_CH4
|
||||
PA12.Locked=true
|
||||
PA12.Signal=GPIO_Output
|
||||
PA2.Locked=true
|
||||
PA2.Signal=GPIO_Input
|
||||
PA2.Signal=S_TIM5_CH3
|
||||
PA4.Signal=COMP_DAC1_group
|
||||
PA5.Mode=Full_Duplex_Master
|
||||
PA5.Signal=SPI1_SCK
|
||||
@@ -105,8 +101,6 @@ PB10.Mode=I2C
|
||||
PB10.Signal=I2C2_SCL
|
||||
PB11.Mode=I2C
|
||||
PB11.Signal=I2C2_SDA
|
||||
PB4.Signal=S_TIM3_CH1
|
||||
PB5.Signal=S_TIM3_CH2
|
||||
PB6.Locked=true
|
||||
PB6.Signal=GPIO_Input
|
||||
PC10.Locked=true
|
||||
@@ -115,13 +109,10 @@ PC4.Locked=true
|
||||
PC4.Signal=GPIO_Output
|
||||
PC5.Locked=true
|
||||
PC5.Signal=GPIO_Input
|
||||
PC6.Signal=S_TIM8_CH1
|
||||
PC7.Signal=S_TIM8_CH2
|
||||
PC9.Signal=S_TIM8_CH4
|
||||
PC9.Signal=S_TIM3_CH4
|
||||
PD11.Locked=true
|
||||
PD11.Signal=GPIO_Input
|
||||
PD12.Signal=S_TIM4_CH1
|
||||
PD13.Signal=S_TIM4_CH2
|
||||
PE10.Locked=true
|
||||
PE10.Signal=GPIO_Output
|
||||
PE11.Locked=true
|
||||
@@ -134,6 +125,7 @@ PE14.Locked=true
|
||||
PE14.Signal=GPIO_Input
|
||||
PE15.Locked=true
|
||||
PE15.Signal=GPIO_Input
|
||||
PE5.Signal=S_TIM9_CH1
|
||||
PE7.Locked=true
|
||||
PE7.Signal=GPIO_Output
|
||||
PE8.Locked=true
|
||||
@@ -200,20 +192,14 @@ SH.S_TIM2_CH1_ETR.0=TIM2_CH1,Encoder_Interface
|
||||
SH.S_TIM2_CH1_ETR.ConfNb=1
|
||||
SH.S_TIM2_CH2.0=TIM2_CH2,Encoder_Interface
|
||||
SH.S_TIM2_CH2.ConfNb=1
|
||||
SH.S_TIM3_CH1.0=TIM3_CH1,Encoder_Interface
|
||||
SH.S_TIM3_CH1.ConfNb=1
|
||||
SH.S_TIM3_CH2.0=TIM3_CH2,Encoder_Interface
|
||||
SH.S_TIM3_CH2.ConfNb=1
|
||||
SH.S_TIM4_CH1.0=TIM4_CH1,Encoder_Interface
|
||||
SH.S_TIM3_CH4.0=TIM3_CH4,PWM Generation4 CH4
|
||||
SH.S_TIM3_CH4.ConfNb=1
|
||||
SH.S_TIM4_CH1.0=TIM4_CH1,PWM Generation1 CH1
|
||||
SH.S_TIM4_CH1.ConfNb=1
|
||||
SH.S_TIM4_CH2.0=TIM4_CH2,Encoder_Interface
|
||||
SH.S_TIM4_CH2.ConfNb=1
|
||||
SH.S_TIM8_CH1.0=TIM8_CH1,Encoder_Interface
|
||||
SH.S_TIM8_CH1.ConfNb=1
|
||||
SH.S_TIM8_CH2.0=TIM8_CH2,Encoder_Interface
|
||||
SH.S_TIM8_CH2.ConfNb=1
|
||||
SH.S_TIM8_CH4.0=TIM8_CH4,PWM Generation4 CH4
|
||||
SH.S_TIM8_CH4.ConfNb=1
|
||||
SH.S_TIM5_CH3.0=TIM5_CH3,Input_Capture3_from_TI3
|
||||
SH.S_TIM5_CH3.ConfNb=1
|
||||
SH.S_TIM9_CH1.0=TIM9_CH1,PWM Generation1 CH1
|
||||
SH.S_TIM9_CH1.ConfNb=1
|
||||
SPI1.CalculateBaudRate=8.0 MBits/s
|
||||
SPI1.Direction=SPI_DIRECTION_2LINES
|
||||
SPI1.IPParameters=VirtualType,Mode,Direction,CalculateBaudRate
|
||||
@@ -221,8 +207,14 @@ SPI1.Mode=SPI_MODE_MASTER
|
||||
SPI1.VirtualType=VM_MASTER
|
||||
TIM1.Channel-PWM\ Generation4\ CH4=TIM_CHANNEL_4
|
||||
TIM1.IPParameters=Channel-PWM Generation4 CH4
|
||||
TIM8.Channel-PWM\ Generation4\ CH4=TIM_CHANNEL_4
|
||||
TIM8.IPParameters=Channel-PWM Generation4 CH4
|
||||
TIM3.Channel-PWM\ Generation4\ CH4=TIM_CHANNEL_4
|
||||
TIM3.IPParameters=Channel-PWM Generation4 CH4
|
||||
TIM4.Channel-PWM\ Generation1\ CH1=TIM_CHANNEL_1
|
||||
TIM4.IPParameters=Channel-PWM Generation1 CH1
|
||||
TIM5.Channel-Input_Capture3_from_TI3=TIM_CHANNEL_3
|
||||
TIM5.IPParameters=Channel-Input_Capture3_from_TI3
|
||||
TIM9.Channel-PWM\ Generation1\ CH1=TIM_CHANNEL_1
|
||||
TIM9.IPParameters=Channel-PWM Generation1 CH1
|
||||
USART1.IPParameters=VirtualMode
|
||||
USART1.VirtualMode=VM_ASYNC
|
||||
VP_SYS_VS_Systick.Mode=SysTick
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>🔁 EEPROM Generator | ESI, EEPORM, SOES C code configuration tool</title>
|
||||
<title>🔁 EEPROM Generator | ESI, EEPROM, SOES C code configuration tool</title>
|
||||
<!--
|
||||
* SOES EEPROM generator
|
||||
* This tool serves as:
|
||||
@@ -55,7 +55,8 @@
|
||||
<option value="INTEGER64">INTEGER64</option>
|
||||
<option value="UNSIGNED8">UNSIGNED8</option>
|
||||
<option value="UNSIGNED16">UNSIGNED16</option>
|
||||
<option value="UNSIGNED32">UNSIGNED64</option>
|
||||
<option value="UNSIGNED32">UNSIGNED32</option>
|
||||
<option value="UNSIGNED64">UNSIGNED64</option>
|
||||
<option value="REAL32">REAL32</option>
|
||||
<option value="REAL64">REAL64</option>
|
||||
<option value="VISIBLE_STRING">VISIBLE STRING</option>
|
||||
|
||||
@@ -28,11 +28,11 @@ const DTYPE = {
|
||||
INTEGER8 : 'INTEGER8',
|
||||
INTEGER16 : 'INTEGER16',
|
||||
INTEGER32 : 'INTEGER32',
|
||||
INTEGER32 : 'INTEGER64',
|
||||
INTEGER64 : 'INTEGER64',
|
||||
UNSIGNED8 : 'UNSIGNED8',
|
||||
UNSIGNED16 : 'UNSIGNED16',
|
||||
UNSIGNED32 : 'UNSIGNED32',
|
||||
UNSIGNED32 : 'UNSIGNED64',
|
||||
UNSIGNED64 : 'UNSIGNED64',
|
||||
REAL32 : 'REAL32',
|
||||
REAL64 : 'REAL64',
|
||||
VISIBLE_STRING : 'VISIBLE_STRING',
|
||||
|
||||
@@ -125,7 +125,7 @@ function objectlist_generator(form, od, indexes)
|
||||
objd.items.slice(subindex).forEach(subitem => {
|
||||
var subi = subindex_padded(subindex);
|
||||
const value = objectlist_getItemValue(subitem, objd.dtype);
|
||||
objectlist += `\n {0x${subi}, DTYPE_${objd.dtype}, ${bitsize}, ${objectlist_objdFlags(objd)}, acName${index}_${subi}, ${value}, ${subitem.data || 'NULL'}},`;
|
||||
objectlist += `\n {${subi}, DTYPE_${objd.dtype}, ${bitsize}, ${objectlist_objdFlags(objd)}, acName${index}_${subi}, ${value}, ${subitem.data || 'NULL'}},`;
|
||||
subindex++;
|
||||
});
|
||||
break;
|
||||
@@ -138,7 +138,7 @@ function objectlist_generator(form, od, indexes)
|
||||
const bitsize = dtype_bitsize[subitem.dtype];
|
||||
const value = objectlist_getItemValue(subitem, subitem.dtype);
|
||||
const atypeflag = objectlist_objdFlags(subitem);
|
||||
objectlist += `\n {0x${subi}, DTYPE_${subitem.dtype}, ${bitsize}, ${atypeflag}, acName${index}_${subi}, ${value}, ${subitem.data || 'NULL'}},`;
|
||||
objectlist += `\n {${subi}, DTYPE_${subitem.dtype}, ${bitsize}, ${atypeflag}, acName${index}_${subi}, ${value}, ${subitem.data || 'NULL'}},`;
|
||||
subindex++;
|
||||
});
|
||||
|
||||
|
||||
1
Firmware/.gitignore
vendored
1
Firmware/.gitignore
vendored
@@ -3,3 +3,4 @@
|
||||
.vscode/c_cpp_properties.json
|
||||
.vscode/launch.json
|
||||
.vscode/ipch
|
||||
.vscode/settings.json
|
||||
|
||||
8
Firmware/.vscode/settings.json
vendored
8
Firmware/.vscode/settings.json
vendored
@@ -8,7 +8,11 @@
|
||||
"string": "cpp",
|
||||
"unordered_map": "cpp",
|
||||
"vector": "cpp",
|
||||
"system_error": "cpp"
|
||||
"system_error": "cpp",
|
||||
"numeric": "cpp",
|
||||
"ostream": "cpp",
|
||||
"cmath": "cpp"
|
||||
},
|
||||
"C_Cpp.errorSquiggles": "disabled"
|
||||
"C_Cpp.errorSquiggles": "disabled",
|
||||
"cmake.configureOnOpen": false
|
||||
}
|
||||
1
Firmware/doc/.gitignore
vendored
Normal file
1
Firmware/doc/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.~lock.*
|
||||
BIN
Firmware/doc/Stepgen.odp
Executable file
BIN
Firmware/doc/Stepgen.odp
Executable file
Binary file not shown.
38
Firmware/include/MyEncoder.h
Executable file
38
Firmware/include/MyEncoder.h
Executable file
@@ -0,0 +1,38 @@
|
||||
#ifndef MYENCODER
|
||||
#define MYENCODER
|
||||
#include "Stm32F4_Encoder.h"
|
||||
#include <CircularBuffer.hpp>
|
||||
#define RINGBUFFERLEN 11
|
||||
|
||||
class MyEncoder
|
||||
{
|
||||
public:
|
||||
MyEncoder(TIM_TypeDef *_tim_base, uint8_t _indexPin, void irq(void));
|
||||
int64_t unwrapEncoder(uint16_t in);
|
||||
void indexPulse(void);
|
||||
uint8_t indexHappened();
|
||||
double currentPos();
|
||||
double frequency(uint64_t time);
|
||||
uint8_t getIndexState();
|
||||
void setScale(double scale);
|
||||
void setLatch(uint8_t latchEnable);
|
||||
|
||||
private:
|
||||
int64_t previousEncoderCounterValue = 0;
|
||||
double PosScaleRes = 1.0;
|
||||
uint32_t CurPosScale = 1;
|
||||
uint8_t oldLatchCEnable = 0;
|
||||
volatile uint8_t indexPulseFired = 0;
|
||||
volatile uint8_t pleaseZeroTheCounter = 0;
|
||||
Encoder EncoderInit;
|
||||
uint8_t indexPin;
|
||||
|
||||
CircularBuffer<double_t, RINGBUFFERLEN> Pos;
|
||||
CircularBuffer<uint32_t, RINGBUFFERLEN> TDelta;
|
||||
double curPos;
|
||||
double oldFrequency;
|
||||
|
||||
TIM_TypeDef *tim_base;
|
||||
};
|
||||
|
||||
#endif
|
||||
43
Firmware/include/StepGen.h
Executable file
43
Firmware/include/StepGen.h
Executable file
@@ -0,0 +1,43 @@
|
||||
|
||||
#ifndef STEPGEN
|
||||
#define STEPGEN
|
||||
#include <HardwareTimer.h>
|
||||
|
||||
class StepGen
|
||||
{
|
||||
private:
|
||||
volatile uint8_t timerIsRunning;
|
||||
volatile int32_t timerStepPosition;
|
||||
volatile int32_t timerStepDirection;
|
||||
volatile int32_t timerStepPositionAtEnd;
|
||||
volatile int32_t timerNewEndStepPosition;
|
||||
volatile uint32_t timerNewCycleTime;
|
||||
volatile double_t actualPosition;
|
||||
volatile double_t requestedPosition;
|
||||
volatile uint8_t enabled;
|
||||
HardwareTimer *MyTim;
|
||||
HardwareTimer *MyTim2;
|
||||
uint16_t stepsPerMM;
|
||||
uint8_t dirPin;
|
||||
PinName stepPin;
|
||||
uint32_t timerChan;
|
||||
const uint32_t maxFreq = 100000;
|
||||
volatile uint32_t prevFreq1 = 0;
|
||||
volatile uint32_t prevFreq2 = 0;
|
||||
|
||||
public:
|
||||
static uint32_t sync0CycleTime;
|
||||
volatile uint32_t pwmCycleTime;
|
||||
|
||||
StepGen(TIM_TypeDef *Timer, uint32_t timerChannel, PinName stepPin, uint8_t dirPin, void irq(void));
|
||||
void reqPos(double_t pos);
|
||||
double reqPos();
|
||||
void actPos(double_t pos);
|
||||
double actPos();
|
||||
void handleStepper(void);
|
||||
void timerCB();
|
||||
void setScale(int16_t spm);
|
||||
void enable(uint8_t yes);
|
||||
};
|
||||
|
||||
#endif
|
||||
53
Firmware/include/StepGen2.h
Executable file
53
Firmware/include/StepGen2.h
Executable file
@@ -0,0 +1,53 @@
|
||||
|
||||
#ifndef STEPGEN
|
||||
#define STEPGEN
|
||||
#include <HardwareTimer.h>
|
||||
|
||||
class StepGen2
|
||||
{
|
||||
public:
|
||||
volatile double_t actualPosition;
|
||||
volatile int32_t nSteps;
|
||||
volatile uint32_t timerFrequency;
|
||||
volatile int32_t timerPosition = 0;
|
||||
volatile int32_t timerEndPosition = 0;
|
||||
|
||||
public:
|
||||
volatile float Tstartf; // Starting delay in secs
|
||||
volatile uint32_t Tstartu; // Starting delay in usecs
|
||||
volatile float Tpulses; // Time it takes to do pulses. Debug
|
||||
|
||||
HardwareTimer *pulseTimer;
|
||||
uint32_t pulseTimerChan;
|
||||
HardwareTimer *startTimer; // Use timers 10,11,13,14
|
||||
uint8_t dirPin;
|
||||
PinName dirPinName;
|
||||
PinName stepPin;
|
||||
uint32_t Tjitter = 400; // Longest time from IRQ to handling in handleStepper, unit is microseconds
|
||||
uint64_t dbg;
|
||||
const uint16_t t2 = 5; // DIR is ahead of PUL with at least 5 usecs
|
||||
const uint16_t t3 = 5; // Pulse width at least 2.5 usecs
|
||||
const uint16_t t4 = 5; // Low level width not less than 2.5 usecs
|
||||
const float maxAllowedFrequency = 1000000 / float(t3 + t4) * 0.9; // 150 kHz for now
|
||||
|
||||
public:
|
||||
volatile double_t commandedPosition; // End position when this cycle is completed
|
||||
volatile int32_t commandedStepPosition; // End step position when this cycle is completed
|
||||
volatile double_t initialPosition; // From previous cycle
|
||||
volatile int32_t initialStepPosition; // From previous cycle
|
||||
int16_t stepsPerMM; // This many steps per mm
|
||||
volatile uint8_t enabled; // Enabled step generator
|
||||
volatile float frequency;
|
||||
|
||||
static uint32_t sync0CycleTime; // Nominal EtherCAT cycle time nanoseconds
|
||||
volatile float lcncCycleTime; // Linuxcnc nominal cycle time in sec (1 ms often)
|
||||
|
||||
StepGen2(TIM_TypeDef *Timer, uint32_t _timerChannel, PinName _stepPin, uint8_t _dirPin, void irq(void), TIM_TypeDef *Timer2, void irq2(void));
|
||||
|
||||
uint32_t handleStepper(uint64_t irqTime /* time when irq happened nanosecs */, uint16_t nLoops);
|
||||
void startTimerCB();
|
||||
void pulseTimerCB();
|
||||
uint32_t updatePos(uint32_t i);
|
||||
};
|
||||
|
||||
#endif
|
||||
156
Firmware/include/StepGen3.h
Executable file
156
Firmware/include/StepGen3.h
Executable file
@@ -0,0 +1,156 @@
|
||||
|
||||
#ifndef STEPGEN3
|
||||
#define STEPGEN3
|
||||
#include <HardwareTimer.h>
|
||||
|
||||
#define MAX_CHAN 16
|
||||
#define MAX_CYCLE 18
|
||||
#define USER_STEP_TYPE 13
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* stuff that is both read and written by makepulses */
|
||||
volatile unsigned int timer1; /* times out when step pulse should end */
|
||||
volatile unsigned int timer2; /* times out when safe to change dir */
|
||||
volatile unsigned int timer3; /* times out when safe to step in new dir */
|
||||
volatile int hold_dds; /* prevents accumulator from updating */
|
||||
volatile long addval; /* actual frequency generator add value */
|
||||
volatile long long accum; /* frequency generator accumulator */
|
||||
volatile int rawcount; /* param: position feedback in counts */
|
||||
volatile int curr_dir; /* current direction */
|
||||
volatile int state; /* current position in state table */
|
||||
/* stuff that is read but not written by makepulses */
|
||||
volatile int enable; /* pin for enable stepgen */
|
||||
volatile int target_addval; /* desired freq generator add value */
|
||||
volatile long deltalim; /* max allowed change per period */
|
||||
volatile int step_len; /* parameter: step pulse length */
|
||||
volatile unsigned int dir_hold_dly; /* param: direction hold time or delay */
|
||||
volatile unsigned int dir_setup; /* param: direction setup time */
|
||||
volatile int step_type; /* stepping type - see list above */
|
||||
volatile int cycle_max; /* cycle length for step types 2 and up */
|
||||
volatile int num_phases; /* number of phases for types 2 and up */
|
||||
volatile int phase[5]; /* pins for output signals */
|
||||
volatile const unsigned char *lut; /* pointer to state lookup table */
|
||||
/* stuff that is not accessed by makepulses */
|
||||
int pos_mode; /* 1 = position mode, 0 = velocity mode */
|
||||
unsigned int step_space; /* parameter: min step pulse spacing */
|
||||
double old_pos_cmd; /* previous position command (counts) */
|
||||
int count; /* pin: captured feedback in counts */
|
||||
#define double float
|
||||
double pos_scale; /* param: steps per position unit */
|
||||
double old_scale; /* stored scale value */
|
||||
double scale_recip; /* reciprocal value used for scaling */
|
||||
double vel_cmd; /* pin: velocity command (pos units/sec) */
|
||||
double pos_cmd; /* pin: position command (position units) */
|
||||
double pos_fb; /* pin: position feedback (position units) */
|
||||
double freq; /* param: frequency command */
|
||||
double maxvel; /* param: max velocity, (pos units/sec) */
|
||||
double maxaccel; /* param: max accel (pos units/sec^2) */
|
||||
unsigned int old_step_len; /* used to detect parameter changes */
|
||||
unsigned int old_step_space;
|
||||
unsigned int old_dir_hold_dly;
|
||||
unsigned int old_dir_setup;
|
||||
int printed_error; /* flag to avoid repeated printing */
|
||||
} stepgen_t;
|
||||
|
||||
#define MAX_STEP_TYPE 15
|
||||
|
||||
#define STEP_PIN 0 /* output phase used for STEP signal */
|
||||
#define DIR_PIN 1 /* output phase used for DIR signal */
|
||||
#define UP_PIN 0 /* output phase used for UP signal */
|
||||
#define DOWN_PIN 1 /* output phase used for DOWN signal */
|
||||
|
||||
#define PICKOFF 28 /* bit location in DDS accum */
|
||||
|
||||
typedef enum CONTROL
|
||||
{
|
||||
POSITION,
|
||||
VELOCITY,
|
||||
INVALID
|
||||
} CONTROL;
|
||||
|
||||
class StepGen3
|
||||
{
|
||||
public:
|
||||
int step_type[MAX_CHAN] = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}; // stepping types for up to 16 channels
|
||||
char *ctrl_type[MAX_CHAN] = {0}; // control type ("p"pos or "v"vel) for up to 16 channels
|
||||
int user_step_type[MAX_CYCLE] = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}; // lookup table for user-defined step type
|
||||
uint32_t stepPin[MAX_CHAN] = {0};
|
||||
uint32_t dirPin[MAX_CHAN] = {0};
|
||||
|
||||
stepgen_t *stepgen_array = 0;
|
||||
|
||||
int num_chan = 0; // number of step generators configured */
|
||||
long periodns; // makepulses function period in nanosec */
|
||||
long old_periodns; // used to detect changes in periodns */
|
||||
double periodfp; // makepulses function period in seconds */
|
||||
double freqscale; // conv. factor from Hz to addval counts */
|
||||
double accelscale; // conv. Hz/sec to addval cnts/period */
|
||||
long old_dtns; // update_freq funct period in nsec */
|
||||
double dt; // update_freq period in seconds */
|
||||
double recip_dt; // recprocal of period, avoids divides */
|
||||
volatile uint64_t cnt = 0; // Debug counter
|
||||
#undef double
|
||||
StepGen3(void);
|
||||
void updateStepGen(double pos_cmd1, double pos_cmd2);
|
||||
void makeAllPulses(void);
|
||||
int rtapi_app_main();
|
||||
int export_stepgen(int num, stepgen_t *addr, int step_type, int pos_mode);
|
||||
void make_pulses(void *arg, long period);
|
||||
void update_freq(void *arg, long period);
|
||||
void update_pos(void *arg, long period);
|
||||
int setup_user_step_type(void);
|
||||
CONTROL parse_ctrl_type(const char *ctrl);
|
||||
unsigned long ulceil(unsigned long value, unsigned long increment);
|
||||
|
||||
private:
|
||||
/* lookup tables for stepping types 2 and higher - phase A is the LSB */
|
||||
|
||||
unsigned char master_lut[MAX_STEP_TYPE][MAX_CYCLE] = {
|
||||
{1, 3, 2, 0, 0, 0, 0, 0, 0, 0}, /* type 2: Quadrature */
|
||||
{1, 2, 4, 0, 0, 0, 0, 0, 0, 0}, /* type 3: Three Wire */
|
||||
{1, 3, 2, 6, 4, 5, 0, 0, 0, 0}, /* type 4: Three Wire Half Step */
|
||||
{1, 2, 4, 8, 0, 0, 0, 0, 0, 0}, /* 5: Unipolar Full Step 1 */
|
||||
{3, 6, 12, 9, 0, 0, 0, 0, 0, 0}, /* 6: Unipoler Full Step 2 */
|
||||
{1, 7, 14, 8, 0, 0, 0, 0, 0, 0}, /* 7: Bipolar Full Step 1 */
|
||||
{5, 6, 10, 9, 0, 0, 0, 0, 0, 0}, /* 8: Bipoler Full Step 2 */
|
||||
{1, 3, 2, 6, 4, 12, 8, 9, 0, 0}, /* 9: Unipolar Half Step */
|
||||
{1, 5, 7, 6, 14, 10, 8, 9, 0, 0}, /* 10: Bipolar Half Step */
|
||||
{1, 2, 4, 8, 16, 0, 0, 0, 0, 0}, /* 11: Five Wire Unipolar */
|
||||
{3, 6, 12, 24, 17, 0, 0, 0, 0, 0}, /* 12: Five Wire Wave */
|
||||
{1, 3, 2, 6, 4, 12, 8, 24, 16, 17}, /* 13: Five Wire Uni Half */
|
||||
{3, 7, 6, 14, 12, 28, 24, 25, 17, 19}, /* 14: Five Wire Wave Half */
|
||||
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0} /* 15: User-defined */
|
||||
};
|
||||
|
||||
unsigned char cycle_len_lut[14] =
|
||||
{4, 3, 6, 4, 4, 4, 4, 8, 8, 5, 5, 10, 10, 0};
|
||||
|
||||
unsigned char num_phases_lut[14] =
|
||||
{
|
||||
2,
|
||||
3,
|
||||
3,
|
||||
4,
|
||||
4,
|
||||
4,
|
||||
4,
|
||||
4,
|
||||
4,
|
||||
5,
|
||||
5,
|
||||
5,
|
||||
5,
|
||||
0,
|
||||
};
|
||||
};
|
||||
|
||||
// For the example
|
||||
#define BASE_PERIOD 20000
|
||||
#define SERVO_PERIOD 2000000
|
||||
#define JOINT_X_STEPGEN_MAXACCEL 0.0
|
||||
#define JOINT_Z_STEPGEN_MAXACCEL 0.0
|
||||
#define JOINT_X_SCALE -200
|
||||
#define JOINT_Z_SCALE -80
|
||||
|
||||
#endif
|
||||
@@ -1,38 +0,0 @@
|
||||
/* USER CODE BEGIN Header */
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file : main.h
|
||||
* @brief : Header for main.c file.
|
||||
* This file contains the common defines of the application.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* Copyright (c) 2023 STMicroelectronics.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software is licensed under terms that can be found in the LICENSE file
|
||||
* in the root directory of this software component.
|
||||
* If no LICENSE file comes with this software, it is provided AS-IS.
|
||||
*
|
||||
******************************************************************************
|
||||
*/
|
||||
/* USER CODE END Header */
|
||||
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef __MAIN_H
|
||||
#define __MAIN_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
void StepperSetup(void);
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "stm32f4xx_hal.h"
|
||||
|
||||
void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim);
|
||||
void makePulses(uint32_t totalLength /* µsec */, uint32_t nPulses);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __MAIN_H */
|
||||
File diff suppressed because it is too large
Load Diff
14
Firmware/include/extend32to64.h
Executable file
14
Firmware/include/extend32to64.h
Executable file
@@ -0,0 +1,14 @@
|
||||
#ifndef EXTEND32TO64
|
||||
#define EXTEND32TO54
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
class extend32to64
|
||||
{
|
||||
public:
|
||||
int64_t previousTimeValue = 0;
|
||||
const uint64_t ONE_PERIOD = 4294967296; // almost UINT32_MAX;
|
||||
const uint64_t HALF_PERIOD = 2147483648; // Half of that
|
||||
int64_t extendTime(uint32_t in);
|
||||
};
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
@@ -33,8 +33,8 @@
|
||||
#define SM3_smc 0x20
|
||||
#define SM3_act 1
|
||||
|
||||
#define MAX_MAPPINGS_SM2 4
|
||||
#define MAX_MAPPINGS_SM3 6
|
||||
#define MAX_MAPPINGS_SM2 5
|
||||
#define MAX_MAPPINGS_SM3 11
|
||||
|
||||
#define MAX_RXPDO_SIZE 512
|
||||
#define MAX_TXPDO_SIZE 512
|
||||
|
||||
@@ -13,25 +13,25 @@
|
||||
#define IS_TXPDO(index) ((index) >= 0x1A00 && (index) < 0x1C00)
|
||||
|
||||
/* Global variables used by the stack */
|
||||
uint8_t MBX[MBXBUFFERS * MAX(MBXSIZE,MBXSIZEBOOT)];
|
||||
uint8_t MBX[MBXBUFFERS * MAX(MBXSIZE, MBXSIZEBOOT)];
|
||||
_MBXcontrol MBXcontrol[MBXBUFFERS];
|
||||
_SMmap SMmap2[MAX_MAPPINGS_SM2];
|
||||
_SMmap SMmap3[MAX_MAPPINGS_SM3];
|
||||
_ESCvar ESCvar;
|
||||
_SMmap SMmap2[MAX_MAPPINGS_SM2];
|
||||
_SMmap SMmap3[MAX_MAPPINGS_SM3];
|
||||
_ESCvar ESCvar;
|
||||
|
||||
/* Private variables */
|
||||
static volatile int watchdog;
|
||||
|
||||
#if MAX_MAPPINGS_SM2 > 0
|
||||
static uint8_t rxpdo[MAX_RXPDO_SIZE] __attribute__((aligned (8)));
|
||||
static uint8_t rxpdo[MAX_RXPDO_SIZE] __attribute__((aligned(8)));
|
||||
#else
|
||||
extern uint8_t * rxpdo;
|
||||
extern uint8_t *rxpdo;
|
||||
#endif
|
||||
|
||||
#if MAX_MAPPINGS_SM3 > 0
|
||||
static uint8_t txpdo[MAX_TXPDO_SIZE] __attribute__((aligned (8)));
|
||||
static uint8_t txpdo[MAX_TXPDO_SIZE] __attribute__((aligned(8)));
|
||||
#else
|
||||
extern uint8_t * txpdo;
|
||||
extern uint8_t *txpdo;
|
||||
#endif
|
||||
|
||||
/** Function to pre-qualify the incoming SDO download.
|
||||
@@ -40,19 +40,19 @@ extern uint8_t * txpdo;
|
||||
* @param[in] sub-index = sub-index of SDO download request to check
|
||||
* @return SDO abort code, or 0 on success
|
||||
*/
|
||||
uint32_t ESC_download_pre_objecthandler (uint16_t index,
|
||||
uint8_t subindex,
|
||||
void * data,
|
||||
size_t size,
|
||||
uint16_t flags)
|
||||
uint32_t ESC_download_pre_objecthandler(uint16_t index,
|
||||
uint8_t subindex,
|
||||
void *data,
|
||||
size_t size,
|
||||
uint16_t flags)
|
||||
{
|
||||
if (IS_RXPDO (index) ||
|
||||
IS_TXPDO (index) ||
|
||||
if (IS_RXPDO(index) ||
|
||||
IS_TXPDO(index) ||
|
||||
index == RX_PDO_OBJIDX ||
|
||||
index == TX_PDO_OBJIDX)
|
||||
{
|
||||
uint8_t minSub = ((flags & COMPLETE_ACCESS_FLAG) == 0) ? 0 : 1;
|
||||
if (subindex > minSub && COE_maxSub (index) != 0)
|
||||
if (subindex > minSub && COE_maxSub(index) != 0)
|
||||
{
|
||||
return ABORT_SUBINDEX0_NOT_ZERO;
|
||||
}
|
||||
@@ -60,11 +60,11 @@ uint32_t ESC_download_pre_objecthandler (uint16_t index,
|
||||
|
||||
if (ESCvar.pre_object_download_hook)
|
||||
{
|
||||
return (ESCvar.pre_object_download_hook) (index,
|
||||
subindex,
|
||||
data,
|
||||
size,
|
||||
flags);
|
||||
return (ESCvar.pre_object_download_hook)(index,
|
||||
subindex,
|
||||
data,
|
||||
size,
|
||||
flags);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -77,7 +77,7 @@ uint32_t ESC_download_pre_objecthandler (uint16_t index,
|
||||
* @param[in] sub-index = sub-index of SDO download request to handle
|
||||
* @return SDO abort code, or 0 on success
|
||||
*/
|
||||
uint32_t ESC_download_post_objecthandler (uint16_t index, uint8_t subindex, uint16_t flags)
|
||||
uint32_t ESC_download_post_objecthandler(uint16_t index, uint8_t subindex, uint16_t flags)
|
||||
{
|
||||
if (ESCvar.post_object_download_hook != NULL)
|
||||
{
|
||||
@@ -93,19 +93,19 @@ uint32_t ESC_download_post_objecthandler (uint16_t index, uint8_t subindex, uint
|
||||
* @param[in] sub-index = sub-index of SDO upload request to handle
|
||||
* @return SDO abort code, or 0 on success
|
||||
*/
|
||||
uint32_t ESC_upload_pre_objecthandler (uint16_t index,
|
||||
uint8_t subindex,
|
||||
void * data,
|
||||
size_t size,
|
||||
uint16_t flags)
|
||||
uint32_t ESC_upload_pre_objecthandler(uint16_t index,
|
||||
uint8_t subindex,
|
||||
void *data,
|
||||
size_t size,
|
||||
uint16_t flags)
|
||||
{
|
||||
if (ESCvar.pre_object_upload_hook != NULL)
|
||||
{
|
||||
return (ESCvar.pre_object_upload_hook) (index,
|
||||
subindex,
|
||||
data,
|
||||
size,
|
||||
flags);
|
||||
return (ESCvar.pre_object_upload_hook)(index,
|
||||
subindex,
|
||||
data,
|
||||
size,
|
||||
flags);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -118,7 +118,7 @@ uint32_t ESC_upload_pre_objecthandler (uint16_t index,
|
||||
* @param[in] sub-index = sub-index of SDO upload request to handle
|
||||
* @return SDO abort code, or 0 on success
|
||||
*/
|
||||
uint32_t ESC_upload_post_objecthandler (uint16_t index, uint8_t subindex, uint16_t flags)
|
||||
uint32_t ESC_upload_post_objecthandler(uint16_t index, uint8_t subindex, uint16_t flags)
|
||||
{
|
||||
if (ESCvar.post_object_upload_hook != NULL)
|
||||
{
|
||||
@@ -131,11 +131,11 @@ uint32_t ESC_upload_post_objecthandler (uint16_t index, uint8_t subindex, uint16
|
||||
/** Hook called from the slave stack ESC_stopoutputs to act on state changes
|
||||
* forcing us to stop outputs. Here we can set them to a safe state.
|
||||
*/
|
||||
void APP_safeoutput (void)
|
||||
void APP_safeoutput(void)
|
||||
{
|
||||
DPRINT ("APP_safeoutput\n");
|
||||
DPRINT("APP_safeoutput\n");
|
||||
|
||||
if(ESCvar.safeoutput_override != NULL)
|
||||
if (ESCvar.safeoutput_override != NULL)
|
||||
{
|
||||
(ESCvar.safeoutput_override)();
|
||||
}
|
||||
@@ -143,9 +143,9 @@ void APP_safeoutput (void)
|
||||
|
||||
/** Write local process data to Sync Manager 3, Master Inputs.
|
||||
*/
|
||||
void TXPDO_update (void)
|
||||
void TXPDO_update(void)
|
||||
{
|
||||
if(ESCvar.txpdo_override != NULL)
|
||||
if (ESCvar.txpdo_override != NULL)
|
||||
{
|
||||
(ESCvar.txpdo_override)();
|
||||
}
|
||||
@@ -153,26 +153,26 @@ void TXPDO_update (void)
|
||||
{
|
||||
if (MAX_MAPPINGS_SM3 > 0)
|
||||
{
|
||||
COE_pdoPack (txpdo, ESCvar.sm3mappings, SMmap3);
|
||||
COE_pdoPack(txpdo, ESCvar.sm3mappings, SMmap3);
|
||||
}
|
||||
ESC_write (ESC_SM3_sma, txpdo, ESCvar.ESC_SM3_sml);
|
||||
ESC_write(ESC_SM3_sma, txpdo, ESCvar.ESC_SM3_sml);
|
||||
}
|
||||
}
|
||||
|
||||
/** Read Sync Manager 2 to local process data, Master Outputs.
|
||||
*/
|
||||
void RXPDO_update (void)
|
||||
void RXPDO_update(void)
|
||||
{
|
||||
if(ESCvar.rxpdo_override != NULL)
|
||||
if (ESCvar.rxpdo_override != NULL)
|
||||
{
|
||||
(ESCvar.rxpdo_override)();
|
||||
}
|
||||
else
|
||||
{
|
||||
ESC_read (ESC_SM2_sma, rxpdo, ESCvar.ESC_SM2_sml);
|
||||
ESC_read(ESC_SM2_sma, rxpdo, ESCvar.ESC_SM2_sml);
|
||||
if (MAX_MAPPINGS_SM2 > 0)
|
||||
{
|
||||
COE_pdoUnpack (rxpdo, ESCvar.sm2mappings, SMmap2);
|
||||
COE_pdoUnpack(rxpdo, ESCvar.sm2mappings, SMmap2);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -182,7 +182,7 @@ void RXPDO_update (void)
|
||||
*
|
||||
* @param[in] watchdogcnt = new watchdog count value
|
||||
*/
|
||||
void APP_setwatchdog (int watchdogcnt)
|
||||
void APP_setwatchdog(int watchdogcnt)
|
||||
{
|
||||
CC_ATOMIC_SET(ESCvar.watchdogcnt, watchdogcnt);
|
||||
}
|
||||
@@ -191,10 +191,11 @@ void APP_setwatchdog (int watchdogcnt)
|
||||
* write ethercat inputs. Implement watch-dog counter to count-out if we have
|
||||
* made state change affecting the App.state.
|
||||
*/
|
||||
void DIG_process (uint8_t flags)
|
||||
|
||||
void DIG_process(uint16_t ALEvent, uint8_t flags)
|
||||
{
|
||||
/* Handle watchdog */
|
||||
if((flags & DIG_PROCESS_WD_FLAG) > 0)
|
||||
if ((flags & DIG_PROCESS_WD_FLAG) > 0)
|
||||
{
|
||||
if (CC_ATOMIC_GET(watchdog) > 0)
|
||||
{
|
||||
@@ -207,7 +208,7 @@ void DIG_process (uint8_t flags)
|
||||
DPRINT("DIG_process watchdog expired\n");
|
||||
ESC_ALstatusgotoerror((ESCsafeop | ESCerror), ALERR_WATCHDOG);
|
||||
}
|
||||
else if(((CC_ATOMIC_GET(ESCvar.App.state) & APPSTATE_OUTPUT) == 0))
|
||||
else if (((CC_ATOMIC_GET(ESCvar.App.state) & APPSTATE_OUTPUT) == 0))
|
||||
{
|
||||
CC_ATOMIC_SET(watchdog, ESCvar.watchdogcnt);
|
||||
}
|
||||
@@ -216,15 +217,15 @@ void DIG_process (uint8_t flags)
|
||||
/* Handle Outputs */
|
||||
if ((flags & DIG_PROCESS_OUTPUTS_FLAG) > 0)
|
||||
{
|
||||
if(((CC_ATOMIC_GET(ESCvar.App.state) & APPSTATE_OUTPUT) > 0) &&
|
||||
(ESCvar.ALevent & ESCREG_ALEVENT_SM2))
|
||||
if (((CC_ATOMIC_GET(ESCvar.App.state) & APPSTATE_OUTPUT) > 0) &&
|
||||
(ALEvent & ESCREG_ALEVENT_SM2))
|
||||
{
|
||||
RXPDO_update();
|
||||
CC_ATOMIC_SET(watchdog, ESCvar.watchdogcnt);
|
||||
/* Set outputs */
|
||||
cb_set_outputs();
|
||||
}
|
||||
else if (ESCvar.ALevent & ESCREG_ALEVENT_SM2)
|
||||
else if (ALEvent & ESCREG_ALEVENT_SM2)
|
||||
{
|
||||
RXPDO_update();
|
||||
}
|
||||
@@ -243,7 +244,7 @@ void DIG_process (uint8_t flags)
|
||||
/* Handle Inputs */
|
||||
if ((flags & DIG_PROCESS_INPUTS_FLAG) > 0)
|
||||
{
|
||||
if(CC_ATOMIC_GET(ESCvar.App.state) > 0)
|
||||
if (CC_ATOMIC_GET(ESCvar.App.state) > 0)
|
||||
{
|
||||
/* Update inputs */
|
||||
cb_get_inputs();
|
||||
@@ -257,7 +258,7 @@ void DIG_process (uint8_t flags)
|
||||
* control what interrupts that should be served and re-activated with
|
||||
* event mask argument
|
||||
*/
|
||||
void ecat_slv_worker (uint32_t event_mask)
|
||||
void ecat_slv_worker(uint32_t event_mask)
|
||||
{
|
||||
do
|
||||
{
|
||||
@@ -289,21 +290,21 @@ void ecat_slv_worker (uint32_t event_mask)
|
||||
|
||||
CC_ATOMIC_SET(ESCvar.ALevent, ESC_ALeventread());
|
||||
|
||||
}while(ESCvar.ALevent & event_mask);
|
||||
} while (ESCvar.ALevent & event_mask);
|
||||
|
||||
ESC_ALeventmaskwrite(ESC_ALeventmaskread() | event_mask);
|
||||
}
|
||||
|
||||
/*
|
||||
* Polling function. It should be called periodically for an application
|
||||
* Polling function. It should be called periodically for an application
|
||||
* when only SM2/DC interrupt is active.
|
||||
* Read and handle events for the EtherCAT state, status, mailbox and eeprom.
|
||||
*/
|
||||
void ecat_slv_poll (void)
|
||||
void ecat_slv_poll(void)
|
||||
{
|
||||
/* Read local time from ESC*/
|
||||
ESC_read (ESCREG_LOCALTIME, (void *) &ESCvar.Time, sizeof (ESCvar.Time));
|
||||
ESCvar.Time = etohl (ESCvar.Time);
|
||||
ESC_read(ESCREG_LOCALTIME, (void *)&ESCvar.Time, sizeof(ESCvar.Time));
|
||||
ESCvar.Time = etohl(ESCvar.Time);
|
||||
|
||||
/* Check the state machine */
|
||||
ESC_state();
|
||||
@@ -336,50 +337,50 @@ void ecat_slv_poll (void)
|
||||
/*
|
||||
* Poll all events in a free-run application
|
||||
*/
|
||||
void ecat_slv (void)
|
||||
void ecat_slv(void)
|
||||
{
|
||||
ecat_slv_poll();
|
||||
DIG_process(DIG_PROCESS_WD_FLAG | DIG_PROCESS_OUTPUTS_FLAG |
|
||||
DIG_PROCESS_APP_HOOK_FLAG | DIG_PROCESS_INPUTS_FLAG);
|
||||
DIG_process(ESC_ALeventread(), DIG_PROCESS_WD_FLAG | DIG_PROCESS_OUTPUTS_FLAG |
|
||||
DIG_PROCESS_APP_HOOK_FLAG | DIG_PROCESS_INPUTS_FLAG);
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize the slave stack.
|
||||
*/
|
||||
void ecat_slv_init (esc_cfg_t * config)
|
||||
void ecat_slv_init(esc_cfg_t *config)
|
||||
{
|
||||
/* Init watchdog */
|
||||
watchdog = config->watchdog_cnt;
|
||||
|
||||
/* Call stack configuration */
|
||||
ESC_config (config);
|
||||
ESC_config(config);
|
||||
/* Call HW init */
|
||||
ESC_init (config);
|
||||
ESC_init(config);
|
||||
|
||||
/* wait until ESC is started up */
|
||||
while ((ESCvar.DLstatus & 0x0001) == 0)
|
||||
{
|
||||
ESC_read (ESCREG_DLSTATUS, (void *) &ESCvar.DLstatus,
|
||||
sizeof (ESCvar.DLstatus));
|
||||
ESCvar.DLstatus = etohs (ESCvar.DLstatus);
|
||||
ESC_read(ESCREG_DLSTATUS, (void *)&ESCvar.DLstatus,
|
||||
sizeof(ESCvar.DLstatus));
|
||||
ESCvar.DLstatus = etohs(ESCvar.DLstatus);
|
||||
}
|
||||
|
||||
#if USE_FOE
|
||||
/* Init FoE */
|
||||
FOE_init ();
|
||||
FOE_init();
|
||||
#endif
|
||||
|
||||
#if USE_EOE
|
||||
/* Init EoE */
|
||||
EOE_init ();
|
||||
EOE_init();
|
||||
#endif
|
||||
|
||||
/* reset ESC to init state */
|
||||
ESC_ALstatus (ESCinit);
|
||||
ESC_ALerror (ALERR_NONE);
|
||||
ESC_stopmbx ();
|
||||
ESC_stopinput ();
|
||||
ESC_stopoutput ();
|
||||
ESC_ALstatus(ESCinit);
|
||||
ESC_ALerror(ALERR_NONE);
|
||||
ESC_stopmbx();
|
||||
ESC_stopinput();
|
||||
ESC_stopoutput();
|
||||
/* Init Object Dictionary default values */
|
||||
COE_initDefaultValues ();
|
||||
COE_initDefaultValues();
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
void cb_get_inputs();
|
||||
|
||||
/**
|
||||
* This function is called when to set outputs values
|
||||
* This function is called when to set outputs values
|
||||
*/
|
||||
void cb_set_outputs();
|
||||
|
||||
@@ -23,12 +23,12 @@ void cb_set_outputs();
|
||||
*
|
||||
* @param[in] watchdogcnt = new watchdog count value
|
||||
*/
|
||||
void APP_setwatchdog (int watchdogcnt);
|
||||
void APP_setwatchdog(int watchdogcnt);
|
||||
|
||||
#define DIG_PROCESS_INPUTS_FLAG 0x01
|
||||
#define DIG_PROCESS_OUTPUTS_FLAG 0x02
|
||||
#define DIG_PROCESS_WD_FLAG 0x04
|
||||
#define DIG_PROCESS_APP_HOOK_FLAG 0x08
|
||||
#define DIG_PROCESS_INPUTS_FLAG 0x01
|
||||
#define DIG_PROCESS_OUTPUTS_FLAG 0x02
|
||||
#define DIG_PROCESS_WD_FLAG 0x04
|
||||
#define DIG_PROCESS_APP_HOOK_FLAG 0x08
|
||||
/** Implements the watch-dog counter to count if we should make a state change
|
||||
* due to missing incoming SM2 events. Updates local I/O and run the application
|
||||
* in the following order, call read EtherCAT outputs, execute user provided
|
||||
@@ -36,7 +36,7 @@ void APP_setwatchdog (int watchdogcnt);
|
||||
*
|
||||
* @param[in] flags = User input what to execute
|
||||
*/
|
||||
void DIG_process (uint8_t flags);
|
||||
void DIG_process(uint16_t ALEvent, uint8_t flags);
|
||||
|
||||
/**
|
||||
* Handler for SM change, SM0/1, AL CONTROL and EEPROM events, the application
|
||||
@@ -46,24 +46,24 @@ void DIG_process (uint8_t flags);
|
||||
* @param[in] event_mask = Event mask for interrupts to serve and re-activate
|
||||
* after served
|
||||
*/
|
||||
void ecat_slv_worker (uint32_t event_mask);
|
||||
void ecat_slv_worker(uint32_t event_mask);
|
||||
|
||||
/**
|
||||
* Poll SM0/1, EEPROM and AL CONTROL events in a SM/DC synchronization
|
||||
* application
|
||||
*/
|
||||
void ecat_slv_poll (void);
|
||||
void ecat_slv_poll(void);
|
||||
|
||||
/**
|
||||
* Poll all events in a free-run application
|
||||
*/
|
||||
void ecat_slv (void);
|
||||
void ecat_slv(void);
|
||||
|
||||
/**
|
||||
* Initialize the slave stack
|
||||
*
|
||||
* @param[in] config = User input how to configure the stack
|
||||
*/
|
||||
void ecat_slv_init (esc_cfg_t * config);
|
||||
void ecat_slv_init(esc_cfg_t *config);
|
||||
|
||||
#endif /* __ECAT_SLV_H__ */
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
"pdo_mappings": [
|
||||
"txpdo"
|
||||
],
|
||||
"dtype": "REAL64",
|
||||
"dtype": "REAL32",
|
||||
"value": "0",
|
||||
"data": "&Obj.EncPos"
|
||||
},
|
||||
@@ -68,7 +68,7 @@
|
||||
"pdo_mappings": [
|
||||
"txpdo"
|
||||
],
|
||||
"dtype": "REAL64",
|
||||
"dtype": "REAL32",
|
||||
"value": "0",
|
||||
"data": "&Obj.EncFrequency"
|
||||
},
|
||||
@@ -79,7 +79,7 @@
|
||||
"pdo_mappings": [
|
||||
"txpdo"
|
||||
],
|
||||
"dtype": "UNSIGNED32",
|
||||
"dtype": "UNSIGNED16",
|
||||
"value": "0",
|
||||
"data": "&Obj.DiffT"
|
||||
},
|
||||
@@ -106,39 +106,74 @@
|
||||
"data": "&Obj.IndexStatus"
|
||||
},
|
||||
"6005": {
|
||||
"otype": "RECORD",
|
||||
"name": "StepGenOut1",
|
||||
"otype": "VAR",
|
||||
"name": "ActualPosition1",
|
||||
"access": "RO",
|
||||
"items": [
|
||||
{
|
||||
"name": "Max SubIndex"
|
||||
},
|
||||
{
|
||||
"name": "ActualPosition",
|
||||
"dtype": "REAL64",
|
||||
"data": "&Obj.StepGenOut1.ActualPosition",
|
||||
"value": "0",
|
||||
"access": "RO"
|
||||
}
|
||||
],
|
||||
"pdo_mappings": [
|
||||
"txpdo"
|
||||
]
|
||||
],
|
||||
"dtype": "REAL32",
|
||||
"value": "0",
|
||||
"data": "&Obj.ActualPosition1"
|
||||
},
|
||||
"6006": {
|
||||
"otype": "VAR",
|
||||
"name": "ActualPosition2",
|
||||
"access": "RO",
|
||||
"pdo_mappings": [
|
||||
"txpdo"
|
||||
],
|
||||
"dtype": "REAL32",
|
||||
"value": "0",
|
||||
"data": "&Obj.ActualPosition2"
|
||||
},
|
||||
"6007": {
|
||||
"otype": "VAR",
|
||||
"name": "D1",
|
||||
"access": "RO",
|
||||
"pdo_mappings": [
|
||||
"txpdo"
|
||||
],
|
||||
"dtype": "INTEGER16",
|
||||
"value": "0",
|
||||
"data": "&Obj.D1"
|
||||
},
|
||||
"6008": {
|
||||
"otype": "VAR",
|
||||
"name": "D2",
|
||||
"access": "RO",
|
||||
"pdo_mappings": [
|
||||
"txpdo"
|
||||
],
|
||||
"dtype": "INTEGER16",
|
||||
"value": "0",
|
||||
"data": "&Obj.D2"
|
||||
},
|
||||
"6009": {
|
||||
"otype": "VAR",
|
||||
"name": "D3",
|
||||
"access": "RO",
|
||||
"pdo_mappings": [
|
||||
"txpdo"
|
||||
],
|
||||
"dtype": "INTEGER16",
|
||||
"value": "0",
|
||||
"data": "&Obj.D3"
|
||||
},
|
||||
"600A": {
|
||||
"otype": "VAR",
|
||||
"name": "D4",
|
||||
"access": "RO",
|
||||
"pdo_mappings": [
|
||||
"txpdo"
|
||||
],
|
||||
"dtype": "INTEGER16",
|
||||
"value": "0",
|
||||
"data": "&Obj.D4"
|
||||
}
|
||||
},
|
||||
"rxpdo": {
|
||||
"7000": {
|
||||
"otype": "VAR",
|
||||
"name": "EncPosScale",
|
||||
"access": "RO",
|
||||
"pdo_mappings": [
|
||||
"rxpdo"
|
||||
],
|
||||
"dtype": "INTEGER32",
|
||||
"value": "0",
|
||||
"data": "&Obj.EncPosScale"
|
||||
},
|
||||
"7001": {
|
||||
"otype": "VAR",
|
||||
"name": "IndexLatchEnable",
|
||||
"access": "RO",
|
||||
@@ -149,32 +184,49 @@
|
||||
"value": "0",
|
||||
"data": "&Obj.IndexLatchEnable"
|
||||
},
|
||||
"7002": {
|
||||
"otype": "RECORD",
|
||||
"name": "StepGenIn1",
|
||||
"7001": {
|
||||
"otype": "VAR",
|
||||
"name": "CommandedPosition1",
|
||||
"access": "RO",
|
||||
"items": [
|
||||
{
|
||||
"name": "Max SubIndex"
|
||||
},
|
||||
{
|
||||
"name": "CommandedPosition",
|
||||
"dtype": "REAL64",
|
||||
"data": "&Obj.StepGenIn1.CommandedPosition",
|
||||
"value": "0",
|
||||
"access": "RO"
|
||||
},
|
||||
{
|
||||
"name": "CommandedVelocity",
|
||||
"dtype": "REAL64",
|
||||
"value": "0",
|
||||
"access": "RO",
|
||||
"data": "&Obj.StepGenIn1.CommandedVelocity"
|
||||
}
|
||||
],
|
||||
"pdo_mappings": [
|
||||
"rxpdo"
|
||||
]
|
||||
],
|
||||
"dtype": "REAL32",
|
||||
"value": "0",
|
||||
"data": "&Obj.CommandedPosition1"
|
||||
},
|
||||
"7002": {
|
||||
"otype": "VAR",
|
||||
"name": "CommandedPosition2",
|
||||
"access": "RO",
|
||||
"pdo_mappings": [
|
||||
"rxpdo"
|
||||
],
|
||||
"dtype": "REAL32",
|
||||
"value": "0",
|
||||
"data": "&Obj.CommandedPosition2"
|
||||
},
|
||||
"7003": {
|
||||
"otype": "VAR",
|
||||
"name": "StepsPerMM1",
|
||||
"access": "RO",
|
||||
"pdo_mappings": [
|
||||
"rxpdo"
|
||||
],
|
||||
"dtype": "INTEGER16",
|
||||
"value": "0",
|
||||
"data": "&Obj.StepsPerMM1"
|
||||
},
|
||||
"7004": {
|
||||
"otype": "VAR",
|
||||
"name": "StepsPerMM2",
|
||||
"access": "RO",
|
||||
"pdo_mappings": [
|
||||
"rxpdo"
|
||||
],
|
||||
"dtype": "INTEGER16",
|
||||
"value": "0",
|
||||
"data": "&Obj.StepsPerMM2"
|
||||
},
|
||||
"60664": {
|
||||
"otype": "VAR",
|
||||
|
||||
@@ -13,16 +13,21 @@ static const char acName1018_01[] = "Vendor ID";
|
||||
static const char acName1018_02[] = "Product Code";
|
||||
static const char acName1018_03[] = "Revision Number";
|
||||
static const char acName1018_04[] = "Serial Number";
|
||||
static const char acName1600[] = "EncPosScale";
|
||||
static const char acName1600[] = "IndexLatchEnable";
|
||||
static const char acName1600_00[] = "Max SubIndex";
|
||||
static const char acName1600_01[] = "EncPosScale";
|
||||
static const char acName1601[] = "IndexLatchEnable";
|
||||
static const char acName1600_01[] = "IndexLatchEnable";
|
||||
static const char acName1601[] = "CommandedPosition1";
|
||||
static const char acName1601_00[] = "Max SubIndex";
|
||||
static const char acName1601_01[] = "IndexLatchEnable";
|
||||
static const char acName1602[] = "StepGenIn1";
|
||||
static const char acName1601_01[] = "CommandedPosition1";
|
||||
static const char acName1602[] = "CommandedPosition2";
|
||||
static const char acName1602_00[] = "Max SubIndex";
|
||||
static const char acName1602_01[] = "CommandedPosition";
|
||||
static const char acName1602_02[] = "CommandedVelocity";
|
||||
static const char acName1602_01[] = "CommandedPosition2";
|
||||
static const char acName1603[] = "StepsPerMM1";
|
||||
static const char acName1603_00[] = "Max SubIndex";
|
||||
static const char acName1603_01[] = "StepsPerMM1";
|
||||
static const char acName1604[] = "StepsPerMM2";
|
||||
static const char acName1604_00[] = "Max SubIndex";
|
||||
static const char acName1604_01[] = "StepsPerMM2";
|
||||
static const char acName1A00[] = "EncPos";
|
||||
static const char acName1A00_00[] = "Max SubIndex";
|
||||
static const char acName1A00_01[] = "EncPos";
|
||||
@@ -38,9 +43,24 @@ static const char acName1A03_01[] = "IndexByte";
|
||||
static const char acName1A04[] = "IndexStatus";
|
||||
static const char acName1A04_00[] = "Max SubIndex";
|
||||
static const char acName1A04_01[] = "IndexStatus";
|
||||
static const char acName1A05[] = "StepGenOut1";
|
||||
static const char acName1A05[] = "ActualPosition1";
|
||||
static const char acName1A05_00[] = "Max SubIndex";
|
||||
static const char acName1A05_01[] = "ActualPosition";
|
||||
static const char acName1A05_01[] = "ActualPosition1";
|
||||
static const char acName1A06[] = "ActualPosition2";
|
||||
static const char acName1A06_00[] = "Max SubIndex";
|
||||
static const char acName1A06_01[] = "ActualPosition2";
|
||||
static const char acName1A07[] = "D1";
|
||||
static const char acName1A07_00[] = "Max SubIndex";
|
||||
static const char acName1A07_01[] = "D1";
|
||||
static const char acName1A08[] = "D2";
|
||||
static const char acName1A08_00[] = "Max SubIndex";
|
||||
static const char acName1A08_01[] = "D2";
|
||||
static const char acName1A09[] = "D3";
|
||||
static const char acName1A09_00[] = "Max SubIndex";
|
||||
static const char acName1A09_01[] = "D3";
|
||||
static const char acName1A0A[] = "D4";
|
||||
static const char acName1A0A_00[] = "Max SubIndex";
|
||||
static const char acName1A0A_01[] = "D4";
|
||||
static const char acName1C00[] = "Sync Manager Communication Type";
|
||||
static const char acName1C00_00[] = "Max SubIndex";
|
||||
static const char acName1C00_01[] = "Communications Type SM0";
|
||||
@@ -52,6 +72,8 @@ static const char acName1C12_00[] = "Max SubIndex";
|
||||
static const char acName1C12_01[] = "PDO Mapping";
|
||||
static const char acName1C12_02[] = "PDO Mapping";
|
||||
static const char acName1C12_03[] = "PDO Mapping";
|
||||
static const char acName1C12_04[] = "PDO Mapping";
|
||||
static const char acName1C12_05[] = "PDO Mapping";
|
||||
static const char acName1C13[] = "Sync Manager 3 PDO Assignment";
|
||||
static const char acName1C13_00[] = "Max SubIndex";
|
||||
static const char acName1C13_01[] = "PDO Mapping";
|
||||
@@ -60,24 +82,31 @@ static const char acName1C13_03[] = "PDO Mapping";
|
||||
static const char acName1C13_04[] = "PDO Mapping";
|
||||
static const char acName1C13_05[] = "PDO Mapping";
|
||||
static const char acName1C13_06[] = "PDO Mapping";
|
||||
static const char acName1C13_07[] = "PDO Mapping";
|
||||
static const char acName1C13_08[] = "PDO Mapping";
|
||||
static const char acName1C13_09[] = "PDO Mapping";
|
||||
static const char acName1C13_10[] = "PDO Mapping";
|
||||
static const char acName1C13_11[] = "PDO Mapping";
|
||||
static const char acName6000[] = "EncPos";
|
||||
static const char acName6001[] = "EncFrequency";
|
||||
static const char acName6002[] = "DiffT";
|
||||
static const char acName6003[] = "IndexByte";
|
||||
static const char acName6004[] = "IndexStatus";
|
||||
static const char acName6005[] = "StepGenOut1";
|
||||
static const char acName6005_00[] = "Max SubIndex";
|
||||
static const char acName6005_01[] = "ActualPosition";
|
||||
static const char acName7000[] = "EncPosScale";
|
||||
static const char acName7001[] = "IndexLatchEnable";
|
||||
static const char acName7002[] = "StepGenIn1";
|
||||
static const char acName7002_00[] = "Max SubIndex";
|
||||
static const char acName7002_01[] = "CommandedPosition";
|
||||
static const char acName7002_02[] = "CommandedVelocity";
|
||||
static const char acName6005[] = "ActualPosition1";
|
||||
static const char acName6006[] = "ActualPosition2";
|
||||
static const char acName6007[] = "D1";
|
||||
static const char acName6008[] = "D2";
|
||||
static const char acName6009[] = "D3";
|
||||
static const char acName600A[] = "D4";
|
||||
static const char acName7000[] = "IndexLatchEnable";
|
||||
static const char acName7001[] = "CommandedPosition1";
|
||||
static const char acName7002[] = "CommandedPosition2";
|
||||
static const char acName7003[] = "StepsPerMM1";
|
||||
static const char acName7004[] = "StepsPerMM2";
|
||||
|
||||
const _objd SDO1000[] =
|
||||
{
|
||||
{0x0, DTYPE_UNSIGNED64, 64, ATYPE_RO, acName1000, 5001, NULL},
|
||||
{0x0, DTYPE_UNSIGNED32, 32, ATYPE_RO, acName1000, 5001, NULL},
|
||||
};
|
||||
const _objd SDO1008[] =
|
||||
{
|
||||
@@ -94,56 +123,90 @@ const _objd SDO100A[] =
|
||||
const _objd SDO1018[] =
|
||||
{
|
||||
{0x00, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1018_00, 4, NULL},
|
||||
{0x01, DTYPE_UNSIGNED64, 64, ATYPE_RO, acName1018_01, 2730, NULL},
|
||||
{0x02, DTYPE_UNSIGNED64, 64, ATYPE_RO, acName1018_02, 12303564, NULL},
|
||||
{0x03, DTYPE_UNSIGNED64, 64, ATYPE_RO, acName1018_03, 2, NULL},
|
||||
{0x04, DTYPE_UNSIGNED64, 64, ATYPE_RO, acName1018_04, 1, &Obj.serial},
|
||||
{0x01, DTYPE_UNSIGNED32, 32, ATYPE_RO, acName1018_01, 2730, NULL},
|
||||
{0x02, DTYPE_UNSIGNED32, 32, ATYPE_RO, acName1018_02, 12303564, NULL},
|
||||
{0x03, DTYPE_UNSIGNED32, 32, ATYPE_RO, acName1018_03, 2, NULL},
|
||||
{0x04, DTYPE_UNSIGNED32, 32, ATYPE_RO, acName1018_04, 1, &Obj.serial},
|
||||
};
|
||||
const _objd SDO1600[] =
|
||||
{
|
||||
{0x00, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_00, 1, NULL},
|
||||
{0x01, DTYPE_UNSIGNED64, 64, ATYPE_RO, acName1600_01, 0x70000020, NULL},
|
||||
{0x01, DTYPE_UNSIGNED32, 32, ATYPE_RO, acName1600_01, 0x70000020, NULL},
|
||||
};
|
||||
const _objd SDO1601[] =
|
||||
{
|
||||
{0x00, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1601_00, 1, NULL},
|
||||
{0x01, DTYPE_UNSIGNED64, 64, ATYPE_RO, acName1601_01, 0x70010020, NULL},
|
||||
{0x01, DTYPE_UNSIGNED32, 32, ATYPE_RO, acName1601_01, 0x70010020, NULL},
|
||||
};
|
||||
const _objd SDO1602[] =
|
||||
{
|
||||
{0x00, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1602_00, 2, NULL},
|
||||
{0x01, DTYPE_UNSIGNED64, 64, ATYPE_RO, acName1602_01, 0x70020140, NULL},
|
||||
{0x02, DTYPE_UNSIGNED64, 64, ATYPE_RO, acName1602_02, 0x70020240, NULL},
|
||||
{0x00, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1602_00, 1, NULL},
|
||||
{0x01, DTYPE_UNSIGNED32, 32, ATYPE_RO, acName1602_01, 0x70020020, NULL},
|
||||
};
|
||||
const _objd SDO1603[] =
|
||||
{
|
||||
{0x00, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1603_00, 1, NULL},
|
||||
{0x01, DTYPE_UNSIGNED32, 32, ATYPE_RO, acName1603_01, 0x70030010, NULL},
|
||||
};
|
||||
const _objd SDO1604[] =
|
||||
{
|
||||
{0x00, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1604_00, 1, NULL},
|
||||
{0x01, DTYPE_UNSIGNED32, 32, ATYPE_RO, acName1604_01, 0x70040010, NULL},
|
||||
};
|
||||
const _objd SDO1A00[] =
|
||||
{
|
||||
{0x00, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_00, 1, NULL},
|
||||
{0x01, DTYPE_UNSIGNED64, 64, ATYPE_RO, acName1A00_01, 0x60000040, NULL},
|
||||
{0x01, DTYPE_UNSIGNED32, 32, ATYPE_RO, acName1A00_01, 0x60000020, NULL},
|
||||
};
|
||||
const _objd SDO1A01[] =
|
||||
{
|
||||
{0x00, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A01_00, 1, NULL},
|
||||
{0x01, DTYPE_UNSIGNED64, 64, ATYPE_RO, acName1A01_01, 0x60010040, NULL},
|
||||
{0x01, DTYPE_UNSIGNED32, 32, ATYPE_RO, acName1A01_01, 0x60010020, NULL},
|
||||
};
|
||||
const _objd SDO1A02[] =
|
||||
{
|
||||
{0x00, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A02_00, 1, NULL},
|
||||
{0x01, DTYPE_UNSIGNED64, 64, ATYPE_RO, acName1A02_01, 0x60020020, NULL},
|
||||
{0x01, DTYPE_UNSIGNED32, 32, ATYPE_RO, acName1A02_01, 0x60020010, NULL},
|
||||
};
|
||||
const _objd SDO1A03[] =
|
||||
{
|
||||
{0x00, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A03_00, 1, NULL},
|
||||
{0x01, DTYPE_UNSIGNED64, 64, ATYPE_RO, acName1A03_01, 0x60030020, NULL},
|
||||
{0x01, DTYPE_UNSIGNED32, 32, ATYPE_RO, acName1A03_01, 0x60030020, NULL},
|
||||
};
|
||||
const _objd SDO1A04[] =
|
||||
{
|
||||
{0x00, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A04_00, 1, NULL},
|
||||
{0x01, DTYPE_UNSIGNED64, 64, ATYPE_RO, acName1A04_01, 0x60040020, NULL},
|
||||
{0x01, DTYPE_UNSIGNED32, 32, ATYPE_RO, acName1A04_01, 0x60040020, NULL},
|
||||
};
|
||||
const _objd SDO1A05[] =
|
||||
{
|
||||
{0x00, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A05_00, 1, NULL},
|
||||
{0x01, DTYPE_UNSIGNED64, 64, ATYPE_RO, acName1A05_01, 0x60050140, NULL},
|
||||
{0x01, DTYPE_UNSIGNED32, 32, ATYPE_RO, acName1A05_01, 0x60050020, NULL},
|
||||
};
|
||||
const _objd SDO1A06[] =
|
||||
{
|
||||
{0x00, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A06_00, 1, NULL},
|
||||
{0x01, DTYPE_UNSIGNED32, 32, ATYPE_RO, acName1A06_01, 0x60060020, NULL},
|
||||
};
|
||||
const _objd SDO1A07[] =
|
||||
{
|
||||
{0x00, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A07_00, 1, NULL},
|
||||
{0x01, DTYPE_UNSIGNED32, 32, ATYPE_RO, acName1A07_01, 0x60070010, NULL},
|
||||
};
|
||||
const _objd SDO1A08[] =
|
||||
{
|
||||
{0x00, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A08_00, 1, NULL},
|
||||
{0x01, DTYPE_UNSIGNED32, 32, ATYPE_RO, acName1A08_01, 0x60080010, NULL},
|
||||
};
|
||||
const _objd SDO1A09[] =
|
||||
{
|
||||
{0x00, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A09_00, 1, NULL},
|
||||
{0x01, DTYPE_UNSIGNED32, 32, ATYPE_RO, acName1A09_01, 0x60090010, NULL},
|
||||
};
|
||||
const _objd SDO1A0A[] =
|
||||
{
|
||||
{0x00, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A0A_00, 1, NULL},
|
||||
{0x01, DTYPE_UNSIGNED32, 32, ATYPE_RO, acName1A0A_01, 0x600A0010, NULL},
|
||||
};
|
||||
const _objd SDO1C00[] =
|
||||
{
|
||||
@@ -155,32 +218,39 @@ const _objd SDO1C00[] =
|
||||
};
|
||||
const _objd SDO1C12[] =
|
||||
{
|
||||
{0x00, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1C12_00, 3, NULL},
|
||||
{0x00, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1C12_00, 5, NULL},
|
||||
{0x01, DTYPE_UNSIGNED16, 16, ATYPE_RO, acName1C12_01, 0x1600, NULL},
|
||||
{0x02, DTYPE_UNSIGNED16, 16, ATYPE_RO, acName1C12_02, 0x1601, NULL},
|
||||
{0x03, DTYPE_UNSIGNED16, 16, ATYPE_RO, acName1C12_03, 0x1602, NULL},
|
||||
{0x04, DTYPE_UNSIGNED16, 16, ATYPE_RO, acName1C12_04, 0x1603, NULL},
|
||||
{0x05, DTYPE_UNSIGNED16, 16, ATYPE_RO, acName1C12_05, 0x1604, NULL},
|
||||
};
|
||||
const _objd SDO1C13[] =
|
||||
{
|
||||
{0x00, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1C13_00, 6, NULL},
|
||||
{0x00, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1C13_00, 11, NULL},
|
||||
{0x01, DTYPE_UNSIGNED16, 16, ATYPE_RO, acName1C13_01, 0x1A00, NULL},
|
||||
{0x02, DTYPE_UNSIGNED16, 16, ATYPE_RO, acName1C13_02, 0x1A01, NULL},
|
||||
{0x03, DTYPE_UNSIGNED16, 16, ATYPE_RO, acName1C13_03, 0x1A02, NULL},
|
||||
{0x04, DTYPE_UNSIGNED16, 16, ATYPE_RO, acName1C13_04, 0x1A03, NULL},
|
||||
{0x05, DTYPE_UNSIGNED16, 16, ATYPE_RO, acName1C13_05, 0x1A04, NULL},
|
||||
{0x06, DTYPE_UNSIGNED16, 16, ATYPE_RO, acName1C13_06, 0x1A05, NULL},
|
||||
{0x07, DTYPE_UNSIGNED16, 16, ATYPE_RO, acName1C13_07, 0x1A06, NULL},
|
||||
{0x08, DTYPE_UNSIGNED16, 16, ATYPE_RO, acName1C13_08, 0x1A07, NULL},
|
||||
{0x09, DTYPE_UNSIGNED16, 16, ATYPE_RO, acName1C13_09, 0x1A08, NULL},
|
||||
{0x0a, DTYPE_UNSIGNED16, 16, ATYPE_RO, acName1C13_10, 0x1A09, NULL},
|
||||
{0x0b, DTYPE_UNSIGNED16, 16, ATYPE_RO, acName1C13_11, 0x1A0A, NULL},
|
||||
};
|
||||
const _objd SDO6000[] =
|
||||
{
|
||||
{0x0, DTYPE_REAL64, 64, ATYPE_RO | ATYPE_TXPDO, acName6000, 0, &Obj.EncPos},
|
||||
{0x0, DTYPE_REAL32, 32, ATYPE_RO | ATYPE_TXPDO, acName6000, 0x00000000, &Obj.EncPos},
|
||||
};
|
||||
const _objd SDO6001[] =
|
||||
{
|
||||
{0x0, DTYPE_REAL64, 64, ATYPE_RO | ATYPE_TXPDO, acName6001, 0, &Obj.EncFrequency},
|
||||
{0x0, DTYPE_REAL32, 32, ATYPE_RO | ATYPE_TXPDO, acName6001, 0x00000000, &Obj.EncFrequency},
|
||||
};
|
||||
const _objd SDO6002[] =
|
||||
{
|
||||
{0x0, DTYPE_UNSIGNED32, 32, ATYPE_RO | ATYPE_TXPDO, acName6002, 0, &Obj.DiffT},
|
||||
{0x0, DTYPE_UNSIGNED16, 16, ATYPE_RO | ATYPE_TXPDO, acName6002, 0, &Obj.DiffT},
|
||||
};
|
||||
const _objd SDO6003[] =
|
||||
{
|
||||
@@ -192,22 +262,47 @@ const _objd SDO6004[] =
|
||||
};
|
||||
const _objd SDO6005[] =
|
||||
{
|
||||
{0x00, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName6005_00, 1, NULL},
|
||||
{0x01, DTYPE_REAL64, 64, ATYPE_RO, acName6005_01, 0, &Obj.StepGenOut1.ActualPosition},
|
||||
{0x0, DTYPE_REAL32, 32, ATYPE_RO | ATYPE_TXPDO, acName6005, 0x00000000, &Obj.ActualPosition1},
|
||||
};
|
||||
const _objd SDO6006[] =
|
||||
{
|
||||
{0x0, DTYPE_REAL32, 32, ATYPE_RO | ATYPE_TXPDO, acName6006, 0x00000000, &Obj.ActualPosition2},
|
||||
};
|
||||
const _objd SDO6007[] =
|
||||
{
|
||||
{0x0, DTYPE_INTEGER16, 16, ATYPE_RO | ATYPE_TXPDO, acName6007, 0, &Obj.D1},
|
||||
};
|
||||
const _objd SDO6008[] =
|
||||
{
|
||||
{0x0, DTYPE_INTEGER16, 16, ATYPE_RO | ATYPE_TXPDO, acName6008, 0, &Obj.D2},
|
||||
};
|
||||
const _objd SDO6009[] =
|
||||
{
|
||||
{0x0, DTYPE_INTEGER16, 16, ATYPE_RO | ATYPE_TXPDO, acName6009, 0, &Obj.D3},
|
||||
};
|
||||
const _objd SDO600A[] =
|
||||
{
|
||||
{0x0, DTYPE_INTEGER16, 16, ATYPE_RO | ATYPE_TXPDO, acName600A, 0, &Obj.D4},
|
||||
};
|
||||
const _objd SDO7000[] =
|
||||
{
|
||||
{0x0, DTYPE_INTEGER32, 32, ATYPE_RO | ATYPE_RXPDO, acName7000, 0, &Obj.EncPosScale},
|
||||
{0x0, DTYPE_UNSIGNED32, 32, ATYPE_RO | ATYPE_RXPDO, acName7000, 0, &Obj.IndexLatchEnable},
|
||||
};
|
||||
const _objd SDO7001[] =
|
||||
{
|
||||
{0x0, DTYPE_UNSIGNED32, 32, ATYPE_RO | ATYPE_RXPDO, acName7001, 0, &Obj.IndexLatchEnable},
|
||||
{0x0, DTYPE_REAL32, 32, ATYPE_RO | ATYPE_RXPDO, acName7001, 0x00000000, &Obj.CommandedPosition1},
|
||||
};
|
||||
const _objd SDO7002[] =
|
||||
{
|
||||
{0x00, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName7002_00, 2, NULL},
|
||||
{0x01, DTYPE_REAL64, 64, ATYPE_RO, acName7002_01, 0, &Obj.StepGenIn1.CommandedPosition},
|
||||
{0x02, DTYPE_REAL64, 64, ATYPE_RO, acName7002_02, 0, &Obj.StepGenIn1.CommandedVelocity},
|
||||
{0x0, DTYPE_REAL32, 32, ATYPE_RO | ATYPE_RXPDO, acName7002, 0x00000000, &Obj.CommandedPosition2},
|
||||
};
|
||||
const _objd SDO7003[] =
|
||||
{
|
||||
{0x0, DTYPE_INTEGER16, 16, ATYPE_RO | ATYPE_RXPDO, acName7003, 0, &Obj.StepsPerMM1},
|
||||
};
|
||||
const _objd SDO7004[] =
|
||||
{
|
||||
{0x0, DTYPE_INTEGER16, 16, ATYPE_RO | ATYPE_RXPDO, acName7004, 0, &Obj.StepsPerMM2},
|
||||
};
|
||||
|
||||
const _objectlist SDOobjects[] =
|
||||
@@ -219,24 +314,38 @@ const _objectlist SDOobjects[] =
|
||||
{0x1018, OTYPE_RECORD, 4, 0, acName1018, SDO1018},
|
||||
{0x1600, OTYPE_RECORD, 1, 0, acName1600, SDO1600},
|
||||
{0x1601, OTYPE_RECORD, 1, 0, acName1601, SDO1601},
|
||||
{0x1602, OTYPE_RECORD, 2, 0, acName1602, SDO1602},
|
||||
{0x1602, OTYPE_RECORD, 1, 0, acName1602, SDO1602},
|
||||
{0x1603, OTYPE_RECORD, 1, 0, acName1603, SDO1603},
|
||||
{0x1604, OTYPE_RECORD, 1, 0, acName1604, SDO1604},
|
||||
{0x1A00, OTYPE_RECORD, 1, 0, acName1A00, SDO1A00},
|
||||
{0x1A01, OTYPE_RECORD, 1, 0, acName1A01, SDO1A01},
|
||||
{0x1A02, OTYPE_RECORD, 1, 0, acName1A02, SDO1A02},
|
||||
{0x1A03, OTYPE_RECORD, 1, 0, acName1A03, SDO1A03},
|
||||
{0x1A04, OTYPE_RECORD, 1, 0, acName1A04, SDO1A04},
|
||||
{0x1A05, OTYPE_RECORD, 1, 0, acName1A05, SDO1A05},
|
||||
{0x1A06, OTYPE_RECORD, 1, 0, acName1A06, SDO1A06},
|
||||
{0x1A07, OTYPE_RECORD, 1, 0, acName1A07, SDO1A07},
|
||||
{0x1A08, OTYPE_RECORD, 1, 0, acName1A08, SDO1A08},
|
||||
{0x1A09, OTYPE_RECORD, 1, 0, acName1A09, SDO1A09},
|
||||
{0x1A0A, OTYPE_RECORD, 1, 0, acName1A0A, SDO1A0A},
|
||||
{0x1C00, OTYPE_ARRAY, 4, 0, acName1C00, SDO1C00},
|
||||
{0x1C12, OTYPE_ARRAY, 3, 0, acName1C12, SDO1C12},
|
||||
{0x1C13, OTYPE_ARRAY, 6, 0, acName1C13, SDO1C13},
|
||||
{0x1C12, OTYPE_ARRAY, 5, 0, acName1C12, SDO1C12},
|
||||
{0x1C13, OTYPE_ARRAY, 11, 0, acName1C13, SDO1C13},
|
||||
{0x6000, OTYPE_VAR, 0, 0, acName6000, SDO6000},
|
||||
{0x6001, OTYPE_VAR, 0, 0, acName6001, SDO6001},
|
||||
{0x6002, OTYPE_VAR, 0, 0, acName6002, SDO6002},
|
||||
{0x6003, OTYPE_VAR, 0, 0, acName6003, SDO6003},
|
||||
{0x6004, OTYPE_VAR, 0, 0, acName6004, SDO6004},
|
||||
{0x6005, OTYPE_RECORD, 1, 0, acName6005, SDO6005},
|
||||
{0x6005, OTYPE_VAR, 0, 0, acName6005, SDO6005},
|
||||
{0x6006, OTYPE_VAR, 0, 0, acName6006, SDO6006},
|
||||
{0x6007, OTYPE_VAR, 0, 0, acName6007, SDO6007},
|
||||
{0x6008, OTYPE_VAR, 0, 0, acName6008, SDO6008},
|
||||
{0x6009, OTYPE_VAR, 0, 0, acName6009, SDO6009},
|
||||
{0x600A, OTYPE_VAR, 0, 0, acName600A, SDO600A},
|
||||
{0x7000, OTYPE_VAR, 0, 0, acName7000, SDO7000},
|
||||
{0x7001, OTYPE_VAR, 0, 0, acName7001, SDO7001},
|
||||
{0x7002, OTYPE_RECORD, 2, 0, acName7002, SDO7002},
|
||||
{0x7002, OTYPE_VAR, 0, 0, acName7002, SDO7002},
|
||||
{0x7003, OTYPE_VAR, 0, 0, acName7003, SDO7003},
|
||||
{0x7004, OTYPE_VAR, 0, 0, acName7004, SDO7004},
|
||||
{0xffff, 0xff, 0xff, 0xff, NULL, NULL}
|
||||
};
|
||||
|
||||
@@ -13,25 +13,25 @@ typedef struct
|
||||
|
||||
/* Inputs */
|
||||
|
||||
double EncPos;
|
||||
double EncFrequency;
|
||||
uint32_t DiffT;
|
||||
float EncPos;
|
||||
float EncFrequency;
|
||||
uint16_t DiffT;
|
||||
uint32_t IndexByte;
|
||||
uint32_t IndexStatus;
|
||||
struct
|
||||
{
|
||||
double ActualPosition;
|
||||
} StepGenOut1;
|
||||
float ActualPosition1;
|
||||
float ActualPosition2;
|
||||
int16_t D1;
|
||||
int16_t D2;
|
||||
int16_t D3;
|
||||
int16_t D4;
|
||||
|
||||
/* Outputs */
|
||||
|
||||
int32_t EncPosScale;
|
||||
uint32_t IndexLatchEnable;
|
||||
struct
|
||||
{
|
||||
double CommandedPosition;
|
||||
double CommandedVelocity;
|
||||
} StepGenIn1;
|
||||
float CommandedPosition1;
|
||||
float CommandedPosition2;
|
||||
int16_t StepsPerMM1;
|
||||
int16_t StepsPerMM2;
|
||||
|
||||
} _Objects;
|
||||
|
||||
|
||||
@@ -16,8 +16,9 @@ upload_protocol = stlink
|
||||
debug_tool = stlink
|
||||
debug_build_flags = -O0 -g -ggdb
|
||||
monitor_port = COM7
|
||||
monitor_filters = send_on_enter, time, colorize, log2file
|
||||
monitor_speed = 115200
|
||||
build_flags = -Wl,--no-warn-rwx-segment
|
||||
lib_deps =
|
||||
SPI
|
||||
rlogiacco/CircularBuffer@^1.3.3
|
||||
rlogiacco/CircularBuffer
|
||||
|
||||
99
Firmware/src/MyEncoder.cpp
Executable file
99
Firmware/src/MyEncoder.cpp
Executable file
@@ -0,0 +1,99 @@
|
||||
#include "MyENcoder.h"
|
||||
|
||||
MyEncoder::MyEncoder(TIM_TypeDef *_tim_base, uint8_t _indexPin, void irq(void))
|
||||
{
|
||||
tim_base = _tim_base;
|
||||
indexPin = _indexPin;
|
||||
attachInterrupt(digitalPinToInterrupt(indexPin), irq, RISING); // When Index triggered
|
||||
EncoderInit.SetCount(0);
|
||||
}
|
||||
|
||||
#define ONE_PERIOD 65536
|
||||
#define HALF_PERIOD 32768
|
||||
|
||||
int64_t MyEncoder::unwrapEncoder(uint16_t in)
|
||||
{
|
||||
int32_t c32 = (int32_t)in - HALF_PERIOD; // remove half period to determine (+/-) sign of the wrap
|
||||
int32_t dif = (c32 - previousEncoderCounterValue); // core concept: prev + (current - prev) = current
|
||||
|
||||
// wrap difference from -HALF_PERIOD to HALF_PERIOD. modulo prevents differences after the wrap from having an incorrect result
|
||||
int32_t mod_dif = ((dif + HALF_PERIOD) % ONE_PERIOD) - HALF_PERIOD;
|
||||
if (dif < -HALF_PERIOD)
|
||||
mod_dif += ONE_PERIOD; // account for mod of negative number behavior in C
|
||||
|
||||
int64_t unwrapped = previousEncoderCounterValue + mod_dif;
|
||||
previousEncoderCounterValue = unwrapped; // load previous value
|
||||
|
||||
return unwrapped + HALF_PERIOD; // remove the shift we applied at the beginning, and return
|
||||
}
|
||||
|
||||
void MyEncoder::indexPulse(void)
|
||||
{
|
||||
if (pleaseZeroTheCounter)
|
||||
{
|
||||
tim_base->CNT = 0;
|
||||
indexPulseFired = 1;
|
||||
Pos.clear();
|
||||
TDelta.clear();
|
||||
pleaseZeroTheCounter = 0;
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t MyEncoder::indexHappened()
|
||||
{
|
||||
if (indexPulseFired)
|
||||
{
|
||||
indexPulseFired = 0;
|
||||
previousEncoderCounterValue = 0;
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
double MyEncoder::currentPos()
|
||||
{
|
||||
curPos = unwrapEncoder(tim_base->CNT) * PosScaleRes;
|
||||
return curPos;
|
||||
}
|
||||
|
||||
double MyEncoder::frequency(uint64_t time)
|
||||
{
|
||||
|
||||
double diffT = 0;
|
||||
double diffPos = 0;
|
||||
double frequency;
|
||||
TDelta.push(time); // Running average over the length of the circular buffer
|
||||
Pos.push(curPos);
|
||||
if (Pos.size() == RINGBUFFERLEN)
|
||||
{
|
||||
diffT = 1.0e-6 * (TDelta.last() - TDelta.first()); // Time is in microseconds
|
||||
diffPos = fabs(Pos.last() - Pos.first());
|
||||
frequency = diffPos / diffT;
|
||||
oldFrequency = frequency;
|
||||
return frequency; // Revolutions per second
|
||||
}
|
||||
else
|
||||
return oldFrequency;
|
||||
}
|
||||
uint8_t MyEncoder::getIndexState()
|
||||
{
|
||||
return digitalRead(indexPin);
|
||||
}
|
||||
|
||||
void MyEncoder::setScale(double scale)
|
||||
{
|
||||
if (CurPosScale != scale && scale != 0)
|
||||
{
|
||||
CurPosScale = scale;
|
||||
PosScaleRes = 1.0 / double(scale);
|
||||
}
|
||||
}
|
||||
|
||||
void MyEncoder::setLatch(uint8_t latchEnable)
|
||||
{
|
||||
if (latchEnable && !oldLatchCEnable) // Should only happen first time IndexCEnable is set
|
||||
{
|
||||
pleaseZeroTheCounter = 1;
|
||||
}
|
||||
oldLatchCEnable = latchEnable;
|
||||
}
|
||||
148
Firmware/src/StepGen.cpp
Executable file
148
Firmware/src/StepGen.cpp
Executable file
@@ -0,0 +1,148 @@
|
||||
#include <Arduino.h>
|
||||
#include <stdio.h>
|
||||
#include "StepGen.h"
|
||||
|
||||
StepGen::StepGen(TIM_TypeDef *Timer, uint32_t _timerChannel, PinName _stepPin, uint8_t _dirPin, void irq(void))
|
||||
{
|
||||
timerIsRunning = 0;
|
||||
timerStepPosition = 0;
|
||||
timerStepDirection = 0;
|
||||
timerStepPositionAtEnd = 0;
|
||||
timerNewEndStepPosition = 0;
|
||||
actualPosition = 0;
|
||||
requestedPosition = 0;
|
||||
stepsPerMM = 0;
|
||||
enabled = 0;
|
||||
|
||||
dirPin = _dirPin;
|
||||
stepPin = _stepPin;
|
||||
timerChan = _timerChannel;
|
||||
MyTim = new HardwareTimer(Timer);
|
||||
MyTim->attachInterrupt(irq);
|
||||
pinMode(dirPin, OUTPUT);
|
||||
}
|
||||
void StepGen::reqPos(double_t pos)
|
||||
{
|
||||
requestedPosition = pos;
|
||||
}
|
||||
double StepGen::reqPos()
|
||||
{
|
||||
return requestedPosition;
|
||||
}
|
||||
void StepGen::actPos(double pos)
|
||||
{
|
||||
actualPosition = pos;
|
||||
}
|
||||
double StepGen::actPos()
|
||||
{
|
||||
return actualPosition;
|
||||
}
|
||||
|
||||
void StepGen::enable(uint8_t yes)
|
||||
{
|
||||
enabled = yes;
|
||||
}
|
||||
|
||||
void StepGen::handleStepper(void)
|
||||
{
|
||||
if (!enabled)
|
||||
return;
|
||||
pwmCycleTime = StepGen::sync0CycleTime;
|
||||
|
||||
actPos(timerStepPosition / double(stepsPerMM));
|
||||
double diffPosition = reqPos() - actPos();
|
||||
#if 1
|
||||
// Wild "tone" kludge. map() function
|
||||
#define SPEED_MIN 0.00005
|
||||
#define SPEED_MAX 0.0005
|
||||
#define FACT_LOW 1.0
|
||||
#define FACT_HIGH 20.0
|
||||
if (abs(diffPosition) < SPEED_MIN) // 60 mm/min = 0.001 mm/ms
|
||||
{
|
||||
pwmCycleTime = FACT_LOW * StepGen::sync0CycleTime;
|
||||
}
|
||||
else if (abs(diffPosition) > SPEED_MAX) // 60 mm/min = 0.001 mm/ms
|
||||
{
|
||||
pwmCycleTime = FACT_HIGH * StepGen::sync0CycleTime;
|
||||
}
|
||||
else
|
||||
{
|
||||
pwmCycleTime = (FACT_LOW + (FACT_HIGH - FACT_LOW) * (abs(diffPosition) - SPEED_MIN) / (SPEED_MAX - SPEED_MIN)) * StepGen::sync0CycleTime;
|
||||
}
|
||||
#endif
|
||||
uint64_t fre = (abs(diffPosition) * stepsPerMM * 1000000) / pwmCycleTime; // Frequency needed
|
||||
if (fre > maxFreq) // Only do maxFre
|
||||
{
|
||||
double maxDist = (maxFreq * pwmCycleTime) / (stepsPerMM * 1000000.0) * (diffPosition > 0 ? 1 : -1);
|
||||
reqPos(actPos() + maxDist);
|
||||
}
|
||||
int32_t pulsesAtEndOfCycle = stepsPerMM * reqPos();
|
||||
|
||||
// Will be picked up by the timer_CB and the timer is reloaded, if it runs.
|
||||
timerNewEndStepPosition = pulsesAtEndOfCycle;
|
||||
|
||||
if (!timerIsRunning) // Timer isn't running. Start it here
|
||||
{
|
||||
int32_t steps = pulsesAtEndOfCycle - timerStepPosition; // Pulses to go + or -
|
||||
if (steps != 0)
|
||||
{
|
||||
if (steps > 0)
|
||||
{
|
||||
digitalWrite(dirPin, HIGH);
|
||||
timerStepDirection = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
digitalWrite(dirPin, LOW);
|
||||
timerStepDirection = -1;
|
||||
}
|
||||
timerStepPositionAtEnd = pulsesAtEndOfCycle; // Current Position
|
||||
float_t freqf = abs(steps) / (pwmCycleTime*1.0e-6);
|
||||
uint32_t freq = uint32_t(freqf);
|
||||
MyTim->setMode(timerChan, TIMER_OUTPUT_COMPARE_PWM2, stepPin);
|
||||
MyTim->setOverflow(freq, HERTZ_FORMAT);
|
||||
MyTim->setCaptureCompare(timerChan, 50, PERCENT_COMPARE_FORMAT); // 50 %
|
||||
timerIsRunning = 1;
|
||||
MyTim->resume();
|
||||
}
|
||||
}
|
||||
}
|
||||
void StepGen::timerCB()
|
||||
{
|
||||
timerStepPosition += timerStepDirection; // The step that was just completed
|
||||
if (timerNewEndStepPosition != 0) // Are we going to reload?
|
||||
{
|
||||
// Input for reload is timerNewEndStepPosition
|
||||
// The timer has current position and from this
|
||||
// can set new frequency and new endtarget for steps
|
||||
MyTim->pause(); // We are not at stop, let's stop it. Note stepPin is floating
|
||||
int32_t steps = timerNewEndStepPosition - timerStepPosition;
|
||||
if (steps != 0)
|
||||
{
|
||||
uint8_t sgn = steps > 0 ? HIGH : LOW;
|
||||
digitalWrite(dirPin, sgn);
|
||||
float_t freqf = abs(steps) / float(pwmCycleTime*1.0e-6);
|
||||
uint32_t freq = uint32_t(freqf);
|
||||
timerStepDirection = steps > 0 ? 1 : -1;
|
||||
timerStepPositionAtEnd = timerNewEndStepPosition;
|
||||
timerNewEndStepPosition = 0; // Set to zero to not reload next time
|
||||
MyTim->setMode(timerChan, TIMER_OUTPUT_COMPARE_PWM2, stepPin);
|
||||
MyTim->setOverflow(freq, HERTZ_FORMAT);
|
||||
MyTim->setCaptureCompare(timerChan, 50, PERCENT_COMPARE_FORMAT); // 50 %
|
||||
MyTim->resume();
|
||||
timerIsRunning = 1;
|
||||
}
|
||||
}
|
||||
if (timerStepPosition == timerStepPositionAtEnd) // Are we finished?
|
||||
{
|
||||
timerIsRunning = 0;
|
||||
MyTim->pause();
|
||||
}
|
||||
}
|
||||
|
||||
void StepGen::setScale(int16_t spm)
|
||||
{
|
||||
stepsPerMM = spm;
|
||||
}
|
||||
|
||||
uint32_t StepGen::sync0CycleTime = 0;
|
||||
124
Firmware/src/StepGen2.cpp
Executable file
124
Firmware/src/StepGen2.cpp
Executable file
@@ -0,0 +1,124 @@
|
||||
#include <Arduino.h>
|
||||
#include <stdio.h>
|
||||
#include "StepGen2.h"
|
||||
#include "extend32to64.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
#include "esc.h"
|
||||
}
|
||||
extern extend32to64 longTime;
|
||||
|
||||
StepGen2::StepGen2(TIM_TypeDef *Timer, uint32_t _timerChannel, PinName _stepPin, uint8_t _dirPin, void irq(void), TIM_TypeDef *Timer2, void irq2(void))
|
||||
{
|
||||
actualPosition = 0;
|
||||
commandedPosition = 0;
|
||||
commandedStepPosition = 0;
|
||||
initialPosition = 0;
|
||||
initialStepPosition = 0;
|
||||
stepsPerMM = 0;
|
||||
enabled = 0;
|
||||
|
||||
dirPin = _dirPin;
|
||||
dirPinName = digitalPinToPinName(dirPin);
|
||||
stepPin = _stepPin;
|
||||
pulseTimerChan = _timerChannel;
|
||||
pulseTimer = new HardwareTimer(Timer);
|
||||
pulseTimer->attachInterrupt(pulseTimerChan, irq); // Capture/compare innterrupt
|
||||
pinMode(dirPin, OUTPUT);
|
||||
startTimer = new HardwareTimer(Timer2);
|
||||
startTimer->attachInterrupt(irq2);
|
||||
}
|
||||
|
||||
uint32_t StepGen2::handleStepper(uint64_t irqTime, uint16_t nLoops)
|
||||
{
|
||||
frequency = 0;
|
||||
nSteps = 0;
|
||||
dbg = 0;
|
||||
if (!enabled) // Just .... don't
|
||||
return updatePos(0);
|
||||
|
||||
commandedStepPosition = floor(commandedPosition * stepsPerMM); // Scale position to steps
|
||||
nSteps = commandedStepPosition - initialStepPosition;
|
||||
if (nSteps == 0) // No movement
|
||||
{
|
||||
return updatePos(1);
|
||||
}
|
||||
lcncCycleTime = nLoops * StepGen2::sync0CycleTime * 1.0e-9; // nLoops is there in case we missed an ethercat cycle. secs
|
||||
|
||||
if (abs(nSteps) < 0) // Some small number
|
||||
{ //
|
||||
frequency = (abs(nSteps) + 1) / lcncCycleTime; // Distribute steps inside available time
|
||||
Tpulses = abs(nSteps) / frequency; //
|
||||
Tstartf = (lcncCycleTime - Tpulses) / 2.0; //
|
||||
} //
|
||||
else // Regular step train, up or down
|
||||
{ //
|
||||
float kTRAJ = (commandedPosition - initialPosition) / lcncCycleTime; // Straight line equation. position = kTRAJ x time + mTRAJ
|
||||
float mTRAJ = initialPosition; // Operating on incoming positions (not steps)
|
||||
if (kTRAJ > 0) //
|
||||
Tstartf = (float(initialStepPosition + 1) / float(stepsPerMM) - mTRAJ) / kTRAJ; // Crossing upwards
|
||||
else //
|
||||
Tstartf = (float(initialStepPosition) / float(stepsPerMM) - mTRAJ) / kTRAJ; // Crossing downwards
|
||||
frequency = fabs(kTRAJ * stepsPerMM); //
|
||||
Tpulses = abs(nSteps) / frequency;
|
||||
}
|
||||
updatePos(5);
|
||||
|
||||
uint32_t timeSinceISR = (longTime.extendTime(micros()) - irqTime); // Diff time from ISR (usecs)
|
||||
dbg = timeSinceISR; //
|
||||
Tstartu = Tjitter + uint32_t(Tstartf * 1e6) - timeSinceISR; // Have already wasted some time since the irq.
|
||||
|
||||
if (nSteps == 0) // Can do this much earlier, but want some calculated data for debugging
|
||||
return updatePos(1);
|
||||
|
||||
timerFrequency = uint32_t(ceil(frequency));
|
||||
startTimer->setOverflow(Tstartu, MICROSEC_FORMAT); // All handled by irqs
|
||||
startTimer->refresh();
|
||||
startTimer->resume();
|
||||
return 1;
|
||||
}
|
||||
|
||||
void StepGen2::startTimerCB()
|
||||
{
|
||||
startTimer->pause(); // Once is enough.
|
||||
digitalWriteFast(dirPinName, nSteps < 0 ? HIGH : LOW); // nSteps negative => decrease, HIGH
|
||||
// There will be a short break here for t2 usecs, in the future.
|
||||
|
||||
timerEndPosition += nSteps;
|
||||
pulseTimer->setMode(pulseTimerChan, TIMER_OUTPUT_COMPARE_PWM2, stepPin);
|
||||
pulseTimer->setOverflow(timerFrequency, HERTZ_FORMAT);
|
||||
// pulseTimer->setCaptureCompare(pulseTimerChan, 50, PERCENT_COMPARE_FORMAT);
|
||||
pulseTimer->setCaptureCompare(pulseTimerChan, t3, MICROSEC_COMPARE_FORMAT);
|
||||
pulseTimer->refresh();
|
||||
pulseTimer->resume();
|
||||
}
|
||||
|
||||
void StepGen2::pulseTimerCB()
|
||||
{
|
||||
int16_t dir = digitalReadFast(dirPinName); //
|
||||
if (dir == HIGH) // The step just taken
|
||||
timerPosition--;
|
||||
else
|
||||
timerPosition++;
|
||||
int32_t diffPosition = timerEndPosition - timerPosition; // Same "polarity" as nSteps
|
||||
if (diffPosition == 0)
|
||||
pulseTimer->pause();
|
||||
else
|
||||
{
|
||||
if (diffPosition < 0 && dir == LOW) // Change direction. Should not end up here, but alas
|
||||
digitalWriteFast(dirPinName, HIGH); // Normal is to be HIGH when decreasing
|
||||
if (diffPosition > 0 && dir == HIGH) // Change direction. Should not end up here, but alas
|
||||
digitalWriteFast(dirPinName, LOW); // Normal is to be LOW when increasing
|
||||
// Normally nothing is needed
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t StepGen2::updatePos(uint32_t i)
|
||||
{ //
|
||||
initialPosition = commandedPosition; // Save the numeric position for next step
|
||||
initialStepPosition = commandedStepPosition; // also the step we are at}
|
||||
return i;
|
||||
}
|
||||
|
||||
uint32_t StepGen2::sync0CycleTime = 0;
|
||||
1195
Firmware/src/StepGen3.cpp
Executable file
1195
Firmware/src/StepGen3.cpp
Executable file
File diff suppressed because it is too large
Load Diff
@@ -5,45 +5,21 @@
|
||||
Created on: Nov 20, 2020
|
||||
Author: GoktugH.
|
||||
*/
|
||||
|
||||
// TIM2, TIM3, TIM4, TIM8
|
||||
Encoder::Encoder()
|
||||
{
|
||||
int unit;
|
||||
}
|
||||
|
||||
void Encoder::eattach(int enco)
|
||||
// void Encoder::SetCount(enum EncTimer enc, int64_t Counter)
|
||||
void Encoder::SetCount(int64_t Counter)
|
||||
{
|
||||
tim_base->CNT = Counter;
|
||||
}
|
||||
|
||||
void Encoder::attachh(int encoNumber)
|
||||
// uint16_t Encoder::GetCount(enum EncTimer enc)
|
||||
uint16_t Encoder::GetCount()
|
||||
{
|
||||
eattach(encoNumber);
|
||||
}
|
||||
|
||||
void Encoder::SetCount(enum EncTimer enc, int64_t Counter)
|
||||
{
|
||||
|
||||
if (enc == Tim2)
|
||||
TIM2->CNT = Counter;
|
||||
else if (enc == Tim3)
|
||||
TIM3->CNT = Counter;
|
||||
else if (enc == Tim4)
|
||||
TIM4->CNT = Counter;
|
||||
else if (enc == Tim8)
|
||||
TIM8->CNT = Counter;
|
||||
}
|
||||
uint16_t Encoder::GetCount(enum EncTimer enc)
|
||||
{
|
||||
|
||||
if (enc == Tim2)
|
||||
c = (TIM2->CNT);
|
||||
else if (enc == Tim3)
|
||||
c = (TIM3->CNT);
|
||||
else if (enc == Tim4)
|
||||
c = (TIM4->CNT);
|
||||
else if (enc == Tim8)
|
||||
c = (TIM8->CNT);
|
||||
return c;
|
||||
return tim_base->CNT;
|
||||
}
|
||||
|
||||
void GpioConfigPortA(GPIO_TypeDef *GPIOx)
|
||||
@@ -287,7 +263,7 @@ void GPIO_PinAF(GPIO_TypeDef *GPIOx, uint16_t GPIO_PinSource, uint8_t GPIO_AF)
|
||||
GPIOx->AFR[GPIO_PinSource >> 0x03] = temp_2;
|
||||
}
|
||||
|
||||
void rcc_config()
|
||||
void encoder_config()
|
||||
{
|
||||
RCC->AHB1ENR |= 0x1; // GPIOA
|
||||
RCC->AHB1ENR |= 0x4; // GPIOC
|
||||
@@ -295,27 +271,27 @@ void rcc_config()
|
||||
RCC->AHB1ENR |= 0x10; // GPIOE
|
||||
|
||||
RCC->APB1ENR |= 0x20000000; // ENABLE DAC
|
||||
RCC->APB2ENR |= 0x00000002; // APB2 TIM8
|
||||
// RCC->APB2ENR |= 0x00000002; // APB2 TIM8
|
||||
RCC->APB1ENR |= 0x00000004; // APB1 TIM4
|
||||
RCC->APB1ENR |= 0x00000001; // APB1 TIM2
|
||||
RCC->APB1ENR |= 0x00000002; // APB1 TIM3
|
||||
// RCC->APB1ENR |= 0x00000002; // APB1 TIM3
|
||||
|
||||
GpioConfigPortA(GPIOA);
|
||||
GpioConfigPortC(GPIOC);
|
||||
// GpioConfigPortC(GPIOC);
|
||||
GpioConfigPortD(GPIOD);
|
||||
|
||||
#if 0 // Skipping since TIM8 is step generator and TIM3, chan4 is smae as TIM8, chan4
|
||||
GPIO_PinAF(GPIOA, GPIO_PinSource6, GPIO_AF_TIM3);
|
||||
GPIO_PinAF(GPIOA, GPIO_PinSource7, GPIO_AF_TIM3);
|
||||
|
||||
|
||||
GPIO_PinAF(GPIOC, GPIO_PinSource6, GPIO_AF_TIM8);
|
||||
GPIO_PinAF(GPIOC, GPIO_PinSource7, GPIO_AF_TIM8);
|
||||
|
||||
#endif
|
||||
GPIO_PinAF(GPIOD, GPIO_PinSource12, GPIO_AF_TIM4);
|
||||
GPIO_PinAF(GPIOD, GPIO_PinSource13, GPIO_AF_TIM4);
|
||||
|
||||
GPIO_PinAF(GPIOA, GPIO_PinSource0, GPIO_AF_TIM2);
|
||||
GPIO_PinAF(GPIOA, GPIO_PinSource1, GPIO_AF_TIM2);
|
||||
|
||||
#if 0 // Skipping since I use TIM8 as stepper generator
|
||||
TIM_EncoderInterConfig(TIM8, TIM_EncoderMode_TI12, TIM_ICPolarity_Rising, TIM_ICPolarity_Falling);
|
||||
TIMER_InitStructure.TIM_Period = 65535;
|
||||
TIMER_InitStructure.TIM_CounterMode = TIM_CounterMode_Up | TIM_CounterMode_Down;
|
||||
@@ -323,7 +299,7 @@ void rcc_config()
|
||||
TIM_TimeBaseStructInit(&TIMER_InitStructure);
|
||||
TIM_Cmd(TIM8, ENABLE);
|
||||
TIM8->CNT = 0;
|
||||
|
||||
#endif
|
||||
TIM_EncoderInterConfig(TIM4, TIM_EncoderMode_TI12, TIM_ICPolarity_Rising, TIM_ICPolarity_Falling);
|
||||
TIMER_InitStructureE.TIM_Period = 65535;
|
||||
TIMER_InitStructureE.TIM_CounterMode = TIM_CounterMode_Up | TIM_CounterMode_Down;
|
||||
@@ -340,7 +316,7 @@ void rcc_config()
|
||||
TIM_Cmd(TIM2, ENABLE);
|
||||
|
||||
TIM2->CNT = 0;
|
||||
|
||||
#if 0
|
||||
TIM_EncoderInterConfig(TIM3, TIM_EncoderMode_TI12, TIM_ICPolarity_Rising, TIM_ICPolarity_Falling);
|
||||
TIMER_InitStructureEEG.TIM_Period = 65535;
|
||||
TIMER_InitStructureEEG.TIM_CounterMode = TIM_CounterMode_Up | TIM_CounterMode_Down;
|
||||
@@ -349,4 +325,67 @@ void rcc_config()
|
||||
TIM_Cmd(TIM3, ENABLE);
|
||||
|
||||
TIM3->CNT = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
void encoder2_config()
|
||||
{
|
||||
#if 0
|
||||
#include "mbed.h"
|
||||
#include "stm32f4xx.h"
|
||||
#include "stm32f4xx_hal_tim_ex.h"
|
||||
|
||||
TIM_HandleTypeDef timer;
|
||||
TIM_Encoder_InitTypeDef encoder;
|
||||
|
||||
// direction to PA_9 -- step pulse to PA_8
|
||||
|
||||
int main()
|
||||
{
|
||||
|
||||
GPIO_InitTypeDef GPIO_InitStruct;
|
||||
__TIM1_CLK_ENABLE();
|
||||
__GPIOA_CLK_ENABLE();
|
||||
GPIO_InitStruct.Pin = GPIO_PIN_8 | GPIO_PIN_9;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
||||
GPIO_InitStruct.Pull = GPIO_PULLDOWN;
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_HIGH;
|
||||
GPIO_InitStruct.Alternate = GPIO_AF1_TIM1;
|
||||
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||
|
||||
timer.Instance = TIM1;
|
||||
timer.Init.Period = 0xffff;
|
||||
timer.Init.Prescaler = 0;
|
||||
timer.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
|
||||
timer.Init.CounterMode = TIM_COUNTERMODE_UP;
|
||||
|
||||
encoder.EncoderMode = TIM_ENCODERMODE_TI12;
|
||||
encoder.IC1Filter = 0x0f;
|
||||
encoder.IC1Polarity = TIM_INPUTCHANNELPOLARITY_RISING;
|
||||
encoder.IC1Prescaler = TIM_ICPSC_DIV4;
|
||||
encoder.IC1Selection = TIM_ICSELECTION_DIRECTTI;
|
||||
|
||||
encoder.IC2Filter = 0x0f;
|
||||
encoder.IC2Polarity = TIM_INPUTCHANNELPOLARITY_FALLING;
|
||||
encoder.IC2Prescaler = TIM_ICPSC_DIV4;
|
||||
encoder.IC2Selection = TIM_ICSELECTION_DIRECTTI;
|
||||
|
||||
HAL_TIM_Encoder_Init(&timer, &encoder);
|
||||
HAL_TIM_Encoder_Start(&timer,TIM_CHANNEL_1);
|
||||
|
||||
|
||||
TIM1->EGR = 1; // Generate an update event
|
||||
TIM1->CR1 = 1; // Enable the counter
|
||||
|
||||
|
||||
while (1) {
|
||||
int16_t count1;
|
||||
count1=TIM1->CNT;
|
||||
|
||||
printf("%d\r\n", count1);
|
||||
wait(1.0);
|
||||
|
||||
};
|
||||
}
|
||||
#endif
|
||||
}
|
||||
18
Firmware/src/extend32to64.cpp
Executable file
18
Firmware/src/extend32to64.cpp
Executable file
@@ -0,0 +1,18 @@
|
||||
#include "extend32to64.h"
|
||||
|
||||
// Extend from 32-bit to 64-bit precision
|
||||
int64_t extend32to64::extendTime(uint32_t in)
|
||||
{
|
||||
int64_t c64 = (int64_t)in - HALF_PERIOD; // remove half period to determine (+/-) sign of the wrap
|
||||
int64_t dif = (c64 - previousTimeValue); // core concept: prev + (current - prev) = current
|
||||
|
||||
// wrap difference from -HALF_PERIOD to HALF_PERIOD. modulo prevents differences after the wrap from having an incorrect result
|
||||
int64_t mod_dif = ((dif + HALF_PERIOD) % ONE_PERIOD) - HALF_PERIOD;
|
||||
if (dif < int64_t(-HALF_PERIOD))
|
||||
mod_dif += ONE_PERIOD; // account for mod of negative number behavior in C
|
||||
|
||||
int64_t unwrapped = previousTimeValue + mod_dif;
|
||||
previousTimeValue = unwrapped; // load previous value
|
||||
|
||||
return unwrapped + HALF_PERIOD; // remove the shift we applied at the beginning, and return
|
||||
}
|
||||
@@ -1,102 +1,151 @@
|
||||
#include <Arduino.h>
|
||||
#include <HardwareTimer.h>
|
||||
|
||||
#include <stdio.h>
|
||||
extern "C"
|
||||
{
|
||||
#include "ecat_slv.h"
|
||||
#include "utypes.h"
|
||||
};
|
||||
#include <CircularBuffer.h>
|
||||
#define RINGBUFFERLEN 101
|
||||
CircularBuffer<double_t, RINGBUFFERLEN> Pos;
|
||||
CircularBuffer<uint32_t, RINGBUFFERLEN> TDelta;
|
||||
|
||||
#include <Stm32F4_Encoder.h>
|
||||
int64_t PreviousEncoderCounterValue = 0;
|
||||
int64_t unwrap_encoder(uint16_t in, int64_t *prev);
|
||||
Encoder EncoderInit;
|
||||
Encoder *encP = &EncoderInit;
|
||||
|
||||
#define INDEX_PIN PA2
|
||||
HardwareSerial Serial1(PA10, PA9);
|
||||
_Objects Obj;
|
||||
|
||||
void indexPulse(void);
|
||||
double PosScaleRes = 1.0;
|
||||
uint32_t CurPosScale = 1;
|
||||
uint8_t OldLatchCEnable = 0;
|
||||
volatile uint8_t indexPulseFired = 0;
|
||||
uint32_t nFires = 0;
|
||||
volatile uint8_t pleaseZeroTheCounter = 0;
|
||||
HardwareSerial Serial1(PA10, PA9);
|
||||
|
||||
#define STEPPER_DIR_PIN PA12
|
||||
#define STEPPER_STEP_PIN PA11
|
||||
HardwareTimer *MyTim;
|
||||
volatile uint32_t stepCount = 0, stepPulses = 0;
|
||||
volatile double_t actualPosition = 0;
|
||||
volatile double_t requestedPosition, requestedVelocity;
|
||||
volatile uint16_t ALEventIRQ; // ALEvent that caused the interrupt
|
||||
HardwareTimer *baseTimer; // The base period timer
|
||||
HardwareTimer *syncTimer; // The timer that syncs "with linuxcnc cycle"
|
||||
uint16_t sync0CycleTime; // usecs
|
||||
|
||||
uint32_t sync0CycleTime = 0;
|
||||
#include "MyEncoder.h"
|
||||
volatile uint16_t encCnt = 0;
|
||||
void indexPulseEncoderCB1(void);
|
||||
MyEncoder Encoder1(TIM2, PA2, indexPulseEncoderCB1);
|
||||
void indexPulseEncoderCB1(void)
|
||||
{
|
||||
encCnt++;
|
||||
Encoder1.indexPulse();
|
||||
}
|
||||
// #include <RunningAverage.h>
|
||||
// RunningAverage irqServeDelays(1000); // To get the max delay of the irq serve time over the last second
|
||||
CircularBuffer<uint16_t, 1000> irqServeDelays;
|
||||
|
||||
void handleStepper(void);
|
||||
void makePulses(uint32_t period /* in usecs */, int32_t pulses /* nr of pulses to do*/);
|
||||
#include "StepGen3.h"
|
||||
StepGen3 *Step = 0;
|
||||
|
||||
#include "extend32to64.h"
|
||||
|
||||
volatile uint64_t irqTime = 0, irqCnt = 0;
|
||||
extend32to64 longTime;
|
||||
|
||||
void setFrequencyAdjustedMicrosSeconds(HardwareTimer *timer, uint32_t usecs);
|
||||
|
||||
void cb_set_outputs(void) // Master outputs gets here, slave inputs, first operation
|
||||
{
|
||||
if (Obj.IndexLatchEnable && !OldLatchCEnable) // Should only happen first time IndexCEnable is set
|
||||
{
|
||||
pleaseZeroTheCounter = 1;
|
||||
}
|
||||
OldLatchCEnable = Obj.IndexLatchEnable;
|
||||
|
||||
if (CurPosScale != Obj.EncPosScale && Obj.EncPosScale != 0)
|
||||
{
|
||||
CurPosScale = Obj.EncPosScale;
|
||||
PosScaleRes = 1.0 / double(CurPosScale);
|
||||
}
|
||||
requestedPosition = Obj.StepGenIn1.CommandedPosition;
|
||||
requestedVelocity = Obj.StepGenIn1.CommandedVelocity;
|
||||
Encoder1.setLatch(Obj.IndexLatchEnable);
|
||||
Encoder1.setScale(2000);
|
||||
}
|
||||
|
||||
volatile uint16_t basePeriodCnt;
|
||||
volatile uint64_t makePulsesCnt = 0, prevMakePulsesCnt = 0;
|
||||
volatile uint16_t deltaMakePulsesCnt;
|
||||
|
||||
volatile double pos_cmd1, pos_cmd2;
|
||||
void syncWithLCNC()
|
||||
{
|
||||
syncTimer->pause();
|
||||
baseTimer->pause();
|
||||
deltaMakePulsesCnt = makePulsesCnt - prevMakePulsesCnt;
|
||||
prevMakePulsesCnt = makePulsesCnt;
|
||||
Step->updateStepGen(pos_cmd1, pos_cmd2); // Update positions
|
||||
Step->makeAllPulses(); // Make first step right here
|
||||
basePeriodCnt = SERVO_PERIOD / BASE_PERIOD; //
|
||||
baseTimer->refresh(); //
|
||||
baseTimer->resume(); // Make the other steps in ISR
|
||||
}
|
||||
|
||||
void basePeriodCB(void)
|
||||
{
|
||||
if (--basePeriodCnt > 0) // Stop
|
||||
Step->makeAllPulses();
|
||||
else
|
||||
baseTimer->pause();
|
||||
}
|
||||
|
||||
int32_t delayT;
|
||||
uint16_t thisCycleTime; // In usecs
|
||||
int16_t maxIrqServeTime = 0;
|
||||
uint64_t oldIrqTime = 0;
|
||||
uint16_t nLoops;
|
||||
|
||||
void handleStepper(void)
|
||||
{
|
||||
if (oldIrqTime != 0) // See if there is a delay in data, normally it *should* be nLoops=1, but sometimes it is more
|
||||
{
|
||||
thisCycleTime = irqTime - oldIrqTime;
|
||||
nLoops = round(float(thisCycleTime) / float(sync0CycleTime));
|
||||
}
|
||||
oldIrqTime = irqTime;
|
||||
|
||||
uint32_t diffT = longTime.extendTime(micros()) - irqTime; // Time from interrupt was received by isr
|
||||
irqServeDelays.push(diffT);
|
||||
if (irqServeDelays.isFull()) // Do max calcs, just waiting a second
|
||||
{
|
||||
uint16_t maxInBuffer = 0;
|
||||
using index_t = decltype(irqServeDelays)::index_t;
|
||||
for (index_t i = 0; i < irqServeDelays.size(); i++)
|
||||
{
|
||||
if (maxInBuffer < irqServeDelays[i])
|
||||
maxInBuffer = irqServeDelays[i];
|
||||
}
|
||||
if (maxIrqServeTime > maxInBuffer) // Reduce by one, slowly eating up excess time
|
||||
maxIrqServeTime--;
|
||||
if (maxIrqServeTime < maxInBuffer)
|
||||
maxIrqServeTime = maxInBuffer;
|
||||
}
|
||||
|
||||
pos_cmd1 = Obj.CommandedPosition1;
|
||||
pos_cmd2 = Obj.CommandedPosition2;
|
||||
|
||||
Obj.ActualPosition1 = Obj.CommandedPosition1;
|
||||
Obj.ActualPosition2 = Obj.CommandedPosition2;
|
||||
|
||||
Step->stepgen_array[0].pos_scale = -Obj.StepsPerMM1;
|
||||
Step->stepgen_array[1].pos_scale = -Obj.StepsPerMM2;
|
||||
|
||||
// Obj.ActualPosition1 = Step->stepgen_array[0].pos_fb;
|
||||
// Obj.ActualPosition2 = Step->stepgen_array[1].pos_fb;
|
||||
|
||||
delayT = maxIrqServeTime - diffT; // Add 10 as some safety margin
|
||||
if (delayT > 0 && delayT < 900)
|
||||
{
|
||||
syncTimer->setOverflow(delayT, MICROSEC_FORMAT); // Work in flawed units, its ok
|
||||
syncTimer->refresh();
|
||||
syncTimer->resume();
|
||||
}
|
||||
else
|
||||
{
|
||||
syncWithLCNC();
|
||||
}
|
||||
}
|
||||
|
||||
float_t oldCommandedPosition = 0;
|
||||
void cb_get_inputs(void) // Set Master inputs, slave outputs, last operation
|
||||
{
|
||||
Obj.IndexStatus = 0;
|
||||
if (indexPulseFired)
|
||||
{
|
||||
Obj.IndexStatus = 1;
|
||||
indexPulseFired = 0;
|
||||
nFires++;
|
||||
PreviousEncoderCounterValue = 0;
|
||||
}
|
||||
// Obj.DiffT = sync0CycleTime;
|
||||
Obj.IndexStatus = Encoder1.indexHappened();
|
||||
Obj.EncPos = Encoder1.currentPos();
|
||||
Obj.EncFrequency = Encoder1.frequency(longTime.extendTime(micros()));
|
||||
Obj.IndexByte = Encoder1.getIndexState();
|
||||
|
||||
int64_t pos = unwrap_encoder(TIM2->CNT, &PreviousEncoderCounterValue);
|
||||
double CurPos = pos * PosScaleRes;
|
||||
Obj.EncPos = CurPos;
|
||||
|
||||
double diffT = 0;
|
||||
double diffPos = 0;
|
||||
TDelta.push(ESCvar.Time); // Running average over the length of the circular buffer
|
||||
Pos.push(CurPos);
|
||||
if (Pos.size() >= 2)
|
||||
{
|
||||
diffT = 1.0e-9 * (TDelta.last() - TDelta.first()); // Time is in nanoseconds
|
||||
diffPos = fabs(Pos.last() - Pos.first());
|
||||
}
|
||||
Obj.EncFrequency = diffT != 0 ? diffPos / diffT : 0.0; // Revolutions per second
|
||||
|
||||
Obj.IndexByte = digitalRead(INDEX_PIN);
|
||||
if (Obj.IndexByte)
|
||||
Serial1.printf("IS 1\n");
|
||||
|
||||
Obj.StepGenOut1.ActualPosition = actualPosition;
|
||||
Obj.DiffT = 10000 * requestedPosition; // deltaT;
|
||||
Obj.DiffT = nLoops;
|
||||
Obj.D1 = 1000 * Obj.CommandedPosition2; // abs(1000 * (ap2 - Obj.CommandedPosition2)); // Step2.actPos();
|
||||
Obj.D2 = 1000 * Obj.ActualPosition2; // Step->stepgen_array[1].pos_fb; // Step->stepgen_array[1].rawcount % INT16_MAX; // Step->stepgen_array[1].freq;
|
||||
Obj.D3 = encCnt % 256; // Step->stepgen_array[1].freq;
|
||||
Obj.D4 = 1000 * (Obj.CommandedPosition2 - oldCommandedPosition); // deltaMakePulsesCnt; // Step->stepgen_array[1].rawcount % UINT16_MAX;
|
||||
oldCommandedPosition = Obj.CommandedPosition2;
|
||||
}
|
||||
|
||||
void ESC_interrupt_enable(uint32_t mask);
|
||||
void ESC_interrupt_disable(uint32_t mask);
|
||||
uint16_t dc_checker(void);
|
||||
void sync0Handler(void);
|
||||
|
||||
static esc_cfg_t config =
|
||||
{
|
||||
@@ -106,7 +155,7 @@ static esc_cfg_t config =
|
||||
.set_defaults_hook = NULL,
|
||||
.pre_state_change_hook = NULL,
|
||||
.post_state_change_hook = NULL,
|
||||
.application_hook = handleStepper, // StepGen,
|
||||
.application_hook = handleStepper,
|
||||
.safeoutput_override = NULL,
|
||||
.pre_object_download_hook = NULL,
|
||||
.post_object_download_hook = NULL,
|
||||
@@ -118,115 +167,72 @@ static esc_cfg_t config =
|
||||
.esc_check_dc_handler = dc_checker,
|
||||
};
|
||||
|
||||
void TimerStep_CB(void)
|
||||
{
|
||||
stepCount++;
|
||||
if (stepCount == stepPulses)
|
||||
{
|
||||
MyTim->pause();
|
||||
}
|
||||
}
|
||||
void measureCrystalFrequency(void);
|
||||
|
||||
void makePulses(uint32_t period /* in usecs */, int32_t pulses /* nr of pulses to do*/)
|
||||
{
|
||||
byte sgn = pulses > 0 ? HIGH : LOW;
|
||||
digitalWrite(STEPPER_DIR_PIN, sgn); // I think one should really wait a bit when changed
|
||||
uint32_t puls = abs(pulses);
|
||||
MyTim->setOverflow(abs(pulses) * 1000000 / period, HERTZ_FORMAT);
|
||||
MyTim->setCaptureCompare(4, 50, PERCENT_COMPARE_FORMAT); // 50 %
|
||||
stepCount = 0;
|
||||
stepPulses = abs(pulses);
|
||||
MyTim->resume();
|
||||
}
|
||||
volatile byte serveIRQ = 0;
|
||||
|
||||
void sync0Handler(void);
|
||||
void setup(void)
|
||||
{
|
||||
Serial1.begin(115200);
|
||||
rcc_config();
|
||||
|
||||
TIM_TypeDef *Instance = TIM1;
|
||||
MyTim = new HardwareTimer(Instance);
|
||||
MyTim->setMode(4, TIMER_OUTPUT_COMPARE_PWM2, STEPPER_STEP_PIN);
|
||||
MyTim->attachInterrupt(TimerStep_CB);
|
||||
pinMode(STEPPER_DIR_PIN, OUTPUT);
|
||||
|
||||
// Set starting count value
|
||||
EncoderInit.SetCount(Tim2, 0);
|
||||
attachInterrupt(digitalPinToInterrupt(INDEX_PIN), indexPulse, RISING); // Always when Index triggered
|
||||
// EncoderInit.SetCount(Tim3, 0);
|
||||
// EncoderInit.SetCount(Tim4, 0);
|
||||
// EncoderInit.SetCount(Tim8, 0);
|
||||
#if 0
|
||||
measureCrystalFrequency(); // Calibrate crystal frequency
|
||||
#endif
|
||||
Step = new StepGen3;
|
||||
|
||||
encoder_config(); // Needed by encoder, probably breaks some timers.
|
||||
ecat_slv_init(&config);
|
||||
|
||||
pinMode(PA11, OUTPUT); // Step X
|
||||
pinMode(PA12, OUTPUT); // Dir X
|
||||
pinMode(PC9, OUTPUT); // Step Z
|
||||
pinMode(PC10, OUTPUT); // Dir Z
|
||||
|
||||
baseTimer = new HardwareTimer(TIM11); // The base period timer
|
||||
setFrequencyAdjustedMicrosSeconds(baseTimer, BASE_PERIOD / 1000);
|
||||
// baseTimer->setOverflow(BASE_PERIOD / 1000, MICROSEC_FORMAT); // Or the line above, This one is uncalibrated
|
||||
baseTimer->attachInterrupt(basePeriodCB);
|
||||
|
||||
syncTimer = new HardwareTimer(TIM3); // The Linuxcnc servo period sync timer
|
||||
syncTimer->attachInterrupt(syncWithLCNC);
|
||||
}
|
||||
volatile byte serveIRQ = 0;
|
||||
|
||||
void loop(void)
|
||||
{
|
||||
ESCvar.PrevTime = ESCvar.Time;
|
||||
uint64_t dTime;
|
||||
if (serveIRQ)
|
||||
{
|
||||
DIG_process(DIG_PROCESS_WD_FLAG | DIG_PROCESS_OUTPUTS_FLAG |
|
||||
DIG_PROCESS_APP_HOOK_FLAG | DIG_PROCESS_INPUTS_FLAG);
|
||||
DIG_process(ALEventIRQ, DIG_PROCESS_WD_FLAG | DIG_PROCESS_OUTPUTS_FLAG |
|
||||
DIG_PROCESS_APP_HOOK_FLAG | DIG_PROCESS_INPUTS_FLAG);
|
||||
serveIRQ = 0;
|
||||
ESCvar.PrevTime = ESCvar.Time;
|
||||
ecat_slv_poll();
|
||||
}
|
||||
ecat_slv_poll();
|
||||
}
|
||||
|
||||
#define ONE_PERIOD 65536
|
||||
#define HALF_PERIOD 32768
|
||||
|
||||
int64_t unwrap_encoder(uint16_t in, int64_t *prev)
|
||||
{
|
||||
int64_t c64 = (int32_t)in - HALF_PERIOD; // remove half period to determine (+/-) sign of the wrap
|
||||
int64_t dif = (c64 - *prev); // core concept: prev + (current - prev) = current
|
||||
|
||||
// wrap difference from -HALF_PERIOD to HALF_PERIOD. modulo prevents differences after the wrap from having an incorrect result
|
||||
int64_t mod_dif = ((dif + HALF_PERIOD) % ONE_PERIOD) - HALF_PERIOD;
|
||||
if (dif < -HALF_PERIOD)
|
||||
mod_dif += ONE_PERIOD; // account for mod of negative number behavior in C
|
||||
|
||||
int64_t unwrapped = *prev + mod_dif;
|
||||
*prev = unwrapped; // load previous value
|
||||
|
||||
return unwrapped + HALF_PERIOD; // remove the shift we applied at the beginning, and return
|
||||
}
|
||||
|
||||
void indexPulse(void)
|
||||
{
|
||||
if (pleaseZeroTheCounter)
|
||||
{
|
||||
TIM2->CNT = 0;
|
||||
indexPulseFired = 1;
|
||||
Pos.clear();
|
||||
TDelta.clear();
|
||||
pleaseZeroTheCounter = 0;
|
||||
}
|
||||
dTime = longTime.extendTime(micros()) - irqTime;
|
||||
if (dTime > 5000) // Don't run ecat_slv_poll when expecting to serve interrupt
|
||||
ecat_slv_poll();
|
||||
}
|
||||
|
||||
void sync0Handler(void)
|
||||
{
|
||||
serveIRQ = 1;
|
||||
ALEventIRQ = ESC_ALeventread();
|
||||
// if (ALEventIRQ & ESCREG_ALEVENT_SM2)
|
||||
{
|
||||
irqTime = longTime.extendTime(micros());
|
||||
serveIRQ = 1;
|
||||
}
|
||||
irqCnt++; // debug output
|
||||
}
|
||||
|
||||
void handleStepper(void)
|
||||
{
|
||||
byte forwardDirection = 0; // 1 if going forward
|
||||
int32_t pulsesToGo = 100 * (requestedPosition - actualPosition);
|
||||
if (pulsesToGo != 0)
|
||||
makePulses(900, pulsesToGo); // Make the pulses using hardware timer
|
||||
|
||||
actualPosition = requestedPosition;
|
||||
}
|
||||
// Enable SM2 interrupts
|
||||
void ESC_interrupt_enable(uint32_t mask)
|
||||
{
|
||||
// Enable interrupt for SYNC0 or SM2 or SM3
|
||||
uint32_t user_int_mask = ESCREG_ALEVENT_DC_SYNC0 |
|
||||
ESCREG_ALEVENT_SM2 |
|
||||
ESCREG_ALEVENT_SM3;
|
||||
// uint32_t user_int_mask = ESCREG_ALEVENT_DC_SYNC0 | ESCREG_ALEVENT_SM2 | ESCREG_ALEVENT_SM3;
|
||||
uint32_t user_int_mask = ESCREG_ALEVENT_SM2; // Only SM2
|
||||
if (mask & user_int_mask)
|
||||
{
|
||||
ESC_ALeventmaskwrite(ESC_ALeventmaskread() | (mask & user_int_mask));
|
||||
ESC_ALeventmaskwrite(ESC_ALeventmaskread() & ~(ESCREG_ALEVENT_DC_SYNC0 | ESCREG_ALEVENT_SM3));
|
||||
attachInterrupt(digitalPinToInterrupt(PC3), sync0Handler, RISING);
|
||||
|
||||
// Set LAN9252 interrupt pin driver as push-pull active high
|
||||
@@ -239,12 +245,12 @@ void ESC_interrupt_enable(uint32_t mask)
|
||||
}
|
||||
}
|
||||
|
||||
// Disable SM2 interrupts
|
||||
void ESC_interrupt_disable(uint32_t mask)
|
||||
{
|
||||
// Enable interrupt for SYNC0 or SM2 or SM3
|
||||
uint32_t user_int_mask = ESCREG_ALEVENT_DC_SYNC0 |
|
||||
ESCREG_ALEVENT_SM2 |
|
||||
ESCREG_ALEVENT_SM3;
|
||||
// uint32_t user_int_mask = ESCREG_ALEVENT_DC_SYNC0 | ESCREG_ALEVENT_SM2 | ESCREG_ALEVENT_SM3;
|
||||
uint32_t user_int_mask = ESCREG_ALEVENT_SM2;
|
||||
|
||||
if (mask & user_int_mask)
|
||||
{
|
||||
@@ -258,11 +264,69 @@ void ESC_interrupt_disable(uint32_t mask)
|
||||
}
|
||||
|
||||
extern "C" uint32_t ESC_SYNC0cycletime(void);
|
||||
|
||||
// Setup of DC
|
||||
uint16_t dc_checker(void)
|
||||
{
|
||||
// Indicate we run DC
|
||||
ESCvar.dcsync = 0;
|
||||
sync0CycleTime = ESC_SYNC0cycletime();
|
||||
ESCvar.dcsync = 1;
|
||||
sync0CycleTime = ESC_SYNC0cycletime() / 1000; // usecs
|
||||
return 0;
|
||||
}
|
||||
|
||||
//
|
||||
// Code to calibrate the crystal.
|
||||
//
|
||||
|
||||
#include <HardwareTimer.h>
|
||||
HardwareTimer *timer;
|
||||
volatile uint32_t cnt;
|
||||
|
||||
void CB(void)
|
||||
{
|
||||
if (cnt-- == 0)
|
||||
{
|
||||
timer->pause();
|
||||
}
|
||||
}
|
||||
|
||||
void setFrequencyAdjustedMicrosSeconds(HardwareTimer *timer, uint32_t usecs)
|
||||
{
|
||||
const uint16_t calibrated1000 = 1042; // <- This is the factor to adjust to make 1 sec = 1 sec
|
||||
uint32_t period_cyc = (usecs * (timer->getTimerClkFreq() / 1000)) / calibrated1000; // Avoid overflow during math
|
||||
uint32_t Prescalerfactor = (period_cyc / 0x10000) + 1;
|
||||
uint32_t PeriodTicks = period_cyc / Prescalerfactor;
|
||||
timer->setPrescaleFactor(Prescalerfactor);
|
||||
timer->setOverflow(PeriodTicks, TICK_FORMAT);
|
||||
// Serial1.printf("Period_cyc=%u Prescalefactor =%u ticks = %u\n", period_cyc, Prescalerfactor, PeriodTicks);
|
||||
}
|
||||
|
||||
void measureCrystalFrequency(void)
|
||||
{
|
||||
timer = new HardwareTimer(TIM1);
|
||||
Serial1.begin(115200);
|
||||
delay(3000);
|
||||
Serial1.printf("Clock freq = %u\n", timer->getTimerClkFreq());
|
||||
setFrequencyAdjustedMicrosSeconds(timer, 1000);
|
||||
timer->refresh();
|
||||
timer->attachInterrupt(CB);
|
||||
cnt = 10000;
|
||||
|
||||
Serial1.printf("\n");
|
||||
uint32_t startT = micros();
|
||||
timer->resume();
|
||||
|
||||
while (cnt != 0)
|
||||
;
|
||||
|
||||
uint32_t endT = micros();
|
||||
uint32_t diffT = endT - startT;
|
||||
Serial1.printf("\n");
|
||||
Serial1.printf("diff = %u\n", diffT);
|
||||
|
||||
Serial1.printf("\n");
|
||||
delay(10000);
|
||||
Serial1.printf("\n");
|
||||
|
||||
exit(0);
|
||||
}
|
||||
|
||||
11
Kicad/Ax58100-stm32-ethercat/.gitignore
vendored
11
Kicad/Ax58100-stm32-ethercat/.gitignore
vendored
@@ -1,3 +1,14 @@
|
||||
AX58100-stm32-ethercat-backups
|
||||
.~lock*
|
||||
fp-info-cache
|
||||
\#auto_saved_file*
|
||||
gerbers/
|
||||
Ax58100-stm32-ethercat-backups/
|
||||
freerouting.*
|
||||
*.dsn
|
||||
*.frb
|
||||
*.rules
|
||||
*.ses
|
||||
|
||||
Ax58100-stm32-ethercat.csv
|
||||
Ax58100-stm32-ethercat.ods
|
||||
|
||||
@@ -4,6 +4,10 @@
|
||||
|
||||
(paper "A4")
|
||||
|
||||
(title_block
|
||||
(title "MetalMusings EaserCAT 3000")
|
||||
)
|
||||
|
||||
(lib_symbols
|
||||
(symbol "Device:C" (pin_numbers hide) (pin_names (offset 0.254)) (in_bom yes) (on_board yes)
|
||||
(property "Reference" "C" (at 0.635 2.54 0)
|
||||
@@ -883,6 +887,9 @@
|
||||
(junction (at 153.67 76.2) (diameter 0) (color 0 0 0 0)
|
||||
(uuid 1d94dd01-6dce-414e-82ad-3ac082fe20b1)
|
||||
)
|
||||
(junction (at 37.465 106.68) (diameter 0) (color 0 0 0 0)
|
||||
(uuid 1f401ea1-91c2-4b1c-8946-0cebb61cc079)
|
||||
)
|
||||
(junction (at 241.3 125.73) (diameter 0) (color 0 0 0 0)
|
||||
(uuid 24742ea1-03d5-4527-95f5-a7eea04d187b)
|
||||
)
|
||||
@@ -1077,10 +1084,6 @@
|
||||
(stroke (width 0) (type default))
|
||||
(uuid 329bb402-dfdb-48ca-96e4-cd8113da5fed)
|
||||
)
|
||||
(wire (pts (xy 44.45 106.68) (xy 59.69 106.68))
|
||||
(stroke (width 0) (type default))
|
||||
(uuid 34f3e2b5-6955-4782-bb5a-a609e45555c8)
|
||||
)
|
||||
(wire (pts (xy 44.45 66.04) (xy 59.69 66.04))
|
||||
(stroke (width 0) (type default))
|
||||
(uuid 3ec5c533-9953-4224-b74b-0735dd26a008)
|
||||
@@ -1105,7 +1108,7 @@
|
||||
(stroke (width 0) (type default))
|
||||
(uuid 47db0b49-0009-4a05-8b96-6b8f84d107d5)
|
||||
)
|
||||
(wire (pts (xy 44.45 101.6) (xy 59.69 101.6))
|
||||
(wire (pts (xy 52.07 101.6) (xy 59.69 101.6))
|
||||
(stroke (width 0) (type default))
|
||||
(uuid 4d357d9e-d279-48fb-988a-f7a606aaaceb)
|
||||
)
|
||||
@@ -1269,7 +1272,7 @@
|
||||
(stroke (width 0) (type default))
|
||||
(uuid 9585e42b-254e-4035-872d-73149242942a)
|
||||
)
|
||||
(wire (pts (xy 44.45 104.14) (xy 59.69 104.14))
|
||||
(wire (pts (xy 52.07 104.14) (xy 59.69 104.14))
|
||||
(stroke (width 0) (type default))
|
||||
(uuid 980d2c40-5368-442a-bca9-5b05633779dc)
|
||||
)
|
||||
@@ -1297,6 +1300,10 @@
|
||||
(stroke (width 0) (type default))
|
||||
(uuid a8f7bd69-6ca5-40d2-94f6-95e3f5e577ec)
|
||||
)
|
||||
(wire (pts (xy 33.02 106.68) (xy 37.465 106.68))
|
||||
(stroke (width 0) (type default))
|
||||
(uuid ab06e9f6-751e-4e57-8ad8-4e32f30960c6)
|
||||
)
|
||||
(wire (pts (xy 128.27 81.28) (xy 121.92 81.28))
|
||||
(stroke (width 0) (type default))
|
||||
(uuid ac3cbfb3-166c-465f-abf3-8aa52050d758)
|
||||
@@ -1329,6 +1336,10 @@
|
||||
(stroke (width 0) (type default))
|
||||
(uuid bc9e0b10-af0b-4c3d-ac1d-d925f4391c1b)
|
||||
)
|
||||
(wire (pts (xy 37.465 106.68) (xy 59.69 106.68))
|
||||
(stroke (width 0) (type default))
|
||||
(uuid bcc30d1c-f679-4fb9-93ef-8f4572d2ba2f)
|
||||
)
|
||||
(wire (pts (xy 53.34 86.36) (xy 59.69 86.36))
|
||||
(stroke (width 0) (type default))
|
||||
(uuid be5e8aa3-0c6a-4679-a6c3-2d7b538935e0)
|
||||
@@ -1541,10 +1552,10 @@
|
||||
(effects (font (size 1.27 1.27)) (justify left) hide)
|
||||
)
|
||||
)
|
||||
(global_label "SPI_MOSI" (shape input) (at 44.45 101.6 180) (fields_autoplaced)
|
||||
(global_label "SPI_MOSI" (shape input) (at 52.07 101.6 180) (fields_autoplaced)
|
||||
(effects (font (size 1.27 1.27)) (justify right))
|
||||
(uuid 5584513c-826f-4b8d-805f-97d18e92e5c9)
|
||||
(property "Intersheetrefs" "${INTERSHEET_REFS}" (at 32.8167 101.6 0)
|
||||
(property "Intersheetrefs" "${INTERSHEET_REFS}" (at 40.4367 101.6 0)
|
||||
(effects (font (size 1.27 1.27)) (justify right) hide)
|
||||
)
|
||||
)
|
||||
@@ -1569,10 +1580,10 @@
|
||||
(effects (font (size 1.27 1.27)) (justify left) hide)
|
||||
)
|
||||
)
|
||||
(global_label "SCS_FUNC" (shape input) (at 44.45 106.68 180) (fields_autoplaced)
|
||||
(global_label "SCS_FUNC" (shape input) (at 33.02 106.68 180) (fields_autoplaced)
|
||||
(effects (font (size 1.27 1.27)) (justify right))
|
||||
(uuid 7e0714f5-2bf0-4368-8a15-1f7b363302fe)
|
||||
(property "Intersheetrefs" "${INTERSHEET_REFS}" (at 31.7886 106.68 0)
|
||||
(property "Intersheetrefs" "${INTERSHEET_REFS}" (at 20.3586 106.68 0)
|
||||
(effects (font (size 1.27 1.27)) (justify right) hide)
|
||||
)
|
||||
)
|
||||
@@ -1583,10 +1594,10 @@
|
||||
(effects (font (size 1.27 1.27)) (justify right) hide)
|
||||
)
|
||||
)
|
||||
(global_label "SPI_CS" (shape input) (at 44.45 104.14 180) (fields_autoplaced)
|
||||
(global_label "SPI_CS" (shape input) (at 52.07 104.14 180) (fields_autoplaced)
|
||||
(effects (font (size 1.27 1.27)) (justify right))
|
||||
(uuid 88863808-4577-46ee-a6dc-85331fa7a41f)
|
||||
(property "Intersheetrefs" "${INTERSHEET_REFS}" (at 34.9334 104.14 0)
|
||||
(property "Intersheetrefs" "${INTERSHEET_REFS}" (at 42.5534 104.14 0)
|
||||
(effects (font (size 1.27 1.27)) (justify right) hide)
|
||||
)
|
||||
)
|
||||
@@ -1777,7 +1788,7 @@
|
||||
(symbol (lib_id "Device:C") (at 87.63 165.1 0) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid 103155a9-e700-4183-b756-a6fc8ca57bcd)
|
||||
(property "Reference" "C17" (at 87.63 162.56 0)
|
||||
(property "Reference" "C47" (at 87.63 162.56 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left))
|
||||
)
|
||||
(property "Value" "0.1uF" (at 87.63 167.64 0)
|
||||
@@ -1794,7 +1805,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/9f485422-734f-43d3-94ea-443cbc453d2e"
|
||||
(reference "C17") (unit 1)
|
||||
(reference "C47") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1803,7 +1814,7 @@
|
||||
(symbol (lib_id "Device:Crystal_GND24") (at 227.33 34.29 0) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid 115ef340-5699-4045-a27b-e4216819b835)
|
||||
(property "Reference" "Y1" (at 227.33 34.29 0)
|
||||
(property "Reference" "Y2" (at 227.33 34.29 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "NXK25.000AE12F-KAB6-12" (at 228.6 27.94 0)
|
||||
@@ -1822,7 +1833,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/9f485422-734f-43d3-94ea-443cbc453d2e"
|
||||
(reference "Y1") (unit 1)
|
||||
(reference "Y2") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1831,7 +1842,7 @@
|
||||
(symbol (lib_id "Device:C") (at 237.49 39.37 0) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no) (fields_autoplaced)
|
||||
(uuid 11d5ea8f-3a28-42fa-b01d-beb1a86a57de)
|
||||
(property "Reference" "C12" (at 240.411 38.1579 0)
|
||||
(property "Reference" "C51" (at 240.411 38.1579 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left))
|
||||
)
|
||||
(property "Value" "18pF" (at 240.411 40.5821 0)
|
||||
@@ -1848,7 +1859,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/9f485422-734f-43d3-94ea-443cbc453d2e"
|
||||
(reference "C12") (unit 1)
|
||||
(reference "C51") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1885,7 +1896,7 @@
|
||||
(symbol (lib_id "HakansLibrary:AX58100") (at 139.7 134.62 0) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid 151decbc-1b66-4082-88a8-6da1bb3d9015)
|
||||
(property "Reference" "U2" (at 91.44 83.82 0)
|
||||
(property "Reference" "U10" (at 91.44 83.82 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "AX58100" (at 139.7 134.62 0)
|
||||
@@ -1981,7 +1992,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/9f485422-734f-43d3-94ea-443cbc453d2e"
|
||||
(reference "U2") (unit 1)
|
||||
(reference "U10") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2015,6 +2026,38 @@
|
||||
)
|
||||
)
|
||||
|
||||
(symbol (lib_id "Device:R") (at 37.465 102.87 0) (mirror x) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid 19d42dc4-fd87-4164-bac8-0603985804da)
|
||||
(property "Reference" "R46" (at 37.465 102.87 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "4k7" (at 34.925 102.87 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Footprint" "Resistor_SMD:R_0603_1608Metric" (at 35.687 102.87 90)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(property "Datasheet" "~" (at 37.465 102.87 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(pin "1" (uuid 421d68b0-205a-407e-a601-90c4e8fac9f1))
|
||||
(pin "2" (uuid 3fb62006-6df3-4595-8d3f-4992742be454))
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/d564400f-40ba-4aca-9c2a-14ec52a8353b"
|
||||
(reference "R46") (unit 1)
|
||||
)
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/0a376a6c-0f15-42f8-81f6-3a55619be267"
|
||||
(reference "R2") (unit 1)
|
||||
)
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/9f485422-734f-43d3-94ea-443cbc453d2e"
|
||||
(reference "R42") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(symbol (lib_id "power:GND") (at 147.32 168.91 0) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no) (fields_autoplaced)
|
||||
(uuid 21e7ff22-3038-45da-a38c-8a0064bd7007)
|
||||
@@ -2121,7 +2164,7 @@
|
||||
(symbol (lib_id "Device:C") (at 132.08 165.1 0) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid 28999b48-7a3f-4a2d-8295-808981bd0f46)
|
||||
(property "Reference" "C30" (at 132.08 162.56 0)
|
||||
(property "Reference" "C24" (at 132.08 162.56 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left))
|
||||
)
|
||||
(property "Value" "0.1uF" (at 132.08 167.64 0)
|
||||
@@ -2138,7 +2181,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/9f485422-734f-43d3-94ea-443cbc453d2e"
|
||||
(reference "C30") (unit 1)
|
||||
(reference "C24") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2175,7 +2218,7 @@
|
||||
(symbol (lib_id "Device:R") (at 80.01 127 180) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid 32075a8b-69da-4a9b-bc51-4abd88b43499)
|
||||
(property "Reference" "R30" (at 80.01 127 90)
|
||||
(property "Reference" "R43" (at 80.01 127 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "22" (at 78.74 124.46 90)
|
||||
@@ -2192,7 +2235,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/9f485422-734f-43d3-94ea-443cbc453d2e"
|
||||
(reference "R30") (unit 1)
|
||||
(reference "R43") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2332,7 +2375,7 @@
|
||||
(symbol (lib_id "Device:R") (at 52.07 60.96 90) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid 45a449d5-9134-41f8-aaba-983731aca91e)
|
||||
(property "Reference" "R40" (at 52.07 60.96 90)
|
||||
(property "Reference" "R47" (at 52.07 60.96 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "22" (at 54.61 59.69 90)
|
||||
@@ -2349,7 +2392,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/9f485422-734f-43d3-94ea-443cbc453d2e"
|
||||
(reference "R40") (unit 1)
|
||||
(reference "R47") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2358,7 +2401,7 @@
|
||||
(symbol (lib_id "Device:C") (at 154.94 165.1 0) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid 4693cf1a-5c81-4dfd-8a56-8dd30b07179a)
|
||||
(property "Reference" "C16" (at 154.94 162.56 0)
|
||||
(property "Reference" "C48" (at 154.94 162.56 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left))
|
||||
)
|
||||
(property "Value" "0.1uF" (at 154.94 167.64 0)
|
||||
@@ -2375,7 +2418,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/9f485422-734f-43d3-94ea-443cbc453d2e"
|
||||
(reference "C16") (unit 1)
|
||||
(reference "C48") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2465,10 +2508,10 @@
|
||||
(symbol (lib_id "Device:R") (at 236.22 78.74 180) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid 57d23afb-3e89-43f3-b8ac-d446fddb5c78)
|
||||
(property "Reference" "R24" (at 236.22 78.74 90)
|
||||
(property "Reference" "R67" (at 236.22 78.74 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "4.7k" (at 234.95 76.2 90)
|
||||
(property "Value" "4k7" (at 234.95 76.2 90)
|
||||
(effects (font (size 1.27 1.27)) (justify right))
|
||||
)
|
||||
(property "Footprint" "Resistor_SMD:R_0805_2012Metric" (at 237.998 78.74 90)
|
||||
@@ -2482,7 +2525,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/9f485422-734f-43d3-94ea-443cbc453d2e"
|
||||
(reference "R24") (unit 1)
|
||||
(reference "R67") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2513,6 +2556,31 @@
|
||||
)
|
||||
)
|
||||
|
||||
(symbol (lib_id "power:+3.3V") (at 37.465 99.06 0) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid 5e12ee82-fcda-4974-89c8-6d39855dd9a7)
|
||||
(property "Reference" "#PWR0122" (at 37.465 102.87 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(property "Value" "+3.3V" (at 37.465 92.71 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Footprint" "" (at 37.465 99.06 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(property "Datasheet" "" (at 37.465 99.06 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(pin "1" (uuid fd5e815d-25e7-463e-abf0-345676136502))
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/9f485422-734f-43d3-94ea-443cbc453d2e"
|
||||
(reference "#PWR0122") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(symbol (lib_id "power:GND") (at 80.01 168.91 0) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no) (fields_autoplaced)
|
||||
(uuid 5eab1301-c652-4034-b7ac-a7c7e2e2d177)
|
||||
@@ -2572,10 +2640,10 @@
|
||||
(symbol (lib_id "Device:R") (at 142.24 73.66 90) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid 64094713-7d76-4b8b-9bf9-b7f64f75c920)
|
||||
(property "Reference" "R21" (at 142.24 73.66 90)
|
||||
(property "Reference" "R69" (at 142.24 73.66 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "4.7k" (at 144.78 72.39 90)
|
||||
(property "Value" "4k7" (at 144.78 72.39 90)
|
||||
(effects (font (size 1.27 1.27)) (justify right))
|
||||
)
|
||||
(property "Footprint" "Resistor_SMD:R_0805_2012Metric" (at 142.24 75.438 90)
|
||||
@@ -2589,7 +2657,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/9f485422-734f-43d3-94ea-443cbc453d2e"
|
||||
(reference "R21") (unit 1)
|
||||
(reference "R69") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2598,10 +2666,10 @@
|
||||
(symbol (lib_id "Device:R") (at 142.24 91.44 90) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid 6624d943-f8e6-4441-982c-3de575b1dc6e)
|
||||
(property "Reference" "R26" (at 142.24 91.44 90)
|
||||
(property "Reference" "R65" (at 142.24 91.44 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "4.7k" (at 144.78 90.17 90)
|
||||
(property "Value" "4k7" (at 144.78 90.17 90)
|
||||
(effects (font (size 1.27 1.27)) (justify right))
|
||||
)
|
||||
(property "Footprint" "Resistor_SMD:R_0805_2012Metric" (at 142.24 93.218 90)
|
||||
@@ -2615,7 +2683,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/9f485422-734f-43d3-94ea-443cbc453d2e"
|
||||
(reference "R26") (unit 1)
|
||||
(reference "R65") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2624,7 +2692,7 @@
|
||||
(symbol (lib_id "Device:C") (at 35.56 165.1 0) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid 67ac6176-2471-48a9-ab9f-52beec89a1b4)
|
||||
(property "Reference" "C31" (at 35.56 162.56 0)
|
||||
(property "Reference" "C23" (at 35.56 162.56 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left))
|
||||
)
|
||||
(property "Value" "0.1uF" (at 35.56 167.64 0)
|
||||
@@ -2641,7 +2709,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/9f485422-734f-43d3-94ea-443cbc453d2e"
|
||||
(reference "C31") (unit 1)
|
||||
(reference "C23") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2650,10 +2718,10 @@
|
||||
(symbol (lib_id "Device:R") (at 236.22 133.35 0) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid 687437c4-7aa9-4046-9f4a-5ed469d0a577)
|
||||
(property "Reference" "R39" (at 236.22 133.35 90)
|
||||
(property "Reference" "R45" (at 236.22 133.35 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "4.7k" (at 234.95 128.27 90)
|
||||
(property "Value" "4k7" (at 234.95 128.27 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Footprint" "Resistor_SMD:R_0805_2012Metric" (at 234.442 133.35 90)
|
||||
@@ -2667,7 +2735,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/9f485422-734f-43d3-94ea-443cbc453d2e"
|
||||
(reference "R39") (unit 1)
|
||||
(reference "R45") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2676,10 +2744,10 @@
|
||||
(symbol (lib_id "Device:R") (at 236.22 154.94 0) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid 69038310-08d8-4fd8-baf2-714dff3fe0fa)
|
||||
(property "Reference" "R37" (at 236.22 154.94 90)
|
||||
(property "Reference" "R41" (at 236.22 154.94 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "4.7k" (at 234.95 149.86 90)
|
||||
(property "Value" "4k7" (at 234.95 149.86 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Footprint" "Resistor_SMD:R_0805_2012Metric" (at 234.442 154.94 90)
|
||||
@@ -2693,7 +2761,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/9f485422-734f-43d3-94ea-443cbc453d2e"
|
||||
(reference "R37") (unit 1)
|
||||
(reference "R41") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2918,7 +2986,7 @@
|
||||
(symbol (lib_id "Device:C") (at 147.32 165.1 0) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid 7c830bcb-695d-41b3-8002-7f2c5e88ee96)
|
||||
(property "Reference" "C24" (at 147.32 162.56 0)
|
||||
(property "Reference" "C21" (at 147.32 162.56 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left))
|
||||
)
|
||||
(property "Value" "0.1uF" (at 147.32 167.64 0)
|
||||
@@ -2935,7 +3003,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/9f485422-734f-43d3-94ea-443cbc453d2e"
|
||||
(reference "C24") (unit 1)
|
||||
(reference "C21") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2944,7 +3012,7 @@
|
||||
(symbol (lib_id "Device:C") (at 80.01 165.1 0) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid 80b396e6-1879-4eac-b0a4-6cc056dcdbd4)
|
||||
(property "Reference" "C15" (at 80.01 162.56 0)
|
||||
(property "Reference" "C49" (at 80.01 162.56 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left))
|
||||
)
|
||||
(property "Value" "0.1uF" (at 80.01 167.64 0)
|
||||
@@ -2961,7 +3029,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/9f485422-734f-43d3-94ea-443cbc453d2e"
|
||||
(reference "C15") (unit 1)
|
||||
(reference "C49") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2998,7 +3066,7 @@
|
||||
(symbol (lib_id "Memory_EEPROM:AT24CS32-SSHM") (at 223.52 143.51 0) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid 8408a666-ef40-4b48-8c8c-2ec840ed8567)
|
||||
(property "Reference" "U3" (at 215.9 137.16 0)
|
||||
(property "Reference" "U8" (at 215.9 137.16 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left))
|
||||
)
|
||||
(property "Value" "24LC32A" (at 215.9 152.4 0)
|
||||
@@ -3021,7 +3089,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/9f485422-734f-43d3-94ea-443cbc453d2e"
|
||||
(reference "U3") (unit 1)
|
||||
(reference "U8") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3080,7 +3148,7 @@
|
||||
(symbol (lib_id "Device:C") (at 217.17 39.37 0) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no) (fields_autoplaced)
|
||||
(uuid 8c1a0b38-bcc5-4658-8a69-f4a9c64b4a45)
|
||||
(property "Reference" "C11" (at 220.091 38.1579 0)
|
||||
(property "Reference" "C52" (at 220.091 38.1579 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left))
|
||||
)
|
||||
(property "Value" "18pF" (at 220.091 40.5821 0)
|
||||
@@ -3097,7 +3165,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/9f485422-734f-43d3-94ea-443cbc453d2e"
|
||||
(reference "C11") (unit 1)
|
||||
(reference "C52") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3156,7 +3224,7 @@
|
||||
(symbol (lib_id "Device:R") (at 142.24 76.2 90) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid 95dffa01-7efa-4524-83d7-dd663891f3a6)
|
||||
(property "Reference" "R25" (at 142.24 76.2 90)
|
||||
(property "Reference" "R66" (at 142.24 76.2 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "12k 1%" (at 144.78 74.93 90)
|
||||
@@ -3173,7 +3241,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/9f485422-734f-43d3-94ea-443cbc453d2e"
|
||||
(reference "R25") (unit 1)
|
||||
(reference "R66") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3207,7 +3275,7 @@
|
||||
(symbol (lib_id "Device:C") (at 251.46 125.73 270) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid a3b06323-b5c8-4051-b0b4-69c7a4fc48db)
|
||||
(property "Reference" "C33" (at 255.27 127 90)
|
||||
(property "Reference" "C22" (at 255.27 127 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "0.1uF" (at 255.27 124.46 90)
|
||||
@@ -3224,7 +3292,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/9f485422-734f-43d3-94ea-443cbc453d2e"
|
||||
(reference "C33") (unit 1)
|
||||
(reference "C22") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3233,7 +3301,7 @@
|
||||
(symbol (lib_id "Device:C") (at 139.7 165.1 0) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid ad6de67e-4fd5-4374-8c26-533464ecb640)
|
||||
(property "Reference" "C28" (at 139.7 162.56 0)
|
||||
(property "Reference" "C16" (at 139.7 162.56 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left))
|
||||
)
|
||||
(property "Value" "0.1uF" (at 139.7 167.64 0)
|
||||
@@ -3250,7 +3318,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/9f485422-734f-43d3-94ea-443cbc453d2e"
|
||||
(reference "C28") (unit 1)
|
||||
(reference "C16") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3259,7 +3327,7 @@
|
||||
(symbol (lib_id "Device:C") (at 72.39 165.1 0) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid afc04acb-541e-4783-aa5d-3ce559901854)
|
||||
(property "Reference" "C14" (at 72.39 162.56 0)
|
||||
(property "Reference" "C50" (at 72.39 162.56 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left))
|
||||
)
|
||||
(property "Value" "0.1uF" (at 72.39 167.64 0)
|
||||
@@ -3276,7 +3344,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/9f485422-734f-43d3-94ea-443cbc453d2e"
|
||||
(reference "C14") (unit 1)
|
||||
(reference "C50") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3310,7 +3378,7 @@
|
||||
(symbol (lib_id "Device:R") (at 69.85 36.83 180) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid b162f748-c4c9-4222-9aec-552919872ce9)
|
||||
(property "Reference" "R31" (at 69.85 36.83 90)
|
||||
(property "Reference" "R58" (at 69.85 36.83 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "22" (at 68.58 34.29 90)
|
||||
@@ -3327,7 +3395,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/9f485422-734f-43d3-94ea-443cbc453d2e"
|
||||
(reference "R31") (unit 1)
|
||||
(reference "R58") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3392,7 +3460,7 @@
|
||||
(symbol (lib_id "Device:C") (at 236.22 96.52 0) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no) (fields_autoplaced)
|
||||
(uuid c01f9f04-3e14-4fe2-bfff-c83b3128fbfe)
|
||||
(property "Reference" "C13" (at 239.141 95.3079 0)
|
||||
(property "Reference" "C45" (at 239.141 95.3079 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left))
|
||||
)
|
||||
(property "Value" "1uF" (at 239.141 97.7321 0)
|
||||
@@ -3409,7 +3477,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/9f485422-734f-43d3-94ea-443cbc453d2e"
|
||||
(reference "C13") (unit 1)
|
||||
(reference "C45") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3418,7 +3486,7 @@
|
||||
(symbol (lib_id "Device:C") (at 27.94 165.1 0) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid c46518db-79b6-4045-8dfc-08fea70463ae)
|
||||
(property "Reference" "C23" (at 27.94 162.56 0)
|
||||
(property "Reference" "C40" (at 27.94 162.56 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left))
|
||||
)
|
||||
(property "Value" "0.1uF" (at 27.94 167.64 0)
|
||||
@@ -3435,7 +3503,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/9f485422-734f-43d3-94ea-443cbc453d2e"
|
||||
(reference "C23") (unit 1)
|
||||
(reference "C40") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3519,7 +3587,7 @@
|
||||
(symbol (lib_id "Device:C") (at 95.25 165.1 0) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid ca3b83df-34a4-4261-8b7d-4450fdcf7ea0)
|
||||
(property "Reference" "C18" (at 95.25 162.56 0)
|
||||
(property "Reference" "C46" (at 95.25 162.56 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left))
|
||||
)
|
||||
(property "Value" "0.1uF" (at 95.25 167.64 0)
|
||||
@@ -3536,7 +3604,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/9f485422-734f-43d3-94ea-443cbc453d2e"
|
||||
(reference "C18") (unit 1)
|
||||
(reference "C46") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3573,7 +3641,7 @@
|
||||
(symbol (lib_id "Device:C") (at 43.18 165.1 0) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid cd4007e2-5a66-41a7-ba64-1fe909a22a11)
|
||||
(property "Reference" "C29" (at 43.18 162.56 0)
|
||||
(property "Reference" "C25" (at 43.18 162.56 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left))
|
||||
)
|
||||
(property "Value" "0.1uF" (at 43.18 167.64 0)
|
||||
@@ -3590,7 +3658,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/9f485422-734f-43d3-94ea-443cbc453d2e"
|
||||
(reference "C29") (unit 1)
|
||||
(reference "C25") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3624,10 +3692,10 @@
|
||||
(symbol (lib_id "Device:R") (at 241.3 133.35 0) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid dbb53c1f-a3e9-40f7-9c26-4cfbc7e7faea)
|
||||
(property "Reference" "R38" (at 241.3 133.35 90)
|
||||
(property "Reference" "R44" (at 241.3 133.35 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "4.7k" (at 240.03 128.27 90)
|
||||
(property "Value" "4k7" (at 240.03 128.27 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Footprint" "Resistor_SMD:R_0805_2012Metric" (at 239.522 133.35 90)
|
||||
@@ -3641,7 +3709,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/9f485422-734f-43d3-94ea-443cbc453d2e"
|
||||
(reference "R38") (unit 1)
|
||||
(reference "R44") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3731,10 +3799,10 @@
|
||||
(symbol (lib_id "Device:R") (at 223.52 99.06 180) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid e42bfe7f-7ca3-4fd5-a029-2fee492bb34b)
|
||||
(property "Reference" "R23" (at 223.52 99.06 90)
|
||||
(property "Reference" "R68" (at 223.52 99.06 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "4.7k" (at 222.25 96.52 90)
|
||||
(property "Value" "4k7" (at 222.25 96.52 90)
|
||||
(effects (font (size 1.27 1.27)) (justify right))
|
||||
)
|
||||
(property "Footprint" "Resistor_SMD:R_0805_2012Metric" (at 225.298 99.06 90)
|
||||
@@ -3748,7 +3816,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/9f485422-734f-43d3-94ea-443cbc453d2e"
|
||||
(reference "R23") (unit 1)
|
||||
(reference "R68") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3808,7 +3876,7 @@
|
||||
(symbol (lib_id "Device:C") (at 50.8 165.1 0) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid f2ad262e-6efc-4ec5-abc3-f362fad8d615)
|
||||
(property "Reference" "C26" (at 50.8 162.56 0)
|
||||
(property "Reference" "C20" (at 50.8 162.56 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left))
|
||||
)
|
||||
(property "Value" "0.1uF" (at 50.8 167.64 0)
|
||||
@@ -3825,7 +3893,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/9f485422-734f-43d3-94ea-443cbc453d2e"
|
||||
(reference "C26") (unit 1)
|
||||
(reference "C20") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3890,7 +3958,7 @@
|
||||
(symbol (lib_id "Device:C") (at 124.46 165.1 0) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid feb0a5ed-4720-49ab-b7b2-db871d6fd2ee)
|
||||
(property "Reference" "C25" (at 124.46 162.56 0)
|
||||
(property "Reference" "C39" (at 124.46 162.56 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left))
|
||||
)
|
||||
(property "Value" "0.1uF" (at 124.46 167.64 0)
|
||||
@@ -3907,7 +3975,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/9f485422-734f-43d3-94ea-443cbc453d2e"
|
||||
(reference "C25") (unit 1)
|
||||
(reference "C39") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -4,6 +4,10 @@
|
||||
|
||||
(paper "A4")
|
||||
|
||||
(title_block
|
||||
(title "MetalMusings EaserCAT 3000")
|
||||
)
|
||||
|
||||
(lib_symbols
|
||||
(symbol "Device:C" (pin_numbers hide) (pin_names (offset 0.254)) (in_bom yes) (on_board yes)
|
||||
(property "Reference" "C" (at 0.635 2.54 0)
|
||||
@@ -2937,7 +2941,7 @@
|
||||
(symbol (lib_id "Device:R") (at 245.11 88.9 270) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid 0156fcd2-2fd8-4277-bfea-a43d1b5d2609)
|
||||
(property "Reference" "R43" (at 245.11 88.9 90)
|
||||
(property "Reference" "R63" (at 245.11 88.9 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "510" (at 250.19 87.63 90)
|
||||
@@ -2954,7 +2958,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/5bf93325-f5d9-4344-9bf3-f5fc91bc1622"
|
||||
(reference "R43") (unit 1)
|
||||
(reference "R63") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2963,7 +2967,7 @@
|
||||
(symbol (lib_id "Device:FerriteBead_Small") (at 137.16 162.56 90) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid 044bfca2-fe85-424e-89e6-85976fdf3676)
|
||||
(property "Reference" "B4" (at 137.16 160.02 90)
|
||||
(property "Reference" "B6" (at 137.16 160.02 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "BLM18EG221SN1D" (at 137.16 165.1 90)
|
||||
@@ -2980,7 +2984,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/5bf93325-f5d9-4344-9bf3-f5fc91bc1622"
|
||||
(reference "B4") (unit 1)
|
||||
(reference "B6") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3017,10 +3021,10 @@
|
||||
(symbol (lib_id "Device:R") (at 222.25 127 270) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid 137b958d-6c66-4243-b922-13e0d4e0ff22)
|
||||
(property "Reference" "R19" (at 222.25 127 90)
|
||||
(property "Reference" "R71" (at 222.25 127 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "4.7k" (at 227.33 125.73 90)
|
||||
(property "Value" "4k7" (at 227.33 125.73 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Footprint" "Resistor_SMD:R_0805_2012Metric" (at 222.25 125.222 90)
|
||||
@@ -3034,7 +3038,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/5bf93325-f5d9-4344-9bf3-f5fc91bc1622"
|
||||
(reference "R19") (unit 1)
|
||||
(reference "R71") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3068,7 +3072,7 @@
|
||||
(symbol (lib_id "Device:FerriteBead_Small") (at 99.06 154.94 90) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid 18c39117-9175-49a5-804f-919c3f463e74)
|
||||
(property "Reference" "B7" (at 99.06 152.4 90)
|
||||
(property "Reference" "B1" (at 99.06 152.4 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "BLM18EG221SN1D" (at 99.06 157.48 90)
|
||||
@@ -3085,7 +3089,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/5bf93325-f5d9-4344-9bf3-f5fc91bc1622"
|
||||
(reference "B7") (unit 1)
|
||||
(reference "B1") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3094,7 +3098,7 @@
|
||||
(symbol (lib_id "Device:R") (at 46.99 36.83 180) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid 1c4db209-5e6a-4cbe-b133-c6f6909b09dd)
|
||||
(property "Reference" "R11" (at 46.99 36.83 90)
|
||||
(property "Reference" "R55" (at 46.99 36.83 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "49.9" (at 45.72 31.75 90)
|
||||
@@ -3111,7 +3115,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/5bf93325-f5d9-4344-9bf3-f5fc91bc1622"
|
||||
(reference "R11") (unit 1)
|
||||
(reference "R55") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3126,7 +3130,7 @@
|
||||
(property "Value" "Green led" (at 209.55 119.38 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Footprint" "LED_SMD:LED_0805_2012Metric" (at 209.55 123.19 0)
|
||||
(property "Footprint" "LED_SMD:LED_0603_1608Metric" (at 209.55 123.19 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(property "Datasheet" "~" (at 209.55 123.19 0)
|
||||
@@ -3140,7 +3144,7 @@
|
||||
(reference "D?") (unit 1)
|
||||
)
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/5bf93325-f5d9-4344-9bf3-f5fc91bc1622"
|
||||
(reference "D1") (unit 1)
|
||||
(reference "D21") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3174,7 +3178,7 @@
|
||||
(symbol (lib_id "Device:C") (at 58.42 128.27 180) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid 252ccc0b-afe2-4cfa-9240-bbd4119b8767)
|
||||
(property "Reference" "C9" (at 59.69 132.08 90)
|
||||
(property "Reference" "C29" (at 59.69 132.08 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "10pF" (at 59.69 124.46 90)
|
||||
@@ -3191,7 +3195,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/5bf93325-f5d9-4344-9bf3-f5fc91bc1622"
|
||||
(reference "C9") (unit 1)
|
||||
(reference "C29") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3228,7 +3232,7 @@
|
||||
(symbol (lib_id "Device:C") (at 63.5 128.27 180) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid 33b95d1b-4180-477e-93fe-daa04b8a21ee)
|
||||
(property "Reference" "C10" (at 64.77 132.08 90)
|
||||
(property "Reference" "C28" (at 64.77 132.08 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "0.1uF" (at 64.77 124.46 90)
|
||||
@@ -3245,7 +3249,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/5bf93325-f5d9-4344-9bf3-f5fc91bc1622"
|
||||
(reference "C10") (unit 1)
|
||||
(reference "C28") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3282,7 +3286,7 @@
|
||||
(symbol (lib_id "Device:R") (at 52.07 36.83 180) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid 395e4cb0-42d4-43ec-b523-c62753046557)
|
||||
(property "Reference" "R12" (at 52.07 36.83 90)
|
||||
(property "Reference" "R54" (at 52.07 36.83 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "49.9" (at 50.8 31.75 90)
|
||||
@@ -3299,7 +3303,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/5bf93325-f5d9-4344-9bf3-f5fc91bc1622"
|
||||
(reference "R12") (unit 1)
|
||||
(reference "R54") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3364,7 +3368,7 @@
|
||||
(symbol (lib_id "Device:R") (at 135.89 59.69 0) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid 43243964-0602-4452-b782-e18672992d26)
|
||||
(property "Reference" "R4" (at 135.89 59.69 90)
|
||||
(property "Reference" "R62" (at 135.89 59.69 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "510" (at 134.62 54.61 90)
|
||||
@@ -3381,7 +3385,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/5bf93325-f5d9-4344-9bf3-f5fc91bc1622"
|
||||
(reference "R4") (unit 1)
|
||||
(reference "R62") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3456,7 +3460,7 @@
|
||||
(symbol (lib_id "Device:R") (at 245.11 49.53 270) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid 52f49fd2-f073-4f65-b85d-4076ede1e08b)
|
||||
(property "Reference" "R35" (at 245.11 49.53 90)
|
||||
(property "Reference" "R57" (at 245.11 49.53 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "510" (at 251.46 48.26 90)
|
||||
@@ -3473,7 +3477,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/5bf93325-f5d9-4344-9bf3-f5fc91bc1622"
|
||||
(reference "R35") (unit 1)
|
||||
(reference "R57") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3482,7 +3486,7 @@
|
||||
(symbol (lib_id "Device:FerriteBead_Small") (at 99.06 162.56 90) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid 5a256e67-effb-487d-986d-5a4e91cc6e7b)
|
||||
(property "Reference" "B6" (at 99.06 160.02 90)
|
||||
(property "Reference" "B4" (at 99.06 160.02 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "BLM18EG221SN1D" (at 99.06 165.1 90)
|
||||
@@ -3499,7 +3503,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/5bf93325-f5d9-4344-9bf3-f5fc91bc1622"
|
||||
(reference "B6") (unit 1)
|
||||
(reference "B4") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3508,7 +3512,7 @@
|
||||
(symbol (lib_id "Device:R") (at 48.26 96.52 180) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid 5b51c0db-89fb-4b33-acf6-55877b663ddb)
|
||||
(property "Reference" "R15" (at 48.26 96.52 90)
|
||||
(property "Reference" "R51" (at 48.26 96.52 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "49.9" (at 46.99 91.44 90)
|
||||
@@ -3525,7 +3529,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/5bf93325-f5d9-4344-9bf3-f5fc91bc1622"
|
||||
(reference "R15") (unit 1)
|
||||
(reference "R51") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3560,10 +3564,10 @@
|
||||
(symbol (lib_id "Device:R") (at 212.09 95.25 270) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid 5d2a3bd4-36a3-4cd5-b2ec-31d44b293cc0)
|
||||
(property "Reference" "R28" (at 212.09 95.25 90)
|
||||
(property "Reference" "R64" (at 212.09 95.25 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "4.7k" (at 217.17 93.98 90)
|
||||
(property "Value" "4k7" (at 217.17 93.98 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Footprint" "Resistor_SMD:R_0805_2012Metric" (at 212.09 93.472 90)
|
||||
@@ -3577,7 +3581,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/5bf93325-f5d9-4344-9bf3-f5fc91bc1622"
|
||||
(reference "R28") (unit 1)
|
||||
(reference "R64") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3614,7 +3618,7 @@
|
||||
(symbol (lib_id "Device:FerriteBead_Small") (at 62.23 36.83 0) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no) (fields_autoplaced)
|
||||
(uuid 5f64f649-130a-4994-879c-e0ac6e94924e)
|
||||
(property "Reference" "B1" (at 64.6938 35.5798 0)
|
||||
(property "Reference" "B3" (at 64.6938 35.5798 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left))
|
||||
)
|
||||
(property "Value" "BLM18EG221S" (at 64.6938 38.004 0)
|
||||
@@ -3631,7 +3635,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/5bf93325-f5d9-4344-9bf3-f5fc91bc1622"
|
||||
(reference "B1") (unit 1)
|
||||
(reference "B3") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3640,10 +3644,10 @@
|
||||
(symbol (lib_id "Device:R") (at 209.55 27.94 270) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid 5ff7eb3b-4022-400e-8b2d-e57549faafb6)
|
||||
(property "Reference" "R34" (at 209.55 27.94 90)
|
||||
(property "Reference" "R46" (at 209.55 27.94 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "4.7k" (at 214.63 26.67 90)
|
||||
(property "Value" "4k7" (at 214.63 26.67 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Footprint" "Resistor_SMD:R_0805_2012Metric" (at 209.55 26.162 90)
|
||||
@@ -3657,7 +3661,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/5bf93325-f5d9-4344-9bf3-f5fc91bc1622"
|
||||
(reference "R34") (unit 1)
|
||||
(reference "R46") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3686,7 +3690,7 @@
|
||||
(reference "C39") (unit 1)
|
||||
)
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/5bf93325-f5d9-4344-9bf3-f5fc91bc1622"
|
||||
(reference "C19") (unit 1)
|
||||
(reference "C44") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3695,7 +3699,7 @@
|
||||
(symbol (lib_id "Device:C") (at 46.99 68.58 180) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid 703a5ad5-261f-462a-927b-2f5091816ac1)
|
||||
(property "Reference" "C2" (at 48.26 72.39 90)
|
||||
(property "Reference" "C36" (at 48.26 72.39 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "10pF" (at 48.26 64.77 90)
|
||||
@@ -3712,7 +3716,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/5bf93325-f5d9-4344-9bf3-f5fc91bc1622"
|
||||
(reference "C2") (unit 1)
|
||||
(reference "C36") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3724,10 +3728,10 @@
|
||||
(property "Reference" "D?" (at 228.6 46.99 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "Green led" (at 228.6 53.34 0)
|
||||
(property "Value" "Green led" (at 231.775 51.435 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Footprint" "LED_SMD:LED_0805_2012Metric" (at 228.6 49.53 0)
|
||||
(property "Footprint" "LED_SMD:LED_0603_1608Metric" (at 228.6 49.53 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(property "Datasheet" "~" (at 228.6 49.53 0)
|
||||
@@ -3741,7 +3745,7 @@
|
||||
(reference "D?") (unit 1)
|
||||
)
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/5bf93325-f5d9-4344-9bf3-f5fc91bc1622"
|
||||
(reference "D2") (unit 1)
|
||||
(reference "D19") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3750,7 +3754,7 @@
|
||||
(symbol (lib_id "Device:R") (at 41.91 36.83 180) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid 7e520c4e-ee0b-4ea7-8b18-2be4397e790f)
|
||||
(property "Reference" "R10" (at 41.91 36.83 90)
|
||||
(property "Reference" "R56" (at 41.91 36.83 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "49.9" (at 40.64 31.75 90)
|
||||
@@ -3767,7 +3771,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/5bf93325-f5d9-4344-9bf3-f5fc91bc1622"
|
||||
(reference "R10") (unit 1)
|
||||
(reference "R56") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3776,7 +3780,7 @@
|
||||
(symbol (lib_id "Device:C") (at 53.34 128.27 180) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid 817571cd-b71b-4f1f-b21a-2340accaf437)
|
||||
(property "Reference" "C8" (at 54.61 132.08 90)
|
||||
(property "Reference" "C30" (at 54.61 132.08 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "10pF" (at 54.61 124.46 90)
|
||||
@@ -3793,7 +3797,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/5bf93325-f5d9-4344-9bf3-f5fc91bc1622"
|
||||
(reference "C8") (unit 1)
|
||||
(reference "C30") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3909,7 +3913,7 @@
|
||||
(symbol (lib_id "Device:R") (at 57.15 36.83 180) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid 94e7971f-a4d4-466b-8bd1-b0a1da13dc73)
|
||||
(property "Reference" "R13" (at 57.15 36.83 90)
|
||||
(property "Reference" "R53" (at 57.15 36.83 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "49.9" (at 55.88 31.75 90)
|
||||
@@ -3926,7 +3930,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/5bf93325-f5d9-4344-9bf3-f5fc91bc1622"
|
||||
(reference "R13") (unit 1)
|
||||
(reference "R53") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3955,7 +3959,7 @@
|
||||
(reference "C30") (unit 1)
|
||||
)
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/5bf93325-f5d9-4344-9bf3-f5fc91bc1622"
|
||||
(reference "C20") (unit 1)
|
||||
(reference "C43") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -4020,7 +4024,7 @@
|
||||
(symbol (lib_id "Device:R") (at 222.25 123.19 270) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid a8f795da-4f57-4266-9dbc-d4b1ec49a21b)
|
||||
(property "Reference" "R20" (at 222.25 123.19 90)
|
||||
(property "Reference" "R70" (at 222.25 123.19 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "510" (at 228.6 121.92 90)
|
||||
@@ -4037,7 +4041,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/5bf93325-f5d9-4344-9bf3-f5fc91bc1622"
|
||||
(reference "R20") (unit 1)
|
||||
(reference "R70") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -4102,7 +4106,7 @@
|
||||
(symbol (lib_id "Device:R") (at 53.34 96.52 180) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid aaa3a6f9-473c-405e-9246-c50f1418c80a)
|
||||
(property "Reference" "R16" (at 53.34 96.52 90)
|
||||
(property "Reference" "R50" (at 53.34 96.52 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "49.9" (at 52.07 91.44 90)
|
||||
@@ -4119,7 +4123,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/5bf93325-f5d9-4344-9bf3-f5fc91bc1622"
|
||||
(reference "R16") (unit 1)
|
||||
(reference "R50") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -4128,7 +4132,7 @@
|
||||
(symbol (lib_id "Device:C") (at 48.26 128.27 180) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid acd922bf-b439-49a5-93b9-08d057963a14)
|
||||
(property "Reference" "C7" (at 49.53 132.08 90)
|
||||
(property "Reference" "C31" (at 49.53 132.08 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "10pF" (at 49.53 124.46 90)
|
||||
@@ -4145,7 +4149,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/5bf93325-f5d9-4344-9bf3-f5fc91bc1622"
|
||||
(reference "C7") (unit 1)
|
||||
(reference "C31") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -4182,7 +4186,7 @@
|
||||
(symbol (lib_id "Device:C") (at 43.18 128.27 180) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid b297d9a7-f493-4b05-81ae-f0b3d7b2667f)
|
||||
(property "Reference" "C6" (at 44.45 132.08 90)
|
||||
(property "Reference" "C32" (at 44.45 132.08 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "10pF" (at 44.45 124.46 90)
|
||||
@@ -4199,7 +4203,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/5bf93325-f5d9-4344-9bf3-f5fc91bc1622"
|
||||
(reference "C6") (unit 1)
|
||||
(reference "C32") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -4208,10 +4212,10 @@
|
||||
(symbol (lib_id "Device:R") (at 209.55 55.88 270) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid b5c12ec7-2ca4-4236-a5f3-044e9cc59673)
|
||||
(property "Reference" "R33" (at 209.55 55.88 90)
|
||||
(property "Reference" "R48" (at 209.55 55.88 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "4.7k" (at 215.9 54.61 90)
|
||||
(property "Value" "4k7" (at 215.9 54.61 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Footprint" "Resistor_SMD:R_0805_2012Metric" (at 209.55 54.102 90)
|
||||
@@ -4225,7 +4229,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/5bf93325-f5d9-4344-9bf3-f5fc91bc1622"
|
||||
(reference "R33") (unit 1)
|
||||
(reference "R48") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -4234,7 +4238,7 @@
|
||||
(symbol (lib_id "Device:R") (at 43.18 96.52 180) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid b79bae43-c327-493d-a038-855680f06fe3)
|
||||
(property "Reference" "R14" (at 43.18 96.52 90)
|
||||
(property "Reference" "R52" (at 43.18 96.52 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "49.9" (at 41.91 91.44 90)
|
||||
@@ -4251,7 +4255,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/5bf93325-f5d9-4344-9bf3-f5fc91bc1622"
|
||||
(reference "R14") (unit 1)
|
||||
(reference "R52") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -4309,7 +4313,7 @@
|
||||
(reference "U3") (unit 1)
|
||||
)
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/5bf93325-f5d9-4344-9bf3-f5fc91bc1622"
|
||||
(reference "U1") (unit 1)
|
||||
(reference "U9") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -4324,7 +4328,7 @@
|
||||
(property "Value" "Red led" (at 228.6 92.71 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Footprint" "LED_SMD:LED_0805_2012Metric" (at 228.6 88.9 0)
|
||||
(property "Footprint" "LED_SMD:LED_0603_1608Metric" (at 228.6 88.9 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(property "Datasheet" "~" (at 228.6 88.9 0)
|
||||
@@ -4338,7 +4342,7 @@
|
||||
(reference "D?") (unit 1)
|
||||
)
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/5bf93325-f5d9-4344-9bf3-f5fc91bc1622"
|
||||
(reference "D4") (unit 1)
|
||||
(reference "D20") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -4385,7 +4389,7 @@
|
||||
(symbol (lib_id "Device:R") (at 130.81 48.26 270) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid d135b0c1-00a9-4a15-bf69-2c050be870d3)
|
||||
(property "Reference" "R5" (at 130.81 48.26 90)
|
||||
(property "Reference" "R61" (at 130.81 48.26 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "510" (at 135.89 46.99 90)
|
||||
@@ -4402,7 +4406,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/5bf93325-f5d9-4344-9bf3-f5fc91bc1622"
|
||||
(reference "R5") (unit 1)
|
||||
(reference "R61") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -4411,7 +4415,7 @@
|
||||
(symbol (lib_id "Device:C") (at 52.07 68.58 180) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid d97aea31-efd3-4805-a26e-93bfe540f39c)
|
||||
(property "Reference" "C3" (at 53.34 72.39 90)
|
||||
(property "Reference" "C35" (at 53.34 72.39 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "10pF" (at 53.34 64.77 90)
|
||||
@@ -4428,7 +4432,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/5bf93325-f5d9-4344-9bf3-f5fc91bc1622"
|
||||
(reference "C3") (unit 1)
|
||||
(reference "C35") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -4437,7 +4441,7 @@
|
||||
(symbol (lib_id "Device:R") (at 58.42 96.52 180) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid dcb1369b-bcf1-4c3e-bd29-50410ac94349)
|
||||
(property "Reference" "R17" (at 58.42 96.52 90)
|
||||
(property "Reference" "R49" (at 58.42 96.52 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "49.9" (at 57.15 91.44 90)
|
||||
@@ -4454,7 +4458,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/5bf93325-f5d9-4344-9bf3-f5fc91bc1622"
|
||||
(reference "R17") (unit 1)
|
||||
(reference "R49") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -4463,7 +4467,7 @@
|
||||
(symbol (lib_id "Device:C") (at 57.15 68.58 180) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid e0f26f8b-8985-49e6-8c97-f11bdae1e3a3)
|
||||
(property "Reference" "C4" (at 58.42 72.39 90)
|
||||
(property "Reference" "C34" (at 58.42 72.39 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "10pF" (at 58.42 64.77 90)
|
||||
@@ -4480,7 +4484,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/5bf93325-f5d9-4344-9bf3-f5fc91bc1622"
|
||||
(reference "C4") (unit 1)
|
||||
(reference "C34") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -4517,7 +4521,7 @@
|
||||
(symbol (lib_id "Device:C") (at 62.23 68.58 180) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid e534b46c-80d1-4c34-8578-50b240333e0c)
|
||||
(property "Reference" "C5" (at 63.5 72.39 90)
|
||||
(property "Reference" "C33" (at 63.5 72.39 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "0.1uF" (at 63.5 64.77 90)
|
||||
@@ -4534,7 +4538,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/5bf93325-f5d9-4344-9bf3-f5fc91bc1622"
|
||||
(reference "C5") (unit 1)
|
||||
(reference "C33") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -4543,7 +4547,7 @@
|
||||
(symbol (lib_id "Device:R") (at 133.35 107.95 270) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid e59e1dd2-d274-40ca-a8b1-cb4b3dd2162e)
|
||||
(property "Reference" "R7" (at 133.35 107.95 90)
|
||||
(property "Reference" "R59" (at 133.35 107.95 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "510" (at 138.43 106.68 90)
|
||||
@@ -4560,7 +4564,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/5bf93325-f5d9-4344-9bf3-f5fc91bc1622"
|
||||
(reference "R7") (unit 1)
|
||||
(reference "R59") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -4617,7 +4621,7 @@
|
||||
(reference "C33") (unit 1)
|
||||
)
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/5bf93325-f5d9-4344-9bf3-f5fc91bc1622"
|
||||
(reference "C22") (unit 1)
|
||||
(reference "C41") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -4682,7 +4686,7 @@
|
||||
(symbol (lib_id "Device:C") (at 41.91 68.58 180) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid f493fbdd-16cf-47a4-8571-5bdeffa77b8e)
|
||||
(property "Reference" "C1" (at 43.18 72.39 90)
|
||||
(property "Reference" "C37" (at 43.18 72.39 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "10pF" (at 43.18 64.77 90)
|
||||
@@ -4699,7 +4703,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/5bf93325-f5d9-4344-9bf3-f5fc91bc1622"
|
||||
(reference "C1") (unit 1)
|
||||
(reference "C37") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -4728,7 +4732,7 @@
|
||||
(reference "C41") (unit 1)
|
||||
)
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/5bf93325-f5d9-4344-9bf3-f5fc91bc1622"
|
||||
(reference "C21") (unit 1)
|
||||
(reference "C42") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -4737,7 +4741,7 @@
|
||||
(symbol (lib_id "Device:FerriteBead_Small") (at 137.16 154.94 90) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid f76a00b9-0511-4931-90f1-d259b14389f9)
|
||||
(property "Reference" "B3" (at 137.16 152.4 90)
|
||||
(property "Reference" "B7" (at 137.16 152.4 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "BLM18EG221SN1D" (at 137.16 157.48 90)
|
||||
@@ -4754,7 +4758,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/5bf93325-f5d9-4344-9bf3-f5fc91bc1622"
|
||||
(reference "B3") (unit 1)
|
||||
(reference "B7") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -4763,7 +4767,7 @@
|
||||
(symbol (lib_id "Device:R") (at 138.43 119.38 0) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(uuid f8848c60-f91f-414b-a5b0-c8e97aca000a)
|
||||
(property "Reference" "R6" (at 138.43 119.38 90)
|
||||
(property "Reference" "R60" (at 138.43 119.38 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "510" (at 137.16 114.3 90)
|
||||
@@ -4780,7 +4784,7 @@
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1/5bf93325-f5d9-4344-9bf3-f5fc91bc1622"
|
||||
(reference "R6") (unit 1)
|
||||
(reference "R60") (unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
"Id";"Designator";"Footprint";"Quantity";"Designation";"Supplier and ref";
|
||||
1;"J8";"JST_XH_B4B-XH-A_1x04_P2.50mm_Vertical";1;"Stepper 2";;;
|
||||
2;"U1";"LQFP-80-1EP_10x10mm_P0.4mm_EP5.3x4.5mm_ThermalVias";1;"AX58100";;;
|
||||
3;"B3,B7,B4,B6,B5";"C_0805_2012Metric";5;"BLM18EG221SN1D";;;
|
||||
4;"R59,R61,R51,R45,R60,R58,R50,R57,R53,R52,R56,R55,R46,R54";"R_0805_2012Metric";14;"1k";;;
|
||||
5;"U5";"LQFP-100_14x14mm_P0.5mm";1;"STM32F407VGT6";;;
|
||||
6;"U2";"SOIC-8_3.9x4.9mm_P1.27mm";1;"24LC32A";;;
|
||||
7;"R3,R49,R2,R48,R1";"R_0805_2012Metric";5;"22";;;
|
||||
8;"C23,C21,C24,C22,C19,C25,C26,C20";"C_0805_2012Metric";8;"10pF";;;
|
||||
9;"J3,J4,J5";"JST_XH_B6B-XH-A_1x06_P2.50mm_Vertical";3;"Conn_01x06_Pin";;;
|
||||
10;"J9";"PinHeader_1x04_P2.54mm_Vertical";1;"I2C bus2";;;
|
||||
11;"C45,C36,C34,C37,C38,C9,C39,C27,C13,C12,C40,C10,C8,C6,C29,C11,C46,C28,C3,C33,C41,C5,C2,C31,C18,C43,C14,C4,C7,C1";"C_0805_2012Metric";30;"0.1uF";;;
|
||||
12;"Y2";"Crystal_HC49-U_Vertical";1;"8 MHz";;;
|
||||
13;"R11,R7,R30,R12,R5,R10,R38,R13,R40,R33,R8";"R_0805_2012Metric";11;"4.7k";;;
|
||||
14;"D1,D2";"LED_0805_2012Metric";2;"Green led";;;
|
||||
15;"R28,R39,R25,R41,R26,R44,R27";"R_0805_2012Metric";7;"510";;;
|
||||
16;"J14";"JST_XH_B5B-XH-A_1x05_P2.50mm_Vertical";1;"Encoder 4";;;
|
||||
17;"C35,C32,C44,C30";"C_0805_2012Metric";4;"10uF";;;
|
||||
18;"C49,C53";"C_0805_2012Metric";2;"2.2uF";;;
|
||||
19;"D4,D5";"LED_0805_2012Metric";2;"Blue led";;;
|
||||
20;"R22,R18,R19,R20,R17,R23,R21,R24";"R_0805_2012Metric";8;"49.9";;;
|
||||
21;"C17,C15";"C_0805_2012Metric";2;"18pF";;;
|
||||
22;"Y1";"Crystal_SMD_SeikoEpson_TSX3225-4Pin_3.2x2.5mm";1;"NXK25.000AE12F-KAB6-12";;;
|
||||
23;"J12";"JST_XH_B5B-XH-A_1x05_P2.50mm_Vertical";1;"Encoder 2";;;
|
||||
24;"J1";"JST_XH_B2B-XH-A_1x02_P2.50mm_Vertical";1;"Conn_01x02_Pin";;;
|
||||
25;"IN1,OUT1";"PulseJack JB0011D01BNL";2;"J0011D01BNL";;;
|
||||
26;"J2";"JST_XH_B4B-XH-A_1x04_P2.50mm_Vertical";1;"STLINK";;;
|
||||
27;"C52,C51";"C_0805_2012Metric";2;"22pF";;;
|
||||
28;"B2,B1";"C_0805_2012Metric";2;"BLM18EG221S";;;
|
||||
29;"J10";"JST_XH_B3B-XH-A_1x03_P2.50mm_Vertical";1;"DAC1";;;
|
||||
30;"U4";"SOT-223-3_TabPin2";1;"AMS1117-3.3";;;
|
||||
31;"J7";"JST_XH_B4B-XH-A_1x04_P2.50mm_Vertical";1;"Stepper 1";;;
|
||||
32;"J6";"JST_XH_B4B-XH-A_1x04_P2.50mm_Vertical";1;"Serial usart1";;;
|
||||
33;"SW1";"SW_Push_1P1T_XKB_TS-1187A";1;"SW PB";;;
|
||||
34;"C16";"C_0805_2012Metric";1;"1uF";;;
|
||||
35;"D3";"LED_0805_2012Metric";1;"Red led";;;
|
||||
36;"J13";"JST_XH_B5B-XH-A_1x05_P2.50mm_Vertical";1;"Encoder 3";;;
|
||||
37;"J11";"JST_XH_B5B-XH-A_1x05_P2.50mm_Vertical";1;"Encoder 1";;;
|
||||
38;"U3";"SOT-223-3_TabPin2";1;"AMS1117-1.2";;;
|
||||
39;"R6";"R_0805_2012Metric";1;"12k 1%";;;
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"board": {
|
||||
"active_layer": 0,
|
||||
"active_layer": 36,
|
||||
"active_layer_preset": "",
|
||||
"auto_track_width": true,
|
||||
"hidden_netclasses": [],
|
||||
@@ -14,6 +14,7 @@
|
||||
"vias": 1.0,
|
||||
"zones": 0.6
|
||||
},
|
||||
"ratsnest_display_mode": 0,
|
||||
"selection_filter": {
|
||||
"dimensions": true,
|
||||
"footprints": true,
|
||||
@@ -64,7 +65,7 @@
|
||||
39,
|
||||
40
|
||||
],
|
||||
"visible_layers": "7ffffff_80000001",
|
||||
"visible_layers": "ffc0000_ffffffff",
|
||||
"zone_display_mode": 0
|
||||
},
|
||||
"meta": {
|
||||
|
||||
@@ -23,13 +23,13 @@
|
||||
},
|
||||
"fab_line_width": 0.09999999999999999,
|
||||
"fab_text_italic": false,
|
||||
"fab_text_size_h": 1.0,
|
||||
"fab_text_size_h": 0.6,
|
||||
"fab_text_size_v": 1.0,
|
||||
"fab_text_thickness": 0.15,
|
||||
"fab_text_upright": false,
|
||||
"other_line_width": 0.15,
|
||||
"other_text_italic": false,
|
||||
"other_text_size_h": 1.0,
|
||||
"other_text_size_h": 0.6,
|
||||
"other_text_size_v": 1.0,
|
||||
"other_text_thickness": 0.15,
|
||||
"other_text_upright": false,
|
||||
@@ -40,12 +40,13 @@
|
||||
},
|
||||
"silk_line_width": 0.15,
|
||||
"silk_text_italic": false,
|
||||
"silk_text_size_h": 1.0,
|
||||
"silk_text_size_h": 0.6,
|
||||
"silk_text_size_v": 1.0,
|
||||
"silk_text_thickness": 0.15,
|
||||
"silk_text_upright": false,
|
||||
"zones": {
|
||||
"min_clearance": 0.5
|
||||
"45_degree_only": false,
|
||||
"min_clearance": 0.0
|
||||
}
|
||||
},
|
||||
"diff_pair_dimensions": [
|
||||
@@ -72,7 +73,7 @@
|
||||
"duplicate_footprints": "warning",
|
||||
"extra_footprint": "warning",
|
||||
"footprint": "error",
|
||||
"footprint_type_mismatch": "ignore",
|
||||
"footprint_type_mismatch": "warning",
|
||||
"hole_clearance": "error",
|
||||
"hole_near_hole": "error",
|
||||
"invalid_outline": "error",
|
||||
@@ -84,12 +85,12 @@
|
||||
"lib_footprint_mismatch": "warning",
|
||||
"malformed_courtyard": "error",
|
||||
"microvia_drill_out_of_range": "error",
|
||||
"missing_courtyard": "ignore",
|
||||
"missing_courtyard": "error",
|
||||
"missing_footprint": "warning",
|
||||
"net_conflict": "warning",
|
||||
"npth_inside_courtyard": "ignore",
|
||||
"npth_inside_courtyard": "warning",
|
||||
"padstack": "warning",
|
||||
"pth_inside_courtyard": "ignore",
|
||||
"pth_inside_courtyard": "warning",
|
||||
"shorting_items": "error",
|
||||
"silk_edge_clearance": "warning",
|
||||
"silk_over_copper": "warning",
|
||||
@@ -110,6 +111,8 @@
|
||||
"zones_intersect": "error"
|
||||
},
|
||||
"rules": {
|
||||
"allow_blind_buried_vias": false,
|
||||
"allow_microvias": false,
|
||||
"max_error": 0.005,
|
||||
"min_clearance": 0.0,
|
||||
"min_connection": 0.0,
|
||||
@@ -120,10 +123,10 @@
|
||||
"min_microvia_drill": 0.09999999999999999,
|
||||
"min_resolved_spokes": 2,
|
||||
"min_silk_clearance": 0.0,
|
||||
"min_text_height": 0.7999999999999999,
|
||||
"min_text_height": 0.6,
|
||||
"min_text_thickness": 0.08,
|
||||
"min_through_hole_diameter": 0.3,
|
||||
"min_track_width": 0.0,
|
||||
"min_track_width": 0.19999999999999998,
|
||||
"min_via_annular_width": 0.09999999999999999,
|
||||
"min_via_diameter": 0.5,
|
||||
"solder_mask_clearance": 0.0,
|
||||
@@ -180,7 +183,8 @@
|
||||
"drill": 0.0
|
||||
}
|
||||
],
|
||||
"zones_allow_external_fillets": false
|
||||
"zones_allow_external_fillets": false,
|
||||
"zones_use_no_outline": true
|
||||
},
|
||||
"layer_presets": [],
|
||||
"viewports": []
|
||||
@@ -390,7 +394,7 @@
|
||||
"no_connect_dangling": "warning",
|
||||
"pin_not_connected": "error",
|
||||
"pin_not_driven": "error",
|
||||
"pin_to_pin": "warning",
|
||||
"pin_to_pin": "error",
|
||||
"power_pin_not_driven": "error",
|
||||
"similar_labels": "warning",
|
||||
"simulation_model_issue": "ignore",
|
||||
@@ -499,7 +503,11 @@
|
||||
],
|
||||
[
|
||||
"0a376a6c-0f15-42f8-81f6-3a55619be267",
|
||||
"Peripherals"
|
||||
"Input-Output"
|
||||
],
|
||||
[
|
||||
"cd91a270-7393-4003-91a3-e42304da540b",
|
||||
"Stepper+encoder"
|
||||
]
|
||||
],
|
||||
"text_variables": {}
|
||||
|
||||
@@ -2,25 +2,24 @@
|
||||
|
||||
(uuid 5597aedc-b607-407f-bbfd-31b3b298ecb1)
|
||||
|
||||
(paper "A3")
|
||||
(paper "A4")
|
||||
|
||||
(title_block
|
||||
(title "MetalMusings EaserCAT 3000")
|
||||
)
|
||||
|
||||
(lib_symbols
|
||||
)
|
||||
|
||||
|
||||
(text "Huvudsida" (at 162.56 85.09 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left bottom))
|
||||
(uuid adf2be63-7ec7-44be-837f-901ddbc80717)
|
||||
)
|
||||
|
||||
(sheet (at 144.78 224.79) (size 71.12 16.51) (fields_autoplaced)
|
||||
(sheet (at 57.15 156.21) (size 93.98 39.37) (fields_autoplaced)
|
||||
(stroke (width 0.1524) (type solid))
|
||||
(fill (color 0 0 0 0.0000))
|
||||
(uuid 0a376a6c-0f15-42f8-81f6-3a55619be267)
|
||||
(property "Sheetname" "Peripherals" (at 144.78 224.0784 0)
|
||||
(property "Sheetname" "Input-Output" (at 57.15 155.4984 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left bottom))
|
||||
)
|
||||
(property "Sheetfile" "peripherals.kicad_sch" (at 144.78 241.8846 0)
|
||||
(property "Sheetfile" "peripherals.kicad_sch" (at 57.15 196.1646 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left top))
|
||||
)
|
||||
(instances
|
||||
@@ -30,14 +29,14 @@
|
||||
)
|
||||
)
|
||||
|
||||
(sheet (at 234.95 198.12) (size 102.87 34.29) (fields_autoplaced)
|
||||
(sheet (at 170.18 31.75) (size 101.6 58.42) (fields_autoplaced)
|
||||
(stroke (width 0.1524) (type solid))
|
||||
(fill (color 0 0 0 0.0000))
|
||||
(uuid 5bf93325-f5d9-4344-9bf3-f5fc91bc1622)
|
||||
(property "Sheetname" "AX58100 phys etc" (at 234.95 197.4084 0)
|
||||
(property "Sheetname" "AX58100 phys etc" (at 170.18 31.0384 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left bottom))
|
||||
)
|
||||
(property "Sheetfile" "AX58100_phy_etc.kicad_sch" (at 234.95 232.9946 0)
|
||||
(property "Sheetfile" "AX58100_phy_etc.kicad_sch" (at 170.18 90.7546 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left top))
|
||||
)
|
||||
(instances
|
||||
@@ -47,14 +46,14 @@
|
||||
)
|
||||
)
|
||||
|
||||
(sheet (at 233.68 123.19) (size 93.98 60.96) (fields_autoplaced)
|
||||
(sheet (at 57.15 31.75) (size 93.98 60.96) (fields_autoplaced)
|
||||
(stroke (width 0.1524) (type solid))
|
||||
(fill (color 0 0 0 0.0000))
|
||||
(uuid 9f485422-734f-43d3-94ea-443cbc453d2e)
|
||||
(property "Sheetname" "AX58100" (at 233.68 122.4784 0)
|
||||
(property "Sheetname" "AX58100" (at 57.15 31.0384 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left bottom))
|
||||
)
|
||||
(property "Sheetfile" "AX48100.kicad_sch" (at 233.68 184.7346 0)
|
||||
(property "Sheetfile" "AX48100.kicad_sch" (at 57.15 93.2946 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left top))
|
||||
)
|
||||
(instances
|
||||
@@ -64,14 +63,31 @@
|
||||
)
|
||||
)
|
||||
|
||||
(sheet (at 142.24 200.66) (size 74.93 17.78) (fields_autoplaced)
|
||||
(sheet (at 171.45 156.21) (size 105.41 39.37) (fields_autoplaced)
|
||||
(stroke (width 0.1524) (type solid))
|
||||
(fill (color 0 0 0 0.0000))
|
||||
(uuid cd91a270-7393-4003-91a3-e42304da540b)
|
||||
(property "Sheetname" "Stepper+encoder" (at 171.45 155.4984 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left bottom))
|
||||
)
|
||||
(property "Sheetfile" "Steppers.kicad_sch" (at 171.45 196.1646 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left top))
|
||||
)
|
||||
(instances
|
||||
(project "Ax58100-stm32-ethercat"
|
||||
(path "/5597aedc-b607-407f-bbfd-31b3b298ecb1" (page "6"))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(sheet (at 57.15 106.68) (size 93.98 35.56) (fields_autoplaced)
|
||||
(stroke (width 0.1524) (type solid))
|
||||
(fill (color 0 0 0 0.0000))
|
||||
(uuid d564400f-40ba-4aca-9c2a-14ec52a8353b)
|
||||
(property "Sheetname" "STM32F4" (at 142.24 199.9484 0)
|
||||
(property "Sheetname" "STM32F4" (at 57.15 105.9684 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left bottom))
|
||||
)
|
||||
(property "Sheetfile" "STM32F4.kicad_sch" (at 142.24 219.0246 0)
|
||||
(property "Sheetfile" "STM32F4.kicad_sch" (at 57.15 142.8246 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left top))
|
||||
)
|
||||
(instances
|
||||
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
2437
Kicad/Ax58100-stm32-ethercat/Steppers.kicad_sch
Executable file
2437
Kicad/Ax58100-stm32-ethercat/Steppers.kicad_sch
Executable file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -64,7 +64,7 @@
|
||||
39,
|
||||
40
|
||||
],
|
||||
"visible_layers": "002202a_00000001",
|
||||
"visible_layers": "002202b_80000005",
|
||||
"zone_display_mode": 0
|
||||
},
|
||||
"meta": {
|
||||
|
||||
124
PortStepgen/.vscode/c_cpp_properties.json
vendored
Executable file
124
PortStepgen/.vscode/c_cpp_properties.json
vendored
Executable file
@@ -0,0 +1,124 @@
|
||||
//
|
||||
// !!! WARNING !!! AUTO-GENERATED FILE!
|
||||
// PLEASE DO NOT MODIFY IT AND USE "platformio.ini":
|
||||
// https://docs.platformio.org/page/projectconf/section_env_build.html#build-flags
|
||||
//
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "PlatformIO",
|
||||
"includePath": [
|
||||
"Z:/src/MyOwnEtherCATDevice/PortStepgen/src",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/cores/arduino/avr",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/cores/arduino/stm32",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/cores/arduino/stm32/LL",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/cores/arduino/stm32/usb",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/cores/arduino/stm32/OpenAMP",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/cores/arduino/stm32/usb/hid",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/cores/arduino/stm32/usb/cdc",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/system/Drivers/STM32F4xx_HAL_Driver/Inc",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/system/Drivers/STM32F4xx_HAL_Driver/Src",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/system/STM32F4xx",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/system/Middlewares/ST/STM32_USB_Device_Library/Core/Inc",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/system/Middlewares/ST/STM32_USB_Device_Library/Core/Src",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/system/Middlewares/OpenAMP",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/system/Middlewares/OpenAMP/open-amp/lib/include",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/system/Middlewares/OpenAMP/libmetal/lib/include",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/system/Middlewares/OpenAMP/virtual_driver",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-cmsis/CMSIS/Core/Include",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/system/Drivers/CMSIS/Device/ST/STM32F4xx/Include",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/system/Drivers/CMSIS/Device/ST/STM32F4xx/Source/Templates/gcc",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-cmsis/CMSIS/DSP/Include",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-cmsis/CMSIS/DSP/PrivateInclude",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/cores/arduino",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/variants/STM32F4xx/F407V(E-G)T_F417V(E-G)T",
|
||||
"C:/Users/Hakan/.platformio/lib/RunningAverage",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/CMSIS_DSP/src",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/EEPROM/src",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/IWatchdog/src",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/Keyboard/src",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/Mouse/src",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/RGB_LED_TLC59731/src",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/SPI/src",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/Servo/src",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/SoftwareSerial/src",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/SrcWrapper/src",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/SubGhz/src",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/Wire/src",
|
||||
""
|
||||
],
|
||||
"browse": {
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"path": [
|
||||
"Z:/src/MyOwnEtherCATDevice/PortStepgen/src",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/cores/arduino/avr",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/cores/arduino/stm32",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/cores/arduino/stm32/LL",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/cores/arduino/stm32/usb",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/cores/arduino/stm32/OpenAMP",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/cores/arduino/stm32/usb/hid",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/cores/arduino/stm32/usb/cdc",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/system/Drivers/STM32F4xx_HAL_Driver/Inc",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/system/Drivers/STM32F4xx_HAL_Driver/Src",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/system/STM32F4xx",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/system/Middlewares/ST/STM32_USB_Device_Library/Core/Inc",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/system/Middlewares/ST/STM32_USB_Device_Library/Core/Src",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/system/Middlewares/OpenAMP",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/system/Middlewares/OpenAMP/open-amp/lib/include",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/system/Middlewares/OpenAMP/libmetal/lib/include",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/system/Middlewares/OpenAMP/virtual_driver",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-cmsis/CMSIS/Core/Include",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/system/Drivers/CMSIS/Device/ST/STM32F4xx/Include",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/system/Drivers/CMSIS/Device/ST/STM32F4xx/Source/Templates/gcc",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-cmsis/CMSIS/DSP/Include",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-cmsis/CMSIS/DSP/PrivateInclude",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/cores/arduino",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/variants/STM32F4xx/F407V(E-G)T_F417V(E-G)T",
|
||||
"C:/Users/Hakan/.platformio/lib/RunningAverage",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/CMSIS_DSP/src",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/EEPROM/src",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/IWatchdog/src",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/Keyboard/src",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/Mouse/src",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/RGB_LED_TLC59731/src",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/SPI/src",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/Servo/src",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/SoftwareSerial/src",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/SrcWrapper/src",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/SubGhz/src",
|
||||
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/Wire/src",
|
||||
""
|
||||
]
|
||||
},
|
||||
"defines": [
|
||||
"PLATFORMIO=60114",
|
||||
"STM32F407xx",
|
||||
"STM32F4",
|
||||
"STM32",
|
||||
"PIO_FRAMEWORK_ARDUINO_NANOLIB_FLOAT_PRINTF",
|
||||
"STM32F4xx",
|
||||
"ARDUINO=10808",
|
||||
"ARDUINO_ARCH_STM32",
|
||||
"NDEBUG",
|
||||
"ARDUINO_GENERIC_F407VGTX",
|
||||
"BOARD_NAME=\"GENERIC_F407VGTX\"",
|
||||
"HAL_UART_MODULE_ENABLED",
|
||||
"USE_FULL_LL_DRIVER",
|
||||
"VARIANT_H=\"variant_generic.h\"",
|
||||
"VECT_TAB_OFFSET=0x0",
|
||||
""
|
||||
],
|
||||
"cStandard": "gnu17",
|
||||
"cppStandard": "gnu++17",
|
||||
"compilerPath": "C:/Users/Hakan/.platformio/packages/toolchain-gccarmnoneeabi/bin/arm-none-eabi-gcc.exe",
|
||||
"compilerArgs": [
|
||||
"-mcpu=cortex-m4",
|
||||
"-mthumb",
|
||||
"-mfpu=fpv4-sp-d16",
|
||||
"-mfloat-abi=hard",
|
||||
""
|
||||
]
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
||||
95
PortStepgen/.vscode/launch.json
vendored
Executable file
95
PortStepgen/.vscode/launch.json
vendored
Executable file
@@ -0,0 +1,95 @@
|
||||
// AUTOMATICALLY GENERATED FILE. PLEASE DO NOT MODIFY IT MANUALLY
|
||||
//
|
||||
// PlatformIO Debugging Solution
|
||||
//
|
||||
// Documentation: https://docs.platformio.org/en/latest/plus/debugging.html
|
||||
// Configuration: https://docs.platformio.org/en/latest/projectconf/sections/env/options/debug/index.html
|
||||
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "(gdb) Launch",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/${fileBasenameNoExtension}",
|
||||
"args": [],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${fileDirname}",
|
||||
"environment": [],
|
||||
"externalConsole": false,
|
||||
"MIMode": "gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
},
|
||||
{
|
||||
"description": "Set Disassembly Flavor to Intel",
|
||||
"text": "-gdb-set disassembly-flavor intel",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "platformio-debug",
|
||||
"request": "launch",
|
||||
"name": "PIO Debug",
|
||||
"executable": "Z:/src/MyOwnEtherCATDevice/PortStepgen/.pio/build/genericSTM32F407VGT6/firmware.elf",
|
||||
"projectEnvName": "genericSTM32F407VGT6",
|
||||
"toolchainBinDir": "C:/Users/Hakan/.platformio/packages/toolchain-gccarmnoneeabi/bin",
|
||||
"internalConsoleOptions": "openOnSessionStart",
|
||||
"svdPath": "C:/Users/Hakan/.platformio/platforms/ststm32/misc/svd/STM32F40x.svd",
|
||||
"preLaunchTask": {
|
||||
"type": "PlatformIO",
|
||||
"task": "Pre-Debug"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "platformio-debug",
|
||||
"request": "launch",
|
||||
"name": "PIO Debug (skip Pre-Debug)",
|
||||
"executable": "Z:/src/MyOwnEtherCATDevice/PortStepgen/.pio/build/genericSTM32F407VGT6/firmware.elf",
|
||||
"projectEnvName": "genericSTM32F407VGT6",
|
||||
"toolchainBinDir": "C:/Users/Hakan/.platformio/packages/toolchain-gccarmnoneeabi/bin",
|
||||
"internalConsoleOptions": "openOnSessionStart",
|
||||
"svdPath": "C:/Users/Hakan/.platformio/platforms/ststm32/misc/svd/STM32F40x.svd"
|
||||
},
|
||||
{
|
||||
"type": "platformio-debug",
|
||||
"request": "launch",
|
||||
"name": "PIO Debug (without uploading)",
|
||||
"executable": "Z:/src/MyOwnEtherCATDevice/PortStepgen/.pio/build/genericSTM32F407VGT6/firmware.elf",
|
||||
"projectEnvName": "genericSTM32F407VGT6",
|
||||
"toolchainBinDir": "C:/Users/Hakan/.platformio/packages/toolchain-gccarmnoneeabi/bin",
|
||||
"internalConsoleOptions": "openOnSessionStart",
|
||||
"svdPath": "C:/Users/Hakan/.platformio/platforms/ststm32/misc/svd/STM32F40x.svd",
|
||||
"loadMode": "manual"
|
||||
}
|
||||
],
|
||||
"tasks": [
|
||||
{
|
||||
"type": "shell",
|
||||
"label": "C/C++: g++ build active file",
|
||||
"command": "/usr/bin/g++",
|
||||
"args": [
|
||||
"-g",
|
||||
"${file}",
|
||||
"-o",
|
||||
"${fileDirname}/${fileBasenameNoExtension}"
|
||||
],
|
||||
"options": {
|
||||
"cwd": "/usr/bin"
|
||||
},
|
||||
"problemMatcher": [
|
||||
"$gcc"
|
||||
],
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"detail": "Task generated by Debugger."
|
||||
}
|
||||
]
|
||||
}
|
||||
12
PortStepgen/platformio.ini
Executable file
12
PortStepgen/platformio.ini
Executable file
@@ -0,0 +1,12 @@
|
||||
[env:genericSTM32F407VGT6]
|
||||
framework = arduino
|
||||
platform = ststm32
|
||||
board = genericSTM32F407VGT6
|
||||
upload_protocol = stlink
|
||||
debug_tool = stlink
|
||||
debug_build_flags = -O0 -g -ggdb
|
||||
monitor_port = COM7
|
||||
;monitor_port = /dev/ttyUSB0
|
||||
monitor_speed = 115200
|
||||
build_flags = -Wl,--no-warn-rwx-segment -DSTM32 -DPIO_FRAMEWORK_ARDUINO_NANOLIB_FLOAT_PRINTF
|
||||
|
||||
1557
PortStepgen/src/main.cpp
Normal file
1557
PortStepgen/src/main.cpp
Normal file
File diff suppressed because it is too large
Load Diff
43
README.md
43
README.md
@@ -6,6 +6,45 @@ that I used during the creation of my own EtherCAT device.
|
||||
This job is documented in a series of Youtube videos, from my first attempts to understand
|
||||
how EtherCAT works, to making my own pcb, program it and testing it in LinuxCNC.
|
||||
|
||||
=======
|
||||
|
||||
## Make my own EtherCAT device 9. About time. Step generator
|
||||
|
||||
This was something, I almost gave up. But here it is. A working step generator.
|
||||
Actually, not one but two step generators for the EaserCAT 2000 board.
|
||||
For a step generator it is all about timing, timing and timing.
|
||||
I'll walk you through what I had to do to get it to work.
|
||||
It can give some general insight into how EtherCAT for linuxcnc works.
|
||||
|
||||
Biggest changes this time are in the [Firmware folder](Firmware).
|
||||
The [Documentation folder](Documentation) has design details on the second step generator.
|
||||
A small but fatal indexing bug was fixed in the EEPROM_generator.
|
||||
For all details, read the git log. Too much to mention all.
|
||||
|
||||
[](https://youtu.be/lBDBcseFki8)
|
||||
|
||||
## Make my own EtherCAT device 8. EaserCAT 3000
|
||||
|
||||
Introducing the new **EaserCAT 3000** board. It's an evolution of the EaserCAT 2000
|
||||
and intended to be used in my plasma cutter. It features four stepper driver outputs,
|
||||
input for a THCAD arc voltage card, an encoder, an analog output (for spindle +- 10V),
|
||||
eigth digital inputs, four digital outputs, plus some 12 I/O for any possible extension.
|
||||
|
||||
The KiCAD files are in the [KiCAD folder](Kicad/Ax58100-stm32-ethercat)
|
||||
|
||||
[](https://youtu.be/boanv6ihYtI)
|
||||
|
||||
## Make my own EtherCAT device 7. Turning in the lathe
|
||||
|
||||
I have now put things together so the EaserCAT 2000 card controls
|
||||
my small CNC lathe. Two stepper generators, one each for the X and Z axes,
|
||||
and an encoder counter for the spindle encoder are on this small card.
|
||||
|
||||
While it works there are still issues caused by the variation in cycle time. Thankfully
|
||||
I was able to reduce the variation from 80-100 microseconds down to 2-3 microseconds,
|
||||
|
||||
[](https://youtu.be/Bqi1KXEVI1Q)
|
||||
|
||||
## Make my own EtherCAT device 6. Stepper motor driver
|
||||
|
||||
The stepper driver generator shows up and makes some stepper motor sounds. The two big things
|
||||
@@ -46,8 +85,6 @@ My first tries with the LAN9252 chip. Getting accustomed to some tools.
|
||||
|
||||
[](https://youtu.be/IGmXsXSSA4s)
|
||||
|
||||
|
||||
|
||||
# EtherCAT PCB based on LAN9252 and STM34F407
|
||||
|
||||
##### The firmware is in the **Firmware** folder.
|
||||
@@ -92,4 +129,4 @@ Arduino sketch to program the AT24C32 eeprom with a valid eeprom content. Hook u
|
||||
|
||||
###License
|
||||
|
||||
Don't violate the original licenses. No warranties. Use it any way you like.
|
||||
Don't violate the original licenses. No warranties. Use it any way you like.
|
||||
|
||||
165
linuxcnc/Turner.2ms/#lathe_macros.ini#
Normal file
165
linuxcnc/Turner.2ms/#lathe_macros.ini#
Normal file
@@ -0,0 +1,165 @@
|
||||
# EMC controller parameters for a simulated machine.
|
||||
# General note: Comments can either be preceded with a # or ; - either is
|
||||
# acceptable, although # is in keeping with most linux config files.
|
||||
|
||||
# General section -------------------------------------------------------------
|
||||
[EMC]
|
||||
VERSION = 1.1
|
||||
MACHINE = gmoccapy_lathe
|
||||
#DEBUG = 0x7FFFFFFF
|
||||
DEBUG = 0
|
||||
|
||||
# for details see nc_files/subroutines/maco_instructions.txt
|
||||
[DISPLAY]
|
||||
DISPLAY = gmoccapy
|
||||
LATHE = 1
|
||||
BACK_TOOL_LATHE = 0
|
||||
|
||||
# Cycle time, in milliseconds, that display will sleep between polls
|
||||
CYCLE_TIME = 100
|
||||
|
||||
# Highest value that will be allowed for feed override, 1.0 = 100%
|
||||
MAX_FEED_OVERRIDE = 1.5
|
||||
MAX_SPINDLE_OVERRIDE = 1.2
|
||||
MIN_SPINDLE_OVERRIDE = .5
|
||||
|
||||
|
||||
# Prefix to be used
|
||||
PROGRAM_PREFIX = /home/debian/linuxcnc/nc_files
|
||||
|
||||
# Introductory graphic
|
||||
INTRO_GRAPHIC = linuxcnc.gif
|
||||
INTRO_TIME = 5
|
||||
|
||||
# list of selectable jog increments
|
||||
INCREMENTS = 1.000 mm, 0.100 mm, 0.010 mm, 0.001 mm
|
||||
|
||||
EMBED_TAB_NAME = Cycles
|
||||
EMBED_TAB_LOCATION = ntb_preview
|
||||
#EMBED_TAB_LOCATION = ntb_user_tabs
|
||||
EMBED_TAB_COMMAND = halcmd loadusr -Wn gladevcp gladevcp -c gladevcp -U notouch=1 -U norun=0 -u lathehandler.py -x {XID} lathemacro.ui
|
||||
|
||||
[FILTER]
|
||||
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
|
||||
PROGRAM_EXTENSION = .py Python Script
|
||||
png = image-to-gcode
|
||||
gif = image-to-gcode
|
||||
jpg = image-to-gcode
|
||||
py = python
|
||||
|
||||
# Task controller section -----------------------------------------------------
|
||||
[RS274NGC]
|
||||
RS274NGC_STARTUP_CODE = G18 G21 G40 G49 G54 G80 G90 G94 G8 M9 M5 G64 P0.005
|
||||
PARAMETER_FILE = sim.var
|
||||
SUBROUTINE_PATH = macros:./
|
||||
|
||||
# Motion control section ------------------------------------------------------
|
||||
[EMCMOT]
|
||||
EMCMOT = motmod
|
||||
COMM_TIMEOUT = 1.0
|
||||
BASE_PERIOD = 100000
|
||||
SERVO_PERIOD = 1000000
|
||||
|
||||
# Hardware Abstraction Layer section --------------------------------------------------
|
||||
[TASK]
|
||||
TASK = milltask
|
||||
CYCLE_TIME = 0.001
|
||||
|
||||
# Part program interpreter section --------------------------------------------
|
||||
[HAL]
|
||||
HALFILE = core_sim_lathe.hal
|
||||
HALFILE = spindle_sim.hal
|
||||
HALFILE = simulated_home_lathe.hal
|
||||
|
||||
# Single file that is executed after the GUI has started.
|
||||
#POSTGUI_HALFILE = gmoccapy_postgui.hal
|
||||
|
||||
HALUI = halui
|
||||
|
||||
# Trajectory planner section --------------------------------------------------
|
||||
[HALUI]
|
||||
#No Content
|
||||
|
||||
[TRAJ]
|
||||
COORDINATES = X Z
|
||||
LINEAR_UNITS = mm
|
||||
ANGULAR_UNITS = degree
|
||||
DEFAULT_LINEAR_VELOCITY = 50
|
||||
MAX_LINEAR_VELOCITY = 234
|
||||
POSITION_FILE = position.txt
|
||||
#NO_FORCE_HOMING = 1
|
||||
|
||||
# First axis
|
||||
[EMCIO]
|
||||
EMCIO = io
|
||||
CYCLE_TIME = 0.100
|
||||
|
||||
# tool table file
|
||||
TOOL_TABLE = lathe.tbl
|
||||
|
||||
[KINS]
|
||||
KINEMATICS = trivkins coordinates=XZ
|
||||
JOINTS = 2
|
||||
|
||||
[AXIS_X]
|
||||
MIN_LIMIT = -50.0
|
||||
MAX_LIMIT = 200.0
|
||||
MAX_VELOCITY = 166
|
||||
MAX_ACCELERATION = 1500.0
|
||||
|
||||
[JOINT_0]
|
||||
TYPE = LINEAR
|
||||
MAX_VELOCITY = 166
|
||||
MAX_ACCELERATION = 1500.0
|
||||
BACKLASH = 0.000
|
||||
INPUT_SCALE = 4000
|
||||
OUTPUT_SCALE = 1.000
|
||||
MIN_LIMIT = -50.0
|
||||
MAX_LIMIT = 200.0
|
||||
FERROR = 0.050
|
||||
MIN_FERROR = 0.010
|
||||
HOME_OFFSET = 0.0
|
||||
HOME = 10
|
||||
HOME_SEARCH_VEL = 200.0
|
||||
HOME_LATCH_VEL = 20.0
|
||||
HOME_USE_INDEX = NO
|
||||
HOME_IGNORE_LIMITS = NO
|
||||
HOME_SEQUENCE = 1
|
||||
HOME_IS_SHARED = 1
|
||||
|
||||
# Third axis
|
||||
[AXIS_Z]
|
||||
MIN_LIMIT = -75.0
|
||||
MAX_LIMIT = 1000.0
|
||||
MAX_VELOCITY = 166
|
||||
MAX_ACCELERATION = 1500.0
|
||||
|
||||
[JOINT_1]
|
||||
TYPE = LINEAR
|
||||
MAX_VELOCITY = 166
|
||||
MAX_ACCELERATION = 1500.0
|
||||
BACKLASH = 0.000
|
||||
INPUT_SCALE = 4000
|
||||
OUTPUT_SCALE = 1.000
|
||||
MIN_LIMIT = -75.0
|
||||
MAX_LIMIT = 1000.0
|
||||
FERROR = 0.050
|
||||
MIN_FERROR = 0.010
|
||||
HOME_OFFSET = 1.0
|
||||
HOME = -10
|
||||
HOME_SEARCH_VEL = 200.0
|
||||
HOME_LATCH_VEL = 20.0
|
||||
HOME_USE_INDEX = NO
|
||||
HOME_IGNORE_LIMITS = NO
|
||||
HOME_SEQUENCE = 0
|
||||
HOME_IS_SHARED = 1
|
||||
|
||||
# section for main IO controller parameters -----------------------------------
|
||||
[MACROS]
|
||||
MACRO = i_am_lost
|
||||
MACRO = halo_world
|
||||
MACRO = jog_around
|
||||
MACRO = increment xinc yinc
|
||||
MACRO = go_to_position X-pos Y-pos Z-pos
|
||||
|
||||
|
||||
3057
linuxcnc/Turner.2ms/LatheMacro.svg
Normal file
3057
linuxcnc/Turner.2ms/LatheMacro.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 4.8 MiB |
72
linuxcnc/Turner.2ms/README
Normal file
72
linuxcnc/Turner.2ms/README
Normal file
@@ -0,0 +1,72 @@
|
||||
This folder contains a number of simulated lathe configs.
|
||||
|
||||
the "lathemacro" config offers a number of simple macros to perform
|
||||
the most common lathe operations.
|
||||
|
||||
The GUI that controls the macros can be viewed by clicking the "Cycles"
|
||||
tab top left of the graphical preview window.
|
||||
|
||||
There are two load-time options to control the tab behaviour:
|
||||
1) norun will hide the action button, use this if you want to use only
|
||||
a physical button (connected to gladevcp.cycle-start) to start the macros
|
||||
(Strongly recommended, especially with Touchy)
|
||||
2) notouch will allow keyboard editing of the spinboxes. Otherwise the
|
||||
custom numeric keyboard will be shown.
|
||||
|
||||
An example loadrt line, as used here in the Gmoccapy demo is:
|
||||
|
||||
[DISPLAY]
|
||||
EMBED_TAB_COMMAND = halcmd loadusr -Wn gladevcp gladevcp -c gladevcp -U notouch=1 -U norun=0 -u lathehandler.py -x {XID} lathemacro.ui
|
||||
|
||||
The window will resize slowly if you grab the corner and move the mouse
|
||||
inside the window. It's not as bad as it was, but still needs work.
|
||||
You may need to click the unmaximise button in the toolbar to get a
|
||||
window border to be able to use the resize handles.
|
||||
|
||||
Notes on the keyboard:
|
||||
As well as the obvious functions and unit conversions, it can be used to
|
||||
enter fractions. For example if you type 1.1/2 it will automatically
|
||||
update to display 1.5000 and 16.17/64 will show 16.2656.
|
||||
This can be used in a limited way to halve the onscreen value eg for
|
||||
entering radius instead of diameter.
|
||||
However it only works for whole numbers: 100/2 will become 50 but
|
||||
3.14149/2 is interpreted as 3 and 14 thousand halves so won't work.
|
||||
|
||||
Notes on adding your own cycles:
|
||||
Create a new G-code subroutine in the same format as the existing ones.
|
||||
In Glade add a new tab to the 'tabs1' notebook and give it a name matching
|
||||
the new cycle.
|
||||
Edit the action button (inside an eventbox) to call the new G-code sub.
|
||||
Rename the action button to match the tab name and append '.action' eg
|
||||
MyCycle.action
|
||||
|
||||
Create new artwork. I used Fusion360, the models are here:
|
||||
https://a360.co/3uFPZNv
|
||||
and the drawings are here:
|
||||
https://a360.co/3uFPZNv
|
||||
Esport the drawing page as PDF and import into the lathemacro.svg file in
|
||||
Inkscape. You will need to resize. Add your own arrows and annotations.
|
||||
|
||||
Save the new layer in a layer named "layerN" (lower case) where N is the
|
||||
tab number, starting at zero. You will need to invoke the XML editor for
|
||||
this (Shift-Cmd-X on Mac)
|
||||
|
||||
The entry boxes are positioned relative to a 1500 x 1000 image; the
|
||||
original size of the SVG. So you can hover your mouse over the image in
|
||||
Inkscape to determine the coordinates.
|
||||
In the in the case of on-drawing controls the coordinates are entered as
|
||||
an XML comment in the Tooltip for the control in x,y format (The surface speed,
|
||||
tool and coolant do not need this, they are in a fixed table)
|
||||
|
||||
An example:
|
||||
|
||||
<!--300,711->Peck distance
|
||||
|
||||
Make sure the comment has "use markup" selected for the tooltip.
|
||||
Also ensure that the control has the "show_keyb" function allocated for
|
||||
the Widget->button_press event. If you copy-paste a tab and copy-paste
|
||||
extra controls this should be automatic.
|
||||
_All_ your new spinboxes will need their own new Adjustment, or they will
|
||||
change value when you alter the original spinbox that they are a copy of.
|
||||
|
||||
|
||||
159
linuxcnc/Turner.2ms/Turner.hal
Normal file
159
linuxcnc/Turner.2ms/Turner.hal
Normal file
@@ -0,0 +1,159 @@
|
||||
# Generated by PNCconf at Sat Sep 10 10:10:56 2016
|
||||
# If you make changes to this file, they will be
|
||||
# overwritten when you run PNCconf again
|
||||
|
||||
loadrt [KINS]KINEMATICS
|
||||
#autoconverted trivkins
|
||||
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
|
||||
|
||||
loadusr -W lcec_conf ethercat-conf.xml
|
||||
loadrt lcec
|
||||
loadrt metalmusings_encoder
|
||||
|
||||
addf lcec.read-all servo-thread
|
||||
addf metalmusings-encoder.0 servo-thread
|
||||
addf motion-command-handler servo-thread
|
||||
addf motion-controller servo-thread
|
||||
|
||||
#*******************
|
||||
# AXIS X
|
||||
#*******************
|
||||
|
||||
# --- joint signals for motion
|
||||
|
||||
net x-pos-cmd <= joint.0.motor-pos-cmd
|
||||
net x-vel-cmd <= joint.0.vel-cmd
|
||||
net x-pos-fb <= joint.0.motor-pos-fb
|
||||
net x-enable <= joint.0.amp-enable-out
|
||||
|
||||
# --- connect stepper driver to joint
|
||||
# 1/2 of stepper's p/rev 2000 => 1000
|
||||
setp lcec.0.0.steps-per-mm-1 200
|
||||
net x-pos-cmd => lcec.0.0.commanded-position-1
|
||||
net x-pos-fb => lcec.0.0.actual-position-1
|
||||
#net x-enable => lcec.0.0.enable
|
||||
|
||||
#*******************
|
||||
# AXIS Z
|
||||
#*******************
|
||||
|
||||
# --- joint signals for motion
|
||||
|
||||
net z-pos-cmd <= joint.1.motor-pos-cmd
|
||||
net z-vel-cmd <= joint.1.vel-cmd
|
||||
net z-pos-fb <= joint.1.motor-pos-fb
|
||||
net z-enable <= joint.1.amp-enable-out
|
||||
|
||||
# --- connect stepper driver to the joint
|
||||
|
||||
setp lcec.0.0.steps-per-mm-2 80
|
||||
# 1/5 of drive's step/rev
|
||||
net z-pos-cmd => lcec.0.0.commanded-position-2
|
||||
net z-pos-fb => lcec.0.0.actual-position-2
|
||||
# net z-enable => lcec.0.0.enable
|
||||
|
||||
#*********************
|
||||
# E-STOP
|
||||
#*********************
|
||||
|
||||
setp iocontrol.0.emc-enable-in 1
|
||||
#net estop iocontrol.0.emc-enable-in lcec.0.1.din-0
|
||||
|
||||
#setp lcec.0.3.enc-pos-scale [SPINDLE_9]ENCODER_SCALE
|
||||
#setp lcec.0.0.enc-pos-scale [SPINDLE_9]ENCODER_SCALE
|
||||
|
||||
#net spindle-revs <= lcec.0.3.enc-pos
|
||||
net spindle-revs <= lcec.0.0.enc-position
|
||||
loadrt invert
|
||||
loadrt mult2 names=mult2.rps,mult2.rpm
|
||||
addf invert.0 servo-thread
|
||||
addf mult2.rps servo-thread
|
||||
addf mult2.rpm servo-thread
|
||||
|
||||
setp invert.0.in [SPINDLE_9]ENCODER_SCALE
|
||||
setp mult2.rpm.in0 -60.0
|
||||
setp mult2.rpm.in0 60.0
|
||||
#net enc-invert-pos-scale mult2.rps.in0 <= invert.0.out
|
||||
#net enc-get-freq-rps mult2.rps.in1 <= lcec.0.3.enc-frequency
|
||||
#net spindle-vel-fb-rps mult2.rpm.in1 <= mult2.rps.out
|
||||
#net spindle-vel-fb-rpm mult2.rpm.out
|
||||
#net spindle-index-enable lcec.0.3.enc-index-c-enable
|
||||
|
||||
net spindle-vel-fb-rps mult2.rpm.in1 <= lcec.0.0.enc-frequency
|
||||
net spindle-vel-fb-rpm mult2.rpm.out
|
||||
|
||||
net to_encoder metalmusings-encoder.0.index-latch-enable lcec.0.0.enc-index-latch-enable
|
||||
net from_encoder metalmusings-encoder.0.index-status lcec.0.0.index-status
|
||||
net spindle-index-enable metalmusings-encoder.0.index-c-enable
|
||||
|
||||
# ---setup spindle control signals---
|
||||
|
||||
net spindle-vel-cmd-rps <= spindle.0.speed-out-rps
|
||||
net spindle-vel-cmd-rps-abs <= spindle.0.speed-out-rps-abs
|
||||
net spindle-vel-cmd-rpm <= spindle.0.speed-out
|
||||
net spindle-vel-cmd-rpm-abs <= spindle.0.speed-out-abs
|
||||
net spindle-enable <= spindle.0.on
|
||||
net spindle-cw <= spindle.0.forward
|
||||
net spindle-ccw <= spindle.0.reverse
|
||||
net spindle-brake <= spindle.0.brake
|
||||
net spindle-revs => spindle.0.revs
|
||||
net spindle-at-speed => spindle.0.at-speed
|
||||
net spindle-vel-fb-rps => spindle.0.speed-in
|
||||
net spindle-index-enable <=> spindle.0.index-enable
|
||||
|
||||
|
||||
#******************************
|
||||
# connect miscellaneous signals
|
||||
#******************************
|
||||
|
||||
# ---HALUI signals---
|
||||
|
||||
net joint-select-a halui.axis.x.select
|
||||
net x-is-homed halui.joint.0.is-homed
|
||||
net jog-x-pos halui.axis.x.plus
|
||||
net jog-x-neg halui.axis.x.minus
|
||||
net jog-x-analog halui.axis.x.analog
|
||||
net joint-select-b halui.axis.z.select
|
||||
net z-is-homed halui.joint.1.is-homed
|
||||
net jog-z-pos halui.axis.z.plus
|
||||
net jog-z-neg halui.axis.z.minus
|
||||
net jog-z-analog halui.axis.z.analog
|
||||
net jog-selected-pos halui.axis.selected.plus
|
||||
net jog-selected-neg halui.axis.selected.minus
|
||||
net spindle-manual-cw halui.spindle.0.forward
|
||||
net spindle-manual-ccw halui.spindle.0.reverse
|
||||
net spindle-manual-stop halui.spindle.0.stop
|
||||
net machine-is-on halui.machine.is-on
|
||||
net jog-speed halui.axis.jog-speed
|
||||
net MDI-mode halui.mode.is-mdi
|
||||
|
||||
# ---coolant signals---
|
||||
|
||||
net coolant-mist <= iocontrol.0.coolant-mist
|
||||
net coolant-flood <= iocontrol.0.coolant-flood
|
||||
|
||||
# ---probe signal---
|
||||
|
||||
net probe-in => motion.probe-input
|
||||
|
||||
# ---motion control signals---
|
||||
|
||||
net in-position <= motion.in-position
|
||||
net machine-is-enabled <= motion.motion-enabled
|
||||
|
||||
# ---digital in / out signals---
|
||||
|
||||
# ---estop signals---
|
||||
|
||||
net estop-out <= iocontrol.0.user-enable-out
|
||||
net estop-ext => iocontrol.0.emc-enable-in
|
||||
|
||||
# ---manual tool change signals---
|
||||
|
||||
loadusr -W hal_manualtoolchange
|
||||
#net tool-change-request iocontrol.0.tool-change => hal_manualtoolchange.change
|
||||
#net tool-change-confirmed iocontrol.0.tool-changed <= hal_manualtoolchange.changed
|
||||
#net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number
|
||||
#net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
|
||||
|
||||
addf lcec.write-all servo-thread
|
||||
159
linuxcnc/Turner.2ms/Turner.hal~
Normal file
159
linuxcnc/Turner.2ms/Turner.hal~
Normal file
@@ -0,0 +1,159 @@
|
||||
# Generated by PNCconf at Sat Sep 10 10:10:56 2016
|
||||
# If you make changes to this file, they will be
|
||||
# overwritten when you run PNCconf again
|
||||
|
||||
loadrt [KINS]KINEMATICS
|
||||
#autoconverted trivkins
|
||||
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
|
||||
|
||||
loadusr -W lcec_conf ethercat-conf.xml
|
||||
loadrt lcec
|
||||
loadrt metalmusings_encoder
|
||||
|
||||
addf lcec.read-all servo-thread
|
||||
addf metalmusings-encoder.0 servo-thread
|
||||
addf motion-command-handler servo-thread
|
||||
addf motion-controller servo-thread
|
||||
|
||||
#*******************
|
||||
# AXIS X
|
||||
#*******************
|
||||
|
||||
# --- joint signals for motion
|
||||
|
||||
net x-pos-cmd <= joint.0.motor-pos-cmd
|
||||
net x-vel-cmd <= joint.0.vel-cmd
|
||||
net x-pos-fb <= joint.0.motor-pos-fb
|
||||
net x-enable <= joint.0.amp-enable-out
|
||||
|
||||
# --- connect stepper driver to joint
|
||||
# 1/2 of stepper's p/rev 2000 => 1000
|
||||
setp lcec.0.0.steps-per-mm-1 500
|
||||
net x-pos-cmd => lcec.0.0.commanded-position-1
|
||||
net x-pos-fb => lcec.0.0.actual-position-1
|
||||
#net x-enable => lcec.0.0.enable
|
||||
|
||||
#*******************
|
||||
# AXIS Z
|
||||
#*******************
|
||||
|
||||
# --- joint signals for motion
|
||||
|
||||
net z-pos-cmd <= joint.1.motor-pos-cmd
|
||||
net z-vel-cmd <= joint.1.vel-cmd
|
||||
net z-pos-fb <= joint.1.motor-pos-fb
|
||||
net z-enable <= joint.1.amp-enable-out
|
||||
|
||||
# --- connect stepper driver to the joint
|
||||
|
||||
setp lcec.0.0.steps-per-mm-2 400
|
||||
# 1/5 of drive's step/rev
|
||||
net z-pos-cmd => lcec.0.0.commanded-position-2
|
||||
net z-pos-fb => lcec.0.0.actual-position-2
|
||||
# net z-enable => lcec.0.0.enable
|
||||
|
||||
#*********************
|
||||
# E-STOP
|
||||
#*********************
|
||||
|
||||
setp iocontrol.0.emc-enable-in 1
|
||||
#net estop iocontrol.0.emc-enable-in lcec.0.1.din-0
|
||||
|
||||
#setp lcec.0.3.enc-pos-scale [SPINDLE_9]ENCODER_SCALE
|
||||
setp lcec.0.0.enc-pos-scale [SPINDLE_9]ENCODER_SCALE
|
||||
|
||||
#net spindle-revs <= lcec.0.3.enc-pos
|
||||
net spindle-revs <= lcec.0.0.enc-position
|
||||
loadrt invert
|
||||
loadrt mult2 names=mult2.rps,mult2.rpm
|
||||
addf invert.0 servo-thread
|
||||
addf mult2.rps servo-thread
|
||||
addf mult2.rpm servo-thread
|
||||
|
||||
setp invert.0.in [SPINDLE_9]ENCODER_SCALE
|
||||
setp mult2.rpm.in0 -60.0
|
||||
setp mult2.rpm.in0 60.0
|
||||
#net enc-invert-pos-scale mult2.rps.in0 <= invert.0.out
|
||||
#net enc-get-freq-rps mult2.rps.in1 <= lcec.0.3.enc-frequency
|
||||
#net spindle-vel-fb-rps mult2.rpm.in1 <= mult2.rps.out
|
||||
#net spindle-vel-fb-rpm mult2.rpm.out
|
||||
#net spindle-index-enable lcec.0.3.enc-index-c-enable
|
||||
|
||||
net spindle-vel-fb-rps mult2.rpm.in1 <= lcec.0.0.enc-frequency
|
||||
net spindle-vel-fb-rpm mult2.rpm.out
|
||||
|
||||
net to_encoder metalmusings-encoder.0.index-latch-enable lcec.0.0.enc-index-latch-enable
|
||||
net from_encoder metalmusings-encoder.0.index-status lcec.0.0.index-status
|
||||
net spindle-index-enable metalmusings-encoder.0.index-c-enable
|
||||
|
||||
# ---setup spindle control signals---
|
||||
|
||||
net spindle-vel-cmd-rps <= spindle.0.speed-out-rps
|
||||
net spindle-vel-cmd-rps-abs <= spindle.0.speed-out-rps-abs
|
||||
net spindle-vel-cmd-rpm <= spindle.0.speed-out
|
||||
net spindle-vel-cmd-rpm-abs <= spindle.0.speed-out-abs
|
||||
net spindle-enable <= spindle.0.on
|
||||
net spindle-cw <= spindle.0.forward
|
||||
net spindle-ccw <= spindle.0.reverse
|
||||
net spindle-brake <= spindle.0.brake
|
||||
net spindle-revs => spindle.0.revs
|
||||
net spindle-at-speed => spindle.0.at-speed
|
||||
net spindle-vel-fb-rps => spindle.0.speed-in
|
||||
net spindle-index-enable <=> spindle.0.index-enable
|
||||
|
||||
|
||||
#******************************
|
||||
# connect miscellaneous signals
|
||||
#******************************
|
||||
|
||||
# ---HALUI signals---
|
||||
|
||||
net joint-select-a halui.axis.x.select
|
||||
net x-is-homed halui.joint.0.is-homed
|
||||
net jog-x-pos halui.axis.x.plus
|
||||
net jog-x-neg halui.axis.x.minus
|
||||
net jog-x-analog halui.axis.x.analog
|
||||
net joint-select-b halui.axis.z.select
|
||||
net z-is-homed halui.joint.1.is-homed
|
||||
net jog-z-pos halui.axis.z.plus
|
||||
net jog-z-neg halui.axis.z.minus
|
||||
net jog-z-analog halui.axis.z.analog
|
||||
net jog-selected-pos halui.axis.selected.plus
|
||||
net jog-selected-neg halui.axis.selected.minus
|
||||
net spindle-manual-cw halui.spindle.0.forward
|
||||
net spindle-manual-ccw halui.spindle.0.reverse
|
||||
net spindle-manual-stop halui.spindle.0.stop
|
||||
net machine-is-on halui.machine.is-on
|
||||
net jog-speed halui.axis.jog-speed
|
||||
net MDI-mode halui.mode.is-mdi
|
||||
|
||||
# ---coolant signals---
|
||||
|
||||
net coolant-mist <= iocontrol.0.coolant-mist
|
||||
net coolant-flood <= iocontrol.0.coolant-flood
|
||||
|
||||
# ---probe signal---
|
||||
|
||||
net probe-in => motion.probe-input
|
||||
|
||||
# ---motion control signals---
|
||||
|
||||
net in-position <= motion.in-position
|
||||
net machine-is-enabled <= motion.motion-enabled
|
||||
|
||||
# ---digital in / out signals---
|
||||
|
||||
# ---estop signals---
|
||||
|
||||
net estop-out <= iocontrol.0.user-enable-out
|
||||
net estop-ext => iocontrol.0.emc-enable-in
|
||||
|
||||
# ---manual tool change signals---
|
||||
|
||||
loadusr -W hal_manualtoolchange
|
||||
#net tool-change-request iocontrol.0.tool-change => hal_manualtoolchange.change
|
||||
#net tool-change-confirmed iocontrol.0.tool-changed <= hal_manualtoolchange.changed
|
||||
#net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number
|
||||
#net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
|
||||
|
||||
addf lcec.write-all servo-thread
|
||||
164
linuxcnc/Turner.2ms/Turner.ini
Normal file
164
linuxcnc/Turner.2ms/Turner.ini
Normal file
@@ -0,0 +1,164 @@
|
||||
# This config file was created 2016-11-26 11:13:55.093594 by the update_ini script
|
||||
# The original config files may be found in the /home/debian/linuxcnc/configs/Turner/Turner.old directory
|
||||
|
||||
# Generated by PNCconf at Fri Sep 9 22:31:33 2016
|
||||
# If you make changes to this file, they will be
|
||||
# overwritten when you run PNCconf again
|
||||
|
||||
[EMC]
|
||||
# The version string for this INI file.
|
||||
VERSION = 1.1
|
||||
|
||||
MACHINE = Turner
|
||||
DEBUG = 0
|
||||
|
||||
[DISPLAY]
|
||||
LATHE=1
|
||||
DISPLAY = gmoccapy
|
||||
BACK_TOOL_LATHE = 0
|
||||
CYCLE_TIME = 150
|
||||
POSITION_OFFSET = RELATIVE
|
||||
POSITION_FEEDBACK = ACTUAL
|
||||
MAX_FEED_OVERRIDE = 2.000000
|
||||
MAX_SPINDLE_OVERRIDE = 2.000000
|
||||
MIN_SPINDLE_OVERRIDE = 0.500000
|
||||
INTRO_GRAPHIC = linuxcnc.gif
|
||||
INTRO_TIME = 1
|
||||
PROGRAM_PREFIX = /home/debian/linuxcnc/configs/Turner/nc_files
|
||||
INCREMENTS = 5mm 1mm .5mm .1mm .05mm .01mm .005mm
|
||||
LATHE = 1
|
||||
POSITION_FEEDBACK = ACTUAL
|
||||
DEFAULT_LINEAR_VELOCITY = 6.000000
|
||||
MAX_LINEAR_VELOCITY = 25.000000
|
||||
MIN_LINEAR_VELOCITY = 0.500000
|
||||
DEFAULT_ANGULAR_VELOCITY = 12.000000
|
||||
MAX_ANGULAR_VELOCITY = 1800.000000
|
||||
MIN_ANGULAR_VELOCITY = 1.666667
|
||||
EDITOR = gedit
|
||||
|
||||
#EMBED_TAB_NAME = Cycles
|
||||
#EMBED_TAB_LOCATION = ntb_preview
|
||||
#EMBED_TAB_LOCATION = ntb_user_tabs
|
||||
#EMBED_TAB_COMMAND = halcmd loadusr -Wn gladevcp gladevcp -c gladevcp -U notouch=1 -U norun=0 -u lathehandler.py -x {XID} lathemacro.ui
|
||||
|
||||
[FILTER]
|
||||
PROGRAM_EXTENSION = .png,.gif,.jpg Greyscale Depth Image
|
||||
PROGRAM_EXTENSION = .py Python Script
|
||||
png = image-to-gcode
|
||||
gif = image-to-gcode
|
||||
jpg = image-to-gcode
|
||||
py = python
|
||||
|
||||
[RS274NGC]
|
||||
PARAMETER_FILE = linuxcnc.var
|
||||
SUBROUTINE_PATH = .:../../nc_files/subs:nc_files:../../../nc2
|
||||
RS274NGC_STARTUP_CODE = G18 G21 G40 G49 G54 G80 G90 G94 G7 M9 M5 G64 P0.005
|
||||
FEATURES=12
|
||||
USER_M_PATH = nc_files:.
|
||||
|
||||
[EMCMOT]
|
||||
EMCMOT = motmod
|
||||
COMM_TIMEOUT = 1.0
|
||||
COMM_WAIT = 0.010
|
||||
BASE_PERIOD = 100000
|
||||
SERVO_PERIOD = 2000000
|
||||
|
||||
[TASK]
|
||||
TASK = milltask
|
||||
CYCLE_TIME = 0.001
|
||||
|
||||
[HAL]
|
||||
TWOPASS = true
|
||||
HALUI = halui
|
||||
HALFILE = Turner.hal
|
||||
#HALFILE = custom_vfd.hal
|
||||
HALFILE = custom.hal
|
||||
#HALFILE = xhc-hb04.tcl
|
||||
#HALFILE = monitor_xhc-hb04.tcl
|
||||
POSTGUI_HALFILE = postgui_call_list.hal
|
||||
SHUTDOWN = shutdown.hal
|
||||
|
||||
[TRAJ]
|
||||
COORDINATES = X Z
|
||||
LINEAR_UNITS = mm
|
||||
ANGULAR_UNITS = degree
|
||||
CYCLE_TIME = 0.010
|
||||
DEFAULT_LINEAR_VELOCITY = 20.0
|
||||
MAX_LINEAR_VELOCITY = 40.00
|
||||
DEFAULT_ACCELERATION = 400.0
|
||||
MAX_ACCELERATION = 400.0
|
||||
NO_FORCE_HOMING = 1
|
||||
|
||||
[EMCIO]
|
||||
EMCIO = io
|
||||
CYCLE_TIME = 0.100
|
||||
TOOL_TABLE = tool.tbl
|
||||
|
||||
[KINS]
|
||||
KINEMATICS = trivkins coordinates=XZ
|
||||
#This is a best-guess at the number of joints, it should be checked
|
||||
JOINTS = 2
|
||||
|
||||
#********************
|
||||
# Axis X
|
||||
#********************
|
||||
|
||||
[AXIS_X]
|
||||
MIN_LIMIT = -106
|
||||
MAX_LIMIT = 106
|
||||
MAX_VELOCITY = 15.0
|
||||
MAX_ACCELERATION = 400.0
|
||||
|
||||
[JOINT_0]
|
||||
|
||||
TYPE = LINEAR
|
||||
HOME = 0.0
|
||||
FERROR = 0.5
|
||||
MIN_FERROR = 1
|
||||
MAX_VELOCITY = 20.0
|
||||
MAX_ACCELERATION = 400.0
|
||||
MAX_OUTPUT = 0.0
|
||||
MIN_LIMIT = -106
|
||||
MAX_LIMIT = 106
|
||||
HOME_SEARCH_VEL = 0
|
||||
HOME_LATCH_VEL = 0
|
||||
HOME_SEQUENCE = 0
|
||||
|
||||
|
||||
#********************
|
||||
# Axis Z
|
||||
#********************
|
||||
[AXIS_Z]
|
||||
MIN_LIMIT = -560.0
|
||||
MAX_LIMIT = 560.0
|
||||
MAX_VELOCITY = 50.0
|
||||
MAX_ACCELERATION = 400.0
|
||||
|
||||
[JOINT_1]
|
||||
|
||||
TYPE = LINEAR
|
||||
HOME = 0.0
|
||||
FERROR = 0.5
|
||||
MIN_FERROR = 1
|
||||
MAX_VELOCITY = 75.0
|
||||
MAX_ACCELERATION = 400.0
|
||||
HOME_SEARCH_VEL = 0
|
||||
HOME_LATCH_VEL = 0
|
||||
HOME_SEQUENCE = 0
|
||||
|
||||
[SPINDLE_9]
|
||||
P = 0.0
|
||||
I = 0.0
|
||||
D = 0.0
|
||||
FF0 = 1.0
|
||||
FF1 = 0.0
|
||||
FF2 = 0.0
|
||||
BIAS = 0.0
|
||||
DEADBAND = 0.0
|
||||
MAX_OUTPUT = 2400.0
|
||||
OUTPUT_SCALE =5760
|
||||
OUTPUT_MIN_LIMIT = 0
|
||||
OUTPUT_MAX_LIMIT = 2400
|
||||
#ENCODER_SCALE = -4000
|
||||
ENCODER_SCALE = 2000
|
||||
|
||||
164
linuxcnc/Turner.2ms/Turner.ini~
Normal file
164
linuxcnc/Turner.2ms/Turner.ini~
Normal file
@@ -0,0 +1,164 @@
|
||||
# This config file was created 2016-11-26 11:13:55.093594 by the update_ini script
|
||||
# The original config files may be found in the /home/debian/linuxcnc/configs/Turner/Turner.old directory
|
||||
|
||||
# Generated by PNCconf at Fri Sep 9 22:31:33 2016
|
||||
# If you make changes to this file, they will be
|
||||
# overwritten when you run PNCconf again
|
||||
|
||||
[EMC]
|
||||
# The version string for this INI file.
|
||||
VERSION = 1.1
|
||||
|
||||
MACHINE = Turner
|
||||
DEBUG = 0
|
||||
|
||||
[DISPLAY]
|
||||
LATHE=1
|
||||
DISPLAY = gmoccapy
|
||||
BACK_TOOL_LATHE = 0
|
||||
CYCLE_TIME = 150
|
||||
POSITION_OFFSET = RELATIVE
|
||||
POSITION_FEEDBACK = ACTUAL
|
||||
MAX_FEED_OVERRIDE = 2.000000
|
||||
MAX_SPINDLE_OVERRIDE = 2.000000
|
||||
MIN_SPINDLE_OVERRIDE = 0.500000
|
||||
INTRO_GRAPHIC = linuxcnc.gif
|
||||
INTRO_TIME = 1
|
||||
PROGRAM_PREFIX = /home/debian/linuxcnc/configs/Turner/nc_files
|
||||
INCREMENTS = 5mm 1mm .5mm .1mm .05mm .01mm .005mm
|
||||
LATHE = 1
|
||||
POSITION_FEEDBACK = ACTUAL
|
||||
DEFAULT_LINEAR_VELOCITY = 6.000000
|
||||
MAX_LINEAR_VELOCITY = 25.000000
|
||||
MIN_LINEAR_VELOCITY = 0.500000
|
||||
DEFAULT_ANGULAR_VELOCITY = 12.000000
|
||||
MAX_ANGULAR_VELOCITY = 1800.000000
|
||||
MIN_ANGULAR_VELOCITY = 1.666667
|
||||
EDITOR = gedit
|
||||
|
||||
#EMBED_TAB_NAME = Cycles
|
||||
#EMBED_TAB_LOCATION = ntb_preview
|
||||
#EMBED_TAB_LOCATION = ntb_user_tabs
|
||||
#EMBED_TAB_COMMAND = halcmd loadusr -Wn gladevcp gladevcp -c gladevcp -U notouch=1 -U norun=0 -u lathehandler.py -x {XID} lathemacro.ui
|
||||
|
||||
[FILTER]
|
||||
PROGRAM_EXTENSION = .png,.gif,.jpg Greyscale Depth Image
|
||||
PROGRAM_EXTENSION = .py Python Script
|
||||
png = image-to-gcode
|
||||
gif = image-to-gcode
|
||||
jpg = image-to-gcode
|
||||
py = python
|
||||
|
||||
[RS274NGC]
|
||||
PARAMETER_FILE = linuxcnc.var
|
||||
SUBROUTINE_PATH = .:../../nc_files/subs:nc_files:../../../nc2
|
||||
RS274NGC_STARTUP_CODE = G18 G21 G40 G49 G54 G80 G90 G94 G7 M9 M5 G64 P0.005
|
||||
FEATURES=12
|
||||
USER_M_PATH = nc_files:.
|
||||
|
||||
[EMCMOT]
|
||||
EMCMOT = motmod
|
||||
COMM_TIMEOUT = 1.0
|
||||
COMM_WAIT = 0.010
|
||||
BASE_PERIOD = 100000
|
||||
SERVO_PERIOD = 1000000
|
||||
|
||||
[TASK]
|
||||
TASK = milltask
|
||||
CYCLE_TIME = 0.001
|
||||
|
||||
[HAL]
|
||||
TWOPASS = true
|
||||
HALUI = halui
|
||||
HALFILE = Turner.hal
|
||||
#HALFILE = custom_vfd.hal
|
||||
HALFILE = custom.hal
|
||||
#HALFILE = xhc-hb04.tcl
|
||||
#HALFILE = monitor_xhc-hb04.tcl
|
||||
POSTGUI_HALFILE = postgui_call_list.hal
|
||||
SHUTDOWN = shutdown.hal
|
||||
|
||||
[TRAJ]
|
||||
COORDINATES = X Z
|
||||
LINEAR_UNITS = mm
|
||||
ANGULAR_UNITS = degree
|
||||
CYCLE_TIME = 0.010
|
||||
DEFAULT_LINEAR_VELOCITY = 20.0
|
||||
MAX_LINEAR_VELOCITY = 40.00
|
||||
DEFAULT_ACCELERATION = 400.0
|
||||
MAX_ACCELERATION = 400.0
|
||||
NO_FORCE_HOMING = 1
|
||||
|
||||
[EMCIO]
|
||||
EMCIO = io
|
||||
CYCLE_TIME = 0.100
|
||||
TOOL_TABLE = tool.tbl
|
||||
|
||||
[KINS]
|
||||
KINEMATICS = trivkins coordinates=XZ
|
||||
#This is a best-guess at the number of joints, it should be checked
|
||||
JOINTS = 2
|
||||
|
||||
#********************
|
||||
# Axis X
|
||||
#********************
|
||||
|
||||
[AXIS_X]
|
||||
MIN_LIMIT = -106
|
||||
MAX_LIMIT = 106
|
||||
MAX_VELOCITY = 15.0
|
||||
MAX_ACCELERATION = 400.0
|
||||
|
||||
[JOINT_0]
|
||||
|
||||
TYPE = LINEAR
|
||||
HOME = 0.0
|
||||
FERROR = 0.5
|
||||
MIN_FERROR = 1
|
||||
MAX_VELOCITY = 20.0
|
||||
MAX_ACCELERATION = 400.0
|
||||
MAX_OUTPUT = 0.0
|
||||
MIN_LIMIT = -106
|
||||
MAX_LIMIT = 106
|
||||
HOME_SEARCH_VEL = 0
|
||||
HOME_LATCH_VEL = 0
|
||||
HOME_SEQUENCE = 0
|
||||
|
||||
|
||||
#********************
|
||||
# Axis Z
|
||||
#********************
|
||||
[AXIS_Z]
|
||||
MIN_LIMIT = -560.0
|
||||
MAX_LIMIT = 560.0
|
||||
MAX_VELOCITY = 50.0
|
||||
MAX_ACCELERATION = 400.0
|
||||
|
||||
[JOINT_1]
|
||||
|
||||
TYPE = LINEAR
|
||||
HOME = 0.0
|
||||
FERROR = 0.5
|
||||
MIN_FERROR = 1
|
||||
MAX_VELOCITY = 75.0
|
||||
MAX_ACCELERATION = 400.0
|
||||
HOME_SEARCH_VEL = 0
|
||||
HOME_LATCH_VEL = 0
|
||||
HOME_SEQUENCE = 0
|
||||
|
||||
[SPINDLE_9]
|
||||
P = 0.0
|
||||
I = 0.0
|
||||
D = 0.0
|
||||
FF0 = 1.0
|
||||
FF1 = 0.0
|
||||
FF2 = 0.0
|
||||
BIAS = 0.0
|
||||
DEADBAND = 0.0
|
||||
MAX_OUTPUT = 2400.0
|
||||
OUTPUT_SCALE =5760
|
||||
OUTPUT_MIN_LIMIT = 0
|
||||
OUTPUT_MAX_LIMIT = 2400
|
||||
#ENCODER_SCALE = -4000
|
||||
ENCODER_SCALE = 2000
|
||||
|
||||
79
linuxcnc/Turner.2ms/Turner.pref
Normal file
79
linuxcnc/Turner.2ms/Turner.pref
Normal file
@@ -0,0 +1,79 @@
|
||||
[DEFAULT]
|
||||
dro_digits = 3
|
||||
dro_size = 28
|
||||
abs_color = #0000FF
|
||||
rel_color = #000000
|
||||
dtg_color = #FFFF00
|
||||
homed_color = #00FF00
|
||||
unhomed_color = #FF0000
|
||||
enable_dro = False
|
||||
scale_jog_vel = 24.0
|
||||
scale_spindle_override = 1
|
||||
scale_feed_override = 1
|
||||
scale_rapid_override = 1
|
||||
spindle_bar_min = 0.0
|
||||
spindle_bar_max = 6000.0
|
||||
turtle_jog_factor = 20
|
||||
hide_turtle_jog_button = False
|
||||
unlock_code = 123
|
||||
toggle_readout = True
|
||||
spindle_start_rpm = 300.0
|
||||
kbd_height = 250
|
||||
view = y
|
||||
blockheight = 0.0
|
||||
reload_tool = False
|
||||
open_file =
|
||||
screen1 = window
|
||||
hide_titlebar = False
|
||||
x_pos = 40
|
||||
y_pos = 30
|
||||
width = 979
|
||||
height = 750
|
||||
use_toolmeasurement = False
|
||||
gtk_theme = Follow System Theme
|
||||
icon_theme = classic
|
||||
audio_enabled = True
|
||||
audio_alert = /usr/share/sounds/freedesktop/stereo/dialog-warning.oga
|
||||
audio_error = /usr/share/sounds/freedesktop/stereo/dialog-error.oga
|
||||
grid_size = 1.0
|
||||
mouse_btn_mode = 4
|
||||
hide_cursor = False
|
||||
hide_tooltips = False
|
||||
system_name_tool = Tool
|
||||
system_name_g5x = G5x
|
||||
system_name_rot = Rot
|
||||
system_name_g92 = G92
|
||||
system_name_g54 = G54
|
||||
system_name_g55 = G55
|
||||
system_name_g56 = G56
|
||||
system_name_g57 = G57
|
||||
system_name_g58 = G58
|
||||
system_name_g59 = G59
|
||||
system_name_g59.1 = G59.1
|
||||
system_name_g59.2 = G59.2
|
||||
system_name_g59.3 = G59.3
|
||||
jump_to_dir = /home/debian
|
||||
show_keyboard_on_offset = False
|
||||
show_keyboard_on_tooledit = False
|
||||
show_keyboard_on_edit = False
|
||||
show_keyboard_on_mdi = False
|
||||
show_keyboard_on_file_selection = False
|
||||
x_pos_popup = 45.0
|
||||
y_pos_popup = 55
|
||||
width_popup = 250.0
|
||||
max_messages = 10
|
||||
message_font = sans 10
|
||||
use_frames = True
|
||||
blockdel = False
|
||||
show_offsets = False
|
||||
show_dtg = False
|
||||
view_tool_path = False
|
||||
view_dimension = True
|
||||
run_from_line = no_run
|
||||
unlock_way = no
|
||||
show_preview_on_offset = False
|
||||
use_keyboard_shortcuts = False
|
||||
offset_axis_z = 150.0
|
||||
diameter offset_axis_x = 0
|
||||
offset_axis_x = 0.0
|
||||
|
||||
BIN
linuxcnc/Turner.2ms/__pycache__/lathehandler.cpython-311.pyc
Normal file
BIN
linuxcnc/Turner.2ms/__pycache__/lathehandler.cpython-311.pyc
Normal file
Binary file not shown.
27
linuxcnc/Turner.2ms/autosave.halscope
Normal file
27
linuxcnc/Turner.2ms/autosave.halscope
Normal file
@@ -0,0 +1,27 @@
|
||||
THREAD servo-thread
|
||||
MAXCHAN 4
|
||||
HMULT 1
|
||||
HZOOM 1
|
||||
HPOS 4,132653e-01
|
||||
CHAN 1
|
||||
PIN lcec.0.0.D1
|
||||
VSCALE 1
|
||||
VPOS 0,781382
|
||||
VOFF 0,000000e+00
|
||||
CHAN 2
|
||||
PIN lcec.0.0.DiffT
|
||||
VSCALE 0
|
||||
VPOS 0,678420
|
||||
VOFF 0,000000e+00
|
||||
CHAN 3
|
||||
PIN lcec.0.0.D3
|
||||
VSCALE 1
|
||||
VPOS 0,743300
|
||||
VOFF 2,000000e+02
|
||||
CHAN 4
|
||||
PIN lcec.0.0.D4
|
||||
VSCALE 5
|
||||
VPOS 0,364679
|
||||
VOFF 0,000000e+00
|
||||
TMODE 1
|
||||
RMODE 2
|
||||
64
linuxcnc/Turner.2ms/boring.ngc
Normal file
64
linuxcnc/Turner.2ms/boring.ngc
Normal file
@@ -0,0 +1,64 @@
|
||||
;boring
|
||||
|
||||
O<boring> sub
|
||||
|
||||
G8 ; Radius mode (easier maths)
|
||||
G18 ; XZ Plane
|
||||
G21 ; Metric Units
|
||||
G90 ; Absolute Distance
|
||||
G91.1 ; but not for arcs
|
||||
|
||||
M6 T#8 G43
|
||||
|
||||
#1 = [#1 / 2] ; because of radius mode
|
||||
|
||||
#14 = [#<_x>] (starting X)
|
||||
#13 = #<_z> (starting Z)
|
||||
|
||||
#20 = [#6 * SIN[#7]]
|
||||
#21 = [-#6 * COS[#7]]
|
||||
#22 = [#6 / COS[#7]]
|
||||
#23 = [#5 + #6 - #20]
|
||||
#24 = [[#23 - #13] * TAN[#7]]
|
||||
|
||||
|
||||
G96 D2500 S#2 ; Constant Surface Speed Mode
|
||||
m3 ;Start Spindle
|
||||
g95 F#4 ; Feed-Per-Rev Mode
|
||||
|
||||
O90 IF [#9 GT 0.5]
|
||||
M8
|
||||
O90 ENDIF
|
||||
|
||||
g4p1 ; Wait to reach speed
|
||||
|
||||
(debug, Turning finish dia #1 start dia #14 start length #13 finish length #5 coolant #9)
|
||||
O100 WHILE [#14 LT [#1 - #3]]
|
||||
g0 X #14
|
||||
#14=[#14 + #3]
|
||||
G1 X #14
|
||||
G1 Z #23 X[#14 + #24]
|
||||
O101 IF [#6 GT 0]
|
||||
G3 Z#5 X[#14 + #24 + #21] I#21 K#20
|
||||
G1 X[#14 + #24 + #21 - #3]
|
||||
O101 ELSE
|
||||
G1 X[#14 + #24 - [#3 * 1.5]]
|
||||
O101 ENDIF
|
||||
G0 Z[#13]
|
||||
O100 ENDWHILE
|
||||
|
||||
G0 x#1
|
||||
G1 Z #23 X[#1 + #24]
|
||||
O102 IF [#6 GT 0]
|
||||
G3 Z#5 X[#1 + #24 + #21] I#21 K#20
|
||||
G1 X[#1 + #24 + #21 - #3]
|
||||
O102 ELSE
|
||||
G1 X[#1 + #24 - #3]
|
||||
O102 ENDIF
|
||||
G0 Z #13
|
||||
G0 X #1 ; For touch-off
|
||||
M5 M9
|
||||
G7
|
||||
O<boring> endsub
|
||||
|
||||
M2
|
||||
77
linuxcnc/Turner.2ms/chamfer.ngc
Normal file
77
linuxcnc/Turner.2ms/chamfer.ngc
Normal file
@@ -0,0 +1,77 @@
|
||||
;chamfer
|
||||
|
||||
O<chamfer> sub
|
||||
|
||||
G8 ; Lathe radius Mode
|
||||
G18 ; XZ Plane
|
||||
G21 ; Metric Units
|
||||
G90 ; Absolute Distance
|
||||
|
||||
|
||||
M6 T#6 G43
|
||||
|
||||
#1 = [#1 / 2] ; because of radius mode
|
||||
|
||||
#14 = [#<_x>] (starting X)
|
||||
#13 = [#<_z>] (starting Z)
|
||||
|
||||
G96 D1500 S#2 ; Constant Surface Speed Mode
|
||||
M3
|
||||
g95 F0.1 ; Feed-Per-Rev Mode
|
||||
|
||||
O90 IF [#12 GT 0.5]
|
||||
M8
|
||||
O90 ENDIF
|
||||
|
||||
#20 = 0
|
||||
O101 if [#9 GT 0.5] ; front outside
|
||||
o100 while [[#20 + #3] lt #8]
|
||||
#20 = [#20 + #3]
|
||||
g0 x[#1 - #20] z#13
|
||||
g1 z#5
|
||||
g1 x#1 z[#5 - #20]
|
||||
g1 x #14
|
||||
g0 z#13
|
||||
o100 endwhile
|
||||
g0 x#14 z#13
|
||||
g0 x[#1 - #8]
|
||||
g1 z#5
|
||||
g1 x#1 z[#5 - #8]
|
||||
g1 x #14
|
||||
g0 z#13
|
||||
O101 elseif [#10 GT 0.5] ; front inside
|
||||
o102 while [[#20 + #3] lt #8]
|
||||
#20 = [#20 + #3]
|
||||
g0 x[#1 + #20] z#13
|
||||
g1 z#5
|
||||
g1 x#1 z[#5 - #20]
|
||||
g1 x #14
|
||||
g0 z#13
|
||||
o102 endwhile
|
||||
g0 x#14 z#13
|
||||
g0 x[#1 + #8]
|
||||
g1 z#5
|
||||
g1 x#1 z[#5 - #8]
|
||||
g1 x #14
|
||||
g0 z#13
|
||||
O101 elseif [#11 GT 0.5] ; back outside
|
||||
o103 while [[#20 + #3] lt #8]
|
||||
#20 = [#20 + #3]
|
||||
g0 x[#1 - #20] z#13
|
||||
g1 z#5
|
||||
g1 x#1 z[#5 + #20]
|
||||
g1 x #14
|
||||
g0 z#13
|
||||
o103 endwhile
|
||||
g0 x#14 z#13
|
||||
g0 x[#1 - #8]
|
||||
g1 z#5
|
||||
g1 x#1 z[#5 + #8]
|
||||
g1 x #14
|
||||
g0 z#13
|
||||
O101 endif
|
||||
M5 M9
|
||||
G7
|
||||
O<chamfer> endsub
|
||||
m2
|
||||
%
|
||||
31
linuxcnc/Turner.2ms/core_sim_lathe.hal
Normal file
31
linuxcnc/Turner.2ms/core_sim_lathe.hal
Normal file
@@ -0,0 +1,31 @@
|
||||
# core HAL config file for simulation
|
||||
|
||||
# first load all the RT modules that will be needed
|
||||
# kinematics
|
||||
loadrt [KINS]KINEMATICS
|
||||
# motion controller, get name and thread periods from ini file
|
||||
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
|
||||
|
||||
# add motion controller functions to servo thread
|
||||
addf motion-command-handler servo-thread
|
||||
addf motion-controller servo-thread
|
||||
|
||||
# create HAL signals for position commands from motion module
|
||||
# loop position commands back to motion module feedback
|
||||
net Xpos joint.0.motor-pos-cmd => joint.0.motor-pos-fb
|
||||
net Zpos joint.1.motor-pos-cmd => joint.1.motor-pos-fb
|
||||
|
||||
# estop loopback
|
||||
net estop-loop iocontrol.0.user-enable-out iocontrol.0.emc-enable-in
|
||||
|
||||
# create signals for tool loading loopback
|
||||
net tool-prep-loop iocontrol.0.tool-prepare iocontrol.0.tool-prepared
|
||||
net tool-change-loop iocontrol.0.tool-change iocontrol.0.tool-changed
|
||||
|
||||
net spindle-fwd spindle.0.forward
|
||||
net spindle-rev spindle.0.reverse
|
||||
#net spindle-speed spindle.0.speed-out
|
||||
|
||||
net lube iocontrol.0.lube
|
||||
net flood iocontrol.0.coolant-flood
|
||||
net mist iocontrol.0.coolant-mist
|
||||
59
linuxcnc/Turner.2ms/core_sim_lathe_C.hal
Normal file
59
linuxcnc/Turner.2ms/core_sim_lathe_C.hal
Normal file
@@ -0,0 +1,59 @@
|
||||
# core HAL config file for simulation
|
||||
|
||||
# first load all the RT modules that will be needed
|
||||
# kinematics
|
||||
loadrt [KINS]KINEMATICS
|
||||
# motion controller, get name and thread periods from ini file
|
||||
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
|
||||
# load 6 differentiators (for velocity and accel signals
|
||||
loadrt ddt names=ddt_x,ddt_xv,ddt_y,ddt_yv,ddt_z,ddt_zv
|
||||
# load additional blocks
|
||||
loadrt hypot names=vel_xy,vel_xyz
|
||||
|
||||
# add motion controller functions to servo thread
|
||||
addf motion-command-handler servo-thread
|
||||
addf motion-controller servo-thread
|
||||
# link the differentiator functions into the code
|
||||
addf ddt_x servo-thread
|
||||
addf ddt_xv servo-thread
|
||||
addf ddt_y servo-thread
|
||||
addf ddt_yv servo-thread
|
||||
addf ddt_z servo-thread
|
||||
addf ddt_zv servo-thread
|
||||
addf vel_xy servo-thread
|
||||
addf vel_xyz servo-thread
|
||||
|
||||
# create HAL signals for position commands from motion module
|
||||
# loop position commands back to motion module feedback
|
||||
net Xpos joint.0.motor-pos-cmd => joint.0.motor-pos-fb ddt_x.in
|
||||
net Zpos joint.1.motor-pos-cmd => joint.1.motor-pos-fb ddt_z.in
|
||||
net Cpos joint.2.motor-pos-cmd => joint.2.motor-pos-fb
|
||||
|
||||
|
||||
# send the position commands thru differentiators to
|
||||
# generate velocity and accel signals
|
||||
net Xvel ddt_x.out => ddt_xv.in vel_xy.in0
|
||||
net Xacc <= ddt_xv.out
|
||||
net Yvel ddt_y.out => ddt_yv.in vel_xy.in1
|
||||
net Yacc <= ddt_yv.out
|
||||
net Zvel ddt_z.out => ddt_zv.in vel_xyz.in0
|
||||
net Zacc <= ddt_zv.out
|
||||
|
||||
# Cartesian 2- and 3-axis velocities
|
||||
net XYvel vel_xy.out => vel_xyz.in1
|
||||
net XYZvel <= vel_xyz.out
|
||||
|
||||
# estop loopback
|
||||
net estop-loop iocontrol.0.user-enable-out iocontrol.0.emc-enable-in
|
||||
|
||||
# create signals for tool loading loopback
|
||||
net tool-prep-loop iocontrol.0.tool-prepare iocontrol.0.tool-prepared
|
||||
net tool-change-loop iocontrol.0.tool-change iocontrol.0.tool-changed
|
||||
|
||||
net spindle-fwd spindle.0.forward
|
||||
net spindle-rev spindle.0.reverse
|
||||
#net spindle-speed spindle.0.speed-out
|
||||
|
||||
net lube iocontrol.0.lube
|
||||
net flood iocontrol.0.coolant-flood
|
||||
net mist iocontrol.0.coolant-mist
|
||||
59
linuxcnc/Turner.2ms/core_sim_lathe_CW.hal
Normal file
59
linuxcnc/Turner.2ms/core_sim_lathe_CW.hal
Normal file
@@ -0,0 +1,59 @@
|
||||
# core HAL config file for simulation
|
||||
|
||||
# first load all the RT modules that will be needed
|
||||
# kinematics
|
||||
loadrt [KINS]KINEMATICS
|
||||
# motion controller, get name and thread periods from ini file
|
||||
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
|
||||
# load 6 differentiators (for velocity and accel signals
|
||||
loadrt ddt names=ddt_x,ddt_xv,ddt_y,ddt_yv,ddt_z,ddt_zv
|
||||
# load additional blocks
|
||||
loadrt hypot names=vel_xy,vel_xyz
|
||||
|
||||
# add motion controller functions to servo thread
|
||||
addf motion-command-handler servo-thread
|
||||
addf motion-controller servo-thread
|
||||
# link the differentiator functions into the code
|
||||
addf ddt_x servo-thread
|
||||
addf ddt_xv servo-thread
|
||||
addf ddt_y servo-thread
|
||||
addf ddt_yv servo-thread
|
||||
addf ddt_z servo-thread
|
||||
addf ddt_zv servo-thread
|
||||
addf vel_xy servo-thread
|
||||
addf vel_xyz servo-thread
|
||||
|
||||
# create HAL signals for position commands from motion module
|
||||
# loop position commands back to motion module feedback
|
||||
net Xpos joint.0.motor-pos-cmd => joint.0.motor-pos-fb ddt_x.in
|
||||
net Zpos joint.1.motor-pos-cmd => joint.1.motor-pos-fb ddt_z.in
|
||||
net Cpos joint.2.motor-pos-cmd => joint.2.motor-pos-fb
|
||||
net Wpos joint.3.motor-pos-cmd => joint.3.motor-pos-fb
|
||||
|
||||
# send the position commands thru differentiators to
|
||||
# generate velocity and accel signals
|
||||
net Xvel ddt_x.out => ddt_xv.in vel_xy.in0
|
||||
net Xacc <= ddt_xv.out
|
||||
net Yvel ddt_y.out => ddt_yv.in vel_xy.in1
|
||||
net Yacc <= ddt_yv.out
|
||||
net Zvel ddt_z.out => ddt_zv.in vel_xyz.in0
|
||||
net Zacc <= ddt_zv.out
|
||||
|
||||
# Cartesian 2- and 3-axis velocities
|
||||
net XYvel vel_xy.out => vel_xyz.in1
|
||||
net XYZvel <= vel_xyz.out
|
||||
|
||||
# estop loopback
|
||||
net estop-loop iocontrol.0.user-enable-out iocontrol.0.emc-enable-in
|
||||
|
||||
# create signals for tool loading loopback
|
||||
net tool-prep-loop iocontrol.0.tool-prepare iocontrol.0.tool-prepared
|
||||
net tool-change-loop iocontrol.0.tool-change iocontrol.0.tool-changed
|
||||
|
||||
net spindle-fwd spindle.0.forward
|
||||
net spindle-rev spindle.0.reverse
|
||||
#net spindle-speed spindle.0.speed-out
|
||||
|
||||
net lube iocontrol.0.lube
|
||||
net flood iocontrol.0.coolant-flood
|
||||
net mist iocontrol.0.coolant-mist
|
||||
4
linuxcnc/Turner.2ms/custom.hal
Normal file
4
linuxcnc/Turner.2ms/custom.hal
Normal file
@@ -0,0 +1,4 @@
|
||||
|
||||
# Gamepad
|
||||
loadusr -W hal_input -KRAL F310
|
||||
# Resten är i custom_postgui.hal
|
||||
51
linuxcnc/Turner.2ms/custom.hal~
Normal file
51
linuxcnc/Turner.2ms/custom.hal~
Normal file
@@ -0,0 +1,51 @@
|
||||
# Include your custom HAL commands here
|
||||
|
||||
# Load the Huanyang VFD user component
|
||||
loadusr -Wn spindle-vfd hy_vfd -n spindle-vfd -d /dev/hy_vfd -r 19200 -p none -s 1 -b 8
|
||||
|
||||
# motion.spindle-speed-in needs rev per second
|
||||
loadrt scale names=scale.0,scale.1,scale.2
|
||||
# scale.0 gearbox via M101-M106, M101 being lowest gear.
|
||||
# scale.1 Inverted gear ratio
|
||||
# scale.2 motion.spindle-speed.in in rev/sec
|
||||
loadrt limit2 names=spindlemax
|
||||
loadrt mult2 names=mult2.1
|
||||
addf scale.0 servo-thread
|
||||
addf scale.1 servo-thread
|
||||
addf scale.2 servo-thread
|
||||
addf mult2.1 servo-thread
|
||||
addf spindlemax servo-thread
|
||||
setp scale.0.gain 0.8846 # Start with fourth gear
|
||||
setp scale.1.gain 1.13045
|
||||
setp scale.2.gain 0.0166666667
|
||||
setp mult2.1.in1 25.0
|
||||
unlinkp spindle.0.forward
|
||||
unlinkp spindle.0.reverse
|
||||
unlinkp spindle.0.on
|
||||
#unlinkp motion.spindle-at-speed
|
||||
net spindle-fwd spindle.0.forward => spindle-vfd.spindle-forward
|
||||
net spindle-reverse spindle.0.reverse => spindle-vfd.spindle-reverse
|
||||
net spindle-on spindle.0.on => spindle-vfd.spindle-on
|
||||
net spindle-at-speed <= spindle-vfd.spindle-at-speed
|
||||
#net spindle-enable => spindle-vfd.enable
|
||||
setp spindle-vfd.enable 1
|
||||
|
||||
# Prepare max limit rpm for spindle
|
||||
net spindle-max-freq spindle-vfd.max-freq => mult2.1.in0
|
||||
net spindle-max-rpm mult2.1.out => spindlemax.max # Max limit for motor rpm, like 67*25 = 1675
|
||||
|
||||
# Give speed to vfd, limited to max possible
|
||||
unlinkp spindle.0.speed-out-abs
|
||||
net spindle-speed-scale spindle.0.speed-out-abs => scale.1.in # Spindle rpm => Motor rpm
|
||||
net spindle-speed-cmd-unlimited scale.1.out => spindlemax.in # Limit spindle rpm
|
||||
net spindle-speed-cmd-limited spindlemax.out => spindle-vfd.speed-command # Feed to vfd
|
||||
|
||||
# Convert actual feed from rpm to rps, consider gear in use.
|
||||
unlinkp spindle.0.speed-in
|
||||
net spindle-speed-scale2 spindle-vfd.spindle-speed-fb => scale.2.in # Motor rpm => Motor rps
|
||||
net spindle-speed-gears scale.2.out => scale.0.in # Motor rps => spindle rps
|
||||
net spindle-speed-in scale.0.out => spindle.0.speed-in
|
||||
|
||||
# Gamepad
|
||||
loadusr -W hal_input -KRAL F310
|
||||
# Resten är i custom_postgui.hal
|
||||
74
linuxcnc/Turner.2ms/custom_postgui.hal
Normal file
74
linuxcnc/Turner.2ms/custom_postgui.hal
Normal file
@@ -0,0 +1,74 @@
|
||||
# Include your custom_postgui HAL commands here
|
||||
# This file will not be overwritten when you run PNCconf again
|
||||
|
||||
loadrt or2 count=2
|
||||
loadrt mux4 count=1
|
||||
loadrt and2 count=4
|
||||
loadrt oneshot count=1
|
||||
|
||||
addf or2.0 servo-thread
|
||||
addf or2.1 servo-thread
|
||||
addf mux4.0 servo-thread
|
||||
addf and2.0 servo-thread
|
||||
addf and2.1 servo-thread
|
||||
addf and2.2 servo-thread
|
||||
addf and2.3 servo-thread
|
||||
addf oneshot.0 servo-thread
|
||||
|
||||
setp mux4.0.in0 0
|
||||
setp mux4.0.in1 25
|
||||
setp mux4.0.in2 50
|
||||
setp mux4.0.in3 1000
|
||||
|
||||
net remote-speed-slow or2.0.in0 <= input.0.btn-x
|
||||
net remote-speed-medium or2.1.in0 <= input.0.btn-a
|
||||
net remote-speed-fast or2.0.in1 <= input.0.btn-b
|
||||
net remote-speed-fast or2.1.in1 <= input.0.btn-b
|
||||
|
||||
net joy-speed-1 mux4.0.sel0 <= or2.0.out
|
||||
net joy-speed-2 mux4.0.sel1 <= or2.1.out
|
||||
net jog-speed <= mux4.0.out
|
||||
|
||||
net jog-x-analog <= input.0.abs-y-position
|
||||
net jog-z-analog <= input.0.abs-x-position
|
||||
|
||||
# Spindle start+manual and stop
|
||||
|
||||
net manual-mode-spindle-lock and2.3.in0 halui.mode.manual <= input.0.btn-mode
|
||||
net spindle-safe-start and2.3.in1 <= input.0.btn-tr
|
||||
net spindle-manual-cw <= and2.3.out
|
||||
net spindle-manual-stop <= input.0.btn-tl
|
||||
|
||||
# E-stop
|
||||
|
||||
net estop halui.estop.activate <= input.0.btn-y
|
||||
|
||||
# net manual-mode halui.mode.manual <= input.0.btn-mode
|
||||
|
||||
# Start/pause/resume stop
|
||||
|
||||
setp oneshot.0.width 0.0011
|
||||
setp oneshot.0.retriggerable 0
|
||||
setp oneshot.0.rising 1
|
||||
setp oneshot.0.falling 0
|
||||
|
||||
net program-is-idle halui.program.is-idle => and2.0.in0
|
||||
net program-is-running halui.program.is-running => and2.1.in0
|
||||
net program-is-paused halui.program.is-paused => and2.2.in0
|
||||
net button-edge-trig input.0.btn-start => oneshot.0.in
|
||||
net button-start oneshot.0.out => and2.0.in1 and2.1.in1 and2.2.in1
|
||||
|
||||
net program-start and2.0.out => halui.program.run halui.mode.auto
|
||||
net program-pause and2.1.out => halui.program.pause
|
||||
net program-resume and2.2.out => halui.program.resume
|
||||
net program-stop input.0.btn-select => halui.program.stop
|
||||
|
||||
net spindle-at-speed gmoccapy.spindle_at_speed_led
|
||||
net spindle-vel-fb-rpm => gmoccapy.spindle_feedback_bar
|
||||
|
||||
net tool-change gmoccapy.toolchange-change <= iocontrol.0.tool-change
|
||||
net tool-changed gmoccapy.toolchange-changed <= iocontrol.0.tool-changed
|
||||
net tool-prep-number gmoccapy.toolchange-number <= iocontrol.0.tool-prep-number
|
||||
net tool-prep-loop iocontrol.0.tool-prepare <= iocontrol.0.tool-prepared
|
||||
net tooloffset-x gmoccapy.tooloffset-x <= motion.tooloffset.x
|
||||
net tooloffset-z gmoccapy.tooloffset-z <= motion.tooloffset.z
|
||||
48
linuxcnc/Turner.2ms/custom_vfd.hal
Normal file
48
linuxcnc/Turner.2ms/custom_vfd.hal
Normal file
@@ -0,0 +1,48 @@
|
||||
# Include your custom HAL commands here
|
||||
|
||||
# Load the Huanyang VFD user component
|
||||
loadusr -Wn spindle-vfd hy_vfd -n spindle-vfd -d /dev/hy_vfd -r 19200 -p none -s 1 -b 8
|
||||
|
||||
# motion.spindle-speed-in needs rev per second
|
||||
loadrt scale names=scale.0,scale.1,scale.2
|
||||
# scale.0 gearbox via M101-M106, M101 being lowest gear.
|
||||
# scale.1 Inverted gear ratio
|
||||
# scale.2 motion.spindle-speed.in in rev/sec
|
||||
loadrt limit2 names=spindlemax
|
||||
loadrt mult2 names=mult2.1
|
||||
addf scale.0 servo-thread
|
||||
addf scale.1 servo-thread
|
||||
addf scale.2 servo-thread
|
||||
addf mult2.1 servo-thread
|
||||
addf spindlemax servo-thread
|
||||
setp scale.0.gain 0.8846 # Start with fourth gear
|
||||
setp scale.1.gain 1.13045
|
||||
setp scale.2.gain 0.0166666667
|
||||
setp mult2.1.in1 25.0
|
||||
unlinkp spindle.0.forward
|
||||
unlinkp spindle.0.reverse
|
||||
unlinkp spindle.0.on
|
||||
#unlinkp motion.spindle-at-speed
|
||||
net spindle-fwd spindle.0.forward => spindle-vfd.spindle-forward
|
||||
net spindle-reverse spindle.0.reverse => spindle-vfd.spindle-reverse
|
||||
net spindle-on spindle.0.on => spindle-vfd.spindle-on
|
||||
net spindle-at-speed <= spindle-vfd.spindle-at-speed
|
||||
#net spindle-enable => spindle-vfd.enable
|
||||
setp spindle-vfd.enable 1
|
||||
|
||||
# Prepare max limit rpm for spindle
|
||||
net spindle-max-freq spindle-vfd.max-freq => mult2.1.in0
|
||||
net spindle-max-rpm mult2.1.out => spindlemax.max # Max limit for motor rpm, like 67*25 = 1675
|
||||
|
||||
# Give speed to vfd, limited to max possible
|
||||
unlinkp spindle.0.speed-out-abs
|
||||
net spindle-speed-scale spindle.0.speed-out-abs => scale.1.in # Spindle rpm => Motor rpm
|
||||
net spindle-speed-cmd-unlimited scale.1.out => spindlemax.in # Limit spindle rpm
|
||||
net spindle-speed-cmd-limited spindlemax.out => spindle-vfd.speed-command # Feed to vfd
|
||||
|
||||
# Convert actual feed from rpm to rps, consider gear in use.
|
||||
unlinkp spindle.0.speed-in
|
||||
net spindle-speed-scale2 spindle-vfd.spindle-speed-fb => scale.2.in # Motor rpm => Motor rps
|
||||
net spindle-speed-gears scale.2.out => scale.0.in # Motor rps => spindle rps
|
||||
net spindle-speed-in scale.0.out => spindle.0.speed-in
|
||||
|
||||
51
linuxcnc/Turner.2ms/custom_vfd.hal~
Normal file
51
linuxcnc/Turner.2ms/custom_vfd.hal~
Normal file
@@ -0,0 +1,51 @@
|
||||
# Include your custom HAL commands here
|
||||
|
||||
# Load the Huanyang VFD user component
|
||||
loadusr -Wn spindle-vfd hy_vfd -n spindle-vfd -d /dev/hy_vfd -r 19200 -p none -s 1 -b 8
|
||||
|
||||
# motion.spindle-speed-in needs rev per second
|
||||
loadrt scale names=scale.0,scale.1,scale.2
|
||||
# scale.0 gearbox via M101-M106, M101 being lowest gear.
|
||||
# scale.1 Inverted gear ratio
|
||||
# scale.2 motion.spindle-speed.in in rev/sec
|
||||
loadrt limit2 names=spindlemax
|
||||
loadrt mult2 names=mult2.1
|
||||
addf scale.0 servo-thread
|
||||
addf scale.1 servo-thread
|
||||
addf scale.2 servo-thread
|
||||
addf mult2.1 servo-thread
|
||||
addf spindlemax servo-thread
|
||||
setp scale.0.gain 0.8846 # Start with fourth gear
|
||||
setp scale.1.gain 1.13045
|
||||
setp scale.2.gain 0.0166666667
|
||||
setp mult2.1.in1 25.0
|
||||
unlinkp spindle.0.forward
|
||||
unlinkp spindle.0.reverse
|
||||
unlinkp spindle.0.on
|
||||
#unlinkp motion.spindle-at-speed
|
||||
net spindle-fwd spindle.0.forward => spindle-vfd.spindle-forward
|
||||
net spindle-reverse spindle.0.reverse => spindle-vfd.spindle-reverse
|
||||
net spindle-on spindle.0.on => spindle-vfd.spindle-on
|
||||
net spindle-at-speed <= spindle-vfd.spindle-at-speed
|
||||
#net spindle-enable => spindle-vfd.enable
|
||||
setp spindle-vfd.enable 1
|
||||
|
||||
# Prepare max limit rpm for spindle
|
||||
net spindle-max-freq spindle-vfd.max-freq => mult2.1.in0
|
||||
net spindle-max-rpm mult2.1.out => spindlemax.max # Max limit for motor rpm, like 67*25 = 1675
|
||||
|
||||
# Give speed to vfd, limited to max possible
|
||||
unlinkp spindle.0.speed-out-abs
|
||||
net spindle-speed-scale spindle.0.speed-out-abs => scale.1.in # Spindle rpm => Motor rpm
|
||||
net spindle-speed-cmd-unlimited scale.1.out => spindlemax.in # Limit spindle rpm
|
||||
net spindle-speed-cmd-limited spindlemax.out => spindle-vfd.speed-command # Feed to vfd
|
||||
|
||||
# Convert actual feed from rpm to rps, consider gear in use.
|
||||
unlinkp spindle.0.speed-in
|
||||
net spindle-speed-scale2 spindle-vfd.spindle-speed-fb => scale.2.in # Motor rpm => Motor rps
|
||||
net spindle-speed-gears scale.2.out => scale.0.in # Motor rps => spindle rps
|
||||
net spindle-speed-in scale.0.out => spindle.0.speed-in
|
||||
|
||||
# Gamepad
|
||||
loadusr -W hal_input -KRAL F310
|
||||
# Resten är i custom_postgui.hal
|
||||
49
linuxcnc/Turner.2ms/drilling.ngc
Normal file
49
linuxcnc/Turner.2ms/drilling.ngc
Normal file
@@ -0,0 +1,49 @@
|
||||
;drilling
|
||||
|
||||
; Use T = 0 for tailstock drilling, then this just sets speed
|
||||
|
||||
O<drilling> SUB
|
||||
|
||||
G18 ; XZ Plane
|
||||
G21 ; Metric Units
|
||||
G90 ; Absolute Distance
|
||||
G91.1 ; but not for arcs
|
||||
|
||||
#10 = [#2 * 1000 / [ #1 * 3.141592]]
|
||||
(debug, #10)
|
||||
O90 IF [#7 GT 0.5]
|
||||
M8
|
||||
O90 ENDIF
|
||||
|
||||
O100 IF [#6 LT 0.5]
|
||||
G97 M3 S#10
|
||||
O<drilling> RETURN
|
||||
O100 ENDIF
|
||||
|
||||
M6 T#6 G43
|
||||
G0 X0
|
||||
|
||||
O83 IF [#5 GT 0] ; Pecking
|
||||
G17
|
||||
G95 F#3 ; Feed-Per-Rev Mode
|
||||
G97 M3 S#10
|
||||
G98
|
||||
G83 R#<_z> Q#5 Z#4
|
||||
M5 M9 G18
|
||||
O<drilling> RETURN
|
||||
O83 ENDIF
|
||||
|
||||
O82 IF [1]; not pecking
|
||||
G17
|
||||
G95 F#3 ; Feed-Per-Rev Mode
|
||||
G97 M3 S#10
|
||||
G98
|
||||
G82 R#<_z> P0.5 Z#4
|
||||
M5 M9 G18
|
||||
O82 ENDIF
|
||||
|
||||
O<drilling> ENDSUB
|
||||
|
||||
O<drilling> call [10] [100] [0.03] [0] [2] [0] [1]
|
||||
|
||||
M2
|
||||
59
linuxcnc/Turner.2ms/ethercat-conf.xml
Normal file
59
linuxcnc/Turner.2ms/ethercat-conf.xml
Normal file
@@ -0,0 +1,59 @@
|
||||
<masters>
|
||||
<master idx="0" appTimePeriod="2000000" refClockSyncCycles="1">
|
||||
<slave idx="0" type="generic" vid="00aaa" pid="000bbbccc" configPdos="true">
|
||||
<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="500000"/>
|
||||
<syncManager idx="2" dir="out">
|
||||
<pdo idx="1600">
|
||||
<pdoEntry idx="7000" subIdx="00" bitLen="32" halPin="enc-index-latch-enable" halType="u32"/>
|
||||
</pdo>
|
||||
<pdo idx="1601">
|
||||
<pdoEntry idx="7001" subIdx="00" bitLen="32" halPin="commanded-position-1" halType="float-ieee"/>
|
||||
</pdo>
|
||||
<pdo idx="1602">
|
||||
<pdoEntry idx="7002" subIdx="00" bitLen="32" halPin="commanded-position-2" halType="float-ieee"/>
|
||||
</pdo>
|
||||
<pdo idx="1603">
|
||||
<pdoEntry idx="7003" subIdx="00" bitLen="16" halPin="steps-per-mm-1" halType="s32"/>
|
||||
</pdo>
|
||||
<pdo idx="1604">
|
||||
<pdoEntry idx="7004" subIdx="00" bitLen="16" halPin="steps-per-mm-2" halType="s32"/>
|
||||
</pdo>
|
||||
</syncManager>
|
||||
<syncManager idx="3" dir="in">
|
||||
<pdo idx="1a00">
|
||||
<pdoEntry idx="6000" subIdx="00" bitLen="32" halPin="enc-position" halType="float-ieee"/>
|
||||
</pdo>
|
||||
<pdo idx="1a01">
|
||||
<pdoEntry idx="6001" subIdx="00" bitLen="32" halPin="enc-frequency" halType="float-ieee"/>
|
||||
</pdo>
|
||||
<pdo idx="1a02">
|
||||
<pdoEntry idx="6002" subIdx="00" bitLen="16" halPin="DiffT" halType="u32"/>
|
||||
</pdo>
|
||||
<pdo idx="1a03">
|
||||
<pdoEntry idx="6003" subIdx="00" bitLen="32" halPin="index-byte" halType="u32"/>
|
||||
</pdo>
|
||||
<pdo idx="1a04">
|
||||
<pdoEntry idx="6004" subIdx="00" bitLen="32" halPin="index-status" halType="u32"/>
|
||||
</pdo>
|
||||
<pdo idx="1a05">
|
||||
<pdoEntry idx="6005" subIdx="00" bitLen="32" halPin="actual-position-1" halType="float-ieee"/>
|
||||
</pdo>
|
||||
<pdo idx="1a06">
|
||||
<pdoEntry idx="6006" subIdx="00" bitLen="32" halPin="actual-position-2" halType="float-ieee"/>
|
||||
</pdo>
|
||||
<pdo idx="1a07">
|
||||
<pdoEntry idx="6007" subIdx="00" bitLen="16" halPin="D1" halType="s32"/>
|
||||
</pdo>
|
||||
<pdo idx="1a08">
|
||||
<pdoEntry idx="6008" subIdx="00" bitLen="16" halPin="D2" halType="s32"/>
|
||||
</pdo>
|
||||
<pdo idx="1a09">
|
||||
<pdoEntry idx="6009" subIdx="00" bitLen="16" halPin="D3" halType="s32"/>
|
||||
</pdo>
|
||||
<pdo idx="1a0a">
|
||||
<pdoEntry idx="600a" subIdx="00" bitLen="16" halPin="D4" halType="s32"/>
|
||||
</pdo>
|
||||
</syncManager>
|
||||
</slave>
|
||||
</master>
|
||||
</masters>
|
||||
82
linuxcnc/Turner.2ms/ethercat-conf.xml.org
Normal file
82
linuxcnc/Turner.2ms/ethercat-conf.xml.org
Normal file
@@ -0,0 +1,82 @@
|
||||
<masters>
|
||||
<master idx="0" appTimePeriod="1000000" refClockSyncCycles="5">
|
||||
<slave idx="0" type="EK1100"/>
|
||||
<slave idx="1" type="EL1008"/>
|
||||
<slave idx="2" type="EL2008"/>
|
||||
<slave idx="3" type="EL5101"/>
|
||||
<slave idx="4" type="generic" vid="00000a88" pid="0a880002" configPdos="true">
|
||||
<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0"/>
|
||||
<sdoConfig idx="2000" subIdx="0"><sdoDataRaw data ="b8 0b"/></sdoConfig> <!-- Max motor current (3.0A) -->
|
||||
<sdoConfig idx="2003" subIdx="0"><sdoDataRaw data ="64 00"/></sdoConfig> <!-- Standby current percentage (100%) -->
|
||||
<sdoConfig idx="2011" subIdx="0"><sdoDataRaw data ="00 00"/></sdoConfig> <!-- Open loop -->
|
||||
<syncManager idx="2" dir="out">
|
||||
<pdo idx="1600">
|
||||
<pdoEntry idx="6040" subIdx="00" bitLen="16" halPin="cia-controlword" halType="u32"/>
|
||||
<pdoEntry idx="6060" subIdx="00" bitLen="8" halPin="opmode" halType="s32"/>
|
||||
<pdoEntry idx="607A" subIdx="00" bitLen="32" halPin="target-position" halType="s32"/>
|
||||
<pdoEntry idx="60FF" subIdx="00" bitLen="32" halPin="target-velocity" halType="s32"/>
|
||||
</pdo>
|
||||
</syncManager>
|
||||
<syncManager idx="3" dir="in">
|
||||
<pdo idx="1a00">
|
||||
<pdoEntry idx="6041" subIdx="00" bitLen="16" halPin="cia-statusword" halType="u32"/>
|
||||
<pdoEntry idx="6061" subIdx="00" bitLen="8" halPin="opmode-display" halType="s32"/>
|
||||
<pdoEntry idx="6064" subIdx="00" bitLen="32" halPin="actual-position" halType="s32"/>
|
||||
<pdoEntry idx="606C" subIdx="00" bitLen="32" halPin="actual-velocity" halType="s32"/>
|
||||
<pdoEntry idx="6077" subIdx="00" bitLen="32" halPin="actual-torque" halType="s32"/>
|
||||
</pdo>
|
||||
</syncManager>
|
||||
</slave>
|
||||
<slave idx="5" type="generic" vid="00000a88" pid="0a880002" configPdos="true">
|
||||
<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0"/>
|
||||
<sdoConfig idx="2000" subIdx="0"><sdoDataRaw data ="68 10"/></sdoConfig> <!-- Max motor current (4.2A) -->
|
||||
<sdoConfig idx="2003" subIdx="0"><sdoDataRaw data ="64 00"/></sdoConfig> <!-- Standby current percentage (100%) -->
|
||||
<sdoConfig idx="2011" subIdx="0"><sdoDataRaw data ="00 00"/></sdoConfig> <!-- Open loop -->
|
||||
<syncManager idx="2" dir="out">
|
||||
<pdo idx="1600">
|
||||
<pdoEntry idx="6040" subIdx="00" bitLen="16" halPin="cia-controlword" halType="u32"/>
|
||||
<pdoEntry idx="6060" subIdx="00" bitLen="8" halPin="opmode" halType="s32"/>
|
||||
<pdoEntry idx="607A" subIdx="00" bitLen="32" halPin="target-position" halType="s32"/>
|
||||
<pdoEntry idx="60FF" subIdx="00" bitLen="32" halPin="target-velocity" halType="s32"/>
|
||||
</pdo>
|
||||
</syncManager>
|
||||
<syncManager idx="3" dir="in">
|
||||
<pdo idx="1a00">
|
||||
<pdoEntry idx="6041" subIdx="00" bitLen="16" halPin="cia-statusword" halType="u32"/>
|
||||
<pdoEntry idx="6061" subIdx="00" bitLen="8" halPin="opmode-display" halType="s32"/>
|
||||
<pdoEntry idx="6064" subIdx="00" bitLen="32" halPin="actual-position" halType="s32"/>
|
||||
<pdoEntry idx="606C" subIdx="00" bitLen="32" halPin="actual-velocity" halType="s32"/>
|
||||
<pdoEntry idx="6077" subIdx="00" bitLen="32" halPin="actual-torque" halType="s32"/>
|
||||
</pdo>
|
||||
</syncManager>
|
||||
</slave>
|
||||
<slave idx="6" type="generic" vid="00aaa" pid="000bbbccc" configPdos="true">
|
||||
<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0"/>
|
||||
<syncManager idx="2" dir="out">
|
||||
<pdo idx="1600">
|
||||
<pdoEntry idx="7000" subIdx="00" bitLen="32" halPin="enc-pos-scale" halType="s32"/>
|
||||
</pdo>
|
||||
<pdo idx="1601">
|
||||
<pdoEntry idx="7001" subIdx="00" bitLen="32" halPin="enc-index-latch-enable" halType="u32"/>
|
||||
</pdo>
|
||||
</syncManager>
|
||||
<syncManager idx="3" dir="in">
|
||||
<pdo idx="1a00">
|
||||
<pdoEntry idx="6000" subIdx="00" bitLen="32" halPin="enc-position" halType="float-ieee"/>
|
||||
</pdo>
|
||||
<pdo idx="1a01">
|
||||
<pdoEntry idx="6001" subIdx="00" bitLen="32" halPin="enc-frequency" halType="float-ieee"/>
|
||||
</pdo>
|
||||
<pdo idx="1a02">
|
||||
<pdoEntry idx="6002" subIdx="00" bitLen="32" halPin="DiffT" halType="u32"/>
|
||||
</pdo>
|
||||
<pdo idx="1a03">
|
||||
<pdoEntry idx="6003" subIdx="00" bitLen="32" halPin="index-byte" halType="u32"/>
|
||||
</pdo>
|
||||
<pdo idx="1a04">
|
||||
<pdoEntry idx="6004" subIdx="00" bitLen="32" halPin="index-status" halType="u32"/>
|
||||
</pdo>
|
||||
</syncManager>
|
||||
</slave>
|
||||
</master>
|
||||
</masters>
|
||||
59
linuxcnc/Turner.2ms/ethercat-conf.xml~
Normal file
59
linuxcnc/Turner.2ms/ethercat-conf.xml~
Normal file
@@ -0,0 +1,59 @@
|
||||
<masters>
|
||||
<master idx="0" appTimePeriod="2000000" refClockSyncCycles="1">
|
||||
<slave idx="0" type="generic" vid="00aaa" pid="000bbbccc" configPdos="true">
|
||||
<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0"/>
|
||||
<syncManager idx="2" dir="out">
|
||||
<pdo idx="1600">
|
||||
<pdoEntry idx="7000" subIdx="00" bitLen="32" halPin="enc-index-latch-enable" halType="u32"/>
|
||||
</pdo>
|
||||
<pdo idx="1601">
|
||||
<pdoEntry idx="7001" subIdx="00" bitLen="32" halPin="commanded-position-1" halType="float-ieee"/>
|
||||
</pdo>
|
||||
<pdo idx="1602">
|
||||
<pdoEntry idx="7002" subIdx="00" bitLen="32" halPin="commanded-position-2" halType="float-ieee"/>
|
||||
</pdo>
|
||||
<pdo idx="1603">
|
||||
<pdoEntry idx="7003" subIdx="00" bitLen="16" halPin="steps-per-mm-1" halType="s32"/>
|
||||
</pdo>
|
||||
<pdo idx="1604">
|
||||
<pdoEntry idx="7004" subIdx="00" bitLen="16" halPin="steps-per-mm-2" halType="s32"/>
|
||||
</pdo>
|
||||
</syncManager>
|
||||
<syncManager idx="3" dir="in">
|
||||
<pdo idx="1a00">
|
||||
<pdoEntry idx="6000" subIdx="00" bitLen="32" halPin="enc-position" halType="float-ieee"/>
|
||||
</pdo>
|
||||
<pdo idx="1a01">
|
||||
<pdoEntry idx="6001" subIdx="00" bitLen="32" halPin="enc-frequency" halType="float-ieee"/>
|
||||
</pdo>
|
||||
<pdo idx="1a02">
|
||||
<pdoEntry idx="6002" subIdx="00" bitLen="16" halPin="DiffT" halType="u32"/>
|
||||
</pdo>
|
||||
<pdo idx="1a03">
|
||||
<pdoEntry idx="6003" subIdx="00" bitLen="32" halPin="index-byte" halType="u32"/>
|
||||
</pdo>
|
||||
<pdo idx="1a04">
|
||||
<pdoEntry idx="6004" subIdx="00" bitLen="32" halPin="index-status" halType="u32"/>
|
||||
</pdo>
|
||||
<pdo idx="1a05">
|
||||
<pdoEntry idx="6005" subIdx="00" bitLen="32" halPin="actual-position-1" halType="float-ieee"/>
|
||||
</pdo>
|
||||
<pdo idx="1a06">
|
||||
<pdoEntry idx="6006" subIdx="00" bitLen="32" halPin="actual-position-2" halType="float-ieee"/>
|
||||
</pdo>
|
||||
<pdo idx="1a07">
|
||||
<pdoEntry idx="6007" subIdx="00" bitLen="16" halPin="D1" halType="s32"/>
|
||||
</pdo>
|
||||
<pdo idx="1a08">
|
||||
<pdoEntry idx="6008" subIdx="00" bitLen="16" halPin="D2" halType="s32"/>
|
||||
</pdo>
|
||||
<pdo idx="1a09">
|
||||
<pdoEntry idx="6009" subIdx="00" bitLen="16" halPin="D3" halType="s32"/>
|
||||
</pdo>
|
||||
<pdo idx="1a0a">
|
||||
<pdoEntry idx="600a" subIdx="00" bitLen="16" halPin="D4" halType="s32"/>
|
||||
</pdo>
|
||||
</syncManager>
|
||||
</slave>
|
||||
</master>
|
||||
</masters>
|
||||
45
linuxcnc/Turner.2ms/facing.ngc
Normal file
45
linuxcnc/Turner.2ms/facing.ngc
Normal file
@@ -0,0 +1,45 @@
|
||||
;Facing
|
||||
O<facing> sub
|
||||
|
||||
G7 ; Lathe Diameter Mode
|
||||
G18 ; XZ Plane
|
||||
G21 ; Metric Units
|
||||
G90 ; Absolute Distance
|
||||
|
||||
M6 T#7 G43
|
||||
|
||||
O90 IF [#8 GT 0.5]
|
||||
M8
|
||||
O90 ENDIF
|
||||
|
||||
O10 IF [#6 NE 0]
|
||||
(MSG, Angled facing isn't supported yet)
|
||||
O10 ENDIF
|
||||
|
||||
#14 = [#<_x> * 2] (starting X)
|
||||
#13 = #<_z> (starting Z)
|
||||
|
||||
G96 D2500 S#2 ; Constant Surface Speed Mode
|
||||
M3
|
||||
g95 F#4 ; Feed-Per-Rev Mode
|
||||
|
||||
g4p1 ; Wait to reach speed
|
||||
|
||||
O200 WHILE [#13 GT #5 + #3]
|
||||
|
||||
#13=[#13-#3]
|
||||
G1 Z#13
|
||||
G1 X#1
|
||||
G0 Z[#13+#3]
|
||||
G0 X#14
|
||||
G0 Z#13
|
||||
O200 ENDWHILE
|
||||
|
||||
G1 Z#5
|
||||
G1 X#1
|
||||
G0 Z[#13+#3]
|
||||
G0 X[#14+#3]
|
||||
G0 Z#5 ; For touch-off
|
||||
M5 M9
|
||||
O<facing> endsub
|
||||
M2
|
||||
83
linuxcnc/Turner.2ms/gmoccapy_lathe.pref
Normal file
83
linuxcnc/Turner.2ms/gmoccapy_lathe.pref
Normal file
@@ -0,0 +1,83 @@
|
||||
[DEFAULT]
|
||||
dro_size = 28
|
||||
abs_color = #0000FF
|
||||
rel_color = #000000
|
||||
dtg_color = #FFFF00
|
||||
homed_color = #00FF00
|
||||
unhomed_color = #FF0000
|
||||
spindle_bar_min = 0.0
|
||||
spindle_bar_max = 6000.0
|
||||
unlock_code = 123
|
||||
view = y
|
||||
blockheight = 0.0
|
||||
spindle_start_rpm = 300.0
|
||||
scale_jog_vel = 140.4
|
||||
scale_spindle_override = 1
|
||||
scale_feed_override = 1
|
||||
scale_rapid_override = 1
|
||||
hide_turtle_jog_button = False
|
||||
turtle_jog_factor = 20
|
||||
open_file =
|
||||
screen1 = window
|
||||
x_pos = 40
|
||||
y_pos = 30
|
||||
width = 979
|
||||
height = 750
|
||||
gtk_theme = Follow System Theme
|
||||
audio_alert = /usr/share/sounds/freedesktop/stereo/dialog-warning.oga
|
||||
audio_error = /usr/share/sounds/freedesktop/stereo/dialog-error.oga
|
||||
grid_size = 1.0
|
||||
mouse_btn_mode = 4
|
||||
hide_cursor = False
|
||||
system_name_tool = Tool
|
||||
system_name_g5x = G5x
|
||||
system_name_rot = Rot
|
||||
system_name_g92 = G92
|
||||
system_name_g54 = G54
|
||||
system_name_g55 = G55
|
||||
system_name_g56 = G56
|
||||
system_name_g57 = G57
|
||||
system_name_g58 = G58
|
||||
system_name_g59 = G59
|
||||
system_name_g59.1 = G59.1
|
||||
system_name_g59.2 = G59.2
|
||||
system_name_g59.3 = G59.3
|
||||
jump_to_dir = /home/emcmesa
|
||||
show_keyboard_on_offset = False
|
||||
show_keyboard_on_tooledit = False
|
||||
show_keyboard_on_edit = False
|
||||
show_keyboard_on_mdi = False
|
||||
show_keyboard_on_file_selection = False
|
||||
x_pos_popup = 45.0
|
||||
y_pos_popup = 55
|
||||
width_popup = 250.0
|
||||
max_messages = 10
|
||||
message_font = sans 10
|
||||
use_frames = True
|
||||
reload_tool = True
|
||||
blockdel = False
|
||||
opstop = False
|
||||
enable_dro = False
|
||||
show_offsets = False
|
||||
show_dtg = False
|
||||
view_tool_path = True
|
||||
view_dimension = True
|
||||
run_from_line = no_run
|
||||
unlock_way = no
|
||||
show_preview_on_offset = False
|
||||
use_keyboard_shortcuts = True
|
||||
dro_digits = 3
|
||||
toggle_readout = True
|
||||
tool_in_spindle = 3
|
||||
diameter offset_axis_x = 0
|
||||
offset_axis_x = 0.0
|
||||
offset_axis_z = 0.0
|
||||
offset_axis_r = 50.0
|
||||
radius offset_axis_x = 0
|
||||
use_toolmeasurement = False
|
||||
kbd_height = 250
|
||||
icon_theme = None
|
||||
hide_tooltips = False
|
||||
hide_titlebar = False
|
||||
audio_enabled = True
|
||||
|
||||
72
linuxcnc/Turner.2ms/gmoccapy_lathe_c.pref
Normal file
72
linuxcnc/Turner.2ms/gmoccapy_lathe_c.pref
Normal file
@@ -0,0 +1,72 @@
|
||||
[DEFAULT]
|
||||
dro_size = 28
|
||||
abs_color = #0000FF
|
||||
rel_color = #000000
|
||||
dtg_color = #FFFF00
|
||||
homed_color = #00FF00
|
||||
unhomed_color = #FF0000
|
||||
spindle_bar_min = 0.0
|
||||
spindle_bar_max = 6000.0
|
||||
unlock_code = 123
|
||||
view = y
|
||||
blockheight = 0.0
|
||||
spindle_start_rpm = 300.0
|
||||
scale_jog_vel = 140.4
|
||||
scale_spindle_override = 1
|
||||
scale_feed_override = 1
|
||||
scale_rapid_override = 1
|
||||
hide_turtle_jog_button = False
|
||||
turtle_jog_factor = 20
|
||||
open_file =
|
||||
screen1 = window
|
||||
x_pos = 40
|
||||
y_pos = 30
|
||||
width = 979
|
||||
height = 750
|
||||
gtk_theme = Follow System Theme
|
||||
audio_alert = /usr/share/sounds/freedesktop/stereo/dialog-warning.oga
|
||||
audio_error = /usr/share/sounds/freedesktop/stereo/dialog-error.oga
|
||||
grid_size = 1.0
|
||||
mouse_btn_mode = 4
|
||||
hide_cursor = False
|
||||
system_name_tool = Tool
|
||||
system_name_g5x = G5x
|
||||
system_name_rot = Rot
|
||||
system_name_g92 = G92
|
||||
system_name_g54 = G54
|
||||
system_name_g55 = G55
|
||||
system_name_g56 = G56
|
||||
system_name_g57 = G57
|
||||
system_name_g58 = G58
|
||||
system_name_g59 = G59
|
||||
system_name_g59.1 = G59.1
|
||||
system_name_g59.2 = G59.2
|
||||
system_name_g59.3 = G59.3
|
||||
jump_to_dir = /home/emcmesa
|
||||
show_keyboard_on_offset = False
|
||||
show_keyboard_on_tooledit = False
|
||||
show_keyboard_on_edit = True
|
||||
show_keyboard_on_mdi = True
|
||||
show_keyboard_on_file_selection = False
|
||||
x_pos_popup = 45.0
|
||||
y_pos_popup = 55
|
||||
width_popup = 250.0
|
||||
max_messages = 10
|
||||
message_font = sans 10
|
||||
use_frames = True
|
||||
reload_tool = True
|
||||
blockdel = False
|
||||
opstop = False
|
||||
enable_dro = False
|
||||
show_offsets = False
|
||||
show_dtg = False
|
||||
view_tool_path = True
|
||||
view_dimension = True
|
||||
run_from_line = no_run
|
||||
unlock_way = use
|
||||
show_preview_on_offset = False
|
||||
use_keyboard_shortcuts = False
|
||||
dro_digits = 3
|
||||
toggle_readout = True
|
||||
tool_in_spindle = 0
|
||||
|
||||
23
linuxcnc/Turner.2ms/gmoccapy_postgui.hal
Normal file
23
linuxcnc/Turner.2ms/gmoccapy_postgui.hal
Normal file
@@ -0,0 +1,23 @@
|
||||
###################################################################
|
||||
# moccapy_postgui.hal file from Norbert Schechner #
|
||||
###################################################################
|
||||
|
||||
loadrt abs names=abs_spindle_feedback
|
||||
addf abs_spindle_feedback servo-thread
|
||||
|
||||
net spindle-speed-limited => abs_spindle_feedback.in
|
||||
net spindle-abs abs_spindle_feedback.out => gmoccapy.spindle_feedback_bar
|
||||
net spindle-at-speed gmoccapy.spindle_at_speed_led
|
||||
|
||||
# the unlink pin commands are only used, because they are connected
|
||||
# in core_sim.hal and we use this file to simulate
|
||||
unlinkp iocontrol.0.tool-change
|
||||
unlinkp iocontrol.0.tool-changed
|
||||
unlinkp iocontrol.0.tool-prep-number
|
||||
|
||||
net tool-change gmoccapy.toolchange-change <= iocontrol.0.tool-change
|
||||
net tool-changed gmoccapy.toolchange-changed <= iocontrol.0.tool-changed
|
||||
net tool-prep-number gmoccapy.toolchange-number <= iocontrol.0.tool-prep-number
|
||||
|
||||
net tooloffset-x gmoccapy.tooloffset-x <= motion.tooloffset.x
|
||||
net tooloffset-z gmoccapy.tooloffset-z <= motion.tooloffset.z
|
||||
32
linuxcnc/Turner.2ms/grooving.ngc
Normal file
32
linuxcnc/Turner.2ms/grooving.ngc
Normal file
@@ -0,0 +1,32 @@
|
||||
;grooving
|
||||
|
||||
O<grooving> sub
|
||||
|
||||
G8 ; Radius mode (easier maths)
|
||||
G18 ; XZ Plane
|
||||
G21 ; Metric Units
|
||||
G90 ; Absolute Distance
|
||||
G91.1 ; but not for arcs
|
||||
|
||||
M6 T#4 G43
|
||||
|
||||
#1 = [#1 / 2] ; because of radius mode
|
||||
|
||||
#14 = [#<_x>] (starting X)
|
||||
|
||||
G96 D1500 S#2 ; Constant Surface Speed Mode
|
||||
m3 ;Start Spindle
|
||||
g95 F#3 ; Feed-Per-Rev Mode
|
||||
|
||||
O90 IF [#5 GT 0.5]
|
||||
M8
|
||||
O90 ENDIF
|
||||
|
||||
g4p1 ; Wait to reach speed
|
||||
G1 F#3 X#1
|
||||
G0 X#14
|
||||
M5 M9
|
||||
G7
|
||||
O<grooving> endsub
|
||||
|
||||
M2
|
||||
22
linuxcnc/Turner.2ms/halshow.preferences
Normal file
22
linuxcnc/Turner.2ms/halshow.preferences
Normal file
@@ -0,0 +1,22 @@
|
||||
# Halshow settings
|
||||
# This file is generated automatically.
|
||||
wm geometry . 700x475+1121+46
|
||||
placeFrames 0.3
|
||||
set ::ratio 0.3
|
||||
set ::old_w_leftf 160
|
||||
set ::watchlist {
|
||||
pin+lcec.0.0.DiffT
|
||||
pin+lcec.0.0.D1
|
||||
pin+lcec.0.0.D2
|
||||
pin+lcec.0.0.D3
|
||||
pin+lcec.0.0.D4
|
||||
pin+lcec.0.0.commanded-position-2
|
||||
pin+lcec.0.0.actual-position-2
|
||||
}
|
||||
set ::workmode watchhal
|
||||
set ::watchInterval 100
|
||||
set ::col1_width 100
|
||||
set ::ffmts
|
||||
set ::ifmts
|
||||
set ::alwaysOnTop 0
|
||||
set ::autoSaveWatchlist 1
|
||||
159
linuxcnc/Turner.2ms/lathe.ini
Normal file
159
linuxcnc/Turner.2ms/lathe.ini
Normal file
@@ -0,0 +1,159 @@
|
||||
# EMC controller parameters for a simulated machine.
|
||||
# General note: Comments can either be preceded with a # or ; - either is
|
||||
# acceptable, although # is in keeping with most linux config files.
|
||||
|
||||
# General section -------------------------------------------------------------
|
||||
[EMC]
|
||||
VERSION = 1.1
|
||||
MACHINE = gmoccapy_lathe
|
||||
#DEBUG = 0x7FFFFFFF
|
||||
DEBUG = 0
|
||||
|
||||
# for details see nc_files/subroutines/maco_instructions.txt
|
||||
[DISPLAY]
|
||||
DISPLAY = gmoccapy
|
||||
LATHE = 1
|
||||
BACK_TOOL_LATHE = 0
|
||||
|
||||
# Cycle time, in milliseconds, that display will sleep between polls
|
||||
CYCLE_TIME = 100
|
||||
|
||||
# Highest value that will be allowed for feed override, 1.0 = 100%
|
||||
MAX_FEED_OVERRIDE = 1.5
|
||||
MAX_SPINDLE_OVERRIDE = 1.2
|
||||
MIN_SPINDLE_OVERRIDE = .5
|
||||
|
||||
# Prefix to be used
|
||||
PROGRAM_PREFIX = /home/debian/linuxcnc/nc_files
|
||||
|
||||
# Introductory graphic
|
||||
INTRO_GRAPHIC = linuxcnc.gif
|
||||
INTRO_TIME = 5
|
||||
|
||||
# list of selectable jog increments
|
||||
INCREMENTS = 1.000 mm, 0.100 mm, 0.010 mm, 0.001 mm
|
||||
|
||||
[FILTER]
|
||||
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
|
||||
PROGRAM_EXTENSION = .py Python Script
|
||||
png = image-to-gcode
|
||||
gif = image-to-gcode
|
||||
jpg = image-to-gcode
|
||||
py = python
|
||||
|
||||
# Task controller section -----------------------------------------------------
|
||||
[RS274NGC]
|
||||
RS274NGC_STARTUP_CODE = G18 G21 G40 G49 G54 G80 G90 G94 G8 M9 M5 G64 P0.005
|
||||
PARAMETER_FILE = sim.var
|
||||
SUBROUTINE_PATH = macros
|
||||
|
||||
# Motion control section ------------------------------------------------------
|
||||
[EMCMOT]
|
||||
EMCMOT = motmod
|
||||
COMM_TIMEOUT = 1.0
|
||||
BASE_PERIOD = 100000
|
||||
SERVO_PERIOD = 1000000
|
||||
|
||||
# Hardware Abstraction Layer section --------------------------------------------------
|
||||
[TASK]
|
||||
TASK = milltask
|
||||
CYCLE_TIME = 0.001
|
||||
|
||||
# Part program interpreter section --------------------------------------------
|
||||
[HAL]
|
||||
HALFILE = core_sim_lathe.hal
|
||||
HALFILE = spindle_sim.hal
|
||||
HALFILE = simulated_home_lathe.hal
|
||||
|
||||
# Single file that is executed after the GUI has started.
|
||||
POSTGUI_HALFILE = gmoccapy_postgui.hal
|
||||
|
||||
HALUI = halui
|
||||
|
||||
# Trajectory planner section --------------------------------------------------
|
||||
[HALUI]
|
||||
#No Content
|
||||
|
||||
[TRAJ]
|
||||
COORDINATES = X Z
|
||||
LINEAR_UNITS = mm
|
||||
ANGULAR_UNITS = degree
|
||||
DEFAULT_LINEAR_VELOCITY = 50
|
||||
MAX_LINEAR_VELOCITY = 234
|
||||
POSITION_FILE = position.txt
|
||||
#NO_FORCE_HOMING = 1
|
||||
|
||||
# First axis
|
||||
[EMCIO]
|
||||
EMCIO = io
|
||||
CYCLE_TIME = 0.100
|
||||
|
||||
# tool table file
|
||||
TOOL_TABLE = lathe.tbl
|
||||
|
||||
[KINS]
|
||||
KINEMATICS = trivkins coordinates=XZ
|
||||
JOINTS = 2
|
||||
|
||||
[AXIS_X]
|
||||
MIN_LIMIT = -50.0
|
||||
MAX_LIMIT = 200.0
|
||||
MAX_VELOCITY = 166
|
||||
MAX_ACCELERATION = 1500.0
|
||||
|
||||
[JOINT_0]
|
||||
TYPE = LINEAR
|
||||
MAX_VELOCITY = 166
|
||||
MAX_ACCELERATION = 1500.0
|
||||
BACKLASH = 0.000
|
||||
INPUT_SCALE = 4000
|
||||
OUTPUT_SCALE = 1.000
|
||||
MIN_LIMIT = -50.0
|
||||
MAX_LIMIT = 200.0
|
||||
FERROR = 0.050
|
||||
MIN_FERROR = 0.010
|
||||
HOME_OFFSET = 0.0
|
||||
HOME = 100
|
||||
HOME_SEARCH_VEL = 200.0
|
||||
HOME_LATCH_VEL = 20.0
|
||||
HOME_USE_INDEX = NO
|
||||
HOME_IGNORE_LIMITS = NO
|
||||
HOME_SEQUENCE = 1
|
||||
HOME_IS_SHARED = 1
|
||||
|
||||
# Third axis
|
||||
[AXIS_Z]
|
||||
MIN_LIMIT = -75.0
|
||||
MAX_LIMIT = 1000.0
|
||||
MAX_VELOCITY = 166
|
||||
MAX_ACCELERATION = 1500.0
|
||||
|
||||
[JOINT_1]
|
||||
TYPE = LINEAR
|
||||
MAX_VELOCITY = 166
|
||||
MAX_ACCELERATION = 1500.0
|
||||
BACKLASH = 0.000
|
||||
INPUT_SCALE = 4000
|
||||
OUTPUT_SCALE = 1.000
|
||||
MIN_LIMIT = -75.0
|
||||
MAX_LIMIT = 1000.0
|
||||
FERROR = 0.050
|
||||
MIN_FERROR = 0.010
|
||||
HOME_OFFSET = 1.0
|
||||
HOME = 250
|
||||
HOME_SEARCH_VEL = 200.0
|
||||
HOME_LATCH_VEL = 20.0
|
||||
HOME_USE_INDEX = NO
|
||||
HOME_IGNORE_LIMITS = NO
|
||||
HOME_SEQUENCE = 0
|
||||
HOME_IS_SHARED = 1
|
||||
|
||||
# section for main IO controller parameters -----------------------------------
|
||||
[MACROS]
|
||||
MACRO = i_am_lost
|
||||
MACRO = halo_world
|
||||
MACRO = jog_around
|
||||
MACRO = increment xinc yinc
|
||||
MACRO = go_to_position X-pos Y-pos Z-pos
|
||||
|
||||
|
||||
74
linuxcnc/Turner.2ms/lathe.pref
Normal file
74
linuxcnc/Turner.2ms/lathe.pref
Normal file
@@ -0,0 +1,74 @@
|
||||
[DEFAULT]
|
||||
dro_size = 28
|
||||
abs_color = #0000FF
|
||||
rel_color = #000000
|
||||
dtg_color = #FFFF00
|
||||
homed_color = #00FF00
|
||||
unhomed_color = #FF0000
|
||||
spindle_bar_min = 0.0
|
||||
spindle_bar_max = 6000.0
|
||||
unlock_code = 123
|
||||
gremlin_view = rbt_view_y2
|
||||
blockheight = 0.0
|
||||
spindle_start_rpm = 300.0
|
||||
scale_jog_vel = 140.4
|
||||
scale_spindle_override = 1
|
||||
scale_feed_override = 1
|
||||
scale_rapid_override = 1
|
||||
hide_turtle_jog_button = False
|
||||
turtle_jog_factor = 20
|
||||
open_file =
|
||||
screen1 = window
|
||||
x_pos = 40
|
||||
y_pos = 30
|
||||
width = 979
|
||||
height = 750
|
||||
use_screen2 = False
|
||||
gtk_theme = Follow System Theme
|
||||
audio_alert = /usr/share/sounds/freedesktop/stereo/dialog-warning.oga
|
||||
audio_error = /usr/share/sounds/freedesktop/stereo/dialog-error.oga
|
||||
grid_size = 1.0
|
||||
view = p
|
||||
mouse_btn_mode = 4
|
||||
hide_cursor = False
|
||||
system_name_tool = Tool
|
||||
system_name_g5x = G5x
|
||||
system_name_rot = Rot
|
||||
system_name_g92 = G92
|
||||
system_name_g54 = G54
|
||||
system_name_g55 = G55
|
||||
system_name_g56 = G56
|
||||
system_name_g57 = G57
|
||||
system_name_g58 = G58
|
||||
system_name_g59 = G59
|
||||
system_name_g59.1 = G59.1
|
||||
system_name_g59.2 = G59.2
|
||||
system_name_g59.3 = G59.3
|
||||
jump_to_dir = /home/emcmesa
|
||||
show_keyboard_on_offset = False
|
||||
show_keyboard_on_tooledit = False
|
||||
show_keyboard_on_edit = True
|
||||
show_keyboard_on_mdi = True
|
||||
show_keyboard_on_file_selection = False
|
||||
x_pos_popup = 45.0
|
||||
y_pos_popup = 55
|
||||
width_popup = 250.0
|
||||
max_messages = 10
|
||||
message_font = sans 10
|
||||
use_frames = True
|
||||
reload_tool = True
|
||||
blockdel = False
|
||||
opstop = False
|
||||
enable_dro = False
|
||||
show_offsets = False
|
||||
show_dtg = False
|
||||
view_tool_path = True
|
||||
view_dimension = True
|
||||
run_from_line = no_run
|
||||
unlock_way = use
|
||||
show_preview_on_offset = False
|
||||
use_keyboard_shortcuts = False
|
||||
dro_digits = 3
|
||||
toggle_readout = True
|
||||
tool_in_spindle = 0
|
||||
|
||||
5
linuxcnc/Turner.2ms/lathe.tbl
Normal file
5
linuxcnc/Turner.2ms/lathe.tbl
Normal file
@@ -0,0 +1,5 @@
|
||||
T1 P1 X-12.0 Y0.0 Z-25.0 A0.0 B0.0 C0.0 U0.0 V0.0 W0.0 D0.4 I26.0 J86.0 Q2.0 ;60 Grad vorn
|
||||
T2 P2 X-10.356 Y0.0 Z12.123 A0.0 B0.0 C0.0 U0.0 V0.0 W0.0 D0.1 I50.0 J85.0 Q2.0 ;35 Grad vorn
|
||||
T3 P3 X1.123 Y0.0 Z25.456 A0.0 B0.0 C0.0 U0.0 V0.0 W0.0 D0.4 I-80.0 J-25.0 Q3.0 ;55 Grad vorn
|
||||
T4 P4 X0.0 Y0.0 Z0.0 A0.0 B0.0 C0.0 U0.0 V0.0 W0.0 D0.1 I94.0 J154.0 Q1.0 ;60 Grad Rück
|
||||
T5 P5 X5.737 Y0.0 Z12.2399 A0.0 B0.0 C0.0 U0.0 V0.0 W0.0 D0.1 I0.0 J0.0 Q6.0 ;Einstichstahl
|
||||
182
linuxcnc/Turner.2ms/lathe_C.ini
Normal file
182
linuxcnc/Turner.2ms/lathe_C.ini
Normal file
@@ -0,0 +1,182 @@
|
||||
# EMC controller parameters for a simulated machine.
|
||||
# General note: Comments can either be preceded with a # or ; - either is
|
||||
# acceptable, although # is in keeping with most linux config files.
|
||||
|
||||
# General section -------------------------------------------------------------
|
||||
[EMC]
|
||||
VERSION = 1.1
|
||||
MACHINE = lathe_c
|
||||
#DEBUG = 0x7FFFFFFF
|
||||
DEBUG = 0
|
||||
|
||||
# for details see nc_files/subroutines/maco_instructions.txt
|
||||
[DISPLAY]
|
||||
DISPLAY = gmoccapy
|
||||
LATHE = 1
|
||||
BACK_TOOL_LATHE = 0
|
||||
|
||||
# Cycle time, in milliseconds, that display will sleep between polls
|
||||
CYCLE_TIME = 100
|
||||
|
||||
# Highest value that will be allowed for feed override, 1.0 = 100%
|
||||
MAX_FEED_OVERRIDE = 1.5
|
||||
MAX_SPINDLE_OVERRIDE = 1.2
|
||||
MIN_SPINDLE_OVERRIDE = .5
|
||||
|
||||
|
||||
# Prefix to be used
|
||||
PROGRAM_PREFIX = /home/debian/linuxcnc/nc_files
|
||||
|
||||
# Introductory graphic
|
||||
INTRO_GRAPHIC = linuxcnc.gif
|
||||
INTRO_TIME = 5
|
||||
|
||||
# list of selectable jog increments
|
||||
INCREMENTS = 1.000 mm, 0.100 mm, 0.010 mm, 0.001 mm
|
||||
|
||||
[FILTER]
|
||||
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
|
||||
PROGRAM_EXTENSION = .py Python Script
|
||||
png = image-to-gcode
|
||||
gif = image-to-gcode
|
||||
jpg = image-to-gcode
|
||||
py = python
|
||||
|
||||
# Task controller section -----------------------------------------------------
|
||||
[RS274NGC]
|
||||
RS274NGC_STARTUP_CODE = G18 G21 G40 G49 G54 G80 G90 G94 G8 M9 M5 G64 P0.005
|
||||
PARAMETER_FILE = sim.var
|
||||
SUBROUTINE_PATH = macros
|
||||
|
||||
# Motion control section ------------------------------------------------------
|
||||
[EMCMOT]
|
||||
EMCMOT = motmod
|
||||
COMM_TIMEOUT = 1.0
|
||||
BASE_PERIOD = 100000
|
||||
SERVO_PERIOD = 1000000
|
||||
|
||||
# Hardware Abstraction Layer section --------------------------------------------------
|
||||
[TASK]
|
||||
TASK = milltask
|
||||
CYCLE_TIME = 0.001
|
||||
|
||||
# Part program interpreter section --------------------------------------------
|
||||
[HAL]
|
||||
HALFILE = core_sim_lathe_C.hal
|
||||
HALFILE = spindle_sim.hal
|
||||
HALFILE = simulated_home_lathe.hal
|
||||
|
||||
# Single file that is executed after the GUI has started.
|
||||
POSTGUI_HALFILE = gmoccapy_postgui.hal
|
||||
|
||||
HALUI = halui
|
||||
|
||||
# Trajectory planner section --------------------------------------------------
|
||||
[HALUI]
|
||||
#No Content
|
||||
|
||||
[TRAJ]
|
||||
COORDINATES = X Z C
|
||||
LINEAR_UNITS = mm
|
||||
ANGULAR_UNITS = degree
|
||||
DEFAULT_LINEAR_VELOCITY = 50
|
||||
MAX_LINEAR_VELOCITY = 234
|
||||
POSITION_FILE = position.txt
|
||||
#NO_FORCE_HOMING = 1
|
||||
|
||||
# First axis
|
||||
[EMCIO]
|
||||
EMCIO = io
|
||||
CYCLE_TIME = 0.100
|
||||
|
||||
# tool table file
|
||||
TOOL_TABLE = lathe.tbl
|
||||
|
||||
[KINS]
|
||||
KINEMATICS = trivkins coordinates=XZC
|
||||
JOINTS = 3
|
||||
|
||||
[AXIS_X]
|
||||
MIN_LIMIT = -50.0
|
||||
MAX_LIMIT = 200.0
|
||||
MAX_VELOCITY = 166
|
||||
MAX_ACCELERATION = 1500.0
|
||||
|
||||
[JOINT_0]
|
||||
TYPE = LINEAR
|
||||
MAX_VELOCITY = 166
|
||||
MAX_ACCELERATION = 1500.0
|
||||
BACKLASH = 0.000
|
||||
INPUT_SCALE = 4000
|
||||
OUTPUT_SCALE = 1.000
|
||||
MIN_LIMIT = -50.0
|
||||
MAX_LIMIT = 200.0
|
||||
FERROR = 0.050
|
||||
MIN_FERROR = 0.010
|
||||
HOME_OFFSET = 0.0
|
||||
HOME = 10
|
||||
HOME_SEARCH_VEL = 200.0
|
||||
HOME_LATCH_VEL = 20.0
|
||||
HOME_USE_INDEX = NO
|
||||
HOME_IGNORE_LIMITS = NO
|
||||
HOME_SEQUENCE = 1
|
||||
HOME_IS_SHARED = 1
|
||||
|
||||
# Third axis
|
||||
[AXIS_Z]
|
||||
MIN_LIMIT = -75.0
|
||||
MAX_LIMIT = 1000.0
|
||||
MAX_VELOCITY = 166
|
||||
MAX_ACCELERATION = 1500.0
|
||||
|
||||
[JOINT_1]
|
||||
TYPE = LINEAR
|
||||
MAX_VELOCITY = 166
|
||||
MAX_ACCELERATION = 1500.0
|
||||
BACKLASH = 0.000
|
||||
INPUT_SCALE = 4000
|
||||
OUTPUT_SCALE = 1.000
|
||||
MIN_LIMIT = -75.0
|
||||
MAX_LIMIT = 1000.0
|
||||
FERROR = 0.050
|
||||
MIN_FERROR = 0.010
|
||||
HOME_OFFSET = 1.0
|
||||
HOME = -10
|
||||
HOME_SEARCH_VEL = 200.0
|
||||
HOME_LATCH_VEL = 20.0
|
||||
HOME_USE_INDEX = NO
|
||||
HOME_IGNORE_LIMITS = NO
|
||||
HOME_SEQUENCE = 0
|
||||
HOME_IS_SHARED = 1
|
||||
|
||||
|
||||
[AXIS_C]
|
||||
MAX_VELOCITY = 90.0
|
||||
MAX_ACCELERATION = 1200.0
|
||||
|
||||
[JOINT_2]
|
||||
TYPE = ANGULAR
|
||||
HOME = 0.0
|
||||
MAX_VELOCITY = 90.0
|
||||
MAX_ACCELERATION = 1200.0
|
||||
BACKLASH = 0.000
|
||||
INPUT_SCALE = 40
|
||||
OUTPUT_SCALE = 1.000
|
||||
FERROR = 5.0
|
||||
MIN_FERROR = 1.0
|
||||
HOME_OFFSET = 0.0
|
||||
HOME_SEARCH_VEL = 0.0
|
||||
HOME_LATCH_VEL = 0.0
|
||||
HOME_USE_INDEX = NO
|
||||
HOME_IGNORE_LIMITS = NO
|
||||
HOME_SEQUENCE = 1
|
||||
|
||||
# section for main IO controller parameters -----------------------------------
|
||||
[MACROS]
|
||||
MACRO = i_am_lost
|
||||
MACRO = halo_world
|
||||
MACRO = jog_around
|
||||
MACRO = increment xinc yinc
|
||||
MACRO = go_to_position X-pos Y-pos Z-pos
|
||||
|
||||
|
||||
210
linuxcnc/Turner.2ms/lathe_CW.ini
Normal file
210
linuxcnc/Turner.2ms/lathe_CW.ini
Normal file
@@ -0,0 +1,210 @@
|
||||
# EMC controller parameters for a simulated machine.
|
||||
# General note: Comments can either be preceded with a # or ; - either is
|
||||
# acceptable, although # is in keeping with most linux config files.
|
||||
|
||||
# General section -------------------------------------------------------------
|
||||
[EMC]
|
||||
VERSION = 1.1
|
||||
MACHINE = lathe_cw
|
||||
#DEBUG = 0x7FFFFFFF
|
||||
DEBUG = 0
|
||||
|
||||
# for details see nc_files/subroutines/maco_instructions.txt
|
||||
[DISPLAY]
|
||||
DISPLAY = gmoccapy
|
||||
LATHE = 1
|
||||
BACK_TOOL_LATHE = 0
|
||||
|
||||
# Cycle time, in milliseconds, that display will sleep between polls
|
||||
CYCLE_TIME = 100
|
||||
|
||||
# Highest value that will be allowed for feed override, 1.0 = 100%
|
||||
MAX_FEED_OVERRIDE = 1.5
|
||||
MAX_SPINDLE_OVERRIDE = 1.2
|
||||
MIN_SPINDLE_OVERRIDE = .5
|
||||
|
||||
|
||||
# Prefix to be used
|
||||
PROGRAM_PREFIX = /home/debian/linuxcnc/nc_files
|
||||
|
||||
# Introductory graphic
|
||||
INTRO_GRAPHIC = linuxcnc.gif
|
||||
INTRO_TIME = 5
|
||||
|
||||
# list of selectable jog increments
|
||||
INCREMENTS = 1.000 mm, 0.100 mm, 0.010 mm, 0.001 mm
|
||||
|
||||
[FILTER]
|
||||
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
|
||||
PROGRAM_EXTENSION = .py Python Script
|
||||
png = image-to-gcode
|
||||
gif = image-to-gcode
|
||||
jpg = image-to-gcode
|
||||
py = python
|
||||
|
||||
# Task controller section -----------------------------------------------------
|
||||
[RS274NGC]
|
||||
RS274NGC_STARTUP_CODE = G18 G21 G40 G49 G54 G80 G90 G94 G8 M9 M5 G64 P0.005
|
||||
PARAMETER_FILE = sim.var
|
||||
SUBROUTINE_PATH = macros
|
||||
|
||||
# Motion control section ------------------------------------------------------
|
||||
[EMCMOT]
|
||||
EMCMOT = motmod
|
||||
COMM_TIMEOUT = 1.0
|
||||
BASE_PERIOD = 100000
|
||||
SERVO_PERIOD = 1000000
|
||||
|
||||
# Hardware Abstraction Layer section --------------------------------------------------
|
||||
[TASK]
|
||||
TASK = milltask
|
||||
CYCLE_TIME = 0.001
|
||||
|
||||
# Part program interpreter section --------------------------------------------
|
||||
[HAL]
|
||||
HALFILE = core_sim_lathe_CW.hal
|
||||
HALFILE = spindle_sim.hal
|
||||
HALFILE = simulated_home_lathe.hal
|
||||
|
||||
# Single file that is executed after the GUI has started.
|
||||
POSTGUI_HALFILE = gmoccapy_postgui.hal
|
||||
|
||||
HALUI = halui
|
||||
|
||||
# Trajectory planner section --------------------------------------------------
|
||||
[HALUI]
|
||||
#No Content
|
||||
|
||||
[TRAJ]
|
||||
COORDINATES = X Z C W
|
||||
LINEAR_UNITS = mm
|
||||
ANGULAR_UNITS = degree
|
||||
DEFAULT_LINEAR_VELOCITY = 50
|
||||
MAX_LINEAR_VELOCITY = 234
|
||||
POSITION_FILE = position.txt
|
||||
#NO_FORCE_HOMING = 1
|
||||
|
||||
# First axis
|
||||
[EMCIO]
|
||||
EMCIO = io
|
||||
CYCLE_TIME = 0.100
|
||||
|
||||
# tool table file
|
||||
TOOL_TABLE = lathe.tbl
|
||||
|
||||
[KINS]
|
||||
KINEMATICS = trivkins coordinates=XZCW
|
||||
JOINTS = 4
|
||||
|
||||
[AXIS_X]
|
||||
MIN_LIMIT = -50.0
|
||||
MAX_LIMIT = 200.0
|
||||
MAX_VELOCITY = 166
|
||||
MAX_ACCELERATION = 1500.0
|
||||
|
||||
[JOINT_0]
|
||||
TYPE = LINEAR
|
||||
MAX_VELOCITY = 166
|
||||
MAX_ACCELERATION = 1500.0
|
||||
BACKLASH = 0.000
|
||||
INPUT_SCALE = 4000
|
||||
OUTPUT_SCALE = 1.000
|
||||
MIN_LIMIT = -50.0
|
||||
MAX_LIMIT = 200.0
|
||||
FERROR = 0.050
|
||||
MIN_FERROR = 0.010
|
||||
HOME_OFFSET = 0.0
|
||||
HOME = 10
|
||||
HOME_SEARCH_VEL = 200.0
|
||||
HOME_LATCH_VEL = 20.0
|
||||
HOME_USE_INDEX = NO
|
||||
HOME_IGNORE_LIMITS = NO
|
||||
HOME_SEQUENCE = 1
|
||||
HOME_IS_SHARED = 1
|
||||
|
||||
# Third axis
|
||||
[AXIS_Z]
|
||||
MIN_LIMIT = -75.0
|
||||
MAX_LIMIT = 1000.0
|
||||
MAX_VELOCITY = 166
|
||||
MAX_ACCELERATION = 1500.0
|
||||
|
||||
[JOINT_1]
|
||||
TYPE = LINEAR
|
||||
MAX_VELOCITY = 166
|
||||
MAX_ACCELERATION = 1500.0
|
||||
BACKLASH = 0.000
|
||||
INPUT_SCALE = 4000
|
||||
OUTPUT_SCALE = 1.000
|
||||
MIN_LIMIT = -75.0
|
||||
MAX_LIMIT = 1000.0
|
||||
FERROR = 0.050
|
||||
MIN_FERROR = 0.010
|
||||
HOME_OFFSET = 1.0
|
||||
HOME = -10
|
||||
HOME_SEARCH_VEL = 200.0
|
||||
HOME_LATCH_VEL = 20.0
|
||||
HOME_USE_INDEX = NO
|
||||
HOME_IGNORE_LIMITS = NO
|
||||
HOME_SEQUENCE = 0
|
||||
HOME_IS_SHARED = 1
|
||||
|
||||
|
||||
[AXIS_C]
|
||||
MAX_VELOCITY = 90.0
|
||||
MAX_ACCELERATION = 1200.0
|
||||
|
||||
[JOINT_2]
|
||||
TYPE = ANGULAR
|
||||
HOME = 0.0
|
||||
MAX_VELOCITY = 90.0
|
||||
MAX_ACCELERATION = 1200.0
|
||||
BACKLASH = 0.000
|
||||
INPUT_SCALE = 40
|
||||
OUTPUT_SCALE = 1.000
|
||||
FERROR = 5.0
|
||||
MIN_FERROR = 1.0
|
||||
HOME_OFFSET = 0.0
|
||||
HOME_SEARCH_VEL = 0.0
|
||||
HOME_LATCH_VEL = 0.0
|
||||
HOME_USE_INDEX = NO
|
||||
HOME_IGNORE_LIMITS = NO
|
||||
HOME_SEQUENCE = 1
|
||||
|
||||
|
||||
[AXIS_W]
|
||||
MIN_LIMIT = -200.0
|
||||
MAX_LIMIT = 0.0
|
||||
MAX_VELOCITY = 66
|
||||
MAX_ACCELERATION = 150.0
|
||||
|
||||
[JOINT_3]
|
||||
TYPE = LINEAR
|
||||
MAX_VELOCITY = 66
|
||||
MAX_ACCELERATION = 150.0
|
||||
BACKLASH = 0.000
|
||||
INPUT_SCALE = 4000
|
||||
OUTPUT_SCALE = 1.000
|
||||
MIN_LIMIT = -200.0
|
||||
MAX_LIMIT = 0.0
|
||||
FERROR = 0.050
|
||||
MIN_FERROR = 0.010
|
||||
HOME_OFFSET = 0.0
|
||||
HOME = 0.0
|
||||
HOME_SEARCH_VEL = 0.0
|
||||
HOME_LATCH_VEL = 0.0
|
||||
HOME_USE_INDEX = NO
|
||||
HOME_IGNORE_LIMITS = NO
|
||||
HOME_SEQUENCE = 1
|
||||
|
||||
|
||||
|
||||
# section for main IO controller parameters -----------------------------------
|
||||
[MACROS]
|
||||
MACRO = i_am_lost
|
||||
MACRO = halo_world
|
||||
MACRO = jog_around
|
||||
MACRO = increment xinc yinc
|
||||
MACRO = go_to_position X-pos Y-pos Z-pos
|
||||
|
||||
|
||||
160
linuxcnc/Turner.2ms/lathe_backtool.ini
Normal file
160
linuxcnc/Turner.2ms/lathe_backtool.ini
Normal file
@@ -0,0 +1,160 @@
|
||||
# EMC controller parameters for a simulated machine.
|
||||
# General note: Comments can either be preceded with a # or ; - either is
|
||||
# acceptable, although # is in keeping with most linux config files.
|
||||
|
||||
# General section -------------------------------------------------------------
|
||||
[EMC]
|
||||
VERSION = 1.1
|
||||
MACHINE = gmoccapy_lathe
|
||||
#DEBUG = 0x7FFFFFFF
|
||||
DEBUG = 0
|
||||
|
||||
# for details see nc_files/subroutines/maco_instructions.txt
|
||||
[DISPLAY]
|
||||
DISPLAY = gmoccapy
|
||||
LATHE = 1
|
||||
BACK_TOOL_LATHE = 1
|
||||
|
||||
# Cycle time, in milliseconds, that display will sleep between polls
|
||||
CYCLE_TIME = 100
|
||||
|
||||
# Highest value that will be allowed for feed override, 1.0 = 100%
|
||||
MAX_FEED_OVERRIDE = 1.5
|
||||
MAX_SPINDLE_OVERRIDE = 1.2
|
||||
MIN_SPINDLE_OVERRIDE = .5
|
||||
|
||||
|
||||
# Prefix to be used
|
||||
PROGRAM_PREFIX = /home/debian/linuxcnc/nc_files
|
||||
|
||||
# Introductory graphic
|
||||
INTRO_GRAPHIC = linuxcnc.gif
|
||||
INTRO_TIME = 5
|
||||
|
||||
# list of selectable jog increments
|
||||
INCREMENTS = 1.000 mm, 0.100 mm, 0.010 mm, 0.001 mm
|
||||
|
||||
[FILTER]
|
||||
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
|
||||
PROGRAM_EXTENSION = .py Python Script
|
||||
png = image-to-gcode
|
||||
gif = image-to-gcode
|
||||
jpg = image-to-gcode
|
||||
py = python
|
||||
|
||||
# Task controller section -----------------------------------------------------
|
||||
[RS274NGC]
|
||||
RS274NGC_STARTUP_CODE = G18 G21 G40 G49 G54 G80 G90 G94 G8 M9 M5 G64 P0.005
|
||||
PARAMETER_FILE = sim.var
|
||||
SUBROUTINE_PATH = macros
|
||||
|
||||
# Motion control section ------------------------------------------------------
|
||||
[EMCMOT]
|
||||
EMCMOT = motmod
|
||||
COMM_TIMEOUT = 1.0
|
||||
BASE_PERIOD = 100000
|
||||
SERVO_PERIOD = 1000000
|
||||
|
||||
# Hardware Abstraction Layer section --------------------------------------------------
|
||||
[TASK]
|
||||
TASK = milltask
|
||||
CYCLE_TIME = 0.001
|
||||
|
||||
# Part program interpreter section --------------------------------------------
|
||||
[HAL]
|
||||
HALFILE = core_sim_lathe.hal
|
||||
HALFILE = spindle_sim.hal
|
||||
HALFILE = simulated_home_lathe.hal
|
||||
|
||||
# Single file that is executed after the GUI has started.
|
||||
POSTGUI_HALFILE = gmoccapy_postgui.hal
|
||||
|
||||
HALUI = halui
|
||||
|
||||
# Trajectory planner section --------------------------------------------------
|
||||
[HALUI]
|
||||
#No Content
|
||||
|
||||
[TRAJ]
|
||||
COORDINATES = X Z
|
||||
LINEAR_UNITS = mm
|
||||
ANGULAR_UNITS = degree
|
||||
DEFAULT_LINEAR_VELOCITY = 50
|
||||
MAX_LINEAR_VELOCITY = 234
|
||||
POSITION_FILE = position.txt
|
||||
#NO_FORCE_HOMING = 1
|
||||
|
||||
# First axis
|
||||
[EMCIO]
|
||||
EMCIO = io
|
||||
CYCLE_TIME = 0.100
|
||||
|
||||
# tool table file
|
||||
TOOL_TABLE = lathe.tbl
|
||||
|
||||
[KINS]
|
||||
KINEMATICS = trivkins coordinates=XZ
|
||||
JOINTS = 2
|
||||
|
||||
[AXIS_X]
|
||||
MIN_LIMIT = -50.0
|
||||
MAX_LIMIT = 200.0
|
||||
MAX_VELOCITY = 166
|
||||
MAX_ACCELERATION = 1500.0
|
||||
|
||||
[JOINT_0]
|
||||
TYPE = LINEAR
|
||||
MAX_VELOCITY = 166
|
||||
MAX_ACCELERATION = 1500.0
|
||||
BACKLASH = 0.000
|
||||
INPUT_SCALE = 4000
|
||||
OUTPUT_SCALE = 1.000
|
||||
MIN_LIMIT = -50.0
|
||||
MAX_LIMIT = 200.0
|
||||
FERROR = 0.050
|
||||
MIN_FERROR = 0.010
|
||||
HOME_OFFSET = 0.0
|
||||
HOME = 10
|
||||
HOME_SEARCH_VEL = 200.0
|
||||
HOME_LATCH_VEL = 20.0
|
||||
HOME_USE_INDEX = NO
|
||||
HOME_IGNORE_LIMITS = NO
|
||||
HOME_SEQUENCE = 1
|
||||
HOME_IS_SHARED = 1
|
||||
|
||||
# Third axis
|
||||
[AXIS_Z]
|
||||
MIN_LIMIT = -75.0
|
||||
MAX_LIMIT = 1000.0
|
||||
MAX_VELOCITY = 166
|
||||
MAX_ACCELERATION = 1500.0
|
||||
|
||||
[JOINT_1]
|
||||
TYPE = LINEAR
|
||||
MAX_VELOCITY = 166
|
||||
MAX_ACCELERATION = 1500.0
|
||||
BACKLASH = 0.000
|
||||
INPUT_SCALE = 4000
|
||||
OUTPUT_SCALE = 1.000
|
||||
MIN_LIMIT = -75.0
|
||||
MAX_LIMIT = 1000.0
|
||||
FERROR = 0.050
|
||||
MIN_FERROR = 0.010
|
||||
HOME_OFFSET = 1.0
|
||||
HOME = -10
|
||||
HOME_SEARCH_VEL = 200.0
|
||||
HOME_LATCH_VEL = 20.0
|
||||
HOME_USE_INDEX = NO
|
||||
HOME_IGNORE_LIMITS = NO
|
||||
HOME_SEQUENCE = 0
|
||||
HOME_IS_SHARED = 1
|
||||
|
||||
# section for main IO controller parameters -----------------------------------
|
||||
[MACROS]
|
||||
MACRO = i_am_lost
|
||||
MACRO = halo_world
|
||||
MACRO = jog_around
|
||||
MACRO = increment xinc yinc
|
||||
MACRO = go_to_position X-pos Y-pos Z-pos
|
||||
|
||||
|
||||
73
linuxcnc/Turner.2ms/lathe_c.pref
Normal file
73
linuxcnc/Turner.2ms/lathe_c.pref
Normal file
@@ -0,0 +1,73 @@
|
||||
[DEFAULT]
|
||||
dro_size = 28
|
||||
abs_color = #0000FF
|
||||
rel_color = #000000
|
||||
dtg_color = #FFFF00
|
||||
homed_color = #00FF00
|
||||
unhomed_color = #FF0000
|
||||
spindle_bar_min = 0.0
|
||||
spindle_bar_max = 6000.0
|
||||
unlock_code = 123
|
||||
open_file =
|
||||
screen1 = window
|
||||
x_pos = 40
|
||||
y_pos = 30
|
||||
width = 979
|
||||
height = 750
|
||||
reload_tool = True
|
||||
enable_dro = False
|
||||
show_offsets = False
|
||||
show_dtg = False
|
||||
view_tool_path = True
|
||||
view_dimension = True
|
||||
mouse_btn_mode = 4
|
||||
x_pos_popup = 45.0
|
||||
y_pos_popup = 55
|
||||
width_popup = 250.0
|
||||
max_messages = 10
|
||||
message_font = sans 10
|
||||
use_frames = True
|
||||
show_keyboard_on_offset = False
|
||||
show_keyboard_on_tooledit = False
|
||||
show_keyboard_on_edit = True
|
||||
show_keyboard_on_mdi = False
|
||||
show_keyboard_on_file_selection = False
|
||||
system_name_tool = Tool
|
||||
system_name_g5x = G5x
|
||||
system_name_rot = Rotation of Z
|
||||
system_name_g92 = G92
|
||||
system_name_g54 = G54
|
||||
system_name_g55 = G55
|
||||
system_name_g56 = G56
|
||||
system_name_g57 = G57
|
||||
system_name_g58 = G58
|
||||
system_name_g59 = G59
|
||||
system_name_g59.1 = G59.1
|
||||
system_name_g59.2 = G59.2
|
||||
system_name_g59.3 = G59.3
|
||||
unlock_way = no
|
||||
grid_size = 1.0
|
||||
view = y2
|
||||
gremlin_view = rbt_view_y
|
||||
tool_in_spindle = 0
|
||||
blockheight = 0.0
|
||||
spindle_start_rpm = 300.0
|
||||
scale_jog_vel = 140.4
|
||||
scale_spindle_override = 1
|
||||
scale_feed_override = 1
|
||||
scale_rapid_override = 1
|
||||
hide_turtle_jog_button = False
|
||||
turtle_jog_factor = 20
|
||||
gtk_theme = Follow System Theme
|
||||
audio_alert = /usr/share/sounds/freedesktop/stereo/dialog-warning.oga
|
||||
audio_error = /usr/share/sounds/freedesktop/stereo/dialog-error.oga
|
||||
hide_cursor = False
|
||||
jump_to_dir = /home/emcmesa
|
||||
blockdel = False
|
||||
opstop = False
|
||||
run_from_line = run
|
||||
show_preview_on_offset = True
|
||||
use_keyboard_shortcuts = True
|
||||
dro_digits = 3
|
||||
toggle_readout = True
|
||||
|
||||
72
linuxcnc/Turner.2ms/lathe_cw.pref
Normal file
72
linuxcnc/Turner.2ms/lathe_cw.pref
Normal file
@@ -0,0 +1,72 @@
|
||||
[DEFAULT]
|
||||
dro_size = 28
|
||||
abs_color = #0000FF
|
||||
rel_color = #000000
|
||||
dtg_color = #FFFF00
|
||||
homed_color = #00FF00
|
||||
unhomed_color = #FF0000
|
||||
spindle_bar_min = 0.0
|
||||
spindle_bar_max = 6000.0
|
||||
unlock_code = 123
|
||||
view = y2
|
||||
blockheight = 0.0
|
||||
spindle_start_rpm = 300.0
|
||||
scale_jog_vel = 140.4
|
||||
scale_spindle_override = 1
|
||||
scale_feed_override = 1
|
||||
scale_rapid_override = 1
|
||||
hide_turtle_jog_button = False
|
||||
turtle_jog_factor = 20
|
||||
open_file =
|
||||
screen1 = window
|
||||
x_pos = 40
|
||||
y_pos = 30
|
||||
width = 979
|
||||
height = 750
|
||||
gtk_theme = Follow System Theme
|
||||
audio_alert = /usr/share/sounds/freedesktop/stereo/dialog-warning.oga
|
||||
audio_error = /usr/share/sounds/freedesktop/stereo/dialog-error.oga
|
||||
grid_size = 1.0
|
||||
mouse_btn_mode = 4
|
||||
hide_cursor = False
|
||||
system_name_tool = Tool
|
||||
system_name_g5x = G5x
|
||||
system_name_rot = Rot
|
||||
system_name_g92 = G92
|
||||
system_name_g54 = G54
|
||||
system_name_g55 = G55
|
||||
system_name_g56 = G56
|
||||
system_name_g57 = G57
|
||||
system_name_g58 = G58
|
||||
system_name_g59 = G59
|
||||
system_name_g59.1 = G59.1
|
||||
system_name_g59.2 = G59.2
|
||||
system_name_g59.3 = G59.3
|
||||
jump_to_dir = /home/emcmesa
|
||||
show_keyboard_on_offset = False
|
||||
show_keyboard_on_tooledit = False
|
||||
show_keyboard_on_edit = False
|
||||
show_keyboard_on_mdi = False
|
||||
show_keyboard_on_file_selection = False
|
||||
x_pos_popup = 45.0
|
||||
y_pos_popup = 55
|
||||
width_popup = 250.0
|
||||
max_messages = 10
|
||||
message_font = sans 10
|
||||
use_frames = True
|
||||
reload_tool = True
|
||||
blockdel = False
|
||||
opstop = False
|
||||
enable_dro = False
|
||||
show_offsets = False
|
||||
show_dtg = False
|
||||
view_tool_path = True
|
||||
view_dimension = True
|
||||
run_from_line = no_run
|
||||
unlock_way = no
|
||||
show_preview_on_offset = False
|
||||
use_keyboard_shortcuts = True
|
||||
dro_digits = 3
|
||||
toggle_readout = True
|
||||
tool_in_spindle = 2
|
||||
|
||||
160
linuxcnc/Turner.2ms/lathe_imperial.ini
Normal file
160
linuxcnc/Turner.2ms/lathe_imperial.ini
Normal file
@@ -0,0 +1,160 @@
|
||||
# EMC controller parameters for a simulated machine.
|
||||
# General note: Comments can either be preceded with a # or ; - either is
|
||||
# acceptable, although # is in keeping with most linux config files.
|
||||
|
||||
# General section -------------------------------------------------------------
|
||||
[EMC]
|
||||
VERSION = 1.1
|
||||
MACHINE = lathe_imperial
|
||||
#DEBUG = 0x7FFFFFFF
|
||||
DEBUG = 0
|
||||
|
||||
# for details see nc_files/subroutines/maco_instructions.txt
|
||||
[DISPLAY]
|
||||
DISPLAY = gmoccapy
|
||||
|
||||
LATHE = 1
|
||||
BACK_TOOL_LATHE = 0
|
||||
|
||||
# Cycle time, in milliseconds, that display will sleep between polls
|
||||
CYCLE_TIME = 100
|
||||
|
||||
# Highest value that will be allowed for feed override, 1.0 = 100%
|
||||
MAX_FEED_OVERRIDE = 1.5
|
||||
MAX_SPINDLE_OVERRIDE = 1.2
|
||||
MIN_SPINDLE_OVERRIDE = .5
|
||||
|
||||
# Prefix to be used
|
||||
PROGRAM_PREFIX = /home/debian/linuxcnc/nc_files
|
||||
|
||||
# Introductory graphic
|
||||
INTRO_GRAPHIC = linuxcnc.gif
|
||||
INTRO_TIME = 5
|
||||
|
||||
# list of selectable jog increments
|
||||
INCREMENTS = 0.4 inch, 0.04 inch , 0.004 inch, 0.0004 inch
|
||||
|
||||
[FILTER]
|
||||
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
|
||||
PROGRAM_EXTENSION = .py Python Script
|
||||
png = image-to-gcode
|
||||
gif = image-to-gcode
|
||||
jpg = image-to-gcode
|
||||
py = python
|
||||
|
||||
# Task controller section -----------------------------------------------------
|
||||
[RS274NGC]
|
||||
RS274NGC_STARTUP_CODE = G18 G20 G40 G49 G54 G80 G90 G94 G8 M9 M5 G64 P0.001
|
||||
PARAMETER_FILE = sim.var
|
||||
SUBROUTINE_PATH = macros
|
||||
|
||||
# Motion control section ------------------------------------------------------
|
||||
[EMCMOT]
|
||||
EMCMOT = motmod
|
||||
COMM_TIMEOUT = 1.0
|
||||
BASE_PERIOD = 100000
|
||||
SERVO_PERIOD = 1000000
|
||||
|
||||
# Hardware Abstraction Layer section --------------------------------------------------
|
||||
[TASK]
|
||||
TASK = milltask
|
||||
CYCLE_TIME = 0.001
|
||||
|
||||
# Part program interpreter section --------------------------------------------
|
||||
[HAL]
|
||||
HALFILE = core_sim_lathe.hal
|
||||
HALFILE = spindle_sim.hal
|
||||
HALFILE = simulated_home_lathe.hal
|
||||
|
||||
# Single file that is executed after the GUI has started.
|
||||
POSTGUI_HALFILE = gmoccapy_postgui.hal
|
||||
|
||||
HALUI = halui
|
||||
|
||||
# Trajectory planner section --------------------------------------------------
|
||||
[HALUI]
|
||||
#No Content
|
||||
|
||||
[TRAJ]
|
||||
COORDINATES = X Z
|
||||
LINEAR_UNITS = inch
|
||||
ANGULAR_UNITS = degree
|
||||
DEFAULT_LINEAR_VELOCITY = 1.6
|
||||
MAX_LINEAR_VELOCITY = 10
|
||||
POSITION_FILE = position.txt
|
||||
|
||||
# First axis
|
||||
[EMCIO]
|
||||
EMCIO = io
|
||||
CYCLE_TIME = 0.100
|
||||
|
||||
# tool table file
|
||||
TOOL_TABLE = lathe.tbl
|
||||
|
||||
[KINS]
|
||||
KINEMATICS = trivkins coordinates=XZ
|
||||
JOINTS = 2
|
||||
|
||||
[AXIS_X]
|
||||
MIN_LIMIT = -2.0
|
||||
MAX_LIMIT = 40.0
|
||||
MAX_VELOCITY = 6.5
|
||||
MAX_ACCELERATION = 59.0
|
||||
|
||||
[JOINT_0]
|
||||
TYPE = LINEAR
|
||||
MAX_VELOCITY = 6.5
|
||||
MAX_ACCELERATION = 59.0
|
||||
BACKLASH = 0.000
|
||||
INPUT_SCALE = 4000
|
||||
OUTPUT_SCALE = 1.000
|
||||
MIN_LIMIT = -2.0
|
||||
MAX_LIMIT = 40.0
|
||||
FERROR = 0.050
|
||||
MIN_FERROR = 0.010
|
||||
HOME_OFFSET = 0.0
|
||||
HOME = 4
|
||||
HOME_SEARCH_VEL = 40.0
|
||||
HOME_LATCH_VEL = 2.0
|
||||
HOME_USE_INDEX = NO
|
||||
HOME_IGNORE_LIMITS = NO
|
||||
HOME_SEQUENCE = 1
|
||||
HOME_IS_SHARED = 1
|
||||
|
||||
|
||||
# Third axis
|
||||
[AXIS_Z]
|
||||
MIN_LIMIT = -3.0
|
||||
MAX_LIMIT = 400.0
|
||||
MAX_VELOCITY = 6.5
|
||||
MAX_ACCELERATION = 59.0
|
||||
|
||||
[JOINT_1]
|
||||
TYPE = LINEAR
|
||||
MAX_VELOCITY = 6.5
|
||||
MAX_ACCELERATION = 59.0
|
||||
BACKLASH = 0.000
|
||||
INPUT_SCALE = 4000
|
||||
OUTPUT_SCALE = 1.000
|
||||
MIN_LIMIT = -3.0
|
||||
MAX_LIMIT = 400.0
|
||||
FERROR = 0.050
|
||||
MIN_FERROR = 0.010
|
||||
HOME_OFFSET = 1.0
|
||||
HOME = -4
|
||||
HOME_SEARCH_VEL = 40.0
|
||||
HOME_LATCH_VEL = 2.0
|
||||
HOME_USE_INDEX = NO
|
||||
HOME_IGNORE_LIMITS = NO
|
||||
HOME_SEQUENCE = 0
|
||||
HOME_IS_SHARED = 1
|
||||
|
||||
# section for main IO controller parameters -----------------------------------
|
||||
[MACROS]
|
||||
MACRO = i_am_lost
|
||||
MACRO = halo_world
|
||||
MACRO = jog_around
|
||||
MACRO = increment xinc yinc
|
||||
MACRO = go_to_position X-pos Y-pos Z-pos
|
||||
|
||||
# Sections for display options ------------------------------------------------
|
||||
71
linuxcnc/Turner.2ms/lathe_imperial.pref
Normal file
71
linuxcnc/Turner.2ms/lathe_imperial.pref
Normal file
@@ -0,0 +1,71 @@
|
||||
[DEFAULT]
|
||||
dro_size = 28
|
||||
abs_color = #0000FF
|
||||
rel_color = #000000
|
||||
dtg_color = #FFFF00
|
||||
homed_color = #00FF00
|
||||
unhomed_color = #FF0000
|
||||
spindle_bar_min = 0.0
|
||||
spindle_bar_max = 6000.0
|
||||
unlock_code = 123
|
||||
blockheight = 0.0
|
||||
spindle_start_rpm = 300.0
|
||||
scale_jog_vel = 6.0
|
||||
scale_spindle_override = 1
|
||||
scale_feed_override = 1
|
||||
scale_rapid_override = 1
|
||||
hide_turtle_jog_button = False
|
||||
turtle_jog_factor = 20
|
||||
open_file =
|
||||
screen1 = window
|
||||
x_pos = 40
|
||||
y_pos = 30
|
||||
width = 979
|
||||
height = 750
|
||||
gtk_theme = Follow System Theme
|
||||
audio_alert = /usr/share/sounds/freedesktop/stereo/dialog-warning.oga
|
||||
audio_error = /usr/share/sounds/freedesktop/stereo/dialog-error.oga
|
||||
grid_size = 1.0
|
||||
mouse_btn_mode = 4
|
||||
hide_cursor = False
|
||||
system_name_tool = Tool
|
||||
system_name_g5x = G5x
|
||||
system_name_rot = Rot
|
||||
system_name_g92 = G92
|
||||
system_name_g54 = G54
|
||||
system_name_g55 = G55
|
||||
system_name_g56 = G56
|
||||
system_name_g57 = G57
|
||||
system_name_g58 = G58
|
||||
system_name_g59 = G59
|
||||
system_name_g59.1 = G59.1
|
||||
system_name_g59.2 = G59.2
|
||||
system_name_g59.3 = G59.3
|
||||
jump_to_dir = /home/emcmesa
|
||||
show_keyboard_on_offset = False
|
||||
show_keyboard_on_tooledit = False
|
||||
show_keyboard_on_edit = True
|
||||
show_keyboard_on_mdi = True
|
||||
show_keyboard_on_file_selection = False
|
||||
x_pos_popup = 45.0
|
||||
y_pos_popup = 55
|
||||
width_popup = 250.0
|
||||
max_messages = 10
|
||||
message_font = sans 10
|
||||
use_frames = True
|
||||
reload_tool = True
|
||||
blockdel = False
|
||||
opstop = False
|
||||
enable_dro = False
|
||||
show_offsets = False
|
||||
show_dtg = False
|
||||
view_tool_path = True
|
||||
view_dimension = True
|
||||
run_from_line = no_run
|
||||
unlock_way = use
|
||||
show_preview_on_offset = False
|
||||
use_keyboard_shortcuts = False
|
||||
dro_digits = 4
|
||||
toggle_readout = True
|
||||
view = y
|
||||
|
||||
165
linuxcnc/Turner.2ms/lathe_macros.ini
Normal file
165
linuxcnc/Turner.2ms/lathe_macros.ini
Normal file
@@ -0,0 +1,165 @@
|
||||
# EMC controller parameters for a simulated machine.
|
||||
# General note: Comments can either be preceded with a # or ; - either is
|
||||
# acceptable, although # is in keeping with most linux config files.
|
||||
|
||||
# General section -------------------------------------------------------------
|
||||
[EMC]
|
||||
VERSION = 1.1
|
||||
MACHINE = gmoccapy_lathe
|
||||
#DEBUG = 0x7FFFFFFF
|
||||
DEBUG = 0
|
||||
|
||||
# for details see nc_files/subroutines/maco_instructions.txt
|
||||
[DISPLAY]
|
||||
DISPLAY = gmoccapy
|
||||
LATHE = 1
|
||||
BACK_TOOL_LATHE = 0
|
||||
|
||||
# Cycle time, in milliseconds, that display will sleep between polls
|
||||
CYCLE_TIME = 100
|
||||
|
||||
# Highest value that will be allowed for feed override, 1.0 = 100%
|
||||
MAX_FEED_OVERRIDE = 1.5
|
||||
MAX_SPINDLE_OVERRIDE = 1.2
|
||||
MIN_SPINDLE_OVERRIDE = .5
|
||||
|
||||
|
||||
# Prefix to be used
|
||||
PROGRAM_PREFIX = /home/debian/linuxcnc/nc_files
|
||||
|
||||
# Introductory graphic
|
||||
INTRO_GRAPHIC = linuxcnc.gif
|
||||
INTRO_TIME = 5
|
||||
|
||||
# list of selectable jog increments
|
||||
INCREMENTS = 1.000 mm, 0.100 mm, 0.010 mm, 0.001 mm
|
||||
|
||||
EMBED_TAB_NAME = Cycles
|
||||
EMBED_TAB_LOCATION = ntb_preview
|
||||
#EMBED_TAB_LOCATION = ntb_user_tabs
|
||||
EMBED_TAB_COMMAND = halcmd loadusr -Wn gladevcp gladevcp -c gladevcp -U notouch=1 -U norun=0 -u lathehandler.py -x {XID} lathemacro.ui
|
||||
|
||||
[FILTER]
|
||||
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
|
||||
PROGRAM_EXTENSION = .py Python Script
|
||||
png = image-to-gcode
|
||||
gif = image-to-gcode
|
||||
jpg = image-to-gcode
|
||||
py = python
|
||||
|
||||
# Task controller section -----------------------------------------------------
|
||||
[RS274NGC]
|
||||
RS274NGC_STARTUP_CODE = G18 G21 G40 G49 G54 G80 G90 G94 G8 M9 M5 G64 P0.005
|
||||
PARAMETER_FILE = sim.var
|
||||
SUBROUTINE_PATH = macros:./
|
||||
|
||||
# Motion control section ------------------------------------------------------
|
||||
[EMCMOT]
|
||||
EMCMOT = motmod
|
||||
COMM_TIMEOUT = 1.0
|
||||
BASE_PERIOD = 100000
|
||||
SERVO_PERIOD = 1000000
|
||||
|
||||
# Hardware Abstraction Layer section --------------------------------------------------
|
||||
[TASK]
|
||||
TASK = milltask
|
||||
CYCLE_TIME = 0.001
|
||||
|
||||
# Part program interpreter section --------------------------------------------
|
||||
[HAL]
|
||||
HALFILE = core_sim_lathe.hal
|
||||
HALFILE = spindle_sim.hal
|
||||
HALFILE = simulated_home_lathe.hal
|
||||
|
||||
# Single file that is executed after the GUI has started.
|
||||
#POSTGUI_HALFILE = gmoccapy_postgui.hal
|
||||
|
||||
HALUI = halui
|
||||
|
||||
# Trajectory planner section --------------------------------------------------
|
||||
[HALUI]
|
||||
#No Content
|
||||
|
||||
[TRAJ]
|
||||
COORDINATES = X Z
|
||||
LINEAR_UNITS = mm
|
||||
ANGULAR_UNITS = degree
|
||||
DEFAULT_LINEAR_VELOCITY = 50
|
||||
MAX_LINEAR_VELOCITY = 234
|
||||
POSITION_FILE = position.txt
|
||||
#NO_FORCE_HOMING = 1
|
||||
|
||||
# First axis
|
||||
[EMCIO]
|
||||
EMCIO = io
|
||||
CYCLE_TIME = 0.100
|
||||
|
||||
# tool table file
|
||||
TOOL_TABLE = lathe.tbl
|
||||
|
||||
[KINS]
|
||||
KINEMATICS = trivkins coordinates=XZ
|
||||
JOINTS = 2
|
||||
|
||||
[AXIS_X]
|
||||
MIN_LIMIT = -50.0
|
||||
MAX_LIMIT = 200.0
|
||||
MAX_VELOCITY = 166
|
||||
MAX_ACCELERATION = 1500.0
|
||||
|
||||
[JOINT_0]
|
||||
TYPE = LINEAR
|
||||
MAX_VELOCITY = 166
|
||||
MAX_ACCELERATION = 1500.0
|
||||
BACKLASH = 0.000
|
||||
INPUT_SCALE = 4000
|
||||
OUTPUT_SCALE = 1.000
|
||||
MIN_LIMIT = -50.0
|
||||
MAX_LIMIT = 200.0
|
||||
FERROR = 0.050
|
||||
MIN_FERROR = 0.010
|
||||
HOME_OFFSET = 0.0
|
||||
HOME = 10
|
||||
HOME_SEARCH_VEL = 200.0
|
||||
HOME_LATCH_VEL = 20.0
|
||||
HOME_USE_INDEX = NO
|
||||
HOME_IGNORE_LIMITS = NO
|
||||
HOME_SEQUENCE = 1
|
||||
HOME_IS_SHARED = 1
|
||||
|
||||
# Third axis
|
||||
[AXIS_Z]
|
||||
MIN_LIMIT = -75.0
|
||||
MAX_LIMIT = 1000.0
|
||||
MAX_VELOCITY = 166
|
||||
MAX_ACCELERATION = 1500.0
|
||||
|
||||
[JOINT_1]
|
||||
TYPE = LINEAR
|
||||
MAX_VELOCITY = 166
|
||||
MAX_ACCELERATION = 1500.0
|
||||
BACKLASH = 0.000
|
||||
INPUT_SCALE = 4000
|
||||
OUTPUT_SCALE = 1.000
|
||||
MIN_LIMIT = -75.0
|
||||
MAX_LIMIT = 1000.0
|
||||
FERROR = 0.050
|
||||
MIN_FERROR = 0.010
|
||||
HOME_OFFSET = 1.0
|
||||
HOME = -10
|
||||
HOME_SEARCH_VEL = 200.0
|
||||
HOME_LATCH_VEL = 20.0
|
||||
HOME_USE_INDEX = NO
|
||||
HOME_IGNORE_LIMITS = NO
|
||||
HOME_SEQUENCE = 0
|
||||
HOME_IS_SHARED = 1
|
||||
|
||||
# section for main IO controller parameters -----------------------------------
|
||||
[MACROS]
|
||||
MACRO = i_am_lost
|
||||
MACRO = halo_world
|
||||
MACRO = jog_around
|
||||
MACRO = increment xinc yinc
|
||||
MACRO = go_to_position X-pos Y-pos Z-pos
|
||||
|
||||
|
||||
217
linuxcnc/Turner.2ms/lathehandler.py
Executable file
217
linuxcnc/Turner.2ms/lathehandler.py
Executable file
@@ -0,0 +1,217 @@
|
||||
#!/usr/bin/env python3
|
||||
# vim: sts=4 sw=4 et
|
||||
# This is a component of EMC
|
||||
# savestate.py copyright 2013 Andy Pugh
|
||||
# based on code from
|
||||
# probe.py Copyright 2010 Michael Haberler
|
||||
#
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA''''''
|
||||
|
||||
import os,sys
|
||||
from gladevcp.persistence import IniFile,widget_defaults,set_debug,select_widgets
|
||||
import hal
|
||||
import hal_glib
|
||||
import glib
|
||||
import linuxcnc
|
||||
import cairo
|
||||
import signal
|
||||
import re
|
||||
import gi
|
||||
gi.require_version('Rsvg', '2.0')
|
||||
gi.require_version('Gtk', '3.0')
|
||||
from gi.repository import Gtk
|
||||
from gi.repository import Gdk
|
||||
from gi.repository import GObject
|
||||
from gi.repository import Pango
|
||||
from gi.repository import Rsvg
|
||||
from gi.repository import GdkPixbuf
|
||||
debug = 0
|
||||
notouch = 0
|
||||
norun = 0
|
||||
|
||||
class HandlerClass:
|
||||
active = False
|
||||
tab_num = 0
|
||||
|
||||
def on_expose(self,nb,data=None):
|
||||
tab_num = nb.get_current_page()
|
||||
tab = nb.get_nth_page(tab_num)
|
||||
alloc = tab.get_allocation()
|
||||
x, y, w, h = (alloc.x, alloc.y, alloc.width, alloc.height)
|
||||
pixbuf = self.svg.get_pixbuf_sub(f'#layer{tab_num}').scale_simple(w-10, h-10, GdkPixbuf.InterpType.BILINEAR)
|
||||
im = self.builder.get_object(f'Image{tab_num}')
|
||||
im.set_from_pixbuf(pixbuf)
|
||||
for c in im.get_parent().get_children():
|
||||
if c.get_has_tooltip():
|
||||
m = re.findall(r'<!--(\d+),(\d+)-->', c.get_tooltip_markup())
|
||||
if len(m) > 0:
|
||||
x1 = int(m[0][0]); y1 = int(m[0][1])
|
||||
c.set_margin_left(max(0, w * x1/1500))
|
||||
c.set_margin_top(max(0, h * y1/1000))
|
||||
|
||||
|
||||
# decide if our window is active to mask the cycle-start hardware button
|
||||
# FIXME: This is probably not as reliable as one might wish.
|
||||
def event(self,w,event):
|
||||
if w.is_active():
|
||||
if w.has_toplevel_focus() :
|
||||
self.active = True
|
||||
else:
|
||||
self.active = False
|
||||
|
||||
# Capture notify events
|
||||
def on_map_event(self, widget, data=None):
|
||||
top = widget.get_toplevel()
|
||||
top.connect('notify', self.event)
|
||||
|
||||
def on_destroy(self,obj,data=None):
|
||||
self.ini.save_state(self)
|
||||
|
||||
def on_restore_defaults(self,button,data=None):
|
||||
'''
|
||||
example callback for 'Reset to defaults' button
|
||||
currently unused
|
||||
'''
|
||||
self.ini.create_default_ini()
|
||||
self.ini.restore_state(self)
|
||||
|
||||
def __init__(self, halcomp,builder,useropts):
|
||||
self.halcomp = halcomp
|
||||
self.builder = builder
|
||||
self.ini_filename = 'savestate.sav'
|
||||
self.defaults = { IniFile.vars: dict(),
|
||||
IniFile.widgets : widget_defaults(select_widgets(self.builder.get_objects(),
|
||||
hal_only=False,output_only = True))
|
||||
}
|
||||
self.ini = IniFile(self.ini_filename,self.defaults,self.builder)
|
||||
self.ini.restore_state(self)
|
||||
|
||||
# A pin to use a physical switch to start the cycle
|
||||
self.cycle_start = hal_glib.GPin(halcomp.newpin('cycle-start', hal.HAL_BIT, hal.HAL_IN))
|
||||
self.cycle_start.connect('value-changed', self.cycle_pin)
|
||||
|
||||
# This catches the signal from Touchy to say that the tab is exposed
|
||||
t = self.builder.get_object('macrobox')
|
||||
t.connect('map-event',self.on_map_event)
|
||||
t.add_events(Gdk.EventMask.STRUCTURE_MASK)
|
||||
|
||||
self.cmd = linuxcnc.command()
|
||||
|
||||
# This connects the expose event to re-draw and scale the SVG frames
|
||||
t = self.builder.get_object('tabs1')
|
||||
t.connect_after("draw", self.on_expose)
|
||||
t.connect("destroy", Gtk.main_quit)
|
||||
t.add_events(Gdk.EventMask.STRUCTURE_MASK)
|
||||
self.svg = Rsvg.Handle().new_from_file('LatheMacro.svg')
|
||||
self.active = True
|
||||
|
||||
# handle Useropts
|
||||
if norun:
|
||||
for c in range(0,6):
|
||||
print(c)
|
||||
print( f'tab{c}.action')
|
||||
self.builder.get_object(f'tab{c}.action').set_visible(False)
|
||||
|
||||
def show_keyb(self, obj, data=None):
|
||||
if notouch: return False
|
||||
self.active_ctrl = obj
|
||||
self.keyb = self.builder.get_object('keyboard')
|
||||
self.entry = self.builder.get_object('entry1')
|
||||
self.entry.modify_font(Pango.FontDescription("courier 42"))
|
||||
self.entry.set_text("")
|
||||
resp = self.keyb.run()
|
||||
return True
|
||||
|
||||
def keyb_prev_click(self, obj, data=None):
|
||||
self.entry.set_text(self.active_ctrl.get_text())
|
||||
|
||||
def keyb_number_click(self, obj, data=None):
|
||||
data = self.entry.get_text()
|
||||
data = data + obj.get_label()
|
||||
if any( x in data for x in [ '/2', '/4', '/8', '/16', '/32', '/64', '/128']):
|
||||
v = [0] + [float(x) for x in data.replace('/','.').split('.')]
|
||||
data = f'{v[-3] + v[-2]/v[-1]:6.7}'
|
||||
self.entry.set_text(data)
|
||||
|
||||
def keyb_pm_click(self, obj, data=None):
|
||||
data = self.entry.get_text()
|
||||
if data[0] == '-':
|
||||
data = data[1:]
|
||||
else:
|
||||
data = '-' + data
|
||||
self.entry.set_text(data)
|
||||
|
||||
def keyb_convert_click(self, obj, data=None):
|
||||
v = float(self.entry.get_text())
|
||||
op = obj.get_label()
|
||||
if op == 'in->mm':
|
||||
self.entry.set_text(f'{v * 25.4:6.4}')
|
||||
elif op == 'mm->in':
|
||||
self.entry.set_text(f'{v / 25.4:6.4}')
|
||||
elif op == 'tpi->pitch':
|
||||
self.entry.set_text(f'{25.4 / v:6.4}')
|
||||
elif op == 'pitch->tpi':
|
||||
self.entry.set_text(f'{25.4 / v:6.4}')
|
||||
|
||||
def keyb_del_click(self, obj, data=None):
|
||||
data = self.entry.get_text()
|
||||
data = data[:-1]
|
||||
self.entry.set_text(data)
|
||||
|
||||
def keyb_clear_click(self, obj, data=None):
|
||||
self.entry.set_text('')
|
||||
|
||||
def keyb_cancel_click(self, obj, data=None):
|
||||
self.keyb.hide()
|
||||
|
||||
def keyb_ok_click(self, obj, data=None):
|
||||
if self.entry.get_text() != '':
|
||||
self.active_ctrl.set_value(float(self.entry.get_text()))
|
||||
self.keyb.hide()
|
||||
|
||||
def set_alpha(self, obj, data = None):
|
||||
cr = obj.get_property('window').cairo_create()
|
||||
cr.set_source_rgba(1.0, 1.0, 1.0, 0.0)
|
||||
|
||||
def cycle_pin(self, pin, data = None):
|
||||
if pin.get() == 0:
|
||||
return
|
||||
if self.active:
|
||||
nb = self.builder.get_object('tabs1')
|
||||
print('current tab', nb.get_current_page())
|
||||
c = self.builder.get_object(f"tab{nb.get_current_page()}.action")
|
||||
if c is not None:
|
||||
self.cmd.abort()
|
||||
self.cmd.mode(linuxcnc.MODE_MDI)
|
||||
self.cmd.wait_complete()
|
||||
c.emit('clicked')
|
||||
print(c.get_name(), "clicked")
|
||||
|
||||
def testing(self, obj, data = None):
|
||||
print('event', data)
|
||||
|
||||
def get_handlers(halcomp,builder,useropts):
|
||||
|
||||
global debug
|
||||
for cmd in useropts:
|
||||
print(cmd)
|
||||
exec(cmd, globals())
|
||||
|
||||
set_debug(debug)
|
||||
return [HandlerClass(halcomp,builder,useropts)]
|
||||
|
||||
|
||||
|
||||
2937
linuxcnc/Turner.2ms/lathemacro.ui
Normal file
2937
linuxcnc/Turner.2ms/lathemacro.ui
Normal file
File diff suppressed because it is too large
Load Diff
119
linuxcnc/Turner.2ms/linuxcnc.var
Normal file
119
linuxcnc/Turner.2ms/linuxcnc.var
Normal file
@@ -0,0 +1,119 @@
|
||||
5161 0.000000
|
||||
5162 0.000000
|
||||
5163 0.000000
|
||||
5164 0.000000
|
||||
5165 0.000000
|
||||
5166 0.000000
|
||||
5167 0.000000
|
||||
5168 0.000000
|
||||
5169 0.000000
|
||||
5181 0.000000
|
||||
5182 0.000000
|
||||
5183 0.000000
|
||||
5184 0.000000
|
||||
5185 0.000000
|
||||
5186 0.000000
|
||||
5187 0.000000
|
||||
5188 0.000000
|
||||
5189 0.000000
|
||||
5210 0.000000
|
||||
5211 0.000000
|
||||
5212 0.000000
|
||||
5213 0.000000
|
||||
5214 0.000000
|
||||
5215 0.000000
|
||||
5216 0.000000
|
||||
5217 0.000000
|
||||
5218 0.000000
|
||||
5219 0.000000
|
||||
5220 1.000000
|
||||
5221 0.000000
|
||||
5222 0.000000
|
||||
5223 -138.733334
|
||||
5224 0.000000
|
||||
5225 0.000000
|
||||
5226 0.000000
|
||||
5227 0.000000
|
||||
5228 0.000000
|
||||
5229 0.000000
|
||||
5230 0.000000
|
||||
5241 0.000000
|
||||
5242 0.000000
|
||||
5243 0.000000
|
||||
5244 0.000000
|
||||
5245 0.000000
|
||||
5246 0.000000
|
||||
5247 0.000000
|
||||
5248 0.000000
|
||||
5249 0.000000
|
||||
5250 0.000000
|
||||
5261 0.000000
|
||||
5262 0.000000
|
||||
5263 0.000000
|
||||
5264 0.000000
|
||||
5265 0.000000
|
||||
5266 0.000000
|
||||
5267 0.000000
|
||||
5268 0.000000
|
||||
5269 0.000000
|
||||
5270 0.000000
|
||||
5281 0.000000
|
||||
5282 0.000000
|
||||
5283 0.000000
|
||||
5284 0.000000
|
||||
5285 0.000000
|
||||
5286 0.000000
|
||||
5287 0.000000
|
||||
5288 0.000000
|
||||
5289 0.000000
|
||||
5290 0.000000
|
||||
5301 0.000000
|
||||
5302 0.000000
|
||||
5303 0.000000
|
||||
5304 0.000000
|
||||
5305 0.000000
|
||||
5306 0.000000
|
||||
5307 0.000000
|
||||
5308 0.000000
|
||||
5309 0.000000
|
||||
5310 0.000000
|
||||
5321 0.000000
|
||||
5322 0.000000
|
||||
5323 0.000000
|
||||
5324 0.000000
|
||||
5325 0.000000
|
||||
5326 0.000000
|
||||
5327 0.000000
|
||||
5328 0.000000
|
||||
5329 0.000000
|
||||
5330 0.000000
|
||||
5341 0.000000
|
||||
5342 0.000000
|
||||
5343 0.000000
|
||||
5344 0.000000
|
||||
5345 0.000000
|
||||
5346 0.000000
|
||||
5347 0.000000
|
||||
5348 0.000000
|
||||
5349 0.000000
|
||||
5350 0.000000
|
||||
5361 0.000000
|
||||
5362 0.000000
|
||||
5363 0.000000
|
||||
5364 0.000000
|
||||
5365 0.000000
|
||||
5366 0.000000
|
||||
5367 0.000000
|
||||
5368 0.000000
|
||||
5369 0.000000
|
||||
5370 0.000000
|
||||
5381 0.000000
|
||||
5382 0.000000
|
||||
5383 0.000000
|
||||
5384 0.000000
|
||||
5385 0.000000
|
||||
5386 0.000000
|
||||
5387 0.000000
|
||||
5388 0.000000
|
||||
5389 0.000000
|
||||
5390 0.000000
|
||||
119
linuxcnc/Turner.2ms/linuxcnc.var.bak
Normal file
119
linuxcnc/Turner.2ms/linuxcnc.var.bak
Normal file
@@ -0,0 +1,119 @@
|
||||
5161 0.000000
|
||||
5162 0.000000
|
||||
5163 0.000000
|
||||
5164 0.000000
|
||||
5165 0.000000
|
||||
5166 0.000000
|
||||
5167 0.000000
|
||||
5168 0.000000
|
||||
5169 0.000000
|
||||
5181 0.000000
|
||||
5182 0.000000
|
||||
5183 0.000000
|
||||
5184 0.000000
|
||||
5185 0.000000
|
||||
5186 0.000000
|
||||
5187 0.000000
|
||||
5188 0.000000
|
||||
5189 0.000000
|
||||
5210 0.000000
|
||||
5211 0.000000
|
||||
5212 0.000000
|
||||
5213 0.000000
|
||||
5214 0.000000
|
||||
5215 0.000000
|
||||
5216 0.000000
|
||||
5217 0.000000
|
||||
5218 0.000000
|
||||
5219 0.000000
|
||||
5220 1.000000
|
||||
5221 0.000000
|
||||
5222 0.000000
|
||||
5223 -138.733334
|
||||
5224 0.000000
|
||||
5225 0.000000
|
||||
5226 0.000000
|
||||
5227 0.000000
|
||||
5228 0.000000
|
||||
5229 0.000000
|
||||
5230 0.000000
|
||||
5241 0.000000
|
||||
5242 0.000000
|
||||
5243 0.000000
|
||||
5244 0.000000
|
||||
5245 0.000000
|
||||
5246 0.000000
|
||||
5247 0.000000
|
||||
5248 0.000000
|
||||
5249 0.000000
|
||||
5250 0.000000
|
||||
5261 0.000000
|
||||
5262 0.000000
|
||||
5263 0.000000
|
||||
5264 0.000000
|
||||
5265 0.000000
|
||||
5266 0.000000
|
||||
5267 0.000000
|
||||
5268 0.000000
|
||||
5269 0.000000
|
||||
5270 0.000000
|
||||
5281 0.000000
|
||||
5282 0.000000
|
||||
5283 0.000000
|
||||
5284 0.000000
|
||||
5285 0.000000
|
||||
5286 0.000000
|
||||
5287 0.000000
|
||||
5288 0.000000
|
||||
5289 0.000000
|
||||
5290 0.000000
|
||||
5301 0.000000
|
||||
5302 0.000000
|
||||
5303 0.000000
|
||||
5304 0.000000
|
||||
5305 0.000000
|
||||
5306 0.000000
|
||||
5307 0.000000
|
||||
5308 0.000000
|
||||
5309 0.000000
|
||||
5310 0.000000
|
||||
5321 0.000000
|
||||
5322 0.000000
|
||||
5323 0.000000
|
||||
5324 0.000000
|
||||
5325 0.000000
|
||||
5326 0.000000
|
||||
5327 0.000000
|
||||
5328 0.000000
|
||||
5329 0.000000
|
||||
5330 0.000000
|
||||
5341 0.000000
|
||||
5342 0.000000
|
||||
5343 0.000000
|
||||
5344 0.000000
|
||||
5345 0.000000
|
||||
5346 0.000000
|
||||
5347 0.000000
|
||||
5348 0.000000
|
||||
5349 0.000000
|
||||
5350 0.000000
|
||||
5361 0.000000
|
||||
5362 0.000000
|
||||
5363 0.000000
|
||||
5364 0.000000
|
||||
5365 0.000000
|
||||
5366 0.000000
|
||||
5367 0.000000
|
||||
5368 0.000000
|
||||
5369 0.000000
|
||||
5370 0.000000
|
||||
5381 0.000000
|
||||
5382 0.000000
|
||||
5383 0.000000
|
||||
5384 0.000000
|
||||
5385 0.000000
|
||||
5386 0.000000
|
||||
5387 0.000000
|
||||
5388 0.000000
|
||||
5389 0.000000
|
||||
5390 0.000000
|
||||
14
linuxcnc/Turner.2ms/metalmusings_encoder.comp
Normal file
14
linuxcnc/Turner.2ms/metalmusings_encoder.comp
Normal file
@@ -0,0 +1,14 @@
|
||||
component metalmusings_encoder;
|
||||
pin io bit index-c-enable;
|
||||
pin in u32 index-status;
|
||||
pin out u32 index-latch-enable;
|
||||
|
||||
function _;
|
||||
license "GPL";
|
||||
;;
|
||||
|
||||
//main function
|
||||
FUNCTION(_) {
|
||||
index_latch_enable = index_c_enable;
|
||||
index_c_enable = index_status;
|
||||
}
|
||||
6
linuxcnc/Turner.2ms/nc_files/M101
Executable file
6
linuxcnc/Turner.2ms/nc_files/M101
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
R=0.1923
|
||||
MAXRPM=380
|
||||
halcmd setp scale.0.gain $R
|
||||
halcmd setp scale.1.gain $(echo "scale=5;1.0 / $R"| bc -q)
|
||||
exit 0
|
||||
6
linuxcnc/Turner.2ms/nc_files/M102
Executable file
6
linuxcnc/Turner.2ms/nc_files/M102
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
R=0.3189
|
||||
MAXRPM=630
|
||||
halcmd setp scale.0.gain $R
|
||||
halcmd setp scale.1.gain $(echo "scale=5;1.0 / $R"| bc -q)
|
||||
exit 0
|
||||
6
linuxcnc/Turner.2ms/nc_files/M103
Executable file
6
linuxcnc/Turner.2ms/nc_files/M103
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
R=0.4638
|
||||
MAXRPM=920
|
||||
halcmd setp scale.0.gain $R
|
||||
halcmd setp scale.1.gain $(echo "scale=5;1.0 / $R"| bc -q)
|
||||
exit 0
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user