Click here to Skip to main content
15,064,485 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionWhat is makegetstatuscmd() command function? Pin
Md Mubdiul Hasan 30-Aug-21 14:09
MemberMd Mubdiul Hasan 30-Aug-21 14:09 
AnswerRe: What is makegetstatuscmd() command function? Pin
_Flaviu30-Aug-21 21:32
Member_Flaviu30-Aug-21 21:32 
GeneralRe: What is makegetstatuscmd() command function? Pin
Md Mubdiul Hasan 30-Aug-21 22:47
MemberMd Mubdiul Hasan 30-Aug-21 22:47 
GeneralRe: What is makegetstatuscmd() command function? Pin
jeron131-Aug-21 4:33
Memberjeron131-Aug-21 4:33 
GeneralRe: What is makegetstatuscmd() command function? Pin
Md Mubdiul Hasan 31-Aug-21 13:48
MemberMd Mubdiul Hasan 31-Aug-21 13:48 
GeneralRe: What is makegetstatuscmd() command function? Pin
jeron11-Sep-21 4:03
Memberjeron11-Sep-21 4:03 
GeneralRe: What is makegetstatuscmd() command function? Pin
Md Mubdiul Hasan 1-Sep-21 16:39
MemberMd Mubdiul Hasan 1-Sep-21 16:39 
QuestionRequirements of display filtering in power electronics data Pin
Md Mubdiul Hasan 19-Aug-21 19:42
MemberMd Mubdiul Hasan 19-Aug-21 19:42 
I am trying to debug a complex firmware CCS V.5 program with compiler V.6.0.2. My control code has access with a PC program. All registers of my application is customized. My goal is to display particular channel voltage, but logically mathematical code should be understand. Here we go

void DispFiltering1(void)
{
    float       k;
    float in_data;

    ///////////////////////////////////////////////////////////////////
    in_data = Register[CH1_VOLTAGE] * 1000 - Vfilt_16;
    dVfilt_16 = in_data + (dVfilt_16 * 0.5f);
    idvfilt_16 += dVfilt_16;

    k = (int)(idvfilt_16 * timeconst_inverse_16);
    idvfilt_16 -= k * timeconst_16;


    if(k < -slewrate_16) Vfilt_16 -= slewrate_16;
    else if(k > slewrate_16) Vfilt_16 += slewrate_16;
    else Vfilt_16 += k;

    Register[DISP_CH1_VOLTAGE] = Vfilt_16 * 0.001;

    ///////////////////////////////////////////////////////////////////
    in_data = Register[CH1_CURRENT] * 1000 - Vfilt_17;
    dVfilt_17= in_data + (dVfilt_17 * 0.5f);
    idvfilt_17 += dVfilt_17;

    k = (int)(idvfilt_17 * timeconst_inverse_17);
    idvfilt_17 -= k * timeconst_17;


    if(k < -slewrate_17) Vfilt_17 -= slewrate_17;
    else if(k > slewrate_17) Vfilt_17 += slewrate_17;
    else Vfilt_17 += k;

    Register[DISP_CH1_CURRENT] = Vfilt_17 * 0.001;
}



I will be happy if you can explain why filtering, slewrate and time constant is necessary here? Discuss kindly.
AnswerRe: Requirements of display filtering in power electronics data Pin
Richard MacCutchan19-Aug-21 21:33
mveRichard MacCutchan19-Aug-21 21:33 
AnswerRe: Requirements of display filtering in power electronics data Pin
11917640 Member 22-Aug-21 4:33
Member11917640 Member 22-Aug-21 4:33 
GeneralRe: Requirements of display filtering in power electronics data Pin
Md Mubdiul Hasan 22-Aug-21 15:12
MemberMd Mubdiul Hasan 22-Aug-21 15:12 
QuestionImplementing a mathematical PI control for a reasonable "if" structure Pin
Md Mubdiul Hasan 18-Aug-21 18:37
MemberMd Mubdiul Hasan 18-Aug-21 18:37 
AnswerRe: Implementing a mathematical PI control for a reasonable "if" structure Pin
markkuk18-Aug-21 20:18
Membermarkkuk18-Aug-21 20:18 
GeneralRe: Implementing a mathematical PI control for a reasonable "if" structure Pin
Md Mubdiul Hasan 18-Aug-21 20:46
MemberMd Mubdiul Hasan 18-Aug-21 20:46 
AnswerRe: Implementing a mathematical PI control for a reasonable "if" structure Pin
Richard MacCutchan18-Aug-21 22:19
mveRichard MacCutchan18-Aug-21 22:19 
QuestionHandling KeyBoard messages/accelerators handling in MFC dialog based applications Pin
ForNow30-Jul-21 4:07
MemberForNow30-Jul-21 4:07 
AnswerRe: Handling KeyBoard messages/accelerators handling in MFC dialog based applications Pin
Graham Breach30-Jul-21 4:40
MemberGraham Breach30-Jul-21 4:40 
GeneralRe: Handling KeyBoard messages/accelerators handling in MFC dialog based applications Pin
ForNow30-Jul-21 5:59
MemberForNow30-Jul-21 5:59 
GeneralRe: Handling KeyBoard messages/accelerators handling in MFC dialog based applications Pin
Graham Breach30-Jul-21 6:29
MemberGraham Breach30-Jul-21 6:29 
GeneralRe: Handling KeyBoard messages/accelerators handling in MFC dialog based applications Pin
ForNow30-Jul-21 7:23
MemberForNow30-Jul-21 7:23 
GeneralRe: Handling KeyBoard messages/accelerators handling in MFC dialog based applications Pin
Graham Breach30-Jul-21 8:17
MemberGraham Breach30-Jul-21 8:17 
GeneralRe: Handling KeyBoard messages/accelerators handling in MFC dialog based applications Pin
ForNow30-Jul-21 8:28
MemberForNow30-Jul-21 8:28 
GeneralRe: Handling KeyBoard messages/accelerators handling in MFC dialog based applications Pin
Graham Breach30-Jul-21 8:49
MemberGraham Breach30-Jul-21 8:49 
AnswerRe: Handling KeyBoard messages/accelerators handling in MFC dialog based applications Pin
Richard MacCutchan30-Jul-21 4:56
mveRichard MacCutchan30-Jul-21 4:56 
GeneralRe: Handling KeyBoard messages/accelerators handling in MFC dialog based applications Pin
ForNow30-Jul-21 5:11
MemberForNow30-Jul-21 5:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.