Călin Corcoțoi
Călin Corcoțoi

Reputation: 29

Output to bus system CAN channel X not allowed

I am trying to send a message on the CAN bus in CANoe with a .NET test module.

This is the code that I used

using Vector.Scripting.UI;
using Vector.CANoe.TFS;
using Vector.CANoe.VTS;
using NetworkDB;


public class main : TestModule
{
    public override void Main()
    {
        byte[] data = new byte[] { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 };
        CANFrame msg = new CANFrame(0x01, 4); // ID=0x500, DLC=4
        msg.SetRawData(data);
        msg.Channel = 1;
        var a =  msg.Send();

        Output.WriteLine(Convert.ToString(a));
    }
 
}

And this is the message I get in the write window of CANoe.

System Node TEST (CAPL): [TEST] Output to bus system CAN channel 1 not allowed!

Upvotes: 3

Views: 1865

Answers (1)

Shyam
Shyam

Reputation: 682

Go to the configuration of the .NET Test Module. Under the tab "Buses", check if the bus on which you want to send the CAN Frame is present under "Assigned Buses".

I hope this is the only configuration which you have missed.

Upvotes: 1

Related Questions