FORUM TOPIC · READ ONLY

Simulink to dspic

Simulink to dspic

Forum : Advanced Simulink & RTW Questions

2 message(s) · archive en lecture seule

ELMAY
Hi Lubin,



This is a model of a PWM rectifier in simulink I want to translate Blokset / MATLAB to program a dsPIC 30F4011 to Implement

But when I reflected I do not find output to the terminal dsPIC knowing that input is a sine wave and ferquence 50 hz

Can you help me about this problem?



thanks



Elmay

Pièce jointe : model_PWM.mdl

Pièce jointe : model_PWM_dspic.mdl

LubinKerhuel

Re: Simulink to dspic

Hi Elmay,



I do not understand what your model is supposed to do.

The input capture Up signal connected to a boolean data type conversion will provide you 1 until the Up period of the input signal is not 0.

you might use the rising edge detection of this block. In the input capture block, you might set the "Change Detected on" option to 1 for rising edge (see block dialog box).



You might also use only one block PWM_motor. Select three channels output. (output channel will be [1 2 3] )



Lubin