A - sample program listing, Default personality, Sample program listing – Rockwell Automation 2708-NAG Application Generation Software User Manual

Page 33

Advertising
background image

Appendix

Aoppendix A
Sample Program Listing

A

A – 1

Sample Program Listing

The listing that follows is for the default personality that appears at the
bottom of the Main Menu when you first start AG. You can accept this
personality simply by pressing

[ENTER]

.

––––– Personality DEFAULT generated by A.G. V3.0 at 01:20 pm on 04–Feb–94

1 ’––––– Simple Example Default AG Program –––––

2 ’Created by John Fogarty : 11–Oct–90

3 Restart:

4 DISPLAY w/CLS 7 27 from ”ALLEN–BRADLEY COMPANY, INC.”

5 UpdateTime:

6 DISPLAY 41 9 from TIME

7 DISPLAY 72 9 from DATE

8 READ KBD LASER to IN 0 0 on Timeout 3000 goto UpdateTime(5)

9 ON Laser INPUT GOTO SendBadge(42)

10 ON F1 KEY GOTO F1–Pressed(17)

11 ON F2 KEY GOTO F2–Pressed(24)

12 ON F3 KEY GOTO F3–Pressed(28)

13 ON F4 KEY GOTO F4–Pressed(35)

14 DISPLAY w/CLR2 48 24 from ”***** Use F1 to F4 *****”

15 PAUSE 1

16 GOTO Restart(3)

17 F1–Pressed:

18 DISPLAY w/CLS 15 11 from ”Clocking In”

19 MOVE ”IN” to OP

20 AskForBadge:

21 DISPLAY w/CLR2 49 24 from ”Please Enter a Badge Now”

22 READ LASER to IN

23 GOTO SendData(45)

24 F2–Pressed:

25 DISPLAY w/CLS 14 12 from ”Clocking Out”

26 MOVE ”OUT” to OP

27 GOTO AskForBadge(20)

28 F3–Pressed:

29 DISPLAY w/CLS 11 18 from ”Manual Field Entry”

30 DISPLAY 41 10 from ”Operation:”

31 DISPLAY 58 5 from ”Data:”

32 READ KBD to OP 51 1 AutoExit on Timeout 3000 goto Restart(3)

33 READ KBD to IN 63 18 on Timeout 3000 goto Restart(3)

34 GOTO SendData(45)

35 F4–Pressed:

36 DISPLAY w/CLS 12 17 from ”Move Ticket Entry”

37 MOVE ”M ” to OP

38 DISPLAY 41 17 from ”Destination Code:”

Default Personality

Advertising