LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Send Cyclic Can Frame With PCI-8513 Without XNET database

Hello , 

I search code for use PCI-8513 with CVI 2017 without Xnet DB,

I have allready write code for Init / Read / Write 

 

CanHdl NiXnetCanInit(char * Interface,int BaudRate,short Term)

NiXnetCanSend(CanHdl CanSessionHdl,int id,char * Data)

NiXnetCanRecv(CanHdl CanSessionHdl,double TimeOutInSec,int * id,char ** Data)

 

i search how send Cyclic Can Data every n ms , i have try all line below in all conbination without succes

l_pFrame->Type = nxFrameType_Special_Delay;

nxSetProperty(CanSessionHdl.SessionRefOut,nxPropFrm_CANTimingType,sizeof(u8),nxFrmCANTiming_CyclicData);

nxSetProperty(CanSessionHdl.SessionRefOut,nxPropSessionSub_CANTxTime,sizeof(double),(void*)&time);

nxSetProperty(CanSessionHdl.SessionRefOut,nxPropSession_IntfOutStrmTimng,sizeof(u8),nxOutStrmTimng_ReplayExclusive); 

 

Thanks a lot.

0 Kudos
Message 1 of 2
(1,919 Views)

Hi,

 

Just to start off, why don't you want to use an XNET database? XNET is built to refer back to the database, so I would like to know what your reasoning is to not have one.

 

Secondly, if you are able to use a database, it looks like it is fairly simple to do, shown here in the XNET Hardware and Software Manual: http://www.ni.com/pdf/manuals/372840h.pdf#page=701. It looks like you configure it in the database, then use the nxWriteFrame function to change the payload of the cyclic frame.

C. Weeks
Product Support Engineer
NI
0 Kudos
Message 2 of 2
(1,824 Views)