Hi there,
I would like to enquire the use of PDOs in the CANopen Smartmotors particulaly TPDOs. My intention is to use TPDOS to allow the motor to continuously send motor messages to the master without adding SDO overheads.
For PDO, I am unable to change the parameters in Transmit PDO mapping (0x1A00) – sub index 0 (number of mapped parameters) and sub index 1to 8 (PDO mapping). When I attempt to change that in any of the CANopen states ( i.e. Pre-operational, Operational ), the SDO return an error of 0x0800 0022 (Data cannot be transferred to or stored in application due to present device state.)
I have tried this on other hardware and the above mapping can be done. Thus, I would like to ask if Animatics can guide me in this.
Thanks,
Regards,
Daniel Chan
Here's a link to our latest manual. What you want to do is possible. I'll ask around about the error code your getting.
Here's some notes I kept... not sure if this example is in the manual.
PDO mapping
Basic procedure to map a PDO. In this example transmit PDO 1 is mapped.
1.) Enter NMT pre-op state
2.) Set bit 31 of the cob ID in object 1800:sub 1 to a 1.
3.) Set the number of entries in the mapping parameter object to 0. (object 1A00:sub 0)
4.) Set the mapping object: the value is a 32 bit value in the following order: highest 2 bytes: object, next byte is subindex, and the last is the length in bits.
5.) Create multiple items in this PDO if desired by using additional entries in the mapping object (object 1A00:sub 1,2,3.)
6.) Set the number of entries in the mapping parameter object back to the number of items created in step 4 and 5. (object 1A00:sub 0)
7.) Clear bit 31 of the cob ID in object 1800:sub 1 back to a 0.
7.5) Set the Transmit type to 'sync' (1-240) or 'event timer' (254-255) if desired.
8.) Go back to the NMT running state.
Thanks Csearcy,
The PDO is now working. I did not do step 2 and step 7 before.
If step 2 and step 7 is not done, the motor will return the SDO error code of 0x0800 0022 upon a write in object 0x1A00.
Regards
Daniel Chan
Thanks for letting me know you got it working Daniel!
Regards
Chuck Searcy
yes