跳转至

DLLVirtIOSetRegisterInput

函数 DLLVirtIOSetRegisterInput 写入控制器虚拟浮点寄存器输入。(寄存器为 double 精度浮点型 IO,可存储模拟量数据如位置、速度、力等。)

所属:C/C++ API 函数索引

C/C++

ErrorCode DLLVirtIOSetRegisterInput(INT_PTR hClientHandle, int startIndex, const double* values, int count);

C#

Controller.Variables.VirtualIO.Register.Inputs.SetMultiple(start, values) — 批量写入虚拟寄存器输入。

参数

hClientHandle (INT_PTR)

客户端会话句柄,由 DLLSysConnect 获取。

startIndex (int)

写入起始索引(0-indexed)。

values (const double*)

输入。要写入的 double 值数组。

count (int)

要写入的寄存器数量。

返回值

返回 ErrorCodeNoError (0) 表示成功,正值为错误码,详见 SDK 发布头 ErrorCode.h。

示例

double setpoints[2] = {3.14, 6.28};
DLLVirtIOSetRegisterInput(handle, 0, setpoints, 2);

相关函数