From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
05-15-2014 02:55 PM
I am using the NI-CAN 2.7.2 Channel API on a PCI-CAN/2 board. If I set the output sample rate to 1000 Hz I get this error:
NI-CAN: (Hex 0xBFF62102) A sample rate (duration) that you submitted is too large or too small. Solution: Read the function description to determine whether to increase or decrease the sample rate.
I does work when set to 500 Hz.
I also have a GIF torque meter that sends CAN messages at 1000 Hz and I can read it with the Channel API nctRead SampleRate set to zero.
My question is this: What is the maximum reliable sample rate, for both input and output? I can't find that spec in the documentation.
Also, will the 1000 Hz input be reliable?
Thanks.
05-18-2014 09:04 PM
The maximum output rate is 500 Hz.
I believe the maximum input rate depends on the particular type of hardware you're using; I think the the Series 2 supports 1 Mbit/sec data transfer, so that should be your limiting factor.
1000 Hz input rate should definitely be reliable, provided your software is executing fast enough to read the frames without the buffer overflowing.
05-19-2014 08:56 AM
Thanks for the reply. Yes, it's only one 8-byte message. At 500 kbps it takes 24% of the bus bandwidth, so it seems it should be reliable. I was just wondering if NI-CAN has some input rate limitation. I'm checking my input buffer logic now.
05-19-2014 12:27 PM
Since the sample rate is set to zero, each nctRead returns the most recent data point, so there is no buffering required.
02-05-2015 07:51 AM
Revisiting this: Experiments show the output rate limit, using nctModeOutputRecent, for 6 messages is 100 Hz, for 3 messages is 200 Hz, and for 1 message is 500Hz. Reducing message length from 8 bytes does not seem to increase the limit.
Anyone have similar experience?
Is it any better under XNET with the NI-CAN Compatibility Layer?
02-05-2015 08:20 AM
Also, if I exceed 100 Hz with 6 messages, I get this misleading error:
NI-CAN: (Hex 0xBFF6211C) You initialized the same message with different I/O modes. Solutions: For each message use only one I/O mode and sample rate (0 or not) combination at a time; Use a different interface (port) for each mode.