Quantcast
Channel: LabWindows/CVI topics
Viewing all articles
Browse latest Browse all 5355

How to read back CAN session Arbitration ID from NI PCI-8513 XNET database

$
0
0

I am using NI CAN controller PCI-8513 with XNET database. Database setup can be seen in the picture below

I am able to read CAN  session name by using the following code in LabWindows CVI. 

 

When returned, PropList = "PID_Write_ECU1". Now I want to get the arbitration ID (0x712). How can it be done? Help please

 

uint32_t propertySize;
uint8_t PropList[100];
uint8_t DatabaseName[100];
nxDatabaseRef_t DatabaseRef;
uint32_t ArbID;
nxStatus_t nx_status;

char CAN_DB_FilePath[100] = "C:\\temp\\XNET_Database.xml";
nx_status = nxCreateSession (CAN_DB_FilePath, "CANA", "PID_Write_ECU1","CAN1", nxMode_FrameOutSinglePoint, &PID_Write_ECU1); // 0x712

nxGetPropertySize (PID_Write_ECU1, nxPropSession_List, &propertySize); 
nxGetProperty(PID_Write_ECU1, nxPropSession_List, propertySize, PropList);

 

nx_status = nxClear (PID_Write_ECU1); 

 

 

XNET Database.png


Viewing all articles
Browse latest Browse all 5355

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>