YASKAWA For NX100, YASNAC XRC/MRC/ERC for Industrial Robot MOTOMAN Data Transmission Software for Personal Computer MOTOCOM32 OPERATION MANUAL Upon receipt of the product and prior to initial operation, read these instructions thoroughly, and retain for future reference.
General Precautions ・ Diagrams and photos in this manual are used as examples only and may differ from the actual delivered product. ・ This manual may be modifird when necessary because of improvement of the product, modification, or changes in specifications. Such modification is made as a revision by renewing the manual No. ・ To order a copy of this manual, if your copy has been damaged or lost, contact your YASKAWA representative listed on the last page stating the manual No. on the front page.
CONTENTS 1. INTRODUCTION ......................................................................................5 1.1 Introduction of This Manual ................................................................................... 5 1.2 Features of Ethernet Communications ................................................................. 5 1.3 Hardware Requirements for MOTOCOM32 ........................................................... 7 1.4 Hardware Lock Key..................................................
BscGetStatus ....................................................................................................................................................... 52 BscGetUFrame.................................................................................................................................................... 53 BscGetVarData ...................................................................................................................................................
BscServoOff...................................................................................................................................................... 132 BscServoOn ...................................................................................................................................................... 133 BscDCILoadSave..............................................................................................................................................
1. INTRODUCTION 1.1 Introduction of This Manual This operation manual is for the users of the data transmitting function of industrial robot MOTOMAN controller NX100, YASNAC XRC, MRC, MRCⅡ, ERC, and ERCⅡ. This operation manual outlines the operation method of the personal computer software MOTOCOM32 for data transmission between the robot controller and a personal computer, and at the same time, the specifications of the supplied data transmission function. Read this operation manual thoroughly before use.
Since an Ethernet cable can be connected to a multiple number of network devices, the factory operation state and alarm occurrences can be monitored from several places. Monitoring Monitoring Factory room A room B Ethernet Personal computer Robot Robot Robot Robot Robot controller controller controller controller controller Fig 1.
1.3 Hardware Requirements for MOTOCOM32 The MOTOCOM 32 operates with the configurations shown in Table 1. Table 1 OS CPU Required Memory Hardware Disk Capacity for Installation Disk drive Display Mouse Robot Controller Transmission Cable Hardware Lock Key Hardware Requirements for MOTOCOM32 Microsoft Windows 95 /98 /NT4.
Robot Controller (D-sub 9-pin male) Personal Computer (D-sub 9-pin female) RD 2 3 SD SD 3 2 RD SG 5 7 RS RS 7 8 CS CS 8 5 SG FG HOLDCASE Fig. 1.5 RS232C Cable Connection 1.4 Hardware Lock Key The software is protected by an hardware lock key. There are two different versions available (USB and SUB-D type). The installation of the hardware lock key driver is included in the program installation. In case of WindowsNT/2000/XP please log in with local administrative rights.
2. SETUP 2.1 Execution of Setup Program Set up the MOTOCOM 32 in the following manner. (1) Turn ON the power to the personal computer and the display. (2) Start up Windows. (3) Insert the High Speed JobExchanger installation CD-ROM into the CD-ROM drive. (4) Click the [Start] button in the task bar and select [Setting]. Programs] icon from [Control Panel]. Fig 2.1 Double-click the [Add/Remove The [Add/Remove Programs Properties] display appears.
Fig 2.2 [Run Installation Program] Dialog Box (6) Clicking the [Finish] button calls up the setup program. Follow the instructions in the proceeding display. (7) When the setup is completed, [High Speed JobExchanger], [Host Control], [Auto Job Changer], [MOTOCOM 32 DLL Functions], [MOTOCOM 32 Help] and [YASNAC Help] are registered under [MOTOCOM 32] folder that appears by clicking the [Start] button in the task bar to select [Program] and then [Motoman].
2.2.2 Personal Computer Settings Set the settings related to Ethernet transmissions, to the personal computer with the software installed. ■Hardware settings Before using the MOTOCOM32, connect the Ethernet board to the personal computer and check if the Ethernet board operates correctly. For connection methods, refer to the manual for the Ethernet board used. ■Windows Network settings To communicate via the Ethernet, set the settings related to the Windows network.
(4) Select [Microsoft] as manufacturers and [TCP/IP] as Network Protocol and click the [OK] button. Fig 2.5 [Select Network Protocol] Dialog Box The [Network] dialog box appears. (5) To set the IP address and subnet mask for the personal computer, select [TCP/IP] protocol from the list and click the [Properties] button. Fig 2.6 [Network] Dialog Box The [TCP/IP Properties] dialog box appears.
(6) Input the value for the [IP address] and [Subnet Mask] of the personal computer. For details of the settings of Gateway and DNS, refer to a Windows manual, to make proper settings for the application. Fig 2.7 [TCP/IP Properties] Dialog Box Note : The above values are examples only. When setting the IP address and subnet mask, input the correct numbers as advised by the network manager.
2.2.3 Robot Controller Setting ■Hardware settings To communicate using TCP/IP protocol, an Erthernet I/F board for NX100, YASNAC XRC/MRC is required. Insert the board, and set the IP address and subnet mask. To setup the Ethernet I/F board, refer to the “NX100, YASNAC XRC/MRC Ethernet I/F Board Instructions.” ■Parameter settings To establish communication between the robot controller and the personal computer, set the following parameters of the robot controller.
・Customer options I/O = Not used Command mode = Used (This must be always set to “Used.”) PP/PBOX (programming pendant / playback box)= Not used ・Ethernet Ethernet = Used IP ADDRESS = 192.168.10.10* SUBNET MASK = 255.255.255.0* DEFAULT GATEWAY = 192.168.10.1* SERVER ADDRESS = 0.0.0.0* * The above values are examples only. Input the suitable values according to your network environment. When the MOTOCOM 32 is used, there is no need to set the SERVER ADDRESS. DCI or stand-alone function.
Fig 2.
2.3.3 YASNAC Robot Controller Restrictions ■ Multiple personal computer access BSC-Protocol With the MOTOCOM32, one personal computer can communicate with one robot controller. Simultaneous communication with a multiple number of personal computers is not possible. (On the contrary, the simultaneous comunication between one personal computer and a multiple number of robot controllers is possible.) Fig.2.
6. CREATING APPLICATION A TRANSMISSION This paragraph describes how to create an application so that the user can easily create a transmission application between the robot and the personal computer. This help explains how to create an application using the sample program (MS-Windows application development tool with BASIC language as the base “Visual Basic” and “Visual C++”) which employs a data transmission function (MS-Windows DLL file type: file name: MOTOCOM32.DLL).
6.1 Outline This on-line Help describes how to create a transmission application using the 32-bit YASNAC transmission library “MOTOCOM 32 DLL.” This Help also describes how to create an application with Visual Basic and Visual C++. Other languages can also be used. 6.2 Using Visual Basic 6.2.1 Preparation To create a transmission application, the following systems must be installed in the personal computer in advance. ① Microsoft Windows95/98/NT4.0/2000/XP*1 ② Visual Basic Ver5.
----------------------------------------------------------------------------------② Use the definition file attached to the Motocom32 package. ----------------------------------------------------------------------------------The “Motocom32.DLL” package includes a “Motocom32.BAS” file that defines the DLL I/F functions. Add this file to the Visual Basic project. (1) Copy the “Motocom32.BAS” file to the source directory of the application to be created. (2) Click “Project” and specify the “Motocom 32.
Fig. 6.
6.3 Using Visual C++ 6.3.1 Preparation To create a transmission application, the following systems must be installed in the personal computer in advance. ③ Microsoft Windows95/98/NT4.0/2000/XP *1 ④ Visual C++ Ver5.0 or more*2 *1 MS Windows 95/98/NT4.0/2000/XP is a registered trademark of Microsoft Corporation, U.S.A. *2 Visual C++ is a registered trademark of, Microsoft Corporation U.S.A. 6.3.
③ Create an edit control to input the job name, and name the ID “IDC_JOBNAME.” ④ Create a pushbutton for sending, and name the caption “Send” and the ID “IDC_DOWNLOAD.” ⑤ Create a pushbutton for receiving, and name the caption “Receive” and the ID “IDC_UPLOAD.” 6.3.2.4 Addition of Functions and Variables ① Open the TestDLg.h file to add the following function declaration.
6.3.2.5 Creation and Execution of EXE File Execute “Build” in the Visual C++ Build menu to create a execution enabled module. By putting this module in the same directory as the job to be sent or received and executing it, the job can be sent or received. Note: The MOTOCOM installation directory contains data transmission functions (Windows DLL file type, file name: Motocom32.DLL and Motolk.DLL, Motolkr.Dll).
End If 'Copying corresponding job to name for sending. If Not JobCopy(JobName, CvtName) Then MsgBox "Job copy disabled..(" + JobName + ")" Exit Do End If DispLogMsg lst, JobName + "copied to " + CvtName + ".", LogFile DispLogMsg lst, "***** Waiting for request for job transmission.*****", "" 'Sending job due to instruction from YASNAC. If Not DciLoadSave(nCid, lst, LogFile) Then Exit Do Cycle = Cycle + 1 DispLogMsg lst, "Job has been sent.(" + Format$(Cycle) + "Circulating).", LogFile Loop 'No.
rc = BscClose(ncid) ncid = -1 GoTo Ms_BscOpenComm_Exit End If ‘Connect communications line. rc = BscConnect(ncid) If rc <> 1 Then rc = BscClose(ncid) ncid = -1 GoTo Ms_BscOpenComm_Exit End If Ms_BscOpenComm_Exit: Ms_BscOpenComm = ncid End Function This function opens the COM port or the Ethernet line. After the connection is finished, the handle values are sent back as return values. The following operation for the Motocom32.DLL is performed using these handle values.
' LogFile Log file name 'output JobNo Received job No. 'return value TRUE Completion of sending ' FALSE Cancel or error occurrence Dim rc As Integer Dim rc0 As Integer 'Declaring return value of BscDciGetPos. ReDim axis6(5) As Double Dim datatype As Integer Dim RConf As Integer rc = False rc0 = -1 'Request for receiving is repeated until Cancel button is pressed (F_QUIT flag becomes true) or work No. is received.
Else 'Job transmission error occurs. MsgBox "Job transmission error occurs. (" + Format$(rc0) + ")" Exit Do End If Loop If F_QUIT = True Then DispLogMsg lst, "Canceled.", "" End If DciLoadSave = rc End Function Note: Double underline indicates transmission functions belonging to the MOTOCOM-H, single underline indicates functions of which program lists are described below, and dotted underline indicates the functions which are described below.
7. COMMUNICATION TRANSMISSION When [MOTOCOM32. DLL function] is opened, the following list of help topics appears. Fig. 7.1 List of Help Topics to Explain Transmission Functions Clicking “File Data Transmission Function,” “Robot Control Function,” “DCI Function,” “I/O Read and Write Function,” or “Other Functions,” the items related to the detailed contents are displayed. (After reading each description, click the “Contents” button to return to the Help Contents Display.) 7.1 Outline MOTOCOM32.
Loads and saves the files containing job, condition data, system information, etc. The following functions are available.
BscDownLoad FUNCTION: Sends a specified file to the robot controller.
BscUpLoad FUNCTION: Receives a specified file from the robot controller.
BscDownLoadEx FUNCTION: Sends a specified file to the robot controller. A directory where the sending file exists can be specified. FORMAT: _declspec( dllexport ) short APIENTRY BscDownLoadEx(short nCid,char *fname, char*path, BOOL nFlg); ARGUMENTS: IN(Transfer) nCid *fname *path nFlg Communication handler ID number File name to be sent Diretory path of sending source data TRUE : Changes the directory temporarily and restores it at the end. FALSE : Changes the directory and completes the processing.
BscUpLoadEx FUNCTION: Receives a specified file from the robot controller. the file is send to can be specified. FORMAT: _declspec( dllexport ) short APIENTRY BscUpLoadEx(short nCid,char *fname, char*path, BOOL nFlg); ARGUMENTS: IN(Transfer) nCid *fname *path nFlg The directory where Communication handler ID number File name to be received Diretory path of sending source data TRUE : Changes the directory temporarily and restores it at the end.
7.3 Robot Control Function Reads the robot status (current position, alarm, error, servo status, etc.) and controls the system (start, hold, job call, etc.) The following functions are available.
System Control BscCancel BscChangeTask BscContinueJob BscConvertJobP2R BscConvertJobR2P BscDeleteJob BscHoldOff BscHoldOn BscHostPutVarData BscHostPutVarDataM BscImov BscMDSP BscMov BscMovj BscMovl BscOPLock BscOPUnLock BscPMov BscPMovj BscPMovl BscPutUFrame BscPutVarData BscPutVarData2 BscStartJob BscSelectJob BscSelectMode BscSelLoopCycle BscSelOneCycle BscSelStepCycle BscSetLineNumber BscSetMasterJob BscReset BscSetCtrlGroup BscSetCtrlGroupXrc BscServoOff BscServoOn BscUpload BscUploadEx 38/201
BscFindFirst FUNCTION: Reads the first job name from the all job list registered at the present time.
BscFindFirstMaster FUNCTION: Reads the first job name from the job list that belongs to the master job.
BscFindNext FUNCTION: Reads the next job name registered at the present time. FORMAT: _declspec( dllexport ) short APIENTRY BscFindNext(short nCid,char *fname,short size); ARGUMENTS: IN(Transfer) nCid *fname size Communication handler ID number N-th job name storage pointer Job name storage area size OUT(Return) *fname N-th job name storage pointer Return Value -1:No next job 0:Next job found REMARKS: Call Condition The BscFindFirst function must be called up before executing this function.
BscFindNextMaster FUNCTION: Reads the next job name in the job list that belongs to the master job.
BscGetCtrlGroup FUNCTION: Reads control group and task information.
BscGetCtrlGroupXrc FUNCTION: Reads control group and task information.
1: 2: 3: 4: 5: 6: 7: Sub Sub Sub Sub Sub Sub Sub 1 2 3 4 5 6 7 task task task task task task task “0” is returned if independent control is not allowed in the system. NOTE This function is effective for transmission against the NX100/XRC (NX100/XRC transmission function). Refer to BscGetCtrlGroup for transmission against the MRC.
BscGetError FUNCTION: Reads an error code or alarm code. FORMAT: _declspec( dllexport ) short APIENTRY BscGetError(short nCid); ARGUMENTS: IN(Transfer) nCid Communication handler ID number OUT(Return) None Return Value -1:Acquisition Failure 0:No error Others:Error codes REMARKS: Restrictions This function is effective for transmission with the ERC. Refer to BscGetError2 for transmission with the NX100, XRC or MRC.
BscGetError2 FUNCTION: Reads an error code or alarm code.
BscGetFirstAlarm FUNCTION: Reads an alarm code and returns the alarm code and alarm data. FORMAT: _declspec( dllexport ) short APIENTRY BscGetFirstAlarm(short, nCid,short *data) ARGUMENTS: IN(Transfer) nCid *data Communication handler ID number Alarm data storage pointer OUT(Return) *data Alarm data storage pointer Return Value 0:No alarm Others:Alarm code numbers REMARKS: Call Condition The BscGetError2 function must be called up before executing this function.
BscGetFirstAlarmS FUNCTION: Reads an alarm code and returns the alarm code, alarm data and alarm message.
BscGetNextAlarm FUNCTION: Reads the next alarm code and alarm data. FORMAT: _declspec( dllexport )short APIENTRY BscGetNextAlarm(short nCid,short *data); ARGUMENTS: IN(Transfer) nCid *data Communication handler ID number Alarm data storage pointer OUT(Return) *data Alarm data storage pointer Return Value 0:No alarm Others:Alarm code numbers REMARKS: Call Condition The BscGetFirstAlarm function must be called up before executing this function.
BscGetNextAlarmS FUNCTION: Reads the next alarm code, alarm data and alarm message.
BscGetStatus FUNCTION: Reads the status information. FORMAT: _declspec( dllexport ) short APIENTRY BscGetStatus(short nCid,short *d1,short *d2) ARGUMENTS: IN(Transfer) nCid *d1 *d2 Communication handler ID number Data 1 storage pointer Data 2 storage pointer OUT(Return) *d1 *d2 Data 1 storage pointer Data 2 storage pointer Return Value -1:Fetch failed Others:Normal completion REMARKS: Data 1 Data 1 are represented by bit data in decimals.
BscGetUFrame FUNCTION: Reads specified user frame data.
Variable type Coordinate values of the user coordinate system specified with the user coordinate number are assigned to the user coordinate data as follows.
BscGetVarData FUNCTION: Receives variables. FORMAT: _declspec( dllexport ) short APIENTRY BscGetVarData(short nCid,short type,short varno,double *p); ARGUMENTS: IN(Transfer) nCid type varno *p Communicaion handler ID number Variable type Variable number Variable storage pointer OUT(Return) *p Variable storage pointer Return Value 0:Normal completion Others:Error codes REMARKS: Variable Types The variable types are represented as follows.
P[3] - - - - P[4] - - - - P[5] - - - - P[6] - - - - P[7] P[8] P[9] - - - - P[0] P[1] P[2] P[3] P[4] P[5] P[6] P[7] P[8] P[9] pulse Robot axis position type 1 Coordinate type X-axis coordinate (unit: mm) Y-axis coordinate (unit: mm) Z-axis coordinate (unit: mm) Tx (unit: ゜) Ty (unit: ゜) Tz (unit: ゜) Form Tool number number U-axis pulse number R-axis pulse number B-axis pulse number T-axis pulse number Tool number - number 3rd base axis pulse number 4th base axis pulse number 5th
13 User coordinate 12 27 Master tool coordinate Form The form data are represented by bit data in decimals. D7 D6 D5 D4 D3 D2 D1 D0 0: Fl i p, 0: Up, 0: Front , 0: R<180, 0: T<180, 0: S<180, 1: No- f l i p 1: Down 1: Rear 1: R>=180 1: T>=180 1: S>=180 * With the ERC or ERCⅡ, the data of D3, D4 and D5 are ignored. NOTE This function is effective only for transmission against the NX100/XRC/MRC (NX100/XRC/MRC transmission function).
BscGetVarData2 FUNCTION: Receives variables.( 7axes or more ) FORMAT: _declspec( dllexport ) short APIENTRY BscGetVarData2(short nCid,short type,short varno,double *p,short axisNum); ARGUMENTS: IN(Transfer) nCid type varno *p axisNum Communicaion handler ID number Variable type Variable number Variable storage pointer Axis OUT(Return) *p Variable storage pointer Return Value 0:Normal completion Others:Error codes REMARKS: Variable Types The variable types are represented as follows.
P[2] - - - - P[3] - - - - P[4] - - - - P[5] - - - - P[6] - - - - P[7] - - - - P[8] - - - - P[9] - - - - P[0] P[1] P[2] P[3] P[4] P[5] P[6] P[7] P[8] P[9] pulse Robot axis position type 1 Coordinate type X-axis coordinate (unit: mm) Y-axis coordinate (unit: mm) Z-axis coordinate (unit: mm) Tx (unit: ゜) Ty (unit: ゜) Tz (unit: ゜) Form Tool number L-axis pulse number U-axis pulse number R-axis pulse number B-axis pulse number T-axis pulse number 7axes pulse number 8axe
11 12 13 User coordinate 10 User coordinate 11 User coordinate 12 25 26 27 User coordinate 24 Tool coordinate Master tool coordinate Form The form data are represented by bit data in decimals. D7 D6 D5 D4 D3 D2 D1 D0 0: Fl i p, 0: Up, 0: Front , 0: R<180, 0: T<180, 0: S<180, 1: No- f l i p 1: Down 1: Rear 1: R>=180 1: T>=180 1: S>=180 NOTE This function is effective only for transmission against the NX100/XRC.
BscHostGetVarData FUNCTION: Receives variables.
Content of the numeric variable storage area Depending on the variable type, the numeric variable storage area contains the number of values indicated below.
The following coordinate names correspond to the coordinate type data.
BscHostGetVarDataM FUNCTION: Receives multiple variables at the same time.
BscIsAlarm FUNCTION: Reads alarm status.
BscIsCtrlGroup FUNCTION: Reads control group information. FORMAT: ARGUMENTS: _declspec( dllexport ) short APIENTRY BscIsCtrlGroup(short nCid); IN(Transfer) nCid Communication handler ID number OUT(Return) None Return Value -1:Fetch failed Others:Control group information REMARKS: Control Group Information The control group information is represented by bit data in decimals.
BscIsCtrlGroupXrc FUNCTION: Reads control group information.
BscIsCycle FUNCTION: Reads playback mode information.
BscIsError FUNCTION: Reads error status.
BscIsHold FUNCTION: Reads hold status. FORMAT: ARGUMENTS: _declspec( dllexport ) short APIENTRY BscIsHold(short nCid); IN(Transfer) nCid Communication handler ID number OUT(Return) None Return Value -1:Fetch failed 0:Not held Others:See below REMARKS: Hold Status The hold status data are represented by bit data in decimals.
BscIsJobLine FUNCTION: Reads the current job line number.
BscIsJobName FUNCTION: Reads the current job name.
BscIsJobStep FUNCTION: Reads the current job step number.
BscIsLoc FUNCTION: Reads the current robot position in pulse or XYZ frame system.
Current Position The current position data are as follows when the joint coordinate system or system are specified.
BscIsPlayMode FUNCTION: Reads the operation mode.
BscIsRemoteMode FUNCTION: Reads the command remote mode status.
BscIsRobotPos FUNCTION: Reads the current robot position in a specified frame system. existence of the external axis can also be specified. FORMAT: _declspec( dllexport ) short APIENTRY BscIsRobotPos(short nCid,char *framename,int isex,short *rconf,short *toolno,double *p); ARGUMENTS: IN(Transfer) nCid *framename isex *rconf *toolno *p The Communication handler ID number Coordinate name; BASE:Base coordinate system; ROBOT:Robot coordinate system; UF1:User coordinate system1...
Current Position The current position data are as follows when the joint coordinate system or Cartesian coordinate system is specified.
BscIsServo FUNCTION: Reads the servo status.
BscIsTaskInf FUNCTION: Reads task information. FORMAT: ARGUMENTS _declspec( dllexport ) short APIENTRY BscIsTaskInf(short nCid); IN(Transfer) nCid Communication handler ID number OUT(Return) None Return Value -1:Fetch failed Others:Task information REMARKS: Task Information The task information is represented as follows. 0:Master task 1:Sub 1 task 2:Sub 2 task “0” is returned when independent control is not allowed in the system.
BscIsTaskInfXrc FUNCTION: Reads task information. FORMAT: _declspec( dllexport ) short APIENTRY BscIcTaskInfXrc(short nCid) ARGUMENTS IN(Transfer) nCid Communication handler ID number OUT(Return) None Return Value -1:Fetch failed Others:Error codes REMARKS: Task Information The task information is represented as follows.
BscIsTeachMode FUNCTION: Reads whether in the teach mode or play mode.
BscJobWait FUNCTION: Waits for job completion until the robot stops or specified time expires. FORMAT: _declspec( dllexport ) short APIENTRY BscJobWait(short nCid,short time); ARGUMENTS: IN(Transfer) nCid time Communication handler ID number Wait time(-1:Unlimited; 0 to 32767seconds) OUT(Return) None Return Value -2:Abnormal completion -1:Operation incomplete 0:Operation completed Others:Error codes REMARKS: Cause of Incomplete Operation These causes are considered for imcomplete operation.
BscReadAlarmS FUNCTION: Reads the error code, error data and error message.
BscCancel FUNCTION: Cancels an error.
BscChangeTask FUNCTION: Changes a task. FORMAT: _declspec( dllexport ) short APIENTRY BscChangeTask(short nCid,short task); ARGUMENTS: IN(Transfer) nCid task Communication handler ID number Specified task number OUT(Return) None Return Value 0:Normal completion Others: Error codes REMARKS: Specified Task Number The task number is represented as follows.
BscContinueJob FUNCTION: Starts job.(Execution starts from the current line of the current job.
BscConvertJobP2R FUNCTION: Converts a pulse job to a relative job in a specified frame system. FORMAT: _declspec( dllexport ) short APIENTRY BscConvertJobP2R(short nCid,char *name,char *framename); ARGUMENTS: IN(Transfer) nCid Communication handler ID number *name Job name storage pointer *framename Coordinate name: BASE:Base coordinate: ROBOT:Robot coordinate: UF1:User coordinate1...
BscConvertJobR2P FUNCTION: Converts a relative job in a specified frame system to a pulse job.
BscDeleteJob FUNCTION: Deletes a job. FORMAT: _declspec( dllexport ) short APIENTRY BscDeleteJob(short nCid); ARGUMENTS: IN(Transfer) nCid Communication handler ID number OUT(Return) None Return Value 0:Normal completion 1:Cannot delete Others: Error codes REMARKS: Call Condition The BscSelectJob function must be called up and the job name to be deleted must be specified before executing this function.
BscHoldOn FUNCTION: Sets hold-ON.
BscHoldOff FUNCTION: Sets hold-OFF.
BscHostPutVarData FUNCTION: Sets variables.
Content of the numeric variable storage area Depending on the variable type, the numeric variable storage area contains the number of values indicated below.
Coordinate Types The following coordinate names correspond to the coordinate type data.
BscHostPutVarDataM FUNCTION: Sets multiple variables at the same time.
BscImov FUNCTION: Moves robot with linear motion form the current position for the increment value in a specified frame system.
Form The form data are represented by bit data in decimals. D7 D6 D5 D4 D3 D2 D1 D0 0: Fl i p, 0: Up, 0: Front , 0: R<180, 0: T<180, 0: S<180, 1: No- f l i p 1: Down 1: Rear 1: R>=180 1: T>=180 1: S>=180 * With the ERC or ERCⅡ, the data of D3, D4 and D5are ignored.
BscMDSP FUNCTION: Sends message data. FORMAT: *ptr); ARGUMENTS: _declspec( dllexport ) short APIENTRY BscMDSP(short nCid,char IN(Transfer) nCid *ptr Communication handler ID number Message storage pointer OUT(Return) None Return Value 0:Normal completion Others: Error codes REMARKS: Number of message characters The character string for a message is restricted as follows. With NX100/XRC/MRC; Character string with 30 characters maximum. With ERC; Character string with 28 characters maximum.
BscMov FUNCTION: Moves robot with specified motion from the current position to a target position in a specified frame system.
Target Position The target position data are represented as follows.
BscMovj FUNCTION: Moves robot with joint motion to a target position in a specified frame system. FORMAT: _declspec( dllexport ) short APIENTRY BscMovj(short nCid,double spd,char *framename,short rconf,short toolno, double *p); ARGUMENTS: IN(Transfer) nCid Communication handler ID number spd Move speed(0.01 to 100.0%) *framename Coordinate name; BASE:Base coordinate; ROBOT:Robot coordinate; UF1:User coordinate1...
Target Position The target positions are represented as follows.
BscMovl FUNCTION: Moves robot with linear motion to a target position in a specified frame system.
Target Position The target positions are represented as follows.
BscOPLock FUNCTION: Interlocks the robot. FORMAT: _declspec( dllexport ) short APIENTRY BscOPLock(short nCid); ARGUMENTS: IN(Transfer) nCid Communication handler ID number OUT(Return) None Return Value 0:Normal completion Others: Error codes REMARKS: Interlock Status Once interlock is set, all but the following are interlocked.
BscOPUnLock FUNCTION: Releases the robot interlocked status.
BscPMov FUNCTION: Moves robot to a specified pulse position.
BscPMovj FUNCTION: Moves robot to a specified pulse position with joint motion. FORMAT: _declspec( dllexport ) short APIENTRY BscPMovj(short nCid,double sped,short toolno,double *p); ARGUMENTS: IN(Transfer) nCid spd toolno *p Communication handler ID number Move speed(0.1 to □□□□.□mm/s,0.1 to □□□.□°/s) Tool number Target position storage pointer OUT(Return) None Return Value 0:Normal completion Others: Error codes REMARKS: Target Position The target position data are represented as follows.
BscPMovl FUNCTION: Moves robot to a specified pulse position with linear motion.
BscPutUFrame FUNCTION: Sets a specified user frame data. FORMAT: _declspec( dllexport ) short APIENTRY BscPutUFrame(shortnCid,char *ufname,double *p); ARGUMENTS: IN(Transfer) nCid *ufname *p Communication handler ID number Storage pointer of the user coordinate name to be written in User coordinate data storage pointer OUT(Return) None Return Value 0:Normal completion Others: Error codes REMARKS: User Coordinate Name The following coordinate names correspond to the user coordinate numbers.
Vari abl es Coordi nat e Syst em P[ 0] P[ 1] P[ 2] P[ 3] P[ 4] P[ 5] P[ 6] P[ 7] P[ 8] P[ 9] P[ 10] P[ 11] P[ 12] P[ 13] P[ 14] P[ 15] P[ 16] P[ 17] P[ 18] P[ 19] P[ 20] P[ 21] P[ 22] P[ 23] P[ 24] P[ 25] P[ 26] P[ 27] ORG Meani ng X- axi s coordi nat e ( uni t : mm, ef f ect i ve down t o 3 deci mal pl aces) Y- axi s coordi nat e ( uni t : mm, ef f ect i ve down t o 3 deci mal pl aces) Z- axi s coordi nat e ( uni t : mm, ef f ect i ve down t o 3 deci mal pl aces) Wri st angl e TX ( uni t : °, ef f ect i
BscPutVarData FUNCTION: Sets variable data. FORMAT: _declspec( dllexport) short APIENTRY BscPutVarData(short nCid,short type,short varno,double *p); ARGUMENTS: IN(Transfer) nCid type varno *p Communication handler ID number Variable type Variable number Variable storage pointer OUT(Return) None Return Value 0:Normal completion Others: Error codes REMARKS: Variable Types The variable types are represented as follows.
P[3] - - - - P[4] - - - - P[5] - - - - P[6] - - - - P[7] P[8] P[9] - - - - P[0] P[1] P[2] P[3] P[4] P[5] P[6] P[7] P[8] P[9] pulse Robot axis position type 1 Coordinate type X-axis coordinate (unit: mm) Y-axis coordinate (unit: mm) Z-axis coordinate (unit: mm) Tx (unit: ゜) Ty (unit: ゜) Tz (unit: ゜) Form Tool number U-axis pulse number R-axis pulse number B-axis pulse number T-axis pulse number Tool number - 3rd base axis pulse number 4th base axis pulse number 5th base axis puls
12 13 User coordinate 11 User coordinate 12 26 27 Tool coordinate Master tool coordinate Form The form data are represented by bit data in decimals. D7 D6 D5 D4 D3 D2 D1 D0 0: Fl i p, 0: Up, 0: Front , 0: R<180, 0: T<180, 0: S<180, 1: No- f l i p 1: Down 1: Rear 1: R>=180 1: T>=180 1: S>=180 * With the ERC or ERCⅡ, the data of D3, D4, and D5 are ignored. NOTE This function is effective only for transmission against the NX100/XRC/MRC (NX100/XRC/MRC transmission functions).
BscPutVarData2 FUNCTION: Sets variable data. ( 7axes or more ) FORMAT: _declspec( dllexport) short APIENTRY BscPutVarData2(short nCid,short type,short varno,double *p); ARGUMENTS: IN(Transfer) nCid type varno *p Communication handler ID number Variable type Variable number Variable storage pointer OUT(Return) None Return Value 0:Normal completion Others: Error codes REMARKS: Variable Types The variable types are represented as follows.
P[3] - - - - P[4] - - - - P[5] - - - - P[6] - - - - P[7] - - - - P[8] - - - - P[9] - - - - P[0] P[1] P[2] P[3] P[4] P[5] P[6] P[7] P[8] P[9] pulse Robot axis position type 1 Coordinate type X-axis coordinate (unit: mm) Y-axis coordinate (unit: mm) Z-axis coordinate (unit: mm) Tx (unit: ゜) Ty (unit: ゜) Tz (unit: ゜) Form Tool number U-axis pulse number R-axis pulse number B-axis pulse number T-axis pulse number 7axes pulse number 8axes pulse number Tool number 3rd base a
10 11 12 13 User coordinate 9 User coordinate 10 User coordinate 11 User coordinate 12 24 25 26 27 User coordinate 23 User coordinate 24 Tool coordinate Master tool coordinate Form The form data are represented by bit data in decimals. D7 D6 D5 D4 D3 D2 D1 D0 0: Fl i p, 0: Up, 0: Front , 0: R<180, 0: T<180, 0: S<180, 1: No- f l i p 1: Down 1: Rear 1: R>=180 1: T>=180 1: S>=180 NOTE This function is effective only for transmission against the NX100/XRC.
BscStartJob FUNCTION: Starts job. (A job to be started has the job name which is selected last.) FORMAT: ARGUMENTS: _declspec( dllexport) short APIENTRY BscStartJob(Short nCid); IN(Transfer) nCid Communication handler ID number OUT(Return) None Return Value 0:Normal completion 1:Current job name not specified Others: Error codes REMARKS: Call Condition The BscSelectJob function must be called up and the current job name must be specified before executing this function.
BscSelectJob FUNCTION: Selects a job. FORMAT: _declspec( dllexport ) short APIENTRY BscSelectJob(short nCid,char *name); ARGUMENTS: IN(Transfer) nCid *name Communication handler ID number Job name storage pointer OUT(Return) None Return Value 0:Normal completion Others: Error codes REMARKS: Job Name The character string for the job name is restricted as follows. Character string with 30 characters maximum.
BscSelectMode FUNCTION: Selects mode. (Teach or Play) FORMAT: _declspec( dllexport ) short APIENTRY BscSelectMode(short nCid,short mode); ARGUMENTS: IN(Transfer) nCid mode Communication handler ID number Selected mode OUT(Return) None Return Value 0:Normal completion Others: Error codes REMARKS: Selected Mode The selected mode is represented as follows.
BscSelLoopCycle FUNCTION: Changes the cycle mode to auto mode.
BscSelOneCycle FUNCTION: Changes the cycle mode to 1-cycle mode.
BscSelStepCycle FUNCTION: Changes the cycle mode to step mode.
BscSetLineNumber FUNCTION: Sets a line number of current job.
BscSetMasterJob FUNCTION: Sets a job as a master job. FORMAT: _declspec( dllexport ) short APIENTRY BscSetMasterJob(short nCid); ARGUMENTS: IN(Transfer) nCid Communication handler ID number OUT(Return) None Return Value 0:Normal completion Others: Error codes REMARKS: Call Condition The BscSelectJob function must be called up and the registered job must be specified executing this function.
BscReset FUNCTION: Resets a robot alarm.
BscSetCtrlGroup FUNCTION: Sets a control group. FORMAT: _declspec( dllexport ) short APIENTRY BscSetCtrlGroup(short nCid,short groupno); ARGUMENTS: IN(Transfer) nCid groupno Communication handler ID number Control group information to be set OUT(Return) None Return Value 0:Normal completion Others: Error codes REMARKS: Control Group Information The control group information is represented by bit data in decimals.
BscSetCtrlGroupXrc FUNCTION: Sets a control group.
(such as travel axis), when the manipulator with this base axis is specified, this base axis is automatically specified. The following settings can not be made. . Selection of control axis which does not exist . Simultaneous specification of R1 and R2 .
BscServoOff FUNCTION: Sets servo power supply OFF.
BscServoOn FUNCTION: Sets servo power supply ON.
7.4 DCI Funtion Job save, load, or variable load, save are automatically accomplished when the robot is under playback mode, by preparing the functions corresponding to the instructions. Reads the robot status (current position, alarm, error, servo status, etc.), and controls the system (start, hold, job call, etc.). The following functions are available.
BscDCILoadSave FUNCTION: Loads or saves a job with DCI instruction. FORMAT: _declspec( dllexport ) short APIENTRY BscDCILoadSave(short nCid,short timec); ARGUMENTS: IN(Transfer) nCid timec Communication handler ID number Waiting time for sending/receiving (sec) OUT(Return) None Return Value -1:Failed to send/receive Others:Number of received jobs REMARKS: Number of Sending/Receiving This function retries communication of the sending/receiving signal until the specified waiting time comes.
BscDCILoadSaveOnce FUNCTION: Loads or saves a job with DCI instruction. FORMAT: _declspec( dllexport ) short APIENTRY BscDCILoadSaveOnce(short nCid); ARGUMENTS: IN(Transfer) nCid Communication handler ID number OUT(Return) None Return Value -1:Failed to send/receive Others:Number of received jobs REMARKS: Number of Sending/Receiving This function waits indefinitely until sending/receiving request is sent from the Communication is accomplished a single time when the request arrives. robot.
BscDCIGetPos FUNCTION: Gets a variable with DCI instruction.
D7 D6 D5 D4 D3 D2 D1 D0 0: Fl i p, 0: Up, 0: Front , 0: R<180, 0: T<180, 0: S<180, 1: No- f l i p 1: Down 1: Rear 1: R>=180 1: T>=180 1: S>=180 * With the ERC or ERCⅡ, the data of D3, D4 and D5 are ignored. Variables The variable types are represented as follows.
BscDCIGetPos2 FUNCTION: Gets a variable with DCI instruction.
D7 D6 D5 D4 D3 D2 D1 D0 0: Fl i p, 0: Up, 0: Front , 0: R<180, 0: T<180, 0: S<180, 1: No- f l i p 1: Down 1: Rear 1: R>=180 1: T>=180 1: S>=180 Variables The variable types are represented as follows.
BscDCIGetVarData FUNCTION: Gets a variable with DCI instruction.
Form The form data are represented by bit data in decimals. D7 D6 D5 D4 D3 D2 D1 D0 0:Flip, 0:Elbow A bove, 0:Front S ide 0:R<180, 0:T<180, 0:S<180, R eserved 1:N o-Flip 1:Elbow U nder 1:B ack S ide 1:R>=180 1:T>=180 1:S>=180 0:P revious S tep C onsideration 1:Form C onsideration 1) With the ERC or ERCⅡ, the data from D3 to D7 are disregarded. 2) With the MRC or MRCⅡ, the data D6 and D7 are disregarded.
BscDCIPutPos FUNCTION: Sets a variable with DCI instruction. FORMAT: _declspec( dllexport ) short APIENTRY BscDCIPutPos(short nCid,short type,short rconf,double *p); ARGUMENTS: IN(Transfer) nCid type rconf *p Communication handler ID number Variable type number Form data storage pointer Variable storage pointer OUT(Return) None Return Value -1:Failed to receive Others:Normal completion REMARKS: Variable Type Number The variable type number is represented as follows.
D7 D6 D5 D4 D3 D2 D1 D0 0: Fl i p, 0: Up, 0: Front , 0: R<180, 0: T<180, 0: S<180, 1: No- f l i p 1: Down 1: Rear 1: R>=180 1: T>=180 1: S>=180 With the ERC or ERCⅡ, the data of D3, D4 and D5 are ignored. Variables The variable types are represented as follows.
BscDCIPutPos2 FUNCTION: Sets a variable with DCI instruction.
D7 D6 D5 D4 D3 D2 D1 D0 0: Fl i p, 0: Up, 0: Front , 0: R<180, 0: T<180, 0: S<180, 1: No- f l i p 1: Down 1: Rear 1: R>=180 1: T>=180 1: S>=180 Variables The variable types are represented as follows.
BscDCIPutVarData FUNCTION: Sets a variable with DCI instruction.
Form The form data are represented by bit data in decimals. D7 D6 D5 D4 D3 D2 D1 D0 0:Flip, 0:Elbow A bove, 0:Front S ide 0:R<180, 0:T<180, 0:S<180, R eserved 1:N o-Flip 1:Elbow U nder 1:B ack S ide 1:R>=180 1:T>=180 1:S>=180 0:P revious S tep C onsideration 1:Form C onsideration 1) With the ERC or ERCⅡ, the data from D3 to D7 are disregarded. 2) With the MRC or MRCⅡ, the data D6 and D7 are disregarded.
7.5 I/O Signal Read/Write Function Reads or writes the I/O signals. The following functions are available.
BscReadIO FUNCTION: Reads specified count of coil status. specified.
List of I/O Signals Signal Signal Range Name Read Write 0xxx 0010 to 0167 (128) Robot universal input ○ × 1xxx 1010 to 1167 (128) Robot universal output ○ × 2xxx 2010 to 2187 (144) External input ○ × 3xxx 3010 to 3187 (144) External output ○ × 4xxx 4010 to 4167 (128) Robot specific input ○ × 5xxx 5010 to 5247 (192) Robot specific output ○ × 6xxx 6010 to 6047 (32) Timer/counter × × 7xxx 7010 to 7327 (256) Auxiliary relay ○ × 8xxx 8010 to 8087 (64) Control statu
BscReadIO2 FUNCTION: Reads specified count of coil status. specified.
List of I/O Signals Signal Signal Range Name Read Write 0xxxx 00010 to 01287 (1024) Robot universal input ○ × 1xxxx 10010 to 11287 (1024) Robot universal output ○ × 2xxxx 20010 to 21287 (1024) External input ○ × 22xxx 22010 to 23287 (1024) Network input ○ × 3xxxx 30010 to 31287 (1024) External output ○ ○ 32xxx 32010 to 33287 (1024) Network output ○ × 4xxxx 40010 to 40807 (640) Robot specific input ○ × 5xxxx 50010 to 51007 (800) Robot specific output ○ × 6xxxx -
BscWriteIO FUNCTION: Writes specified count of coil status. Up to 256 coil numbers can be specified. Address numbers to be written are only of Nos. 9000’s.
List of I/O Signals Signal Signal Range Name Read Write 0xxx 0010 to 0167 (128) Robot universal input ○ × 1xxx 1010 to 1167 (128) Robot universal output ○ × 2xxx 2010 to 2187 (144) External input ○ × 3xxx 3010 to 3187 (144) External output ○ × 4xxx 4010 to 4167 (128) Robot specific input ○ × 5xxx 5010 to 5247 (192) Robot specific output ○ × 6xxx 6010 to 6047 (32) Timer/counter × × 7xxx 7010 to 7327 (256) Auxiliary relay ○ × 8xxx 8010 to 8087 (64) Control statu
BscWriteIO2 FUNCTION: Writes specified count of coil status. Up to 256 coil numbers can be specified. Address numbers to be written are only of Nos. 9000’s.
List of I/O Signals Signal Signal Range Name Read Write 0xxxx 00010 to 01287 (1024) Robot universal input ○ × 1xxxx 10010 to 11287 (1024) Robot universal output ○ × 2xxxx 20010 to 21287 (1024) External input ○ × 22xxx 22010 to 23287 (1024) Network input ○ ○ 3xxxx 30010 to 31287 (1024) External output ○ × 32xxx 32010 to 33287 (1024) Network output ○ × 4xxxx 40010 to 40807 (640) Robot specific input ○ × 5xxxx 50010 to 51007 (800) Robot specific output ○ × 6xxxx -
7.6 Other Functions The following functions are also available.
BscClose FUNCTION: Releases a communication handler. FORMAT: _declspec( dllexport ) short APIENTRY BscClose(short nCid); ARGUMENTS: IN(Transfer) nCid Communication handler ID number OUT(Return) None Return Value 0:Normal completion Others:Failed to release REMARKS: Call Condition It is necessary to disconnect the communications lines by BscDisConnect function before calling this function.
BscCommand FUNCTION: Sends a transmission command.
BscConnect FUNCTION: Connects communications lines. FORMAT: ARGUMENTS: _declspec( dllexport ) short APIENTRY BscConnect(short nCid); IN(Transfer) nCid Communication handler ID number OUT(Return) None Return Value 0:Error 1:Normal completion REMARKS: Call Condition Before calling this function, it is necessary to set the communications lines with BscOpen function followed by BscSetCom function (serial port) or BscSetEther function (Ethernet) or BscSetEServerMode function (Ethernet Server).
BscDisConnect FUNCTION: Disconnects communications lines.
BscDiskFreeSizeGet FUNCTION: Gets free capacity of the specified drive.
BscEnforcedClose FUNCTION: Closes compulsorily.
BscGets FUNCTION: Sends a character string by transmission in TTY level.
BscInBytes FUNCTION: Returns the number of characters which are received by transmission in TTY level.
BscIsErrorCode FUNCTION: Gets an error code. FORMAT: nCid); ARGUMENTS: _declspec( dllexport ) short APIENTRY BscIsErrorCode(short IN(Transfer) nCid Communication handler ID number OUT(Return) None Return Value 0:No error Others:Error codes REMARKS: Call Condition The BscIsError function must be called up and existence of error must be checked executing this function.
BscOpen FUNCTION: Gets a communication handler.
BscOutBytes FUNCTION: Returns the remaining number of characters which are sent by transmission in TTY level.
BscPuts FUNCTION: Sends a character string by transmission in TTY level.
BscReConnect FUNCTION: Connects communications lines again. FORMAT: ARGUMENTS: _declspec( dllexport ) short APIENTRY BscReConnect(short nCid); IN(Transfer) nCid Communication handler ID number OUT(Return) None Return Value 0:Error 1:Normal completion REMARKS: Call Condition Before calling this function, it is necessary to set the communications lines with the BscOpen function and BscSetCom function (serial port), or BscSetEther function (Ethernet) or BscSetESeverMode function (Ethernet Server).
BscReStartJob FUNCTION: Starts job again. FORMAT: ARGUMENTS: _declspec( dllexport) short APIENTRY BscReStartJob(Short nCid); IN(Transfer) nCid Communication handler ID number OUT(Return) None Return Value 0:Normal completion 1:Current job name not specified Others: Error codes REMARKS: Call Condition The BscSelectJob function must be called up and the current job name must be specified before executing this function.
BscSetBreak FUNCTION: Cancels transmission.
BscSetCom FUNCTION: Sets communications parameters of the serial port. FORMAT: _declspec( dllexport )short APIENTRY BscSetCom(short nCid, short port, DWORD baud, short parity, short clen, short stp); ARGUMENTS: IN(Transfer) nCid port baud parity Clen Stp Communication handler ID number Communication port number 1:COM1,2:COM2,3:COM3,4:COM4,・・・,255:COM255 Baud rate 150, 300, 600, 1200, 2400, 4800, 9600, 19200 Parity 0: None, 1: Odd, 2: Even Data length 7: 7 bits, 8: 8 bits Stop bit 0: 1 bit, 1: 1.
BscSetEServerMode FUNCTION: Sets the communication parameters for Ethernet Server function.
BscSetEther FUNCTION: Sets parameters for Ethernet communications.
BscSetCondBSC FUNCTION: Sets a communication control timer or retry counter.
BscStatus FUNCTION: Reads the status.
7.7 DLL Functions relatedKey Words Corresponding to Transmission- 7.7.
BscGetVarData2 BscHostGetVarData Operation System HOLD BscHoldOn BscHoldOff RESET BscReset CANCEL BscCancel MODE BscSelectMode CYCLE BscSelStepCycle BscSelOneCycle BscSelLoopCycle HLOCK BscOPLock BscOPUnLock MDSP BscMDSP SVON BscServoOn BscServoOff CGROUP BscSetCtrlGroupXrc BscSetCtrlGroup CTASK BscChangeTask Editing System DELETE BscDeleteJob WUFRAME BscPutUFrame CVTRJ BscConvertJobP2R DOWNLOAD BscDownLoad BscDownLoadEx CVTSJ BscConvertJobR2P LOADV BscPutVarData BscPutVarData2 BscHostPutVar
BscContinueJob MOVJ BscMovj BscMov MOVL BscMovl BscMov IMOV BscImov BscMov PMOVJ BscPMovj BscPMov PMOVL BscPMovl BscPMov Other DLL Functions BscCommand BscStatus 7.7.2 DLL Functions Related to DCI Function LOADJ BscDCILoadSave BscDCILoadSaveOnce SAVEJ BscDCILoadSave BscDCILoadSaveOnce LOADV BscDCIGetPos BscDCIGetPos2 BscDCIGetVarData SAVEV BscDCIPutPos BscDCIPutPos2 BscDCIPutVarData 7.7.3 DLL Functions Related to I/O Read/Write I/O Read BscReadIO BscReadIO2 I/O Write BscWriteIO BscWriteIO2 7.7.
Port Disconnection BscClose BscDisConnect Transmission Parameter Setting BscSetCondBSC 7.7.
8.
The executability of each command differs depending on the status of the XRC as shown in the following table.
185/201
The executability of each command differs depending on the status of the NX100 as shown in the following table.
187/201