Hi,
There is actually a LabVIEW example for this use case that ships with the NI-CAN driver software:
Open the NI ExampleFinder and navigate to:
Hardware Input and Output » CAN » Channel API » Advanced » Channel Monitor.vi
If you are not using LabVIEW, you can initialize the receiving task in
the 'nctModeTimestampedInput' mode. The nctReadTimestamped() function
does return the 'NumberOfSamplesReturned' and as 'samples' are only
taken from actual CAN frames/messages in time stamped mode, the value
of
'NumberOfSamplesReturned' matches the number of messages for that
particular ID. Please note, that the channels in 'ChannelList' must be
contained in a single message, thus you need to initialize a task for
each ID you want to monitor.
-B2k
Message Edited by biker2000 on 08-31-2005 07:43 PM