Hello,
I'm developing my first NI-CAN application under Windows XP and NT), using VC++ 6.0, and NI-CAN v1.6.
I only need to receive CAN frames, I do not transmit.
I use several Arbitration IDs. Packets with some IDs are transmitted periodically at quite a high rate(baudrate 250kb/sek), while other IDs are used for bursts of some houndred packets at full speed, then nothing for several seconds. Yet other IDs are used for single, unsolicited packets.
It's the bursts and the unsolicited single packets I am going to use.
I experience problems if I enable reception of more than one Arbitration ID.
I use separate CAN objects for each arbitration ID.
There is a single callback function, that is connec
ted to all CAN objects by a call to ncCreateNotification for each CAN object.
I have tried setting NC_ATTR_PERIOD in the CAN objects to both zero(Disable) and e.g 1000 (1 second), but I cannot see that this really does any difference, as the timeout period that I experience, is set by the parameter to the ncCreateNotification.
However, I see that if I use one single ArbID (And one CAN object), I receive the frames as I expect.
If I enable more ArbIDs (by creating more CAN objects), I get timeout callbacks from all IDs for a while, but when my burst starts, it seems like this CAN object goes dead. It does call the callback a few times, and then nothing more. When the burst stops, I do not get any timeout callbacks either.
I use ncReadMult, and always return NC_ST_READ_MULT from my callback, to re-enable reception.
Any ideas?
Anders Hørtvedt
Argos Control
Norway