ESE447_82515.c - ESE447_82515.c Code generation for...

This preview shows page 1 - 3 out of 6 pages.

/* * ESE447_82515.c * * Code generation for model "ESE447_82515". * * Model version : 1.2 * Simulink Coder version : 8.3 (R2012b) 20-Jul-2012 * C source code generated on : Thu Aug 27 16:14:32 2015 * * Target selection: quarc_win64.tlc * Note: GRT includes extra infrastructure and instrumentation for prototyping * Embedded hardware selection: 32-bit Generic * Code generation objectives: Unspecified * Validation result: Not run */ #include "ESE447_82515.h" #include "ESE447_82515_private.h" #include "ESE447_82515_dt.h" /* Block signals (auto storage) */ BlockIO_ESE447_82515 ESE447_82515_B; /* Block states (auto storage) */ D_Work_ESE447_82515 ESE447_82515_DWork; /* Real-time model */ RT_MODEL_ESE447_82515 ESE447_82515_M_; RT_MODEL_ESE447_82515 *const ESE447_82515_M = &ESE447_82515_M_; /* Model step function */ void ESE447_82515_step(void) { /* local block i/o variables */ real_T rtb_HILReadEncoder1_o2; /* S-Function (hil_read_encoder_block): '<Root>/HIL Read Encoder1' */ /* S-Function Block: ESE447_82515/HIL Read Encoder1 (hil_read_encoder_block) */ { t_error result = hil_read_encoder(ESE447_82515_DWork.HILInitialize_Card, ESE447_82515_P.HILReadEncoder1_Channels, 2, &ESE447_82515_DWork.HILReadEncoder1_Buffer[0]); if (result < 0) { msg_get_error_messageA(NULL, result, _rt_error_message, sizeof (_rt_error_message)); rtmSetErrorStatus(ESE447_82515_M, _rt_error_message); } else { ESE447_82515_B.HILReadEncoder1_o1 = ESE447_82515_DWork.HILReadEncoder1_Buffer[0]; rtb_HILReadEncoder1_o2 = ESE447_82515_DWork.HILReadEncoder1_Buffer[1]; } } /* Product: '<Root>/Divide' incorporates: * Constant: '<Root>/Constant' */ ESE447_82515_B.Divide = ESE447_82515_P.Constant_Value / ESE447_82515_B.HILReadEncoder1_o1; /* External mode */ rtExtModeUploadCheckTrigger(1); { /* Sample time: [0.002s, 0.0s] */
Image of page 1

Subscribe to view the full document.

rtExtModeUpload(0, ESE447_82515_M->Timing.taskTime0); } /* signal main to stop simulation */ { /* Sample time: [0.002s, 0.0s] */ if ((rtmGetTFinal(ESE447_82515_M)!=-1) && !((rtmGetTFinal(ESE447_82515_M)-ESE447_82515_M->Timing.taskTime0) > ESE447_82515_M->Timing.taskTime0 * (DBL_EPSILON))) { rtmSetErrorStatus(ESE447_82515_M, "Simulation finished"); } if (rtmGetStopRequested(ESE447_82515_M)) { rtmSetErrorStatus(ESE447_82515_M, "Simulation finished"); } } /* Update absolute time for base rate */ /* The "clockTick0" counts the number of times the code of this task has * been executed. The absolute time is the multiplication of "clockTick0" * and "Timing.stepSize0". Size of "clockTick0" ensures timer will not * overflow during the application lifespan selected. * Timer of this task consists of two 32 bit unsigned integers.
Image of page 2
Image of page 3
  • Spring '10
  • Articles with example C code

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern