Prodave6.dll中为什么没有以前版本中的e_field_read函数了

使用新版本的Prodave6.dll要怎么读取输入输出量呢,如E11.1,使用哪个函数可以读取输入量?

问题补充:
比如有几个变量E11.1,E11.2,E11.3,E11.4是不是先读取开始地址1个字节的数据,然后分别处理每一位作为每个变量的值。
新手,好多不太懂,还请见谅!

图片说明:

Prodave6.dll中为什么没有以前版本中的e_field_read函数了   

最佳答案

函数变了,field_read_ex6
int field_read_ex6 (char FieldType, unsigned short BlkNr, unsigned short
StartNr, unsigned long Amount, unsigned long BufLen, unsigned char *
pBuffer, unsigned long * pDatLen);
Parameters
FieldType
[in] Value types as ASCII characters: Data byte (d/D), input byte (e/E), output byte
(a/A), memory byte (m/M), timer word (t/T), counter word (z/Z)
BlkNr
[in] Block number (only required for data blocks), default = 0
StartNr
[in] Start number of the first byte or word to be read
Amount
[in] Amount of bytes or words to be read
BufLen
[in] Length of the transfer buffer specified by the user in bytes
pBuffer
[out] Transfer buffer for the read bytes or words
pDatLen
[out] Pointer on length of data delivered to the buffer in bytes. In event of error,
"Transfer buffer supplied too small for data" is returned and required buffer size
given.
Return Values
If there were no errors, the function supplies 0 as the return value, otherwise an
error message is given which can be evaluated in accordance with the error table
(see GetErrorMessage_ex6).
你可以看一下帮助

——————————————————————————————————————————

是啊,你读一个字节,然后再处理字节里的8个位

提问者对于答案的评价:
谢谢,之前犹豫是用mb_bittest_ex6还是field_read_ex6,虽然暂时没法确定取到的数据到底是否正确,至少给我指明了方向。

最佳答案作者回复:
mb_bittest_ex6只能读位内存即M区。

原创文章,作者:more0621,如若转载,请注明出处:https://www.zhaoplc.com/plc248402.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2018年12月2日
下一篇 2018年12月2日

相关推荐