FLOWCHART / CAN Bus / Help !! bis

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
tbaggi
Posts: 7
Joined: Fri Mar 07, 2008 9:11 am

FLOWCHART / CAN Bus / Help !! bis

Post by tbaggi »

Hello, i need help for CAN bus on flowcode V3.
Can you give me an basic example for transmit a CAN message.
Thx.
sT.

[Edit] We had read the "Help" and do instructions in the "Help but ur flowcgart not running.

User avatar
Steve
Matrix Staff
Posts: 3433
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Re: FLOWCHART / CAN Bus / Help !! bis

Post by Steve »

1) Set up the message details in "TX Buffer 0" (on the property page of the component).

2) In your program, add 2 "component macro" icons - the first should call "Init" and the second should call "SendBuffer" with a parameter of 0.

tbaggi
Posts: 7
Joined: Fri Mar 07, 2008 9:11 am

Re: FLOWCHART / CAN Bus / Help !! bis

Post by tbaggi »

After having followed the assistance suggested of flowcode I still do not arrive has to send contained buffer. I you joint one print screen of my end of pogramme. Can you say to me what is not appropriate?
In the properties CAN I notched in the General mitre Uses suggested settings.
In the first macro one there is SEND BUFFER “0”
In second macro it ya CHECK RX and the value of return TOTO.
Thank you for your assistance.

Image

User avatar
Steve
Matrix Staff
Posts: 3433
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Re: FLOWCHART / CAN Bus / Help !! bis

Post by Steve »

CAN is used to send messages from one microcontroller to another. So you will need to have at least 2 microcontroller systems in place.

One system will send the message as I described in the previous post.

A second system will receive the message. To do this, set the "RX Buffer 0" page so that it accepts your message (e.g. "accept all messages"). In the program, initialise the CAN module ("init" macro) and then enter a loop. In the loop, use the macro "CheckRX(0)". When this returns a non-zero value, a message has been received and you can use the other macros to determine the details of the received message.

Post Reply