LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem to send LIN Master frames at different time interval

Hello,
 
Currently, I am working to control motor with LIN bus communiction and would like to make cycle test at different speed and time.
 
Let me tell shortly here what hardware and software using for this application.
 
Hardware: NI 9866, NI cDAQ 9171
Drivers: XNET 14.5, NI Max 14.1, LDF file
 
I am looking to send master frames at different time interval to retrieve contineous data from slave.
 
Following table shows what I expect to execute and furthermore, this test cycle repeats after each hour.
 
Frames                         Time(min)
Frame 1                           5
Frame 2                           15
Frame 3                           20
Frame 4                           30
Frame 5                           35
Frame 6                           45
Frame 7                           50
Frame 8                           60
 
As I have tried to implement above test cycle in combination with tick count and "LIN frame input queued"  from exempler but couldn't make it.
I am wondering if anybody had the same experience with LIN bus communication and worked with sending and receiving the data.
I have very less knowlwdge in this perticular problem to go further and I am blocked.
I am completely new to LIN communication if someone can help me out to get away from this issue.
Also, Please find attached pdf which gives you details about time cycle.
Any help would be appreciated.
 
Thanks.
Sachin
Download All
0 Kudos
Message 1 of 3
(3,503 Views)

Hey Sachin,

 

I think you will receive the best answer, if you use the board for LIN communication for your question:

 

Automotive and Embedded Networks - [CAN, FlexRay, LIN, ECU MC, Diagnostic, I2C, SPI]
http://forums.ni.com/t5/Automotive-and-Embedded-Networks/bd-p/30

 

Regards, Stephan

0 Kudos
Message 2 of 3
(3,458 Views)

Hi Sachin,

 

first of all: good job on using a state machine! However I feel, it might be much more effective if you used a) descriptive names in your enum and b) a typedef. This enables you to update multiple "constants" at once, when you add states.

 

To your problem: I think the problem is in understanding of the LIN bus. 5 Minutes is a really long time in any bus communication. What does your LDF say about the timing? I would guess the schedule is a lot faster than 5 minute intervals, so my first question would be: What happens in between the "Frames".

 

Second: What are you refering to as frame? As I said before communication on the LIN happens all the time normally, according to the schedule. This doesn't mean you have to send something or update the signals, it just means that the last value will be sent according to the schedule. So what does "Frame" mean in your case? Just an update to the signal?

 

Finally, you should take a look at the manual, where they explain about the XNET write modes- Sorry, I can't find the link online, but you should find it by looking up frame out queued in the manual. There they explain how queueing in this case works. If I remember correctly: queued means, that you change the frame and it then gets send when the schedule says it's time.

 

Also, I think I don't fully understand your problem: Do you not see the frame? have you tried sending the frame with frame output? What is the behaviour you see, that's not what you want?

 

Best regards,

Pete



Remember Cunningham's Law
0 Kudos
Message 3 of 3
(3,444 Views)