support for periodic/cyclic messages/frames

This forum covers issues concerning multiple software products.

Re: support for periodic/cyclic messages/frames

Postby Bourass » Wed 6. Feb 2019, 10:05

Hi,

You will also find timer examples in our source code examples for PCANBasic, used for CAN_Read(). You can also use those timer for CAN_Write().


i did not find any timer used for CAN_Read(), can you please show me this timer in the read function and how can i adapt it to Write function?

Thanks
Bourass
 
Posts: 13
Joined: Mon 28. Jan 2019, 18:31

Re: support for periodic/cyclic messages/frames

Postby K.Wagner » Wed 6. Feb 2019, 10:24

Hello,

Bourass wrote:i did not find any timer used for CAN_Read()

and how did you look for it? Each PCAN-Basic sample has implemented reading with timer, with events and manually. Everything you need is in the samples. You just need to study the code and understand it. We cannot do this for you.

For instance, here is an image of the PCAN-Basic sample project for C#:
PCAN-Basic-Timer.PNG
Timer control for reading with PCAN.-Basic
PCAN-Basic-Timer.PNG (23.38 KiB) Viewed 185 times

The code for it looks like:
Code: Select all
private void tmrRead_Tick(object sender, EventArgs e)
{
    // Checks if in the receive-queue are currently messages for read
    //
    ReadMessages();
}


Bourass wrote:how can i adapt it to Write function?

Just create a new timer and write messages instead of reading them, in the timer function.
Best regards,
Keneth
K.Wagner
Software Development
Software Development
 
Posts: 616
Joined: Wed 22. Sep 2010, 12:36
Location: Darmstadt, Germany

Re: support for periodic/cyclic messages/frames

Postby Bourass » Wed 6. Feb 2019, 11:24

Using this timer can i send many frames periodically or not?
thanks
Bourass
 
Posts: 13
Joined: Mon 28. Jan 2019, 18:31

Re: support for periodic/cyclic messages/frames

Postby K.Wagner » Wed 6. Feb 2019, 11:33

yes
Best regards,
Keneth
K.Wagner
Software Development
Software Development
 
Posts: 616
Joined: Wed 22. Sep 2010, 12:36
Location: Darmstadt, Germany

Previous

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