Prodave6.dll中为什么没有以前版本中的e_field_read函数了
用新版本的Prodave6.dll要怎么读取输入输出量呢,如E11.1,使用哪个函数可以读取输入量?
答:函数变了,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).
你可以看一下帮助
楼主最近还看过