Programming Reference Guide
Total Page:16
File Type:pdf, Size:1020Kb
Programming Reference Guide REFERENCE GUIDE RG-0006-01 1.9 en-US ENGLISH Important User Information Disclaimer The information in this document is for informational purposes only. Please inform HMS Networks of any inaccuracies or omissions found in this document. HMS Networks disclaims any responsibility or liability for any errors that may appear in this document. HMS Networks reserves the right to modify its products in line with its policy of continuous product development. The information in this document shall therefore not be construed as a commitment on the part of HMS Networks and is subject to change without notice. HMS Networks makes no commitment to update or keep current the information in this document. The data, examples and illustrations found in this document are included for illustrative purposes and are only intended to help improve understanding of the functionality and handling of the product. In view of the wide range of possible applications of the product, and because of the many variables and requirements associated with any particular implementation, HMS Networks cannot assume responsibility or liability for actual use based on the data, examples or illustrations included in this document nor for any damages incurred during installation of the product. Those responsible for the use of the product must acquire sufficient knowledge in order to ensure that the product is used correctly in their specific application and that the application meets all performance and safety requirements including any applicable laws, regulations, codes and standards. Further, HMS Networks will under no circumstances assume liability or responsibility for any problems that may arise as a result from the use of undocumented features or functional side effects found outside the documented scope of the product. The effects caused by any direct or indirect use of such aspects of the product are undefined and may include e.g. compatibility issues and stability issues. Programming Reference Guide Reference Guide RG-0006-01 1.9 en-US Table of Contents Page 1 Preface ................................................................................................................................. 5 1.1 About This Document .......................................................................................................5 1.2 Document history ............................................................................................................5 1.3 Related Documents ..........................................................................................................5 1.4 Trademark Information .....................................................................................................5 1.5 Cyclic Section as of Firmware v14.5 .....................................................................................5 2 BASIC language definition................................................................................................... 7 2.1 Introduction....................................................................................................................7 2.2 Program Flow..................................................................................................................7 2.3 Function....................................................................................................................... 12 2.4 Label............................................................................................................................ 16 2.5 Operators Priority .......................................................................................................... 17 2.6 Types of Variable ........................................................................................................... 17 2.7 TagName Variable.......................................................................................................... 20 2.8 Tag Access .................................................................................................................... 21 2.9 Limitation of the BASIC ................................................................................................... 21 3 List of Keywords ................................................................................................................ 22 3.1 # (bit extraction operator) ............................................................................................... 22 3.2 // (comment) ................................................................................................................ 22 3.3 ABS ............................................................................................................................. 23 3.4 ALMACK ....................................................................................................................... 23 3.5 ALSTAT......................................................................................................................... 23 3.6 AND............................................................................................................................. 24 3.7 ASCII26 ........................................................................................................................ 24 3.8 BIN$ ............................................................................................................................ 24 3.9 BNOT ........................................................................................................................... 25 3.10 CFGSAVE ...................................................................................................................... 25 3.11 CHR$ ........................................................................................................................... 25 3.12 CLEAR .......................................................................................................................... 26 3.13 CLOSE .......................................................................................................................... 26 3.14 CLS .............................................................................................................................. 26 3.15 DAY ............................................................................................................................. 26 3.16 DEC ............................................................................................................................. 27 3.17 DIM ............................................................................................................................. 27 3.18 DMSYNC....................................................................................................................... 28 3.19 DOW............................................................................................................................ 28 3.20 DOY............................................................................................................................. 28 3.21 DYNDNS ....................................................................................................................... 29 Programming Reference Guide Reference Guide RG-0006-01 1.9 en-US 3.22 END............................................................................................................................. 29 3.23 EOF ............................................................................................................................. 29 3.24 ERASE .......................................................................................................................... 30 3.25 FCNV ........................................................................................................................... 31 3.26 FOR - NEXT - STEP .......................................................................................................... 34 3.27 FS................................................................................................................................ 35 3.28 GET ............................................................................................................................. 39 3.29 GETFTP......................................................................................................................... 41 3.30 GETHTTP ...................................................................................................................... 43 3.31 GETIO .......................................................................................................................... 44 3.32 GETSYS, SETSYS.............................................................................................................. 44 3.33 GO .............................................................................................................................. 52 3.34 GOSUB - RETURN ........................................................................................................... 52 3.35 GOTO........................................................................................................................... 53 3.36 HALT............................................................................................................................ 53 3.37 HEX$............................................................................................................................ 53 3.38 HTTPX .......................................................................................................................... 54 3.39 IF, THEN, ELSE, ENDIF.....................................................................................................