
|
1520
|
|||||||||
|
PRINTER PLOTTER
|
|||||||||
|
User's Manual
|
|||||||||
![]() |
|||||||||
|
ft commodore
|
|||||||||
|
INFORMATION TO USER
|
|||||||||||
|
"WARNING: THIS EQUIPMENT HAS BEEN CERTIFIED TO COMPLY WITH THE LIMITS FOR A CLASS B COMPUTING DEVICE, PURSUANT TO SUB-PART J OF PART 15 OF FCC RULES. ONLY PERIPHERALS (COMPUTER INPUT/OUTPUT DEVICES, TERMINALS, PRINTERS, ETC.) CERTIFIED TO COMPLY WITH THE CLASS B LIMITS MAY BE ATTACHED TO THIS COMPUTER. OPERATION WITH NON-CERTIFIED PERIPHERALS IS LIKELY TO RESULT IN INTERFERENCE TO RADIO AND TV RECEPTION."
"THIS EQUIPMENT GENERATES AND USES RADIO FREQUENCY ENERGY AND IF NOT INSTALLED PROPERLY, THAT IS, IN STRICT ACCORDANCE WITH THE MANUFACTURER'S INSTRUCTIONS, MAY CAUSE INTERFERENCE TO RADIO AND TELEVISION RECEPTION. IT HAS BEEN TYPE TESTED AND FOUND TO COMPLY WITH THE LIMITS FOR A CLASS B COMPUTING DEVICE IN ACCORDANCE WITH THE SPECIFICATIONS IN SUBPART J OF PART 15 OF FCC RULES, WHICH ARE DESIGNED TO PROVIDE REASONABLE PROTECTION AGAINST SUCH INTERFERENCE IN A RESIDENTIAL INSTALLATION. HOWEVER, THERE IS NO GUARANTEE THAT INTERFERENCE WILL NOT OCCUR IN A PARTICULAR INSTALLATION. IF THIS EQUIPMENT DOES CAUSE INTERFERENCE TO RADIO OR TELEVISION RECEPTION, WHICH CAN BE DETERMINED BY TURNING THE EQUIPMENT OFF AND ON, THE USER IS ENCOURAGED TO TRY TO CORRECT THE INTERFERENCE BY ONE OR MORE OF THE FOLLOWING MEASURES:
• REORIENTTHE RECE IVING ANTENNA
• RELOCATE THE COMPUTER WITH RESPECT TO THE RECEIVER
• MOVE THE COMPUTER AWAY FROM THE RECEIVER
• PLUG THE COMPUTER INTO A DIFFERENT OUTLET SO THAT COMPUTER AND RECEIVER ARE ON DIFFERENT BRANCH CIRCUITS
"IF NECESSARY, THE USER SHOULD CONSULT THE DEALER OR AN EXPERIENCED RADIO/ TELEVISION TECHNICIAN FOR ADDITIONAL SUGGESTIONS. THE USER MAY FIND THE FOLLOWING BOOKLET PREPARED BY THE FEDERAL COMMUNICATIONS COMMISSION HELPFUL: 'HOW TO IDENTIFY AND RESOLVE RADIO-TV INTERFERENCE PROBLEMS.' THIS BOOKLET IS AVAILABLE FROM THE U.S. GOVERNMENT PRINTING OFFICE, WASHINGTON, D.C. 20402, STOCK NC. 004-000-00345-4."
THIS WARNING IS VALID FOR THE EQUIPMENT WHICH HAS THE FOLLOWING FCC LABEL ON ITS REAR.
|
|||||||||||
|
CERTIFIED TO COMPLY WITH CLASS B LIMITS OF PART 15 OF FCC RULES. SEE INSTRUCTIONS IF INTERFERENCE TO RADIO RECEPTION IS SUSPECTED.
|
|||||||||||
|
THE INFORMATION IN THIS MANUAL HAS BEEN REVIEWED AND IS BELIEVED TO BE ENTIRELY RELIABLE. NO RESPONSIBILITY, HOWEVER, IS ASSUMED FOR INACCURACIES. THE MATERIAL IN THIS MANUAL IS FOR INFORMATION PURPOSES ONLY, AND IS SUBJECT TO CHANGE WITHOUT NOTICE.
THIS MANUAL IS COPYRIGHTED AND CONTAINS PROPRIETARY INFORMATION. NO PART OF THIS PUBLICATION MAY BE REPRODUCED, STORED IN A RETRIEVAL SYSTEM, OR TRANSMITTED IN ANY FORM OR BY ANY MEANS, ELECTRONIC, MECHANICAL, PHOTOCOPYING, RECORDING OR OTHERWISE, WITHOUT THE PRIOR WRITTEN PERMISSION OF COMMODORE BUSINESS MACHINES, INC.
|
|||||||||||
|
(c) Copyrightw1983 by Commodore Business Machines, Inc.
All rights reserved. Part No. C1 5202
|
|||||||||||
|
COMMODORE SALES CENTERS
Commodore Business Machines/ Inc.
1200 Wilson Drive Westchester, PA 19380, U.S.A.
Commodore Business Machines Ltd.
3370 Pharmacy Avenue, Agincourt, Ontario, M1W 2K4, Canada
Commodore Business Machines (UK) Ltd.
675 Ajax Avenue, Trading Estate, Slough Berks, SL1 4BG, England
Commodore Bueromashinen GmbH
Lyonerstrasse 38, PO BOX 710126 Frankfult 6000, West Germany
Commodore Italiana S.R.L.
Via Conservatoria 22 Milano 20122, Italy
Commodore Information Center
5 Onion Road
Lane Cove 2066 NSW, Australia
Commodore Computer B.V.
Marksingel 2e481 1 N.V. Breda
Postlrus 720, 480 3aS Breda, Netherlands
Commodore AG(Schweiz)
Aeschenvorstadt 57 4010 Basel, Switzerland
|
|||||
|
P/N 1520024-01 Rev. B
|
|||||
![]() |
|||||
|
Qz commodore
|
|||||
|
Table of Contents
|
||||
|
Introduction
A. Congratulations.......................... i
B. Plotter Features.......................... i
C. Customer Support (Clubs, Magazines,
Information Network)......................ii
Section 1: Setting up Your Printer Plotter................ 1
A. Setting Up Your Printer Plotter................ 1
B. 1520 Printer Plotter Physical Characteristics....... 2
C. The Printer Mechanism ..................... 3
D. Back View.............................. 4
Section 2: Preparing to Use Your Plotter.................5
A. Installation Considerations...................5
B. Paper Loading...........................6
C. Pen Loading, Removal, and Replacement .........7
D. Connecting your Plotter to your computer........8
E. Performing the "POWER ON" Test.............9
F. Trouble Shooting.........................10
G. Cautions...............................11
Section 3: Using Your Plotter........................12
A. Introduction............................12
B. BASIC Commands associated with your Plotter.....13
1. The OPEN Command....................13
2. The PRINT#Command...................13
3. The CLOSE Command ...................14
4. The CMD Command.....................14
5. Command Examples.....................15
C. Plottable Area...........................15
1. Plotting Direction.......................15
2. Plottable Area.........................16
3. Cumulative Error Along the Y Axis...........17
D. Printing and Plotting in the Direct Mode..........18
E. Printing and Plotting under Program Control.......19
F. Sophisticated Programming Techniques
Through Secondary Addressing................20
1. SA = 0 Print ASCII Data..................21
2. SA = 1 Plot X, Y Data . . . :................24
3. SA = 2 Select Color .....................28
4. SA = 3 Select Character Size................30
5. SA = 4 Select Character Rotation ............32
6. SA = 5 Scribe (broken) Line Selection.........35
7. SA = 6 Select UPPER/Lower Case Characters.....37
8. SA = 7 Resert the Plotter..................39
|
||||
|
Section 4: Appendices.............................40
Appendix A. 1520 Plotter Specifications...................40
Appendix B. ASCII Code Table.........................41
Appendix C. Printing Control Characters on your Plotter........42
Appendix D. Serial Interface Information..................44
Appendix E. Programs You Can Try .....................45
1. Concentric Circles......................46
2. Concentric Squares.....................47
3. Rotating Triangles .....................48
4. Cone made from Circles..................49
5. Circle made from Circles .................50
6. Rotation Ellipses ......................51
7. Archimedian Spiral.....................52
8. Geometric Design......................53
9. Checker Board........................54
10. Hatching............................56
11. Changing Forms.......................57
12. Rotating Figures.......................59
13. Bar Chart ...........................60
14. Complex Bar Chart.....................63
|
||||
|
INTRODUCTION
|
|||||||
|
A. Congratulations
Congratulations on your recent purchase of the COMMODORE 1520 Four Color Printer Plotter. You have added an exciting new dimension of versatility and convenience to your COMMODORE computer system. This manual is intended to introduce you to your new Plotter. It includes all the information necessary to help you...
— Learn the names and functions of all external parts
— Install your Plotter
— Connect the Plotter to your computer
— Operate and maintain your Plotter
— Write programs for your Plotter
In the process of showing you how to use your new Plotter, this manual assumes that you are familiar with the COMMODORE BASIC computer language. To get the most out of this manual, it is suggested that you continue to refer to your computers USER'S GUIDE and PROGRAMMER'S REFERENCE MANUAL.
B. Plotter Features
Your new Printer Plotter is a 4 color X-Y coordinate plotter. The X-axis extends across the width of the paper. The Y-axis runs vertically up and down the paper. Actual printing (plotting) is accomplished by combining movement of the pen carriage assembly horizontally across the paper with vertical paper movement. It is capable of high accuracy plotting with a resolution of 0.2mm. All printing is done with four ball point pens. The pen carriage assembly holds the 4 pens and allows the different colors to be rotated (one at a time) into position for printing.
Your Printer Plotter has the following features:
— Standard VIC serial interface to allow easy connection to other COMMODORE computer peripheral devices
— Plotting/printing in four colors for a wide variety of plotting applications
— High resolution plotting with traces as small as 0.2 mm per pen movement (step) for accurate plots
— Up to 80 characters per line (upper and lower case) in four sizes (10, 20, 40 and 80 characters per line) for flexibility in lettering plots or producing high quality general prints
|
|||||||
|
Your Printer Plotter is designed to connect directly into your computer through the Serial Port (6 pin connector). It can be used with up to 4 VIC-1541 floppy disk drives. These units are connected to the computer by "daisy chaining" the devices together — each successive unit is plugged into the last unit connected to the computer. If you have a VIC-1525 Graphic Printer it will have to be disconnected while you are using your Plotter. Both printers have a single bus connection and therefore must be the last device on the daisy chain.
C. Customer Support
Please check with your local COMMODORE dealer, COMMODORE User's Magazines and COMMODORE and POWER/PLAY Clubs for additional support for your new Plotter. They can also keep you informed about possible applications programs written for your Printer Plotter.
|
|||||
|
ii
|
|||||
|
SECTION 1
|
||||||||||
|
Setting up Your Printer Plotter
|
||||||||||
|
A. Setting Up Your Printer Plotter:
Here is the suggested checklist procedure to follow prior to using your printer plotter.
1. After carefully unpacking your plotter, set the unit on a flat surface.
2. Retrieve the two roll shaft brackets and roll shaft.
3. Raise the Printer Mechanism Cover.
4. Insert the roll shaft brackets in the two grooves at the rear of the plotter housing.
5. Place the roll shaft on the slots of the brackets.
6. Lower the Printer Mechanism Cover.
|
||||||||||
![]() |
||||||||||
|
1
|
||||||||||
|
1520 Printer Plotter Physical Characteristics:
Front and Top View
Please note the following locations for the 1520 features:
• ON-OFF switch is on the right side of the plotter housing.
• Three functional bar switches and power indicator light are located on the face of the plotter housing. The bar switch on the left is for manually advancing the paper. The middle switch manually rotates the Pen Carriage, bringing the next color pen into writing position. The switch on the right sets the plotter mode for either insertion or removal of the color pens.
|
|||||||||||||||
|
(RS) Roll Shaft (PG) Paper Guide
|
|||||||||||||||
![]() |
|||||||||||||||
|
RSB (Roll Shaft Bracket)
|
|||||||||||||||
|
(PMC) Printer Mechanism Cover
|
|||||||||||||||
|
(PI) Power Indicator LED (PC) Pen Change Switch (CC) Color Change Switch (PF) Paper Feed Switch
|
|||||||||||||||
|
CC - Color Change
|
|||||||||||||||
|
Press this switch and the next color pen is rotated into printing position. The pen carriage will move to the left side to change colors.
|
|||||||||||||||
|
2
|
|||||||||||||||
|
Press this switch to insert or remove plotter pens. Refer to SECTION 2 PartC for pen loading/unloading instructions.
Press this switch when you want to manually feed paper through the Plotter.
ON/OFF Power Indicator.
Cover should be kept in place to keep the print mechanism clean and help control paper movement for accurate plots.
|
||||||||||||||||||||||||||
|
PC - Pen Change
|
||||||||||||||||||||||||||
|
PF - Paper Feed
|
||||||||||||||||||||||||||
|
PI - Power Indicator
PMC - Printer Mechanism Cover
|
||||||||||||||||||||||||||
|
C. The Printer Mechanism:
Remove the Printer Mechanism Cover and lift the Paper Roll Cover so that you can familiarize yourself with the internal parts of your Plotter. It is very important that this area be kept clean.
|
||||||||||||||||||||||||||
![]() |
||||||||||||||||||||||||||
|
PCL
|
||||||||||||||||||||||||||
|
PCA
|
PPG
|
|||||||||||||||||||||||||
|
PPG - Platen and Paper Guides
|
||||||||||||||||||||||||||
|
■The platen is the long black rubber roller. The paper guides are the small brass wheels located at each end of the platen. Refer to SECTION 2 Part B for paper loading instructions.
■The pen carriage assembly holds four pens. Each of the four pen slots is marked with the color of the pen to be inserted in the slot. Refer to SECTION 2 Part C for pen loading and unloading instructions.
|
||||||||||||||||||||||||||
|
PCA - Pen Carriage Assembly
|
||||||||||||||||||||||||||
|
3
|
||||||||||||||||||||||||||
|
PCL - Pen Change Lever
|
|||||||||||||||||||||||||||||||||||||||||||||
|
- Pressing this lever will cause the pen in printing position to be ejected from the Pen Carriage Assembly. It is used for removing and inserting the pens. Refer to SECTION 2 Part C for pen loading and unloading instructions.
|
|||||||||||||||||||||||||||||||||||||||||||||
|
Back View:
Turn your Plotter around so that you can look at the back of the unit as shown below. On the left side you will see the fuse holder and power line connection. On the right, you will see the serial interface jack used to connect the unit to your computer.
|
|||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||
|
FH-Fuse Holder
PL-Power Line Connector
|
|||||||||||||||||||||||||||||||||||||||||||||
|
- Refer to SECTION 2 Part G.
- Use the power cord supplied with your Plotter. Refer to SECTION 2 Part D for complete connection instructions.
-This jack is used to connect your Plotter to the computer. Use the Serial Interface cable supplied with Plotter. Refer to SECTION 2 part D for complete connection instructions.
|
|||||||||||||||||||||||||||||||||||||||||||||
|
SI - Serial Interface Gack)
|
|||||||||||||||||||||||||||||||||||||||||||||
|
4
|
|||||||||||||||||||||||||||||||||||||||||||||
|
SECTION 2
|
||||||
|
Preparing to Use Your Printer Plotter
A. Installation Considerations:
In order to make your 1520 Plotter as trouble free as possible, please review the following list of precautions before setting up your new Plotter:
1. Always place your plotter on a flat surface.
2. Keep the ventilation holes free from any blockage.
3. Keep the machine as dust free as possible.
4. Do not place it in direct sunlight.
5. Do not apply extreme pressure to any part.
6. Avoid rooms with high humidity.
7. Avoid rooms with extremes in temperature.
8. Always put the caps back on the pens when you are not using them.
|
||||||
|
5
|
||||||
|
B. Paper Loading
Use only roll paper recommended and supplied by your local COMMODORE dealer:
Roll Paper Part Number: 1520030-01
Width: 114 millimeters (41/2 inches)
Thickness: 70 microns
Roll Diameter: 70 millimeters (maximum)
Be very careful while loading a roll of paper into your new Plotter. The paper installation procedures requires you to work around delicate parts. Follow the installation procedure exactly:
1. Remove the Printer Mechanism Cover (PMC) and the Paper Roll Cover (PRC).
2. Install the roll of paper into the lower paper tray between the two arms by first inserting the paper spindle in the middle of the paper roll. Lower the ends of the spindle into the notches in the paper support arms. The paper must feed off the bottom of the roll towards the front of the plotter.
3. Carefully insert the edge of the paper into the slot at the back of the print mechanism.
4. With your thumb on the center of the platen, gently rotate the platen in an upwards direction until the paper is in place. You will notice a tiny brass wheel located at each end of the platen. The paper must be positioned between these wheels and the platen roller.
5. Replace the Printer Mechanism Cover (PMC) and the Paper Roll Cover (PRC).
NOTE: The paper roll must be able to turn freely.
|
||||||
|
Pen Loading, Removal, and Replacement
In order to remove or replace pens, the Plotter must be connected to the computer and both units must be turned on -OR- the Plotter must be disconnected from the computer and turned on. The following sequence of instructions shows you how to use the bar switches and the pen change lever to remove or replace pens:
|
|||||||||||||
![]() |
|||||||||||||
![]() |
|||||||||||||
|
pen eject lever
|
|||||||||||||
|
1. Remove the Printer Mechanism Cover (PMC).
2. Press the Color Change switch (CC) until the desired pen is at the top of the pen carriage drum. The pen carriage will travel to the left side of the platen.
3. Press the Pen Change switch (PC). The pen carriage will move to the right side of the platen.
4. Press the Pen Change Lever (PCL) to lift the rear of the pen out of the pen carriage drum guide slot.
5. Hold the back end of the pen and remove it in an upwards direction.
6. If you are replacing the pen, insert the new pen (same color) into the pen carriage drum guide slot with the tip facing downward and into the retaining spring. Press down the back of the pen until it snaps (lightly) into place.
7. If you are removing the pen for storage, place the cap on the pen and store the pen in a safe place.
8. To remove or replace the other pens, repeat steps 2, and 4-7 above. Step 3 will not be necessary as the pen carriage drum will return to the right after pressing the Pen Change switch (PC).
9. Replace the Printer Mechanism Cover (PMC).
NOTE: Never force or try to rotate the pen carriage drum by hand.
|
|||||||||||||
|
7
|
|||||||||||||
|
D. Connecting your Plotter to the computer:
|
||||||||||||||||||
|
In order for your computer to know what devices it can work with (printers, disk drives), each device must have its own address. Disk drives are normally given addresses of 8 to 15. Printers are normally given addresses of either 4 or 5. Your plotter has been given an address of 6.
To connect your Plotter to the COMMODORE computer, please follow the instructions listed below:
1. Make SURE the power to your computer is turned off. This applies to any disk drives you may have connected to your computer.
2. Using the serial interface cable supplied with your Plotter, connect one end of the cable to the serial interface jack at the rear of the Plotter. The cable connector has a notch in it so that it can only be inserted one way. The pins should be positioned so that a slight pressure will seat the cable in the jack properly. You should not have to force the pins into the jack — to do so could damage both the cable and the jack.
3. Refer to the SET UP Section of your USER'S GUIDE. Locate the serial port on the back of your COMMODORE computer. Insert the other end of the serial interface cable into this jack/port.
If you are using 1 or more VIC-1541 Disk Drives, refer to page 7 in the VIC-1541 USER'S MANUAL Insert the other end of the serial interface cable into the serial bus jack/port on the last disk drive in the daisy chain.
If you are using the VIC-1525 Graphic Printer, it will have to be disconnected temporarily as only one printer can be attached to your computer at a time. Insert the serial interface cable from your Plotter into the jack/port that you disconnected your VIC-1525 Printer from.
4. Locate the power line cable supplied with your Plotter. Carefully insert the jack into the power line connector on the back of the unit. It will only go in one way. Plug the other end into any grounded AC outlet. If the Plotter makes any sound, please turn it off.
NOTE: For information concerning the serial interface connector pin configuration, interface notes, and how to change the address of your Plotter, refer to APPENDICES D and E.
Commodore 64 v^ 1541
Personal Computer Disk Drive
|
||||||||||||||||||
![]() |
||||||||||||||||||
|
||||||||||||||||||
|
1520 Printer Plotter
|
||||||||||||||||||
|
8
|
||||||||||||||||||
|
E. Performing the "POWER ON" test:
|
||||||||
|
The following test(s) will verify that your Plotter is working properly:
1. Turn on the power to your Plotter; then, turn on the
computer. The unit should draw 4 small boxes. From left to right, the boxes should be in the following color sequence: blue, green, red and black.
|
||||||||
|
DDDD
I----------- black
l-----------------red
| I----------------------green
I--------------------------blue
2. If this test fails, recheck all cable connections and try the above steps again. If the test still fails, contact your COMMODORE dealer.
NOTE 1: You will find that none of the bar switches on your Plotter will operate if the unit is turned on, connected to the computer and the computer is turned off. The computer must either be turned on or the serial interface cable must be disconnected from the Plotter.
NOTE 2: Every time your Plotter and computer is turned on, it will automatically perform the "Power On" test — the four boxes described in #2 above will be printed.
|
||||||||
|
9
|
||||||||
|
F. Trouble Shooting:
|
||||||||||||||||||||||||
|
We hope you don't have any problems with your Plotter. Just in case you do, however, see if you can solve the problem using the table below. If you still have problems, bring the Plotter into your COMMODORE dealer for repair.
|
||||||||||||||||||||||||
|
PROBABLE CAUSES & SOLUTIONS
|
||||||||||||||||||||||||
|
PROBLEM
|
||||||||||||||||||||||||
|
cause: Plotter is off. solution: Check the power line
connection and the power switch.
cause: Fuse may be blown. solution: Replace with a fuse of the same rating (300 MA, 125 V)
cause: Improper connection to computer. solution: Check all cable connections.
cause: Improperly loaded pens. solution: Reload and adjust the pens.
cause: Paper is jammed. solution: Remove and reload the paper.
|
||||||||||||||||||||||||
|
Plotter won't print. Power indicator 'OFF'
|
||||||||||||||||||||||||
|
Plotter won't print. Power indicator'ON'
|
||||||||||||||||||||||||
|
Plotter okay, paper won't advance.
|
||||||||||||||||||||||||
|
Printed characters are too light orsmudging.
|
||||||||||||||||||||||||
|
cause: Wrong pens or pen setting.
solution: Readjust the pens.
cause: Old or worn out pens.
solution: Replace the pens.
|
||||||||||||||||||||||||
|
Plotting distorted. cause: Paper probably not moving
freely. solution: Since the plotter moves the paper up and down to move along the Y axis, there must be sufficient slack and freedom of movement in the paper feed mechanism. Try unwinding some paper to form a loop just in front of the paper roll.
IMPORTANT: If you try to fix internal problems yourself by working inside your plotter, you may void your warranty. Take the plotter to your Commodore dealer for any necessary repairs.
|
||||||||||||||||||||||||
|
10
|
||||||||||||||||||||||||
|
G. Cautions:
1. Wait at least two seconds to turn on the power after it is turned off so that the Plotter will be initialized properly.
2. Never place the Plotter in direct sunlight.
3. Never apply power while you are either plugging in or unplugging the serial interface connector.
4. Never turn the power off while the Plotter is operating. See rule #8 below.
5. Never try to move the pen carriage assembly manually when the power is either on or off.
6. Never stop the pen carriage motion while it is printing.
7. Never operate the Plotter without paper. The pen carriage assembly may be damaged.
8. If a foreign object falls into the Plotter, turn it off immediately and remove the object. This situation is the only exception to rule #4 above.
|
|||||
|
11
|
|||||
|
SECTION 3 Using Your Plotter
Introduction:
Now that you have learned how to insert the pens and paper into your new Plotter, how to connect it to your computer, how to test it and how to correct any problems that may occur, you are ready for the next step — putting the 1520 Printer Plotter to work for you.
In this section, you see how to use your Plotter to print program listings and plot graphic displays. Before we go any further, make sure that you are able to do the following:
1. Operate your COMMODORE computer.
2. Write elementary programs in BASIC language.
3. OPEN and CLOSE files.
4. READ and WRITE files to various peripheral devices: (Like a tape cassette or disk drive for the purpose of saving/retrieving programs keyed as you continue through the rest of this manual.)
If you are not familiar with any of the above items, take the time now to check the USER'S MANUAL and PROGRAMMER'S GUIDE.
|
|||||
|
12
|
|||||
|
B. BASIC COMMANDS associated with your Plotter
1. The OPEN Command:
This command creates a linkage or correspondence between a given physical device and a file number. Its format is as follows:
|
|||||||||
|
OPEN lfn,dn,sa
|
|||||||||
|
where:
|
|||||||||
|
Ifn Is the logical file number (any number from 1 to 255). If the logical file number is greater than 127, any printed lines will be double spaced.
dn Is the device number of the peripheral that will be sending/receiving the file. For the remainder of this manual, you will be using device #6, the address of your Plotter.
sa Is the secondary address, a unique way of instructing your Plotter's internal microprocessor to perform certain specific tasks. More about this important feature later.
2. The PRINT# Command:
This command works just like the BASIC PRINT command except that it directs the output to the Plotter instead of to the video screen. The abbreviation for PRINT# is pR (unshifted p and shifted R). There must be no space before the #, and spaces after the # are ignored. The format is as follows:
PRINT # Ifn < ,variable/data/command >
where:
Ifn Is the logical file number (any number from 1-255). This number must correspond to a given OPEN command.
< variable/data/command > will be discussed in detail later in the manual.
|
|||||||||
|
13
|
|||||||||
|
3. The CLOSE Command:
|
||||||
|
Careful use of this command is important because you may only have a maximum of ten files open at any one time. Programming your Plotter may require that you keep several files open simultaneously. Always close files when you are finished using them. The format is as follows:
CLOSE Ifn
where:
Ifn Is the logical file number of the file being closed. This number must correspond to a given OPEN command.
4. The CMD Command:
Good programming practice dictates never using this statement within a program; use this statement in direct mode only.
This statement transfers the primary output device (TV screen) to the logical file number specified in the command. The file must have been previously OPENed. When this command is in effect, all output generated by PRINT or LIST command will be sent to the file instead of the video monitor. The format of the command is as follows:
CMD Ifn < , string >
where:
Ifn Is the logical file number to receive the output.
string (optional) when specified is sent directly to the file. This can be used as a handy way of printing titles on printouts.
To re-direct the output back to the primary output device, the PRINT# command must be used to send a blank line to the CMD device prior to closing the file. If a syntax error occurs, output will not be redirected back to the video monitor. Devices are not "unlistened" by this so you should PRINT# a blank line after an error condition.
|
||||||
|
14
|
||||||
|
5. Command Examples
|
||||||||||||
|
File#1, device#6, secondary
address#0
File#2, device#6
|
||||||||||||
|
OPEN 1,6,0
OPEN 2,6
|
||||||||||||
|
PRINT#1,"HELLO THERE" Print "HELLO THERE" on file#1
PRINT#2," " Print a blank line on file#2
CLOSE1:CLOSE2 Close file#1 and file#2
|
||||||||||||
|
C. Plottable Area
1. Plotting Direction
Horizontal movements of the pen carriage are referred to as the X axis. Movement to the right of the left margin is represented as + X.
Vertical movement is accomplished by moving the paper up and down. This movement is referred to as the Y axis. Movement upward from the center is represented by the + Y and movement downward from center is represented by -Y.
|
||||||||||||
|
15
|
||||||||||||
|
2. Plottable Area
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Along the X axis: 96 mm (480 positions numbered 0 to 479 separated by 479 steps)
There is a 9 mm border on the left and right sides of the X plottable area, so that the actual paper width is 114 mm.
Along the Y axis: Programmable as desired (+ / - 999 positions numbered 0 to 998 separated by 998 steps)
Positions are defined as coordinate points, with steps being the spaces between the coordinate points.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
(0,998)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
(479,998)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The absolute center point of the plotting area is at coordinates (240,0).
The Home position within the plotting area is at coordinates (0,0).
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
NOTE:
If your lines extend beyond the limits of the plotting area, the pen is automatically forced up. When the pen returns to the plotting area, it will remain in the up position until a new plot command is received.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
16
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
3. Cumulative Error Along the Y Axis:
|
||||||
|
Since paper is fed along the Y axis by means of frictional contact between rubber rollers, slight deviations in plotting accuracy may occur. This can be minimized by insuring that the paper advance mechanism doesn't have to pull the paper off the roll. Unroll a small amount of paper such that a loop is formed in front of the paper roll. Keep the paper roll cover lifted up while the unit is operating.
|
||||||
|
17
|
||||||
|
D. Printing in the Direct Mode:
Now that you have reviewed the BASIC commands you will need to handle files directed to your Plotter, let's put them to use in some practical applications. The direct mode allows you to communicate with your Plotter by entering printing commands directly into your computer keyboard and having them executed immediately.
The following example illustrates the DIRECT mode procedure for listing a short BASIC program. In the example below, a single statement BASIC program is keyed into the computer's memory. A LIST command is keyed and the program is printed on your video monitor. A file (#3) is OPENed to your Plotter. A CMD3 is issued to the file open on your Plotter (it is now listening). Issue the LIST command again. This time the output will be written on your Plotter. To unlisten the Plotter, you instruct the computer to print a null character to file#3. Now you can CLOSE file#3, freeing up that file number for some other use. All output will now appear on the video monitor.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
18
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
E. Printing Under Program Control:
|
||||||
|
You have seen how to print a listing of a simple BASIC program directly from the keyboard. Although it is not good programming practice, the following example shows how to print a listing of a BASIC program under control of the program itself. First, enter the following simple program into your computer's memory:
10 OPEN 3,6
20 CMD3
30 PRINT'PROGRAM CONTROL"
40 LIST
If you typed LIST on your keyboard, the program you just entered would be listed on your video monitor. Enter the RUN command. The following should be printed on your Plotter:
PROGRAM CONTROL
10 OPEN 3.6
20 CMD3
30 PRINT-PROGRAM CONTROL"'
40 LIST
READY.
Now. enter the following:
PRINT#3 CLOSE3
The RUN command instructed the computer to execute the program in its memory. First. file#3 (device#6) was opened. Next, the CMD command instructed the computer to direct all subsequent output to file#3. The program then PRINTed PROGRAM CONTROL on file#3. The LIST command instructed the computer to print a listing of the program in its memory on file#3.
REMEMBER — when using the LIST command within a program, you must type the PRINT# Ifn command to unlisten the printer. Then you must type in the CLOSE Ifn command to close the file. Both of these commands can be entered into the program or after you have RUN the program. Using the LIST command or the CMD command in a program is generally not a good programming practice. It is suggested that you only use them in DIRECT mode.
|
||||||
|
19
|
||||||
|
F. Sophisticated Programming Techniques Through Secondary Addressing
Earlier in this manual, you were introduced to the secondary address concept in the discussion of the OPEN statement. This unique feature allows you to instruct your new Plotter to do the following operations:
Operation Secondary Address
Print ASCII (character) Data 0 (default)
Plot X,Y Data 1
Select Color 2
Select Character Size 3
Select Character Rotation 4
Select Scribe (dashed) Line Mode 5
Select Upper/Lower Case Letters 6
Reset Plotter 7
For each desired operation (change a color, plot data, etc.) you will be OPENing a file and issuing PRINT# commands to that file to instruct your Plotter to perform the function defined by the secondary address. For example, a PRINT# command issued to a file that was OPENed with secondary address set to 2 would allow you to change the color of the pen in printing position.
A complex plotting program which takes advantage of all of the above functions of your Plotter could have eight (8) files open at the same time. Remember that there is a limit of ten (10) files that can be open at any one time. To avoid confusion, it is highly recommended that you use the following file numbering conventions in all your programs for your Plotter (all examples in the manual follow the convention):
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
20
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The reason that file#4 has been assigned a secondary address of 0 is that printing of ASCII data is normally used more than character rotation (secondary address 4) and that a logical file number of 0 is not allowed. Notice that the secondary address was left off the OPEN command for file #4 — the 0 need not be coded as it is the default value. Since we assigned file #4 to secondary address 0, file #44 has been assigned to secondary address 4.
Let's look at each secondary address:
1. SA = 0: Print ASCII Data
The format for the PRINT# command is as follows:
PRINT#4 (,data)
This secondary address causes the Plotter to print ASCII data exactly as it is received from the computer. As mentioned above, this secondary address is the default value and need not be coded. Try the following sample programs:
The first program will print four simple lines on your Plotter.
100 REM SECONDARY ADDRESS 0
110 REM PRINT ASCII DATA
120 OPEN4,6
130 FOR l = 0TO3
140 PRINT#4,"1520 PRINTER PLOTTER"
150 NEXT I
160 CLOSE4
170 END
READY.
1520 PRINTER PLOTTER 1520 PRINTER PLOTTER 1520 PRINTER PLOTTER i520 PRINTER' PLOTTER
|
|||||
|
21
|
|||||
|
The second sample program will print all numbers from 0 to 255 and the ASCII character representation of each. When the numbers 34 and 141 are reached, the remainder of the line is filled with blanks. As you will see, your Plotter will print each character as it is received from your computer.
100 REM SECONDARY ADDRESS 0
110 REM PRINT ASCII DATA
120 OPEN 4,6,0
130 FOR I = 0 TO 255
140 IF I = 34 OR I = 141 THEN PRINT#4,I;CHR$
(l);:PRINT#4:GOTO160
150 PRINT#4,I;CHR$(I);
160 NEXT I
170 CLOSE4
180 END
READY.
|
|||||
|
22
|
|||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
7
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
185 9 186 : 187 ; 188 < 189 = 190 > 191 ? 192 - 193 a 194 b 195 c 196 d 197 e 1 98 f 199 9 200 h 201 i 202 J 203 k 204 I 205 m 206 n 207 o 208 p 209 q 210 r 211 s 212 t 213 u 214 y 215 u 216 x 217 y 2 18 z 219 | 220 _ 221 ^ 222 « 223 D 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 tt
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
23
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
2. SA = 1:PlotX,Y Data
The format for the PRINT# command is as follows:
PRINT#1,"Sub-Command" (,X coordinate^ coordinate)
You can substitute a semicolon (;) for a comma (,).
This secondary address gives you the ability to plot X,Y coordinate data and control all movement of the pen carriage within the plottable area.
You may need to refer back to the discussion of the Plottable Area during the following description of subcommands:
Sub-Commands Function
|
|||||||
|
H Move to start point (0,0)
(absolute origin point)
I Set relative origin point (X0,Y0) = to the
current position (X,Y)
M Move to position (X,Y) relative to the
absolute origin point (0,0) (pen up)
D Draw to position (X,Y) relative to the
absolute origin point (0,0) (pen down)
R Move to position (X,Y) relative to the relative
origin point (x0,y0) (pen up)
J Draw to position (X,Y) relative to the relative
origin point (x0,y0) (pen down)
NOTES: — For sub-commands M,D,R and J,
movement/drawing takes place from the current pen carriage position.
— Lines are drawn by first moving to the desired starting point (M or R) then drawing to the ending point (D or J).
— Figures requiring a center point (circles) are drawn by first moving to the desired point (M), setting a relative origin point (I), moving to the first computed point (R) then drawing to each computed point (J) until the figure is done.
— MOVE implies pen up, DRAW implies pen down.
— Any carriage return sent to the file opened with secondary address 0 will cause a new absolute origin point (HOME point) to be defined.
|
|||||||
|
24
|
|||||||
|
In the first of three sample programs, a simple box will be drawn using absolute positions starting at point (50,0). Notice that after the box is complete, the pen carriage is sent to the HOME position.
100 REM SECONDARY ADDRESS 1
110 REM PLOT X,Y DATA ABSOLUTE
120 OPEN1,6,1
130 PRINT#1,"M",50,0
140 PRINT#1,"D",50,150
150 PRINT#1,"D",200,150
160 PRINT#1,"D",200,0
170 PRINT#1,"D",50,0
180 PRINT#1,"H"
190 CLOSE1
200 END
READY.
|
|||||
|
25
|
|||||
|
In the next sample, the same box will be drawn but the program uses relative addressing. The pen carriage is moved to absolute point (50,0) and a relative origin is set. The placement of the box will be 50 steps to the right of the previous sample.
100 REM SECONDARY ADDRESS 1
110 REM PLOT X,Y DATA RELATIVE
120 OPEN1,6,1
130 PRINT#1,"M",50,0
132 PRINT#1,"I"
135 PRINT#1,"R",50,0
140 PRINT#1,"J",50,150
150 PRINT#1,"J",200,150
160 PRINT#1,"J",200,0
170 PRINT#1,"J",50,0
180 PRINT#1,"H"
190 CLOSE1
200 END
READY.
|
|||||
|
26
|
|||||
|
In the third sample, you will be removing the 135 from the last sample program. Notice what happens to the box. The left side runs up at an angle. This line runs at an angle due to the following:
— the pen carriage is positioned at absolute point (50,0)
— the first "J" command draws from current pen position to position (50,150) relative to the relative origin point which is set at (50,0) — absolute point (100,150)
100 REM SECONDARY ADDRESS 1
110 REM PLOT X,Y DATA RELATIVE
120 OPEN 1,6,1
130 PRINT#1,"M";50;0
132 PRINT#1,"I"
140 PRINT#1,"J";50;150
150 PRINT#1,"J";200;150
160 PRINT#1,"J";200;0
170 PRINT#1,"J";50;0
180 PRINT#1,"H"
190 CLOSE1
200 END
READY.
|
|||||
|
27
|
|||||
|
3. SA = 2: Select Color
The format for the PRINT# command is as follows:
PRINT#2 <, color number >
This secondary address gives you the ability to select the color.
The following table defines the relationship of the color number to the actual color and the allowable values of the number:
Color Number___________________Color
0..........................Black
1...........................Blue
2..........................Green
3 ...........................Red
Higher numbers are treated modulo 4. For example, 4 is black, 5 is blue, 6 is green, etc.
In order for these relationships to be accurate, the pens must have been inserted in the exact order specified in SECTION 2 Part C — Pen Loading, Removal, and Replacement.
Try the following two sample programs. You will note that there are two files open to your Plotter; one for printing ASCII data and one for selecting pen colors.
100 REM SECONDARY ADDRESS 2
110 REM SELECT COLOR
120 OPEN4,6 :REM PRINT ASCII DATA
130 OPEN2,6,2 :REM COLOR SELECT
140 FOR l = 0TO3
150 READA$
160 PRINT#2,I
170 PRINT#4,I;" — ";A$" PEN"
180 NEXT I
190 PRINT#2,0 :REM RESET PEN TO BLACK
200 CLOSE4;CLOSE2
210 END
220 DATA BLACK, BLUE,GREEN,RED
READY.
0 -BLACK PEN
i -BLUE PEN
2 -GREEN PEN
3 -RED PEN
|
|||||
|
28
|
|||||
|
100 REM SECONDARY ADDRESS
110 REM SELECT COLOR
120 OPEN4,6 :REM PRINT ASCII DATA
130 OPEN2,6,2 :REM SELECT COLOR
140 FOR l = 0TO 10
150 PRINT#2,I
160 PRINT#4,I;"1520 PRINTER PLOTTER"
170 NEXT I
180 PRINT#2,0 :REM RESET TO BLACK
190 CLOSE4:CLOSE2
200 END
READY.
0 1520 PRINTER PLOTTER i 1520 PRINTER PLOTTER
2 1520 PRINTER PLOTTER
3 1520 PRINTER PLOTTER
4 1520 PRINTER PLOTTER
5 1520 PRINTER PLOTTER
6 1520 PRINTER PLOTTER
2 1520 PRINTER PLOTTER
3 1520 PRINTER PLOTTER
9 1520 PRINTER PLOTTER
10 1520 PRIN'rER PLOTTER
|
|||||||||||
|
|
|||||||||||
|
29
|
|||||||||||
|
4. SA = 3: Select Character Size
The format for the PRINT# command is as follows:
PRINT#3 < character size number >
This secondary address gives you the ability to select the character size for printing ASCII data.
The following table defines the relationship of the character size number to the actual character size (specified in characters/line) and the allowable values of the number:
Character Character
Size Number Size
0 80 characters/line
1 40 characters/line (default)
2 20 characters/line
3 10 characters/line
|
|||||||
|
Higher numbers are treated modulo 4. For example, 4 is 80 characters/line, 5 is 40 characters/line, 6 is 20 characters/line, etc.
Try the following sample program. It will demonstrate the four character sizes available to you. Again, two files are used in this program; 1 to print ASCII data and 1 to select the character size. Note statement 195 — this is used to reset the character size to the default value so that the next sample program you run will print ASCII data at the correct size.
100 REM SECONDARY ADDRESS 3
110 REM SELECT CHARACTER SIZE
120 OPEN4,6 :REM PRINT ASCII DATA
130 OPEN3,6,3 :REM SELECT CHAR. SIZE
140 FOR l = 0TO3
150 READX$
160 PRINT#3,I
170 PRINT#4,RIGHT$(STR$(I),1);" = ";X$;" C
HAR"
180 PRINT#4
190 NEXT I
195 PRINT#3,1 :REM RESET TO 40/LINE
200 CLOSE4:CLOSE3
210 END
220 DATA 80,40,20,10
READY.
|
|||||||
|
30
|
|||||||
|
1^40 CHAR
|
|||||||||||||||||||||||||
|
2=20 CHAR
|
|||||||||||||||||||||||||
|
Here is some technical data on character size and spacing. The information is based on a character size of 40 characters/line.
|
|||||||||||||||||||||||||
|
/*^V
|
|||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||
|
/\
|
|||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||
|
End
|
|||||||||||||||||||||||||
|
Start
|
|||||||||||||||||||||||||
|
0.2 1.2
|
|||||||||||||||||||||||||
|
1) Character size
1.05 x 1.45mm
(In the case of 0.25mm line width)
2) Inter-character pitch
1.2 ± 10%
3) Inter-line pitch
2.4mm ± 10%
|
|||||||||||||||||||||||||
|
All
|
|||||||||||||||||||||||||
|
1.05
|
|||||||||||||||||||||||||
|
31
|
|||||||||||||||||||||||||
|
5. SA = 4: Select Character Rotation
The format for the PRINT# command is as follows:
PRINT#44 < character rotation number
This secondary address gives you the ability to select character rotation. Please note the logical file number of 44 — refer to SECTION 3 Part F for a discussion of recommended file numbering conventions.
The following table defines the relationship of the character rotation number to the actual rotation parameter and the allowable values of the number:
Character Character
Rotation Rotation
Number Parameter
0 Normal Horizontal Mode (default)
1 90 Degree Rotation to the Right
Higher numbers are treated modulo 2. For example, 2 is normal horizontal mode, 3 is 90 degree rotation to the right, etc.
Try the following three sample programs. The first program will print a line of characters in normal horizontal mode and then a line of characters — each rotated 90 degrees to the right printed horizontally. Note statement 190 — it resets the character rotation of the Plotter to normal horizontal mode.
100 REM SECONDARY ADDRESS 4
110 REM REM CHARACTER ROTATE
120 OPEN4,6 :REM PRINT ASCII DATA
130 OPEN44,6,4 :REM SELECT ROTATION
140 PRINT#44,0
150 PRINT#4,"0 — NORMAL HORIZONTAL MODE"
160 PRINT#4
170 PRINT#44,1
180 PRINT#4,"1 - 90 DEG ROTATE TO THE Rl
GHT"
190 PRINT#44,0 :REM SET BACK TO DEFAULT.
200 CLOSE4.CLOSE44
210 END
READY
0 ~ NORMAL HORIZONTAL HODE
•— i cds cnxn ^o-n>-m ~d —cm ^o-gie-h
|
|||||
|
32
|
|||||
|
The second sample illustrates a line of characters printed in normal horizontal mode and then a line of characters — each of which is rotated 90 degrees and printed vertically. This sample produces a much more readable text on your Plotter.
100 REM SECONDARY ADDRESS 4
110 REM REM CHARACTER ROTATE
120 OPEN4,6 :REM PRINT ASCII DATA
130 OPEN44,6,4 :REM SELECT ROTATION
140 PRINT#44,0
150 PRINT#4,"0 — NORMAL HORIZONTAL MODE"
160 PRINT#4
170 PRINT#44,1
180 A$ = "1 - 90 DEG ROTATE TO THE RIGHT"
190 FOR 1 = 1 TO LEN(A$)
200 PRINT#4,MID$(A$,I,1)
210 NEXT I
220 PRINT#44,0 :REM SET TO DEFAULT ROT.
230 CLOSE4:CLOSE44
240 END
READY.
0 - NORMAL HORIZONTAL MODE
|
|||||||
|
I
CD O
a m O
J3
o
>
H m
-I O
H I m
J3
O
X
|
|||||||
|
33
|
|||||||
|
The third sample program prints output that is similar to the output of the first sample but the characters in the second line are inverted — printed from right to left.
100 REM SECONDARY ADDRESS 4
110 REM REM CHARACTER ROTATE
120 OPEN4,6 :REM PRINT ASCII DATA
125 OPEN1,6,1 :REM PLOT X,Y DATA
130 OPEN44,6,4 :REM SELECT ROTATION
140 PRINT#44,0
150 PRINT#4,"0 — NORMAL HORIZONTAL MODE"
160 PRINT#4
170 PRINT#44,1
180 A$="1 — 90DEG ROTATE TO THE RIGHT"
185 L=LEN(A$)
190 FOR l = LTO 1 STEP - 1
200 PRINT#1,"M";16*(L- l),0:PRINT#4,MID$(
A$,l,1);
210 NEXT I
220 PRINT#44,0 :REM SET TO DEFAULT ROT.
230 CLOSE4:CLOSE44:CLOSE1
240 END
READY.
0 - NORMAL HORIZONTAL MODE
HIQ>-h/D mX-H (D-{ mHDHOTD QmD ©CD
|
|||||
|
34
|
|||||
|
6. SA = 5: Scribe (broken) Line Select
The format for the PRINT# command is as follows:
PRINT#5 <, scribe line number >
This secondary address gives you the ability to select and draw broken or scribe lines.
The following table defines the relationship of the scribe line number to the width of each segment of the broken line and the allowable values of the number:
Scribe Width
Line of each
Number Scribe Segment
0 Normal unbroken line (default)
1 Broken line (smallest increment — 0.2mm •to-
15 Broken line (largest usable increment)
Higher numbers are treated modulo 16. For example, 16 is normal unbroken line, 17 is smallest increment broken line, etc.
|
|||||
|
35
|
|||||
|
The sample program draws all scribe lines with values between 0-15 (inclusive). Watch closely how the plotting proceeds — all scribe lines will be drawn first then each will be labeled with the scribe line number. Actual X,Y coordinates are used. The HOME position is the starting point. Note how the Y coordinate value is computed.
100 REM SECONDARY ADDRESS 5
110 REM SCRIBE LINE SELECT
120 OPEN4,6 :REM PRINT ASCII DATA
130 OPEN1,6,1 :REM PLOT X,Y DATA
140 OPEN5,6,5 :REM SELECT SCRIBE LINE
150 FOR I = 0 TO 15
160 PRINT#5,I
170 PRINT#1,"M";30;-I*20+10
180 PRINT#1,"D";480;-I*20+10
190 NEXT I
200 PRINT#5,0
210 PRINT#I,"H"
220 FOR I = 0 TO 15
230 PRINT#4,RIGHT$(" " + STR$(I),2)
240 NEXT I
250 PRINT#5,0 :REM RESET TO SOLID LINE
260 CLOSE4:CLOSE1:CLOSE5
270 END
READY.
|
|||||||
|
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
|||||||
|
36
|
|||||||
|
7. SA = 6: Select UPPER/lower Case
The format for the PRINT# command is as follows:
PRINT#6 < , upper/lower case number >
This secondary address gives you the ability to choose between two character printing modes.
The following table .defines the relationship of the upper/lower case number to the type of character printing mode and the allowable values it can have:
Upper/Lower Character
Case Printing
Number Mode
0 Normal Upper Case/Shifted Lower Case (default)
1 Normal Lower Case/Shifted Upper Case
Higher numbers are treated modulo 2. For example, 2 is normal upper case/shifted lower case, 3 is normal lower case/shifted upper case, etc.
|
|||||
|
37
|
|||||
|
The sample program will print the alphabet plus some special characters in both modes described above.
|
|||||||||
|
100 REM SECONDARY ADDRESS 6
110 REM UPPER/LOWER CASE SHIFT MODE
120 OPEN4,6 :REM PRINTING ASCII DATA
130 OPEN6,6,6 :REM SELECT UP/LOW CASE
140 PRINT#6,0
150 PRINT#4,"0 — UPPER CASE/SHIFTED LOWE
R CASE"
160 GOSUB230
170 PRINT#4
180 PRINT#6,1
190 PRINT#4,"1 — LOWER CASE/SHIFTED UPPE
R CASE"
200 GOSUB 230
205 PRINT#6,0 :REM RESET TO NORMAL
210 CLOSE4:CLOSE6
220 END
230 REM * PRINT CHARACTER SET *
240 FOR I = 64 TO 95:PRINT#4,CHR$(I);:NEXT
I 250 PRINT#4
260 FOR I = 192 TO 223:PRINT#4,CHR$(I);:NE XT I
270 PRINT#4 280 RETURN
READY.
|
|||||||||
|
0 - UPPER CASE/SHIFTED LOUER CASE ©ABCDEFGHIJKLMNOPQRSTUUUXVZC ,£]t<-~t\bc de f 9 h I Jklmnopqrstuuuxyz |_A<rfD
i - lOJGr ca.se/shl-fted upper case -t\b cdefgh I jHmnopqrst u v»uxyz I _^TfD ©ABCDEFGHI JKLMNOPQRSTUOuJXYZr *]t<-
|
|||||||||
|
38
|
|||||||||
|
8. SA = 7: Reset the Plotter
The format for the PRINT# command is as follows:
PRINT#7
This secondary address gives you the ability to reset your Plotter. All secondary addresses are reset to the default values and the Plotter's memory is cleared.
This command is very important. When you run a program that uses combinations of large characters, scribe lines and various colors, the final settings will remain in effect for the next program. You can save yourself a lot of trouble if you run this command either at the beginning or end of every program you write for your Plotter.
The sample program will reset your Plotter. It will print the same four boxes that we discussed earlier in the Power-On Test in Section2 Part E.
100 REM SECONDARY ADDRESS 7
110 REM RESET PRINTER & CLEARS MEMORY
120 OPEN7,6,7
130 PRINT#7
140 CLOSE7
READY.
|
||||||
|
□□□□
|
||||||
|
39
|
||||||
|
SECTION 4
|
|||||||||||||||||
|
Appendices
APPENDIX A: 1520 Plotter Specifications
|
|||||||||||||||||
|
General Specifications
Print Method
Colors
Drive Unit
Print Speed
Line Capacity (X-axis)
|
|||||||||||||||||
|
.-Water ink ballpoint pen :4 Colors (black, blue, green, red) :Drum Type X,Y Plotter :12 characters/second (avg.) :Maximum 80 characters/line (80, 40, 20, or 10 characters as desired) :96 Characters :260steps/second :0.2mm (0.0078 inch) along X-axis 0.2mm (0.0078 inch) along Y-axis :52mm/sec. (along X and Y axis) 73mm/sec. (along 45 degree vector) :479 positions along X axis (numbered 0 to 479) Programmable as desired along the Y axis; maximum range + / - 998 positions (numbered 0 to 998) :Minimum 250 meters (825 feet) .COMMODORE Part Number 1520030-01; Width — 114 millimeters (41/2 inches); Thickness — 70 Microns; Diameter — 70 Millimeters (maximum) :251 D x 282 W x 93 H (mm)
|
|||||||||||||||||
|
Character Set Plotting Speed Step Length
Line Drawing Speed
Plottable Area
|
|||||||||||||||||
|
Pen Life Paper
|
|||||||||||||||||
|
External Dimensions
Operating Environment Power Requirements
Power Consumption
Temperature
Humidity
|
|||||||||||||||||
|
:117V (USA), 220-240V (Europe), 100V (Japan); AC +/- 10%, 50/60 Hz :20 watts (max), 5 watts (idling) :5-40 degrees Centigrade :20%-80% (no condensation)
|
|||||||||||||||||
|
40
|
|||||||||||||||||
|
APPENDIX B: ASCII Code Table
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
UPPER CASE/SHIFTED LOWER CASE
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
upper case/shifted lower case
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
SOTE3 WHEN ASCII M2C" 5 IS DETECTED, UNTIL SECOND ASCII *22 OR ASCII tODCCR) IS DETECTED,FOLLOWING CONTROL CODESCiaB-tlF,i88-i3F3IS PRINTED A CORRESPONDENT UNDE RLINED CHARCTERS.HOWEUER ASCII iBDCCR) DOES.ALWAYS CARRIDQE RETURN.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
41
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
APPENDIX C: Printing Control Characters
Your Plotter is not able to print reverse, graphic or control characters. If any such characters appear in a program listing printed on your Plotter, they will be printed as underlined characters. The sample program listed below was printed on a VIC-1525 Graphic Printer. Note how each control character is printed.
100 REM CONTROL CHARACTER 0
110 OPEN6,6,6:PRINT#6,0
120 OPEN4,6
130 PRINT'S HOME
140 PRINT"C3 CLR
150 PRINT"* CRSR DOWN
160 PRINT"* CRSR UP
170 PRINT-II CRSR RIGHT
180 PRINT"II CRSR LEFT
190 PRINT'B F1
200 PRINT'B F2
210 PRINT'S F3
220 PRINT'B F4
230 PRINT"*! F5
240 PRINT"* F6
250 PRINT'll F7
260 PRINT'B F8
270 PRINT"! BLACK
280 PRINT"=I WHITE
290 PRINT'ri RED
300 PRINT'L CYAN
310 PRINT'B PURPLE
320 PRINT"!! GREEN
330 PRINT'B BLUE
340 PRINT"!?] YELLOW
350 REM COMMODORE64
360 PRINT'O ORANGE
370 PRINT'B BROWN
380 PRINT'B LIGHT RED
390 PRINT'S! DARK GREY
400 PRINT'll MED GREY
410 PRINT'll LIGHT GREEN
420 PRINT'O LIGHT BLUE
430 PRINT";; LIGHT GREY
440 CLOSE4:CLOSE6
450 END
READY
|
|||||
|
42
|
|||||
|
Note the difference in how the control characters are formed when this program is LlSTed on your Plotter.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
43
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
APPENDIX D: Serial interface information
|
||||||||||||||||||||||||||||||||||||||||||||||||||
|
1. The Connector:
|
||||||||||||||||||||||||||||||||||||||||||||||||||
|
Pin No. Signal
|
||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
|
2. The Interface:
a. Plug the serial interface cable supplied with your Plotter into the Serial Bus connector for the connection. Refer to SECTION 2 Part D for details on how to connect your Plotter to your computer.
b. When the plotter is printing, no data will be transferred from the computer (the data line is said to be low). When the plotter is at rest, data can be transferred from the computer (the data line is said to be high).
c. When a printer error occurs, all control circuits inside the Plotter will stop.
d. User defined machine language IRQ routines should not exceed 10 milliseconds. If this is done, the Plotter may give a DEVICE NOT PRESENT error.
|
||||||||||||||||||||||||||||||||||||||||||||||||||
|
44
|
||||||||||||||||||||||||||||||||||||||||||||||||||
|
APPENDIX E: Programs you cay try
|
||||||
|
This section contains 16 programs that you can try. They attempt to utilize most of the functions discussed in the Secondary Addressing section of this manual. Use them to help you develop your own programs.
As you try each one, note how multiple secondary addresses are combined to produce quite complex multi-color plots. Also note how the geometric formulas and pen position commands are used to draw triangles, circles and ellipses.
For each program, there is a printout of the expected Plotter output.
1. Concentric Circles
2. Concentric Squares
3. Rotating Triangles
4. Cone made from Circles
5. Circle made from Circles
6. Rotating Ellipses
7. Archimedian Spiral
8. Geometric Design
9. Checker Board
10. Hatching
11. Changing Forms (Enter a number)
12. Rotating Figures
13. Bar Chart (Enter your own data)
14. Complex Bar Chart
|
||||||
|
45
|
||||||
|
1. Concentric Circles
100 REM CIRCLE 1
110 OPEN4,6,0 :REM PRINT ASCII
120 OPEN1,6,1 :REM PLOT X,Y DATA
130 OPEN2,6,2:C = 0 :REM PEN COLOR
135 PRINT#4:PRINT#4,"CONCENTRIC CIRCLES"
140 PRINT#1,"M";240,-240
150 PRINT#1/'I"
160 FOR L = 30 TO 180 STEP 30
170 C=C+1: IFO=4:THEN C = 0
180 PRINT#2,C :REM SET COLOR
185 FORZ=1 TO 15
190 FOR l = 0TO360STEP10
200 X = (Z+L)*SIN(I*3.1416/180)
210 Y = (Z+L)*COS(I*3.1416/180)
220 IF I = 0 THEN PRINT#1,"R";X,Y: GOTO 240
230 PRINT#1,"J";X,Y
240 NEXT I
245 NEXTZ
250 NEXTL
260 PRINT#1,"R";0,-240
270 PRINT#4:PRINT#4:PRINT#4
280 OPEN7,6,7 :REM RESET PLOTTER
290 PRINT#7
300 CLOSE4:CLOSE1:CLOSE2:CLOSE7
310 END
|
|||||||
![]() |
|||||||
|
46
|
|||||||
|
2. Concentric Squares
100 REM SQUARE =
110 OPEN4,6,0 :REM PRINT ASCII
120 OPEN1,6,1 'REM PLOT X,Y DATA
130 OPEN2,6,2:C=0 :REM PEN COLOR
135 PRINT#4:PRINT#4,"CONCENTRIC SQUARES"
140 PRINT#1,"M";240,-240
150 PRINT#1,"I"
160 FOR l = 0 to 90 STEP 10
170 C = C+1: IFC>=4THENC = 0
180 PRINT#2,C .REM SET COLOR
185 FOR J = 1 TO 11
190 X = l + J.
200 Y = l + J.
210 PRINT#1,"R";X;-Y
220 PRINT#1,"J";X,Y
230 PRINT#1,"J";-X;Y
240 PRINT#1,"J";-X;-Y
250 PRINT#1,"J";X;-Y
255 NEXT J
260 NEXT I
270 PRINT#4:PRINT#4:PRINT#4
280 PRINT#1,"R";0,-200
290 OPEN7,6,7 :REM RESET PLOTTER
300 PRINT#7
310 CLOSE4:CLOSE1:CLOSE2:CLOSE7
320 END
READY. CONCENTRIC SQUARES
|
||||||||
![]() |
||||||||
|
□ □□
47
|
||||||||
|
Rotating Triangles
|
|||||||||
|
100 REM ROTATE TRIANGLE
110 OPEN4,6,0 :REM PRINT ASCII DATA
120 OPEN1,6,1 :REM PLOT X,Y DATA
130 OPEN2,6,2:C = 4 :REM COLOR
135 PRINT#4:PRINT#4:PRINT#4,"ROTATING TRIANGLE"
140 PRINT#1,"M";240,-200
150 PRINT#1,"I"
160 N = 3:L=160
170 FOR A = 0 TO 360/N STEP 10
180 C = C+ 1:IFC>=4THENC = 0
190 PRINT#2,C :REM SET COLOR
200 TH = A**/180
210 FOR l = 0TO N
220 X=L*SIN(TH + I*2**/N)
230 Y=L*COS(TH + l*2**/N)
240 IFI = 0THEN PRINT#1,"R";X,Y:GOTO 260
250 PRINT#1,"J";X,Y
260 NEXT I
270 NEXT A
280 PRINT#1,"R";0,-200
290 PRINT#4:PRINT#4:PRINT#4
300 OPEN7,6,7 :REM RESET PLOTTER
310 PRINT#7
320 CLOSE4:CLOSE1:CLOSE2:CLOSE7
330 END READY
|
|||||||||
|
ROTATING TRIANGLE
|
|||||||||
![]() |
|||||||||
|
48
|
|||||||||
|
4. Cone Made From Circles
|
||||||||||
|
100 REM CIRCLE2
110 OPEN4,6,0 :REM PRINT ASCII DATA
120 OPEN1,6,1 :REM PLOT X,Y DATA
130 OPEN2,6,2:C=4 :REM COLOR
135 PRINT#4:PRINT#4:PRINT#4,"CONE MADE FROM CIRCLES'
140 PRINT#1,"M";240,-200
150 PRINT#1,'T'
160 FOR L= 5 TO 150 STEP 5
170 PRINT#2,"1" :REM SET COLOR - BLUE
180 FORI = 0TO360STEP10
190 X=L*SIN(I* jc/180)
200 D=L*2:Y = - 240+ D+ L*COS(l* n /180)
210 IF I = 0 THEN PRINT#1,"R";X,Y:GOTO 230
220 PRINT#1,"J";X,Y
230 NEXT I
240 NEXTL
250 PRINT#1,"R";0,-300
260 PRINT#4:PRINT#4:PRINT#4
270 OPEN 7,6,7 :REM RESET PLOTTER
280 PRINT#7
290 CLOSE4:CLOSE1:CLOSE2:CLOSE7
300 END
READY
|
||||||||||
![]() |
||||||||||
|
CONE MADE FROM CIRCLES
|
||||||||||
|
□□□□
|
||||||||||
|
49
|
||||||||||
|
5. Circle Made From Circles
100 REM CIRCLE3
110 OPEN4,6,0 :REM PRINT ASCII DATA
120 OPEN1,6,1 :REM PLOT X,Y DATA
125 PRINT#4:PRINT#4:PRINT#4,"CIRCLE MADE FROM CIRCLES"
130 OPEN2,6,2:PRINT#2,"2" .REM GREEN
140 PRINT#1,"M";240,-200
150 PRINT#1,"I"
160 L=30:R = 80
170 FOR J = 0 TO 360 STEP 15
180 FOR I = 0 TO 360 STEP 10
190 X=R*SIN(J**/180)+ L*SIN(I**/180)
200 Y=R*COS(J** /180)+L*COS(r*/180)
210 IFI = 0THEN PRINT#1,"R";X,Y:GOTO 230
220 PRINT#1,"J";X,Y
230 NEXT I
240 NEXT J
250 PRINT#1,"R";0,-100
260 PRINT#4:PRINT#4:PRINT#4
270 OPEN7,6,7 .REM RESET PLOTTER
280 PRINT#7
290 CLOSE4:CLOSE1:CLOSE2:CLOSE7
300 END
READY CIRCLE MADE FROM CIRCLES
|
||||||||
![]() |
||||||||
|
DDDD
|
||||||||
|
50
|
||||||||
|
6. Rotating Ellipses
|
||||||||||||
|
100 REM ROTATING ELLIPSE
110 OPEN4,6,0 :REM PRINT ASCII DATA
120 OPEN1,6,1 :REM PLOT X,Y DATA
125 PRINT#4:PRINT#4:PRINT#4,"ROTATING ELLIPSE"
130 OPEN2,6,2:PRINT#2,"3" :REM RED
140 PRINT#1,"M";240,-200
150 PRINT#1,'T'
160 A=180:B = 60:TH= * /180
170 FOR J = 0 TO 180 STEP 15
180 FOR I = 0 TO 360 STEP 15
190 R=A*COS(l*TH)
200 L=B*SIN(I*TH)
210 X=R*COS(J*TH)-L*SIN(J*TH)
220 Y=R*SIN(J*TH)+L*COS(J*TH)
230 IFI = 0THEN PRINT#1,"R";X,Y:GOTO250
240 PRINT#1,"J";X,Y
250 NEXT I
260 NEXT J
270 PRINT#1,"R";0,-200
280 PRINT#4:PRINT#4:PRINT#4
290 OPEN7,6,7 :REM RESET PLOTTER
300 PRINT#7
310 CLOSE4:CLOSE1:CLOSE2:CLOSE7
320 END
READY
|
||||||||||||
|
ROTATING ELLIPSE
|
![]() |
|||||||||||
|
51
|
||||||||||||
|
7. Archimedian Spiral
100 REM ARCHIMEDIAN SPIRAL
110 OPEN4,6,0 :REM PRINT ASCII DATA
120 OPEN1,6,1 -REM PLOT X,Y DATA
125 PRINT#4:PRINT#4:PRINT#4,"ARCHIMEDIAN SPIRAL"
130 OPEN2,6,2:PRINT#2,"0" :REM BLACK
140 PRINT#1,"M";240,-200
150 PRINT#1,'T'
160 P=9:A = 4
170 FORTH = 0TOA*2* x STEP k /24
180 X=P*TH*COS(TH)
190 Y=P*TH*SIN(TH)
200 IFTH = 0THEN PRINT #1,"R";X,Y:GOTO220
210 PRINT#1,"J";X,Y
220 NEXTTH
230 PRINT#1,"R";0,-240
240 PRINT#4:PRINT#4:PRINT#4
250 OPEN7,6,7 .REM RESET PLOTTER
260 PRINT#7
270 CLOSE4:CLOSE1:CLOSE2:CLOSE7
280 END
READY
|
|||||||||
|
ARCHIMEDIAN SPIRAL
|
|||||||||
![]() |
|||||||||
|
□ODD
52
|
|||||||||
|
Geometric Design
|
|||||||||
|
100 REM GEOMETRICS
110 OPEN4,6,0 :REM PRINT ASCII DATA
120 OPEN1,6,1 :REM PLOT X,Y DATA
125 PRINT#4:PRINT#4:PRINT#4,"GEOMETRIC DESIGN"
130 OPEN2,6,2:PRINT#2,2 .REM GREEN
140 N = 17
150 PRINT#,"M";0,-260 :REM ORIGIN PT
160 PRINT#4
170 L=160
180 FOR J = 0TO N-1
190 FOR l = 0TO J-1
200 X1 = 240+L*COS(2/N*J** )
210 Y1 = 100+L*SIN(2/N*J** )
220 X2=240+L*SIN(2/N*I**)
230 Y2=100+L*SIN(2/N*I**)
240 PRINT#1,"M";X1,Y1
250 PRINT#1,"D";X2,Y2
260 NEXT I
270 NEXT J
280 PRINT#1,"M";0,-100
290 PRINT#4:PRINT#4:PRINT#4
300 OPEN7,6,7 :REM RESET PLOTTER
310 PRINT#7
320 CLOSE4:CLOSE1:CLOSE2:CLOSE7
330 END
READY
|
|||||||||
|
GEOMETRIC DESIGN
|
|||||||||
![]() |
|||||||||
|
53
|
|||||||||
|
9. Checker Board
100 REM CHECKERBOARD
110 OPEN4,6,0 :REM PRINT ASCII DATA
120 OPEN1,6,1 :REM PLOT X,Y DATA
125 PRINT#4:PRINT#4:PRINT#4,UCHECKER BOARD"
130 OPEN2,6,2:PRINT#2,1 :REM BLUE
140 PRINT#1,"M";60,-360
150 PRINT#1/1"
160 B = 360
210 FORR = 0TO8:D=B/8
220 PRINT#1,"R";0;D*R
230 PRINT#1,"J";B;D*R
240 NEXT R
250 FORC = 0TO8:W=B/8
260 PRINT#1,"R";W*C;0
270 PRINT#1,"J";W*C;B
280 NEXTC
290 FOR J = 0 TO 7
300 A=J-2*INT(J/2)
310 FORI = AT0 7STEP2
320 FOR V = 0TO D
330 PRINT#1,"R";I*W;J*D + V
340 PRINT#1,"J";(I + 1)*W;J*D + V
350 NEXTV
360 NEXT I
370 NEXT J
380 PRINT#1,"H"
390 PRINT#4:PRINT#4:PRINT#4
400 OPEN7,6,7 :REM RESET PLOTTER
410 PRINT#7
420 CLOSE4:CLOSE1:CLOSE2:CLOSE7
430 END
READY
|
|||||
|
54
|
|||||
|
CHECKER BOARD
|
|||||||
![]() |
|||||||
|
DDDD
|
|||||||
|
55
|
|||||||
|
10. Hatching
100 REM HATCHING
110 OPEN4,6,0 :REM PRINT ASCII DATA
120 OPEN1,6,1 :REM PLOT X,Y DATA
125 PRINT#4:PRINT#4:PRINT#4,"HATCHING"
130 OPEN2,6,2:PRINT#2,2 :REM GREEN
140 X=0:FORD = 2TO15STEP2
150 PRINT#1,"M";X,-100:X=X+60
160 PRINT#1/T' :REM SET ORIGIN
170 A = 50:B=100
180 PRINT#1,"J";0;B
190 PRINT#1,"J";A;B
200 PRINT#1,"J";A;0
210 PRINT#1,"J";0;0
220 P1 = - B:Q1 = B:P2 = 0:Q2 = A + B
230 GOSUB 360
240 IF Q2< D THEN NEXT D:GOTO 320
250 PRINT#1,"R";X1;Y1
260 PRINT#1,"R";X1;Y2
270 GOSUB 360
280 PRINT#1,"R";X2;Y2
290 PRINT#1,"J";X1;Y1
300 GOTO 230
310 PRINT#1,"M";0;-120
320 PRINT#4:PRINT#4:PRINT#4
330 OPEN7,6J:PRINT#7 :REM RESET PLOTTER
340 CLOSE4:CLOSE1:CLOSE2:CLOSE7
350 END
360 P1 = P1 + D:Q1 = Q1-D
370 IF Q1< 0 THEN Y1 = 0:X1 •-= P1:GOTO 390
380 Y1 = Q1:X1=0
390 P2=P2+D:Q2=Q2-D
400 IFP2> ATHEN X2=A:Y2 = Q2:GOTO 420
410 X2=P2:Y2=B
420 RETURN
READY
|
|||||||||
|
HATCHING
|
|||||||||
![]() |
|||||||||
|
DDDD
re
|
|||||||||
|
11. Changing Forms
100 REM CHANGING FORMS
110 OPEN4,6, :REM PRINT CHAR
120 OPEN1,6,1 :REM MOVE PEN
130 OPEN2,6,2 :REM SELECT COLOR
140 PRINT#4:PRINT#4:PRINT#4:PRINT"CHANGING FORM"
150 PRINT#4,"CHANGING FORM"
160 INPUTENTER NBR OF STEPS";M
170 PRINT#4,"STEP ";M
175 PRINT#2,3 :REM RED PEN
180 PRINT#1,"M";240,-200
190 PRINT#1,"I"
200 FOR I = 1 TO 4
210 READA,B:X1(I) = A:Y1(I)=B
220 NEXT I
230 FOR I = 1 TO 4
240 READ A,B:X2(I) = A:Y2(I) = B
250 NEXT I
260 FOR K = 0TO M+1
270 FOR I = 1 TO 4
280 AX=X2(I)-X1(I)
290 AY=Y2(I)-Y1(I)
300 XX(I) = X1(I)+L*AX/(M + 1)
310 YY(I) = Y1(I)+K*AY/(M + 1)
320 NEXT I
330 FOR J = 1 TO 4
340 IF J = 1 THEN PRINT#1,"R";XX(J);YY(J):GOTO 360
350 PRINT#1,"J";XX(J);YY(J)
360 NEXT J
370 PRINT#1,"J";XX(1);YY(1)
380 NEXTK
390 PRINT#1,"M";0,-350
400 PRINT#4:PRINT#4:PRINT#4
410 OPEN7,6,7 :REM RESET PLOTTER
420 PRINT#7
430 CLOSE4:CLOSE1:CLOSE2:CLOSE7
440 END
450 DATA 150,210,150,170,200,170,200,210
460 DATA - 200, - 90, - 150, - 90, - 150,0, - 200,0
READY
|
|||||
|
57
|
|||||
|
CHANGING FORM STEP 9
|
![]() |
|||||||||||
|
DDDD
|
||||||||||||
|
CHANGING FORN STEP 12
|
||||||||||||
![]() |
||||||||||||
|
DDDD
|
||||||||||||
|
58
|
||||||||||||
|
12. Rotating Figures
100 REM ROTATE2
110 OPEN4,6,0 :REM PRINT ASCII DATA
120 OPEN 1,6,1 REM PLOT X,Y DATA
125 PRINT#4:PRINT#4:PRINT#4,"ROTATING FIGURES"
130 OPEN2,6,2:PRINT2,1 :REM BLUE
140 PRINT#1,"M";240,-240
150 PRINT#1,"I"
160 TH= * /180
170 FOR I = 1 TO 4:READ A,B:X(I) = A:Y(I)= B:NEXT I
180 FOR J = 0 TO 359 STEP 15
190 FOR 1=1 TO 4
200 XX(l) = X(l)*COS(J*TH)-Y(l)*SIN(J*TH)
210 YY(l) = X(l)*SIN(J*TH)+Y(l)*COS(J*TH)
220 IF 1=1 THEN PRINT#1,"R";XX(l);YY(l):GOTO 240
230 PRINT#1,"J";XX(I);YY(I)
240 NEXT I
250 PRINT#1,"J";XX(1);YY(1)
260 NEXT J
270 PRINT#1,"M";0,-400
280 PRINT#4:PRINT#4:PRINT#4
290 OPEN7,6,7 :REM RESET PLOTTER
300 PRINT#7
310 CLOSE4:CLOSE1;CLOSE2
320 END
330 DATA 70,80,90,130,110,130,130,80
READY
|
|||||||||
|
ROTATING FIGURES
|
|||||||||
![]() |
|||||||||
|
DDDD
59
|
|||||||||
|
13. Bar Chart
|
|||||||||||
|
100 REM BAR GRAPH (INTERACTIVE DATA ENTRY)
|
|||||||||||
|
110 OPEN4,6,0 120 OPEN1,6,1 130 OPEN2,6,2 140 OPEN3,6,3
|
:REM PRINT ASCII DATA :REM PLOT X,Y DATA :REM COLOR :REM CHARACTER SIZE
|
||||||||||
|
145 PRINT#4:PRINT#4:PRINT#4,"BAR CHART":PRINT#4
147 PRINT#4:PRINT#4
150 GOSUB980
170 C=1:GOSUB950
180 PRINT#1,"M";0,-200
190 PRINT#4
200 PRINT#1,"M";20,0
210 PRINT#1,"D";20,200
220 PRINT#1,"H"
230 PRINT#1,"M";20,0
240 PRINT#1,"D";480,0
250 FOR I = 25 TO 200 STEP 25
260 PRINT#1,"M!';15,I
270 PRINT#1,"D";20,I
280 NEXT I
290 :
300 FOR I = 1 TO L
310 C=l :GOSUB950
320 H = A(I)*5:GOSUB590
330 NEXT I
340 :
350 FOR I = 1 TO L
360 C=l :GOSUB950
370 H = A(I)*5:GOSUB670'
380 NEXT I
390 :
400 PRINT#1,"H"
410 PRINT#4
420 :
430 FOR I = 1 TO L
440 C=I:S=1:GOSUB950
450 X = 0:Y = 0:A$(I):GOSUB800
460 NEXT I
470 :
480 A$ = T$
490 C = 3:S = 2 :GOSUB 950
500 X = 30:Y = 220 :GOSUB 890
510 A$ = S$
520 C = 2:S=1 :GOSUB 950
530 X = 200:Y = 200 :GOSUB 890
540 :
550 PRINT#1,"H":PRINT#4:PRINT#4:PRINT#4
|
|||||||||||
|
60
|
|||||||||||
|
BARGRAPH LISTING CONTINUED...
|
||||||
|
553 PRINT#4:PRINT#4:PRINT#4
554 GOSUB1105
555 OPEN7,6,7:PRINT#7 :REM RESET PLOTTER 560 CLOSE4:CLOSE1 :CLOSE2:CLOSE3:CLOSE7 570 END
580 :
590 REM = = WRITE BOX = =
600 X(I) = (I-1)*36*2 + 36:W = 36
610 PRINT#1,"M";X(I),0
620 PRINT#1,"D";X(I),H
630 PRINT#1,"D";X(I) + W,H
640 PRINT#1,"D";X(I) + W,0
650 RETURN
660 :
670 REM = = FILL BOX = =
680 X(I) = (I-1)*36*2+36:W = 36
690 PRINT#1,"M";X(I).0
700 FOR J = O TO H STEP 2
710 PRINT#1,"D";X(I) + W,J
720 PRINT#1,"D";X(l) + W,J + i
730 IFJ + 1>=H THEN 770
740 PRINT#1,"D";X(I),J + 1
750 PRINT#1,"D";X(l),J + 2
760 NEXT J
770 RETURN
780 :
790 REM = = CHARACTER Y = =
800 PRINT#1,"M";X,Y:PRINT#4
810 SS = (2TS)*10
820 FOR M = 1 TO LEN(A$)
830 PRINT#1,"M";X(l) + 9,SS/5
840 PRINT4,MID$(A$,M,1)
850 NEXTM
860 PRINT#1,''M";0,SS*4/5*LEN(A$)+SS*2 + Y:PRINT#4
870 RETURN
880 :
890 REM = = CHARACTER X = =
900 PRINT#1,"M";X,Y
920 PRINT#4,A$
930 PRINT#1,"M";X,-Y + 40*S:PRINT#4:RETURN
940 :
950 REM = = COLOR,SIZE = =
960 PRINT#2,C:PRINT#3,S .RETURN
970 :
980 PRINT CHR$(147)
|
||||||
|
61
|
||||||
|
Bar Graph Listing Continued . . .
990 INPUT'ENTER MAIN TITLE";T$
1000 INPUT'ENTER SUB TITLE";S$
1010 INPUT'ENTER NUMBER OF DATA POINTS 1-6";L
1020 IF L<1 OR L> 6 THEN GOTO 1010
1030 FOR 1 = 1 TO L
1040 PRINT " ":PRINT"DATA POINT ",l
1050 INPUT'ENTER NAME 1-6 CHARS";A$(I)
1055 IF LEN(A$(1)) > 6 THEN GOTO 1050
1060 INPUT'ENTER SIZE 0-40";A(|)
1070 IF A(l) < 0 OR A(l) > 40 THEN GOTO 1060
1080 NEXT I
1090 RETURN
1100 :
1105 PRINT#2,2
1110 PRINT#4,"DATA POINTS....."
1120 FOR 1 = 1 TOL
1130 PRINT#4,A$(I),A(I)
1140 NEXT I
1150 PRINT#4:PRINT#4:PRINT#4
1160 PRINT#4:PRINT#4:PRINT#4
1170 RETURN
READY. BAR CHART
|
||||||||||||||||
|
TEST
|
||||||||||||||||
![]() |
BAR CHART
|
|||||||||||||||
|
I B
|
||||||||||||||||
|
F S
I I
U X E
|
||||||||||||||||
|
□ □□
|
||||||||||||||||
|
62
|
||||||||||||||||
|
14. Complex Bar Chart
|
||||||||||||||
|
*******i
|
||||||||||||||
|
100 REM
110 REM * BAR GRAPH 2* 1 or\ dpmi ****************
130 PRINT CHR$(147);
140 T$="* PROJECTED SALES
150 PRINT" "T$
|
||||||||||||||
|
160 OPEN4,6,0
170 OPEN1,6,1
180 OPEN2,6,2
190 OPEN3,6,3
200 OPEN44,6,4
210 OPEN5,6,5
|
||||||||||||||
|
:REM PRINT ASCII DATA
:REM PLOT X,Y DATA
:REM COLOR
:REM CHAR SIZE
:REM CHAR ROTATE
:REM SCRIBE
|
||||||||||||||
|
212 PRINT#4:PRINT#4:PRINT#4,"COMPLEX BAR CHART" 215 FOR I = 1 TO 5:PRINT#4:NEXT I 220 C=1:S=1:R = 0:SC = 0:GOSUB1400:GOSUB1410 230 PRINT#1,"H":PRINT#4 240 :
250 REM = = READ DATA = = 260 READ M,N:DIM A$(M,N)
270 FOR J = 1 TO N:FOR I = 1 TO M: READ A$(I,J):NEXT I: NEXT J 280 FOR I = 1 TO M:TY$(I) = " " + A$(l,1) + ' ': NEXTI:YN = LEN(TY$(1)) 290 :
300 REM = = XY AXIS = = 310 OX = 50:W = YN*12:S=10 320 PRINT#1,"M";OX,0 330 PRINT#1,"D";OX+ 370,0 340 FOR I = OX TO OX + 370 STEP 360/S 350 PRINT#1,"M";I,0 360 PRINT#1,"D";I,5 370 NEXT I
380 PRINT#1,"M";OX,0 390 PRINT#1,"D";OX,-W*M 400 PRINT#1,"M";0,20:PRINT#4 410 :
420 REM = = TITLE = = 430 A$ = T$
440 C = 3:S = 2:R=1:GOSUB1400 450 Y = 450:X = 40:GOSUB1690 460 :
470 REM = = X SCALE = = 480 T1$= "MILLIONS OF UNITS" 490 C = 3:S=1:R = 0:GOSUB1400 500 L1=4:XO=12*L1 510 PRINT#1,"M";120,X0:PRINT#4,T1$ 520 PRINT#1 ,"M";0, - XO + 40:PRINT#4
|
||||||||||||||
|
63
|
||||||||||||||
|
i
|
||||||||||||||
|
Bar Graph 2 Listing Continued . . .
|
||||||
|
530 :
540 C=1:R=1:GOSUB1400
550 XS = 0.5:XM = 5.0
560 FOR I = XS TO XM STEP XS
570 TX$(I) = LEFT$(STR$(I + SGN(I)*0.00000001),L1)
580 Y= 1*36*2+OX-40
590 PRINT#1,"M";0,12*L1:PRINT#4
600 FOR J = 1 TO L1
610 PRINT#1,"M";Y,8
620 PRINT#4,MID$(TX$(I),J,1)
630 NEXT J
640 PRINT#1,"M";0,40:PRINT#4
650 NEXT I
660 PRINT#1,"M";0,0:PRINT#4
670 :
680 REM = = Y SCALE = =
690 C = 0:S=1:R=1:GOSUB1400
700 FOR 1=1 TO M:Y = OX-20
710 FOR J = 1 TO YN
720 PRINT#1,"M":Y,8
730 PRINT#4,MID$(TY$(I),J,1)
740 NEXT J
750 NEXT I
760 PRINT#1,"M";0,60:PRINT#4
770 :
780 REM = = BRAPH PRINT = =
790 PRINT#1,"M";0,W*M + 10:PRINT#4
800 C = 0:GOSUB1400
810 FOR l = 1 TO M:D(I) = VAL(A$(1,2))/1000000:NEXT I
820 FOR l = 1 TO M:A(I)= D(I):NEXT I
830 GOSUB1280 :REM DATAQUEST
840 C = 2:GOSUB1400
850 SC = 5:GOSUB1410
860 FOR 1 = 1 TO M:M(I) = VAL(A$(I,4))/1000000:NEXT I
870 FOR 1 = 1 TO M:A(I)=M(I):NEXTI
880 GOSUB1280 :REM MERRILL LYNCH
890 SC = 0:GOSUB1410
900 :
910 REM = = COMMENT WRITING = =
920 C=1:S=1:R=1:GOSUB1400
930 A$=''D":OF=20+W/2-10*(LEN(A$)/2):PRINT#1,''M";
0,-OF:PRINT#4
940 FOR 1=1 TO M:Y=D(I)*25+OX:GOSUB1440
950 PRINT#1,"M";0,-W+12*LEN(A$) + 20:PRINT#4
960 NEXT I
970 PRINT#1,"M";0,W*M + OF+40:PRINT#4
980 :
|
||||||
|
i
|
||||||
|
Bar Graph 2 Listing Continued . ..
990 C = 2:S=1:R=1:GOSUB1400
1000 A$="ML":OF = 20 + W/2-10*(LEN(A$)/2):PRINT#1,"M";
0,-OF:PRINT#4
1010 FOR I = 1 TO M:Y = M(l)*21 + OX:GOSUB1440
1020 PRINT#1,"M";0,-W+12*LEN(A$) + 20:PRINT#4
1030 NEXT I
1040 PRINT#1 ,"M";0,W*M + OF + 40:PRINT#4
1050 :
1060 A$=" D = DATAQUEST FORECAST"
1070 C = 0:R=1:GOSUB1400
1080 Y=425:X = 60:GOSUB1600
1090 :
1100 A$="ML = MERRILL LYNCH FORECAST"
1110 C = 2:R=1:GOSUB1400
1120 Y = 405:X = 60:GOSUB1600
1130 :
1140 A$="NOTE: MERRILL LYNCH DID NOT FORECAST
PAST 1983 "
1150 C = 3:S=0:R=1:GOSUB1400
1160 Y=18:X = 40:GOSUB1510
1170 :
1180 A$= " BECAUSE THE MARKET IS EXPANDING
VERY RAPIDLY"
1190 C = 3:S = 0:R=1:GOSUB1400
1200 Y = 8:X = 40:GOSUB1520
1210 :
1220 C=1:S=1:R = 0:GOSUB1400
1230 SC = 0:GOSUB1410
1233 PRINT#1,"M";-480,-480
1235 FOR I = 1 TO 5:PRINT#4:NEXT I
1237 OPEN7,6,7 :REM RESET PLOTTER
1239 PRINT#7
1240 CLOSE1:CLOSE2:CLOSE3:CLOSE4:CLOSE44:CLOSE5: CLOSE7
1250 END
1260 :
1270 REM = = BAR GRAPH = =
1280 FOR l = 0TO M-1
1290 PRINT#1,"M";OX,-W*I-20
1300 IFA(I+1)>5THEN 1360
1310 PRINT#1,"D";OX+A(I+1)*60,-W*I-20
1320 PRINT#1,"D";OX+A(I + 1)*60,-W*(I + 1)-20
1330 PRINT# 1,"D";OX, - W*(l + 1) - 20
1340 NEXT
1350 RETURN
1360 PRINT#1,"D";400,-W*l-20
1370 PRINT#1,"M";400,-W*(I + 1)-20:GOTO 1330
|
|||||
|
65
|
|||||
|
Bar Graph 2 Listing Continued . . .
1380 :
1390 REM = = COLOR,SIZE,ROTATE,SCRIBE = =
1400 PRINT#2,C:PRINT#3,S:PRINT#44,R:RETURN
1410 PRINT#5,SC:RETURN
1420 :
1430 REM = = GRAPH COMMENT = =
1440 FOR J = I TO LEN(A$)
1450 PRINT#1,"M";Y,8
1460 PRINT#4,MID$(A$,J1)
1470 NEXT J
1480 RETURN
1490 :
1500 REM = = SMALL CHARACTER = =
1510 PRINT#1,"M";0,-X:PRINT#4
1520 FOR I = 1 TO LEN(A$)
1530 PRINT#1,"M";Y,2
1540 PRINT#4,MID$(A$,I,1)
1550 NEXT I
1560 PRINT#1,"M";0,8*LEN(A$) + X+20:PRINT#4
1570 RETURN
1600 PRINT#1,"M";0,-X:PRINT#4
1610 FOR 1=1 TO LEN(A$)
1620 PRINT#1,"M";Y,8
1630 PRINT#4,MID$(A$,I,1)
1640 NEXT I
1650 PRINT#1,"M";0,12*LEN(A$) + X + 40:PRINT#4
1660 RETURN
1670 :
1680 REM = = BIG CHARACTER = =
1690 PRINT#1,"M";0,-X:PRINT#4
1700 FOR 1=1 TO LEN(A$)
1710 PRINT#1,"M";Y,20
1720 PRINT#4,MID$(A$,I,1)
1730 NEXT I
1740 PRINT#1,"M";0,20*LEN(A$)+X+80:PRINT#4
1750 RETURN
1760 :
1770 REM = = BIGGEST CHARACTER = =
1780 PRINT#1"M";0,-X:PRINT#4
1790 FOR 1=1 TOLEN(A$)
1800 PRINT#1,"M";Y,40
1810 PRINT#4,MID$(A1,I,1)
1820 NEXT I
1830 PRINT#1,"M";0,40*LEN(A$) + X+ 160:PRINT#4
1840 RETURN
1850 :
1860 REM = = DATA AREA = =
|
|||||
|
66
|
|||||
|
Bar Graph 2 Listing Continued ..
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
1870 DATA 5,5
1880 DATA 1981,1982,1983,1984,1985
1890 DATA 420000,840000,1345000,2150000,3440000
1900 DATA 168M,366M,538M,869M,1376M
1910 DATA 0,1250000,4000000,9999999,9999999
1920 DATA"",500M,1600M,9999M,9999M
READY
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
COMPLEX BAR CHART
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MILLIONS OF UNITS ui .......... •
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
3 X
r~ a
,. .. U
3D 7D
73 H V----)
73 J> (___
r? m
z-n m
no i—i
m
oj> CO
X3 CO -tv
m -h —L/
n I—
5 m
H co
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
3
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
ai
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
DDDD
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
67
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||