当前位置:网站首页>[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. ~~~
边栏推荐
- About yolov3, conduct map test directly
- Volatile of C language
- Shell脚本基本语法
- ·Practical website·
- Global and Chinese market of rammers 2022-2028: Research Report on technology, participants, trends, market size and share
- Consul installation
- C language uses arrays to realize the intersection, union, difference and complement of sets
- .NET服务治理之限流中间件-FireflySoft.RateLimit
- C#,数值计算(Numerical Recipes in C#),线性代数方程的求解,LU分解(LU Decomposition)源程序
- Connection mode - bridge and net
猜你喜欢
Communication standard -- communication protocol
Altium designer 19.1.18 - Import frame
Can't find real-time chat software? Recommend to you what e-commerce enterprises are using!
Embedded composition and route
Network communication model -- Network OSI tcp/ip layering
C, Numerical Recipes in C, solution of linear algebraic equations, LU decomposition source program
Altium designer 19.1.18 - hide the fly line of a network
Acwing-宠物小精灵之收服-(多维01背包+正序倒序+两种形式dp求答案)
The research found that the cross-border e-commerce customer service system has these five functions!
Acwing - the collection of pet elves - (multidimensional 01 Backpack + positive and reverse order + two forms of DP for the answer)
随机推荐
Programming knowledge -- assembly knowledge
C#,数值计算(Numerical Recipes in C#),线性代数方程的求解,LU分解(LU Decomposition)源程序
Fundamentals of C language
Record the visual shock of the Winter Olympics and the introduction of the screen 2
Class of color image processing based on Halcon learning_ ndim_ norm. hdev
Extern keyword function
Random function usage notes
Bootloader implementation of PIC MCU
Pointnet++ classification practice
UEFI development learning 3 - create UEFI program
Summary -st2.0 Hall angle estimation
Extended application of single chip microcomputer-06 independent key
Reasons for rapid wear of conductive slip rings
Global and Chinese markets for flexible endoscopic lithotripsy devices 2022-2028: Research Report on technology, participants, trends, market size and share
研究發現,跨境電商客服系統都有這五點功能!
Measurement fitting based on Halcon learning [II] meaure_ pin. Hdev routine
Shape template matching based on Halcon learning [9] PM_ multiple_ dxf_ models. Hdev routine -- [read and write XLD from DXF file]
Altium Designer 19.1.18 - 清除测量距离产生的信息
General makefile (I) single C language compilation template
Programming knowledge -- basis of C language