EasyManua.ls Logo

Sutron 8310 - Introduction to BASIC Programming

Sutron 8310
259 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Sutron Corporation 8310 & 7310 Users Manual 8800-1125Rev. 2.7 (BETA) 4/16/2014 pg. 196
Basic Introduction
Up until this point in the user manual, you have learned about some of the simpler operating
procedures behind the 8310. One of its more powerful yet more complicated functions remains
to be covered. This chapter will attempt to explain, in some detail, the BASIC interpreter that
has been added to the 8310.
The BASIC interpreter executes user written instructions coded in a custom version of the BASIC
language. BASIC supports full floating point expressions, control statements, measurements,
logging, alarms, serial I/O, I/O, and much more. Because this subject does require some prior
knowledge of the BASIC language, we ask you to proceed only if you feel you have an adequate
grasp of the programming conventions of BASIC.
You will find BASIC to be especially useful for special conversions on sensors, smart sampling or
logging, special alarm detection, control applications, and custom phone-voice messages,
custom GOES formats and more.
8310 BASIC is derived from Sutron’s Xpert BASIC. For a comprehensive language reference,
please see “Xpert Basic SLL User Manual.pdf”, available for download from
www.sutron.com/downloads/manuals.htm.
The BASIC language is based on a subset of the BASIC language used on most personal
computers. The following are some of the features of 8310 Basic:
Variable support for integers, floating point numbers, strings, date and time, sensor
readings, events, and arrays, including multi-dimensional arrays.
Global variables and functions can be shared across programs.
Subroutine and function support.
Pseudo-compiled code for faster execution and early syntax error detection.
Excellent support for structured programming concepts by way of FOR, WHILE, and DO
control loops, and Select Case statement. Line numbers are supported, but are optional.
Line labels are supported.
No limit on program size, multiple programs are supported.
Ability to schedule programs to be run on an interval.
Functions to access the Analog and Digital I/O modules to make sensor measurements.
Support for alarm and alarm transmissions.
Support for SSP SendTag and GetTag, as well as generic SSP messaging
(RequestMessage, SendMessage and GetMessage).
Support for reading and writing disk files, serial ports, log files, and sockets.
Ability to call functions in "C" DLL's.
Support for run-time error handling.
Support for TCP/IP communication, including the ability to creating TCP or UDP Web
Servers.
Support for dynamic web page creation, including support for HTML forms (CGI).
Multi-threaded support, including independent threads of execution, critical sections,

Related product manuals