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

OCI 컨테이너의 grpcurl을 통해 PLCnext Control과 로컬 gRPC 상호 작용

이는 gRPC를 사용하여 PLCnext Control 장치에서 PLCnext Runtime과 상호 작용하는 방법에 관한 시리즈의 최신 기사입니다.

시리즈의 이전 게시물은 다음과 같습니다:

위에 나열된 문서는 원격에서 PLCnext Control 장치의 gRPC 서버에 액세스하는 방법을 보여줍니다. 클라이언트 장치. 이 게시물은 로컬의 예를 제공합니다. gRPC 클라이언트 - 즉, 동일한 장치의 gRPC 서버에 액세스하는 PLCnext Control 장치에서 실행되는 gRPC 클라이언트입니다.

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

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

전제조건

  1. 인터넷 액세스가 가능한 적합한 PLCnext Control 장치.예:펌웨어 버전 2025.0 이상을 갖춘 AXC F 3152; 펌웨어 버전 2026.0 이상의 AXC F 1252. 현재 이 문서에 사용된 OCI 이미지는 AXC F 2152와 같은 armv7 대상에는 사용할 수 없습니다.

  2. 브라우저에서 장치의 웹 기반 관리(WBM) 사이트를 열고 시스템 서비스 페이지에서 GRPC LOCAL SERVER 기능이 활성화되어 있는지 확인하세요.

절차:

  1. 관리자 계정을 사용하여 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
     }
    }
    

참고:

메이커스 블로그에는 피닉스컨택트의 테스트나 검토를 거치지 않은 커뮤니티 회원의 애플리케이션과 사용자 스토리가 표시됩니다. 자신의 책임하에 사용하십시오.


산업기술

  1. 솔더 마스크와 설계 방법을 이해하는 6단계
  2. 2019년 주목해야 할 5가지 제조 기술 동향
  3. 스마트 제조란 무엇이며 왜 중요한가요?
  4. 군용 텐트 제조업체, 장기적인 지속 가능성 확보
  5. 서브우퍼 증폭기 회로:더 나은 음질을 위한 포괄적인 방법
  6. QuickBooks 제조 소프트웨어 기사
  7. 고임피던스 전압계
  8. Swagelok과 HOERBIGER가 협력하여 레거시 엔진의 NOx 배출량 감소
  9. 보고서:도시 제조 현황
  10. SCM 목공 기계용 4가지 주요 예비 부품