Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Why does my card only send two of my eight data bytes?

Hello again!
 
I am a absolute freshman and do not know anything about signals&CO. I need to send a DATA FRAME whith the following entities:
Arbitration ID:
107C8001
 
- Databytes: 8
 
-DATA: 1 0 0 4 0 0 0 0
 
for this frame i manipulated an example, that is attached.
If i run this .vi the read data frame does not fit to the written frame. Even if i monitor the bits only the two last bits fit to the bytes i expect to see.
For better controlling i tried to send only "255" bytes, "0" bytes, and other variants, but there always apear the two last bytes  as demanded. Between those and the dlc I always see the same bitstring (bitstuffing is removed): 0100 0100 0000 0000 1100 0000 0011 1110 0000 1000 0000 0000
 
Is there an extra field that is not described in the standards between DLC and DATA BYTES?
 
There is another question i have to ask:
My opponent CAN device does not answer the usual way. It modifies the arbitration ID and sends back its own Information string. I think it does not sent a changed string so i like to switch of the ACK is that possible?
 
Thanks for reading this post, and if you CAN, please help me!
 
RT
0 Kudos
Message 1 of 2
(3,801 Views)

Hi,

well i had a look to your code and noticed a couple of mistakes you made.

1. You created an object but used the write net function. If you create and open an object, you should use the write and read object functions only.

2. You used the read object and a wait for state (0x8), what means, you are waiting for multiple frames to arrive. The read object can only read a single frame and the wait with 0x8 works only if you confiogure the number of frames to wait for using a set attribute function.

I changed your VI to write the extended frame using the write net  and using the object to read a single frame.

Perhaps i can help you more if you explain, what you would like to have. Try to explain as many details as possible.

DirkW

0 Kudos
Message 2 of 2
(3,784 Views)