Aerotech系列(0)运动控制篇

#include <stdio.h>
#include <tchar.h>

// Main include file
#include "A3200.h"

#include <QDebug>

// See the pre-build event to see the System Library dlls being copied to the output directory

#define NUM_LINES 10
#define LINE_SIZE 128

// This function will print whatever the latest error was
void PrintError();

int main(int argc, char **argv)
{
//1.generic example
//    A3200Handle handle;
//    A3200Connect(&handle);
//    A3200AcknowledgeAll(handle, TASKID_01);
//    A3200Disconnect(handle);
//    DOUBLE result;
//    if(A3200Connect(&handle)) {

//        A3200MotionDisable(handle, TASKID_01, (AXISMASK)(AXISMASK_00 | AXISMASK_01));

//        // Gets axis status and gets its first bit
//        A3200CommandExecute(handle, TASKID_Library, "AxisStatus(X, DATAITEM_AxisStatus) & 0x1", &result);
//        qDebug() << "Axis X status is: " << result;

//        A3200CommandExecute(handle, TASKID_Library, "AxisStatus(Y, DATAITEM_AxisStatus) & 0x1", &result);
//        qDebug() << "Axis Y status is: " << result;

//        A3200Disconnect(handle);

//    }

//2.Motion Examples
//2.1 enable
//    A3200Handle handle;
//    A3200Connect(&handle);
//    A3200MotionEnable(handle, TASKID_01, (AXISMASK)(AXISMASK_00 | AXISMASK_01));
//    A3200Disconnect(handle);

 //2.2 disaable
//    A3200Handle handle;
//    A3200Connect(&handle);
//    A3200MotionDisable(handle, TASKID_01, (AXISMASK)(AXISMASK_00 | AXISMASK_01));
//    A3200Disconnect(handle);

//2.3 faultAck
//    A3200Handle handle;
//    A3200Connect(&handle);
//    bool bhas_fault = A3200MotionFaultAck(handle, TASKID_01, (AXISMASK)(AXISMASK_00 | AXISMASK_01));
//    qDebug() << bhas_fault;
//    A3200Disconnect(handle);
//2.4 home
//    A3200Handle handle;
//    A3200Connect(&handle);
//    A3200MotionEnable(handle, TASKID_01, (AXISMASK)(AXISMASK_00 | AXISMASK_01| AXISMASK_02));
//    A3200MotionHome(han
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值