Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

how to use ncwrite

NCTYPE_STATUS Transmission::Write(NCTYPE_OBJH ObjHandle, NCTYPE_UINT32 DataSize, NCTYPE_ANY_P DataPtr)
{ 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;

 return ncWrite(ObjHandle, DataSize, DataPtr);
}

use botton for output data waveform

 ->Write(TxHandle,sizeof(Transmit),&Transmit);

the  result of waveform  is zero. why? or how to write?

0 Kudos
Message 1 of 2
(3,842 Views)

Hi,

The code looks ok for output a single frame with 8 byte data. There could be a lot of reasons why you don't get the frame out.

Try the attached example. There is a second example for output multiple frames. That should be more applicable to output a waveform.

DirkW

0 Kudos
Message 2 of 2
(3,833 Views)