Position Control values
Posted: Mon Feb 15, 2016 8:24 am
The data sheet says:
What about the Distance value, what is it exactly? The encoder count value? If I read the encoder value, and it's 10,000,000, what will happen if I send a distance value of 1,000,000? Will it move backward to the spot where the encoder value is 1,000,000, or will it move 1,000,000 pulses from it's current position, depending on the sign of the speed value?
I just don't want to send it any commands before I know exactly what it's going to do. Thanks.
All values used are in quad pulses per second -- that is a unit of speed. So the speed value is given in QPPS.41 - Buffered M1 Drive With Signed Speed And Distance
Drive M1 with a signed speed and distance value. The sign indicates which direction the motor will run. The distance value is not signed. This command is buffered. This command is used to control the top speed and total distance traveled by the motor. Each motor channel M1 and M2 have separate buffers. This command will execute immediately if no other command for that channel is executing, otherwise the command will be buffered in the order it was sent. Any buffered or executing command can be stopped when a new command is issued by setting the Buffer argument. All values used are in quad pulses per second.
Send: [Address, 41, Speed(4 Bytes), Distance(4 Bytes), Buffer, CRC(2 bytes)] Receive: [0xFF]
What about the Distance value, what is it exactly? The encoder count value? If I read the encoder value, and it's 10,000,000, what will happen if I send a distance value of 1,000,000? Will it move backward to the spot where the encoder value is 1,000,000, or will it move 1,000,000 pulses from it's current position, depending on the sign of the speed value?
I just don't want to send it any commands before I know exactly what it's going to do. Thanks.