Festo Software Tools [PDF]

12. Recognising errors with FST: The FST error program. 12−1 . . . . . . . . . . . . . . . . . . 12.1. General informa

68 downloads 42 Views 3MB Size

Recommend Stories


Software Tools for Software Maintenance
Your task is not to seek for love, but merely to seek and find all the barriers within yourself that

Festo Didactic
Your big opportunity may be right where you are now. Napoleon Hill

software development tools licence
No amount of guilt can solve the past, and no amount of anxiety can change the future. Anonymous

Festo Didactic
You miss 100% of the shots you don’t take. Wayne Gretzky

Festo Didactic
Life isn't about getting and having, it's about giving and being. Kevin Kruse

Festo Didaktik
We can't help everyone, but everyone can help someone. Ronald Reagan

Festo Didactic
Come let us be friends for once. Let us make life easy on us. Let us be loved ones and lovers. The earth

Evaluation Model for Software Tools
I cannot do all the good that the world needs, but the world needs all the good that I can do. Jana

Probe software for machine tools
What you seek is seeking you. Rumi

Festo Endüstri 4.0
Be grateful for whoever comes, because each has been sent as a guide from beyond. Rumi

Idea Transcript


Festo Software Tools

Textbook Automating withFST

682 300 en 0402NH

Contents and general instructions

Author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B. Plagemann Original . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . de Edition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . en 0402NH Designation . . . . . . . . . . . . . . . . . . . . . . . . P.BE−FST4−LB−EN Order no. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 682 300

E (Festo AG&Co. KG, D73726 Esslingen, Federal Republic of Germany, 2004) Internet: http://www.festo.com e−mail: [email protected] The reproduction, distribution and utilization of this docu ment as well as the communicaton of its contents to others wi thout express authorization is prohibited. Offenders will be held liable for the payment of damages. All rights reserved in the event of the grant of a patent, utility module or design.

Festo P.BE−FST4−LB−EN en 0402NH

I

Contents and general instructions

Microsoft® Windows®

II

registered trade mark of Microsoft Corporation

Festo P.BE−FST4−LB−EN en 0402NH

Contents and general instructions

Contents Designated use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Target group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Example projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Important user instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

IX IX IX X

1.

Programming for automation technology . . . . . . . . . . . . . . . . . . . . . . . . . . .

1−1

1.1 1.2

About this book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Programming for automation technology or the PC . . . . . . . . . . . . . . . . . . . .

1−4 1−4

2.

The basic rules of an FST project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2−1

2.1

Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2−3

3.

The first FST project: Controlling a garage door . . . . . . . . . . . . . . . . . . . . .

3−1

3.1

Project, I/Os, program, IF ... THEN ... OTHRW . . . . . . . . . . . . . . . . . . . . . . . . 3.1.1 Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.2 Selecting the controller type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.3 I/O configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.4 Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.5 Compiling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.6 Downloading the project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.7 Checking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.8 Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.9 The Garage project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3−5 3−5 3−6 3−7 3−11 3−30 3−34 3−37 3−40 3−42 3−43

3.2

Festo P.BE−FST4−LB−EN en 0402NH

III

Contents and general instructions

4.

A slightly larger project with FST: Controlling a drilling machine . . . . . . .

4−1

4.1

The drilling machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1.1 Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1.2 Actuators and sensors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1.3 The program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1.4 Allocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Program organisation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The first steps in the statement list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3.1 Starting the program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3.2 Sequential program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3.3 Downloading the project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The first steps in ladder diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.4.1 Starting the program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.4.2 Sequential program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.4.3 Step programming with counters . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.4.4 Downloading the project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4−4 4−4 4−5 4−6 4−7 4−8 4−10 4−10 4−11 4−12 4−13 4−13 4−14 4−19 4−20

5.

The STEP operation in the statement list . . . . . . . . . . . . . . . . . . . . . . . . . . .

5−1

5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8

The STEP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5−4 The contect of a step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5−5 Going to the next step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5−5 The name of the step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5−7 Jumping from step to step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5−8 The last step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5−11 The alternative sequencer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5−11 The parallel sequencer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5−12

6.

Multitasking with FST: The drilling machine’s operating modes . . . . . . . .

6−1

6.1 6.2 6.3 6.4

Programs work simultaneously . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Supervising programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Starting programs with time limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Exchanging Switch the outputs 0 ... 7 to 1/A

50)

15−14

In chapter 18 an extremely shortened overview is provided of the CIcommands. The CI is described in detail in the FST manual. To address inputs, outputs, flags etc. for this purpose it is necess− ary to use the original (German) names: E − input, A − output, M − flag etc.

Festo P.BE−FST4−LB−EN en 0402NH

15. The WEB server in the controller

The above example can also be expanded:

HTML HEAD TITLEMy first HTML page/TITLE /HEAD BODY H1 This is an example for the FST book /H1 BR H2 This is not an HTML course, BR it is simply a very small introduction. /H2 BR The input word 0 has the value : FSTCI DEW0 BR A href="main.htm?ci:maw0=255"Switch the ouputs 0 ... 7 to 1/A A href="main.htm?ci:maw0=255"Switch the ouputs 0 ... 7 to 0/A /BODY /HTML

Festo P.BE−FST4−LB−EN en 0402NH

15−15

15. The WEB server in the controller

Fig.15/13 Accessing the process’s variables is the basis for visualising and operating a process with the aid of the WEB browser.

15−16

Festo P.BE−FST4−LB−EN en 0402NH

Tips and tricks  Helpful yet fun

Chapter 16

Festo P.BE−FST4−LB−EN en 0402NH

16−1

16. Tips and tricks  Helpful yet fun

Contents

16.

Tips and tricks  Helpful yet fun . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16−1

16.1 16.2 16.3 16.4

Allocation list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Statement list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Updating the project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Finding syntax errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

16−2

16−3 16−6 16−7 16−8

Festo P.BE−FST4−LB−EN en 0402NH

16. Tips and tricks  Helpful yet fun

16.1 Allocation list ·

You can copy the allocation list via the Windows clipboard both from or to Excel. If you would prefer to edit in Excel, then the best way to start is with an entry in the allocation list, which you then copy to Excel. There you can edit as you please, mark the entire list and copy it back to the allocation list editor.

Fig.16/1

Festo P.BE−FST4−LB−EN en 0402NH

16−3

16. Tips and tricks  Helpful yet fun

·

If you wish, you can also create the allocation list in Word. For this, create a table in Word. Mark the entire table and copy it to FST.

Fig.16/2

16−4

Festo P.BE−FST4−LB−EN en 0402NH

16. Tips and tricks  Helpful yet fun

·

You can sort the allocation list as you please. It is sorted by default in alphabetical and numeric order by operand address. That is why I0.0 is the first entry. Click  as you do in Windows  the column icon., e.g. symbol, and the allocation list is sorted according to the symbol name.

Fig.16/3

Festo P.BE−FST4−LB−EN en 0402NH

16−5

16. Tips and tricks  Helpful yet fun

16.2 Statement list ·

The FST statement list has a clear priority: AND comes before OR. In a mixed logic AND will thus always be linked first, then OR. The garage door example could thus also be programmed without brackets.

””Open garage doors IF Open_in OR Open_out AND Key AND N Relay_clo AND N Close_in AND N Close_outs AND N open THEN SET Relay_op

’I0.2: ’I0.2: ’I0.6: ’O0.1: ’I0.3: ’I0.5: ’I0.0: ’O0.0:

Push button inside Open Push button outside Open Key switch outside K2: Close garage door Push button inside Close Push button outside Close Limit keys garage door is open K1: Open garage door

Fig.16/4

16−6

Festo P.BE−FST4−LB−EN en 0402NH

16. Tips and tricks  Helpful yet fun

16.3 Updating the project FST allows entire projects to be downloaded 51). However, as long as the project changes contain no new modules or the like, a ’Update Project’ is possible. You will find this entry in the Online menu. In Update Project the project changes are analysed and a comparably small file is transferred contain ing just these changes. The changes are then integrated into the project in the running CPU operation.

Fig.16/5

51)

Festo P.BE−FST4−LB−EN en 0402NH

Old ’FST pros’ may remember that you could also download individual programs in FST. This is not possible anymore.

16−7

16. Tips and tricks  Helpful yet fun

16.4 Finding syntax errors If there is an error in your project, FST will not completely compile the project and will also not transfer it to the con troller. The message window shows which error has been found and where it is suspected to be. The following example shows such an error.

Fig.16/6 The line CZ0P00V1.AWL(5) Invalid sequence of setence part

points out where the error can be found: CZ0POOV1.AWL(5) Invalid sequence of sentence part | | | +–– Explanation of the error | | +––––– Program lines which the error is suspected | +––––––––––– Version 1 +–––––––––––––– Program 0

Double−clicking the error location (here CZ0P00V1.AWL(5)) leads directly to the program. 16−8

Festo P.BE−FST4−LB−EN en 0402NH

Error messages

Chapter 17

Festo P.BE−FST4−LB−EN en 0402NH

17−1

17. Error messages

Contents

17.

Error messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17−1

17.1 17.2 17.3 17.4

General FST error numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Festo fieldbus error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . AS−Interface error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . PROFIBUS−DP (CP62) error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

17−2

17−3 17−4 17−5 17−6

Festo P.BE−FST4−LB−EN en 0402NH

17. Error messages

17.1 General FST error numbers Error number

Meaning

0

No error

2

Checksum error in project file PROJECT.RUN. · Download complete project again

6

Program 0 must be started but is not available. · Create and download Program 0.

7

Attempt to set or restore a non−existing program or its status. · Change the program or download the missing program.

9

The program cannot be started due to errors in the project file PROJECT.RUN. · Check the project and download it again. A driver could possibly be used but it is not loaded, or a driver is loaded but cannot be used because the conditions for it are not met. The hardware needed for the driver may not be available or is not configured properly. The controller may not have enough memory.

11

I/O card defect, short circuit at the output or no power supply. · Replace I/O card, clear short circuit or connect power supply.

12

I/O card cannot be found. · Check I/O card. · Check the switch setting on the card and in the I/O configuration.

13

Watchdog expired A driver, module or IO script blocked the run−time system for more than 1 second and triggered a restart.

14

The driver to be started cannot be found. A required driver cannot be found or is not executable because of an initialisation error. The environment (hardware, parameters) might not be available correctly for the driver. · Integrate the driver, correctly set the parameters in the driver configuration and check the hardware.

36

Nested CMP/CFM or CMP/CFM cannot be found when calling up. Change program structure

39

Double error, error in program. · Eliminate source of error.

42

CPX diagnosis · Clear CPX error

Festo P.BE−FST4−LB−EN en 0402NH

17−3

17. Error messages

Error number

Meaning

57

The project file (PROJECT.RUN) cannot be read. · Download project again.

59

Arithmetic error. · Modify program.

Tab.17/1

17.2 Festo fieldbus error Error number

Meaning

14

Critical driver error Project cannot be started when there is a soft" error reaction. This error occurs when the fieldbus driver could not be found or if problems occur when starting the firmware of the CP61.

60

Actual configuration is not a superset of the set configuration. · Correct the fieldbus configuration or connect any missing users

Tab.17/2

17−4

Festo P.BE−FST4−LB−EN en 0402NH

17. Error messages

17.3 AS−Interface error Error number

Meaning

700

No configuration data available for the ASi driver · Create configuration file

701

Master not available · Check the rotary switch setting of the master. Check configuration: For the HC20 only the master with switch setting 1 or 4 can be used, for HC16 setting 1

702

Master not available · Check the rotary switch setting of the master. Check configuration: For the HC20 only the master with switch setting 1 or 4 can be used, for HC16 setting 2

703

Master not available · Check the rotary switch setting of the master. Check configuration: For the HC20 only the master with switch setting 1 or 4 can be used, for HC16 setting 3

704

Master not available · Check the rotary switch setting of the master. Check configuration: For the HC20 only the master with switch setting 1 or 4 can be used, for HC16 setting 4

711

Failure of a slave · Check the slave, replace it, check the configuration, address 1

712

Failure of a slave · Check the slave, replace it, check the configuration, address 2

713

Failure of a slave · Check the slave, replace it, check the configuration, address 3

714

Failure of a slave · Check the slave, replace it, check the configuration, address 4

Tab.17/3

Festo P.BE−FST4−LB−EN en 0402NH

17−5

17. Error messages

17.4 PROFIBUS−DP (CP62) error Error number

Meaning

1001

The driver cannot make a connection to the card. Probable causes:  The card address does not agree with the value for the driver configuration.  No valid configuration data for the card (SyCon)

1004

Configured slave not on the bus (only in the event of a hard reaction")

1005

Input address range exceeded (offset)

1006

Output address range exceeded (offset)

Tab.17/4

17−6

Festo P.BE−FST4−LB−EN en 0402NH

The FST CI command interpreter

Chapter 18

Festo P.BE−FST4−LB−EN en 0402NH

18−1

18. The FST CI command interpreter

Contents

18.

The FST CI Command Interpreter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18−1

18.1

The FST operands / variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18.1.1 Displaying operands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18.1.2 Modifying operands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Some other commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

18.2

18−2

18−3 18−4 18−4 18−4

Festo P.BE−FST4−LB−EN en 0402NH

18. The FST CI command interpreter

A FST controller communicates with the programming PC or with any other device connected to the programming inter face with the aid of a clearly defined, very simple command code, which is designated by the FST CI (Command Inter preter). You will find details on the FST CI in the FST manual. An overview of the most important CI commands should suf fice here.

18.1 The FST operands / variables The most important operands are: Operand designation

Address range

Example bit addressing

Example word addressing

Inputs

E0.0 ... E255.15

E0.12

EW147

Outputs

A0.0 ... A255.15

A47.3

AW0

Flag

M0.0 ... M9999.15

M4312.14

MW9999

Register

R0 ... R255



R36

Programs

P0 ... P63

P14



Program status

PS0 ... PS63

PS14



Program modules

BAP0 ... BAP99

BAP12



Function modules

BAF0 ... BAF99

BAF99



Timer status

T0 ... T255

T14

Timer preselect (set value)

TV0 ... TV255



Timer word (actual value)

TW0 ... TW255

Counter status

Z0 ... Z255

Z33



Counter preselect (setword)

ZV0 ... ZV255



ZV33

Counter word (actual value)

ZW0 ... ZW255



ZW33

Festo P.BE−FST4−LB−EN en 0402NH

TV14 TW14

18−3

18. The FST CI command interpreter

Operand designation

Address range

Example bit addressing

Example word addressing

Error word

F



F

Constants

K0 ... K65535 K$0 ... K$FFFF K−32767 ... +32767



K10

Tab.18/1

18.1.1 Displaying operands The Display command displays operands. Example: DEW0 Display input word 0 DR5 Display register 5

18.1.2 Modifying operands The Modify command modifies operands. Example: MAW4=33 Modify output word 4 to the value 33 MM300.14=1 Modify flag 300.14 to the value 1

18.2 Some other commands Meaning

Example

Call up FST CI

CTRLT

Start project  RUN

R

Stop project  Stop

S

Start a certain program

RP1

Tab.18/2

18−4

Festo P.BE−FST4−LB−EN en 0402NH

Smile Life

When life gives you a hundred reasons to cry, show life that you have a thousand reasons to smile

Get in touch

© Copyright 2015 - 2024 PDFFOX.COM - All rights reserved.