C++通过R3IO与Twincat交互的几个主要接口函数
1,The TCatIoOpen function opens a connection to the TwinCAT I/O Server. Before any I/O processing TCatIoOpen should be called.
LRESULT TCatIoOpen();
2,The TCatIoInputUpdate function initiates the input mapping of the specified task.
LRESULT TCatIoInputUpdate(
USHORT nPort
);
Return Values
If the function fails, the return value is non zero. Possible error codes:
-1: I/O connection is not initialized
IOERR_IOSTATEBUSY [0x2075]: I/O device is not ready
3,The TCatIoOutputUpdate function initiates the output mapping of the specified task.
LRESULT TCatIoOutputUpdate(
USHORT nPort
);
4,The TCatIoGetInputPtr function allocates an input buffer for the incoming process image.
LRESULT TCatIoGetInputPtr (
USHORT nPort,
VOID** ppInp,
int nSize
);
5,The TCatIoGetOutputPtr function allocates an output buffer for the outgoing process image.
LRESULT TCatIoGetOutputPtr (
USHORT nPort,
VOID** ppOutp,
int nSize
);

2087

被折叠的 条评论
为什么被折叠?



