#include "control_vectorial_cal.h"
#include "control_vectorial.h"

/* Storage class 'PageSwitching' */
control_vectorial_cal_type control_vectorial_cal_impl = {
  /* Mask Parameter: VelocityController_CtrlType
   * Referenced by: '<S25>/Constant'
   */
  1.0,

  /* Mask Parameter: PMSMFieldWeakeningController1_K
   * Referenced by: '<S24>/Gain1'
   */
  10.0,

  /* Mask Parameter: VelocityController_Kaw_w
   * Referenced by: '<S39>/Kaw'
   */
  1.0,

  /* Mask Parameter: PMSMFieldWeakeningController1_o
   * Referenced by: '<S24>/Gain'
   */
  100.0,

  /* Mask Parameter: VelocityController_Ki_w
   * Referenced by: '<S39>/Ki'
   */
  1.0,

  /* Mask Parameter: VelocityController_Kp_w
   * Referenced by: '<S39>/Kp'
   */
  1.0,

  /* Mask Parameter: PWMGenerator2Level_MinMax
   * Referenced by: '<S2>/Constant10'
   */
  { -1.0, 1.0 },

  /* Mask Parameter: PMSMFieldWeakeningController1_M
   * Referenced by: '<S24>/Modulation index threshold'
   */
  1.0,

  /* Mask Parameter: CompareToConstant_const
   * Referenced by: '<S38>/Constant'
   */
  2.5,

  /* Mask Parameter: EdgeDetector_model
   * Referenced by: '<S5>/Constant1'
   */
  2.0,

  /* Mask Parameter: PMSMCurrentReferenceGenerator_p
   * Referenced by: '<S23>/Tq--> iqRef'
   */
  0.0466027,

  /* Mask Parameter: DiscretePIController_x0
   * Referenced by: '<S39>/Discrete-Time Integrator'
   */
  0.0,

  /* Mask Parameter: EdgeDetector_ic
   * Referenced by: '<S5>/Memory'
   */
  false,

  /* Expression: -1e6
   * Referenced by: '<S9>/Out1'
   */
  -1.0E+6,

  /* Expression: [1 0]
   * Referenced by: '<S5>/pos. edge'
   */
  { 1.0, 0.0 },

  /* Expression: [0 1]
   * Referenced by: '<S5>/neg. edge'
   */
  { 0.0, 1.0 },

  /* Expression: [1 1]
   * Referenced by: '<S5>/either edge'
   */
  { 1.0, 1.0 },

  /* Expression: -1
   * Referenced by: '<S1>/Gain1'
   */
  -1.0,

  /* Expression: 0
   * Referenced by: '<S1>/Switch'
   */
  0.0,

  /* Expression: 30/pi
   * Referenced by: '<S23>/rad//s->rpm'
   */
  9.5492965855137211,

  /* Expression: idMatrix
   * Referenced by: '<S23>/Lookup Table id reference'
   */
  { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 },

  /* Expression: rpmVec
   * Referenced by: '<S23>/Lookup Table id reference'
   */
  { 0.0, 3000.0 },

  /* Expression: TqVec
   * Referenced by: '<S23>/Lookup Table id reference'
   */
  { -100.0, 0.0, 100.0 },

  /* Expression: VdcVec
   * Referenced by: '<S23>/Lookup Table id reference'
   */
  { 300.0, 350.0 },

  /* Expression: iqMatrix
   * Referenced by: '<S23>/Lookup Table iq reference'
   */
  { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 },

  /* Expression: rpmVec
   * Referenced by: '<S23>/Lookup Table iq reference'
   */
  { 0.0, 3000.0 },

  /* Expression: TqVec
   * Referenced by: '<S23>/Lookup Table iq reference'
   */
  { -100.0, 0.0, 100.0 },

  /* Expression: VdcVec
   * Referenced by: '<S23>/Lookup Table iq reference'
   */
  { 300.0, 350.0 },

  /* Expression: 0.1
   * Referenced by: '<S37>/Constant1'
   */
  0.1,

  /* Expression: Kv_w
   * Referenced by: '<S25>/Kv_w'
   */
  1.0,

  /* Expression: -1
   * Referenced by: '<S41>/Gain1'
   */
  -1.0,

  /* Expression: 1
   * Referenced by: '<S40>/Gain1'
   */
  1.0,

  /* Expression: 1/2
   * Referenced by: '<S40>/Gain2'
   */
  0.5,

  /* Expression: sqrt(3)/2
   * Referenced by: '<S40>/Gain'
   */
  0.8660254037844386,

  /* Expression: 1/2
   * Referenced by: '<S40>/Gain3'
   */
  0.5,

  /* Expression: 0
   * Referenced by: '<Root>/Constant2'
   */
  0.0,

  /* Expression: 0
   * Referenced by: '<Root>/Constant3'
   */
  0.0,

  /* Expression: 0
   * Referenced by: '<Root>/Constant5'
   */
  0.0,

  /* Expression: 0
   * Referenced by: '<S1>/Constant'
   */
  0.0,

  /* Expression: 0
   * Referenced by: '<Root>/Constant1'
   */
  0.0,

  /* Computed Parameter: Encoder_P1_Size
   * Referenced by: '<Root>/Encoder'
   */
  { 1.0, 1.0 },

  /* Expression: id
   * Referenced by: '<Root>/Encoder'
   */
  1.0,

  /* Computed Parameter: Encoder_P2_Size
   * Referenced by: '<Root>/Encoder'
   */
  { 1.0, 2.0 },

  /* Expression: chan
   * Referenced by: '<Root>/Encoder'
   */
  { 8.0, 9.0 },

  /* Computed Parameter: Encoder_P3_Size
   * Referenced by: '<Root>/Encoder'
   */
  { 1.0, 1.0 },

  /* Expression: vectorizeOutput
   * Referenced by: '<Root>/Encoder'
   */
  0.0,

  /* Computed Parameter: Encoder_P4_Size
   * Referenced by: '<Root>/Encoder'
   */
  { 1.0, 1.0 },

  /* Expression: ts
   * Referenced by: '<Root>/Encoder'
   */
  5.0E-5,

  /* Expression: 0
   * Referenced by: '<S1>/Delay4'
   */
  0.0,

  /* Expression: 0
   * Referenced by: '<S1>/Delay3'
   */
  0.0,

  /* Expression: 0
   * Referenced by: '<S1>/Delay1'
   */
  0.0,

  /* Expression: 0
   * Referenced by: '<S1>/Switch2'
   */
  0.0,

  /* Expression: 0
   * Referenced by: '<S1>/Delay2'
   */
  0.0,

  /* Expression: -1
   * Referenced by: '<S29>/-1'
   */
  -1.0,

  /* Expression: -1
   * Referenced by: '<S28>/Gain'
   */
  -1.0,

  /* Computed Parameter: FiltroPasaBaja_A
   * Referenced by: '<S21>/Filtro Pasa Baja'
   */
  -6283.1853071795858,

  /* Computed Parameter: FiltroPasaBaja_C
   * Referenced by: '<S21>/Filtro Pasa Baja'
   */
  6283.1853071795858,

  /* Computed Parameter: FiltroPasaBaja1_A
   * Referenced by: '<S21>/Filtro Pasa Baja1'
   */
  -6283.1853071795858,

  /* Computed Parameter: FiltroPasaBaja1_C
   * Referenced by: '<S21>/Filtro Pasa Baja1'
   */
  6283.1853071795858,

  /* Expression: 0.5
   * Referenced by: '<S27>/Gain1'
   */
  0.5,

  /* Computed Parameter: FiltroPasaBaja2_A
   * Referenced by: '<S21>/Filtro Pasa Baja2'
   */
  -6283.1853071795858,

  /* Computed Parameter: FiltroPasaBaja2_C
   * Referenced by: '<S21>/Filtro Pasa Baja2'
   */
  6283.1853071795858,

  /* Expression: 0.5
   * Referenced by: '<S27>/Gain2'
   */
  0.5,

  /* Expression: 2/3
   * Referenced by: '<S27>/Gain'
   */
  0.66666666666666663,

  /* Expression: 1/sqrt(3)
   * Referenced by: '<S27>/Gain4'
   */
  0.57735026918962584,

  /* Expression: 0
   * Referenced by: '<S23>/idRef'
   */
  0.0,

  /* Expression: inf
   * Referenced by: '<S32>/Saturation'
   */
  0.0,

  /* Expression: 0
   * Referenced by: '<Root>/Constant'
   */
  0.0,

  /* Expression: 2*pi/60
   * Referenced by: '<Root>/Gain'
   */
  0.10471975511965977,

  /* Expression: numZC_w
   * Referenced by: '<S25>/Zero-cancellation  omega'
   */
  1.0,

  /* Expression: denZC_w
   * Referenced by: '<S25>/Zero-cancellation  omega'
   */
  1.0,

  /* Expression: 0
   * Referenced by: '<S25>/Zero-cancellation  omega'
   */
  0.0,

  /* Expression: 0
   * Referenced by: '<S39>/Unit Delay'
   */
  0.0,

  /* Computed Parameter: DiscreteTimeIntegrator_gainval
   * Referenced by: '<S39>/Discrete-Time Integrator'
   */
  5.0E-5,

  /* Expression: -1
   * Referenced by: '<S32>/Sign Change'
   */
  -1.0,

  /* Expression: EnableZDAC
   * Referenced by: '<S23>/Constant'
   */
  1.0,

  /* Expression: 0.5
   * Referenced by: '<S23>/Switch'
   */
  0.5,

  /* Expression: pi
   * Referenced by: '<S24>/Constant'
   */
  3.1415926535897931,

  /* Expression: 0
   * Referenced by: '<S3>/Unit Delay'
   */
  0.0,

  /* Expression: 0.1
   * Referenced by: '<S37>/Switch'
   */
  0.1,

  /* Expression: 0
   * Referenced by: '<S24>/Unit Delay'
   */
  0.0,

  /* Computed Parameter: DiscreteTimeIntegrator_gainva_k
   * Referenced by: '<S24>/Discrete-Time Integrator'
   */
  5.0E-5,

  /* Expression: 1
   * Referenced by: '<S24>/Discrete-Time Integrator'
   */
  1.0,

  /* Expression: 1
   * Referenced by: '<S24>/Saturation'
   */
  1.0,

  /* Expression: 0
   * Referenced by: '<S24>/Saturation'
   */
  0.0,

  /* Expression: pi
   * Referenced by: '<S24>/Constant1'
   */
  3.1415926535897931,

  /* Expression: 0
   * Referenced by: '<S29>/Integrator'
   */
  0.0,

  /* Expression: 0
   * Referenced by: '<S30>/Integrator'
   */
  0.0,

  /* Expression: 0
   * Referenced by: '<Root>/Switch'
   */
  0.0,

  /* Expression: sps.Delay
   * Referenced by: '<S19>/Constant3'
   */
  0.000125,

  /* Expression: sps.Period
   * Referenced by: '<S19>/Constant1'
   */
  0.0005,

  /* Expression: sps.Freq
   * Referenced by: '<S19>/1\ib1'
   */
  2000.0,

  /* Expression: [0 2 0]
   * Referenced by: '<S19>/1-D Lookup Table'
   */
  { 0.0, 2.0, 0.0 },

  /* Expression: [0 .5 1]
   * Referenced by: '<S19>/1-D Lookup Table'
   */
  { 0.0, 0.5, 1.0 },

  /* Expression: 1
   * Referenced by: '<S19>/Constant2'
   */
  1.0,

  /* Expression: 0.5
   * Referenced by: '<S10>/Gain1'
   */
  0.5,

  /* Computed Parameter: Digitaloutput_P1_Size
   * Referenced by: '<Root>/Digital output'
   */
  { 1.0, 1.0 },

  /* Expression: id
   * Referenced by: '<Root>/Digital output'
   */
  1.0,

  /* Computed Parameter: Digitaloutput_P2_Size
   * Referenced by: '<Root>/Digital output'
   */
  { 1.0, 6.0 },

  /* Expression: chan
   * Referenced by: '<Root>/Digital output'
   */
  { 1.0, 2.0, 4.0, 5.0, 6.0, 7.0 },

  /* Computed Parameter: Digitaloutput_P3_Size
   * Referenced by: '<Root>/Digital output'
   */
  { 1.0, 1.0 },

  /* Expression: vectorizeInput
   * Referenced by: '<Root>/Digital output'
   */
  0.0,

  /* Computed Parameter: Digitaloutput_P4_Size
   * Referenced by: '<Root>/Digital output'
   */
  { 1.0, 6.0 },

  /* Expression: reset
   * Referenced by: '<Root>/Digital output'
   */
  { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 },

  /* Computed Parameter: Digitaloutput_P5_Size
   * Referenced by: '<Root>/Digital output'
   */
  { 1.0, 6.0 },

  /* Expression: init
   * Referenced by: '<Root>/Digital output'
   */
  { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 },

  /* Computed Parameter: Digitaloutput_P6_Size
   * Referenced by: '<Root>/Digital output'
   */
  { 1.0, 1.0 },

  /* Expression: ts
   * Referenced by: '<Root>/Digital output'
   */
  -1.0,

  /* Expression: eps
   * Referenced by: '<S6>/Constant'
   */
  2.2204460492503131E-16,

  /* Expression: 0
   * Referenced by:
   */
  0.0,

  /* Expression: 0
   * Referenced by:
   */
  0.0,

  /* Expression: 0
   * Referenced by:
   */
  0.0,

  /* Expression: 0
   * Referenced by: '<S29>/C1'
   */
  0.0,

  /* Expression: 0.05
   * Referenced by: '<S29>/Switch'
   */
  0.05,

  /* Expression: 0
   * Referenced by: '<S30>/C1'
   */
  0.0,

  /* Expression: 0.05
   * Referenced by: '<S30>/Switch'
   */
  0.05,

  /* Computed Parameter: CorrientesyPar_P1_Size
   * Referenced by: '<Root>/Corrientes y Par'
   */
  { 1.0, 1.0 },

  /* Expression: id
   * Referenced by: '<Root>/Corrientes y Par'
   */
  1.0,

  /* Computed Parameter: CorrientesyPar_P2_Size
   * Referenced by: '<Root>/Corrientes y Par'
   */
  { 1.0, 3.0 },

  /* Expression: chan
   * Referenced by: '<Root>/Corrientes y Par'
   */
  { 1.0, 2.0, 3.0 },

  /* Computed Parameter: CorrientesyPar_P3_Size
   * Referenced by: '<Root>/Corrientes y Par'
   */
  { 1.0, 1.0 },

  /* Expression: trigger
   * Referenced by: '<Root>/Corrientes y Par'
   */
  1.0,

  /* Computed Parameter: CorrientesyPar_P4_Size
   * Referenced by: '<Root>/Corrientes y Par'
   */
  { 1.0, 1.0 },

  /* Expression: range
   * Referenced by: '<Root>/Corrientes y Par'
   */
  2.0,

  /* Computed Parameter: CorrientesyPar_P5_Size
   * Referenced by: '<Root>/Corrientes y Par'
   */
  { 1.0, 1.0 },

  /* Expression: ts
   * Referenced by: '<Root>/Corrientes y Par'
   */
  0.0001,

  /* Computed Parameter: CorrientesyPar_P6_Size
   * Referenced by: '<Root>/Corrientes y Par'
   */
  { 1.0, 1.0 },

  /* Expression: p.AiTriggerMode
   * Referenced by: '<Root>/Corrientes y Par'
   */
  4.0,

  /* Computed Parameter: CorrientesyPar_P7_Size
   * Referenced by: '<Root>/Corrientes y Par'
   */
  { 1.0, 1.0 },

  /* Expression: p.AiClockDivider
   * Referenced by: '<Root>/Corrientes y Par'
   */
  7499.0,

  /* Computed Parameter: CorrientesyPar_P8_Size
   * Referenced by: '<Root>/Corrientes y Par'
   */
  { 1.0, 1.0 },

  /* Expression: parAiInternalSignal
   * Referenced by: '<Root>/Corrientes y Par'
   */
  1.0,

  /* Computed Parameter: CorrientesyPar_P9_Size
   * Referenced by: '<Root>/Corrientes y Par'
   */
  { 1.0, 1.0 },

  /* Expression: parAiDioTriggerChannel
   * Referenced by: '<Root>/Corrientes y Par'
   */
  1.0,

  /* Computed Parameter: LookupTableidreference_maxIndex
   * Referenced by: '<S23>/Lookup Table id reference'
   */
  { 1U, 2U, 1U },

  /* Computed Parameter: LookupTableidreference_dimSizes
   * Referenced by: '<S23>/Lookup Table id reference'
   */
  { 1U, 2U, 6U },

  /* Computed Parameter: LookupTableiqreference_maxIndex
   * Referenced by: '<S23>/Lookup Table iq reference'
   */
  { 1U, 2U, 1U },

  /* Computed Parameter: LookupTableiqreference_dimSizes
   * Referenced by: '<S23>/Lookup Table iq reference'
   */
  { 1U, 2U, 6U },

  /* Computed Parameter: OUT_Y0
   * Referenced by: '<S7>/OUT'
   */
  false,

  /* Computed Parameter: OUT_Y0_l
   * Referenced by: '<S8>/OUT'
   */
  false
};

control_vectorial_cal_type *control_vectorial_cal = &control_vectorial_cal_impl;
