Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

ncwrite

 use PCI-CAN Series2 transmit CAN Frame:
My  configure is following:
NCTYPE_STATUS CTransmitView::Write(NCTYPE_OBJH ObjHandle, NCTYPE_UINT32 DataSize, NCTYPE_ANY_P DataPtr)
 {   Transmit.IsRemote = 0;
 Transmit.ArbitrationId = 0x04; 
 Transmit.DataLength = 8;
 Transmit.Data[0] = 0x55;
 Transmit.Data[1] = 0x55;
 Transmit.Data[2] = 0x55;
 Transmit.Data[3] = 0x55;
 Transmit.Data[4] = 0x55;
 Transmit.Data[5] = 0x55;
 Transmit.Data[6] = 0x55;
 Transmit.Data[7] = 0x55;
 
  Status= ncWrite(TxHandle, sizeof(Transmit), &Transmit);   
    if (Status < 0)
    {
    PrintStat(Status, "ncWrite");
    } 
 
}
 
Use Button to transmit:
Transmit Program-> Write(TxHandle,sizeof(Transmit),&Transmit);
Why? only display ID and Data?
I need to traansmit complete frame include start of bit...Data....DataLength.....ID.....?
 
0 Kudos
Message 1 of 3
(4,365 Views)

Hi,

The write net allows you to change ID, DataBytes, DataLength and the Remote Flag. That's it. Everything else is automatically handled by the driver.

DirkW

0 Kudos
Message 2 of 3
(4,361 Views)

I has been know. Thanks

But according my describe, only transmit out ID and DataLength.

why not have Data?

Use Write(TxHandle,sizeof(Transmit),&Transmit) to output.

The program code  of  Write(TxHandle,sizeof(Transmit),&Transmit) is error or ncConfig isn't configure complete? 

 

0 Kudos
Message 3 of 3
(4,353 Views)