Sending Multiple messages using PCANbasic

This forum covers issues concerning multiple software products.
Post Reply
ianoz69
Posts: 3
Joined: Tue 9. Jan 2018, 14:56

Sending Multiple messages using PCANbasic

Post by ianoz69 » Thu 25. Jan 2018, 12:54

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?

K.Wagner
Software Development
Software Development
Posts: 694
Joined: Wed 22. Sep 2010, 13:36

Re: Sending Multiple messages using PCANbasic

Post by K.Wagner » Thu 25. Jan 2018, 16:04

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);
    }
}
Best regards,
Keneth

Post Reply