I'm new to CAN and CANopen so I may still have some fundamental misunderstanding. What I'm trying to understand is how one would design the PDO mapping for a network with many of the same sensor/actuator.
For illustration let's say I have 10 fridges I'm trying to control. They each have a temperature sensor which needs to be sent via TPDO, and a temperature set point that can be set using a RPDO. I have a central controller that is logging the data from each fridge, and based on some other criteria, will set some unique temperature in each fridge using 1 PDO per fridge. I'm trying to understand how the node configuration (OD, PDO, SDO, etc.) would be done for such a system.
Fridge Nodes:
- Can each fridge use the same device configuration file?
- If I do, would each fridge send a unique PDO based on their node ID or do I need to handle that manually?
- How do I tell each fridge to listen for the RPDO which is unique to them without a unique file?
- Do I just assign a sequential node ID to each of these or is there a better strategy?
Controller Node:
- I'm guessing the controller should have its own configuration file.
- However, it needs to know of the same data fields as the fridges. Duplicating and updating these across multiple files is tedious and error prone. Can the duplication be reduced?
- The controller needs to send the set point on a different PDO for each fridge. Do I need to define a separate OD entry and separate PDO for each one? Again, this is error prone and tedious. If I decide to add another fridge to my network, I need to update the config even though it's the exact same as all the others?
- I'm guessing I need to define a my own PDO COBIDs for each one as well. How do I pick this such that there are no collisions? Let's say I reserve the first 20 PDO for the measurement from up to 20 fridges, and then the next 20 for the set points. Is this reasonable? Would I ever assign the PDOs such that the first two are measured/set temperature for fridge 1, followed by the same for fridge 2 and so on?
General:
- Should I use the default TPDO/RPDO range for this or is it better somewhere else?
I'm sure the answers to some of these will be "it depends", but I'm hoping for some guidance and sanity checks. Several things about this protocol still aren't clicking for me, and I'm hoping that working through this hypothetical example will help