PES_4_Spleisser / Mbed 2 deprecated SpleisserProgramm_V11

Dependencies:   mbed mbed-rtos X_NUCLEO_IHM02A1

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers SETUP.h Source File

SETUP.h

00001  /*
00002   ******************************************************************************
00003   * PES_4 Gruppe GRUEN
00004   * 
00005   * @author Scherrer Fabian
00006   * @author Hagen Raphael
00007   *
00008   * INFO:
00009   *
00010   * Setup File für Spleiss_Modul
00011   * 
00012   * Folgende GPIOS nicht verwenden: PA11, PA12, PA5, PA8, PA9, PC13
00013   *
00014   * Freie GPIOS: 
00015   *                 PB_10    PWM
00016   *                 PB_8     PWM/I2C1_SCL
00017   *                 PB_9     PWM/I2C1_SDA
00018   *                 PC_4     ADC
00019   *                 PC_9     PWM
00020   *                 PB_15
00021   *                 PB_14
00022   *                 PB_13
00023   *
00024   ******************************************************************************
00025   */
00026 
00027 #ifndef MBED_SETUP_H
00028 #define MBED_SETUP_H
00029 
00030 
00031 // -----------------------------------------------------------------------------
00032 #include "mbed.h"
00033 #include "rtos.h"
00034 #include "main.h"
00035 #include "ST_SOLO.h"
00036 #include "ST_DUO.h"
00037 #include "STEPPER.h"
00038 #include "DevSPI.h"
00039 #include "XNucleoIHM02A1.h"
00040 #include "Display.h"
00041 #include "Buttons.h"
00042 #include "PWM.h"
00043 
00044 // -----------------------------------------------------------------------------
00045 // GPIO
00046 // -----------------------------------------------------------------------------
00047 
00048     // Stepper_Treiber
00049     #define SPI_CS_1        PA_4
00050     #define SPI_CS_2        PA_10
00051     #define SPI_CLK         PB_3
00052     #define SPI_MISO        PA_6
00053     #define SPI_MOSI        PA_7
00054     #define STB_MOTOR       PB_5
00055     #define IRQ_FLAG_MOTOR  PC_1
00056     #define IRQ_BUSY_MOTOR  PC_0
00057 
00058     // Display
00059     #define DISP_RS         PC_3
00060     #define DISP_RW         PC_2
00061     #define DISP_E          PB_7
00062     #define DISP_B0         PA_15
00063     #define DISP_B1         PA_14
00064     #define DISP_B2         PA_13
00065     #define DISP_B3         PC_12
00066     #define DISP_B4         PC_10
00067     #define DISP_B5         PC_8
00068     #define DISP_B6         PC_6
00069     #define DISP_B7         PC_5
00070 
00071     // Cutter_Einheit
00072     #define CUTTER_ARC_1    PB_6
00073     #define CUTTER_ARC_2    PB_8
00074     #define SERVO_PWM       PB_4
00075 
00076     // Speiss_Einheit
00077     #define SPLEISSER_ARC_1 PB_0
00078     #define SPLEISSER_ARC_2 PC_7
00079     
00080     // Lichtschranken
00081     #define LICHTSCHRANKE_1 PA_0
00082     #define LICHTSCHRANKE_2 PB_1
00083     #define LICHTSCHRANKE_3 PA_1
00084     
00085     // Buttons
00086     #define START_BUTTON    PB_14
00087     #define ABBRUCH_BUTTON  PB_15
00088 
00089     // Kommunikation_Filamentmessung
00090     #define CUT_SIGNAL      PB_2
00091     #define COM_SIGNAL      PB_12
00092     #define FERTIG_SIGNAL   PC_11
00093     // PC11 Reserve!!!!
00094 
00095     // Kommunikation Aufrollen
00096     #define STOP_SIGNAL     PB_10
00097 
00098 // -----------------------------------------------------------------------------
00099 // Parameter
00100 // -----------------------------------------------------------------------------
00101     
00102     // Allgemein
00103     #define BOOTTIME               10 // [s]
00104 
00105     // Weiche
00106     #define SERVO_FR              240 // [Hz]
00107     #define GOOD_FIL             31.5 // [°] (max 90)
00108     #define BAD_FIL                61 // [°] (min 0)
00109     
00110     // Cutter
00111     #define CUTTER_FRQ_1        20000 // [Hz]
00112     #define CUTTER_FRQ_2        18000 // [Hz]
00113     #define CUTTER_DUTY            70 // [%]
00114     
00115     // Spleisser
00116     #define SPLEISSER_FRQ_1     20000 // [Hz]
00117     #define SPLEISSER_FRQ_2     18000 // [Hz]
00118     #define SPLEISSER_DUTY         70 // [%]
00119     
00120     #define ARConTIME             160 // [ms]
00121     #define ARCoffTIME            130 // [ms]
00122     #define REPETITONS             11 // 
00123     #define FILSPEED              700
00124     #define FILACC                800
00125     #define COOLINGTIME             5 // [s]
00126     
00127     // DUO-Betrieb
00128     #define LAENGE_LS3_To_STEPPER2  2
00129 
00130     // SOLO-Betrieb
00131     #define WARTEZEIT              60 // [s]
00132     #define TRAVELSPEED           350
00133     #define TRAVELACC             200
00134     #define PRECISIONSPEED         40
00135     #define PRECISIONACC           10
00136     #define SLOWACC                50
00137     
00138 
00139 
00140     
00141     
00142     
00143 
00144 
00145 #endif