12 Automation lntegration
12.4 Sample Robotic - CNC lntegration Programs
182
OPEN VICE
DRAW( ---OPEN PM8000 VICE --- )
MSWINDOWS(cscript O:\ project_name \WS3\MILL\CHAIN.VBS OVICE)
END
CLOSE VICE
DRAW( ---CLOSE PM8000 CHUCK --- )
MSWINDOWS(cscript O:\ project_name \WS3\MILL\CHAIN.VBS CVICE)
END
PLACE
DRAW( ---PLACE PM8000 VICE--- )
MSWINDOWS(cscript O:\ project_name \WS3\MILL\CHAIN.VBS VICE)
END
12.4.3.
Sample SCORBASE Programs
Shown below is a sample SCORBASE program for use in a typical FMS station in an OpenCIM/FMS
environment.
Remark: $ Beginning of automatically generated code
Call Subroutine $PICK_AND_PLACE_0,31,1,1,3,101
Set Subroutine $PICK_AND_PLACE_0,31,1,1,3,101
Set Variable TASK_ID = 300014
Set Variable PART_ID = 0
Set Variable SOURCE_DEVICE_ID = 31
Set Variable SOURCE_DEVICE_INDEX = 1
Set Variable TARGET_DEVICE_ID = 1
Set Variable TARGET_DEVICE_INDEX = 3
Set Variable PICK_AND_PLACE_NOTE = 101
Call Subroutine AUTOEXEC
Call Subroutine GET031
Call Subroutine PUT001
Return from Subroutine
Remark: $ End of automatically generated code
Remark: ****************************************************************************
Set Subroutine INITC
Load script file: PCPLC3.VBS
Disable Input Interrupt 1
On Input Interrupt 1 On Run Subroutine PM8000_CYCLE_FINISHED
Return from Subroutine
Remark: ****************************************************************************
Set Subroutine AUTOEXEC
Set Variable SCRIPT.PART_ID = PART_ID
Set Variable SCRIPT.SOURCE_DEVICE_ID = SOURCE_DEVICE_ID
Set Variable SCRIPT.SOURCE_DEVICE_INDEX = SOURCE_DEVICE_INDEX
Set Variable SCRIPT.TARGET_DEVICE_ID = TARGET_DEVICE_ID
Set Variable SCRIPT.TARGET_DEVICE_INDEX = TARGET_DEVICE_INDEX