PLUS+1 Software > Communication

custom J1939 RX no source

(1/3) > >>

pinias:
Hey guys,

Does anyone have try to receive a J1939 PGN with a standard CAN RX component but setting a no source?

for Instance, lets say you have can id RX 0X18FEFF31 where the 31 is the source, how can I set donĀ“t care about source?



the danfoss blocks comes with that feature but they do not have all the blocks you may need, I wonder what is the trick for that

Thanks

spittet:
If you are using the blocks form the "J1939 FB Library", simply set the "Use Source" at False and set the "Source" at "0".

If you are using a standard CAN receiver block, then I would use the "Receive CAN with ID mask" block. I would set the mask as "0xFFFFFF00" and I would set the ID as "0x18FEFF31".

Sam

FluidPowerTom:
Exactly as mentioned above.  If you want to understand more about what's going on there I'd recommend reading up on 'logical masking' assuming you already are comfortable with binary.

pinias:
Thanks for the hint guys,

I will do the reading for " logical masking" and I will do a try as Spittet describes with the Receive CAN ID with ID mask

Thanks again.

pinias:
alright one more question.

if the same PGN is broadcasted by the ECM and the VCU, but the one from the ECM has no data or it is FF and the one from the VCU is the one with the data what is going to happen?

I will be getting both messages, correct? so basically I will need some kind of logic to keep the valid data and ignore the invalid data, am I correct?

Navigation

[0] Message Index

[#] Next page

Go to full version