> > > The problem with relative is it turns again into the equivalent of a > > > toggle message. Miss one and your position is wrong. So I would > > never do that. > > > > Agree, almost. It is in most cases possible to use a 16 bit value and keep > > track of the overflows provided it does not move to many > > counts in between each time. It is not uncommon Micro controller have 16 > > bit encoder counter so software need to keep track of > > overflows, not many rows of code but it must be there and work perfect. > > I disagree. What happens in the processor with encoder and motion output is > deterministic and you can use smaller counters and overflow interrupts etc. > It's tightly coupled. > > A CAN message sent and ACK'd by _a_ node on the bus will _not_ be > retransmitted. So the target motor that missed it will not know that it > missed it nor will the sender. This is a fundamental issue with the CAN > protocol which is why toggle messages are a bad idea. > > So PDO messages in CANopen are useful for information but not for commands > unless the commands are absolute.
Agree. > For example a PDO that contains a SWITCH ON message that is missed and then a > short time later contains SWITCH OFF doesn't change the target node. Just > the ON/OFF pulse was missed. And that's a different problem. Agree and had some discussions about it sometimes. Sending commands and there will be state machines that must be kept in sync. In CiA402 for servo motors there are some state machine for control-/status-word and I have not been able to put together current state from statusworld, it had been good if possible because if states come out of sync something will not work as expected, maybe it is possible from current sent controlword and statusword together but I have not been able to solve it perfect. > One could send relative distances to a motor and then also use PDOs to report > position/velocity but what does the sender do if the position isn't yet what > it expected? Could be any number or reasons why it's not there yet. > Mechanical load, periodic messages that are more often than the rate of > change of the motor. Sending encoder value is an absolute distance but it may overflow so it must be sent often enough and it might be often enough even if a limited number of messages are missed. Nicklas Karlsson _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
