CAN communication

2 weeks 6 days ago - 2 weeks 6 days ago #29535963 by robo-team
CAN communication was created by robo-team
We use FBL2360A to control 2 BLDC motors in our product.
The controller is connected to the CAN bus. My target is co control the motors through the CAN and receive RPM from them back.
I have looked through the user manual but can't find enough information about CAN communication. We use raw CAN so I guess that RawCAN is what I need.
In our board we use CAN filters to receive only specified CAN messages. How can I can add filter to the FBL2360A?

The simplified current script looks like this:

#define MOTOR_LEFT                    1
#define MOTOR_RIGHT                  2
#define VAR_SPEED_LEFT            1 
#define VAR_SPEED_LEFT            2 
#define VAR_RPM_LEFT                3
#define VAR_RPM_RIGHT              4
#define SCRIPT_DELAY                 10

speedCommandLeft = getvalue(_VAR, VAR_SPEED_LEFT)
speedCommandRight = getvalue(_VAR, VAR_SPEED_RIGHT)
setcommand (_go, MOTOR_LEFT, speedCommandLeft )
setcommand (_go, MOTOR_RIGHT, speedCommandRight )

val_left = getvalue(_BLSPEED, MOTOR_LEFT)
val_right = getvalue(_BLSPEED, MOTOR_RIGHT)
setCommand(_var, VAR_RPM_LEFT, val_left)
setCommand(_var, VAR_RPM_RIGHT, val_right)
goto top

But instead of User Variables I want to use CAN receiving/sending.

So my questions:
- How can I set CAN filter?
- How can I receive a specified CAN message?
- How can I send a  CAN message?

I would really appreciate any help.

Please Log in or Create an account to join the conversation.

19 hours 25 minutes ago - 19 hours 23 minutes ago #29535999 by binitafelicity
Replied by binitafelicity on topic CAN communication
A Controller Area Network is a robust vehicle bus standard designed to allow microcontrollers and devices to communicate with each other's applications without a host computerThe Controller Area Network - CAN bus is a message-based 
cps test      protocol designed to allow the Electronic Control Units (ECUs) found in today's automobiles, as well as other devices, to communicate with each other in a reliable, priority-driven fashion.CAN stands for Controller Area Network protocol. It is a protocol that was developed by Robert Bosch in around 1986. The CAN protocol is a standard designed to allow the microcontroller and other devices to communicate with each other without any host computer.The CAN communication protocol is a carrier-sense, multiple-access protocol with collision detection and arbitration on message priority (CSMA/CD+AMP). CSMA means that each node on a bus must wait for a prescribed period of inactivity before attempting to send a message

Please Log in or Create an account to join the conversation.

Time to create page: 0.084 seconds