Jump to content
GU Haojie

Problem for sending 2 CAN frame with different interval

Recommended Posts

Hello, team:

Recently, I face a problem to send 2 CAN frames with different interval.

i.e.       Frame          Interval

            FrameA         50ms

            FrameB         200ms

The thing is that interval time is the longer one always. I have less knowledge of Labview so far, I don't know which structure could be used in my condition.

Any help would be appreciated. Thanks you.

Share this post


Link to post
Share on other sites

Hi Gu Haojie,

Flat sequence will be the best one, need more details to help you at lest your block diagram snippet

 

Share this post


Link to post
Share on other sites

I don't understand.  Are you writing CAN or reading it?  Are you using NI-CAN or NI-XNET?  What is your hardware, is it NI based even?  Post your code.

That being said I've never had any problem reading or writing CAN frames at different rates in any API.

Oh and if you are new to LabVIEW here is some free training:

NI Learning Center

NI Getting Started

-Hardware Basics

-MyRIO Project Essentials Guide (lots of good simple circuits with links to youtube demonstrations)

-LabVEW Basics

-DAQ Application Tutorials

-cRIO Developer's Guide

 

Learn NI Training Resource Videos

6 Hour LabVIEW Introduction
Self Paced training for students
Self Paced training beginner to advanced, SSP Required

Share this post


Link to post
Share on other sites
On 7/29/2016 at 8:18 PM, hooovahh said:

I don't understand.  Are you writing CAN or reading it?  Are you using NI-CAN or NI-XNET?  What is your hardware, is it NI based even?  Post your code.

That being said I've never had any problem reading or writing CAN frames at different rates in any API.

Oh and if you are new to LabVIEW here is some free training:

NI Learning Center

NI Getting Started

-Hardware Basics

-MyRIO Project Essentials Guide (lots of good simple circuits with links to youtube demonstrations)

-LabVEW Basics

-DAQ Application Tutorials

-cRIO Developer's Guide

 

Learn NI Training Resource Videos

6 Hour LabVIEW Introduction
Self Paced training for students
Self Paced training beginner to advanced, SSP Required

My hardware is NI-USB8473. And what I wanna do is to periodic send CAN frames, but they have difference time interval.

Example, Frame A should be sent by each 50ms and Frame B should be sent by each 200ms.  

Thanks very much for your links, do u know how to post a picture, BTW?:)

Here is my current block diagram

CAN tool.7z

Share this post


Link to post
Share on other sites

 XNET can do periodic frames well; I've done this with the PCI card. The database of frames contains the intervals to send them. As I recall loading the database was all that was needed. Setting the frame values changed what was being periodically sent.

  • Like 1

Share this post


Link to post
Share on other sites
15 hours ago, Tim_S said:

 XNET can do periodic frames well; I've done this with the PCI card. The database of frames contains the intervals to send them. As I recall loading the database was all that was needed. Setting the frame values changed what was being periodically sent.

Tks, it seems that couldn't work with the "NI USB-8473"

Share this post


Link to post
Share on other sites
On 8/2/2016 at 8:10 AM, GU Haojie said:

My hardware is NI-USB8473. And what I wanna do is to periodic send CAN frames, but they have difference time interval.

I have done this in the past with (multiple) NI-USB 8473 and invested hours and hours just to try and keep the frames synced. It's impossible to keep the frames on a certain interval as the OS and the USB will kill your timing. My application experienced delays of more than 400 ms for frames that required intervals of 20 ms! :frusty:

Long story short: Do yourself a favor and use an XNET compatible PCI card, they support periodic CAN frames by design.

On 8/2/2016 at 8:10 AM, GU Haojie said:

Thanks very much for your links, do u know how to post a picture, BTW?:)

You can just drag files in your editor when posting, there is a field just below where you enter your text

Insert picture.PNG

Edited by LogMAN
Answering questions :-)

Share this post


Link to post
Share on other sites

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.