当前位置:网站首页>[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. ~~~
边栏推荐
- Ads usage skills
- Altium designer learning (I)
- Realization of binary relation of discrete mathematics with C language and its properties
- Shape template matching based on Halcon learning [VII] reuse_ model. Hdev routine
- Drive LED -- GPIO control
- Global and Chinese market of digital shore durometer 2022-2028: Research Report on technology, participants, trends, market size and share
- C WinForm [view status bar -- statusstrip] - Practice 2
- Application of ultra pure water particle counter in electronic semiconductors
- High end electronic chips help upgrade traditional oil particle monitoring
- Software designer: 03 database system
猜你喜欢

Record the visual shock of the Winter Olympics and the introduction of the screen 2

Network port usage

Consul安装

UEFI development learning 5 - simple use of protocol

PMSM dead time compensation

Extended application of single chip microcomputer-06 independent key

万字详解八大排序 必读(代码+动图演示)

如何进行导电滑环选型

Drive LED -- GPIO control

Network communication model -- Network OSI tcp/ip layering
随机推荐
Global and Chinese market of peeled bourdon tubes 2022-2028: Research Report on technology, participants, trends, market size and share
Adaptive filter
Global and Chinese market of urban rail connectors 2022-2028: Research Report on technology, participants, trends, market size and share
Improve lighting C program
Interview catalogue
How to excavate and research ideas from the paper
The global and Chinese market of lithographic labels 2022-2028: Research Report on technology, participants, trends, market size and share
研究發現,跨境電商客服系統都有這五點功能!
About yolov3, conduct map test directly
C language uses arrays to realize the intersection, union, difference and complement of sets
MLPerf Training v2.0 榜单发布,在同等GPU配置下百度飞桨性能世界第一
Shape template matching based on Halcon learning [viii] PM_ multiple_ models. Hdev routine
UEFI development learning 4 - getting to know variable services
Ads learning record (lna_atf54143)
Win10 shortcut key
C WinForm [change the position of the form after running] - Practical Exercise 4
Shell script basic syntax
Altium designer 19.1.18 - change the transparency of copper laying
IEEE access personal contribution experience record
Altium designer learning (I)