|
|
|
@ -31,8 +31,8 @@ void strong_grinding_machine_intialize(struct UARTHandler *Handler) |
|
|
|
|
|
|
|
// 测试,转速20rpm
|
|
|
|
const uint8_t strong_grinding_machine_set_speed_cmd[8] = {0x01, 0x06, 0x00, 0x02, 0x00, 0x14, 0x28, 0x05}; |
|
|
|
const uint8_t strong_grinding_machine_start_cmd[8] = {0x01, 0x06, 0x00, 0x01, 0x08, 0x82, 0x5F, 0xAB}; |
|
|
|
const uint8_t strong_grinding_machine_stop_cmd[8] = {0x01, 0x06, 0x00, 0x01, 0x08, 0x81, 0x1F, 0xAA}; |
|
|
|
const uint8_t strong_grinding_machine_start_cmd[8] = {0x01, 0x06, 0x20, 0x00, 0x00, 0x01, 0x43, 0xCA}; |
|
|
|
const uint8_t strong_grinding_machine_stop_cmd[8] = {0x01, 0x06, 0x20, 0x00, 0x00, 0x00, 0x82, 0x0A}; |
|
|
|
|
|
|
|
static uint8_t strong_grinding_machine_cmd_flag = 0; |
|
|
|
uint8_t strong_grinding_machine_cmd = 0; |
|
|
|
@ -48,7 +48,7 @@ void Strong_grinding_machine_cmd(void) |
|
|
|
case 0: |
|
|
|
|
|
|
|
MB_WriteHoldingReg(&Strong_grinding_machine_handler->Tx_Buf, Strong_grinding_machine_handler->TxCount, |
|
|
|
0x01, 0x0002, strong_grinding_machine_speed); |
|
|
|
0x01, 0x4000, strong_grinding_machine_speed); |
|
|
|
// Strong_grinding_machine_handler->TxCount = 8;
|
|
|
|
// memcpy(&Strong_grinding_machine_handler->Tx_Buf, &strong_grinding_machine_set_speed_cmd, Strong_grinding_machine_handler->TxCount);
|
|
|
|
Strong_grinding_machine_handler->AddSendList(Strong_grinding_machine_handler, Strong_grinding_machine_handler->Tx_Buf, Strong_grinding_machine_handler->TxCount, |
|
|
|
|