TS3000 SCARA / LINEAR system
TS3100 SCARA / LINEAR system
TSL3000 SCARA system
INSTRUCTION MANUAL
TsRemoteLib.DLL MANUAL
Notice
• Make sure that this instruction manual is delivered to the
final user of Toshiba Machine's industrial robot.
• Before operating the industrial robot, read through and
completely understand this manual.
• After reading through this manual, keep it nearby for future
reference.
TOSHIBA MACHINE CO., LTD.
series Robot Controller
TsRemoteLib.DLL MANUAL
Copyright 2013 by Toshiba Machine Co., Ltd.
All rights reserved.
No part of this document may be reproduced in any form without obtaining prior written
permission from Toshiba Machine Co., Ltd.
The information contained in this manual is subject to change without prior notice to effect
improvements.
STE85409
- 1 -
series Robot Controller
TsRemoteLib.DLL MANUAL
Preface
The TS3000/TSL3000 controller has the HOST function to enable the remote control of the robot
by sending and receiving commands.
“ TsRemoteLibS.DLL” compiles the programs that send to and receive commands from
WindowsPC in a library to facilitate software development.
This manual explains how to use “ TsRemoteLibS.DLL”.
Microsoft Windows, Visual Studio, and other Microsoft product names that are described in this
manual are trademarks of Microsoft Corporation in the U.S.A. and other countries.
• Operator’s Manual
• Robot Language Manual
• Interface Manual
This manual is structured as follows:
Section 1: Overview… Outlines the communication functions.
Section 2: Specification and Setting of the COM1 Port and the Host Port… Describes the
hardware interface and communication mode of the RS-232C port.
Section 3: Specification and Setting of Ethernet… Describes the hardware interface and
communication mode of Ethernet.
Section 4: Non-procedure Communication… Describes the procedure for the communication
that only handles exchange between external devices and robot programs.
Section 5: Simple Procedure Communication … Describes the procedure computer,
commands and robot program files for the communication that targets a host.
Section 6: Robot Operation Sequence by External Communication … Shows examples of
To control the robot in remote mode through communication with the TS3000/TSL3000 series robot
controller, commands are sent to and received from the controller.“ TsRemoteLib.DLL” compiles in DLL
(Dynamic Link Library) the method groups for remote control of the robot in a simple manner without
coding communication programs. “TsRemoteLib.DLL” runs under Windows .Net 2.0/3.0/3.5 and the
applications are developed using VB/C++/C# of Microsoft Visual Studio.
Customer application
Microsoft.Net framework
Robot operation processing
TsRemoteLib.DLL
Windows
Hardware
Fig. 1.1 TsRemoteLibS.DLL
TCP/IP
TS3000/TSL3000
IP0
The following diagram shows a coding example of a simple application for a robot operation command
and stop on the buttons that are assigned in the form.
Figure 1.2 Outline of the app lication development using DLL
TS3000
TSL3000
MOVE
operation
Stop
processing
- 8 -
STE85409
series Robot Controller
TsRemoteLib.DLL MANUAL
Section 2 Example of Application Development Using C#
This section describes the procedure for reference setting of TsRemoteLib for the application for
controlling the SCARA robot. As the precondition, Visual Studio 2008 (referred to as VS2008 henceforth)
must have been installed in the application creation environment. The file called TsRemoteLib.DLL is
stored in the same folder as that of the application execution file.
2.1 Creating an Application Solution
(1) Select File -> New -> Project.
STE85409
- 9 -
series Robot Controller
(2) Enter a project name.
1 Select Windows Forms Application as the template.
2 Enter a project name and the location.
(1) Set the mouse cursor on the required item with the Solution Explorer and click the right button.
(2) Add the context menu that is displayed -> Select New folder.
Click the right mouse button.
(3) Set EXE as the new folder name. (Assign any name.)
- 11 -
STE85409
series Robot Controller
TsRemoteLib.DLL MANUAL
(4) Set the execution file output destination to the EXE folder that was created on the Properties screen
of the TsRemoteLibSample project.
(5) Copy TsRemoteLib.DLL into the EXE folder that was created.
(TsRemoteLib.DLL and the application that is created by the customer (EXE file) must be stored in
the same directory.)
- 12 -
STE85409
series Robot Controller
TsRemoteLib.DLL MANUAL
2.3 Reference Setting of TsRemoteLib
(1) Select Reference -> Add Reference.
(2) Select TsRemoteLib.DLL that is copied from the EXE folder and press OK.
TsRemoteLib can be used by setting reference.
STE85409
- 13 -
series Robot Controller
TsRemoteLib.DLL MANUAL
2.4 Calling TsRemoteS Interface
(1) Opening TsRemoteLibSample.cs
Form1 is used as the default name immediately after creation of a project. In this explanation, the
form name is changed to TsRemoteLibSample.
(2) Declaring TsRemoteLib
Enter the following command in TsRemoteLibSample.cs.
using TsRemoteLib;
(3) Calling the interface
Assume that the form contains the buttons that are shown below. The procedure for calling the
interface is described in the source of each click event handler.
STE85409
- 14 -
series Robot Controller
1 Install connection button processing.
Use the instance name of class TsRemoteS for the Robot.
(In the case of 6-axis,Use the instance name of class TsRemoteV)
Sample IP address and port number are used.
2.5 Event Processing Performed Based on the Information from WatchDog of
TsRemoteLib
Through WatchDog monitoring, information such as emergency stop, safety switch, mode, and Run
status is acquired periodically. When the acquired information changes, an event occurs. Since the
application basically runs in a different thread from that of WatchDog, create the handler for
processing events from WatchDog as follows.
{
if (InvokeRequired)
{
BeginInvoke( newTsRemoteS.TSStatusEvent(testTSStatusEvent),para);
}
else
{
//Evaluate the value of TsStatusMonitor and perform event processing.
{
//Processing when the Emergency Stop button is pressed.
・・・・・・・・・・・・・・・・
}
if (para.SafetyStop == 1)
{
//Processing when the safety switch is pressed.
・・・・・・・・・・・・・・・・
}
・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・
}
}
if (para.EmergencyStop == 1)
Event occurrence factors handled by WatchDog are listed below. Refer to the TsStatusMonitor
class for the details.
• Emergency Stop request
• Safety switch stop request
• Various mode statuses
• Override
• Alarm
• Servo status
• WatchDog error
• Ethernet communication error
STE85409
- 16 -
series Robot Controller
j
p
g
g
g
g
g
y
g
g
q
q
q
)
j
p
r
g
V
TsRemoteLib.DLL MANUAL
Section 3 Reference
3.1 Outline of TsRemoteLib
The following classes are installed in TSRemoteLib for remote control of the robot and information
acquisition.
TsRemoteLib.DLL
class
TsRemote・・・・・Robott control/information ac
TsRemoteS ・・・・・SCARA robot control/information ac
TsRemoteV ・・・・・6-AXIS robot control/information ac
TsPayloadS ・・・・・ SCARA robot load data stora
TsPayloadV ・・・・・ 6-AXIS robot load data sto
TsTransS ・・・・・ SCARA robot coordinate data stora
TsTransV ・・・・・ 6-AXIS robot coordinate data stora
TsStatusAllS・・・・・SCARA robot all status stora
TsStatusAll
TsFileInfo ・・・・・ File information stora
TsAlarm・・・・・ Alarm information stora
TsVersion ・・・・・ S
TsDIO ・・・・・ IO information stora
TsStatus・・・・・ Status stora
・・・・・6-AXIS robot all status storage
e
e
stem version information storage
e
e
uisition(Super class
e
age
e
e
e
uisition
uisition
STE85409
- 17 -
series Robot Controller
3.2 Classes That Are Defined in TsRemoteLib
TsRemote class
Classes for remote-controlling the SCARA and 6-AXIS robot
TsRemote class is super class of the TsRemoteS/TsRemoteV class
In the case of SCARA robot, make the instance of the TsRemoteS class.
In the case of 6-AXIS robot, make the instance of the TsRemoteV class.
TsRemoteS class
Classes for remote-controlling the SCARA and 6-AXIS robot
In the case of SCARA robot, make the instance of the TsRemoteS class.
Please refer to Clause “3.4 TsRemoteS Class Properties”.
Please refer to Clause ”3.5 TsRemoteS Class Method”.
TsRemoteLib.DLL MANUAL
TsRemoteV class
Classes for remote-controlling the 6-AXIS robot
In the case of 6-AXIS robot, make the instance of the TsRemoteV class.
Please refer to Clause “3.4 TsRemoteV Class Properties”.
Please refer to Clause ”3.5 TsRemoteV Class Method”.
TsPointS class
Class for storing Point data of SCARA robot
Property
double X X point/speed
double Y Y point/speed
double Z Z point/speed
double C C point/speed
double T T point/speed
enum ConfigS Configuration (posture)
double X X point/speed
double Y Y point/speed
double Z Z point/speed
double A A point/speed
double B B point/speed
double C C point/speed
double U U point/speed
double V V point/speed
ConfigVpart Config Configuration (posture)
config of the 6-Axis robot is decided by the combination of five elements of Sholder, Elbow, Wrist,
Rot4 and Rot6.
"All property "can set five elements by a lump. (enum ConfigV)
double M Weight (kg)
double L Offset of the center of gravity (mm)
See also
SetGlobalPYLOAD(), GetGlobalPAYLOAD, SetPYLOAD()
TsPayloadV class
Class for storing point data of 6-AXIS robot
Property
double M Weight (kg)
double Lx Offset of the center of gravity (mm)
double Ly Offset of the center of gravity (mm)
double Lz Offset of the center of gravity (mm)
double Gx Work size(mm)
double Gy Work size(mm)
double Gz Work size(mm)
See also
SetGlobalPYLOAD(), GetGlobalPAYLOAD, SetPYLOAD()
TsRemoteLib.DLL MANUAL
TsFileInfo class
Class for storing file information that is stored in the controller
Property
string name File name
int size Size
See also
GetDir()
TsVersion class
Class for storing a controller system version
Property
string SystemName System name
DateTime Date System creation date and time
string Sum Check Sum (maximum number of characters)
See also
GetSystemVersion()
- 21 -
STE85409
series Robot Controller
TsDIO class
Class for storing input/output status of the controller
Property
Int16 Din[20] Input signal status
Handling bits of Din data and input signals
Din[0] : DIN1 ~ DIN16 Standard input
Din[1] : DIN17 ~ DIN32 Standard input
Din[2] : DIN33 ~ DIN48 Standard input
Din[3] : DIN49 ~ DIN64 Standard input
Din[4] : DIN101 ~ DIN116 Extended input
Din[5] : DIN117 ~ DIN132 Extended input
Din[6] : DIN133 ~ DIN148 Extended input
Din[7] : DIN149 ~ DIN164 Extended input
Din[8] : DIN201 ~ DIN216 System input
Din[9] : DIN217 ~ DIN232 System input
Din[10]: DIN233 ~ DIN248 System input
Din[11]: DIN249 ~ DIN264 System input
Din[12]: DIN301 ~ DIN316 Field bus input
Din[13]: DIN317 ~ DIN332 Field bus input
Din[14]: DIN333 ~ DIN348 Field bus input
Din[15]: DIN349 ~ DIN364 Field bus input
Din[16]: DIN401 ~ DIN416 Field bus input
Din[17]: DIN417 ~ DIN432 Field bus input
Din[18]: DIN433 ~ DIN448 Field bus input
Din[19]: DIN449 ~ DIN464 Field bus input
Int16 Dout[20] Output signal status
Handling bits of Dout data and output signals
Dout[0] : DOUT1 ~ DOUT16 Standard output
Dout[1] : DOUT17 ~ DOUT32 Standard output
Dout[2] : DOUT33 ~ DOUT48 Standard output
Dout[3] : DOUT49 ~ DOUT64 Standard output
Dout[4] : DOUT101 ~ DOUT116 Extended output
Dout[5] : DOUT117 ~ DOUT132 Extended output
Dout[6] : DOUT133 ~ DOUT148 Extended output
Dout[7] : DOUT149 ~ DOUT164 Extended output
Dout[8] : DOUT201 ~ DOUT216 System output
Dout[9] : DOUT217 ~ DOUT232 System output
Dout[10]: DOUT233 ~ DOUT248 System output
Dout[11]: DOUT249 ~ DOUT264 System output
Dout[12]: DOUT301 ~ DOUT316 Field bus output
Dout[13]: DOUT317 ~ DOUT332 Field bus output
Dout[14]: DOUT333 ~ DOUT348 Field bus output
Dout[15]: DOUT349 ~ DOUT364 Field bus output
Dout[16]: DOUT401 ~ DOUT416 Field bus output
Dout[17]: DOUT417 ~ DOUT432 Field bus output
Dout[18]: DOUT433 ~ DOUT448 Field bus output
Dout[19]: DOUT449 ~ DOUT464 Field bus output
int Override Indicates the override status (1-100%). When the value changes, an
TsRemoteLib.DLL MANUAL
level changes, an event occurs.
period from the previous WatchDog monitoring request to the current
monitoring request.
during the period from the previous WatchDog monitoring request to the
current monitoring request. When this flag is set to 1, an event occurs.
an event occurs. Since WatchDog monitoring is performed at a specified
interval, check the EmergencyStop property to capture the Emergency
Stop request without fail.
disconnection or so on, an event occurs.
Windows.
occurs.
event occurs.
- 28 -
STE85409
series Robot Controller
int RunMode Indicates the robot run mode. When the mode changes, an event occurs.
0:CONT
1:CYCLE
2:STEP
3:SEGMENT
int RunStatus Indicates the robot run status. When the status changes, an event occurs.
0:STOP(RESET)
1:RUN
2:STOP(RETRY)
3:STOP(CONT)
int SafetyStop Indicates that a stop request occurred to the controller due to the Safety
0: None
1: A stop request occurred to the controller due to the Safety switch ON
int SafetySwitch Indicates the status of the Safety switch. Since WatchDog monitoring is
0: OFF (The circuit is closed.)
1: ON (The circuit is open.)
int ServoStatus Indicates the current Servo status.
0:Servo OFF
1:Servo ON
int StopCommand Indicates that a Stop request occurred to the controller during the period
0: None
1: STOP request occurred.
int WatchDogErr Indicates the occurrence of a timeout error by WatchDog monitoring.
0: None
1: Timeout error occurred.
See also
GetStatusAll()
TsRemoteLib.DLL MANUAL
switch ON state during the period from the previous WatchDog monitoring
request to the current monitoring request.
state.
performed at the specified interval, check the SafetyStop property to capture
the Stop request by the Safety switch without fail.
from the previous WatchDog monitoring request to the current monitoring
request. When this flag is set to 1, an event occurs.
- 29 -
STE85409
series Robot Controller
TsRemoteSException class
Class for deriving the Application Exception class that occurs at execution of each method of the
TsRemoteS and TsRemoteV class
Property
ErrorCodeerrorCode Stores the error code that was handled. Refer to the ErrorCode enumeration
See also
ErrorCode
TsRemoteLib.DLL MANUAL
for the details of the error code.
- 30 -
STE85409
series Robot Controller
r
3.3 Enumerations That Are Defined in TsRemoteLib
ConfigS enum
Enumeration for defining the SCARA robot configuration (posture)
Format
enum ConfigS
Value
FREE 0: Indicates that the robot configuration (posture) is FREE.
LEFTY 1: Indicates that the robot configuration (posture) is LEFTY.
RIGHTY 2: Indicates that the robot configuration (posture) is RIGHTY.
See also
MvConfig, Move(), Moves(), Movej(), Movea()
ConfigV enum
Enumeration for defining the 6-Axis robot configuration (posture)
Format
enum ConfigV
Value
ConfigV can be set by string.(Ex. “xxxxx”,”LANSS”,”RBxSx”)
CannotStartWatchdog 23: Move*() or DirectDo() was executed without WatchDog monitoring.
NotfoundDirectory 24: The specified directory does not exist in the PC.
NotFondFile 25: The specified file does not exist.
MoveStop 26: Move*() stopped in respon se to the STOP signal.
The Move*() method was executed while internal flag MoveStop is ON.
MoveBreak 27: Move*() stopped in response to the BREAK signal.
MoveTimeout 28: Move*() was terminated due to timeout.
CannotDoMove 29: Move*() or DirectDo() was executed without WatchDog monitoring.
See also
TsRemoteLib.DLL MANUAL
method.
communication.
- 33 -
STE85409
series Robot Controller
3.4 TsRemoteS Class Properties
TsRemote class is base class of the TsRemoteS and T sRemoteV class.
The property of TsRemote class is succeeded to by TSRemoteS class /TSRemoteV class.
MvAccel TsRemote.property
Specifies/acquires the acceleration speed of the operation that is instructed by Move(), Moves(), Movej(),
and Movea().
Format
MvAccel
Value
double 1.0~100000.0%(initial value:100)
Notice
If MvAccel is set to a value exceeding 100%, a motor overload alarm may occur for the operation
TsRemote class is base class of the TsRemoteS and T sRemoteV class.
The method of TsRemote class is succeeded to by TSRemoteS class /TSRemoteV class.
Connect() TsRemote.method
Connects to the controller.
Format
bool Connect(int type)
Argument
int type Specify a connection type.
0:RS-232C(function not yet installed)
1:TCP/IP
Return value
booltrue:Connect successful
false:Connect failed
Exceptions
TCPConnectTimeout Timeout occurred in the Connect() method.
NoIP_PORTData The IP address or port for TCP/IP has not been set
IllegalCommType Illegal connection type.Should be 0 for SerialPort,or 1 for TCP/IP
NoSerialportData The datas for serial communication h ave not been set
TCPError The error has occurred in the network
CommunicationError Communication Error
ControllerNG Command not accepted by controller
IllegalParam Illegal parameter
Notice
Connection under RS-232C(COM) is not supported.
See also
Disconnect()
TsRemoteLib.DLL MANUAL
- 36 -
STE85409
series Robot Controller
DeleteFile() TsRemote.method
Deletes the file that is stored in the robot controller.
Format
void DeleteFile(string filename)
Argument
string filename File name to be deleted from the robot controller
Return value
None
Exceptions
TCPNotConnect Network is not connected
CommunicationError Communication Error
ControllerNG
Notice
DeleteFile deletes the file in the controller unconditionally. When confirmation is necessary, display
a conformation message by using an application.
See also
GetDir()
TsRemoteLib.DLL MANUAL
- 37 -
STE85409
series Robot Controller
DirectDo() TsRemote.method
Executes one line of program by using the direct execution function.
Format
void DirectDo(string command)
Argument
string command Program to be executed
Return value
None
Exceptions
MoveStop STOP signal during the Move command
CannotDoMove Move command can not be executed, because of watch dog not running
Notice
DirectDo() cannot be executed unless monitoring is executed by the WatchDogStart() method.
Execution of DirectDo() is completed at the commencement of the execution of the program after
the controller receives the command. Completion of program operation cannot be checked. Use
the Move*() method to execute an operation command such as MOVE.
When an event occurs due to the execution of EmergencyStop, SafetyStop, StopCommand, or
BreakCommand, the DLL internal flag (MoveStop) is set to ON.
If the DirectDo() method is executed while the internal flag (MoveStop) is ON, MoveStop
exception occurs, thereby restraining the robot operation. ResetMove()re sets the internal flag,
enabling the robot operation. Reset the operation after checking with the user through a dialog
and so on.
See also
WatchDogStart(), ResetMove()
TsRemoteLib.DLL MANUAL
- 38 -
STE85409
series Robot Controller
Disconnect() TsRemote.method
Disconnects communication with the controller.
Format
bool Disconnect()
Argument
None
Return value
None
Exceptions
None
Notice
To terminate a customer-created application, terminate application after disconnecting the
communication with the controller by executing Disconnect().
See also
Connect()
TsRemoteLib.DLL MANUAL
- 39 -
STE85409
series Robot Controller
Dispose() TsRemote.method
Disposes of the TsRemoteS object.
Format
void Dispose()
Argument
None
Return value
None
Exceptions
None
Notice
See also
TsRemoteLib.DLL MANUAL
- 40 -
STE85409
series Robot Controller
GetAlarmHistory() TsRemote.method
Acquires alarm history.
Format
List<TsAlarm> GetAlarmHistory()
Argument
None
Return value
List<TsAlarm> Stores alarm history in the array of the TsAlarm object.
Exceptions
TCPNotConnect Network is not connected
CommunicationError Communication Error
ControllerNG Command not accepte d b y controller
Notice
See also
TsAlarm, GetCurrentAlarm()
TsRemoteLib.DLL MANUAL
- 41 -
STE85409
series Robot Controller
GetCurrentAlarm() TsRemote.method
Acquires the alarm that is currently occurring in the controller.
Format
List<TsAlarm> GetCurrentAlarm()
Argument
None
Return value
List<TsAlarm> Stores the alarm that is currently occurring in the controller in the array of the
Exceptions
TCPNotConnect Network is not connected
CommunicationError Communication Error
ControllerNG Command not accepte d b y controller
Notice
See also
TsAlarm
TsRemoteLib.DLL MANUAL
TsALarm object.
- 42 -
STE85409
series Robot Controller
GetDIn() TsRemote.method
Acquires the status of the specified input (Din).
Format
int GetDin(int dino)
Argument
int dinoSpecify a DIN number.
1~64: Standard input
101~164: Extended input
201~264: System input
301~364: FieldBus input
401~464: FieldBus input
Return value
intInput status
0:OFF
1:ON
Exceptions
TCPNotConnect Network is not connected
CommunicationError Communication Error
ControllerNG Command not accepte d b y controller
Notice
See also
GetDIO()
TsRemoteLib.DLL MANUAL
- 43 -
STE85409
series Robot Controller
GetDIO() TsRemote.method
Acquires the input/output status of the controller.
Format
TsDIO GetDIO()
Argument
None
Return value
TsDIO Acquires the input (DIN) and output (DOUT) statuses of the controller.
Exceptions
TCPNotConnect Network is not connected
CommunicationError Communication Error
ControllerNG Command not accepte d b y controller
Notice
See also
TsDIO,
TsRemoteLib.DLL MANUAL
- 44 -
STE85409
series Robot Controller
GetDir() TsRemote.method
Acquires the information of the files that are stored in the TS controller.
Format
List<TsFileInfo> GetDir()
Argument
None
Return value
List<TsFileInfo> Stores the information of the file that is stored in the controller in the array of
Exceptions
TCPNotConnect Network is not connected
CommunicationError Communication Error
ControllerNG Command not accepte d b y controller
Notice
See also
TsFileInfo
TsRemoteLib.DLL MANUAL
TsFileInfo object.
- 45 -
STE85409
series Robot Controller
GetDout() TsRemote.method
Acquires the alarm that is currently occurring in the TS controller.
Format
int GetDout(int dino)
Argument
int dino Specify a DOUT number.
1~64: Standard output
101~164: Extended output
201~264: System output
301~364: FileBus output
401~464: FileBus output
Return value
intOutput status
0:OFF
1:ON
Exceptions
TCPNotConnect Network is not connected
CommunicationError Communication Error
ControllerNG Command not accepte d b y controller
Notice
See also
GetDIn(), SetDout()
TsRemoteLib.DLL MANUAL
- 46 -
STE85409
series Robot Controller
GetGlobalINT() TsRemote.method
References the value of the integer type global variable of the program that is currently selected.
Format
int GetGlobalINT(string name)
Argument
string name Name of the global variable
For an array variable, specify including the element number.
Return value
int Value of the integer type global variable that was obtained
Sets the program to the executable state from the RCYCLE by resetting the execution environment except
for the global variables of the selected program.