
Side-Connect API Library Functions MVI-ADM ♦ 'C' Programmable
Developer's Guide 'C' Programmable Application Development Module
Page 318 of 342 ProSoft Technology, Inc.
February 20, 2013
11.7 Side-connect API Block Transfer Functions
MVIsc_PLCBTRead
Syntax
int MVIsc_PLCBTRead(HANDLE handle, WORD *buf, BYTE rack, BYTE group, BYTE slot,
BYTE size );
Parameters
Handle returned by previous call to MVIsc_Open
Pointer to buffer to receive data from I/O module
Rack number of the I/O module to be read
I/O group number of the I/O module
Slot number within the I/O group
Description
MVIsc_PLCBTRead requests the PLC-5 to perform a block transfer read from an
intelligent I/O module.
handle must be a valid handle returned from MVIsc_Open.
buf must point to a buffer of at least size words in size.
Return Value
The block transfer was completed successfully.
handle does not have access
Parameter contains invalid value
Example
HANDLE Handle;
WORD buf[8];
int rc;
/* Read 8 words of data from I/O module in rack 1, I/O group 1, slot 2 */
rc = MVIsc_PLCBTRead(Handle, buf, 1, 1, 2, 8);
if (rc != MVISC_SUCCESS)
printf("ERROR: MVIsc_PLCBTRead failed");
Comentarios a estos manuales