DLLSetParameter
函数 DLLSetParameter 按参数名称写入控制器参数值。(支持轴特定参数与任务特定参数的作用域指定。)
C/C++
ErrorCode DLLSetParameter(INT_PTR hClientHandle, const char* parameterName, int axisNumber, int taskNumber, const char* value);
C#
ControllerParameters 门面为本版本内部 API;C# 客户请使用本 C API 写入参数。
参数
hClientHandle (INT_PTR)
客户端会话句柄,由 DLLSysConnect 获取。
parameterName (const char*)
参数名称字符串。
axisNumber (int)
轴编号(0-indexed)。-1 或 0 表示不针对特定轴。
taskNumber (int)
任务编号(1-indexed)。-1 或 0 表示不针对特定任务。
value (const char*)
要写入的参数值字符串表示。
返回值
返回 ErrorCode;NoError (0) 表示成功,ParameterNotFound 表示参数不存在,ParameterTypeInvalid 或 ParameterValueOutOfRange 表示值格式或范围错误,详见 SDK 发布头 ErrorCode.h。
说明
修改参数后如需持久化需调用 DLLSaveParameters。部分参数修改后可能需要 DLLInitializeSystem 复位才生效。
示例
DLLSetParameter(handle, "MaxSpeedClamp", 0, 0, "100");