-4

Hi can any one help me how to send the below mentioned airbag_01 message should be sent cyclically in main test. which test is done capl test module in void maintest()

message Airbag_01 Airbag;

  • welcome to StackOverflow. Please note, this is not a support desk for Vector softwares, maybe your question, as of now, is better off on their website. You might want to take a look at this link: [How do I ask a good question](https://stackoverflow.com/help/how-to-ask), maybe show some code you tried to write and read the Vector software user manual (hit F1 while in the program). – Daemon Painter Mar 05 '19 at 08:15

2 Answers2

0

you should create an on timer function to set the scheduling. Build up your message and output it whenever the timer reaches the limit. Capl has a really powerful help section. If more help is needed feel free to ask.

vakesz
  • 58
  • 1
  • 7
0

Hard to understand your question. The following code sends a message periodically each 5 sg:

variables
{ 
    message Airbag_01 Airbag;
}

on timer send_Airbag
{
  // Set values:
  // Airbag.byte(0) = 0;
  // ...

  // Send
  output(Airbag);

  // Cycle each 5 sg
  settimer(send_Airbag, 5000);
}

on start
{ 
    // 5 sg
    settimer(send_Airbag, 5000);
}
framontb
  • 1,817
  • 1
  • 15
  • 33
  • Question states the `MainTest()` function, implying we are talking of Test Setup of Vector software, in which the `on start` procedure is not available. `on preStart` is an option. – Daemon Painter Oct 15 '19 at 09:01