/*
 * Model210_Openloop.h
 *
 * Real-Time Workshop code generation for Simulink model "Model210_Openloop.mdl".
 *
 * Model Version                        : 1.90
 * Real-Time Workshop file version      : 5.1 $Date: 2003/08/08 18:37:24 $
 * Real-Time Workshop file generated on : Fri Feb 10 08:41:34 2006
 * TLC version                          : 5.1 (Aug  8 2003)
 * C source code generated on           : Fri Feb 10 08:41:34 2006
 */

#ifndef _RTW_HEADER_Model210_Openloop_h_
# define _RTW_HEADER_Model210_Openloop_h_

#ifndef _Model210_Openloop_COMMON_INCLUDES_
# define _Model210_Openloop_COMMON_INCLUDES_
#include <math.h>
#include <string.h>

#include "simstruc.h"
#include "rtlibsrc.h"
#include "dt_info.h"
#include "rtwintgt.h"

#endif                                  /* _Model210_Openloop_COMMON_INCLUDES_ */

#include "Model210_Openloop_types.h"

#define MODEL_NAME                      Model210_Openloop
#define NSAMPLE_TIMES                   (2)                      /* Number of sample times */
#define NINPUTS                         (0)                      /* Number of model inputs */
#define NOUTPUTS                        (0)                      /* Number of model outputs */
#define NBLOCKIO                        (7)                      /* Number of data output port signals */
#define NUM_ZC_EVENTS                   (0)                      /* Number of zero-crossing events */

#ifndef NCSTATES
# define NCSTATES (0)                   /* Number of continuous states */
#elif NCSTATES != 0
# error Invalid specification of NCSTATES defined in compiler command
#endif

/* Intrinsic types */
#ifndef POINTER_T
# define POINTER_T
typedef void * pointer_T;
#endif

/* Block signals (auto storage) */
typedef struct _BlockIO {
  real_T Clock;                         /* '<Root>/Clock' */
  real_T S_Function[5];                 /* '<S3>/S-Function' */
  real_T scale2;                        /* '<S4>/scale2' */
  real_T scale1[3];                     /* '<S4>/scale1' */
  real_T get_error_bit;                 /* '<S1>/get error bit' */
  real_T Saturation;                    /* '<S1>/Saturation' */
  real_T TmpHiddenBuffer_Feeding_sfunxy[2]; /* '<S2>/TmpHiddenBuffer_Feeding_sfunxy_AtInput1' */
} BlockIO;

/* Block states (auto storage) for system: '<Root>' */
typedef struct D_Work_tag {
  struct {
    void *LoggedData;
  } To_Workspace3_PWORK;                /* '<Root>/To Workspace3' */
  struct {
    void *LoggedData;
  } cart_1_position_PWORK;              /* '<Root>/cart 1 position' */
  struct {
    void *LoggedData;
  } cart_2_position_PWORK;              /* '<Root>/cart 2 position' */
  struct {
    void *LoggedData;
  } cart_3_position_PWORK;              /* '<Root>/cart 3 position' */
  struct {
    void *LoggedData;
  } pendulum_position_PWORK;            /* '<Root>/pendulum position' */
} D_Work;

/* Parameters (auto storage) */
struct _Parameters {
  real_T S_Function_P1_Size[2];         /* Computed Parameter: P1Size
                                         * '<S3>/S-Function'
                                         */
  real_T S_Function_P1[6];              /* Expression: BaseAddr
                                         * '<S3>/S-Function'
                                         */
  real_T S_Function_P2_Size[2];         /* Computed Parameter: P2Size
                                         * '<S3>/S-Function'
                                         */
  real_T S_Function_P2;                 /* Expression: STime
                                         * '<S3>/S-Function'
                                         */
  real_T S_Function_P3_Size[2];         /* Computed Parameter: P3Size
                                         * '<S3>/S-Function'
                                         */
  real_T S_Function_P3;                 /* Expression: TimeOutPer
                                         * '<S3>/S-Function'
                                         */
  real_T S_Function_P4_Size[2];         /* Computed Parameter: P4Size
                                         * '<S3>/S-Function'
                                         */
  real_T S_Function_P4;                 /* Expression: HWAccess
                                         * '<S3>/S-Function'
                                         */
  real_T get_angles_Gain[5];            /* Expression: [0 0 0 1 0]
                                         * '<S4>/get angles'
                                         */
  real_T scale2_Gain;                   /* Expression: 1/(32*2608)
                                         * '<S4>/scale2'
                                         */
  real_T get_positions_Gain[15];        /* Expression: [1 0 0 0 0; 0 1 0 0 0; 0 0 1 0 0];
                                         * '<S4>/get positions'
                                         */
  real_T scale1_Gain;                   /* Expression: 1/(32*2196)
                                         * '<S4>/scale1'
                                         */
  real_T get_error_bit_Gain[5];         /* Expression: [0 0 0 0 1]
                                         * '<S1>/get error bit'
                                         */
  real_T Dac2_Value_Value;              /* Expression: 0
                                         * '<S1>/Dac2 Value'
                                         */
  real_T Sine_Wave_Amp;                 /* Expression: 0.08
                                         * '<Root>/Sine Wave'
                                         */
  real_T Sine_Wave_Bias;                /* Expression: 0
                                         * '<Root>/Sine Wave'
                                         */
  real_T Sine_Wave_Freq;                /* Expression: 3.00*(2*pi)
                                         * '<Root>/Sine Wave'
                                         */
  real_T Sine_Wave_Phase;               /* Expression: 0
                                         * '<Root>/Sine Wave'
                                         */
  real_T scale_Gain;                    /* Expression: 32*2196
                                         * '<S1>/scale'
                                         */
  real_T Saturation_UpperSat;           /* Expression: 32000
                                         * '<S1>/Saturation'
                                         */
  real_T Saturation_LowerSat;           /* Expression: -32000
                                         * '<S1>/Saturation'
                                         */
};

/* Simulation Structure */
extern SimStruct *const rtS;

extern Parameters rtP;                  /* parameters */

/* External data declarations for dependent source files */

extern BlockIO rtB;                     /* block i/o */
extern D_Work rtDWork;                  /* data type work */

/* 
 * The generated code includes comments that allow you to trace directly 
 * back to the appropriate location in the model.  The basic format
 * is <system>/block_name, where system is the system number (uniquely
 * assigned by Simulink) and block_name is the name of the block.
 *
 * Use the MATLAB hilite_system command to trace the generated code back
 * to the model.  For example,
 *
 * hilite_system('<S3>')    - opens system 3
 * hilite_system('<S3>/Kp') - opens and selects block Kp which resides in S3
 *
 * Here is the system hierarchy for this model
 *
 * '<Root>' : Model210_Openloop
 * '<S1>'   : Model210_Openloop/ECP Model 210
 * '<S2>'   : Model210_Openloop/XY Graph
 * '<S3>'   : Model210_Openloop/ECP Model 210/ECPDSP Driver
 * '<S4>'   : Model210_Openloop/ECP Model 210/Manipulate Data
 */

#endif                                  /* _RTW_HEADER_Model210_Openloop_h_ */
