You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

关于SMC JXC91通过Ethernet/IP获取LER50-K执行器名称的技术问询

可行解决方案

针对SMC JXC91 + LER50-K执行器的Ethernet/IP通信,获取执行器名称的几个可行方向:

  • 枚举厂商自定义对象:Ethernet/IP中厂商自定义对象的Class ID通常从0x0064(十进制100)开始。用你的C#库调用ListIdentity服务枚举设备内所有对象类,过滤出非标准的厂商类,再通过GetInstanceList和GetAttributeList服务读取这些对象的属性,重点查找名称类属性(通常Attribute ID为1)。

  • 分析Assembly Object数据:尝试读取Assembly Object(Class ID 0x04)的实例数据,部分设备会将附属执行器的信息打包在Assembly实例中。可以枚举Assembly的所有实例,读取每个实例的属性或整个实例的数据,解析是否包含LER50-K的名称。

  • 抓包复刻厂商程序通信:用Wireshark抓取ACTC Controller与JXC91的Ethernet/IP通信包,定位程序获取执行器名称时发送的服务请求(比如GetAttributeSingle、GetAttributeList或厂商自定义服务),记录对应的Class ID、Instance ID、Attribute ID,然后在C#代码中复刻该请求。

  • 检查Parameter Object:尝试访问Parameter Object(Class ID 0x0F),部分运动控制设备会将附属设备参数存储在此处,通过GetAttributeList或GetParameter服务读取相关参数条目。

代码示例(枚举厂商自定义对象)

// 假设client是已建立连接的Ethernet/IP客户端
var listIdentityReq = new ListIdentityRequest();
var listIdentityResp = await client.SendRequestAsync(listIdentityReq);

foreach (var identity in listIdentityResp.Identities)
{
    // 筛选厂商自定义对象类
    if (identity.ClassId >= 0x0064)
    {
        Console.WriteLine($"检测到厂商自定义类: 0x{identity.ClassId:X4}");
        
        // 获取该类的所有实例
        var getInstanceListReq = new GetInstanceListRequest(identity.ClassId);
        var getInstanceListResp = await client.SendRequestAsync(getInstanceListReq);
        
        foreach (var instanceId in getInstanceListResp.InstanceIds)
        {
            // 读取实例的核心属性(1=名称,2=描述等)
            var getAttrListReq = new GetAttributeListRequest(identity.ClassId, instanceId, new uint[] { 1, 2 });
            var getAttrListResp = await client.SendRequestAsync(getAttrListReq);
            
            foreach (var attr in getAttrListResp.Attributes)
            {
                if (attr.AttributeId == 1)
                {
                    string actuatorName = Encoding.ASCII.GetString(attr.Data).Trim('\0');
                    Console.WriteLine($"找到执行器名称: {actuatorName}");
                }
            }
        }
    }
}

内容的提问来源于stack exchange,提问作者RosJes

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.16 16:21:01