Home > Software engineering >  MFC easyarm CAN issue
MFC easyarm CAN issue

Time:10-03

A MFC programming with spontaneous since the test code, defines the frame ID FFFFFFFF, display ID always received 1 FFFFFFFF, relevant code below
Define the ID
If (frameinfo ExternFlag==1)//extension frames
{
Sscanf (m_EditSendFrmID, "% x" 08, & amp; n);
Frameinfo. ID=n;
}

Read ID with program
Len=VCI_Receive (DLG - & gt; M_devtype, DLG - & gt; M_devind, DLG - & gt; M_cannum frameinfo, 50200);
.
TMPSTR. The Format (" frame ID: % x "08, frameinfo [I] ID);
STR +=TMPSTR;
.

CodePudding user response:

How ID defined? Have more than 1 _ffff_ffff 32 bit?

CodePudding user response:

reference 1st floor zgl7903 response:
define ID? Have more than 1 _ffff_ffff 32 bit?

User manual said frame ID is a 32-bit UINT variable
When I start set the ID to 8 f, adopts the model of spontaneous since closed, received the ID of the display for a 1 + 7 f, don't know where is the problem,

CodePudding user response:

Debugging and running
to set breakpointsSTR +=TMPSTR; If there's any content//STR before?

CodePudding user response:

The
reference 3 floor zgl7903 response:

the breakpoint debugging is runSTR +=TMPSTR; If there's any content//STR before?

Before the STR: STR="received CAN frame:";

In addition to set breakpoints displayed when one or more breakpoints always be set and have had been disabled. The Execution will stop at the begginning f the
The program. Cry ha ha

CodePudding user response:

Breakpoints can only be set where there is corresponding to the assembly instruction,
  • Related