RoboTalk Help

RoboTalk is a means for users to communicate with a RoboWorks model in real-time using their own application programs.  For example,

if you would are writing a program to control a mobile robot, you can model the mobile robot in RoboWorks and then use RoboTalk to communicate with the model in real-time. This mechanism is called RoboTalk and is supported by a set of four RoboTalk functions.  These functions are compiled into a Windows DLL that you can call from your application program.  For Non Windows users, the source code to RoboTalk is also provided.  This source code can be compiled on any platform that supports TCP/IP and can be used to communicate with RoboWorks.  RoboTalk bindings are also available for LabView, VB, VB.NET, and Ch programming languages.  For more information visit www.newtonium.com or contact support at support@newtonium.com.

RoboTalk Functions

RT_Connect

RT_SetTagValues

RT_GetTagValues

RT_Disconnect


RT_Connect #include "RoboTalk.h"
int RT_Connect(char* filename , char* ipAddress ) ;
Description:   The following function establishes a connection with RoboWorks.  For this connection to work,
               the file you are trying to connect in RoboWorks should be open and Animation->From IPC should 
               be enabled.

Return Value:        Describes whether the connection was successful or not. Return values are: 

                            NO_ERROR: Implying successful connection.  

                            CONNECT_FAILED: Connection failed. Possible reasons are: 

                                   1) RoboWorks model you are trying to connect to is not open in RoboWorks 

                                   2) Animation->From IPC is not selected in RoboWorks 

                                   3) TCP/IP is not configured on the computer.

Arguments:    filename - Name of the RoboWorks file that you are trying to connect to.  Give the name 
                         without the .scn extension.
              ipAddress - The IP Address of the computer on which RoboWorks is running.  If you are 
                          connecting to RoboWorks on the same computer, give SELF

RT_Disconnect

#include "RoboTalk.h"

int RT_Disconnect() ;

Description:   The following function disconnects the connection with RoboWorks.  It should be called
               in the end before exiting the program that uses RoboTalk.  

Return Value:          Describes whether the connection was successful or not. Return values are: 

                              NO_ERROR: Implying successful disconnection. 

                              NO_CONNECTION: This indicates that a successful connection with RoboWorks was not established using 

                                                                   the RT_Connect call.

Arguments:            None.


RT_GetTagValues

#include "RoboTalk.h"

int RT_GetTagValues(char** tagNames , float* tagValues , unsigned int noTags ) ;

Description:   The following function is used to query RoboWorks for Tag values for specified tag names.  
               Tag names are user defined names that are assigned to various transformation.  By sending 
               a list of those names, you can get the current values of those names in return.  You can 
               only call this function after a successful call to the RT_Connect function.

Return Value:  Describes whether the function call was successful or not  Return values are:
               NO_ERROR: Implies success.
               NO_CONNECTION: This indicates that a successful connection with RoboWorks was not established
                              using the RT_Connect call.
               ILLEGAL_INPUT:  indicates that either or both of the arguments to this function were null.
               READ_FAILED:  This is an internal error and should not occur.  It indicates a failure in
                             the communication mechanism.

Arguments:     tagNames - This is an array of tag names.  The size of this array should be equal to the
                          value specified in noTags                                              
               tagValues - An array of floats that will receive the values of the corresponding tag vales.  
                           The size of this array should be equal to the value specified in noTags
               noTags  - The number of tag names you are sending.

RT_SetTagValues

#include "RoboTalk.h"

int RT_SetTagValues(char** tagNames , float* tagValues , unsigned int noTags ) ;

Description:   The following function is used to send Tag values to RoboWorks.  Tag names are
               user defined names that are assigned to various transformation.  By sending a list
               of those names and their associated values, you can control the RoboWorks model.  You can
               only call this function after a successful call to the RT_Connect function.

Return Value:  Describes whether the function call was successful or not  Return values are:
               NO_ERROR: Implies success.
               NO_CONNECTION: This indicates that a successful connection with RoboWorks was not
                              established using the RT_Connect call.
               ILLEGAL_INPUT:  indicates that either or both of the arguments to this function were null.
               WRITE_FAILED:  This is an internal error and should not occur.  It indicates a failure in
                              the communication mechanism.

Arguments:     tagNames - This is an array of tag names.  The size of this array should be equal to the
                          value specified in noTags                                              
               tagValues - An array of floats that specifies the corresponding tag vales.  The size of this array
                           should be equal to the value specified in noTags
               noTags  - The number of tag names you are sending.