#include <windows.h>
#include <dmccom.h>
long rc;
HANDLEDMC hDmc;
HWND hWnd;
int main(void)
{
// Connect to controller number 1
rc = DMCOpen(1, hWnd, &hDmc);
if (rc == DMCNOERROR)
{
char szBuffer[64];
// Move the X axis 1000 counts
rc = DMCCommand(hDmc, "MT-2;SHX;JG1000;BGX;", szBuffer, sizeof(szBuffer));
// Disconnect from controller number 1 as the last action
rc = DMCClose(hDmc);
}
return 0;
}
使用这个程序调试的时候,为什么不进电机不转?请刘工帮忙