After doing a heap of googling im getting more confussed as ever.
What i want to understand is the way the
[code:1:f0e7d456bb]Config Canmob = 0 , Bitlen = 11 , Idtag = &H0120 , Idmask = &H0120 , Msgobject = Receive , Msglen = 1 , Autoreply = Disabled 'first mob is used for receiving data [/code:1:f0e7d456bb]
works. I've read the help on the Conf Canmob in the help section
And the first example confuses the crap out of me
[quote:f0e7d456bb]
Example 1: you only want to filter ID &H0317. In this case you set the IDTAG to &H317. The IDMASK need to be set to &HFFFF in this case. A '1' for a bit in IDMASK means that the corresponding '1' in IDTAG is checked. When set a bit in IDMASK to '0' it means the corresponding bit in IDTAG can have any value.
Full filtering: to accept only ID = 0x317 in part A.
- ID MSK = 111 1111 1111 b
- ID TAG = 011 0001 0111 b
[/quote:f0e7d456bb]
Why is the ID mask set to &HFFFF when we are dealing with a 11bit flag not a 16 bit one??
Why do we set the ID tag. Doesn't the incoming transmission incl the ID tag of the node that the data has been sent from?? ( i could be way wrong in new at this stuff)
in the example on the Config canbus help page. I have changed the ID mask to Idmask = &H0121 but the data keeps coming in from the Node with &H120 ID
so the layout would be like this
-ID MSK = 00100100001
-ID TAG = 00100100000
Thinking the ID MSK does not have a Complementary bit set in the ID TAG so it would be filtered out.
I dont understand the way it works.
My understanding is if the bit in the IDTAG is set and the Complementary one in the IDMSK is set it is a valid node to listen to, but this is not right by the looks.
Could someone help me out please
Thanks
Snow
[b:f0e7d456bb][color=red:f0e7d456bb](BASCOM-AVR version : 2.0.7.6 )[/b:f0e7d456bb][/color:f0e7d456bb]
↧