嗨,我正在尝试将命令从python发送到New Focus Picomotor控制器。 控制器的命令应该存储在我拥有的.dll库中。有没有办法加载该库并调用其中的函数?
我应该首先初始化控制器以开始通信。其中涉及调用函数“ CmdLib8742”
为我提供了CmdLib Api的列表,该列表提供了可能由支持在.NET库中调用函数的语言调用的构造函数和方法的列表。
我知道我应该使用ctypes。但是在溢出中列出的多种解决方案似乎给了我一个错误,提示“属性错误,未找到函数”
这是前两个示例。
/// <summary>
/// Constructor.
/// </summary>
public CmdLib8742 ()
/// < summary >
/// Constructor.
/// < /summary >
/// < param name="logging" >True to request logging, otherwise false.< /param >
/// < param name="msecDelayForDiscovery" >The number of milliseconds to wait for devices to be discovered.< /param >
/// < param name="deviceKey" >The first device in the list of open instruments (null = none found).< /param >
public CmdLib8742 (bool logging, int msecDelayForDiscovery, ref string deviceKey)