Page 1 of 1

Sending Multiple messages using PCANbasic

PostPosted: Thu 25. Jan 2018, 12:54
by ianoz69
Hi,

I want to write/send multiple CAN messages one after another using the sample c# write code. Do you have any example how to do that?

Re: Sending Multiple messages using PCANbasic

PostPosted: Thu 25. Jan 2018, 16:04
by K.Wagner
Hello,

if you want to write multiple messages, then you have to call CAN_Write multiple times :roll: . Something like this:

Code: Select all
private void WriteFrames(List<TPCANMsg> msgList)
{
    TPCANMsg current;

    for(int i=0; i < msgList.Count; i++)
    {
        current = msgList[i];
        PCANBasic.Write(PCAN_USBBUS1, ref current);
    }
}