Sending Multiple messages using PCANbasic

This forum covers issues concerning multiple software products.

Sending Multiple messages using PCANbasic

Postby 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?
ianoz69
 
Posts: 3
Joined: Tue 9. Jan 2018, 14:56

Re: Sending Multiple messages using PCANbasic

Postby 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
K.Wagner
Software Development
Software Development
 
Posts: 622
Joined: Wed 22. Sep 2010, 12:36
Location: Darmstadt, Germany


Return to Software



This website uses cookies for analytics, for logins to the online shop and the forum, and for the handling of an order. By browsing this website you agree to the use of cookies. Detailed information on their use can be found in our privacy policy.

OKPrivacy Policy