Search code examples
can-buscaplcanoe

Monitor a CAN message


I have a script with CAN signals A,B and C. All the signals are periodic. I want to send signal C depending on the value of A and B. Is there a way to monitor CAN signals via CAPL (Trying to monitor real time data). Suppose if I want to perform an operation shown below

if Signal A==0x04 AND/OR Signal B==0x01    then 

output(signal C)

Solution

  • If ((getSignal(SignalA)==0x04) && (getsignal(SignalB)==0x01)) output(MessageofSignalC);

    Note: You have to send out the entire message containing the signal itself (I do not know advanced Communication Protocols sending only signals, and not frames as a Data Unit in Data Link Layer).

    • && operand is for logical AND
    • || operand is for logical OR

    If you have to modify the SignalC, you must do it before sending out its message output(MessageSignalC).