浮名此生分享 http://blog.sciencenet.cn/u/hailangww 工学博士

博文

Asynchronous Motion

已有 391 次阅读 2025-7-24 14:05 |系统分类:科研笔记

// Asynchronous Motion Example:

// Demonstrates using MoveIncremental(), MoveAbsolute() and MoveFreerun() axis-based motion.

program

// Enable and home the axes.

Enable([X, Y, Z])

Home([X, Y, Z])

// Configure the axis-based ramping settings.

// X and Y will use Linear ramping.  Z will use Sine ramping.

SetupAxisRampType([X, Y], RampType.Linear)

 SetupAxisRampType(Z, RampType.Sine)

// X, Y, and Z will use a ramp rate of 1000.0 units/sec/sec.

SetupAxisRampValue([X, Y, Z], RampMode.Rate, 1000.0)

SetupAxisRampValue(Z,0,500)

// Move X, Y, and Z to an initial position of 10 units.

// Move all axes at 20 units/second. // Note: The AeroScript program flow immediately continues after an asynchronous move // is started, so we must explicitly wait for the moves to complete.

MoveAbsolute([X, Y, Z], [10.0, 10.0, 10.0], [20.0, 20.0, 20.0])

WaitForInPosition([X, Y, Z])

// Trigger a data collection snapshot in Studio.

AppDataCollectionSnapshot()

// Perform independent axis moves on X and Y using absolute target positions, followed by

// a move on Z using an incremental distance. // Move X and Y independently to (27.0 units, 13.5 units). // X will move at a maximum speed of 50 units/second. // Y will move at a maximum speed of 75 units/second.

MoveAbsolute([X, Y], [27.0, 13.5], [50.0, 75.0])

WaitForMotionDone([X, Y])

// Move Z from its current location by -15.5 units at a speed of 20.0 units/second.

MoveIncremental(Z, -15.5, 20.0)

WaitForMotionDone(Z)

// Perform a freerun move on the Z axes to a constant velocity of +30.0 units/second.

// After 2 seconds, change the speed to -40.0 units/second. // After 2 additional seconds, stop the motion.

Dwell(1.0)

MoveFreerun(Z, 30.0)

Dwell(2.0)

MoveFreerun(Z, -40.0)

Dwell(2.0)

MoveFreerunStop(Z)

WaitForMotionDone(Z)

// Stop data collection.

AppDataCollectionStop()

// Disable the axes.

Disable([X, Y, Z])

end



https://wap.sciencenet.cn/blog-54347-1495019.html

上一篇:Aerotech Autofocus
收藏 IP: 218.1.218.*| 热度|

1 王涛

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...
扫一扫,分享此博文

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2025-8-2 19:53

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部