Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

automotive diagnostic command set and periodic messages on same can port - CVI

Hello everybody,

 

Is it possible, using Labwindows / CVI, to use NI AutomotiveDiagnostic Command Set to communicate with a MCU with KWP2000 protocol and simultaneously  send periodic CAN messages on the SAME CAN interface (CAN0 or else ) and also using this port port to do some CCP communication ?

 

Thank for your support.

0 Kudos
Message 1 of 7
(9,521 Views)

Hi

unfortunately the CAN toolkits like ADCS (Automotive Diagnostic Command Set) and ECU MC (ECU Measurement and Calibration Toolkit) cannot share an interface/port. So yes if you have the use case to run in parallel

- CAN frame IO

- ECUMC

- ADCS

you need at least 3 ports in your system. Hope this helps.

 

- Roland

0 Kudos
Message 2 of 7
(9,508 Views)

This appears to be only somewhat true.  We have gotten the ADCS to run a UDS session with an ECU, to send and recieve packets, and simultaneously transmitted CAN frames with the NI CAN Frame API, on the same physical port.  The Channel API does not want to work with ADCS on the same port at all... as it throws the usual 'cannot use frame and channel API at the same time' error.  Recent attempts to use Frame API to read data with an ADCS connection don;t seem to work on the same port.

 

Funny that none of this is documented anywhere I have found?  Seems like a pretty important 'gotcha'.

0 Kudos
Message 3 of 7
(8,878 Views)

I know this thread is old... but we have also needed to read frames on the same physical CAN port that we are also running UDS on, using the ADCT.  While we can write frames using standard NI Frame API, we cannot read frames using channel api.  We did find a way though.  We had to create 'dummy' Diagnostic sessions for the arb id's we wanted to read, then use a low level frame read subvi found deep in the ADCT call chain.

 

This is a bit 'hacky', but works fine.  We went a step further and pushed those frames we read from the physical port back through the virtual CAN ports to convert them to channels in a CAN DB file.  Worked pretty well once you find all the hoops that needed to be jumped through.

0 Kudos
Message 4 of 7
(8,877 Views)

Hi,

 

I find myself also in this position.  My current project only has LabVIEW 2009 and the ADCS from a few years back available to use.

 

We want to be able to:

 - read in a CANDB file (.dbc) into the Channel API, to send general CAN messages (note you cannot use the Frame API to read in the dbc files unfortunately)

 - using the same CAN interface, use the ADCS to perform diagnostics activities

 

Can you please elaborate on some of the hoops, and how long it might take?  If its too much of a hack, a third CAN port might be the easier option.

 

Any light shed would be appreciated.

Christopher Farmer

Certified LabVIEW Architect and LabVIEW Champion
DQMH Trusted Advisor
https://wiredinsoftware.com.au

0 Kudos
Message 5 of 7
(7,988 Views)

Apparently the ADCS uses the same back end as the Frame API, so they can both work together at the same time.  To have the ability to read a database, I can use the Frame to Channel Conversion Library, and the virtual interface to convert the channels I can read in from the DBC and virtually transmit them to the Frame API to then be used in conjunction with the ADCS.  Sounds good in theory.  I'l give it a go...

Christopher Farmer

Certified LabVIEW Architect and LabVIEW Champion
DQMH Trusted Advisor
https://wiredinsoftware.com.au

0 Kudos
Message 6 of 7
(7,904 Views)

I have ended up implementing exactly the same thing.  I contacted NI to see what was possible first, but learnt that there is no way of combining ADCS with the Frame API on the same port, at the same time. 

 

So in the end, I am using the Frame API to communicate with the CAN ports. I am using the Channel API to read the ncd files, and then using the Frame to Channel Conversion Library to convert to/from Frame API.  Also, I have edited the lowest levels of the ADCS so that I bypass the DLL that it normally calls, and instead uses the Objects I have opened already in the Frame API.  So under the hood its complicated, but it works well.

Christopher Farmer

Certified LabVIEW Architect and LabVIEW Champion
DQMH Trusted Advisor
https://wiredinsoftware.com.au

0 Kudos
Message 7 of 7
(7,622 Views)