发布于 2009-03-09 22:11:59
0楼
这是其中一个函数的说明:
4.3.3 as200_eamsmvs_field_read
These functions read an amount of bytes from the PLC and transfer them to a
transfer buffer of the PG/PC.
With as200_e_field_read input bytes can be read.
With as200_a_field_read output bytes can be read.
With as200_m_field_read flag bytes can be read.
With as200_sm_field_read special flag bytes can be read.
With as200_vs_field_read variable memory bytes can be read.
int as200_e_field_read (int nStartNo, int * pnAnzahl, void * Buffer);
int as200_a_field_read (int nStartNo, int * pnAnzahl, void * Buffer);
int as200_m_field_read (int nStartNo, int * pnAnzahl, void * Buffer);
int as200_sm_field_read (int nStartNo, int * pnAnzahl, void * Buffer);
int as200_vs_field_read (int nStartNo, int * pnAnzahl, void * Buffer);
Parameters
nStartNo
[in] Start number of the first byte to be read
pnAnzahl
[in/out] Amount of bytes to be read
Buffer
[out] Transfer buffer for the bytes which were read
Return Values
If there were no errors, the function supplies 0 as the return value, otherwise an
error message which can be evaluated in accordance with the error table (see
error_message).
Call Example
char Buffer[MAX_BUFFER];
unsigned char * cBuffer = (unsigned char *)Buffer; // byte-by-byte unsigned access
没有