Search code examples
canoe

How can I write to a XCP parameter using Canoe .XCP and CAPL?


How can I write to an XCP parameter using Canoe .XCP and CAPL script? We can measure these parameters but can not change them, is it even possible?


Solution

  • CANoe creates a system variable for each .XCP parameter.

    You setup the parameters in the XCP/CCP window.

    In CAPL you can read and write the value of the parameters by accessing the corresponding system variables. Just check the symbol explorer. The system variables should all be in namespace XCP.

    So changing the parameter a0 of device XcpSim in CAPL would be something like

    @XCP::XcpSim::a0 = 17;
    

    This example is taken directly from the CANoe documentation.