by jhr_777 » Wed Nov 04, 2009 8:27 pm
by jhr_777
Wed Nov 04, 2009 8:27 pm
Hello everyone¡¡¡
I have a dude about get a image (rawSample) with PC. I know that I have to "execute" the instruction 15, but it doesnt works. Here is mi code in Visual Studio 8
- Code: Select all
void Image_Havimo( )
{
// Packet structure
dxl_instruction InstPacket;
dxl_status StatusPacket;
int ErrorCode;
WORD Model_Number;
InstPacket.id = 100; // ID
InstPacket.instruction = 15; // Read Register
InstPacket.address = 0; // Address of Model Number
InstPacket.parameter[0] = 0; // Number of byte to read
InstPacket.length = 3; // Length = 3(id, instruction, address) + (Number of parameter)
// Communication
//while( dxl_control( &InstPacket, &StatusPacket, true ) != ERR_CODE_SUCCESS){}
ErrorCode = dxl_control( &InstPacket, &StatusPacket, true );
I tried everything but it doesnt work. In addition, the havimo is found when I do a PING.
- Code: Select all
// Packet structure
dxl_instruction InstPacket;
dxl_status StatusPacket;
int ErrorCode;
WORD Model_Number;
InstPacket.id = id; // ID
InstPacket.instruction = INST_PING; // Read instruction
InstPacket.address = 0; // Address of Model Number
//InstPacket.parameter[0] = 0; // Number of byte to read
InstPacket.length = 3; // Length = 3(id, instruction, address) + (Number of parameter)
I need a help. Please ¡¡¡¡¡
Hello everyone¡¡¡
I have a dude about get a image (rawSample) with PC. I know that I have to "execute" the instruction 15, but it doesnt works. Here is mi code in Visual Studio 8
- Code: Select all
void Image_Havimo( )
{
// Packet structure
dxl_instruction InstPacket;
dxl_status StatusPacket;
int ErrorCode;
WORD Model_Number;
InstPacket.id = 100; // ID
InstPacket.instruction = 15; // Read Register
InstPacket.address = 0; // Address of Model Number
InstPacket.parameter[0] = 0; // Number of byte to read
InstPacket.length = 3; // Length = 3(id, instruction, address) + (Number of parameter)
// Communication
//while( dxl_control( &InstPacket, &StatusPacket, true ) != ERR_CODE_SUCCESS){}
ErrorCode = dxl_control( &InstPacket, &StatusPacket, true );
I tried everything but it doesnt work. In addition, the havimo is found when I do a PING.
- Code: Select all
// Packet structure
dxl_instruction InstPacket;
dxl_status StatusPacket;
int ErrorCode;
WORD Model_Number;
InstPacket.id = id; // ID
InstPacket.instruction = INST_PING; // Read instruction
InstPacket.address = 0; // Address of Model Number
//InstPacket.parameter[0] = 0; // Number of byte to read
InstPacket.length = 3; // Length = 3(id, instruction, address) + (Number of parameter)
I need a help. Please ¡¡¡¡¡