02-05-2010 08:43 AM
Hello everyone,
I'm get in stuck. I'm currently programming CAN interface for a transmission using PXI, Channel API and a .dbc file.
CAN configuration based on .dbc file is downloaded to PXI by MAX.
The problem is that it receives 0 for all the values by Channel API based program (Attached file), though it seems receiving meaningful data when I check raw data by Frame API based program.
Baudrate, CAN port, and .dbc file are correct.
thanks!
03-04-2010 04:51 AM
Hi Yuta
What I am expecting is that the sample rate is being set to high. When using the multiple channel - single sample instance of the CAN read vi, it will return a single sample for every period. The number of samples to read input is actually ignored and it will return a single sample for every channel specified. Therefore, if no data has been received within the sample period specified with the sample rate, it will return the default value as specified in the database file.
Due to the high sample rate, it might be that data is being received, but aren't visible on screen since they are quickly being overwritten by new (default) data. I suggest trying to use the Multiple Channels - Multiple Samples instance of the CAN Read vi to see if you receive values in this case. Or you could try lowering the sample speed (note that sample rate is not the same as CAN baud rate).
Also, make sure you are properly reading the data already in MAX's test panel as this would indicate if the database file is loaded properly.
03-18-2010 08:45 AM
Hi Yuta
Did you find a solution to your CAN problem?