ABB 压包指令PackRawBytes 解包指令UnpackRawBytes
来源:互联网 发布:简述什么是云计算 编辑:程序博客网 时间:2024/05/22 16:45
ABB 压包指令PackRawBytes 解包指令UnpackRawBytes
PackRawBytes- 将数据导入 rawbytes 数据。
使用方法
PackRawBytes 用于将 num, dnum, byte,或者 string类型的数据,打包到 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 打包要求的现场总线数据到 raw_data 中 。下面的例子展示了不同的数据如何被添加。
Example 1
PackRawBytes integer, raw_data, (RawBytesLen(raw_data)+1) \IntX :=DINT;
在 raw_data 中,头文件之后的下四个字节将是 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);
- ABB 压包指令PackRawBytes 解包指令UnpackRawBytes
- ABB 机器人 压包指令PackRawBytes 解包指令UnpackRawBytes
- JSP引包指令
- war包的指令
- ABB 机器人 通信指令(人机对话):
- Linux rpm包操作指令
- 常用的Gentoo包管理指令
- 用jar指令打war包方法
- java指令 运行带包的类
- 使用ADB指令删除Android安装包
- RPM软件安装包-rpm指令操作
- (常用)收包,发包指令
- ABB 机器人 IsStopMoveAct 指令 - Is stop move flags active
- ABB MOVEL指令执行未完成就执行下一条
- 短信买AT指令,为啥没有二次开发包呢???
- 在cmd中使用指令来执行jar包
- cmd命令 maven指令手动导入 jar包
- wildfly8.2 standalone linux 部署war包指令
- CSS z-index 属性的使用方法和层级树的概念
- 编译Linux Kernel
- title与alt的区别
- 海量Android教程、开发资料和源码
- Django的Q查询
- ABB 压包指令PackRawBytes 解包指令UnpackRawBytes
- 在T-SQL语句中访问远程数据库(openrowset/opendatasource/openquery)
- Android应用中使用及实现系统“分享”接口
- Hadoop常见异常及其解决方案
- struts2 版本升级2.3.16.3解决多个前缀参数远程命令行漏洞 josn
- 利用json获取天气信息
- In Ubuntu cordova platform or build, happen error
- 微店网,我与你一起存在
- ArcGIS教程:路径距离分析