当前位置:网站首页>[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 the problem that MySQL connector net cannot be cleared in MySQL
- The printer encountered an abnormal configuration problem 0x8007007e (win10)
- How to select conductive slip ring
- Ten thousand words detailed eight sorting must read (code + dynamic diagram demonstration)
- Beijing Winter Olympics opening ceremony display equipment record 3
- Shape template matching based on Halcon learning [v] find_ cocoa_ packages_ max_ deformation. Hdev routine
- Application of ultra pure water particle counter in electronic semiconductors
- After installing the new version of keil5 or upgrading the JLINK firmware, you will always be prompted about the firmware update
- Adaptive filter
- Relationship between line voltage and phase voltage, line current and phase current
猜你喜欢
万字详解八大排序 必读(代码+动图演示)
About the problem that MySQL connector net cannot be cleared in MySQL
Network port usage
Halcon's practice based on shape template matching [2]
Step motor generates S-curve upper computer
Train your dataset with yolov4
How to migrate the device data accessed by the RTSP of the easycvr platform to easynvr?
Altium Designer 19.1.18 - 隐藏某一个网络的飞线
Drive LED -- GPIO control
C WinForm [view status bar -- statusstrip] - Practice 2
随机推荐
How to select conductive slip ring
Halcon's practice based on shape template matching [2]
Use of orbbec Astra depth camera of OBI Zhongguang in ROS melody
Define in and define out
Mlperf training v2.0 list released, with the same GPU configuration, the performance of Baidu PaddlePaddle ranks first in the world
Measurement fitting based on Halcon learning [III] PM_ measure_ board. Hdev routine
UEFI development learning 6 - creation of protocol
.NET服务治理之限流中间件-FireflySoft.RateLimit
Scm-05 basis of independent keyboard
The global and Chinese market of lithographic labels 2022-2028: Research Report on technology, participants, trends, market size and share
Carrier period, electrical speed, carrier period variation
研究发现,跨境电商客服系统都有这五点功能!
Drive LED -- GPIO control
Live555 RTSP audio and video streaming summary (II) modify RTSP server streaming URL address
Extern keyword function
导电滑环磨损快的原因
Altium designer 19.1.18 - hide the fly line of a network
A complete set of indicators for the 10000 class clean room of electronic semiconductors
[popular science] some interesting things that I don't know whether they are useful or not
Measurement fitting based on Halcon learning [II] meaure_ pin. Hdev routine