17.01.2015 Views

IC693PCM300 - GE Fanuc PLC Distributor In Stock! 90-30 90-70 ...

IC693PCM300 - GE Fanuc PLC Distributor In Stock! 90-30 90-70 ...

IC693PCM300 - GE Fanuc PLC Distributor In Stock! 90-30 90-70 ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Contents<br />

Chapter 4 MegaBasic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1<br />

Section 1: Programming the PCM in MegaBasic . . . . . . . . . . . . . . 4-2<br />

Getting Started with the MegaBasic <strong>In</strong>terpreter . . . . . . . . . . . . . . . . . . . . 4-3<br />

Loading and Saving MegaBasic Programs . . . . . . . . . . . . . . . . . . . . . . . . . 4-4<br />

Backing Up Your Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-5<br />

Exiting the MegaBasic <strong>In</strong>terpreter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-6<br />

Saving Data through a Power Cycle or Reset . . . . . . . . . . . . . . . . . . . . . . . 4-6<br />

Compatibility with MS-DOS MegaBasic . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-7<br />

MegaBasic Features Not Supported by the PCM . . . . . . . . . . . . . . . . . . . . 4-8<br />

Modifying Existing BASIC Programs for MegaBasic . . . . . . . . . . . . . . . . . 4-8<br />

Printing a MegaBasic Text File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-9<br />

Using a Text Editor to Create MegaBasic Programs . . . . . . . . . . . . . . . . . . 4-9<br />

MegaBasic Program and Data Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-9<br />

Determining the Size of a MegaBasic Program . . . . . . . . . . . . . . . . . . . . . 4-10<br />

MegaBasic Program Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-11<br />

Changing the MegaBasic Workspace Size . . . . . . . . . . . . . . . . . . . . . . . . . 4-11<br />

Compacting and Encrypting Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-12<br />

Section 2: <strong>In</strong>terfacing to the PCM Hardware and Series <strong>90</strong> CPU 4-13<br />

<strong>In</strong>put and Output to the PCM Serial Ports . . . . . . . . . . . . . . . . . . . . . . . . . 4-14<br />

Serial Port Control and Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-14<br />

Accessing <strong>PLC</strong> Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-15<br />

SYSLINK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-17<br />

SYSREAD, SYSWRITE, and SYSTATUS$ . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-20<br />

Status Record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-22<br />

UNLINK Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-24<br />

Data Coherency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-24<br />

Accessing the PCM’s LEDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-25<br />

Section 3: MegaBasic Programming Examples . . . . . . . . . . . . . . . . 4-26<br />

PDFsupply.com<br />

Chapter 5 Advanced MegaBasic Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1<br />

Section 1: MegaBasic Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3<br />

Section 2: Screen Formatting Commands . . . . . . . . . . . . . . . . . . . . 5-5<br />

CLS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-8<br />

CUR$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-9<br />

CUR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-10<br />

ATTR$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-11<br />

ATTR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-12<br />

MV_CUR$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-13<br />

MV_CUR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-15<br />

GFK-0255K Series <strong>90</strong> Programmable Coprocessor Module and Support Software User’s Manual – November 1999<br />

ix

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!