Download ACS CFSound-IV BASIC Programming

Transcript
ACS CFSound-IV BASIC Programming Manual
1 October 2015
Table of Contents
Welcome Newbies!......................................................................................................................... 1
… And Hello Programmers ......................................................................................................................1
To Get Started… ......................................................................................................................................1
Powering the CFSound-IV ................................................................................................................1
Via MAIN Connector to connect to an external power supply ...................................................1
Via SERIAL Connector with ACS Power Injector ......................................................................1
Via USB DEVICE Connector with USB Power Option .............................................................2
Via ETHERNET Connector with Power Over Ethernet Option .................................................2
Communicating with the CFSound-IV ..............................................................................................2
Serial Connection via RS-232 ....................................................................................................2
Serial Connection via USB .........................................................................................................3
TCP/IP Raw Connection via Ethernet ........................................................................................3
Terminal Emulator Programs ..............................................................................................3
Configuring the CFSound-IV ............................................................................................................4
What the CFSound-IV Understands ..................................................................................................5
Talking to the CFSound-IV ...............................................................................................................5
There Are Rules… ............................................................................................................................6
Remembering Numbers and Strings ..................................................................................................7
Rules for Numeric Data .............................................................................................................8
Rules for String Data .................................................................................................................8
Variable Rules ............................................................................................................................8
Remembering Commands .................................................................................................................9
Changing your Program ..........................................................................................................11
Controlling the Program Execution .........................................................................................12
Program Rules .........................................................................................................................13
Learning How to Count ...................................................................................................................14
Counting Rules .........................................................................................................................17
Remembering your Programs ..........................................................................................................18
Saving Rules .............................................................................................................................19
Things to do with Numbers .............................................................................................................20
Only Whole Numbers Please ....................................................................................................20
The Size of Numbers .................................................................................................................20
Comparing Numbers ................................................................................................................21
Combining Numbers in Order ..................................................................................................21
Numeric Operator Rules ..........................................................................................................22
Things to do with Strings ................................................................................................................23
Comparing Strings ...................................................................................................................23
Now for Something at Random .......................................................................................................24
It’s a Function!.........................................................................................................................25
Function Rules .........................................................................................................................25
A Casual Remark......................................................................................................................25
Functions Returning a Number ................................................................................................26
Functions Returning a String ...................................................................................................28
Copyright©1992-2015 by ACS, Sarasota, Florida
ALL RIGHTS RESERVED