
Cat. No. W360-E2-1 SYSMAC ALT ASCII Library I/F Toolkit OPERATION MANUAL ¢¡ £¤ ¢¥ SYSMAC ALT ASCII Library I/F Toolkit Operation Manual Produced March 1999 iv Notice: OMRON products are manufactured for use according to proper procedures by a qualified operator and only for the purposes described in this manual. The following conventions are used to indicate and classify precautions in this manual. Always heed the information provided with them. Failure to heed precautions can result in injury to people or dam- age to the product. ! DANGER! Indicates information that, if not heeded, is likely to result in loss of life or serious injury. ! WARNING Indicates information that, if not heeded, could possibly result in loss of life or serious injury. ! Caution Indicates information that, if not heeded, could result in relatively serious or minor injury, damage to the product, or faulty operation. OMRON Product References All OMRON products are capitalized in this manual. The word “Unit” is also capitalized when it refers to an OMRON product, regardless of whether or not it appears in the proper name of the product. The abbreviation “Ch,” which appears in some displays and on some OMRON products, often means “word” and is abbreviated “Wd” in documentation in this sense. The abbreviation “PC” means Programmable Controller and is not used as an abbreviation for any- thing else. Visual Aids The following headings appear in the left column of the manual to help you locate different types of information. Note Indicates information of particular interest for efficient and convenient operation of the product. 1, 2, 3… 1. Indicates lists of one sort or another, such as procedures, checklists, etc. OMRON, 1999 All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form, or by any means, mechanical, electronic, photocopying, recording, or otherwise, without the prior written permission of OMRON. No patent liability is assumed with respect to the use of the information contained herein. Moreover, because OMRON is constantly striving to improve its high-quality products, the information contained in this manual is subject to change without notice. Every precaution has been taken in the preparation of this manual. Nevertheless, OMRON assumes no responsibility for errors or omissions. Neither is any liability assumed for damages resulting from the use of the information contained in this publication. v vi TABLE OF CONTENTS General overview...................................................................................... xi 1 About this manual............................................................................................................................... xii 2 Intended audience............................................................................................................................... xii 3 References.......................................................................................................................................... xii 4 Glossary ............................................................................................................................................ xiii 1 USING THE LIBRARY INTERFACE IN BASIC .......................... 1 1-1 The operation of the Library Interface ................................................................................................................2 1-2 User memory in BASIC.....................................................................................................................................6 1-3 Library Interface BASIC statements...................................................................................................................7 2 CREATING A USER LIBRARY.................................................... 11 2-1 Creating a library function ...............................................................................................................................12 2-2 Application design considerations....................................................................................................................15 3 USING BIOS FUNCTIONS ............................................................ 19 3-1 General description of BIOS and API functions................................................................................................20 3-2 Functions for interrupt handling .......................................................................................................................21 3-3 Functions for exchanging data with the PC unit................................................................................................23 3-4 Functions for OS error messages......................................................................................................................25 3-5 Functions for memory managing......................................................................................................................26 3-6 Functions for controlling serial ports................................................................................................................27 3-7 Functions for using the realtime clock ..............................................................................................................29 4 TROUBLESHOOTING................................................................... 31 4-1 Out of memory error message after lib load......................................................................................................32 4-2 Special unit error .............................................................................................................................................32 4-3 ASCII unit malfunctions ..................................................................................................................................32 4-4 Lib Load hangs................................................................................................................................................32 4-5 Motorola-S format error...................................................................................................................................32 4-6 Source debugging ............................................................................................................................................33 Appendices Appendix A Description of API.h........................................................................................................35 Appendix B Reference of BIOS routines .............................................................................................37 Appendix C Examples of small applications........................................................................................71 Appendix D HMI of Library Interface.................................................................................................91 Appendix E Description of Linker and Map files.................................................................................99 Appendix F Assembly.......................................................................................................................103 Revision History .................................................................................... 107 vii viii ! WARNING Failure to read and understand the information provided in this manual may result in personal injury or death, damage to the product, or product failure. Please read each section in its entirety and be sure you understand the information provided in the section and related sections before attempting any of the procedures or operations given. ix x General overview This section is supposed to give the reader a summary and other global information on this document; It gives an overview of the context and contents of this manual. 1 About this manual............................................................................................................................... xii 2 Intended audience............................................................................................................................... xii 3 References.......................................................................................................................................... xii 4 Glossary ............................................................................................................................................ xiii xi References General overview subsection 1 1 About this manual This manual describes the use of the Library Interface of the ASCII unit types ASC11, ASC21 and ASC31. It describes how a user library is created, and how it can be used from a Basic application. The ASCII unit is a freely programmable unit for the mid-size PLC family C200Hx. The unit’s main tasks are handling serial communication and co-processing. The ASCII unit can be programmed in Basic, however, to acquire higher performances, the ASCII unit’s Basic is equipped with a library in- terface. That library interface allows up to ten user functions -written for instance in the C language- to be used from the application in Basic. This manual also describes how the Application Programming Interface can be used to call firmware routines from a library function. The hardware involving these firmware routines (read: ‘BIOS routines’) is explained and should be understood before one can use these firmware functions. The manual is divided into four sections; • Section one explains how library functions can be loaded and called from the Basic
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages126 Page
-
File Size-