got speed calc working. Still goes in wrong direction
This commit is contained in:
parent
afe33303ad
commit
e367b994f2
|
@ -112,11 +112,11 @@ drivers:
|
||||||
adc_arch_winmode: No window mode
|
adc_arch_winmode: No window mode
|
||||||
adc_arch_winmoneo: false
|
adc_arch_winmoneo: false
|
||||||
adc_arch_winut: 0
|
adc_arch_winut: 0
|
||||||
adc_differential_mode: false
|
adc_differential_mode: true
|
||||||
adc_freerunning_mode: false
|
adc_freerunning_mode: false
|
||||||
adc_pinmux_negative: Internal ground
|
adc_pinmux_negative: ADC AIN0 pin
|
||||||
adc_pinmux_positive: ADC AIN6 pin
|
adc_pinmux_positive: ADC AIN6 pin
|
||||||
adc_prescaler: Peripheral clock divided by 16
|
adc_prescaler: Peripheral clock divided by 8
|
||||||
adc_reference: External reference A
|
adc_reference: External reference A
|
||||||
adc_resolution: 12-bit
|
adc_resolution: 12-bit
|
||||||
optional_signals:
|
optional_signals:
|
||||||
|
@ -206,7 +206,7 @@ drivers:
|
||||||
ccl_arch_lutei_3: false
|
ccl_arch_lutei_3: false
|
||||||
ccl_arch_luteo_0: true
|
ccl_arch_luteo_0: true
|
||||||
ccl_arch_luteo_1: false
|
ccl_arch_luteo_1: false
|
||||||
ccl_arch_luteo_2: false
|
ccl_arch_luteo_2: true
|
||||||
ccl_arch_luteo_3: false
|
ccl_arch_luteo_3: false
|
||||||
ccl_arch_runstdby: false
|
ccl_arch_runstdby: false
|
||||||
ccl_arch_seqsel_0: Sequential logic is disabled
|
ccl_arch_seqsel_0: Sequential logic is disabled
|
||||||
|
@ -1014,9 +1014,9 @@ drivers:
|
||||||
evsys_channel_43: No channel output selected
|
evsys_channel_43: No channel output selected
|
||||||
evsys_channel_44: No channel output selected
|
evsys_channel_44: No channel output selected
|
||||||
evsys_channel_45: No channel output selected
|
evsys_channel_45: No channel output selected
|
||||||
evsys_channel_46: No channel output selected
|
evsys_channel_46: Channel 1
|
||||||
evsys_channel_47: No channel output selected
|
evsys_channel_47: No channel output selected
|
||||||
evsys_channel_48: No channel output selected
|
evsys_channel_48: Channel 2
|
||||||
evsys_channel_49: No channel output selected
|
evsys_channel_49: No channel output selected
|
||||||
evsys_channel_5: No channel output selected
|
evsys_channel_5: No channel output selected
|
||||||
evsys_channel_50: No channel output selected
|
evsys_channel_50: No channel output selected
|
||||||
|
@ -1041,7 +1041,7 @@ drivers:
|
||||||
evsys_channel_8: No channel output selected
|
evsys_channel_8: No channel output selected
|
||||||
evsys_channel_9: No channel output selected
|
evsys_channel_9: No channel output selected
|
||||||
evsys_channel_setting_0: true
|
evsys_channel_setting_0: true
|
||||||
evsys_channel_setting_1: false
|
evsys_channel_setting_1: true
|
||||||
evsys_channel_setting_10: false
|
evsys_channel_setting_10: false
|
||||||
evsys_channel_setting_11: false
|
evsys_channel_setting_11: false
|
||||||
evsys_channel_setting_12: false
|
evsys_channel_setting_12: false
|
||||||
|
@ -1052,7 +1052,7 @@ drivers:
|
||||||
evsys_channel_setting_17: false
|
evsys_channel_setting_17: false
|
||||||
evsys_channel_setting_18: false
|
evsys_channel_setting_18: false
|
||||||
evsys_channel_setting_19: false
|
evsys_channel_setting_19: false
|
||||||
evsys_channel_setting_2: false
|
evsys_channel_setting_2: true
|
||||||
evsys_channel_setting_20: false
|
evsys_channel_setting_20: false
|
||||||
evsys_channel_setting_21: false
|
evsys_channel_setting_21: false
|
||||||
evsys_channel_setting_22: false
|
evsys_channel_setting_22: false
|
||||||
|
@ -1169,7 +1169,7 @@ drivers:
|
||||||
evsys_evd_8: false
|
evsys_evd_8: false
|
||||||
evsys_evd_9: false
|
evsys_evd_9: false
|
||||||
evsys_evgen_0: TCC0 overflow
|
evsys_evgen_0: TCC0 overflow
|
||||||
evsys_evgen_1: No event generator
|
evsys_evgen_1: CCL LUT output 0
|
||||||
evsys_evgen_10: No event generator
|
evsys_evgen_10: No event generator
|
||||||
evsys_evgen_11: No event generator
|
evsys_evgen_11: No event generator
|
||||||
evsys_evgen_12: No event generator
|
evsys_evgen_12: No event generator
|
||||||
|
@ -1180,7 +1180,7 @@ drivers:
|
||||||
evsys_evgen_17: No event generator
|
evsys_evgen_17: No event generator
|
||||||
evsys_evgen_18: No event generator
|
evsys_evgen_18: No event generator
|
||||||
evsys_evgen_19: No event generator
|
evsys_evgen_19: No event generator
|
||||||
evsys_evgen_2: No event generator
|
evsys_evgen_2: CCL LUT output 2
|
||||||
evsys_evgen_20: No event generator
|
evsys_evgen_20: No event generator
|
||||||
evsys_evgen_21: No event generator
|
evsys_evgen_21: No event generator
|
||||||
evsys_evgen_22: No event generator
|
evsys_evgen_22: No event generator
|
||||||
|
@ -1265,7 +1265,7 @@ drivers:
|
||||||
evsys_ovr_8: false
|
evsys_ovr_8: false
|
||||||
evsys_ovr_9: false
|
evsys_ovr_9: false
|
||||||
evsys_path_0: Asynchronous path
|
evsys_path_0: Asynchronous path
|
||||||
evsys_path_1: Synchronous path
|
evsys_path_1: Asynchronous path
|
||||||
evsys_path_10: Synchronous path
|
evsys_path_10: Synchronous path
|
||||||
evsys_path_11: Synchronous path
|
evsys_path_11: Synchronous path
|
||||||
evsys_path_12: Synchronous path
|
evsys_path_12: Synchronous path
|
||||||
|
@ -1276,7 +1276,7 @@ drivers:
|
||||||
evsys_path_17: Synchronous path
|
evsys_path_17: Synchronous path
|
||||||
evsys_path_18: Synchronous path
|
evsys_path_18: Synchronous path
|
||||||
evsys_path_19: Synchronous path
|
evsys_path_19: Synchronous path
|
||||||
evsys_path_2: Synchronous path
|
evsys_path_2: Asynchronous path
|
||||||
evsys_path_20: Synchronous path
|
evsys_path_20: Synchronous path
|
||||||
evsys_path_21: Synchronous path
|
evsys_path_21: Synchronous path
|
||||||
evsys_path_22: Synchronous path
|
evsys_path_22: Synchronous path
|
||||||
|
|
|
@ -339,7 +339,7 @@
|
||||||
// <i> These bits define the ADC clock relative to the peripheral clock (PRESCALER)
|
// <i> These bits define the ADC clock relative to the peripheral clock (PRESCALER)
|
||||||
// <id> adc_prescaler
|
// <id> adc_prescaler
|
||||||
#ifndef CONF_ADC_1_PRESCALER
|
#ifndef CONF_ADC_1_PRESCALER
|
||||||
#define CONF_ADC_1_PRESCALER 0x3
|
#define CONF_ADC_1_PRESCALER 0x2
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// <q> Free Running Mode
|
// <q> Free Running Mode
|
||||||
|
@ -353,7 +353,7 @@
|
||||||
// <i> In differential mode, the voltage difference between the MUXPOS and MUXNEG inputs will be converted by the ADC. (DIFFMODE)
|
// <i> In differential mode, the voltage difference between the MUXPOS and MUXNEG inputs will be converted by the ADC. (DIFFMODE)
|
||||||
// <id> adc_differential_mode
|
// <id> adc_differential_mode
|
||||||
#ifndef CONF_ADC_1_DIFFMODE
|
#ifndef CONF_ADC_1_DIFFMODE
|
||||||
#define CONF_ADC_1_DIFFMODE 0
|
#define CONF_ADC_1_DIFFMODE 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// <o> Positive Mux Input Selection
|
// <o> Positive Mux Input Selection
|
||||||
|
@ -399,7 +399,7 @@
|
||||||
// <i> These bits define the Mux selection for the negative ADC input. (MUXNEG)
|
// <i> These bits define the Mux selection for the negative ADC input. (MUXNEG)
|
||||||
// <id> adc_pinmux_negative
|
// <id> adc_pinmux_negative
|
||||||
#ifndef CONF_ADC_1_MUXNEG
|
#ifndef CONF_ADC_1_MUXNEG
|
||||||
#define CONF_ADC_1_MUXNEG 0x18
|
#define CONF_ADC_1_MUXNEG 0x0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// </h>
|
// </h>
|
||||||
|
|
|
@ -336,7 +336,7 @@
|
||||||
// <q> Event output enable
|
// <q> Event output enable
|
||||||
// <id> ccl_arch_luteo_2
|
// <id> ccl_arch_luteo_2
|
||||||
#ifndef CONF_CCL_LUTEO_2
|
#ifndef CONF_CCL_LUTEO_2
|
||||||
#define CONF_CCL_LUTEO_2 0
|
#define CONF_CCL_LUTEO_2 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// <q> Event input enable
|
// <q> Event input enable
|
||||||
|
|
|
@ -188,7 +188,7 @@
|
||||||
// <e> Channel 1 settings
|
// <e> Channel 1 settings
|
||||||
// <id> evsys_channel_setting_1
|
// <id> evsys_channel_setting_1
|
||||||
#ifndef CONF_EVSYS_CHANNEL_SETTINGS_1
|
#ifndef CONF_EVSYS_CHANNEL_SETTINGS_1
|
||||||
#define CONF_EVSYS_CHANNEL_SETTINGS_1 0
|
#define CONF_EVSYS_CHANNEL_SETTINGS_1 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// <y> Edge detection
|
// <y> Edge detection
|
||||||
|
@ -209,7 +209,7 @@
|
||||||
// <EVSYS_CHANNEL_PATH_ASYNCHRONOUS_Val"> Asynchronous path
|
// <EVSYS_CHANNEL_PATH_ASYNCHRONOUS_Val"> Asynchronous path
|
||||||
// <id> evsys_path_1
|
// <id> evsys_path_1
|
||||||
#ifndef CONF_PATH_1
|
#ifndef CONF_PATH_1
|
||||||
#define CONF_PATH_1 EVSYS_CHANNEL_PATH_SYNCHRONOUS_Val
|
#define CONF_PATH_1 EVSYS_CHANNEL_PATH_ASYNCHRONOUS_Val
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// <o> Event generator
|
// <o> Event generator
|
||||||
|
@ -333,7 +333,7 @@
|
||||||
// <0x77=>CCL LUT output 3
|
// <0x77=>CCL LUT output 3
|
||||||
// <id> evsys_evgen_1
|
// <id> evsys_evgen_1
|
||||||
#ifndef CONF_EVGEN_1
|
#ifndef CONF_EVGEN_1
|
||||||
#define CONF_EVGEN_1 0
|
#define CONF_EVGEN_1 116
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// <q> Overrun channel interrupt
|
// <q> Overrun channel interrupt
|
||||||
|
@ -369,7 +369,7 @@
|
||||||
// <e> Channel 2 settings
|
// <e> Channel 2 settings
|
||||||
// <id> evsys_channel_setting_2
|
// <id> evsys_channel_setting_2
|
||||||
#ifndef CONF_EVSYS_CHANNEL_SETTINGS_2
|
#ifndef CONF_EVSYS_CHANNEL_SETTINGS_2
|
||||||
#define CONF_EVSYS_CHANNEL_SETTINGS_2 0
|
#define CONF_EVSYS_CHANNEL_SETTINGS_2 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// <y> Edge detection
|
// <y> Edge detection
|
||||||
|
@ -390,7 +390,7 @@
|
||||||
// <EVSYS_CHANNEL_PATH_ASYNCHRONOUS_Val"> Asynchronous path
|
// <EVSYS_CHANNEL_PATH_ASYNCHRONOUS_Val"> Asynchronous path
|
||||||
// <id> evsys_path_2
|
// <id> evsys_path_2
|
||||||
#ifndef CONF_PATH_2
|
#ifndef CONF_PATH_2
|
||||||
#define CONF_PATH_2 EVSYS_CHANNEL_PATH_SYNCHRONOUS_Val
|
#define CONF_PATH_2 EVSYS_CHANNEL_PATH_ASYNCHRONOUS_Val
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// <o> Event generator
|
// <o> Event generator
|
||||||
|
@ -514,7 +514,7 @@
|
||||||
// <0x77=>CCL LUT output 3
|
// <0x77=>CCL LUT output 3
|
||||||
// <id> evsys_evgen_2
|
// <id> evsys_evgen_2
|
||||||
#ifndef CONF_EVGEN_2
|
#ifndef CONF_EVGEN_2
|
||||||
#define CONF_EVGEN_2 0
|
#define CONF_EVGEN_2 118
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// <q> Overrun channel interrupt
|
// <q> Overrun channel interrupt
|
||||||
|
@ -7544,7 +7544,7 @@
|
||||||
// <id> evsys_channel_46
|
// <id> evsys_channel_46
|
||||||
// <i> Indicates which channel is chosen for user
|
// <i> Indicates which channel is chosen for user
|
||||||
#ifndef CONF_CHANNEL_46
|
#ifndef CONF_CHANNEL_46
|
||||||
#define CONF_CHANNEL_46 0
|
#define CONF_CHANNEL_46 2
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// <o> Channel selection for TC3 event
|
// <o> Channel selection for TC3 event
|
||||||
|
@ -7624,7 +7624,7 @@
|
||||||
// <id> evsys_channel_48
|
// <id> evsys_channel_48
|
||||||
// <i> Indicates which channel is chosen for user
|
// <i> Indicates which channel is chosen for user
|
||||||
#ifndef CONF_CHANNEL_48
|
#ifndef CONF_CHANNEL_48
|
||||||
#define CONF_CHANNEL_48 0
|
#define CONF_CHANNEL_48 3
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// <o> Channel selection for TC5 event
|
// <o> Channel selection for TC5 event
|
||||||
|
|
|
@ -148,7 +148,8 @@ static void update_telemetry(void)
|
||||||
*M1_Motor_currentPhC = convert_to_mA(Motor1.Iphase_pu.C);
|
*M1_Motor_currentPhC = convert_to_mA(Motor1.Iphase_pu.C);
|
||||||
*M1_Motor__hallState = Motor1.motor_status.currentHallPattern;
|
*M1_Motor__hallState = Motor1.motor_status.currentHallPattern;
|
||||||
*M1_Motor_dutyCycle = Motor1.motor_status.duty_cycle;
|
*M1_Motor_dutyCycle = Motor1.motor_status.duty_cycle;
|
||||||
//
|
*M1_Motor_speed = (int16_t)Motor1.motor_status.calc_rpm;
|
||||||
|
*M1_Joint_abs_position = Motor1.motor_status.actualDirection;
|
||||||
/* Motor 2 */
|
/* Motor 2 */
|
||||||
*M2_Status = Motor2.motor_state.currentstate;
|
*M2_Status = Motor2.motor_state.currentstate;
|
||||||
*M2_Joint_rel_position = Motor2.motor_status.Num_Steps;
|
*M2_Joint_rel_position = Motor2.motor_status.Num_Steps;
|
||||||
|
@ -160,7 +161,8 @@ static void update_telemetry(void)
|
||||||
*M2_Motor_currentPhC = convert_to_mA(Motor2.Iphase_pu.C);
|
*M2_Motor_currentPhC = convert_to_mA(Motor2.Iphase_pu.C);
|
||||||
*M2_Motor__hallState = Motor2.motor_status.currentHallPattern;
|
*M2_Motor__hallState = Motor2.motor_status.currentHallPattern;
|
||||||
*M2_Motor_dutyCycle = Motor2.motor_status.duty_cycle;
|
*M2_Motor_dutyCycle = Motor2.motor_status.duty_cycle;
|
||||||
|
*M2_Motor_speed = (int16_t)Motor2.motor_status.calc_rpm;
|
||||||
|
*M2_Joint_abs_position = Motor2.motor_status.actualDirection;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void update_setpoints(void)
|
static void update_setpoints(void)
|
||||||
|
|
|
@ -148,7 +148,8 @@ static void update_telemetry(void)
|
||||||
*M1_Motor_currentPhC = convert_to_mA(Motor1.Iphase_pu.C);
|
*M1_Motor_currentPhC = convert_to_mA(Motor1.Iphase_pu.C);
|
||||||
*M1_Motor__hallState = Motor1.motor_status.currentHallPattern;
|
*M1_Motor__hallState = Motor1.motor_status.currentHallPattern;
|
||||||
*M1_Motor_dutyCycle = Motor1.motor_status.duty_cycle;
|
*M1_Motor_dutyCycle = Motor1.motor_status.duty_cycle;
|
||||||
//
|
*M1_Motor_speed = (int16_t)Motor1.motor_status.calc_rpm;
|
||||||
|
*M1_Joint_abs_position = Motor1.motor_status.actualDirection;
|
||||||
/* Motor 2 */
|
/* Motor 2 */
|
||||||
*M2_Status = Motor2.motor_state.currentstate;
|
*M2_Status = Motor2.motor_state.currentstate;
|
||||||
*M2_Joint_rel_position = Motor2.motor_status.Num_Steps;
|
*M2_Joint_rel_position = Motor2.motor_status.Num_Steps;
|
||||||
|
@ -160,7 +161,8 @@ static void update_telemetry(void)
|
||||||
*M2_Motor_currentPhC = convert_to_mA(Motor2.Iphase_pu.C);
|
*M2_Motor_currentPhC = convert_to_mA(Motor2.Iphase_pu.C);
|
||||||
*M2_Motor__hallState = Motor2.motor_status.currentHallPattern;
|
*M2_Motor__hallState = Motor2.motor_status.currentHallPattern;
|
||||||
*M2_Motor_dutyCycle = Motor2.motor_status.duty_cycle;
|
*M2_Motor_dutyCycle = Motor2.motor_status.duty_cycle;
|
||||||
|
*M2_Motor_speed = (int16_t)Motor2.motor_status.calc_rpm;
|
||||||
|
*M2_Joint_abs_position = Motor2.motor_status.actualDirection;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void update_setpoints(void)
|
static void update_setpoints(void)
|
||||||
|
|
|
@ -150,7 +150,7 @@
|
||||||
<AcmeProjectActionInfo Action="File" Source="hri/hri_usb_e51.h" IsConfig="false" Hash="x6M7vYgNCS2oECqykr5+yw" />
|
<AcmeProjectActionInfo Action="File" Source="hri/hri_usb_e51.h" IsConfig="false" Hash="x6M7vYgNCS2oECqykr5+yw" />
|
||||||
<AcmeProjectActionInfo Action="File" Source="hri/hri_wdt_e51.h" IsConfig="false" Hash="o9Rg/hyuMzwOCphVc7uG1w" />
|
<AcmeProjectActionInfo Action="File" Source="hri/hri_wdt_e51.h" IsConfig="false" Hash="o9Rg/hyuMzwOCphVc7uG1w" />
|
||||||
<AcmeProjectActionInfo Action="File" Source="main.c" IsConfig="false" Hash="k0AH7j+BrmdFhBPzCCMptA" />
|
<AcmeProjectActionInfo Action="File" Source="main.c" IsConfig="false" Hash="k0AH7j+BrmdFhBPzCCMptA" />
|
||||||
<AcmeProjectActionInfo Action="File" Source="driver_init.c" IsConfig="false" Hash="rYZS19ftiPajVCnE2RLIkA" />
|
<AcmeProjectActionInfo Action="File" Source="driver_init.c" IsConfig="false" Hash="Yq1q1Sa7cd5/H8qv36yeFQ" />
|
||||||
<AcmeProjectActionInfo Action="File" Source="driver_init.h" IsConfig="false" Hash="Djt0mG2wi689XcXrLHKt0g" />
|
<AcmeProjectActionInfo Action="File" Source="driver_init.h" IsConfig="false" Hash="Djt0mG2wi689XcXrLHKt0g" />
|
||||||
<AcmeProjectActionInfo Action="File" Source="atmel_start_pins.h" IsConfig="false" Hash="ByCGTBpkOpAk+zk9txhJSA" />
|
<AcmeProjectActionInfo Action="File" Source="atmel_start_pins.h" IsConfig="false" Hash="ByCGTBpkOpAk+zk9txhJSA" />
|
||||||
<AcmeProjectActionInfo Action="File" Source="examples/driver_examples.h" IsConfig="false" Hash="kvd7eb1e9guBnXkzUfLueg" />
|
<AcmeProjectActionInfo Action="File" Source="examples/driver_examples.h" IsConfig="false" Hash="kvd7eb1e9guBnXkzUfLueg" />
|
||||||
|
@ -207,12 +207,12 @@
|
||||||
<AcmeProjectActionInfo Action="File" Source="hpl/tcc/hpl_tcc.h" IsConfig="false" Hash="rdWkAK12qkOYV59tWwzy6A" />
|
<AcmeProjectActionInfo Action="File" Source="hpl/tcc/hpl_tcc.h" IsConfig="false" Hash="rdWkAK12qkOYV59tWwzy6A" />
|
||||||
<AcmeProjectActionInfo Action="File" Source="atmel_start.h" IsConfig="false" Hash="9RBG5E2ViQiSP2Gn4/FGpA" />
|
<AcmeProjectActionInfo Action="File" Source="atmel_start.h" IsConfig="false" Hash="9RBG5E2ViQiSP2Gn4/FGpA" />
|
||||||
<AcmeProjectActionInfo Action="File" Source="atmel_start.c" IsConfig="false" Hash="1RHIE7zTtYK4DURNPUqF9w" />
|
<AcmeProjectActionInfo Action="File" Source="atmel_start.c" IsConfig="false" Hash="1RHIE7zTtYK4DURNPUqF9w" />
|
||||||
<AcmeProjectActionInfo Action="File" Source="config/hpl_adc_config.h" IsConfig="true" Hash="49h3xITKddAgoXK8+KV9zQ" />
|
<AcmeProjectActionInfo Action="File" Source="config/hpl_adc_config.h" IsConfig="true" Hash="XAOTvk5xMalucgzL/ILTWw" />
|
||||||
<AcmeProjectActionInfo Action="File" Source="config/hpl_ccl_config.h" IsConfig="true" Hash="qVCPwh4wAVouqj+bKLxfMA" />
|
<AcmeProjectActionInfo Action="File" Source="config/hpl_ccl_config.h" IsConfig="true" Hash="Q1yijLwNXjFOsGrwEEma+g" />
|
||||||
<AcmeProjectActionInfo Action="File" Source="config/hpl_cmcc_config.h" IsConfig="true" Hash="bmtxQ8rLloaRtAo2HeXZRQ" />
|
<AcmeProjectActionInfo Action="File" Source="config/hpl_cmcc_config.h" IsConfig="true" Hash="bmtxQ8rLloaRtAo2HeXZRQ" />
|
||||||
<AcmeProjectActionInfo Action="File" Source="config/hpl_dmac_config.h" IsConfig="true" Hash="xCXhbdBwXKUe304TPFonTw" />
|
<AcmeProjectActionInfo Action="File" Source="config/hpl_dmac_config.h" IsConfig="true" Hash="xCXhbdBwXKUe304TPFonTw" />
|
||||||
<AcmeProjectActionInfo Action="File" Source="config/hpl_eic_config.h" IsConfig="true" Hash="TppQbvFQZJVVi94ogHlIog" />
|
<AcmeProjectActionInfo Action="File" Source="config/hpl_eic_config.h" IsConfig="true" Hash="TppQbvFQZJVVi94ogHlIog" />
|
||||||
<AcmeProjectActionInfo Action="File" Source="config/hpl_evsys_config.h" IsConfig="true" Hash="nOzj3aNXGFe1uh39MSx0eA" />
|
<AcmeProjectActionInfo Action="File" Source="config/hpl_evsys_config.h" IsConfig="true" Hash="/3bNiu/UgpvPbmvfRA+w3g" />
|
||||||
<AcmeProjectActionInfo Action="File" Source="config/hpl_gclk_config.h" IsConfig="true" Hash="fvc5nhPTGTNHCTNlzs6nhA" />
|
<AcmeProjectActionInfo Action="File" Source="config/hpl_gclk_config.h" IsConfig="true" Hash="fvc5nhPTGTNHCTNlzs6nhA" />
|
||||||
<AcmeProjectActionInfo Action="File" Source="config/hpl_mclk_config.h" IsConfig="true" Hash="pxBzoQXTG66x4dbzVzxteg" />
|
<AcmeProjectActionInfo Action="File" Source="config/hpl_mclk_config.h" IsConfig="true" Hash="pxBzoQXTG66x4dbzVzxteg" />
|
||||||
<AcmeProjectActionInfo Action="File" Source="config/hpl_osc32kctrl_config.h" IsConfig="true" Hash="HgvzEqDUH4jq/syjj/+G+Q" />
|
<AcmeProjectActionInfo Action="File" Source="config/hpl_osc32kctrl_config.h" IsConfig="true" Hash="HgvzEqDUH4jq/syjj/+G+Q" />
|
||||||
|
@ -228,7 +228,7 @@
|
||||||
</AcmeProjectConfig>
|
</AcmeProjectConfig>
|
||||||
</AcmeProjectConfig>
|
</AcmeProjectConfig>
|
||||||
<avrtool>com.atmel.avrdbg.tool.atmelice</avrtool>
|
<avrtool>com.atmel.avrdbg.tool.atmelice</avrtool>
|
||||||
<avrtoolserialnumber>J42700013870</avrtoolserialnumber>
|
<avrtoolserialnumber>J42700013287</avrtoolserialnumber>
|
||||||
<avrdeviceexpectedsignature>0x61810302</avrdeviceexpectedsignature>
|
<avrdeviceexpectedsignature>0x61810302</avrdeviceexpectedsignature>
|
||||||
<avrtoolinterface>SWD</avrtoolinterface>
|
<avrtoolinterface>SWD</avrtoolinterface>
|
||||||
<com_atmel_avrdbg_tool_atmelice>
|
<com_atmel_avrdbg_tool_atmelice>
|
||||||
|
@ -239,7 +239,7 @@
|
||||||
<InterfaceName>SWD</InterfaceName>
|
<InterfaceName>SWD</InterfaceName>
|
||||||
</ToolOptions>
|
</ToolOptions>
|
||||||
<ToolType>com.atmel.avrdbg.tool.atmelice</ToolType>
|
<ToolType>com.atmel.avrdbg.tool.atmelice</ToolType>
|
||||||
<ToolNumber>J42700013870</ToolNumber>
|
<ToolNumber>J42700013287</ToolNumber>
|
||||||
<ToolName>Atmel-ICE</ToolName>
|
<ToolName>Atmel-ICE</ToolName>
|
||||||
</com_atmel_avrdbg_tool_atmelice>
|
</com_atmel_avrdbg_tool_atmelice>
|
||||||
<avrtoolinterfaceclock>2000000</avrtoolinterfaceclock>
|
<avrtoolinterfaceclock>2000000</avrtoolinterfaceclock>
|
||||||
|
@ -387,6 +387,7 @@
|
||||||
<armgcc.compiler.directories.IncludePaths>
|
<armgcc.compiler.directories.IncludePaths>
|
||||||
<ListValues>
|
<ListValues>
|
||||||
<Value>%24(PackRepoDir)\arm\CMSIS\5.4.0\CMSIS\Core\Include\</Value>
|
<Value>%24(PackRepoDir)\arm\CMSIS\5.4.0\CMSIS\Core\Include\</Value>
|
||||||
|
<Value>%24(PackRepoDir)\atmel\SAME51_DFP\1.1.139\include</Value>
|
||||||
<Value>../Config</Value>
|
<Value>../Config</Value>
|
||||||
<Value>../</Value>
|
<Value>../</Value>
|
||||||
<Value>../examples</Value>
|
<Value>../examples</Value>
|
||||||
|
@ -411,10 +412,8 @@
|
||||||
<Value>../hpl/tc</Value>
|
<Value>../hpl/tc</Value>
|
||||||
<Value>../hpl/tcc</Value>
|
<Value>../hpl/tcc</Value>
|
||||||
<Value>../hri</Value>
|
<Value>../hri</Value>
|
||||||
<Value>%24(PackRepoDir)\atmel\SAME51_DFP\1.1.139\include</Value>
|
|
||||||
</ListValues>
|
</ListValues>
|
||||||
</armgcc.compiler.directories.IncludePaths>
|
</armgcc.compiler.directories.IncludePaths>
|
||||||
<armgcc.compiler.optimization.level>Optimize more (-O2)</armgcc.compiler.optimization.level>
|
|
||||||
<armgcc.compiler.optimization.PrepareFunctionsForGarbageCollection>True</armgcc.compiler.optimization.PrepareFunctionsForGarbageCollection>
|
<armgcc.compiler.optimization.PrepareFunctionsForGarbageCollection>True</armgcc.compiler.optimization.PrepareFunctionsForGarbageCollection>
|
||||||
<armgcc.compiler.optimization.DebugLevel>Maximum (-g3)</armgcc.compiler.optimization.DebugLevel>
|
<armgcc.compiler.optimization.DebugLevel>Maximum (-g3)</armgcc.compiler.optimization.DebugLevel>
|
||||||
<armgcc.compiler.warnings.AllWarnings>True</armgcc.compiler.warnings.AllWarnings>
|
<armgcc.compiler.warnings.AllWarnings>True</armgcc.compiler.warnings.AllWarnings>
|
||||||
|
@ -439,6 +438,7 @@
|
||||||
<armgcc.assembler.general.IncludePaths>
|
<armgcc.assembler.general.IncludePaths>
|
||||||
<ListValues>
|
<ListValues>
|
||||||
<Value>%24(PackRepoDir)\arm\CMSIS\5.4.0\CMSIS\Core\Include\</Value>
|
<Value>%24(PackRepoDir)\arm\CMSIS\5.4.0\CMSIS\Core\Include\</Value>
|
||||||
|
<Value>%24(PackRepoDir)\atmel\SAME51_DFP\1.1.139\include</Value>
|
||||||
<Value>../Config</Value>
|
<Value>../Config</Value>
|
||||||
<Value>../</Value>
|
<Value>../</Value>
|
||||||
<Value>../examples</Value>
|
<Value>../examples</Value>
|
||||||
|
@ -463,13 +463,13 @@
|
||||||
<Value>../hpl/tc</Value>
|
<Value>../hpl/tc</Value>
|
||||||
<Value>../hpl/tcc</Value>
|
<Value>../hpl/tcc</Value>
|
||||||
<Value>../hri</Value>
|
<Value>../hri</Value>
|
||||||
<Value>%24(PackRepoDir)\atmel\SAME51_DFP\1.1.139\include</Value>
|
|
||||||
</ListValues>
|
</ListValues>
|
||||||
</armgcc.assembler.general.IncludePaths>
|
</armgcc.assembler.general.IncludePaths>
|
||||||
<armgcc.assembler.debugging.DebugLevel>Default (-g)</armgcc.assembler.debugging.DebugLevel>
|
<armgcc.assembler.debugging.DebugLevel>Default (-g)</armgcc.assembler.debugging.DebugLevel>
|
||||||
<armgcc.preprocessingassembler.general.IncludePaths>
|
<armgcc.preprocessingassembler.general.IncludePaths>
|
||||||
<ListValues>
|
<ListValues>
|
||||||
<Value>%24(PackRepoDir)\arm\CMSIS\5.4.0\CMSIS\Core\Include\</Value>
|
<Value>%24(PackRepoDir)\arm\CMSIS\5.4.0\CMSIS\Core\Include\</Value>
|
||||||
|
<Value>%24(PackRepoDir)\atmel\SAME51_DFP\1.1.139\include</Value>
|
||||||
<Value>../Config</Value>
|
<Value>../Config</Value>
|
||||||
<Value>../</Value>
|
<Value>../</Value>
|
||||||
<Value>../examples</Value>
|
<Value>../examples</Value>
|
||||||
|
@ -494,7 +494,6 @@
|
||||||
<Value>../hpl/tc</Value>
|
<Value>../hpl/tc</Value>
|
||||||
<Value>../hpl/tcc</Value>
|
<Value>../hpl/tcc</Value>
|
||||||
<Value>../hri</Value>
|
<Value>../hri</Value>
|
||||||
<Value>%24(PackRepoDir)\atmel\SAME51_DFP\1.1.139\include</Value>
|
|
||||||
</ListValues>
|
</ListValues>
|
||||||
</armgcc.preprocessingassembler.general.IncludePaths>
|
</armgcc.preprocessingassembler.general.IncludePaths>
|
||||||
<armgcc.preprocessingassembler.debugging.DebugLevel>Default (-Wa,-g)</armgcc.preprocessingassembler.debugging.DebugLevel>
|
<armgcc.preprocessingassembler.debugging.DebugLevel>Default (-Wa,-g)</armgcc.preprocessingassembler.debugging.DebugLevel>
|
||||||
|
|
|
@ -11,8 +11,7 @@
|
||||||
#include "utilities.h"
|
#include "utilities.h"
|
||||||
#include "Ethercat_SlaveDef.h"
|
#include "Ethercat_SlaveDef.h"
|
||||||
|
|
||||||
|
void motor_StateMachine(BLDCMotor_t* const motor)
|
||||||
void motor_StateMachine(BLDCMotor_t *motor)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
if (motor->motor_state.fault)
|
if (motor->motor_state.fault)
|
||||||
|
@ -34,11 +33,14 @@ void motor_StateMachine(BLDCMotor_t *motor)
|
||||||
motor->motor_state.currentstate = MOTOR_IDLE;
|
motor->motor_state.currentstate = MOTOR_IDLE;
|
||||||
break;
|
break;
|
||||||
case MOTOR_IDLE:
|
case MOTOR_IDLE:
|
||||||
|
hri_tcc_write_PATTBUF_reg(motor->motor_param->pwm_desc->device.hw, DISABLE_PATTERN);
|
||||||
motor->motor_state.previousstate = motor->motor_state.currentstate;
|
motor->motor_state.previousstate = motor->motor_state.currentstate;
|
||||||
motor->motor_state.currentstate = MOTOR_OPEN_LOOP_STATE;
|
motor->motor_state.currentstate = MOTOR_OPEN_LOOP_STATE;
|
||||||
break;
|
break;
|
||||||
case MOTOR_OPEN_LOOP_STATE:
|
case MOTOR_OPEN_LOOP_STATE:
|
||||||
BLDC_runOpenLoop(motor, *M1_Desired_dc);
|
BLDC_runOpenLoop(motor, *M1_Desired_dc);
|
||||||
|
calculate_motor_speed(motor);
|
||||||
|
motor->motor_state.previousstate = motor->motor_state.currentstate;
|
||||||
break;
|
break;
|
||||||
case MOTOR_PVI_CTRL_STATE:
|
case MOTOR_PVI_CTRL_STATE:
|
||||||
switch (Motor1.regulation_loop_count) {
|
switch (Motor1.regulation_loop_count) {
|
||||||
|
@ -49,7 +51,7 @@ void motor_StateMachine(BLDCMotor_t *motor)
|
||||||
|
|
||||||
case 5: case 10: case 15: case 20:/* PWM FREQ / 5 - 5kHz */
|
case 5: case 10: case 15: case 20:/* PWM FREQ / 5 - 5kHz */
|
||||||
|
|
||||||
//calculate_motor_speed();
|
//calculate_motor_speed(motor);
|
||||||
//calculate_motor_speed();
|
//calculate_motor_speed();
|
||||||
|
|
||||||
BLDC_runSpeedCntl(&Motor1, Motor1.motor_status.calc_rpm, Motor1.controllers.Pid_Speed.Ref_pu);
|
BLDC_runSpeedCntl(&Motor1, Motor1.motor_status.calc_rpm, Motor1.controllers.Pid_Speed.Ref_pu);
|
||||||
|
@ -75,7 +77,7 @@ void motor_StateMachine(BLDCMotor_t *motor)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void BldcInitStruct(BLDCMotor_t *motor, BLDCMotor_param_t *motor_param)
|
void BldcInitStruct(BLDCMotor_t* const motor, BLDCMotor_param_t * const motor_param)
|
||||||
{
|
{
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
// Assign Motor Parameters:
|
// Assign Motor Parameters:
|
||||||
|
@ -97,7 +99,7 @@ void BldcInitStruct(BLDCMotor_t *motor, BLDCMotor_param_t *motor_param)
|
||||||
motor->motor_status.Num_Steps = 0;
|
motor->motor_status.Num_Steps = 0;
|
||||||
motor->motor_status.cur_comm_step = 0;
|
motor->motor_status.cur_comm_step = 0;
|
||||||
motor->motor_status.currentHallPattern = 1;
|
motor->motor_status.currentHallPattern = 1;
|
||||||
motor->motor_status.nextHallPattern = 3;
|
//motor->motor_status.nextHallPattern = 3;
|
||||||
motor->motor_setpoints.directionOffset = 0;
|
motor->motor_setpoints.directionOffset = 0;
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
@ -179,7 +181,7 @@ void BldcInitStruct(BLDCMotor_t *motor, BLDCMotor_param_t *motor_param)
|
||||||
motor->controllers.Pi_Pos.OutMin_pu = -(motor_param->motor_Max_Spd_RPM);
|
motor->controllers.Pi_Pos.OutMin_pu = -(motor_param->motor_Max_Spd_RPM);
|
||||||
}
|
}
|
||||||
|
|
||||||
void exec_commutation(BLDCMotor_t *motor)
|
void exec_commutation(BLDCMotor_t* const motor)
|
||||||
{
|
{
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
@ -190,45 +192,41 @@ void exec_commutation(BLDCMotor_t *motor)
|
||||||
volatile uint8_t currentHall = 1;
|
volatile uint8_t currentHall = 1;
|
||||||
currentHall = motor->readHall();
|
currentHall = motor->readHall();
|
||||||
motor->motor_status.currentHallPattern = currentHall;
|
motor->motor_status.currentHallPattern = currentHall;
|
||||||
|
|
||||||
|
|
||||||
volatile uint8_t currentHallv2 = readHallSensorM1v2();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
// Set Pattern Buffers
|
// Set Pattern Buffers
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
volatile uint16_t temp_M1 = COMMUTATION_PATTERN[motor->motor_status.currentHallPattern +
|
volatile uint16_t temp_M1 = COMMUTATION_PATTERN[currentHall +
|
||||||
motor->motor_setpoints.directionOffset];
|
motor->motor_setpoints.directionOffset];
|
||||||
|
|
||||||
hri_tcc_write_PATTBUF_reg(motor->motor_param->pwm_desc->device.hw, temp_M1);
|
hri_tcc_write_PATTBUF_reg(motor->motor_param->pwm_desc->device.hw, temp_M1);
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
// Set Calculated Duty Cycles
|
// Set Calculated Duty Cycle
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
hri_tcc_write_CCBUF_CCBUF_bf(motor->motor_param->pwm_desc->device.hw, 0, motor->motor_status.duty_cycle);
|
hri_tcc_write_CCBUF_CCBUF_bf(motor->motor_param->pwm_desc->device.hw, 0, motor->motor_status.duty_cycle);
|
||||||
|
|
||||||
motor->motor_status.cur_comm_step = MOTOR_COMMUTATION_STEPS[motor->motor_status.currentHallPattern];
|
volatile uint8_t cur_comm_step = MOTOR_COMMUTATION_STEPS[currentHall];
|
||||||
volatile int8_t step_change1 = motor->motor_status.cur_comm_step - motor->motor_status.prev_comm_step;
|
motor->motor_status.cur_comm_step = cur_comm_step;
|
||||||
|
volatile int8_t step_change = (cur_comm_step - motor->motor_status.prev_comm_step);
|
||||||
|
|
||||||
switch(step_change1)
|
switch(step_change)
|
||||||
{
|
{
|
||||||
case -1: case 5:
|
case 1: case -5:
|
||||||
motor->motor_status.Num_Steps = motor->motor_status.Num_Steps+1;
|
motor->motor_status.Num_Steps += 1;
|
||||||
motor->motor_status.actualDirection = CW;
|
motor->motor_status.actualDirection = CW;
|
||||||
//Motor1.motor_setpoints.directionOffset = DIRECTION_CW_OFFSET;
|
//Motor1.motor_setpoints.directionOffset = DIRECTION_CW_OFFSET;
|
||||||
break;
|
break;
|
||||||
case 1: case -5:
|
case -1: case 5:
|
||||||
motor->motor_status.Num_Steps = motor->motor_status.Num_Steps-1;
|
motor->motor_status.Num_Steps -= 1;
|
||||||
motor->motor_status.actualDirection = CCW;
|
motor->motor_status.actualDirection = CCW;
|
||||||
//Motor1.motor_setpoints.directionOffset = DIRECTION_CCW_OFFSET;
|
//Motor1.motor_setpoints.directionOffset = DIRECTION_CCW_OFFSET;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
// do nothing
|
// do nothing
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
motor->motor_status.prev_comm_step = motor->motor_status.cur_comm_step;
|
motor->motor_status.prev_comm_step = cur_comm_step;
|
||||||
//toc_port(DEBUG_2_PORT);
|
//toc_port(DEBUG_2_PORT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -238,7 +236,7 @@ void exec_commutation(BLDCMotor_t *motor)
|
||||||
// CW -> Always positive current
|
// CW -> Always positive current
|
||||||
// CCW -> Always negative current
|
// CCW -> Always negative current
|
||||||
//// ------------------------------------------------------------------------------
|
//// ------------------------------------------------------------------------------
|
||||||
void select_active_phase(BLDCMotor_t *Motor)
|
void select_active_phase(BLDCMotor_t* const Motor)
|
||||||
{
|
{
|
||||||
uint8_t hall_state = Motor->motor_status.currentHallPattern;
|
uint8_t hall_state = Motor->motor_status.currentHallPattern;
|
||||||
volatile float32_t phase_current = 0;
|
volatile float32_t phase_current = 0;
|
||||||
|
@ -263,24 +261,27 @@ void select_active_phase(BLDCMotor_t *Motor)
|
||||||
Motor->Iphase_pu.Bus = phase_current;
|
Motor->Iphase_pu.Bus = phase_current;
|
||||||
}
|
}
|
||||||
|
|
||||||
void calculate_motor_speed(BLDCMotor_t *motor)
|
void calculate_motor_speed(BLDCMotor_t* const motor)
|
||||||
{
|
{
|
||||||
//tic_port(DEBUG_2_PORT);
|
//tic_port(DEBUG_2_PORT);
|
||||||
volatile uint32_t temp_rpm = 0;
|
volatile uint32_t temp_rpm = 0;
|
||||||
hri_tccount32_read_CC_reg(TC0, 0); /* Read CC0 but throw away)*/
|
hri_tccount32_read_CC_reg(TC2, 0); /* Read CC0 but throw away)*/
|
||||||
volatile uint32_t period_after_capture = hri_tccount32_read_CC_reg(TC0, 1);
|
volatile uint32_t period_after_capture = hri_tccount32_read_CC_reg(TC2, 1);
|
||||||
if((period_after_capture > UINT32_MAX)|| (period_after_capture > 10712046)) {
|
if((period_after_capture > UINT32_MAX)||(period_after_capture == 0)) {
|
||||||
Motor1.motor_status.calc_rpm = 0;
|
motor->motor_status.calc_rpm = 0;
|
||||||
} else {
|
} else {
|
||||||
//uint32_t test = (SPEEDFACTOR, period_after_capture);
|
////uint32_t test = (SPEEDFACTOR, period_after_capture);
|
||||||
//temp_rpm = SPEEDFACTOR / period_after_capture;
|
////temp_rpm = SPEEDFACTOR / period_after_capture;
|
||||||
//tic_port(DEBUG_3_PORT);
|
////tic_port(DEBUG_3_PORT);
|
||||||
temp_rpm = HZ_TO_RPM / (period_after_capture*motor->motor_param->motor_commutationStates);
|
temp_rpm = HZ_TO_RPM / (period_after_capture * 42);
|
||||||
//temp_rpm = HZ_TO_RPM * period_after_capture;
|
//temp_rpm = HZ_TO_RPM * period_after_capture;
|
||||||
//toc_port(DEBUG_3_PORT);
|
////toc_port(DEBUG_3_PORT);
|
||||||
|
|
||||||
|
//uint32_t muti = DEVICE_SPEEDTC_FREQUENCY_Hz*60;
|
||||||
|
//temp_rpm = (muti) / (period_after_capture*42);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Motor1.motor_status.actualDirection == CCW) /* Changed from CCW */
|
if(motor->motor_status.actualDirection == CCW) /* Changed from CCW */
|
||||||
{
|
{
|
||||||
//*motor_speed = -1* Motor1.calc_rpm;
|
//*motor_speed = -1* Motor1.calc_rpm;
|
||||||
temp_rpm = -1 * temp_rpm;
|
temp_rpm = -1 * temp_rpm;
|
||||||
|
@ -289,33 +290,37 @@ void calculate_motor_speed(BLDCMotor_t *motor)
|
||||||
temp_rpm = temp_rpm;
|
temp_rpm = temp_rpm;
|
||||||
}
|
}
|
||||||
|
|
||||||
Motor1.motor_status.calc_rpm = (int16_t)temp_rpm;
|
//motor->motor_status.calc_rpm = (int16_t)temp_rpm;
|
||||||
//toc_port(DEBUG_2_PORT);
|
//toc_port(DEBUG_2_PORT);
|
||||||
|
|
||||||
//#ifdef AVERAGE_SPEED_MEASURE
|
//#ifdef AVERAGE_SPEED_MEASURE
|
||||||
|
//if(temp_rpm==0)
|
||||||
|
//#define n_SAMPLE 8
|
||||||
|
//static uint32_t speed_average = 0;
|
||||||
|
//static uint8_t count = 1;
|
||||||
//// To avoid noise an average is realized on 8 samples
|
//// To avoid noise an average is realized on 8 samples
|
||||||
//speed_average += temp_rpm;
|
//speed_average += temp_rpm;
|
||||||
//if(count >= n_SAMPLE)
|
//if(count >= n_SAMPLE)
|
||||||
//{
|
//{
|
||||||
//count = 1;
|
//count = 1;
|
||||||
//Motor1.motor_status.calc_rpm = (speed_average >> 3); // divide by 32
|
//motor->motor_status.calc_rpm = (speed_average >> 3); // divide by 8
|
||||||
////Motor1.motor_status.calc_rpm = (speed_average); // divide by 32
|
////Motor1.motor_status.calc_rpm = (speed_average); // divide by 8
|
||||||
//speed_average = 0;
|
//speed_average = 0;
|
||||||
////*Spare_byte1 = motorState.actualDirection;
|
////*Spare_byte1 = motorState.actualDirection;
|
||||||
//if(Motor1.motor_status.actualDirection == CCW) /* Changed from CCW */
|
//if(motor->motor_status.actualDirection == CCW) /* Changed from CCW */
|
||||||
//{
|
//{
|
||||||
////*motor_speed = -1* Motor1.calc_rpm;
|
////*motor_speed = -1* Motor1.calc_rpm;
|
||||||
//Motor1.motor_status.calc_rpm = -1* Motor1.motor_status.calc_rpm;
|
//motor->motor_status.calc_rpm = -1* motor->motor_status.calc_rpm;
|
||||||
//} else {
|
//} else {
|
||||||
////*motor_speed = Motor1.calc_rpm;
|
////*motor_speed = Motor1.calc_rpm;
|
||||||
//Motor1.motor_status.calc_rpm = Motor1.motor_status.calc_rpm;
|
//motor->motor_status.calc_rpm = motor->motor_status.calc_rpm;
|
||||||
//}
|
//}
|
||||||
//return;
|
//return;
|
||||||
//}
|
//}
|
||||||
//else count++;
|
//else count++;
|
||||||
//#else
|
|
||||||
//Motor1.motor_status.calc_rpm = (int16_t)temp_rpm;
|
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
|
motor->motor_status.calc_rpm = (int16_t)temp_rpm;
|
||||||
//toc_port(DEBUG_2_PORT);
|
//toc_port(DEBUG_2_PORT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -418,36 +423,18 @@ volatile uint8_t readHallSensorM1(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
volatile uint8_t motor_read = 0;
|
volatile uint8_t motor_read = 0;
|
||||||
motor_read = (motor_read & M1_HALL_A_MASK) | (uint8_t)((PORT->Group[M1_HALL_A_GROUP].IN.reg & M1_HALL_A_PORT)>>(M1_HALL_A_LSR));
|
motor_read = (motor_read & M1_HALL_A_MASK) | (uint8_t)((PORT->Group[M1_HALL_A_GROUP].IN.reg & M1_HALL_A_PORT)>>(M1_HALL_A_LSR));
|
||||||
motor_read = (motor_read & M1_HALL_B_MASK) | (uint8_t)((PORT->Group[M1_HALL_B_GROUP].IN.reg & M1_HALL_B_PORT)>>(M1_HALL_B_LSR));
|
motor_read = (motor_read & M1_HALL_B_MASK) | (uint8_t)((PORT->Group[M1_HALL_B_GROUP].IN.reg & M1_HALL_B_PORT)>>(M1_HALL_B_LSR));
|
||||||
motor_read = (motor_read & M1_HALL_C_MASK) | (uint8_t)((PORT->Group[M1_HALL_C_GROUP].IN.reg & M1_HALL_C_PORT)>>(M1_HALL_C_LSR));
|
motor_read = (motor_read & M1_HALL_C_MASK) | (uint8_t)((PORT->Group[M1_HALL_C_GROUP].IN.reg & M1_HALL_C_PORT)>>(M1_HALL_C_LSR));
|
||||||
|
|
||||||
//volatile uint8_t a = gpio_get_pin_level(M1_HALL_A_PIN);
|
|
||||||
//volatile uint8_t b = gpio_get_pin_level(M1_HALL_B_PIN);
|
|
||||||
//volatile uint8_t c = gpio_get_pin_level(M1_HALL_C_PIN);
|
|
||||||
//volatile uint8_t motor_read2 = ((a << 2)|(b << 1)|(c << 0));
|
|
||||||
//return ((a << 2) |
|
|
||||||
//(b << 1) |
|
|
||||||
//(c << 0));
|
|
||||||
return motor_read;
|
return motor_read;
|
||||||
}
|
|
||||||
|
|
||||||
volatile uint8_t readHallSensorM1v2(void)
|
|
||||||
{
|
|
||||||
|
|
||||||
volatile uint8_t motor_read = 0;
|
|
||||||
motor_read = (motor_read & M1_HALL_A_MASK) | (uint8_t)((PORT->Group[M1_HALL_A_GROUP].IN.reg & M1_HALL_A_PORT)>>(M1_HALL_A_LSR));
|
|
||||||
motor_read = (motor_read & M1_HALL_B_MASK) | (uint8_t)((PORT->Group[M1_HALL_B_GROUP].IN.reg & M1_HALL_B_PORT)>>(M1_HALL_B_LSR));
|
|
||||||
motor_read = (motor_read & M1_HALL_C_MASK) | (uint8_t)((PORT->Group[M1_HALL_C_GROUP].IN.reg & M1_HALL_C_PORT)>>(M1_HALL_C_LSR));
|
|
||||||
|
|
||||||
//volatile uint8_t a = gpio_get_pin_level(M1_HALL_A_PIN);
|
//volatile uint8_t a = gpio_get_pin_level(M1_HALL_A_PIN);
|
||||||
//volatile uint8_t b = gpio_get_pin_level(M1_HALL_B_PIN);
|
//volatile uint8_t b = gpio_get_pin_level(M1_HALL_B_PIN);
|
||||||
//volatile uint8_t c = gpio_get_pin_level(M1_HALL_C_PIN);
|
//volatile uint8_t c = gpio_get_pin_level(M1_HALL_C_PIN);
|
||||||
//volatile uint8_t motor_read2 = ((a << 2)|(b << 1)|(c << 0));
|
|
||||||
//return ((a << 2) |
|
//return ((a << 2) |
|
||||||
//(b << 1) |
|
//(b << 1) |
|
||||||
//(c << 0));
|
//(c << 0));
|
||||||
return motor_read;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
volatile uint8_t readHallSensorM2(void)
|
volatile uint8_t readHallSensorM2(void)
|
||||||
|
@ -458,14 +445,12 @@ volatile uint8_t readHallSensorM2(void)
|
||||||
motor_read = (motor_read & M2_HALL_B_MASK) | (uint8_t)((PORT->Group[M2_HALL_B_GROUP].IN.reg & M2_HALL_B_PORT)>>(M2_HALL_B_LSR));
|
motor_read = (motor_read & M2_HALL_B_MASK) | (uint8_t)((PORT->Group[M2_HALL_B_GROUP].IN.reg & M2_HALL_B_PORT)>>(M2_HALL_B_LSR));
|
||||||
motor_read = (motor_read & M2_HALL_C_MASK) | (uint8_t)((PORT->Group[M2_HALL_C_GROUP].IN.reg & M2_HALL_C_PORT)>>(M2_HALL_C_LSR));
|
motor_read = (motor_read & M2_HALL_C_MASK) | (uint8_t)((PORT->Group[M2_HALL_C_GROUP].IN.reg & M2_HALL_C_PORT)>>(M2_HALL_C_LSR));
|
||||||
|
|
||||||
if(((motor_read == INVALID_HALL_0) || (motor_read == INVALID_HALL_7))) {
|
//if(((motor_read == INVALID_HALL_0) || (motor_read == INVALID_HALL_7))) {
|
||||||
Motor2.motor_state.fault = MOTOR_HALLSENSORINVALID;
|
//Motor2.motor_state.fault = MOTOR_HALLSENSORINVALID;
|
||||||
Motor2.motor_state.currentstate = MOTOR_FAULT;
|
//Motor2.motor_state.currentstate = MOTOR_FAULT;
|
||||||
//applicationStatus.currentstate = APP_FAULT;
|
////applicationStatus.currentstate = APP_FAULT;
|
||||||
}
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//volatile uint8_t a = gpio_get_pin_level(M2_HALL_A_PIN);
|
//volatile uint8_t a = gpio_get_pin_level(M2_HALL_A_PIN);
|
||||||
//volatile uint8_t b = gpio_get_pin_level(M2_HALL_B_PIN);
|
//volatile uint8_t b = gpio_get_pin_level(M2_HALL_B_PIN);
|
||||||
//volatile uint8_t c = gpio_get_pin_level(M2_HALL_C_PIN);
|
//volatile uint8_t c = gpio_get_pin_level(M2_HALL_C_PIN);
|
||||||
|
@ -493,7 +478,10 @@ void read_zero_current_offset_value(BLDCMotor_t *motor1, BLDCMotor_t *motor2)
|
||||||
adc_sync_enable_channel(&ADC_1, 9);
|
adc_sync_enable_channel(&ADC_1, 9);
|
||||||
//adc_sync_enable_channel(&ADC_1, 0);
|
//adc_sync_enable_channel(&ADC_1, 0);
|
||||||
|
|
||||||
ADC1->INPUTCTRL.reg = 0x1809;
|
/* Single ended */
|
||||||
|
//ADC1->INPUTCTRL.reg = 0x1809;
|
||||||
|
/* Differential */
|
||||||
|
ADC1->INPUTCTRL.reg = 0x0089;
|
||||||
while (ADC1->STATUS.bit.ADCBUSY) {}; /* Wait for bus synchronization. */
|
while (ADC1->STATUS.bit.ADCBUSY) {}; /* Wait for bus synchronization. */
|
||||||
|
|
||||||
for (i=0; i<samples; i++)
|
for (i=0; i<samples; i++)
|
||||||
|
@ -512,7 +500,10 @@ void read_zero_current_offset_value(BLDCMotor_t *motor1, BLDCMotor_t *motor2)
|
||||||
/* Set Motor Variables */
|
/* Set Motor Variables */
|
||||||
motor1->Voffset_lsb.A = phase_A_zero_current_offset_temp/samples;
|
motor1->Voffset_lsb.A = phase_A_zero_current_offset_temp/samples;
|
||||||
|
|
||||||
ADC1->INPUTCTRL.reg = 0x1808;
|
/* Single ended */
|
||||||
|
//ADC1->INPUTCTRL.reg = 0x1808;
|
||||||
|
/* Differential */
|
||||||
|
ADC1->INPUTCTRL.reg = 0x0088;
|
||||||
while (ADC1->STATUS.bit.ADCBUSY) {}; /* Wait for bus synchronization. */
|
while (ADC1->STATUS.bit.ADCBUSY) {}; /* Wait for bus synchronization. */
|
||||||
|
|
||||||
for (i=0; i<samples; i++)
|
for (i=0; i<samples; i++)
|
||||||
|
@ -537,7 +528,11 @@ void read_zero_current_offset_value(BLDCMotor_t *motor1, BLDCMotor_t *motor2)
|
||||||
phase_A_zero_current_offset_temp = 0;
|
phase_A_zero_current_offset_temp = 0;
|
||||||
phase_B_zero_current_offset_temp = 0;
|
phase_B_zero_current_offset_temp = 0;
|
||||||
|
|
||||||
ADC1->INPUTCTRL.reg = 0x1807;
|
|
||||||
|
/* Single ended */
|
||||||
|
//ADC1->INPUTCTRL.reg = 0x1807;
|
||||||
|
/* Differential */
|
||||||
|
ADC1->INPUTCTRL.reg = 0x0087;
|
||||||
while (ADC1->STATUS.bit.ADCBUSY) {}; /* Wait for bus synchronization. */
|
while (ADC1->STATUS.bit.ADCBUSY) {}; /* Wait for bus synchronization. */
|
||||||
|
|
||||||
for (i=0; i<samples; i++)
|
for (i=0; i<samples; i++)
|
||||||
|
@ -556,7 +551,10 @@ void read_zero_current_offset_value(BLDCMotor_t *motor1, BLDCMotor_t *motor2)
|
||||||
/* Set Motor Variables */
|
/* Set Motor Variables */
|
||||||
motor2->Voffset_lsb.A = phase_A_zero_current_offset_temp/samples;
|
motor2->Voffset_lsb.A = phase_A_zero_current_offset_temp/samples;
|
||||||
|
|
||||||
ADC1->INPUTCTRL.reg = 0x1806;
|
/* Single ended */
|
||||||
|
//ADC1->INPUTCTRL.reg = 0x1806;
|
||||||
|
/* Differential */
|
||||||
|
ADC1->INPUTCTRL.reg = 0x0086;
|
||||||
while (ADC1->STATUS.bit.ADCBUSY) {}; /* Wait for bus synchronization. */
|
while (ADC1->STATUS.bit.ADCBUSY) {}; /* Wait for bus synchronization. */
|
||||||
|
|
||||||
for (i=0; i<samples; i++)
|
for (i=0; i<samples; i++)
|
||||||
|
|
|
@ -29,6 +29,8 @@
|
||||||
#define INVALID_HALL_0 (0)
|
#define INVALID_HALL_0 (0)
|
||||||
#define INVALID_HALL_7 (7)
|
#define INVALID_HALL_7 (7)
|
||||||
|
|
||||||
|
#define AVERAGE_SPEED_MEASURE 1
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
// ADC Parameters
|
// ADC Parameters
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
@ -63,7 +65,7 @@
|
||||||
// global variables
|
// global variables
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
//static const uint8_t HALL_PATTERN_ARRAY[16] = {0, 5, 3, 1, 6, 4, 2, 0, 0, 3, 6, 2, 5, 1, 4, 0 };
|
static const uint8_t HALL_PATTERN_ARRAY[16] = {0, 5, 3, 1, 6, 4, 2, 0, 0, 3, 6, 2, 5, 1, 4, 0 };
|
||||||
static const uint8_t MOTOR_COMMUTATION_STEPS[8] = {9, 1, 3, 2, 5, 6, 4, 9};
|
static const uint8_t MOTOR_COMMUTATION_STEPS[8] = {9, 1, 3, 2, 5, 6, 4, 9};
|
||||||
|
|
||||||
volatile BLDCMotor_t Motor1;
|
volatile BLDCMotor_t Motor1;
|
||||||
|
@ -75,15 +77,14 @@ volatile MOTOR_STATE_t Motor2_Status;
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
// functions
|
// functions
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
void motor_StateMachine(BLDCMotor_t *motor);
|
void motor_StateMachine(BLDCMotor_t* const motor);
|
||||||
void BldcInitStruct(BLDCMotor_t *motor, BLDCMotor_param_t *motor_param);
|
void BldcInitStruct(BLDCMotor_t* const motor, BLDCMotor_param_t* constmotor_param);
|
||||||
void exec_commutation(BLDCMotor_t *motor);
|
void exec_commutation(BLDCMotor_t* const motor);
|
||||||
void select_active_phase(BLDCMotor_t *Motor);
|
void select_active_phase(BLDCMotor_t* const Motor);
|
||||||
|
void calculate_motor_speed(BLDCMotor_t* const motor);
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
// Static Functions
|
// Static Functions
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
static void calculate_motor_speed(BLDCMotor_t *motor);
|
|
||||||
static void BLDC_runSpeedCntl(BLDCMotor_t *motor, const float32_t speedfbk, const float32_t speedRef);
|
static void BLDC_runSpeedCntl(BLDCMotor_t *motor, const float32_t speedfbk, const float32_t speedRef);
|
||||||
static void BLDC_runCurrentCntl(BLDCMotor_t *motor, const float32_t curfbk, const float32_t curRef);
|
static void BLDC_runCurrentCntl(BLDCMotor_t *motor, const float32_t curfbk, const float32_t curRef);
|
||||||
static void BLDC_runPosCntl(BLDCMotor_t *motor, int16_t posfbk, int16_t posRef);
|
static void BLDC_runPosCntl(BLDCMotor_t *motor, int16_t posfbk, int16_t posRef);
|
||||||
|
|
|
@ -68,12 +68,12 @@ volatile typedef struct
|
||||||
{
|
{
|
||||||
volatile uint8_t actualDirection; //! The actual direction of rotation.
|
volatile uint8_t actualDirection; //! The actual direction of rotation.
|
||||||
volatile uint16_t duty_cycle;
|
volatile uint16_t duty_cycle;
|
||||||
volatile float32_t calc_rpm;
|
volatile int16_t calc_rpm;
|
||||||
volatile int32_t Num_Steps;
|
volatile int16_t Num_Steps;
|
||||||
/* Hall States */
|
/* Hall States */
|
||||||
volatile uint8_t prevHallPattern;
|
//volatile uint8_t prevHallPattern;
|
||||||
volatile uint8_t currentHallPattern;
|
volatile uint8_t currentHallPattern;
|
||||||
volatile uint8_t nextHallPattern;
|
//volatile uint8_t nextHallPattern;
|
||||||
/* Commutation State */
|
/* Commutation State */
|
||||||
volatile uint8_t cur_comm_step;
|
volatile uint8_t cur_comm_step;
|
||||||
volatile uint8_t prev_comm_step;
|
volatile uint8_t prev_comm_step;
|
||||||
|
@ -85,10 +85,10 @@ volatile typedef struct
|
||||||
volatile typedef struct BLDCmotor
|
volatile typedef struct BLDCmotor
|
||||||
{
|
{
|
||||||
/* Hardware */
|
/* Hardware */
|
||||||
BLDCMotor_param_t *motor_param;
|
volatile BLDCMotor_param_t *motor_param;
|
||||||
MOTOR_STATE_t motor_state;
|
volatile MOTOR_STATE_t motor_state;
|
||||||
/* Status */
|
/* Status */
|
||||||
MOTOR_Status motor_status;
|
volatile MOTOR_Status motor_status;
|
||||||
/* Measured Values */
|
/* Measured Values */
|
||||||
volatile MOTOR_PHASES_t Iphase_pu;
|
volatile MOTOR_PHASES_t Iphase_pu;
|
||||||
volatile MOTOR_phase_offset_t Voffset_lsb;
|
volatile MOTOR_phase_offset_t Voffset_lsb;
|
||||||
|
@ -101,7 +101,7 @@ volatile typedef struct BLDCmotor
|
||||||
/* Setpoints */
|
/* Setpoints */
|
||||||
volatile MOTOR_Setpoints motor_setpoints;
|
volatile MOTOR_Setpoints motor_setpoints;
|
||||||
/* Function Pointers*/
|
/* Function Pointers*/
|
||||||
readHallSensor readHall;
|
volatile readHallSensor readHall;
|
||||||
} BLDCMotor_t;
|
} BLDCMotor_t;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -19,22 +19,27 @@
|
||||||
#define DMAC_CHANNEL_ADC_SEQ 2U
|
#define DMAC_CHANNEL_ADC_SEQ 2U
|
||||||
#define DMAC_CHANNEL_ADC_SRAM 3U
|
#define DMAC_CHANNEL_ADC_SRAM 3U
|
||||||
|
|
||||||
const uint32_t adc_seq_regs[4] = {0x1806, 0x1807, 0x1808, 0x1809};
|
|
||||||
//const uint32_t adc_seq_regs[5] = {0x0086, 0x0087, 0x0088, 0x0089};
|
// ----------------------------------------------------------------------
|
||||||
//uint32_t adc_seq_regs[4] = {0x0006, 0x0007, 0x0008, 0x0009};
|
// M1_IA=ADC1_AIN[9], M1_IB=ADC1_AIN[8], M2_IA=ADC1_AIN[7], M2_IB=ADC1_AIN[6]
|
||||||
//const uint32_t adc_seq_regs[5] = {0x1800, 0x1806, 0x1807, 0x1808, 0x1809};
|
// ----------------------------------------------------------------------
|
||||||
|
/* Single Ended */
|
||||||
|
//const uint32_t adc_seq_regs[4] = {0x1807, 0x1806, 0x1809, 0x1808};
|
||||||
|
/* Differential */
|
||||||
|
const uint32_t adc_seq_regs[4] = {0x0089, 0x0088, 0x0087, 0x0086};
|
||||||
|
|
||||||
volatile int16_t adc_res[4] = {0};
|
volatile int16_t adc_res[4] = {0};
|
||||||
struct _dma_resource *adc_sram_dma_resource;
|
struct _dma_resource *adc_sram_dma_resource;
|
||||||
struct _dma_resource *adc_dmac_sequence_resource;
|
struct _dma_resource *adc_dmac_sequence_resource;
|
||||||
|
|
||||||
inline static void configure_tcc_pwm(void)
|
inline static void configure_tcc_pwm(void)
|
||||||
{
|
{
|
||||||
gpio_set_pin_pull_mode(M1_HALLA, GPIO_PULL_UP);
|
//gpio_set_pin_pull_mode(M1_HALLA, GPIO_PULL_UP);
|
||||||
gpio_set_pin_pull_mode(M1_HALLB, GPIO_PULL_UP);
|
//gpio_set_pin_pull_mode(M1_HALLB, GPIO_PULL_UP);
|
||||||
gpio_set_pin_pull_mode(M1_HALLC, GPIO_PULL_UP);
|
//gpio_set_pin_pull_mode(M1_HALLC, GPIO_PULL_UP);
|
||||||
gpio_set_pin_pull_mode(M2_HALLA, GPIO_PULL_UP);
|
//gpio_set_pin_pull_mode(M2_HALLA, GPIO_PULL_UP);
|
||||||
gpio_set_pin_pull_mode(M2_HALLB, GPIO_PULL_UP);
|
//gpio_set_pin_pull_mode(M2_HALLB, GPIO_PULL_UP);
|
||||||
gpio_set_pin_pull_mode(M2_HALLC, GPIO_PULL_UP);
|
//gpio_set_pin_pull_mode(M2_HALLC, GPIO_PULL_UP);
|
||||||
|
|
||||||
/* TCC0 */
|
/* TCC0 */
|
||||||
hri_tcc_set_WEXCTRL_OTMX_bf(TCC0, 0x02);
|
hri_tcc_set_WEXCTRL_OTMX_bf(TCC0, 0x02);
|
||||||
|
|
|
@ -83,7 +83,7 @@ typedef volatile struct
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
|
||||||
inline void PI_objectInit(volatile PI_t *pPi_obj)
|
static inline void PI_objectInit(volatile PI_t *pPi_obj)
|
||||||
{
|
{
|
||||||
PI_t *obj = (PI_t *)pPi_obj;
|
PI_t *obj = (PI_t *)pPi_obj;
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ inline void PI_objectInit(volatile PI_t *pPi_obj)
|
||||||
obj->SatFlag = false;
|
obj->SatFlag = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void PID_objectInit(volatile PID_t *pPiD_obj)
|
static inline void PID_objectInit(volatile PID_t *pPiD_obj)
|
||||||
{
|
{
|
||||||
PID_t *obj = (PID_t *)pPiD_obj;
|
PID_t *obj = (PID_t *)pPiD_obj;
|
||||||
|
|
||||||
|
|
|
@ -178,6 +178,8 @@ void EXTERNAL_IRQ_0_init(void)
|
||||||
void EVENT_SYSTEM_0_init(void)
|
void EVENT_SYSTEM_0_init(void)
|
||||||
{
|
{
|
||||||
hri_gclk_write_PCHCTRL_reg(GCLK, EVSYS_GCLK_ID_0, CONF_GCLK_EVSYS_CHANNEL_0_SRC | (1 << GCLK_PCHCTRL_CHEN_Pos));
|
hri_gclk_write_PCHCTRL_reg(GCLK, EVSYS_GCLK_ID_0, CONF_GCLK_EVSYS_CHANNEL_0_SRC | (1 << GCLK_PCHCTRL_CHEN_Pos));
|
||||||
|
hri_gclk_write_PCHCTRL_reg(GCLK, EVSYS_GCLK_ID_1, CONF_GCLK_EVSYS_CHANNEL_1_SRC | (1 << GCLK_PCHCTRL_CHEN_Pos));
|
||||||
|
hri_gclk_write_PCHCTRL_reg(GCLK, EVSYS_GCLK_ID_2, CONF_GCLK_EVSYS_CHANNEL_2_SRC | (1 << GCLK_PCHCTRL_CHEN_Pos));
|
||||||
|
|
||||||
hri_mclk_set_APBBMASK_EVSYS_bit(MCLK);
|
hri_mclk_set_APBBMASK_EVSYS_bit(MCLK);
|
||||||
|
|
||||||
|
|
|
@ -21,8 +21,8 @@ void process_currents()
|
||||||
volatile int16_t phase_A_current_raw, phase_B_current_raw;
|
volatile int16_t phase_A_current_raw, phase_B_current_raw;
|
||||||
|
|
||||||
/* Motor 1 */
|
/* Motor 1 */
|
||||||
phase_A_current_raw = (adc_res[3] - Motor1.Voffset_lsb.A);
|
phase_A_current_raw = (adc_res[0] - Motor1.Voffset_lsb.A);
|
||||||
phase_B_current_raw = (adc_res[2] - Motor1.Voffset_lsb.B)*-1;
|
phase_B_current_raw = (adc_res[1] - Motor1.Voffset_lsb.B)*-1;
|
||||||
// Covert from LSB to PU (A) and filter out small readings
|
// Covert from LSB to PU (A) and filter out small readings
|
||||||
Motor1.Iphase_pu.A = phase_A_current_raw * LSB_TO_PU;
|
Motor1.Iphase_pu.A = phase_A_current_raw * LSB_TO_PU;
|
||||||
Motor1.Iphase_pu.B = phase_B_current_raw * LSB_TO_PU;
|
Motor1.Iphase_pu.B = phase_B_current_raw * LSB_TO_PU;
|
||||||
|
@ -30,8 +30,8 @@ void process_currents()
|
||||||
Motor1.Iphase_pu.C = -Motor1.Iphase_pu.A - Motor1.Iphase_pu.B;
|
Motor1.Iphase_pu.C = -Motor1.Iphase_pu.A - Motor1.Iphase_pu.B;
|
||||||
|
|
||||||
/* Motor 2 negative is A instead of B*/
|
/* Motor 2 negative is A instead of B*/
|
||||||
phase_A_current_raw = (adc_res[1] - Motor2.Voffset_lsb.A);
|
phase_A_current_raw = (adc_res[2] - Motor2.Voffset_lsb.A);
|
||||||
phase_B_current_raw = (adc_res[0] - Motor2.Voffset_lsb.B)*-1;
|
phase_B_current_raw = (adc_res[3] - Motor2.Voffset_lsb.B)*-1;
|
||||||
// Covert from LSB to PU (A) and filter out small readings
|
// Covert from LSB to PU (A) and filter out small readings
|
||||||
Motor2.Iphase_pu.A = phase_A_current_raw * LSB_TO_PU;
|
Motor2.Iphase_pu.A = phase_A_current_raw * LSB_TO_PU;
|
||||||
Motor2.Iphase_pu.B = phase_B_current_raw * LSB_TO_PU;
|
Motor2.Iphase_pu.B = phase_B_current_raw * LSB_TO_PU;
|
||||||
|
@ -69,6 +69,14 @@ void One_ms_timer_init(void)
|
||||||
timer_start(&TIMER_0);
|
timer_start(&TIMER_0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//void speed_timer_init(void)
|
||||||
|
//{
|
||||||
|
//hri_tc_write_WAVE_reg(TC_SPEED_M1.device.hw, 0x00);
|
||||||
|
//hri_tc_set_CTRLA_CAPTEN0_bit(TC_SPEED_M1.device.hw);
|
||||||
|
//hri_tc_set_CTRLA_CAPTEN1_bit(TC_SPEED_M1.device.hw);
|
||||||
|
//timer_start(&TC_SPEED_M1);
|
||||||
|
//}
|
||||||
|
|
||||||
void enable_NVIC_IRQ(void)
|
void enable_NVIC_IRQ(void)
|
||||||
{
|
{
|
||||||
//NVIC_EnableIRQ(TC7_IRQn); // TC7: TC_ECAT
|
//NVIC_EnableIRQ(TC7_IRQn); // TC7: TC_ECAT
|
||||||
|
@ -79,7 +87,7 @@ void enable_NVIC_IRQ(void)
|
||||||
//NVIC_EnableIRQ(EIC_5_IRQn);
|
//NVIC_EnableIRQ(EIC_5_IRQn);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void APPLICATION_StateMachine(void)
|
void APPLICATION_StateMachine(void)
|
||||||
{
|
{
|
||||||
Motor1.timerflags.current_loop_tic = false;
|
Motor1.timerflags.current_loop_tic = false;
|
||||||
|
|
||||||
|
@ -110,8 +118,6 @@ inline void APPLICATION_StateMachine(void)
|
||||||
//applicationStatus.currentstate ;
|
//applicationStatus.currentstate ;
|
||||||
motor_StateMachine(&Motor1);
|
motor_StateMachine(&Motor1);
|
||||||
motor_StateMachine(&Motor2);
|
motor_StateMachine(&Motor2);
|
||||||
exec_commutation(&Motor1);
|
|
||||||
exec_commutation(&Motor2);
|
|
||||||
break;
|
break;
|
||||||
case APP_FAULT:
|
case APP_FAULT:
|
||||||
//DisableGateDrivers(&Motor1);
|
//DisableGateDrivers(&Motor1);
|
||||||
|
@ -141,19 +147,37 @@ int main(void)
|
||||||
/* Initializes MCU, drivers and middleware */
|
/* Initializes MCU, drivers and middleware */
|
||||||
atmel_start_init();
|
atmel_start_init();
|
||||||
//initMotorParameters();
|
//initMotorParameters();
|
||||||
|
//configure_tcc_pwm();
|
||||||
|
//BldcInitStruct(&Motor1, &FH_22mm24BXTR);
|
||||||
|
//BldcInitStruct(&Motor2, &FH_32mm24BXTR);
|
||||||
|
//Motor1.readHall = &readHallSensorM1;
|
||||||
|
//Motor2.readHall = &readHallSensorM2;
|
||||||
|
//read_zero_current_offset_value(&Motor1, &Motor2);
|
||||||
|
//adc_sync_enable_channel(&ADC_1, 6);
|
||||||
|
//adc_init_dma();
|
||||||
|
//config_qspi();
|
||||||
|
//custom_logic_enable();
|
||||||
|
//enable_NVIC_IRQ();
|
||||||
|
//ECAT_STATE_MACHINE();
|
||||||
|
//One_ms_timer_init();
|
||||||
BldcInitStruct(&Motor1, &FH_22mm24BXTR);
|
BldcInitStruct(&Motor1, &FH_22mm24BXTR);
|
||||||
BldcInitStruct(&Motor2, &FH_32mm24BXTR);
|
BldcInitStruct(&Motor2, &FH_32mm24BXTR);
|
||||||
Motor1.readHall = &readHallSensorM1;
|
Motor1.readHall = &readHallSensorM1;
|
||||||
Motor2.readHall = &readHallSensorM2;
|
Motor2.readHall = &readHallSensorM2;
|
||||||
read_zero_current_offset_value(&Motor1, &Motor2);
|
read_zero_current_offset_value(&Motor1, &Motor2);
|
||||||
config_qspi();
|
config_qspi();
|
||||||
One_ms_timer_init();
|
|
||||||
configure_tcc_pwm();
|
configure_tcc_pwm();
|
||||||
adc_sync_enable_channel(&ADC_1, 6);
|
adc_sync_enable_channel(&ADC_1, 6);
|
||||||
adc_init_dma();
|
adc_init_dma();
|
||||||
ECAT_STATE_MACHINE();
|
ECAT_STATE_MACHINE();
|
||||||
|
One_ms_timer_init();
|
||||||
|
custom_logic_enable();
|
||||||
|
//speed_timer_init();
|
||||||
enable_NVIC_IRQ();
|
enable_NVIC_IRQ();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Replace with your application code */
|
/* Replace with your application code */
|
||||||
while (1) {
|
while (1) {
|
||||||
//delay_ms(100);
|
//delay_ms(100);
|
||||||
|
@ -164,8 +188,9 @@ int main(void)
|
||||||
//update_setpoints();
|
//update_setpoints();
|
||||||
if (Motor1.timerflags.adc_readings_ready_tic) {process_currents();}
|
if (Motor1.timerflags.adc_readings_ready_tic) {process_currents();}
|
||||||
if (Motor1.timerflags.current_loop_tic) {APPLICATION_StateMachine();}
|
if (Motor1.timerflags.current_loop_tic) {APPLICATION_StateMachine();}
|
||||||
if (run_ECAT) {ECAT_STATE_MACHINE();}
|
if (run_ECAT) {ECAT_STATE_MACHINE();}
|
||||||
|
exec_commutation(&Motor1);
|
||||||
|
exec_commutation(&Motor2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -131,24 +131,27 @@
|
||||||
//0x003F // (15) invalid state
|
//0x003F // (15) invalid state
|
||||||
//};
|
//};
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#define DISABLE_PATTERN 0x003F
|
||||||
|
|
||||||
////* A&C phase swapped */
|
////* A&C phase swapped */
|
||||||
static const uint16_t COMMUTATION_PATTERN[16] = {
|
static const uint16_t COMMUTATION_PATTERN[16] = {
|
||||||
0x003F, // (0) invalid state
|
0x003F, // (0) invalid state
|
||||||
0x1437, // (1)
|
0x1437, // (1)
|
||||||
0x053D, // (2)
|
0x053D, // (2)
|
||||||
0x113D, // (3)
|
0x113D, // (3)
|
||||||
0x111F, // (4)
|
0x111F, // (4)
|
||||||
0x0537, // (5)
|
0x0537, // (5)
|
||||||
0x141F, // (6)
|
0x141F, // (6)
|
||||||
0x003F, // (7) invalid state
|
0x003F, // (7) invalid state
|
||||||
0x003F, // (8) invalid state
|
0x003F, // (8) invalid state
|
||||||
0x141F, // (9)
|
0x141F, // (9)
|
||||||
0x0537, // (10)
|
0x0537, // (10)
|
||||||
0x111F, // (11)
|
0x111F, // (11)
|
||||||
0x113D, // (12)
|
0x113D, // (12)
|
||||||
0x053D, // (13)
|
0x053D, // (13)
|
||||||
0x1437, // (14)
|
0x1437, // (14)
|
||||||
0x003F // (15) invalid state
|
0x003F, // (15) invalid state
|
||||||
};
|
};
|
||||||
|
|
||||||
//////* A&C phase swapped and modified to match currents */
|
//////* A&C phase swapped and modified to match currents */
|
||||||
|
@ -177,6 +180,7 @@ static const uint16_t COMMUTATION_PATTERN[16] = {
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
struct pwm_descriptor const *pwm_desc;
|
struct pwm_descriptor const *pwm_desc;
|
||||||
|
void *const speedtimer_hw;
|
||||||
const uint16_t motor_Poles;
|
const uint16_t motor_Poles;
|
||||||
const uint16_t motor_polePairs;
|
const uint16_t motor_polePairs;
|
||||||
const uint16_t motor_commutationStates;
|
const uint16_t motor_commutationStates;
|
||||||
|
@ -196,6 +200,7 @@ typedef struct
|
||||||
/* Small Motor - 2214S024BXTR*/
|
/* Small Motor - 2214S024BXTR*/
|
||||||
const static BLDCMotor_param_t FH_22mm24BXTR = {
|
const static BLDCMotor_param_t FH_22mm24BXTR = {
|
||||||
.pwm_desc = &PWM_0,
|
.pwm_desc = &PWM_0,
|
||||||
|
.speedtimer_hw = TC2,
|
||||||
.motor_Poles = 14,
|
.motor_Poles = 14,
|
||||||
.motor_polePairs = 7,
|
.motor_polePairs = 7,
|
||||||
.motor_commutationStates = 42, //polePairs * 6
|
.motor_commutationStates = 42, //polePairs * 6
|
||||||
|
@ -212,6 +217,7 @@ const static BLDCMotor_param_t FH_22mm24BXTR = {
|
||||||
/* Big Motor - 3216W024BXTR */
|
/* Big Motor - 3216W024BXTR */
|
||||||
const static BLDCMotor_param_t FH_32mm24BXTR = {
|
const static BLDCMotor_param_t FH_32mm24BXTR = {
|
||||||
.pwm_desc = &PWM_1,
|
.pwm_desc = &PWM_1,
|
||||||
|
.speedtimer_hw = TC4,
|
||||||
.motor_Poles = 14,
|
.motor_Poles = 14,
|
||||||
.motor_polePairs = 7,
|
.motor_polePairs = 7,
|
||||||
.motor_commutationStates = 42, //polePairs * 6
|
.motor_commutationStates = 42, //polePairs * 6
|
||||||
|
|
|
@ -150,7 +150,7 @@ volatile typedef struct BLDCmotor
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
static const uint8_t HALL_PATTERN_ARRAY[16] = {0, 5, 3, 1, 6, 4, 2, 0, 0, 3, 6, 2, 5, 1, 4, 0 };
|
static const uint8_t HALL_PATTERN_ARRAY[16] = {0, 5, 3, 1, 6, 4, 2, 0, 0, 3, 6, 2, 5, 1, 4, 0 };
|
||||||
static const uint8_t MOTOR_COMMUTATION_STEPS[8] = {9, 1, 3, 2, 5, 6, 4, 9};
|
static const uint8_t MOTOR_COMMUTATION_STEPS[8] = {20, 1, 3, 2, 5, 6, 4, 20};
|
||||||
|
|
||||||
volatile BLDCMotor_t Motor1;
|
volatile BLDCMotor_t Motor1;
|
||||||
volatile BLDCMotor_t Motor2;
|
volatile BLDCMotor_t Motor2;
|
||||||
|
|
Binary file not shown.
|
@ -0,0 +1,69 @@
|
||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# TcXaeShell Solution File, Format Version 11.00
|
||||||
|
VisualStudioVersion = 15.0.28010.2050
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{B1E792BE-AA5F-4E3C-8C82-674BF9C0715B}") = "MotorData", "MotorData\MotorData.tsproj", "{627AF960-8AD6-492C-BE55-42F15976A40C}"
|
||||||
|
EndProject
|
||||||
|
Project("{FD9F1D59-E000-42F3-8744-88DE1BE93C06}") = "TwinCAT Measurement Project1", "TwinCAT Measurement Project1\TwinCAT Measurement Project1.tcmproj", "{8FB7700F-1B3F-4E2A-B3DF-C74F2D60BA45}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|TwinCAT CE7 (ARMV7) = Debug|TwinCAT CE7 (ARMV7)
|
||||||
|
Debug|TwinCAT OS (ARMT2) = Debug|TwinCAT OS (ARMT2)
|
||||||
|
Debug|TwinCAT RT (x64) = Debug|TwinCAT RT (x64)
|
||||||
|
Debug|TwinCAT RT (x86) = Debug|TwinCAT RT (x86)
|
||||||
|
Release|TwinCAT CE7 (ARMV7) = Release|TwinCAT CE7 (ARMV7)
|
||||||
|
Release|TwinCAT OS (ARMT2) = Release|TwinCAT OS (ARMT2)
|
||||||
|
Release|TwinCAT RT (x64) = Release|TwinCAT RT (x64)
|
||||||
|
Release|TwinCAT RT (x86) = Release|TwinCAT RT (x86)
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{627AF960-8AD6-492C-BE55-42F15976A40C}.Debug|TwinCAT CE7 (ARMV7).ActiveCfg = Debug|TwinCAT CE7 (ARMV7)
|
||||||
|
{627AF960-8AD6-492C-BE55-42F15976A40C}.Debug|TwinCAT CE7 (ARMV7).Build.0 = Debug|TwinCAT CE7 (ARMV7)
|
||||||
|
{627AF960-8AD6-492C-BE55-42F15976A40C}.Debug|TwinCAT OS (ARMT2).ActiveCfg = Debug|TwinCAT OS (ARMT2)
|
||||||
|
{627AF960-8AD6-492C-BE55-42F15976A40C}.Debug|TwinCAT OS (ARMT2).Build.0 = Debug|TwinCAT OS (ARMT2)
|
||||||
|
{627AF960-8AD6-492C-BE55-42F15976A40C}.Debug|TwinCAT RT (x64).ActiveCfg = Debug|TwinCAT RT (x64)
|
||||||
|
{627AF960-8AD6-492C-BE55-42F15976A40C}.Debug|TwinCAT RT (x64).Build.0 = Debug|TwinCAT RT (x64)
|
||||||
|
{627AF960-8AD6-492C-BE55-42F15976A40C}.Debug|TwinCAT RT (x86).ActiveCfg = Debug|TwinCAT RT (x86)
|
||||||
|
{627AF960-8AD6-492C-BE55-42F15976A40C}.Debug|TwinCAT RT (x86).Build.0 = Debug|TwinCAT RT (x86)
|
||||||
|
{627AF960-8AD6-492C-BE55-42F15976A40C}.Release|TwinCAT CE7 (ARMV7).ActiveCfg = Release|TwinCAT CE7 (ARMV7)
|
||||||
|
{627AF960-8AD6-492C-BE55-42F15976A40C}.Release|TwinCAT CE7 (ARMV7).Build.0 = Release|TwinCAT CE7 (ARMV7)
|
||||||
|
{627AF960-8AD6-492C-BE55-42F15976A40C}.Release|TwinCAT OS (ARMT2).ActiveCfg = Release|TwinCAT OS (ARMT2)
|
||||||
|
{627AF960-8AD6-492C-BE55-42F15976A40C}.Release|TwinCAT OS (ARMT2).Build.0 = Release|TwinCAT OS (ARMT2)
|
||||||
|
{627AF960-8AD6-492C-BE55-42F15976A40C}.Release|TwinCAT RT (x64).ActiveCfg = Release|TwinCAT RT (x64)
|
||||||
|
{627AF960-8AD6-492C-BE55-42F15976A40C}.Release|TwinCAT RT (x64).Build.0 = Release|TwinCAT RT (x64)
|
||||||
|
{627AF960-8AD6-492C-BE55-42F15976A40C}.Release|TwinCAT RT (x86).ActiveCfg = Release|TwinCAT RT (x86)
|
||||||
|
{627AF960-8AD6-492C-BE55-42F15976A40C}.Release|TwinCAT RT (x86).Build.0 = Release|TwinCAT RT (x86)
|
||||||
|
{8FB7700F-1B3F-4E2A-B3DF-C74F2D60BA45}.Debug|TwinCAT CE7 (ARMV7).ActiveCfg = Debug|TwinCAT CE7 (ARMV7)
|
||||||
|
{8FB7700F-1B3F-4E2A-B3DF-C74F2D60BA45}.Debug|TwinCAT OS (ARMT2).ActiveCfg = Debug|TwinCAT OS (ARMT2)
|
||||||
|
{8FB7700F-1B3F-4E2A-B3DF-C74F2D60BA45}.Debug|TwinCAT RT (x64).ActiveCfg = Debug|TwinCAT RT (x64)
|
||||||
|
{8FB7700F-1B3F-4E2A-B3DF-C74F2D60BA45}.Debug|TwinCAT RT (x86).ActiveCfg = Debug|TwinCAT RT (x86)
|
||||||
|
{8FB7700F-1B3F-4E2A-B3DF-C74F2D60BA45}.Release|TwinCAT CE7 (ARMV7).ActiveCfg = Release|TwinCAT CE7 (ARMV7)
|
||||||
|
{8FB7700F-1B3F-4E2A-B3DF-C74F2D60BA45}.Release|TwinCAT OS (ARMT2).ActiveCfg = Release|TwinCAT OS (ARMT2)
|
||||||
|
{8FB7700F-1B3F-4E2A-B3DF-C74F2D60BA45}.Release|TwinCAT RT (x64).ActiveCfg = Release|TwinCAT RT (x64)
|
||||||
|
{8FB7700F-1B3F-4E2A-B3DF-C74F2D60BA45}.Release|TwinCAT RT (x86).ActiveCfg = Release|TwinCAT RT (x86)
|
||||||
|
{4AE346CD-C7CE-4990-9940-2D1E689DC225}.Debug|TwinCAT CE7 (ARMV7).ActiveCfg = Debug|TwinCAT CE7 (ARMV7)
|
||||||
|
{4AE346CD-C7CE-4990-9940-2D1E689DC225}.Debug|TwinCAT CE7 (ARMV7).Build.0 = Debug|TwinCAT CE7 (ARMV7)
|
||||||
|
{4AE346CD-C7CE-4990-9940-2D1E689DC225}.Debug|TwinCAT OS (ARMT2).ActiveCfg = Debug|TwinCAT OS (ARMT2)
|
||||||
|
{4AE346CD-C7CE-4990-9940-2D1E689DC225}.Debug|TwinCAT OS (ARMT2).Build.0 = Debug|TwinCAT OS (ARMT2)
|
||||||
|
{4AE346CD-C7CE-4990-9940-2D1E689DC225}.Debug|TwinCAT RT (x64).ActiveCfg = Debug|TwinCAT RT (x64)
|
||||||
|
{4AE346CD-C7CE-4990-9940-2D1E689DC225}.Debug|TwinCAT RT (x64).Build.0 = Debug|TwinCAT RT (x64)
|
||||||
|
{4AE346CD-C7CE-4990-9940-2D1E689DC225}.Debug|TwinCAT RT (x86).ActiveCfg = Debug|TwinCAT RT (x86)
|
||||||
|
{4AE346CD-C7CE-4990-9940-2D1E689DC225}.Debug|TwinCAT RT (x86).Build.0 = Debug|TwinCAT RT (x86)
|
||||||
|
{4AE346CD-C7CE-4990-9940-2D1E689DC225}.Release|TwinCAT CE7 (ARMV7).ActiveCfg = Release|TwinCAT CE7 (ARMV7)
|
||||||
|
{4AE346CD-C7CE-4990-9940-2D1E689DC225}.Release|TwinCAT CE7 (ARMV7).Build.0 = Release|TwinCAT CE7 (ARMV7)
|
||||||
|
{4AE346CD-C7CE-4990-9940-2D1E689DC225}.Release|TwinCAT OS (ARMT2).ActiveCfg = Release|TwinCAT OS (ARMT2)
|
||||||
|
{4AE346CD-C7CE-4990-9940-2D1E689DC225}.Release|TwinCAT OS (ARMT2).Build.0 = Release|TwinCAT OS (ARMT2)
|
||||||
|
{4AE346CD-C7CE-4990-9940-2D1E689DC225}.Release|TwinCAT RT (x64).ActiveCfg = Release|TwinCAT RT (x64)
|
||||||
|
{4AE346CD-C7CE-4990-9940-2D1E689DC225}.Release|TwinCAT RT (x64).Build.0 = Release|TwinCAT RT (x64)
|
||||||
|
{4AE346CD-C7CE-4990-9940-2D1E689DC225}.Release|TwinCAT RT (x86).ActiveCfg = Release|TwinCAT RT (x86)
|
||||||
|
{4AE346CD-C7CE-4990-9940-2D1E689DC225}.Release|TwinCAT RT (x86).Build.0 = Release|TwinCAT RT (x86)
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {594EC052-F70E-43DD-9DA9-741526877E0D}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
|
@ -0,0 +1,455 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<TcSmProject xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.beckhoff.com/schemas/2012/07/TcSmProject" TcSmVersion="1.0" TcVersion="3.1.4024.11">
|
||||||
|
<ImageDatas>
|
||||||
|
<ImageData Id="1000">424dd8020000000000003600000028000000100000000e0000000100180000000000a2020000120b0000120b000000000000000000001306e31306e3190ce42b1fe62b1fe61306e31f13e5190ce42519e51306e31306e3190ce42f24e7190ce41306e31306e31306e31306e35f56ec645ced645ced4137e91f13e5473de95f57ec3227e71306e3473de95a51ec271be61306e31306e31409ca524cc68e8ad74f48c1615cc82218d03e36bf716bce746fce453dc01307ce3931ba7d78d27671d1150cb21409ca1712801b1d1d1b1d1d1b1d1d1b1d1d120b891b1d1d1b1d1d1b1d1d1b1d1d120b891b1d1d1b1d1d1b1d1d1b1d1d1712801712807f8080d4d5d5d4d5d5383939120b89545656d4d5d5d4d5d5626464130c89292b2bd4d5d5d4d5d56264641915801712804647471b1d1daaaaaad4d5d5130e82383939292b2b717272d4d5d5151183d4d5d57f80801b1d1d7172721e1c81191580464747d4d5d5d4d5d51b1d1d19158a292b2bd4d5d5d4d5d5292b2b1b1b8ad4d5d56264641b1d1d1b1d1d2427821e1d81d4d5d54647476264643839391e208bd4d5d57f8080464747545656242a8bd4d5d59b9c9c292b2baaaaaa2d3683252882464747d4d5d5d4d5d51b1d1d272d85292b2bd4d5d5d4d5d5292b2b2e37861b1d1dd4d5d5d4d5d5464747394484323bb52324812122822426822526824554c0323883292b822a2d83353c84424cbf3238843940842e32834853865d6ebb5262eb3e43e83334e74147e94349e9535feb4d56ea5662eb484dea545deb636fed545aea5a63ec6671ed8ca0f290a5f2748aef6b7bee5d68ec6874ed788aef8397f17684ef7986ef8c9ff2818ff1818ef08e9df18a97f18791f19ba9f3b0c0f691a4f291a2f28390f192a1f29cacf3a3b3f498a6f3a4b3f4aebdf5b0bef59ea8f3a3adf4bbc7f7c4d1f8cad7f8ced9f9b4c4f6b8c8f6acb8f59aa3f3b6c1f6c5d2f8c2cdf8ccd7f9d2ddf9d5e0fad2daf9d5dcf9dfe7fbe2e9fbe5ebfbe8eefb0000</ImageData>
|
||||||
|
</ImageDatas>
|
||||||
|
<Project ProjectGUID="{627AF960-8AD6-492C-BE55-42F15976A40C}" Target64Bit="true" ShowHideConfigurations="#x106">
|
||||||
|
<System>
|
||||||
|
<Tasks>
|
||||||
|
<Task Id="3" Priority="20" CycleTime="100000" AmsPort="350" AdtTasks="true">
|
||||||
|
<Name>PlcTask</Name>
|
||||||
|
</Task>
|
||||||
|
</Tasks>
|
||||||
|
</System>
|
||||||
|
<Plc>
|
||||||
|
<Project GUID="{4AE346CD-C7CE-4990-9940-2D1E689DC225}" Name="Motordata_PLC" PrjFilePath="Motordata_PLC\Motordata_PLC.plcproj" TmcFilePath="Motordata_PLC\Motordata_PLC.tmc" ReloadTmc="true" AmsPort="851" FileArchiveSettings="#x000e" SymbolicMapping="true">
|
||||||
|
<Instance Id="#x08502000" TcSmClass="TComPlcObjDef" KeepUnrestoredLinks="2">
|
||||||
|
<Name>Motordata_PLC Instance</Name>
|
||||||
|
<CLSID ClassFactory="TcPlc30">{08500001-0000-0000-F000-000000000064}</CLSID>
|
||||||
|
<Vars VarGrpType="1">
|
||||||
|
<Name>PlcTask Inputs</Name>
|
||||||
|
<Var>
|
||||||
|
<Name>GVL_motor_data.Status</Name>
|
||||||
|
<Comment><![CDATA[ Input ]]></Comment>
|
||||||
|
<Type>BYTE</Type>
|
||||||
|
</Var>
|
||||||
|
<Var>
|
||||||
|
<Name>GVL_motor_data.Mode</Name>
|
||||||
|
<Type>BYTE</Type>
|
||||||
|
</Var>
|
||||||
|
<Var>
|
||||||
|
<Name>GVL_motor_data.Com_State</Name>
|
||||||
|
<Type>BYTE</Type>
|
||||||
|
</Var>
|
||||||
|
<Var>
|
||||||
|
<Name>GVL_motor_data.act_pos</Name>
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Var>
|
||||||
|
<Var>
|
||||||
|
<Name>GVL_motor_data.PH_A</Name>
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Var>
|
||||||
|
<Var>
|
||||||
|
<Name>GVL_motor_data.PH_B</Name>
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Var>
|
||||||
|
<Var>
|
||||||
|
<Name>GVL_motor_data.PH_C</Name>
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Var>
|
||||||
|
<Var>
|
||||||
|
<Name>GVL_motor_data.Error</Name>
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Var>
|
||||||
|
<Var>
|
||||||
|
<Name>GVL_motor_data.Phase_Current</Name>
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Var>
|
||||||
|
<Var>
|
||||||
|
<Name>GVL_motor_data.Speed</Name>
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Var>
|
||||||
|
<Var>
|
||||||
|
<Name>GVL_motor_data.Duty</Name>
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Var>
|
||||||
|
</Vars>
|
||||||
|
<Vars VarGrpType="2" AreaNo="1">
|
||||||
|
<Name>PlcTask Outputs</Name>
|
||||||
|
<Var>
|
||||||
|
<Name>GVL_motor_data.op_Mode</Name>
|
||||||
|
<Comment><![CDATA[ Output ]]></Comment>
|
||||||
|
<Type>BYTE</Type>
|
||||||
|
</Var>
|
||||||
|
<Var>
|
||||||
|
<Name>GVL_motor_data.des_pos</Name>
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Var>
|
||||||
|
<Var>
|
||||||
|
<Name>GVL_motor_data.des_max_current</Name>
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Var>
|
||||||
|
<Var>
|
||||||
|
<Name>GVL_motor_data.des_current</Name>
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Var>
|
||||||
|
<Var>
|
||||||
|
<Name>GVL_motor_data.des_speed</Name>
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Var>
|
||||||
|
<Var>
|
||||||
|
<Name>GVL_motor_data.I_kp</Name>
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Var>
|
||||||
|
<Var>
|
||||||
|
<Name>GVL_motor_data.I_ki</Name>
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Var>
|
||||||
|
<Var>
|
||||||
|
<Name>GVL_motor_data.V_kp</Name>
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Var>
|
||||||
|
<Var>
|
||||||
|
<Name>GVL_motor_data.V_kd</Name>
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Var>
|
||||||
|
</Vars>
|
||||||
|
<Contexts>
|
||||||
|
<Context>
|
||||||
|
<Id NeedCalleeCall="true">0</Id>
|
||||||
|
<Name>PlcTask</Name>
|
||||||
|
<ManualConfig>
|
||||||
|
<OTCID>#x02010030</OTCID>
|
||||||
|
</ManualConfig>
|
||||||
|
<Priority>20</Priority>
|
||||||
|
<CycleTime>10000000</CycleTime>
|
||||||
|
</Context>
|
||||||
|
</Contexts>
|
||||||
|
<TaskPouOids>
|
||||||
|
<TaskPouOid Prio="20" OTCID="#x08502001"/>
|
||||||
|
</TaskPouOids>
|
||||||
|
</Instance>
|
||||||
|
</Project>
|
||||||
|
</Plc>
|
||||||
|
<Io>
|
||||||
|
<Device Id="2" DevType="111" DevFlags="#x0003" AmsPort="28674" AmsNetId="192.168.61.1.3.1" RemoteName="Device 2 (EtherCAT)">
|
||||||
|
<Name>Device 2 (EtherCAT)</Name>
|
||||||
|
<AddressInfo>
|
||||||
|
<Pnp>
|
||||||
|
<DeviceDesc>Ethernet (TwinCAT-Intel PCI Ethernet Adapter (Gigab</DeviceDesc>
|
||||||
|
<DeviceName>\DEVICE\{B319FB6B-ED15-445B-9318-290BECEEFA76}</DeviceName>
|
||||||
|
<DeviceData>4c5262a1d9ac</DeviceData>
|
||||||
|
</Pnp>
|
||||||
|
</AddressInfo>
|
||||||
|
<Image Id="1" AddrType="9" ImageType="3">
|
||||||
|
<Name>Image</Name>
|
||||||
|
</Image>
|
||||||
|
<Box Id="1" BoxType="9099">
|
||||||
|
<Name>Box 1 (LAN9252-2_motor_Master)</Name>
|
||||||
|
<ImageId>1000</ImageId>
|
||||||
|
<EtherCAT SlaveType="1" PdiType="#x3180" CycleMBoxPollingTime="0" VendorId="#x000004d8" ProductCode="#x00000002" RevisionNo="#x00000005" PortPhys="17" IdentificationAdo="18" MaxSlotCount="256" MaxSlotGroupCount="1" SlotPdoIncrement="1" SlotIndexIncrement="16" Type="MSRM 2_motor_Master Ethercat Slave" Desc="LAN9252-2_motor_Master" PortABoxInfo="#x00ffffff">
|
||||||
|
<SyncMan>001140000400010003000000000000000000001104010000</SyncMan>
|
||||||
|
<SyncMan>001878000000010004000000000000000000001800010000</SyncMan>
|
||||||
|
<Fmmu>0000000000000000001100020100000001000000000000000000000000000000</Fmmu>
|
||||||
|
<Fmmu>0000000000000000001800010100000002000000000000000000000000000000</Fmmu>
|
||||||
|
<Pdo Name="MCU2ECAT" Index="#x1600" Flags="#x0010" SyncMan="1">
|
||||||
|
<Entry Name="M1__status" Index="#x3001" Sub="#x01">
|
||||||
|
<Type>BYTE</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M1__mode" Index="#x3002" Sub="#x01">
|
||||||
|
<Type>BYTE</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M1__Joint_rel_position" Index="#x3003" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M1__Joint_abs_position" Index="#x3004" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M1__Motor_speed" Index="#x3005" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M1__Motor_current_bus" Index="#x3006" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M1__Motor_currentPhA" Index="#x3007" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M1__Motor_currentPhB" Index="#x3008" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M1__Motor_currentPhC" Index="#x3009" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M1__Motor_hallState" Index="#x300a" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M1__Motor_dutyCycle" Index="#x300b" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M2__status" Index="#x300c" Sub="#x01">
|
||||||
|
<Type>BYTE</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M2__mode" Index="#x300d" Sub="#x01">
|
||||||
|
<Type>BYTE</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M2__Joint__rel_position" Index="#x300e" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M2__Joint_abs_position" Index="#x300f" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M2__Motor_speed" Index="#x3010" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M2__Motor_current_bus" Index="#x3011" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M2__Motor_currentPhA" Index="#x3012" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M2__Motor_currentPhB" Index="#x3013" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M2__Motor_currentPhC" Index="#x3014" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M2__Motor_hallState" Index="#x3015" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M2__Motor_dutyCycle" Index="#x3016" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="EMG__CH1" Index="#x3017" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="EMG__CH2" Index="#x3018" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="EMG__CH3" Index="#x3019" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="EMG__CH4" Index="#x301a" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="EMG__CH5" Index="#x301b" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="EMG__CH6" Index="#x301c" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="EMG__CH7" Index="#x301d" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="EMG__CH8" Index="#x301e" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M3__status" Index="#x301f" Sub="#x01">
|
||||||
|
<Type>BYTE</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M3__mode" Index="#x3020" Sub="#x01">
|
||||||
|
<Type>BYTE</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M3__Joint__rel_position" Index="#x3021" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M3__Joint_abs_position" Index="#x3022" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M3__Motor_speed" Index="#x3023" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M3__Motor_current_bus" Index="#x3024" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M3__Motor_currentPhA" Index="#x3025" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M3__Motor_currentPhB" Index="#x3026" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M3__Motor_currentPhC" Index="#x3027" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M3__Motor_hallState" Index="#x3028" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M3__Motor_dutyCycle" Index="#x3029" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M4__status" Index="#x302a" Sub="#x01">
|
||||||
|
<Type>BYTE</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M4__mode" Index="#x302b" Sub="#x01">
|
||||||
|
<Type>BYTE</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M4__Joint__rel_position" Index="#x302c" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M4__Joint_abs_position" Index="#x302d" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M4__Motor_speed" Index="#x302e" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M4__Motor_current_bus" Index="#x302f" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M4__Motor_currentPhA" Index="#x3030" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M4__Motor_currentPhB" Index="#x3031" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M4__Motor_currentPhC" Index="#x3032" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M4__Motor_hallState" Index="#x3033" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M4__Motor_dutyCycle" Index="#x3034" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="IMU__q_x0" Index="#x3035" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="IMU__q_y0" Index="#x3036" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="IMU__q_z0" Index="#x3037" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="IMU__q_w0" Index="#x3038" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="FSR__CH1" Index="#x3039" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="FSR__CH2" Index="#x303a" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="FSR__CH3" Index="#x303b" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="FSR__CH4" Index="#x303c" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="FSR__CH5" Index="#x303d" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="Pressure__CH1" Index="#x303e" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="Pressure__CH2" Index="#x303f" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="Pressure__CH3" Index="#x3040" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
</Pdo>
|
||||||
|
<Pdo Name="ECAT2MCU" Index="#x1a00" InOut="1" Flags="#x0010" SyncMan="0">
|
||||||
|
<Entry Name="M1__control_mode" Index="#x3101" Sub="#x01">
|
||||||
|
<Type>BYTE</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M1__control_set" Index="#x3102" Sub="#x01">
|
||||||
|
<Type>BYTE</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M1__desired_position" Index="#x3103" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M1__desired_speed" Index="#x3104" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M1__desired__current" Index="#x3105" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M1__Max_Pos" Index="#x3106" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M1__Max_velocity" Index="#x3107" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M1__Max_current" Index="#x3108" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M1__Spare" Index="#x3109" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M2__control_mode" Index="#x310a" Sub="#x01">
|
||||||
|
<Type>BYTE</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M2__control_set" Index="#x310b" Sub="#x01">
|
||||||
|
<Type>BYTE</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M2__desired_position" Index="#x310c" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M2__desired_speed" Index="#x310d" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M2__desired__current" Index="#x310e" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M2__Max_Pos" Index="#x310f" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M2__Max_velocity" Index="#x3110" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M2__Max_current" Index="#x3111" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M2__Spare" Index="#x3112" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M3__control_mode" Index="#x3113" Sub="#x01">
|
||||||
|
<Type>BYTE</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M3__control_set" Index="#x3114" Sub="#x01">
|
||||||
|
<Type>BYTE</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M3__desired_position" Index="#x3115" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M3__desired_speed" Index="#x3116" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M3__desired__current" Index="#x3117" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M3__Max_Pos" Index="#x3118" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M3__Max_velocity" Index="#x3119" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M3__Max_current" Index="#x311a" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M3__Spare" Index="#x311b" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M4__control_mode" Index="#x311c" Sub="#x01">
|
||||||
|
<Type>BYTE</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M4__control_set" Index="#x311d" Sub="#x01">
|
||||||
|
<Type>BYTE</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M4__desired_position" Index="#x311e" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M4__desired_speed" Index="#x311f" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M4__desired__current" Index="#x3120" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M4__Max_Pos" Index="#x3121" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M4__Max_velocity" Index="#x3122" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M4__Max_current" Index="#x3123" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
<Entry Name="M4__Spare" Index="#x3124" Sub="#x01">
|
||||||
|
<Type>INT</Type>
|
||||||
|
</Entry>
|
||||||
|
</Pdo>
|
||||||
|
</EtherCAT>
|
||||||
|
</Box>
|
||||||
|
<EtherCAT/>
|
||||||
|
</Device>
|
||||||
|
</Io>
|
||||||
|
</Project>
|
||||||
|
</TcSmProject>
|
|
@ -0,0 +1,31 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4024.5">
|
||||||
|
<GVL Name="GVL_motor_data" Id="{f1f9826e-bbc5-4781-8d1a-d97243969113}">
|
||||||
|
<Declaration><![CDATA[{attribute 'qualified_only'}
|
||||||
|
VAR_GLOBAL
|
||||||
|
// Output
|
||||||
|
op_Mode AT %Q* : BYTE := 1;
|
||||||
|
des_pos AT %Q* : INT;
|
||||||
|
des_max_current AT %Q* : INT := 100;
|
||||||
|
des_current AT %Q* : INT := 100;
|
||||||
|
des_speed AT %Q* : INT := 1000;
|
||||||
|
I_kp AT %Q* : INT := 1;
|
||||||
|
I_ki AT %Q* : INT := 10;
|
||||||
|
V_kp AT %Q* : INT := 1;
|
||||||
|
V_kd AT %Q* : INT := 10;
|
||||||
|
|
||||||
|
// Input
|
||||||
|
Status AT %I* : BYTE;
|
||||||
|
Mode AT %I* : BYTE;
|
||||||
|
Com_State AT %I* : BYTE;
|
||||||
|
act_pos AT %I* : INT;
|
||||||
|
PH_A AT %I* : INT;
|
||||||
|
PH_B AT %I* : INT;
|
||||||
|
PH_C AT %I* : INT;
|
||||||
|
Error AT %I* : INT;
|
||||||
|
Phase_Current AT %I* : INT;
|
||||||
|
Speed AT %I* : INT;
|
||||||
|
Duty AT %I* : INT;
|
||||||
|
END_VAR]]></Declaration>
|
||||||
|
</GVL>
|
||||||
|
</TcPlcObject>
|
|
@ -0,0 +1,74 @@
|
||||||
|
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<FileVersion>1.0.0.0</FileVersion>
|
||||||
|
<SchemaVersion>2.0</SchemaVersion>
|
||||||
|
<ProjectGuid>{4ae346cd-c7ce-4990-9940-2d1e689dc225}</ProjectGuid>
|
||||||
|
<SubObjectsSortedByName>True</SubObjectsSortedByName>
|
||||||
|
<DownloadApplicationInfo>true</DownloadApplicationInfo>
|
||||||
|
<WriteProductVersion>true</WriteProductVersion>
|
||||||
|
<GenerateTpy>false</GenerateTpy>
|
||||||
|
<Name>Motordata_PLC</Name>
|
||||||
|
<ProgramVersion>3.1.4023.0</ProgramVersion>
|
||||||
|
<Application>{8cb30f18-2c9e-4d81-a3ca-322069701ffa}</Application>
|
||||||
|
<TypeSystem>{491a06a0-e15f-449f-8b38-ee9ac154eb22}</TypeSystem>
|
||||||
|
<Implicit_Task_Info>{53ab81c7-8b4b-43c1-b5ab-73cba09cb336}</Implicit_Task_Info>
|
||||||
|
<Implicit_KindOfTask>{81fa6db4-0105-41b4-88c2-51344db29290}</Implicit_KindOfTask>
|
||||||
|
<Implicit_Jitter_Distribution>{83c85c54-db23-4354-9cba-3d70fd632e8d}</Implicit_Jitter_Distribution>
|
||||||
|
<LibraryReferences>{7999646c-51c9-45ae-9085-f34e5ecc5ec7}</LibraryReferences>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="GVLs\GVL_motor_data.TcGVL">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
<LinkAlways>true</LinkAlways>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="PlcTask.TcTTO">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="POUs\MAIN.TcPOU">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Folder Include="DUTs" />
|
||||||
|
<Folder Include="GVLs" />
|
||||||
|
<Folder Include="VISUs" />
|
||||||
|
<Folder Include="POUs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<PlaceholderReference Include="Tc2_Standard">
|
||||||
|
<DefaultResolution>Tc2_Standard, * (Beckhoff Automation GmbH)</DefaultResolution>
|
||||||
|
<Namespace>Tc2_Standard</Namespace>
|
||||||
|
</PlaceholderReference>
|
||||||
|
<PlaceholderReference Include="Tc2_System">
|
||||||
|
<DefaultResolution>Tc2_System, * (Beckhoff Automation GmbH)</DefaultResolution>
|
||||||
|
<Namespace>Tc2_System</Namespace>
|
||||||
|
</PlaceholderReference>
|
||||||
|
<PlaceholderReference Include="Tc3_Module">
|
||||||
|
<DefaultResolution>Tc3_Module, * (Beckhoff Automation GmbH)</DefaultResolution>
|
||||||
|
<Namespace>Tc3_Module</Namespace>
|
||||||
|
</PlaceholderReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Motordata_PLC.tmc">
|
||||||
|
<SubType>Content</SubType>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
<ProjectExtensions>
|
||||||
|
<PlcProjectOptions>
|
||||||
|
<XmlArchive>
|
||||||
|
<Data>
|
||||||
|
<o xml:space="preserve" t="OptionKey">
|
||||||
|
<v n="Name">"<ProjectRoot>"</v>
|
||||||
|
<d n="SubKeys" t="Hashtable" />
|
||||||
|
<d n="Values" t="Hashtable" />
|
||||||
|
</o>
|
||||||
|
</Data>
|
||||||
|
<TypeList>
|
||||||
|
<Type n="Hashtable">System.Collections.Hashtable</Type>
|
||||||
|
<Type n="OptionKey">{54dd0eac-a6d8-46f2-8c27-2f43c7e49861}</Type>
|
||||||
|
<Type n="String">System.String</Type>
|
||||||
|
</TypeList>
|
||||||
|
</XmlArchive>
|
||||||
|
</PlcProjectOptions>
|
||||||
|
</ProjectExtensions>
|
||||||
|
</Project>
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<TcPlcObject Version="1.1.0.1">
|
||||||
|
<POU Name="MAIN" Id="{bea1ccef-eacb-4a24-8635-6fbb784e4a5d}">
|
||||||
|
<Declaration><![CDATA[PROGRAM MAIN
|
||||||
|
VAR
|
||||||
|
END_VAR
|
||||||
|
]]>
|
||||||
|
</Declaration>
|
||||||
|
<Implementation>
|
||||||
|
<ST><![CDATA[]]></ST>
|
||||||
|
</Implementation>
|
||||||
|
</POU>
|
||||||
|
</TcPlcObject>
|
|
@ -0,0 +1,17 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<TcPlcObject Version="1.1.0.1">
|
||||||
|
<Task Name="PlcTask" Id="{8964a762-3bf6-4f78-8749-dd136e069f20}">
|
||||||
|
<!--CycleTime in micro seconds.-->
|
||||||
|
<CycleTime>10000</CycleTime>
|
||||||
|
<Priority>20</Priority>
|
||||||
|
<PouCall>
|
||||||
|
<Name>MAIN</Name>
|
||||||
|
</PouCall>
|
||||||
|
<TaskFBGuid>{e97dcd9b-40b9-4d2d-be20-7f79184b4b83}</TaskFBGuid>
|
||||||
|
<Fb_init>{3b074a47-04a4-4446-8c36-6845d19068a7}</Fb_init>
|
||||||
|
<Fb_exit>{5c5f5f84-e7f6-4c9f-8e6b-25d1b89465a8}</Fb_exit>
|
||||||
|
<CycleUpdate>{07b2fc7d-725f-4928-b7bb-1c1ddcb9a703}</CycleUpdate>
|
||||||
|
<PostCycleUpdate>{49bd0358-5e57-44dd-9076-193288aeb9f7}</PostCycleUpdate>
|
||||||
|
<ObjectProperties />
|
||||||
|
</Task>
|
||||||
|
</TcPlcObject>
|
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<ProjectGuid>{8fb7700f-1b3f-4e2a-b3df-c74f2d60ba45}</ProjectGuid>
|
||||||
|
<AssemblyName>TwinCAT Measurement Project1</AssemblyName>
|
||||||
|
<Name>TwinCAT Measurement Project1</Name>
|
||||||
|
<RootNamespace>TwinCAT Measurement Project1</RootNamespace>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Include="XY Scope Project.tcscopex">
|
||||||
|
<SubType>Content</SubType>
|
||||||
|
</Content>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
|
@ -0,0 +1,248 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<ScopeProject AssemblyName="TwinCAT.Measurement.Scope.API.Model">
|
||||||
|
<AutoDeleteCapacity>0</AutoDeleteCapacity>
|
||||||
|
<AutoDeleteMode>Disabled</AutoDeleteMode>
|
||||||
|
<AutoDeleteOlderThan>0</AutoDeleteOlderThan>
|
||||||
|
<AutoRestartRecord>false</AutoRestartRecord>
|
||||||
|
<AutoSaveFileNameMask>{SCOPE}_AutoSave_{HH_mm_ss}</AutoSaveFileNameMask>
|
||||||
|
<AutoSavePath>$ScopeProject$\AutoSave</AutoSavePath>
|
||||||
|
<Comment />
|
||||||
|
<DisplayColor>Black</DisplayColor>
|
||||||
|
<Guid>0f4c9db4-7dc8-4a6e-bab0-d9526c2fdc12</Guid>
|
||||||
|
<HeadlessServer />
|
||||||
|
<HeadlessServerConnectionId>00000000-0000-0000-0000-000000000000</HeadlessServerConnectionId>
|
||||||
|
<IsFileBased>true</IsFileBased>
|
||||||
|
<IsTemplate>false</IsTemplate>
|
||||||
|
<Layout />
|
||||||
|
<MainServer>127.0.0.1.1.1</MainServer>
|
||||||
|
<Name>Scope Project</Name>
|
||||||
|
<RecordTime>6000000000</RecordTime>
|
||||||
|
<SortPriority>100</SortPriority>
|
||||||
|
<StopMode>AutoStop</StopMode>
|
||||||
|
<SubMember>
|
||||||
|
<DataPool AssemblyName="TwinCAT.Measurement.Scope.API.Model">
|
||||||
|
<Comment />
|
||||||
|
<DisplayColor>Black</DisplayColor>
|
||||||
|
<Guid>4d0f043f-99fd-48e3-88a4-eaed2ee9275c</Guid>
|
||||||
|
<IsFileBased>false</IsFileBased>
|
||||||
|
<Name>DataPool</Name>
|
||||||
|
<SortPriority>0</SortPriority>
|
||||||
|
<SubMember />
|
||||||
|
<Suffix>.svdp</Suffix>
|
||||||
|
<Title>DataPool_34</Title>
|
||||||
|
</DataPool>
|
||||||
|
<XYChart AssemblyName="TwinCAT.Measurement.Scope.API.Model">
|
||||||
|
<AssignedCore>0</AssignedCore>
|
||||||
|
<AutoStart>true</AutoStart>
|
||||||
|
<Comment />
|
||||||
|
<DefaultDisplayWidth>100000000</DefaultDisplayWidth>
|
||||||
|
<DisplayColor>-986896</DisplayColor>
|
||||||
|
<ForeColor>-16777216</ForeColor>
|
||||||
|
<Guid>d0b9ac70-9337-4fea-96b3-e8ac396fe683</Guid>
|
||||||
|
<IsFileBased>false</IsFileBased>
|
||||||
|
<MasterChart>00000000-0000-0000-0000-000000000000</MasterChart>
|
||||||
|
<MaxResolution>120000</MaxResolution>
|
||||||
|
<Name>XY Chart</Name>
|
||||||
|
<ShowVisionChart>false</ShowVisionChart>
|
||||||
|
<SortPriority>10</SortPriority>
|
||||||
|
<SubMember>
|
||||||
|
<AxisGroup AssemblyName="TwinCAT.Measurement.Scope.API.Model">
|
||||||
|
<Comment />
|
||||||
|
<DisplayColor>-1</DisplayColor>
|
||||||
|
<Enabled>true</Enabled>
|
||||||
|
<Guid>41ce791f-bcf1-4d09-9cb2-ec79e2806d83</Guid>
|
||||||
|
<IsFileBased>false</IsFileBased>
|
||||||
|
<Name>Axis Group</Name>
|
||||||
|
<SortPriority>10</SortPriority>
|
||||||
|
<SubMember>
|
||||||
|
<ValueAxis AssemblyName="TwinCAT.Measurement.Scope.API.Model">
|
||||||
|
<Comment />
|
||||||
|
<DisplayColor>Black</DisplayColor>
|
||||||
|
<Guid>aa35b9c6-4a80-424a-bd18-4077de755c99</Guid>
|
||||||
|
<Inverted>false</Inverted>
|
||||||
|
<IsFileBased>false</IsFileBased>
|
||||||
|
<Logarithmic>false</Logarithmic>
|
||||||
|
<ManualMax>0.5</ManualMax>
|
||||||
|
<ManualMin>-0.5</ManualMin>
|
||||||
|
<Name>Value Axis</Name>
|
||||||
|
<Orientation>X</Orientation>
|
||||||
|
<ScalingMode>AutoGrowOnly</ScalingMode>
|
||||||
|
<SortPriority>100</SortPriority>
|
||||||
|
<SubMember>
|
||||||
|
<AxisStyle AssemblyName="TwinCAT.Measurement.Scope.API.Model">
|
||||||
|
<Comment />
|
||||||
|
<DisplayColor>-16777216</DisplayColor>
|
||||||
|
<Grid>true</Grid>
|
||||||
|
<GridColor>-16777216</GridColor>
|
||||||
|
<GridDivisions>10</GridDivisions>
|
||||||
|
<GridLineWidth>1</GridLineWidth>
|
||||||
|
<Guid>c942fb84-ebbf-478f-9b4d-a361581ae2f5</Guid>
|
||||||
|
<IsFileBased>false</IsFileBased>
|
||||||
|
<LineWidth>1</LineWidth>
|
||||||
|
<Name>Axis Style</Name>
|
||||||
|
<Precision>6</Precision>
|
||||||
|
<ShowName>false</ShowName>
|
||||||
|
<SortPriority>100</SortPriority>
|
||||||
|
<SubGrid>false</SubGrid>
|
||||||
|
<SubGridDivisions>5</SubGridDivisions>
|
||||||
|
<Suffix>.svstyle</Suffix>
|
||||||
|
<Title>AxisStyle_38</Title>
|
||||||
|
<Visible>true</Visible>
|
||||||
|
</AxisStyle>
|
||||||
|
</SubMember>
|
||||||
|
<Suffix>.svaxis</Suffix>
|
||||||
|
<Title>Value Axis</Title>
|
||||||
|
</ValueAxis>
|
||||||
|
<ValueAxis AssemblyName="TwinCAT.Measurement.Scope.API.Model">
|
||||||
|
<Comment />
|
||||||
|
<DisplayColor>Black</DisplayColor>
|
||||||
|
<Guid>6dcf7932-cbd2-4ea2-91b4-ffb32c161f58</Guid>
|
||||||
|
<Inverted>false</Inverted>
|
||||||
|
<IsFileBased>false</IsFileBased>
|
||||||
|
<Logarithmic>false</Logarithmic>
|
||||||
|
<ManualMax>0.5</ManualMax>
|
||||||
|
<ManualMin>-0.5</ManualMin>
|
||||||
|
<Name>Value Axis</Name>
|
||||||
|
<Orientation>Y</Orientation>
|
||||||
|
<ScalingMode>AutoGrowOnly</ScalingMode>
|
||||||
|
<SortPriority>100</SortPriority>
|
||||||
|
<SubMember>
|
||||||
|
<AxisStyle AssemblyName="TwinCAT.Measurement.Scope.API.Model">
|
||||||
|
<Comment />
|
||||||
|
<DisplayColor>-16777216</DisplayColor>
|
||||||
|
<Grid>true</Grid>
|
||||||
|
<GridColor>-16777216</GridColor>
|
||||||
|
<GridDivisions>10</GridDivisions>
|
||||||
|
<GridLineWidth>1</GridLineWidth>
|
||||||
|
<Guid>bc0d4a81-c886-4ac1-a954-f68cfcc15f22</Guid>
|
||||||
|
<IsFileBased>false</IsFileBased>
|
||||||
|
<LineWidth>1</LineWidth>
|
||||||
|
<Name>Axis Style</Name>
|
||||||
|
<Precision>6</Precision>
|
||||||
|
<ShowName>false</ShowName>
|
||||||
|
<SortPriority>100</SortPriority>
|
||||||
|
<SubGrid>false</SubGrid>
|
||||||
|
<SubGridDivisions>5</SubGridDivisions>
|
||||||
|
<Suffix>.svstyle</Suffix>
|
||||||
|
<Title>AxisStyle_40</Title>
|
||||||
|
<Visible>true</Visible>
|
||||||
|
</AxisStyle>
|
||||||
|
</SubMember>
|
||||||
|
<Suffix>.svaxis</Suffix>
|
||||||
|
<Title>Value Axis</Title>
|
||||||
|
</ValueAxis>
|
||||||
|
<AspectRatioScalingStyle AssemblyName="TwinCAT.Measurement.Scope.API.Model">
|
||||||
|
<AspectRatioScaling>1:1</AspectRatioScaling>
|
||||||
|
<Comment />
|
||||||
|
<DisplayColor>Black</DisplayColor>
|
||||||
|
<Guid>f3f6f2ea-0c83-4c7b-8976-5c0ad3437a1a</Guid>
|
||||||
|
<IsFileBased>false</IsFileBased>
|
||||||
|
<KeepAspectRatio>false</KeepAspectRatio>
|
||||||
|
<Name>AspectRatioScalingStyle_41</Name>
|
||||||
|
<ReferenceAxis>X</ReferenceAxis>
|
||||||
|
<SortPriority>100</SortPriority>
|
||||||
|
<Suffix>.svstyle</Suffix>
|
||||||
|
<Title>AspectRatioScalingStyle_41</Title>
|
||||||
|
</AspectRatioScalingStyle>
|
||||||
|
<MarkerContainer AssemblyName="TwinCAT.Measurement.Scope.API.Model">
|
||||||
|
<Comment />
|
||||||
|
<DisplayColor>Black</DisplayColor>
|
||||||
|
<Guid>a1bafadb-b657-4f03-8d16-7da5ba9e80de</Guid>
|
||||||
|
<IsFileBased>false</IsFileBased>
|
||||||
|
<Name>Marker Container</Name>
|
||||||
|
<SortPriority>100</SortPriority>
|
||||||
|
<SubMember />
|
||||||
|
<Suffix>.svmc</Suffix>
|
||||||
|
<Title>MarkerContainer_42</Title>
|
||||||
|
</MarkerContainer>
|
||||||
|
</SubMember>
|
||||||
|
<Suffix>.svagroup</Suffix>
|
||||||
|
<Title>AxisGroup_36</Title>
|
||||||
|
</AxisGroup>
|
||||||
|
<OverviewChart AssemblyName="TwinCAT.Measurement.Scope.API.Model">
|
||||||
|
<Comment />
|
||||||
|
<DisplayColor>-1</DisplayColor>
|
||||||
|
<ForeColor>-16777216</ForeColor>
|
||||||
|
<Guid>cd2eca7a-022e-4ee1-9aac-22d1443cc230</Guid>
|
||||||
|
<IsFileBased>false</IsFileBased>
|
||||||
|
<Name>Overview Chart</Name>
|
||||||
|
<OverviewVisible>false</OverviewVisible>
|
||||||
|
<SortPriority>100</SortPriority>
|
||||||
|
<Suffix>.svochart</Suffix>
|
||||||
|
<Title>OverviewChart_43</Title>
|
||||||
|
</OverviewChart>
|
||||||
|
<ChartStyle AssemblyName="TwinCAT.Measurement.Scope.API.Model">
|
||||||
|
<Comment />
|
||||||
|
<DisplayColor>Black</DisplayColor>
|
||||||
|
<GradientBackground>1</GradientBackground>
|
||||||
|
<Guid>a3c60b44-98d1-4dc6-96dd-28ec04b43949</Guid>
|
||||||
|
<IsFileBased>false</IsFileBased>
|
||||||
|
<Name>Chart Style</Name>
|
||||||
|
<ShowName>false</ShowName>
|
||||||
|
<SortPriority>100</SortPriority>
|
||||||
|
<StackedAxes>false</StackedAxes>
|
||||||
|
<SubMember>
|
||||||
|
<ChartZoomStyle AssemblyName="TwinCAT.Measurement.Scope.API.Model">
|
||||||
|
<Comment />
|
||||||
|
<DisplayColor>Black</DisplayColor>
|
||||||
|
<Guid>1ec177ce-162d-4027-80af-1bea9563a820</Guid>
|
||||||
|
<IsFileBased>false</IsFileBased>
|
||||||
|
<Name>Chartzoom Style</Name>
|
||||||
|
<ScaleOnZoom>true</ScaleOnZoom>
|
||||||
|
<SortPriority>100</SortPriority>
|
||||||
|
<Suffix>.svstyle</Suffix>
|
||||||
|
<Title>ChartZoomStyle_45</Title>
|
||||||
|
<YZoom>true</YZoom>
|
||||||
|
</ChartZoomStyle>
|
||||||
|
<ChartMenuStyle AssemblyName="TwinCAT.Measurement.Scope.API.Model">
|
||||||
|
<ButtonSize>
|
||||||
|
<Height>16</Height>
|
||||||
|
<Width>16</Width>
|
||||||
|
</ButtonSize>
|
||||||
|
<Comment />
|
||||||
|
<DisplayColor>Black</DisplayColor>
|
||||||
|
<EnabledButtons>RunButton PauseButton Splitter1 DisplaywidthTextBox Splitter2 ScrollBackBig ScrollBackSmall ScrollForwardSmall ScrollForwardBig Splitter3 PositionTextBox Splitter4 UndoButton RedoButton Splitter5 PanXYButton ZoomXYButton UnzoomButton ZoomOutMaxButton OverviewButton CopyToClipboard</EnabledButtons>
|
||||||
|
<EnabledTimeLabels>All</EnabledTimeLabels>
|
||||||
|
<Guid>7fea54c9-d498-4be2-b2aa-5e6dfc5c5525</Guid>
|
||||||
|
<IsFileBased>false</IsFileBased>
|
||||||
|
<Name>Chartmenu Style</Name>
|
||||||
|
<SortPriority>100</SortPriority>
|
||||||
|
<Suffix>.svstyle</Suffix>
|
||||||
|
<TimeStripFontSize>8.25</TimeStripFontSize>
|
||||||
|
<Title>ChartMenuStyle_46</Title>
|
||||||
|
<ToolStripFontSize>8.25</ToolStripFontSize>
|
||||||
|
<UseLongTimeFormat>true</UseLongTimeFormat>
|
||||||
|
<VisibleTimeStrip>true</VisibleTimeStrip>
|
||||||
|
<VisibleToolStrip>true</VisibleToolStrip>
|
||||||
|
</ChartMenuStyle>
|
||||||
|
</SubMember>
|
||||||
|
<Suffix>.svstyle</Suffix>
|
||||||
|
<Title>ChartStyle_44</Title>
|
||||||
|
<ToolTipEnabled>true</ToolTipEnabled>
|
||||||
|
</ChartStyle>
|
||||||
|
</SubMember>
|
||||||
|
<Suffix>.svchart</Suffix>
|
||||||
|
<Title>XYChart_35</Title>
|
||||||
|
</XYChart>
|
||||||
|
<TriggerModule AssemblyName="TwinCAT.Measurement.Scope.API.Model">
|
||||||
|
<Comment />
|
||||||
|
<DisplayColor>Black</DisplayColor>
|
||||||
|
<Guid>c29c24e8-ee01-443d-9a31-927d4d04d726</Guid>
|
||||||
|
<IsFileBased>false</IsFileBased>
|
||||||
|
<Name>Trigger</Name>
|
||||||
|
<SortPriority>100</SortPriority>
|
||||||
|
<SubMember />
|
||||||
|
<Suffix>.svtm</Suffix>
|
||||||
|
<Title>TriggerModule_47</Title>
|
||||||
|
</TriggerModule>
|
||||||
|
</SubMember>
|
||||||
|
<Suffix>.tcscopex</Suffix>
|
||||||
|
<SynchronisationMode>Default</SynchronisationMode>
|
||||||
|
<TargetConnectionIds />
|
||||||
|
<Title>ScopeProject_3</Title>
|
||||||
|
<UseAutoSave>false</UseAutoSave>
|
||||||
|
<UseFileStore>true</UseFileStore>
|
||||||
|
<UseUserSettings>true</UseUserSettings>
|
||||||
|
<Version>1.0.0.0</Version>
|
||||||
|
<ViewDetailLevel>ExtendedXYOnly</ViewDetailLevel>
|
||||||
|
</ScopeProject>
|
Loading…
Reference in New Issue