Practical examples
Section 5-2
322
'VR(906) - VR(system01) used in system detection
'VR(907) - VR(signal_state) gives feedback on signal state
'VR(908) - "sys_error" system error detected
'VR(909) - "first_error" gives the axis number causing a
'motion error
'VR(910,912 ... 940) - VR(servoaxis_n*2) stores
'AXISSTATUS to report
' to upper controller
'VR(911,913 ... 941) - VR(servaxis_n*2) stores the
'alarm code of
' the servo
'Omron Auto Generated - Symbols
'Warning: Automated code section - any manual code changes
will be lost.
First action is to declare the GLOBAL variables and CONSTANTS and
make other initialization
'Omron Auto Generated - Globals
GLOBAL "length",0
GLOBAL "lot_n",1
GLOBAL "product_type",2
GLOBAL "machine_speed",3
GLOBAL "status_word",900 'SHELL
GLOBAL "action",902 'SHELL
GLOBAL "sys_error",908 'SHELL
GLOBAL "first_error",909 'SHELL
'Omron Auto Generated - Constants
CONSTANT "max_axis",15 'SHELL
CONSTANT "status_bits",901 'SHELL
CONSTANT "diag01",903 'SHELL
CONSTANT "diag02",904 'SHELL
CONSTANT "diag03",905 'SHELL
CONSTANT "system01",906 'SHELL
CONSTANT "signal_state",907 'SHELL
CONSTANT "servo_status",910 'SHELL
CONSTANT "servo_alarm",911 'SHELL
'ETHERNET Settings
ETHERNET(1,-1,12,9600) 'FINS port number
ETHERNET(1,-1,7,0) 'Modbus TCP Mode
ETHERNET(1,-1,9,0) 'Modbus TCP Data Configuration
'Omron Auto Generated - CAM TABLE
'Omron Auto Generated - Symbols End
'Omron Auto Generated - Local Variables
alarm_bit=0
Содержание SYSMAC CJ Series
Страница 2: ......
Страница 70: ...Specifications Section 2 4 58...
Страница 84: ...FINS commands Section 3 4 72...
Страница 148: ...All BASIC commands Section 4 2 136 AXIS 1 AXIS 0...
Страница 277: ...Section 265 SECTION 5 Examples This chapter gives 2 categories of examples and tips How to s Practical examples...
Страница 370: ...Section 358...