当前位置:网站首页>[trio basic from introduction to mastery tutorial XIV] trio realizes unit axis multi-color code capture
[trio basic from introduction to mastery tutorial XIV] trio realizes unit axis multi-color code capture
2022-07-05 08:01:00 【Changjiang houlang blog】
Hello everyone , I believe many friends have used or heard of the color code function .Trio Simple configuration of physical axis can realize the function of double color code .
TRIO The color code capture command used is shown in the following figure :
REGIST(20, channel, source, edge, window [,quantity, table_start])

We use A、B Two channels can capture the two-color code . If you want to realize the function of multi axis color code , Then we need special methods to deal with :
The method is as follows : Superimpose the desired snap axis position to the virtual axis , We capture the position of the virtual axis .
Be careful : Because the virtual axis is used , The hardware capture speed is less than the solid axis speed .
Next : Let's look directly at the code examples
'clear axis(3) motion buffer
BASE(3)
UNITS=1
CANCEL(2)
WAIT IDLE
WA(100)
DEFPOS(0)
WAIT UNTIL OFFPOS=0
WA(10)
BASE(4)
UNITS=1
DEFPOS(DPOS AXIS(3))
WAIT UNTIL OFFPOS=0
ADDAX(3)
BASE(3)
UNITS=1000
SPEED=1
DECEL=10
ACCEL=10
REG_INPUTS=$21
BASE(4)
UNITS=1000
SPEED=1
DECEL=10
ACCEL=10
WDOG=1
FORWARD AXIS(3)
'input in 1
REGIST(20, 0, 0, 0, 0) AXIS(3)
'input in 2
REGIST(20, 1, 0, 0, 0) AXIS(3)
'input in 3
REGIST(20, 3, 4, 0, 0) AXIS(4)
WHILE TRUE
IF MARK AXIS(3) THEN
PRINT "MarkA pos=",REG_POS AXIS(3)
WA(200)
REGIST(20, 0, 0, 0, 0) AXIS(3)
ENDIF
IF MARKB AXIS(3) THEN
PRINT "MarkB pos=",REG_POSB AXIS(3)
WA(200)
REGIST(20, 1, 0, 0, 0) AXIS(3)
ENDIF
IF MARK AXIS(4) THEN
PRINT "MarkC pos=",REG_POS AXIS(4)
WA(200)
REGIST(20, 3, 4, 0, 0) AXIS(4)
ENDIF
WEND Test plan :IO Input 1,2,3 Short circuited together , The color code for certificate processing is triggered at the same time .IN1-2 Connected to the body axis 3 On ,IN3 Connected to virtual axis 4 On . Let's look at the actual operation results

The accuracy is within our range , Meet our testing requirements .
Thank you. ~~~
边栏推荐
- Pointnet++ classification practice
- Shape template matching based on Halcon learning [9] PM_ multiple_ dxf_ models. Hdev routine -- [read and write XLD from DXF file]
- Global and Chinese markets for recycled boilers 2022-2028: Research Report on technology, participants, trends, market size and share
- Global and Chinese market of plastic recycling machines 2022-2028: Research Report on technology, participants, trends, market size and share
- Shell script basic syntax
- UEFI development learning 2 - running ovmf in QEMU
- How to realize audit trail in particle counter software
- Shell脚本基本语法
- Some thoughts on extracting perspectives from ealfa and Ebeta
- IEEE access personal contribution experience record
猜你喜欢

The firmware of the connected j-link does not support the following memory access
![C WinForm [exit application] - practice 3](/img/25/30c795cc3fa6931eb1d733719d4ad0.jpg)
C WinForm [exit application] - practice 3

研究發現,跨境電商客服系統都有這五點功能!

A complete set of indicators for the 10000 class clean room of electronic semiconductors

Embedded composition and route

Volatile of C language

Ads learning record (lna_atf54143)

MySQL blind note common functions

Realization of binary relation of discrete mathematics with C language and its properties

Drive LED -- GPIO control
随机推荐
Measurement fitting based on Halcon learning [i] fuse Hdev routine
Win10 shortcut key
Global and Chinese market of core pallets 2022-2028: Research Report on technology, participants, trends, market size and share
Shape template matching based on Halcon learning [viii] PM_ multiple_ models. Hdev routine
·Practical website·
Reasons for rapid wear of conductive slip rings
Gradle复合构建
Network communication model -- Network OSI tcp/ip layering
Gradle composite construction
Measurement fitting based on Halcon learning [III] PM_ measure_ board. Hdev routine
导电滑环磨损快的原因
Connection mode - bridge and net
Ads learning record (lna_atf54143)
Application of ultra pure water particle counter in electronic semiconductors
String judgment
如何进行导电滑环选型
The printer encountered an abnormal configuration problem 0x8007007e (win10)
Global and Chinese markets for anesthesia, breathing and sleep apnea devices 2022-2028: Research Report on technology, participants, trends, market size and share
C language # and #
C WinForm [help interface - send email] - practice five