Apr-06-2019, 07:13 PM
Hello,
I am starting to learn Python, but i come from a controls background.
I have a Beaglebone and just for fun i am using a CanOpen interface with a small servo motor.
I have everything working fine but now i am finding i have to code all the normal features i find as standard in a motion controller ! so its getting interesting
The Problem i am working on :
when you start a servo motor for the first time you "send it home" to find zero, during the homing cycle a 'status word' is sent back continually to the control, in my case the beaglebone.
This statusword HEX value has bit 12 and bit 10 set as 0 or 1 dependent on the condition.
bit 12 and bit 10 both = 0 when the homing operation has started. so i cant move forward in the main program, i must Wait until :-
bit 12 and bit 10 are both = 1 when the homing operation has completed successfully. now i can move forward in the program.
for example i might have the following initially Hex = 4227 Dec = 16935 = bin = 100001000100111
on completion of homing it could change to this Hex = 5627 Dec = 22055 = bin = 101011000100111
I am interested to get opinion on how i might best achieve this type of monitoring as i dont need to change any values, only monitor for change.
while this might be totally obvious solution for people, with my current experience level i want to be sure i follow the best methods.
thank you for all guidance / help
I am starting to learn Python, but i come from a controls background.
I have a Beaglebone and just for fun i am using a CanOpen interface with a small servo motor.
I have everything working fine but now i am finding i have to code all the normal features i find as standard in a motion controller ! so its getting interesting
The Problem i am working on :
when you start a servo motor for the first time you "send it home" to find zero, during the homing cycle a 'status word' is sent back continually to the control, in my case the beaglebone.
This statusword HEX value has bit 12 and bit 10 set as 0 or 1 dependent on the condition.
bit 12 and bit 10 both = 0 when the homing operation has started. so i cant move forward in the main program, i must Wait until :-
bit 12 and bit 10 are both = 1 when the homing operation has completed successfully. now i can move forward in the program.
for example i might have the following initially Hex = 4227 Dec = 16935 = bin = 100001000100111
on completion of homing it could change to this Hex = 5627 Dec = 22055 = bin = 101011000100111
I am interested to get opinion on how i might best achieve this type of monitoring as i dont need to change any values, only monitor for change.
while this might be totally obvious solution for people, with my current experience level i want to be sure i follow the best methods.
thank you for all guidance / help