labview remote command interface guide - · pdf file · 2016-07-16the labview...

12
© 2013 Robai Corporation Rev. 1.0 1 LabView Remote Command Interface Guide 1.1 Guide Overview This is a guide on how to set up and use the LabView remote command interface, to control the Cyton Viewer from LabView either locally or over a network. 1.2 User Guide 1.2.1 CytonViewer Server Side Setup To begin, make sure you have the latest version of the viewer installed that includes the interface. The LabView remote command interface leverages the remote command api to send commands to an instance of a viewer that has the remote command server plugin loaded, as well as the manipulation action exec plugin. So to start load these two plugins. 1.2.2 LabView Client Side Setup To use the interface with LabView involves importing a shared library as well as a header file that are included with the installer. The interface is currently for windows only and for the 32 bit version of LabView. To import this library, first launch LabView to the default startup screen as shown in Figure 1. Figure 1: LabView Startup Screen Next navigate from the menu bar to tools ->import->Shared Library (.dll)… as shown in Figure 2.

Upload: vankien

Post on 08-Mar-2018

218 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Labview Remote Command Interface Guide - · PDF file · 2016-07-16The LabView remote command interface leverages the remote command api ... LabView will then parse the file to find

© 2013 Robai Corporation Rev. 1.0

1 LabView Remote Command Interface Guide

1.1 Guide Overview

This is a guide on how to set up and use the LabView remote command interface, to control the Cyton Viewer from LabView either locally or over a network.

1.2 User Guide

1.2.1 CytonViewer Server Side Setup

To begin, make sure you have the latest version of the viewer installed that includes the interface. The LabView remote command interface leverages the remote command api to send commands to an instance of a viewer that has the remote command server plugin loaded, as well as the manipulation action exec plugin. So to start load these two plugins.

1.2.2 LabView Client Side Setup

To use the interface with LabView involves importing a shared library as well as a header file that are included with the installer. The interface is currently for windows only and for the 32 bit version of LabView. To import this library, first launch LabView to the default startup screen as shown in Figure 1.

Figure 1: LabView Startup Screen

Next navigate from the menu bar to tools ->import->Shared Library (.dll)… as shown in Figure 2.

Page 2: Labview Remote Command Interface Guide - · PDF file · 2016-07-16The LabView remote command interface leverages the remote command api ... LabView will then parse the file to find

© 2013 Robai Corporation Rev. 1.0

Figure 2: Import Shared Library

Next, choose to create VIs for a shared library as shown in Figure 3. If you have already installed this in the past, and you wish to update to a new version of the interface without having to re-write your VIs that use the libraries, you would choose to update instead of create.

Figure 3: Select to Create VIs

Next a dialogue will appear to load the .dll file as well as the header file. The .dll is located in your Cyton Viewer bin directory and the header is located in \toolkits\src\plugins\labviewRemoteCommand\, as shown in Figure 4. Then click Next.

Page 3: Labview Remote Command Interface Guide - · PDF file · 2016-07-16The LabView remote command interface leverages the remote command api ... LabView will then parse the file to find

© 2013 Robai Corporation Rev. 1.0

Figure 4: Select library and header

In the next dialogue, add “WIN32” in the preprocessor definitions window as seen in Figure 5. Then click Next. LabView will then parse the file to find the included functions.

Figure 5: Preprocessor Definitions

Next select to import all of the included functions as shown in Figure 6.

Page 4: Labview Remote Command Interface Guide - · PDF file · 2016-07-16The LabView remote command interface leverages the remote command api ... LabView will then parse the file to find

© 2013 Robai Corporation Rev. 1.0

Figure 6: Functions to convert

Next, you can continue with default name or you can change the project library name. The default name is ecLabviewRemoteCommand, as shown in

Figure 7: Default name

Use the default error handling mode, then click Next.

Page 5: Labview Remote Command Interface Guide - · PDF file · 2016-07-16The LabView remote command interface leverages the remote command api ... LabView will then parse the file to find

© 2013 Robai Corporation Rev. 1.0

Figure 8: Default error handling

Click on each function and change the thread setting to ‘Run in any thread’, as selected in and click ‘Next’.

Figure 9: Select to run in any thread

Next LabView will generate the library, and complete the process.

Page 6: Labview Remote Command Interface Guide - · PDF file · 2016-07-16The LabView remote command interface leverages the remote command api ... LabView will then parse the file to find

© 2013 Robai Corporation Rev. 1.0

Figure 10: Complete

The generated functions are shown in Figure 11.

Figure 11: User Library functions

You can access the function blocks through the user libraries in LabView, by right clicking in the block diagram interface, then navigating to User Libraries -> ecLabviewRemoteCommand (or whatever you named it)-> VIs, as shown in Figure 12.

Page 7: Labview Remote Command Interface Guide - · PDF file · 2016-07-16The LabView remote command interface leverages the remote command api ... LabView will then parse the file to find

© 2013 Robai Corporation Rev. 1.0

Figure 12: LabView User Libraries

Page 8: Labview Remote Command Interface Guide - · PDF file · 2016-07-16The LabView remote command interface leverages the remote command api ... LabView will then parse the file to find

© 2013 Robai Corporation Rev. 1.0

1.3 List of Functions

Remote Command Init

This function initializes the interface, and opens the connection to the server. This must be called before other commands are sent.

Inputs:

ipAddress: the ip address of the server. If you are not using a remote server, use “127.0.0.1”, else use the ip of the server pc running an instance of the viewer with the required plugins loaded.

Outputs:

function return: returns the status of the command, either "connected to ip", or "couldnt connect to ip".

ipAddress out: returns the ipAddress passed to the function.

Remote Command Shutdown

This function shuts down the interface, and closes the connection to the server. This must be called before other commands are sent from other clients (LabView or other remote command interfaces).

Outputs:

function return: returns the status of the command, either "closed network" or "couldnt close network".

Move Joints

This function moves all the joints in the model to a desired position.

Inputs:

jointValues: an 1d array of joint values in floating point (radians for rotational joints, meters if prismatic)

numJoints: the size of the jointValues array to send. If the robot has 8 joints, and you use 5 for numJoints, the first five joints in the model will move.

Outputs:

Page 9: Labview Remote Command Interface Guide - · PDF file · 2016-07-16The LabView remote command interface leverages the remote command api ... LabView will then parse the file to find

© 2013 Robai Corporation Rev. 1.0

function return: returns the status of the command. jointValues out: returns the joint values array passed to the function.

Move Joint

This function moves a single joints in the model to a desired position. This is useful for linear constraints such as grippers and tools.

Inputs:

joint: the index of the joint (zero indexed) that you wish to move jointValue: value to set in the simulation (radians for rotational joints, meters if

prismatic).

Outputs:

function return: returns the status of the command.

Set EE set

This function changes the active end effector set in the model to the desired index. The indices of each EE set can be checked in the position control system parameters dialogue in the viewer.

Inputs:

eeSet: the index of the EE set that you wish to switch to

Outputs:

function return: returns the status of the command.

Page 10: Labview Remote Command Interface Guide - · PDF file · 2016-07-16The LabView remote command interface leverages the remote command api ... LabView will then parse the file to find

© 2013 Robai Corporation Rev. 1.0

Set Control Descriptor

This function changes the active control descriptor set in the model to the desired index. The indices of each EE set can be checked in the position control system parameters dialogue in the viewer.

Inputs:

eeSet: the index of the EE set that you wish to switch to

Outputs:

function return: returns the status of the command.

Move EE

This function moves the active end effector frame in the model to a desired position and orientation.

Note: after a Move Joints or Move joint command, the active EE set is switched, call Set EE set to the desired EE set before calling Move EE.

Inputs:

pitch: Pitch of the new EE position roll: Roll of the new EE position x: X position of the new EE position y: Y position of the new EE position yaw: Yaw of the new EE position z: Z position of the new EE position

Outputs:

function return: returns the status of the command.

Page 11: Labview Remote Command Interface Guide - · PDF file · 2016-07-16The LabView remote command interface leverages the remote command api ... LabView will then parse the file to find

© 2013 Robai Corporation Rev. 1.0

Get Joint Value

This function gets the desired joint value of the model

Inputs:

Joint index of the desired joint.

Outputs:

function return: returns the angle in radians or distance in meters of the desired joint.

Get X Value

This function gets the desired x position value of the model (guide frame)

Outputs:

function return: returns the desired x position of the active end effector guide frame.

Get Y Value

This function gets the desired y position value of the model (guide frame)

Outputs:

function return: returns the desired y position of the active end effector guide frame.

Page 12: Labview Remote Command Interface Guide - · PDF file · 2016-07-16The LabView remote command interface leverages the remote command api ... LabView will then parse the file to find

© 2013 Robai Corporation Rev. 1.0

Get Z Value

This function gets the desired z position value of the model (guide frame)

Outputs:

function return: returns the desired z position of the active end effector guide frame.

Get EE Roll

This function gets the desired roll value of the model in radians (guide frame)

Outputs:

function return: returns the desired roll value of the active end effector guide frame.

Get EE Pitch

This function gets the desired pitch value of the model in radians (guide frame)

Outputs:

function return: returns the desired pitch value of the active end effector guide frame.

Get EE Yaw

This function gets the desired yaw value of the model in radians (guide frame)

Outputs:

function return: returns the desired yaw value of the active end effector guide frame.