optical/EMBOS/Users/EmbFunc/busmotos/busmotos.h
2025-09-04 09:45:08 +08:00

49 lines
1.0 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef __BUSMOTOSS_H__
#define __BUSMOTOSS_H__
#include "config.h"
#ifndef MOTO_RUNNINT
#define MOTO_RUNNINT 0 //正在运行
#endif
#ifndef MOTO_RUN_FINSH
#define MOTO_RUN_FINSH 1 //运行完成
#endif
#ifndef MOTO_WARNING
#define MOTO_WARNING -1 //错误
#endif
#define MOTOX_JOGSPD 100 //X电机手动速度(单位rpm)
#define MOTOY_JOGSPD 60 //Y电机手动速度(单位mm/s)
void InitBusCtrlMotos(void);
int BusCtrlMotoYtoAbspos(u32 pos, u32 spd);
int BusCtrlMotoXtoRevpos(s32 pos, u32 spd);
int BusCtrlMotoXtoAbspos(s32 pos, u32 spd);
int GetMotoXSta(void);
int GetMotoYSta(void);
int MoveXbyJOG(int dir);
int MoveYbyJOG(int dir);
int MotoXstopEmc(void);
void MotoYstopEmc(void);
//int SetMotoYCurPos(int pos);
int SetMotoYPosZero(void);
int GetMotoYpusPos(s32 * pos);
int GetMotoXpusPos(s32 * pos);
int SetMotoXPosZero(void);
int SetMotoXRetrunPos(void);
int SetMotoYmoveLimt(s32 posp, s32 posn);
int SetMotoXmoveLimt(s32 posp, s32 posn);
int GetLeisaMotoXErrcode(u16 * errcode);
int GetLeisaMotoYErrcode(u16 * errcode);
#endif