当前位置:网站首页>Yamaha robot splits visual strings
Yamaha robot splits visual strings
2022-06-26 05:47:00 【self85】
'---------------------- Visual data analysis ----------------------------
SUB *SplitStrToPos(Source$, xTag!, yTag!, rTag!)
pos% = 0 ' The array subscript
DIM sysPos!(3) ' Define array elements sysPos!(0) ? sysPos!(3)
FOR Index% = 1 TO LEN(Source$)
IF MID$(Source$,Index%,1) = "," THEN
sysPos!(pos%) = VAL(MID$(Source$,1,Index%-1))
pos% = pos% + 1
Source$ = MID$(Source$,Index% + 1,LEN(Source$)-Index%)
Index% = 0
ENDIF
NEXT Index%
xTag! = sysPos!(0)
yTag! = sysPos!(1)
rTag! = sysPos!(2)
END SUB
A simple translation
'---------------------- Visual data analysis ----------------------------
SUB *SplitStrToPos(Source$, xTag!, yTag!, rTag!)
' Split the string to get the dot ( The string passed in , Got X coordinate ,Y coordinate ,RZ angle )
pos% = 0 ' The array subscript
DIM sysPos!(3) ' Define array elements sysPos!(0) ? sysPos!(3)
' Defines a one-dimensional array , There are three elements in total ,0-2
FOR Index% = 1 TO LEN(Source$)
'for Cycle from 1 Start to " The total length of the string passed in "
IF MID$(Source$,Index%,1) = "," THEN
'MID$(Source$,Index%,1) It means in Source$ in , from Index% Start looking for , look for 1 position
' find "," After entering if The cycle of
sysPos!(pos%) = VAL(MID$(Source$,1,Index%-1))
'sysPos Array assignment ,
'MID$(Source$,1,Index%-1) stay Source$ In the string , Start from the first , The termination bit is found "," Count forward one digit
pos% = pos% + 1
'sysPos Array subscript auto increment , Assign a value to the next loop , Corresponding to the back sysPos!(0)/sysPos!(1)/sysPos!(2)
Source$ = MID$(Source$,Index% + 1,LEN(Source$)-Index%)
'MID$(Source$,Index% + 1,LEN(Source$)-Index%)
' stay Source$ In the string , From the last time I found "," The location starts to look for , Then I'll intercept all the remaining strings .
' For example , The string passed is "25,28,36,", The first cycle will remove X Coordinates of 25,
' then Source$ The string is now "28,36,"
' The third time is "36,"
Index% = 0
ENDIF
NEXT Index%
xTag! = sysPos!(0)
yTag! = sysPos!(1)
rTag! = sysPos!(2)
END SUB
边栏推荐
- bingc(继承)
- Supplementary course on basic knowledge of IM development (II): how to design a server-side storage architecture for a large number of image files?
- 操作符的优先级、结合性、是否控制求值顺序【详解】
- Cyclic displacement
- Summary of the 10th provincial Blue Bridge Cup
- A love that never leaves
- Pytorch中自己所定义(修改)的模型加载所需部分预训练模型参数并冻结
- 国务院发文,完善身份认证、电子印章等应用,加强数字政府建设
- 适配器模式
- 从新东方直播来探究下小程序音视频通话及互动直播
猜你喜欢

423- binary tree (110. balanced binary tree, 257. all paths of binary tree, 100. same tree, 404. sum of left leaves)

Kolla ansible deploy openstack Yoga version

Gram 矩阵

【 langage c】 stockage des données d'analyse approfondie en mémoire

REUSE_ ALV_ GRID_ Display event implementation (data_changed)

SDN based DDoS attack mitigation

There are applications related to web network request API in MATLAB (under update)
Posting - don't get lost in the ocean of Technology

Pytorch (network model)

Sofa weekly | open source person - Yu Yu, QA this week, contributor this week
随机推荐
小程序第三方微信授权登录的实现
SDN based DDoS attack mitigation
冒泡排序(Bubble Sort)
Project suspension
421- binary tree (226. reversed binary tree, 101. symmetric binary tree, 104. maximum depth of binary tree, 222. number of nodes of complete binary tree)
RIA ideas
Bingc (inheritance)
Introduction to GUI programming to game practice (II)
Installation and deployment of alluxio
使用Jenkins执行TestNg+Selenium+Jsoup自动化测试和生成ExtentReport测试报告
How Navicat reuses the current connection information to another computer
Kolla ansible deploy openstack Yoga version
原型模式,咩咩乱叫
Cyclic displacement
Daily production training report (16)
The State Council issued a document to improve the application of identity authentication and electronic seals, and strengthen the construction of Digital Government
cross entropy loss = log softmax + nll loss
Win socket programming (Mengxin initial battle)
使用Jedis监听Redis Stream 实现消息队列功能
MySQL数据库-01数据库概述