Other Parts Discussed in Thread: C2000WARE
Tool/software: Code Composer Studio
Hello everyone,
I am absolutely beginner in CAN bus and more generally in numeric communications.
I have read the F28379d manual about CAN, I have understood some things but I can't understand the best way for using the module.
I know the 32 message objects and their configuration but how to use them ?
Imagine : I have a machine that counts potatoes and carrots (5 bytes for each ... lots of vegetables !!) and a master has to ask it for know the amounts and machine states (1 byte for faults ).
What is the best configuration : 1 TX message object filled with 6 bytes (1+5 potatoes number) or (1+5carrots number) and 1 RX message object wich saves in differents registers the differents values (variable msg ID) ?
OR 2 TX message objects (1 for each values to send) and 2 RX message objects (corresponding to the 2 TX msg objects) ?
OR other manner ?
In case of more than one msg object, how the node will know which read ? In loopback example it's easy because the CAN core send the message to itself (moreover in the same code) but how to use the CANMessageGet function when there is 32 different message objects and 50 nodes on the bus.
Also, in the loopback example, there is one seconde delay between send and receive functions : does it mean that the received message is stored until the next send even if it is not read by the CAN module ?
Finally, does ALL nodes need to have the SAME messages objects configuration ?
I am sorry for all this questions but they can really help me.
Thank you very much and have a nice day,
Jérémy