산업 제조
산업용 사물 인터넷 | 산업자재 | 장비 유지 보수 및 수리 | 산업 프로그래밍 |
home  MfgRobots >> 산업 제조 >  >> Manufacturing Technology >> 산업기술

OCI 컨테이너에서 grpcurl로 PLCnext Control 로컬 gRPC 상호작용

이것은 PLCnext Control 장치에서 PLCnext Runtime의 gRPC 서버와 상호작용하기 위해 gRPC를 사용하는 시리즈의 최신 편입니다.

시리즈의 이전 포스트들은 다음과 같습니다:

위에 나열된 기사들은 원격 클라이언트 장치에서 PLCnext Control 장치의 gRPC 서버에 접근하는 방법을 보여줍니다. 이 포스트는 로컬 gRPC 클라이언트, 즉 PLCnext Control 장치에서 실행되며 동일한 장치의 gRPC 서버에 접근하는 gRPC 클라이언트의 예시를 제공합니다.

PLCnext Control 장치에서 로컬 gRPC 클라이언트의 다른 예시는 여기에서 찾을 수 있습니다:

PLCnext Control 장치에는 표준으로 gRPC 클라이언트 소프트웨어가 설치되어 있지 않으므로, 이 기사에서는 Podman과 dockerhub의 적절한 이미지를 사용해 gRPC 클라이언트(이 경우 grpcurl)를 OCI 컨테이너에서 실행하는 방법을 보여줍니다.

사전 요구 사항

  1. 인터넷 액세스가 가능한 적절한 PLCnext Control 장치. 예: 펌웨어 버전 2025.0 이상인 AXC F 3152, 펌웨어 버전 2026.0 이상인 AXC F 1252. 현재 이 기사에서 사용된 OCI 이미지는 AXC F 2152 같은 armv7 타겟에서는 사용할 수 없습니다.

  2. 브라우저에서 장치의 웹 기반 관리(WBM) 사이트를 열고, System Services 페이지에서 GRPC LOCAL SERVER 기능이 활성화되어 있는지 확인합니다.

절차:

  1. admin 사용자 계정으로 PLCnext Control 장치에서 보안 셸 세션을 엽니다.

  2. 셸 세션에서 다음 명령을 실행합니다:

     podman pull docker.io/fullstorydev/grpcurl:latest-alpine 

    이 명령은 grpcurl 명령줄 도구가 포함된 OCI 이미지를 PLCnext Control 장치에 다운로드합니다.

  3. 로컬 PLCnext Control 장치에서 사용 가능한 gRPC 서비스를 나열합니다:

     podman run -it --rm -v /run/plcnext/:/run/plcnext/ --userns=keep-id docker.io/fullstorydev/grpcurl:latest-alpine --plaintext unix:///run/plcnext/grpc.sock list 

    응답:

    Arp.Device.Interface.Services.Grpc.IDeviceControlService Arp.Device.Interface.Services.Grpc.IDeviceInfoService Arp.Device.Interface.Services.Grpc.IDeviceSettingsService Arp.Device.Interface.Services.Grpc.IDeviceStatusService Arp.Io.Axioline.Services.Grpc.IAcyclicCommunicationService Arp.Io.Axioline.Services.Grpc.IAxioMasterService Arp.Plc.Gds.Services.Grpc.IDataAccessService Arp.Plc.Gds.Services.Grpc.IForceService Arp.Plc.Gds.Services.Grpc.ISubscriptionService Arp.Services.DataLogger.Services.Grpc.IDataLoggerService2 Arp.Services.NotificationLogger.Services.Grpc.INotificationLoggerService Arp.System.Commons.Services.Io.Grpc.IDirectoryService Arp.System.Commons.Services.Io.Grpc.IFileService Arp.System.Commons.Services.Io.Grpc.IFileSystemInfoService Arp.System.Lm.Services.Grpc.ILicenseStatusService Arp.System.Nm.Services.Grpc.INotificationManagerService Arp.System.Security.Services.Grpc.IAuthenticationService Arp.System.Um.Services.Grpc.IAuthorizationInfoService Arp.System.Um.Services.Grpc.IPasswordAuthenticationService grpc.reflection.v1.ServerReflection grpc.reflection.v1alpha.ServerReflection 
  4. (선택 사항) 이후 grpcurl 명령을 단순화하기 위한 별칭 생성:

     alias grpcurl="podman run -it --rm -v /run/plcnext/:/run/plcnext/ --userns=keep-id docker.io/fullstorydev/grpcurl:latest-alpine" 
  5. PLCnext Control 장치에서 보드 온도 조회:

    grpcurl -format json -d '{"identifier":"Status.Board.Temperature.Centigrade"}' --plaintext unix:///run/plcnext/grpc.sock Arp.Device.Interface.Services.Grpc.IDeviceStatusService.GetItem 

    응답:

    { "_ReturnValue": { "TypeCode": "CT_Int8", "Int8Value": 46 } } 

참고:

Makers Blog는 Phoenix Contact에서 테스트하거나 검토하지 않은 커뮤니티 구성원의 애플리케이션과 사용자 스토리를 보여줍니다. 자신의 책임 하에 사용하세요.

산업기술

  1. 콜드 콜 vs 웜 리드: 인바운드 마케팅이 승리하는 이유
  2. 모터 리와인딩이 필요한 3가지 위험 신호
  3. 고속 와이어 컷팅 EDM 기계에서 와이어 파손 방지 5가지 필수 팁
  4. CNC 가공에서 정밀도(Precision) vs 정확도(Accuracy) 차이와 공차 관계 완벽 이해
  5. 자산 식별(Property ID): 정의, 이점 및 유형
  6. 항공우주·방산 OEM 산업을 형성하는 4대 핵심 과제
  7. 우레탄 주조 선택하기: 이상적 응용 분야 및 이점
  8. PCB 특성 임피던스에 영향을 미치는 핵심 요소 및 실용적 솔루션
  9. 복합재료의 섬유 배향: 강도와 성능에 중요한 이유
  10. 나일론 마스터하기: 엔지니어링에서의 특성, 용도 및 이점