04-02-2008 05:38 AM
I tried to open a Vector CAN Database (*.dbc) and wanted to transmit the message of the database ,but I do not know how to achieve it ? I want to send the messages of Vector CAN Database (.dbc file) out through the hardware( PXI-8464) of NI device. What confused me now is that I do not know how to read the message of the .dbc file after improting it into labview, also I do not know use what kind of tools to control the progress of reading and sending. Because some part of the .dbc file is blank and needed to be filled from the Labview front pannel , so the connection between the control (on the front pannel)and the .dbc file has to be setup, further more, I do not know how to make that out . For example,if a message in the .dbc file has a value table for a message, such as message 'SwitchStatus' that shows a 0 = open and 1 = closed, is there a way to read this value table into Labview and send it to the hardware( PXI-8464) of NI device.
04-09-2008 01:36 PM
You could import your DBC file into MAX>>Data Neighborhood>>CAN Channels. Then you could fill in the missing parts and drag the channel names to the Channel List Control for one of the LabVIEW Channel API Examples. See the NI-CAN Manual installing with the driver for more details.
DirkW
04-09-2008 08:24 PM
Hi
Thank you for your help.Now I want to modify the data bit of the CANdb file through the pannel control ,but wo do not know use which control to achieve it.
Look forward to your reply.
vivian
04-10-2008 09:34 AM
If i understand your question correctly, you would like to modify data bits of a CAN db signal? There is actualy no need to modify bits if you work with the NI-CAN channel api.
Just create the channel list array from Channels you like to write and apply an array of double values to the write function to write physical values. The driver converts this values to data bytes as defined in your DB file.
DirkW
04-10-2008 07:54 PM - edited 04-10-2008 07:56 PM
04-11-2008 08:37 AM
The NI-CAN driver brings examples for writing channels. If you need a specific example for your DB file, i would need the db file.
DirkW
04-14-2008 09:30 PM
04-15-2008 09:03 AM
Hi,
Your DBC file had two three errors. The firs problem was the ID for your first Message "VECTOR__INDEPENDENT_SIG_MSG" The ID was out of range so our driver was allways importing a 0 as ID. The second problem was that this message has a channel assigned but the file was indicating that it has no channel assigned. The third problem was that you had two channels with the same name in different messages. I corrected all the problems and the writes 0x50 to two channels of two different messages. use the Bus Monitor to see the values.
DirkW
04-22-2008 03:26 AM
Hi
I have tried it according to your help, but the message can not be recieved by CANoe. WHY?
Look forward to your reply.
Regards
Vivian