![background image](http://html1.mh-extra.com/html/omron/sysmac-cj-series/sysmac-cj-series_operation-manual_743585333.webp)
Practical examples
Section 5-2
321
5-2-1-1 SHELL programs and Trajexia Studio
Trajexia Studio helps the user to create a proper SHELL program.
When a new project is created, a SHELL program with the basic structure is
created automatically (see 5-1-1).
When you define the hardware and set the parameters for the application, you
can select to add your changes to the SHELL program so, the user do not
have to type it manually.
Use the example SHELL program as a template to start, stop and reset your
machine and adjust the rest of the SHELL program according to the
requirements.
The SHELL program is automatically selected to start at POWER-ON in low-
priority task 1.
5-2-2
SHELL program example
The example program below is a typical SHELL program created by Trajexia
studio.
'========================================================
'This SHELL program is an example that OMRON provide as
'recommended. This program should be modified for the
'particular user application.
'========================================================
'Reserved symbol area for SHELL program handling.
'Do not use these areas in your application programs:
'VR(900) - "status_word" reports about the status of the
'system
' =0 during initialization
' =1 application stopped with no error
' =2 errors in the system
' =3 application running
'VR(901) - VR(status_bits) reports next status
' Bit0 Alarm flag
' Bit15 ML communication error with one slave
'VR(902) - "action" send messages to the upper controller
' =0 during initialization
' =1 Push RESET to restart
' =2 Resetting
' =3 System healthy
'VR(903) - VR(diag01) gives feedback of the MECHATROLINK
'initialisation
' Bit0 Could not get the ML slave number
' Bit1 Slave number is uncorrect
' Bit15 Detection OK
'VR(904) - VR(diag02) gives feedback of the MECHATROLINK
'Slaves
' Bitn Slave n not detected
'VR(905) - VR(diag03) gives feedback forUnit detection
' Bitn Unit n detected
Содержание 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...