Jump to content

Ric

Members
  • Content count

    7
  • Joined

  • Last visited

Everything posted by Ric

  1. Hi Trido, I'm attaching some information explaining how to setup and use the Embed SPI, you will need to modify it to fit your communication constraints. Ric SPI_RK.pdf
  2. Ric

    Licensing for Altair Embed Basic

    Hi Jason S., Yes, Altair Embed Basic can be used for professional applications at your job. Ric
  3. Ric

    cycle instead of time based calculation

    You would need to use a discrete feedback system to solve this problem. In the model (below), your equation is implemented as; WF = WF_PreviousValue + AWA – SOA You need to specify the initial value of WF_PreviousValue on the first pass of the simulation. I have used the variable WF_Initial_Value (below) for this , you will need to assign it a value.
  4. I want to create two pwm signals with the same duty cycle but one having a phase offset from the other
  5. Attached is a model that will allow you to adjust the phase lag between PWM1A and PWM2A on a F28069M launchpad. First generate code from the compound block entitled "PWM Phase Control" located in the "PWM with PhaseShiftv2.vsm" source model. Next, open the model "PWM with PhaseShiftv2-d.vsm", make sure the target interface block is pointing to the ".out" file you created in the first step, and run it. You will be able to adjust the duty cycle fraction as well as the phase angle fraction using the sliders. PWM with Phase Shiftv2.vsm PWM with Phase Shiftv2-d.vsm
  6. Ric

    Implementing while and for loop

    Hi Nit, I'm attaching an example model that shows you one approach to creating a "For" loop and a "While" loop using Embed compound blocks. Ric While and For Loops.vsm
  7. Ric

    Discrete Transfer Function Problem

    Hi Joshep, You need to be careful when using discrete transfer functions. The values to the right of the decimal are very important, if you truncate them you can get significantly different results. I applied the "reg" signal created from the two "Bezier" blocks to three transfer functions; 1. The transfer function typed into this correspondance (red) 2. The transfer function from your .vsm model executed on a 64 bit computer (blue) 3. Same as 2. but executed on a 32 bit computer (green) On the traces below, you'll see how important it is not to truncate coefficients by comparing the red response with either the blue or green. The blue response is the correct response. If you had codegen'd the transfer function and run that code on a 32 bit microcontroller, you'd get the green response which clearly has some noise problems. I've also attached the model used to generate these responses. Ric ComparisonPlots.vsm
×