Simple sample in C++ or VB

The free CAN Software API (Application Programming Interface) for Windows®
Post Reply
Mr.Ostrich
Posts: 3
Joined: Mon 17. Feb 2014, 23:47

Simple sample in C++ or VB

Post by Mr.Ostrich » Tue 18. Feb 2014, 23:38

Hello
Is it possible to get an simple code in C++ (or VB) to have an basic to go on with coding.

For example:

just HW initialisation and everythhing hat is needet

init
speed config
.....
and maybe just sending 1 oder 2 CAN messages


thx

P.S.: My Problem is, when i have a look at the samples there are sometimes just little Questions like "Why is nowhere the speed defined. The Program works with 500kbit but nowhere is PCAN_BAUD_500K = 0x001C" written.

Hope you understand what i mean

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

Re: Simple sample in C++ or VB

Post by K.Wagner » Wed 19. Feb 2014, 08:11

Dear,

please take a look at the help document that you receive along with the API. Each function has a minimalistic example in C++ code. For example, see this picture (help document, chapter Reference\Functions\CAN_Initialize):
Example of CAN_Initialize
Example of CAN_Initialize
CAN_Initialize.jpg (126.11 KiB) Viewed 3637 times
Look for the function CAN_Read and CAN_Write within the help document to find also examples on how to read and write messages.
Best regards,
Keneth

Post Reply