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!