Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-CAN Channel with no data

I have an application where the customer is sort of using can protocol.  They are actually embedding commands into the arbitration ID, so sometimes I am just sending an arbitration ID and no data.  Is it possible to create a CAN channel in MAX that is actually not sending data?  Take for instance, I would like to send the arbitration ID 0x22000A06 (which includes the extended ID bit set).  This arbitration ID has a command in it that tells the controller to send back an ID.  The controller is not expecting any data to follow the arbitration ID and will give an error if any data is received.  Is it possible to set up a message that will send the arbitration ID and nothing else?  This way I can read the port and get the response. 

 

Everything works fine if I do this using the frame API.  I'm looking to do this using the channel API since this is a little easier integrating with TestStand and CVI.

0 Kudos
Message 1 of 4
(6,624 Views)

Hey Rabbi1019,

 

What error do you see exactly when you try to read the ArbID with no data appended to it?  I'm not sure off the top of my head how we can get this work successfully but I'm looking into it.

 

Thanks,

David Pratt
Group Manager for Application Engineering Specialists | Automated Test
NIC
0 Kudos
Message 2 of 4
(6,613 Views)
It's not that I get an error.  When I set up a message in MAX, there is no way to send the message without a data channel, that I know of.  If I create a channel within a message, MAX does not like it since I'm specifying 0 bytes of data in my message.  If I specify a channel to write within LabVIEW, would it just send the message and 0 bytes of data, even though MAX gives me an error?  A sample .ncd file is attached.
0 Kudos
Message 3 of 4
(6,610 Views)

Hi Rabbi1019

 

Are your devices not able to handle CAN channels with a minimum of 1 byte with 0 values in the data?  What happens if your channels have data but the data is extraneous or bogus?  To address your second point, I don't believe LabVIEW will accept 0 as a parameter for the number of data bytes.

 

Message Edited by David P. on 02-26-2009 03:58 PM
David Pratt
Group Manager for Application Engineering Specialists | Automated Test
NIC
0 Kudos
Message 4 of 4
(6,600 Views)