Jump to content
  • 0

Sniff FDCAN with the Waveforms SDK


Marco_s_indiotech

Question

Hi everyone,

I'm trying to sniff the FDCAN with the Digilent SDK, using Python. My HW connections are:

- microcontroller that sends data over CAN to the Analog Discovery 2 

- Analog Discovery 2 connected to PC

 

I found the example "Digital_Can.py" in the SDK installation folder and I am able to use it without problems. For example, if from the microcontroller I send 8 bytes in CLASSIC CAN, e.g. 0xAA 0xBB 0xCC 0xDD 0xEE 0xFF 0xAB 0xAC I can correctly receive it in my Python code using the FDwfDigitalCanRx function, and all works fine. 

But if I send more than 8 bytes from the microcontroller using FDCAN, I can't receive the data correctly. I searched in the SDK Reference Manual but I didn't find an answer.

So my question is:

- is it possible to sniff FDCAN message with the Waveforms SDK, with a function like FDwfDigitalCanRx but for FDCAN?

I have already used the Waveforms GUI with the Protocol and Scripts tools and here I am able to read both CAN and FDCAN message, but I'd like to read FDCAN message with a custom code using the SDK.

 

Thanks in advance,

Marco

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Thanks for the answer, do you think that the API will include the FDCAN support in the following releases?

I noticed that in the Script tool I can debug FDCAN with the Protocol CAN example with the function "Protocol.CAN.Receive()". With this function I have in the array variable v the received data from CAN (or FDCAN). I don't understand which is the programming language of the script.

For example if I receive from CAN the bytes [102, 102, 14, 66] (corresponding to the bytes representation of float 35.6) I can correctly read these bytes with the Protocol.CAN.Receive() function and put them in the array variable v. Now how can I convert these bytes into a float number (35.6) with the script programming language? I didn't find the documentation of this programming language. 

 

Thanks in advance,

Marco

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...