Discussion:
How can I send the messages in the CANdb file to the hardware(PXI-8464)?
(too old to reply)
amulsw
2008-04-02 10:40:11 UTC
Permalink
        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.
DirkW
2008-04-09 18:40:06 UTC
Permalink
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
Weihua Cao
2008-04-10 01:40:05 UTC
Permalink
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
DirkW
2008-04-10 14:40:11 UTC
Permalink
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
Weihua Cao
2008-04-11 01:10:07 UTC
Permalink
Hi
I understand what you mean,I also use the write control to write datas ,but the value of the  CAN message is the default value which are zero.I am a beginner of LABVIEW. If you can send  a example about my confused, you will do my  great favor. Look forward to your reply.
My email: <a href="mailto:***@yahoo.cn" target="_blank"> ***@yahoo.cn</a>
&nbsp;
&nbsp;
good luck
&nbsp;
&nbsp;
&nbsp;
vivianMessage Edited by Weihua Cao on 04-10-2008 07:56 PM
DirkW
2008-04-11 13:40:06 UTC
Permalink
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
Weihua Cao
2008-04-15 02:40:06 UTC
Permalink
Thank you for your help. Here is a dbc file. If you get it, please sent the example to my email: ***@yahoo.cn


gagagaga.dbc:
http://forums.ni.com/attachments/ni/30/3338/1/gagagaga.dbc
DirkW
2008-04-15 14:10:07 UTC
Permalink
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


GaGaGood.zip:
http://forums.ni.com/attachments/ni/30/3339/1/GaGaGood.zip
Weihua Cao
2008-04-22 08:40:06 UTC
Permalink
Hi

&nbsp;

I have tried it according to your help, but the message can not be recieved by CANoe. WHY?

Look forward to your reply.

&nbsp;

&nbsp;

Regards

&nbsp;

Vivian

&nbsp;

Loading...