Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

My periodic tasks don't look so periodic on the bus monitor.

My periodic tasks don't look so periodic on the bus monitor.  Is it possible the bus monitor is reporting incorrect rates or are my frames really not being sent very close to periodically?  Are there only certain multiples of a base rate than can be sent periodically?  The attachment shows my different rates.  I've written in the middle of the columns what they should be.  Some are fairly close, some are not.  Am I doing something wrong?  Thanks for any help/advice.

 

 

Robert Mortensen
CLA, CLED, LabVIEW Champion, Principal Systems Engineer, Testeract
0 Kudos
Message 1 of 9
(6,253 Views)

Hi FlamingYawn,

How are you setting it up periodically in your program?  Are you sure you have it properly set to periodic transmit?  Are you using LabVIEW or another programming environment?  Have you seen this behavior with multple systems?

Chris R.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 9
(6,233 Views)

Hi Chris,

Thanks for responding.  I've attached an image of my LabVIEW code setting up and executing the periodic messages.  I'm doing a simple loopback to read what I'm sending out on the other port.  The code is executing without error; I was just wondering if it is normal for hardware-timed periodic messages to be so erratic.  I would have imagined that if the CAN transciever is sending out buffered data at intervals specified by the on-board clock the messages would appear more deterministically timed.

I appreciate your efforts to keep these forums monitored.  I know these questions can be pretty random.

Robert Mortensen
CLA, CLED, LabVIEW Champion, Principal Systems Engineer, Testeract
0 Kudos
Message 3 of 9
(6,214 Views)
Hi FlamingYawn,
 
Can you post either your VI or your your database file?  You may be getting some conflicts on the bus that will delay the "periodic" due to more than one set of data being transmitted at the same time.  With your file(s), I may be able to provide suggestions to prevent this.  For example, splitting the Init, Start, and Write into more than one sequence of For Loops may help with the periodic timing.
Chris R.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 9
(6,177 Views)
Sure thing.
Robert Mortensen
CLA, CLED, LabVIEW Champion, Principal Systems Engineer, Testeract
0 Kudos
Message 5 of 9
(6,169 Views)

Hi FlamingYawn,

This may be an issue of too many messages trying to transmit at once.  Some may have to wait and thus, mess up the "periodic" timing.  It may be due to your many channels being configured all at once.  I suggest splitting up the channels into 2 or 3 separate Initialize, Start, Write sequences instead of 1.  Try splitting this up into two sequences at least and see if that improves anything.  If you do 2, I suggest doing 1, 2, 10 and 20 in one set of functions, and 40, 50, and 62.5 in another.

Let me know if you have any questions.

Chris R.
Applications Engineer
National Instruments
0 Kudos
Message 6 of 9
(6,148 Views)

I staggered my starts as you suggested (see attached image) but it doesn't seem to have any effect.  Any other ideas?

Thanks,

Robert Mortensen
CLA, CLED, LabVIEW Champion, Principal Systems Engineer, Testeract
0 Kudos
Message 7 of 9
(6,120 Views)

Hey FlamingYawn,

Have you had a chance to try the periodic transmit VI in the example finder?

Regards,

Nick D.

Message Edited by Nick D on 06-11-2007 08:22 PM

0 Kudos
Message 8 of 9
(6,086 Views)
Thanks for chiming in, Nick, but I'm using the Channel API and would like to stick with it.  Any other ideas, guys?  Am I simply overloading the NI CAN card?  When I tested just the 62.5 Hz singals, they were all right on the money.
 
Thanks,
Robert Mortensen
CLA, CLED, LabVIEW Champion, Principal Systems Engineer, Testeract
0 Kudos
Message 9 of 9
(5,984 Views)