Makers Blog

Local gRPC using grpcurl in an OCI container

Martin [PLCnext Technology Team] 04 December 2025 min. read
20 views 0 comments

This is the latest installment in a series about using gRPC to interact with the PLCnext Runtime on a PLCnext Control device.

Earlier posts in the series included:

The articles listed above show how to access the gRPC server on a PLCnext Control device from a remote client device. This post gives an example of a local gRPC client - that is, a gRPC client running on a PLCnext Control device, which accesses the gRPC server on the same device.

Other examples of local gRPC clients on PLCnext Control devices can be found here:

Since there is no gRPC client software installed on PLCnext Control devices as standard, this article shows how to run a gRPC client (in this case, grpcurl) in an OCI container using Podman and a suitable image from dockerhub.

Prerequisites

  1. A PLCnext Control device (e.g. AXC F 3152), with firmware version 2025.0 or later, with internet access. Currently, the OCI image used in this article is not available for armv7 targets like the AXC F 2152.

  2. In a browser, open the Web-based Management (WBM) site on the device and, on the System Services page, make sure the GRPC LOCAL SERVER feature is activated.

Procedure:

  1. Open a secure shell session on the PLCnext Control device using the admin user account.

  2. In the shell session, execute the following command:

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

    This downloads an OCI image containing the grpcurl command-line tool to the PLCnext Control device.

  3. List the gRPC services available on the local PLCnext Control device:

      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
    

    Response:

    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. (Optional) Create an alias to simplify subsequent grpcurl commands:

      alias grpcurl="podman run -it --rm -v /run/plcnext/:/run/plcnext/ --userns=keep-id docker.io/fullstorydev/grpcurl:latest-alpine --plaintext unix:///run/plcnext/grpc.sock" 
    
  5. Retrieve the board temperature from the PLCnext Control device:

    grpcurl -format json -d '{"identifier":"Status.Board.Temperature.Centigrade"}'  Arp.Device.Interface.Services.Grpc.IDeviceStatusService.GetItem
    

    Response:

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

Note:

The Makers Blog shows applications and user stories of community members that are not tested or reviewed by Phoenix Contact. Use them at your own risk.

Discussion

Please login/register to comment

Login/Register

Leave a Reply

Newsletter
Never miss a new article
Sign up for the newsletter
Never miss news about PLCnext Technology
Get interesting content via newsletter four times a year
Receive exclusive information before all other users