I could not get the FilterMessages to work correctly with my code, so I tried to use the example code to test it out and see if I was doing something wrong. When I used the example code, it also did not filter messages.
I initialized the CAN, then closed the message filter, then customized the message filter to accept only one ID (From and To are the same ID), and then I read the messages manually and none of them had the ID I filtered for.
I attached the log to demonstrate the issue. Am I missing something?
- (5.12 KiB) Downloaded 211 times
But the documentation says exactly the opposite:
Please guys update the documentation to include this. It would save a lot of time.Take in account that configuring the message filter cause the CAN controller to enter the Reset state. This will affect other applications that communicate with the same PCAN hardware.
please don't mixup apples and pears. The user amyers wanted to clear the message queues of a connection. This is done using the function CAN_Reset() as stated in the help:
Now, you are here quoting a remark of the function CAN_FilterMessages, which configures the acceptance mask and code registers of the CAN controller. As the help states, this causes the CAN controller to enter the "Reset state" (it has nothing to do with the CAN_Reset function, but with the behavior in the CAN controller). What do you mean with"Resets the receive and transmit queues of a PCAN Channel."
The only thing that is not correct is that the word "Reset" from "Reset state" was automatically interpreted by the help compiler as a link to the CAN_Reset function, what is wrong. This was already fixed and will be available by the next release of the library.