日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

ABB 机器人 压包指令PackRawBytes 解包指令UnpackRawBytes

發(fā)布時間:2023/12/10 编程问答 29 豆豆
生活随笔 收集整理的這篇文章主要介紹了 ABB 机器人 压包指令PackRawBytes 解包指令UnpackRawBytes 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
ABB? 壓包指PackRawBytes?? 解包指令UnpackRawBytes???

???PackRawBytes- 將數(shù)據(jù)導(dǎo)入 rawbytes 數(shù)據(jù)。
??? 使用方法
????PackRawBytes 用于將 num, dnum, byte,或者 string類型的數(shù)據(jù),打包到? rawbytes 類型的變量中.
???? 基本舉例? :


??????? VAR rawbytes raw_data;
????? ? VAR num integer := 8;
????? ? VAR dnum bigInt := 4294967295;
????? ? VAR num float := 13.4;
??????? VAR byte data1 := 122;
???? ?? VAR byte byte1;
???? ?? VAR string string1:="abcdefg";
???? ?? PackDNHeader "10", "20 1D 24 01 30 64", raw_data;

?????? 將 DeviceNet 頭文件 打包到? raw_data.
?????? 然后通過? PackRawBytes? 打包要求的現(xiàn)場總線數(shù)據(jù)到 raw_data 中 。下面的例子展示了不同的數(shù)據(jù)如何被添加。
?????? Example 1
????????????? PackRawBytes ? ? integer,???? raw_data,???? (RawBytesLen(raw_data)+1)?? \IntX :=DINT;
???? ? 在 raw_data 中,頭文件之后的下四個字節(jié)將是 8.
????? Example 2
???????????? PackRawBytes bigInt, raw_data, (RawBytesLen(raw_data)+1) \IntX :=
UDINT;
The contents of the next 4 bytes after the header in raw_data will be 4294967295
decimal.
Example 3
PackRawBytes bigInt, raw_data, (RawBytesLen(raw_data)+1) \IntX :=
LINT;
The contents of the next 8 bytes after the header in raw_data will be 4294967295
decimal.
Example 4
PackRawBytes float, raw_data, RawBytesLen(raw_data)+1) \Float4;
The contents of the next 4 bytes in raw_data will be 13.4 decimal.
Example 5
PackRawBytes data1, raw_data, (RawBytesLen(raw_data)+1) \ASCII;
The contents of the next byte in raw_data will be 122, the ASCII code for "z".
Example 6
PackRawBytes string1, raw_data, (RawBytesLen(raw_data)+1) \ASCII;
The contents of next 7 bytes in raw_data will be "abcdefg", coded in ASCII.
Example 7
byte1 := StrToByte("1F" \Hex);



總結(jié)

以上是生活随笔為你收集整理的ABB 机器人 压包指令PackRawBytes 解包指令UnpackRawBytes的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。