Jump to content

NI-CAN _ speed-up my CAN Communication


Bernd F

Recommended Posts

Hello LabVIEW users, programmers and friends,

I create a Programm to send Data with the Channel-API to a LED-board.

I use LowSpeed-Transceiver; 125kBaud; SP=81,3%; BTR1=0xC3; BTR2=0x2B.

I use "CAN Init Start.vi" to send with the "CAN channel-name" Port "CAN1" mode "Output Recent" sample rate "0"

and "CAN Init Start.vi" to read with the "another CAN channel-name" Port "CAN1" mode "Input" sample rate "10000"

It works perfect, but it is really "slow" (84ms per message-frame[6,3ms data + 78ms break]).

If i open the NI-CAN BusMonitor it works really faster! (10ms per message-frame[6,3ms data+ 3,7ms break]).

But WHY??? Same Code! I just open the BusMonitor! ???

Is there a setting that speed up the CAN-communication or set another priority to the LabVIEW-programms?

I want to include this settings to my programm, but don't no what they are.

I get a timing statistic:

"CAN Read Single Chan Multi Samp 1D Dbl.vi"

uses without monitor 312,5 ms (423 runs) and with monitor just 78 ms (also 423 runs).

"CAN clear.vi" without monitor 172 ms (382 runs) and with monitor 62 ms (382 runs).

? Why this difference ?

An other question:

Can i get the information if a channel (by name, not by task reference) ist initialiced yet? So i must not initiate it again.

Could anyone help me?

Thanks a lot

Bernd F.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.