C++通过R3IO与倍福Twincat交互的几个主要接口函数

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 
);

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值