Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Question - using capl programming in canoe

Hi,

 

I'm trying to use the capl language in canoe. I created a capl-node and included this node into the Can_network (as you can see in the jpg: simulation - canoe.jpeg

 

I created a capl-program to write a message into the canoe-write-window(message:The message received is x) if canoe receives any message.

 

Here you can see the program code in the CAPL-Browser:

on message *
{
    write("The message received is %c", this.id);
}

 

The CAPL-Browser compiled that without any warning or problems.

 

 

So now the problem: When I'm starting the canoe measurement occurs a error message in the write-window. Test module : the test module is not assigned or invalid. (as you can see in the jpg: measurement start.jpeg

 

I don't know what the problem is.. has someone an idea? Maybe something is wrong with the measurementsetup...

 

Padderick

 

0 Kudos
Message 1 of 16
(43,161 Views)

ups, here the jpg's...  😉

Download All
Message 2 of 16
(43,160 Views)

I took what you had and placed it in a CAPL node I have and it works fine.   Make sure you have configured (right click on the node in the simulation view and select "configure") the node for the database you are using and state (simulated or off).  Additionally be sure that you have saved the compiled code with a .can extension and Title reflects the name you have given the file while the path on the common tab points to it.  Additionally, in configuration on the buses tab the CAN bus should appear in the right hand window under "assigned buses".

 

Let me know if this helps.

GCentral
0 Kudos
Message 3 of 16
(43,144 Views)

Hi,

 

Could you please tell me how to generate a test report in notepad using CAPL ??

 

Best regards!

0 Kudos
Message 4 of 16
(40,259 Views)

Hello, I now got the same message that "The test module is not assigned or invalide" Have you got the solution? I wonder if you could please advise.

Thank you in advance.

0 Kudos
Message 5 of 16
(39,519 Views)

Hello, 

 

Could you share a screenshot of the node configuration?

 

BR

0 Kudos
Message 6 of 16
(38,082 Views)

Hello,

 

To write a report, you must do the next:

 

 

dword glbHandle = 0;
char buffer[64];

 

glbHandle = OpenFileWrite ("report.txt",2);
if ( glbHandle!=0 )
{
    snprintf (buffer, elcount(buffer)," %d \n", aux);
    filePutString (buffer, elcount(buffer),glbHandle);     
}
else
{
      write ("File 'report.txt' was not opened for write access.");
}

I hope you will find this informaiton useful,

 

BR.

0 Kudos
Message 7 of 16
(38,078 Views)

Hi,

 

Yes i already managed to generate reports 🙂 Thanks anyways !

 

 

0 Kudos
Message 8 of 16
(38,075 Views)

Hey,

 

Problem with Simulation Setup..

0 Kudos
Message 9 of 16
(38,074 Views)

Hi, 

how can I use CAPL programming anc panel designer in CANoe version 8.5
0 Kudos
Message 10 of 16
(33,923 Views)