0

For example, I'm receiving a CAN frame from ECU with id 0x100 with some data inside in CAN channel 1. I want to change only byte 7 to 0xFF and forward this frame further in channel 1. My code is below:

on message 0x100
{
  message 0x100 msg;
  msg = this;
  msg.byte(7) = 0xFF;
  output(msg);
}

But, in CAN trace, I see the message as it is, without byte 7 changed. What I do wrong? Maybe there is something that I do not understand..

I have one assumption to solve it, but this requires wiring changes to my hardware. If I make one channel for input and another channel for output, then I can use CAPL as a gateway and send frame from CAN1 to CAN2 inside one CAN-bus.

Any ideas are welcome. Thank you.

  • How does your CANalyzer setup look like? Where is the code executed, i.e. in which node and where is this node located? – MSpiller Mar 10 '21 at 11:07
  • From HW side, I just connected to ECU via one CAN bus. From CANalyzer side, I have one channel and in the loop I put IG block and after this a Program Node block with CAPL script. – Dmitriy Mar 11 '21 at 13:04
  • Please provide screen shots of the trace window and the measurement setup. – Shyam Apr 09 '21 at 06:51

0 Answers0