.

Remote Procedure Calls

Why use Remote Procedure Calls?

Remote Procedure Calls (RPC) can be a very effective method of executing procedures or function calls on a remote machine and returning the data to a host machine with minimal delay, which requires little to no processing on the Client side.

Remote Procedure Calls 1

NOTE: The diagram above only shows one call being made on the server, when in fact this one function could make up to 10 data calls to the controller and return them all in an array by simply having the client make one small function call.

Remote Procedure Calls 1

What is required to make Remote Procedure Calls?

There are several steps that must be completed before an RPC can be made.

  1. Use a Communication Library that two applications can use to talk to each other over Ethernet.
  2. Create a Listening Application (Server) that resides on the remote computer. This program will listen on a specified port for commands coming from a remote computer. NOTE: This application must have the MPI Library included since this is the program that will make the MPI calls.

  3. Create a Sending Application (Client) that resides on the host computer. This program will send requests to the remote computer and return them to the host. This program requires no knowledge of the MPI since it only needs to communicate with the Listening Application. The Listening Application will take care of all MPI communication with a motion controller.

Server Application Details

Since the Server will be making all of the function calls that the User requests, all of the functions that you want to be able to command remotely must be written and compiled into the Server Application. Therefore, it is important to think about what functions will be included since the user will not be able to make any “unknown” calls to the Server Application.

Client Application Details

The Client application will be responsible in sending commands to the Server Application and present the returned data in a useful manner. The MPI procedures should be defined in a shared enumeration that is used by both the Server Application and Client Application, which helps prevent miscommunication between the Client and Server. Only create one enumeration. Defining more than one enumeration will only cause confusion and lead to future problems.

       Legal Notice  |  Tech Email  |  Feedback
      
Copyright ©
2001-2010 Motion Engineering