Download Datasheets
Transcript
6233 E. Sawgrass Rd Sarasota, FL. 34240 (941)377-5775 FAX(941)378-4226 26-Feb-15 www.acscontrol.com ACS-CF-CFSoundIV - Digital Audio Repeater General Description The CFSound-IV is an extremely versatile digital audio player that plays Windows .WAV files recorded at multiple sample rates, 8 or 16-bit, mono or stereo off of industry standard Secure Digital Flash (SD/SDHC) cards. Sounds may be associated with contact events or played autonomously by utilizing a file naming convention. Extra sound playout functionality is provided via a text configuration file included on the CF card. A built-in ACS Basic interpreter may be used to explicitly control the unit’s operation. Ethernet connection with programmable configuration and multiple protocol support: DHCP client, FTP server, VNC server, HTTP, TCP/IP Raw, NTP client, SMTP client (via Basic) and Art-Net™. Uses inexpensive, industry standard Secure Digital FLASH (SD/SDHC) Diagnostic LED’s to indicate operating status. Cards. Optional boards for contact inputs to activate sounds. Built-in 20 Watt Class D Stereo (2 x 10W) Amplifier. Two built-in contact inputs to activate sounds. Runs on 12 – 15VDC with supplied 120 – 240VAC 50/60Hz wall Optional boards for contact outputs activated with sounds for other control. transformer Push-To-Talk (PTT) dry relay contact output that can optionally close Built-in 35mW @ 32 ohms Headphone Amplifier. whenever a sound is played. RS-232 Serial Port for controlling audio play out via an attached computer Optional Power Over Ethernet operation. or PLC. Digital Up/Down volume control push buttons with remote connector. Scriptable via built-in ACS Basic USB port for connection to PC as a Flash Drive or Serial device. Features Typical Applications Museum Exhibit Control Message on Hold Amusement Equipment Paging and Alarm Systems Timed Identification Advertising Kiosks Specifications Enclosure Dimension: Module Dimension (board): Supply Voltage: Supply Current (Idle): Supply Current (playing loud): 6.1”(W) x 4.2”(D) x 1.8” (H) 5.7”(W) x 3.95”(D) x 1.1” (H) 12 – 15VDC (wall transformer) 85mA @ 12VDC 250mA @ 12VDC Copyright©1998-2015 by ACS, Sarasota, Florida PTT Output Contacts Rating: Contact Input Activation Current: Line Level Outputs: Operating Temperature: Supplied wall transformer: 1 of 13 1A @ 30VDC, 0.5A @ 120VAC 10mA sink @ 12VDC 1.0VRMS @ 47K ohm 0 to +50 degrees C 120-240VAC 50/60Hz input ALL RIGHTS RESERVED Connections GROUND 5 10V - 18V DC Input Contact 25 4 PTT Contact N.O. Right Speaker - 3 Input Contact 26 Right Speaker + 2 PTT Contact COM Left Speaker - MAIN Left Speaker + Pin # 1 2 3 4 5 6 7 8 9 10 Speaker and Power Connector 1 6 7 8 9 10 Signal Left Speaker + Left Speaker Right Speaker + Right Speaker Input Contact 25 Input Contact 26 PTT Contact COM PTT Contact N.O. 10VDC – 18VDC Ground Filename 19C.WAV / 19O.WAV 1AC.WAV / 1AO.WAV Mating Connector: 10-position removable Terminal Block (included) PIN 1 2 3 4 5 6 7 8 9 Serial Connector DCE Signal JB1 as DCE Direction DTE Signal JB1 as DTE Direction RS-485 BRS-232 TxD RS-232 RxD I/O OUT IN RS-485 BRS-232 RxD RS-232 TxD I/O IN OUT GND RS-485 A+ RS-232 CTS RS-232 RTS +12-15VDC PWR I/O IN OUT PWR GND RS-485 A+ RS-232 RTS RS-232 CTS +12-15VDC PWR I/O OUT IN PWR Mating connector: DB9 Female JB1 Serial Configuration Jumpers RS-485 RS-232 DCE JB1 JB1 JB1 JB1 DTE RS232 DEFAULT in copper traces The board is configured as RS-232 DCE to allow use of a 1 to 1 cable between the CFSound and a PC. This configuration is established by copper jumpers on the bottom of the board between the JB1 pins. Copyright©1998-2015 by ACS, Sarasota, Florida 2 of 13 ALL RIGHTS RESERVED GROUND INPUT8 INPUT7 INPUT6 INPUT5 5 4 3 2 1 INPUT1 6 GROUND 7 INPUT2 8 INPUT3 9 INPUT4 10 INP1 Optional Contact Sense 8 Modules INP1 Pin # 1 2 3 4 5 6 7 8 9 10 INP1 Rear Signal GROUND INPUT 1 INPUT 2 INPUT 3 INPUT 4 INPUT 5 INPUT 6 INPUT 7 INPUT 8 GROUND Front Signal GROUND INPUT 33 INPUT 34 INPUT 35 INPUT 36 INPUT 37 INPUT 38 INPUT 39 INPUT 40 GROUND INP1 INP2 INP3 Rear Signal GROUND INPUT17 INPUT18 INPUT19 INPUT20 INPUT21 INPUT22 INPUT23 INPUT24 GROUND 1 10 9 8 7 6 5 4 3 2 1 INPUT4 INPUT3 INPUT2 INPUT1 GROUND INP2 INP3 INP3 Pin # 1 2 3 4 5 6 7 8 9 10 2 INPUT5 3 INPUT6 4 INPUT7 5 INPUT8 6 GROUND INPUT18 7 INPUT9 INPUT19 8 GROUND INPUT20 9 INPUT10 INPUT21 10 INPUT11 INPUT22 1 INPUT12 INPUT23 2 INPUT13 3 INPUT14 4 INPUT15 5 INPUT16 6 GROUND 7 INPUT17 8 GROUND 9 INPUT24 Optional Contact Sense 24 Modules 10 GROUND Mating Connector: 10-position removable Terminal Block (included) Front Signal GROUND INPUT49 INPUT50 INPUT51 INPUT52 INPUT53 INPUT54 INPUT55 INPUT56 GROUND INP2 Pin # 1 2 3 4 5 6 7 8 9 10 Rear Signal GROUND INPUT9 INPUT10 INPUT11 INPUT12 INPUT13 INPUT14 INPUT15 INPUT16 GROUND INP1 Front Signal GROUND INPUT41 INPUT42 INPUT43 INPUT44 INPUT45 INPUT46 INPUT47 INPUT48 GROUND INP1 Pin # 1 2 3 4 5 6 7 8 9 10 Rear Signal GROUND INPUT1 INPUT2 INPUT3 INPUT4 INPUT5 INPUT6 INPUT7 INPUT8 GROUND Front Signal GROUND INPUT33 INPUT34 INPUT35 INPUT36 INPUT37 INPUT38 INPUT39 INPUT40 GROUND Mating Connectors: 10-position removable Terminal Block (included) Copyright©1998-2015 by ACS, Sarasota, Florida 3 of 13 ALL RIGHTS RESERVED 6 5 4 GROUND INPUT8 INPUT7 INPUT6 INPUT5 INPUT4 INPUT3 8 7 6 OUT 4 N.O. OUT 3 N.C. OUT 3 COM OUT2 OUT2 Pin # 1 2 3 4 5 6 7 8 9 10 Rear Signal OUT 5 N.O. OUT 5 COM OUT 6 N.O. OUT 6 COM OUT 7 N.O. OUT 7 COM OUT 7 N.C. OUT 8 N.O. OUT 8 COM OUT 8 N.C. 5 4 3 2 1 OUT 1 N.O. 9 OUT 1 COM 10 OUT 2 N.O. 1 OUT 2 COM 2 OUT 3 N.O. 3 OUT 4 COM OUT 7 N.C. 4 OUT 4 N.C. OUT 8 N.O. 5 OUT 5 N.O. OUT 8 COM 6 OUT 5 COM OUT 8 N.C. Front Signal GROUND INPUT 33 INPUT 34 INPUT 35 INPUT 36 INPUT 37 INPUT 38 INPUT 39 INPUT 40 GROUND OUT 6 N.O. 7 Rear Signal GROUND INPUT 1 INPUT 2 INPUT 3 INPUT 4 INPUT 5 INPUT 6 INPUT 7 INPUT 8 GROUND OUT 6 COM 8 1 INP1 OUT 7 N.O. 9 2 OUT 7 COM 10 3 GROUND 7 INPUT1 8 INPUT2 9 INP1 Pin # 1 2 3 4 5 6 7 8 9 10 Optional Contact I/O 8 Modules INP1 OUT1 OUT2 10 OUT1 Front Signal OUT 37 N.O. OUT 37 COM OUT 38 N.O. OUT 38 COM OUT 39 N.O. OUT 39 COM OUT 39 N.C. OUT 40 N.O. OUT 40 COM OUT 40 N.C. OUT1 Pin # 1 2 3 4 5 6 7 8 9 10 Rear Signal OUT 1 N.O. OUT 1 COM OUT 2 N.O. OUT 2 COM OUT 3 N.O. OUT 3 COM OUT 3 N.C. OUT 4 N.O. OUT 4 COM OUT 4 N.C. Front Signal OUT 33 N.O. OUT 33 COM OUT 34 N.O. OUT 34 COM OUT 35 N.O. OUT 35 COM OUT 35 N.C. OUT 36 N.O. OUT 36 COM OUT 36 N.C. Mating Connectors: 10-position removable Terminal Block (included) Copyright©1998-2015 by ACS, Sarasota, Florida 4 of 13 ALL RIGHTS RESERVED Mechanical File Naming Format for CFSound style operation (see CFSound-III User’s Manual for more detailed information) Filename format: XX[COPRSBNFD].WAV Where: XX C O P R S B N F D .WAV Two digit ASCII Hex identifier 01 - FE, may be associated contact number File plays on Closure of contact XX, may not be used with O File plays on Opening of contact XX, may not be used with C File plays while contact XX is closed or open, may not be used with B File repeats, may not be used with B On board PTT relay and contact XX will activate while sound is playing File plays as background when no other sound is playing, may not be used with C, O, P, R or N File playing is non-interruptable, may not be used with R or B Matching DMX channel number Fades up/down with sound start/stop First 32 channels set to entries in associated DMX scene file with sound start/stop File extension identifies Windows PCM sound file format Copyright©1998-2015 by ACS, Sarasota, Florida 5 of 13 ALL RIGHTS RESERVED CFSOUND.INI Configuration File (see CFSound-III User’s Manual for more detailed information) [Section] / Parameter Description [Comm] Communications Port Section Sets the serial port baudrate to the decimal value ddddd. BaudRate=ddddd Default=2400. [DEBUG] ShowStartStop=TRUE/FALSE Debug Section Enables RS-232 message display of sound start/stop events. Default=FALSE. [Background] BackgroundDelay=ddddd Background Section Sets the delay in seconds between background sound playouts to the decimal value ddddd. BackgroundRestart=TRUE/FALSE Default=0. Enables interrupted background sound to restart from the beginning instead of where it was interrupted. Default=FALSE. [Quiz] QuizMode=TRUE/FALSE Quiz Section Enables Quiz/Kiosk mode of operation. QuestionContacts=dd Sets the number of question contacts to the decimal value dd. AnswerContacts=dd Sets the number of answer contacts to the decimal value dd. Default=FALSE. Default=4. NoAnswerTimeout=dd Default=4. Sets the delay in seconds between the end of the question sound and the timeout answer sound to the decimal value dd. AwaitAnswerSound=xx Default=5. Sets the hexadecimal sound number xx to play after the question sound before the timeout answer sound. AnswerWithoutQuestionSound=xx Default=0 (no sound). Sets the hexadecimal sound number xx to play if an answer contact is activated before a question contact. Default=0 (no sound). [Contacts] Force=TRUE/FALSE Contacts Section Setting this value to TRUE restores the original CFSound contact behavior wherein the contact's active status is 'forced' upon reset, power-up or card-insertion. This will cause associated sound activation if the contact was active. Setting this value to FALSE (the default) causes the new behavior wherein the contact's current status is sampled upon reset, power-up or cardinsertion. This will cause no associated sound activation until the contact is re-activated. SequenceContactNumber=dd Default=FALSE. Sets the number of the contact that will play sounds in sequence to the decimal value dd. FirstSoundNumber=dd Default=0 (no sequencing) Sets the first sound number that will be played in sequence to the decimal value dd. LastSoundNumber=dd Default=1 (sound #1) Sets the last sound number that will be played in sequence to the decimal value dd. SaveNIContacts=TRUE/FALSE OutputContactModulus=dd RandomSequence=TRUE/FALSE OffsetContactNumber=dd ContactOffsetAmount=dd AutoplayEntireSequence= TRUE/FALSE LineInputEnableContactNumber=dd PttOutputWithLineInputEnableContact =TRUE/FALSE Default=127 (sound #127) Setting this value to TRUE will remember any contact events that occur while a non-interruptible sound is playing. Note that this can cause a non-interruptible sound to play again if its contact is re-activated while it is playing. Default=FALSE Setting this value to non-zero will cause the output contacts associated with sounds to repeat on the modulo value if QuizMode=FALSE. Example: OutputContactModulus=4 activates contact outputs 1 through 4 for sounds 1 through 4, contact outputs 1 through 4 for sounds 5 through 8, etc. Default=0 Setting this value to TRUE will cause each activation of the SequenceContactNumber to play a random sound from the range FirstSoundNumber to LastSoundNumber. Default=FALSE Sets the number of the contact that will offset the sounds associated with the other contacts by ContactOffsetAmount to the decimal value dd. Does not affect Sequence or Quiz mode. Default=0 (no offset) Sets the value that will be added the the input contact number when the OffsetContactNumber input is active, to offset the actual sound number that will play to the decimal value dd. Does not affect Sequence or Quiz mode. Default=0 (no offset amount) Setting AutoplayEntireSequence to TRUE causes the entire sequence of sounds to be played once whenever the SequenceContactNumber activates one time. Default=FALSE (no autoplay) Sets the number of the contact that will stop any sound currently playing and enable the Line level Input to the decimal value dd. Audio on the Line level Input is amplified to the current volume setting and appears on the speaker and Line level Output. Default=0 (no Line In control contact) Setting this value to TRUE will cause the PTT relay to follow the non-zero LineInputEnableContactNumber state, otherwise the PTT relay activation is controlled by sounds with the Relay attribute in their filename. Default=FALSE (PTT for sounds w/Relay attr) [LineIn] LineInputAlwaysEnabled=TRUE/FALSE LineIn Section Setting this value to TRUE enables the Line level Input always. when no sound is playing. When this is FALSE, the Line level Input is controlled by the LineInputEnableContactNumber. Default=FALSE (Line level Input disabled) Copyright©1998-2015 by ACS, Sarasota, Florida 6 of 13 ALL RIGHTS RESERVED RS-232 Protocol (see CFSound-III User’s Manual for more detailed information) SOH / ETX Commands / Responses Command Serial Character Sequence <SOH> ”p” “+” {Sound number in two digit ASCII Hex, (01 – FE)} Start a Sound <ETX> <SOH> ”p” “-” {Sound number in two digit ASCII Hex, “00” stops currently playing sound} Stop a Sound <ETX> <SOH> ”p” “&” {Sound number in two digit ASCII Hex, (01 – FE)} Queue a Sound <ETX> <SOH> ”p” “~” Flush queued Sounds <ETX> <SOH> ”p” “!” Stop playing Sound and flush queued Sounds <ETX> <SOH> ”v” “=” {volume in two digit ASCII Hex, 00 – 3F} Set volume <ETX> <SOH> ”v” “+” {volume increase in two digit ASCII Hex, 00 – 3F} Increase volume <ETX> <SOH> ”v” “-” {volume increase in two digit ASCII Hex, 00 – 3F} Decrease volume <ETX> <SOH> ”v” “<” {fade volume to zero in seconds expressed as two digit ASCII Hex, 00 – 3F} Fade volume <ETX> <SOH> ”a” “-” Mute amplifier <ETX> <SOH> ”a” “+” Un-mute amplifier <ETX> Copyright©1998-2015 by ACS, Sarasota, Florida 7 of 13 ALL RIGHTS RESERVED ACS Basic Commands (see ACS CFSound-IV Basic Programming Manual for more detailed information) Variables ACS Basic has four types of variables: o 32-bit Integer Numeric, 32-bit Integer Numeric Arrays, unsigned 8-bit character Strings and unsigned 8-bit character String Arrays. Variable names are case sensitive. The may contain letters, numbers and underscore but they must start with a letter. They can be up to 32 characters long. String variables names must end with a ‘$’. Numeric variables can assume the integer values (–2,147,483,648 ≤ variable ≤ +2,147,483,647). Character Strings are limited to 255 characters in length. Variable arrays are indexed with up to three array subscripts separated by commas and enclosed in square brackets [ ] and must be DIMensioned before they are used. The number of variables is limited only by the available memory. System Variables @TIMER[x] @PORT[x[ @PORT2[x[ @CONTACT[x[ @CLOSURE[x[ @OPENING[x[ @FEOF[#N[ @FILE.SIZE[#N] @FILE.POSITION[#N] @SOCKET.EVENT[#N] @SOCKET.TIMEOUT[#N] @SECOND,@MINUTE,@HOUR, @DAY,@DATE,@MONTH,@YEAR @SOUND$ @VOL @NSVOL @BAUD @MSG$ @SOM @EOM @MSGENABLE @EOT @SMTP.EVENT @SMTP.MESSAGE$ @PTT @MUTE @LINEIN @DMX.CHANNELS @DMX.DATA[x] @SOUNDFRAMEPRESCALER @SOUNDFRAMESYNC @CONFIG.ITEMS @CONFIG.TYPE[n] Copyright©1998-2015 by ACS, Sarasota, Florida (10) 16-bit timers that decrement at 50Hz (20mSEC) until zero. (256) 8-bit expansion port access for rear I/O module (256) 8-bit expansion port access for front I/O module (56) contact I/O access (56) contact closure event access (56) contact opening event access End of File on file #N Size in bytes of previously opened file #N Ascertain or set the position of the next file read / write operation of a previously opened file #N Determine the state of an opened streaming socket connection Control the timeout period of a socket connection send / receive data phases Real Time Clock / Calendar: @SECOND 00 <= seconds <= 59 @MINUTE 00 <= minutes <= 59 @HOUR 00 <= hour <= 23 @DOW 1 <= day of week <= 7 @DATE 1 <= date of month <= 31 @MONTH 1 <= month of year <= 12 @YEAR 00 <= year <= 99 Sound playing queue access Sound volume access Sound volume access without saving Serial Port baud rate access Serial Port delimited message access Delimited message Start Of Message character Delimited message End Of Message character Enable / disable MSG$ parsing of the serial data stream Returns 1 when any PRINT serial data has finished transmitting Returns the last Simple Mail Transfer Protocol event Returns any text message associated with the @SMTP.EVENT Push-to-Talk relay control Mute / Un-mute the speaker amplifier Line level input control Sets the number of transmitted channels sent via ArtNet™ Gets or Sets the current value of the channel data x Sets the number of ticks between @SOUNDFRAMESYNC events while sound is playing Gets the frame number of the currently playing sound Returns the total number of configuration items Returns the type of the configuration item n: @CONFIG.TYPE[n] Item Type Fields 1 Byte 0 2 Boolean 0 3 Unsigned short 0 4 Baudrate selector 0 5 Parity selector 0 6 Data Bits selector 0 7 Stop Bits selector 0 8 Keybeep selector 0 9 Firmware Version 0 10 Keypad style 0 11 Keypad scheme 0 12 Protocol selector 0 13 MAC address 6 14 IP address (only display if static) 4 15 IP address 4 8 of 13 ALL RIGHTS RESERVED @CONFIG.NAME$[n] @CONFIG.VALUE$[n {, f]} @CONFIG.MIN[n] @CONFIG.MAX[n] @CONFIG.FIELDS[n] @CONFIG.FIELD$[n, f] @CONFIG.SEPARATORS[n, f] @CONFIG.VALUE[n {, f}] @CONFIG.DEFAULT[n {, f]} @CONFIG.WRITE[n {, f}] @CARD.MOUNT 16 Hex Byte 0 17 Hex Unsigned short 0 18 Hex Array 8 19 Short 0 20 RS485 Mode 0 Returns the name of the configuration item n Returns the human readable value of the configuration item n {optional field number f} Returns the allowed minimum value of configuration item n Returns the allowed maximum value of the configuration item n Returns the number of fields for configuration item n Returns the human readable value of the configuration item n field f Returns the human readable value of the configuration item n field f field separator Gets or Sets the value of the configuration item n {optional field number f} Gets the default value of the configuration item n {optional field number f} Writes the current value of the configuration item n {optional field number f} to NVM Mount / Unmount the SD card Statements BREAK {line / `label} CHANGE string, replacement CLEAR CLOSE #N CONST var{$}=value {, var{$}=value …} CONTINUE DATA DEL path DELAY value DIM var{$}[size1{, size2{, size3}}] DIR {path} EDIT line END ERROR value FOR var=init TO limit [STEP increment] FINPUT #N, var{$}, … , var{$} FPRINT #N, expr {, expr …} FOPEN #N, recordlength, “path” FREAD #N, recordnumber, var[$], var[$], … , var[$] FWRITE #N, recordnumber, var[$], var[$], … , var[$] FINSERT #N, recordnumber, var[$], var[$], … , var[$] FDELETE #N, recordnumber FUNCTION name{$}(parm1{$}, … parmN{$}) ENDFUNCTION GOSUB line / `label GOTO line / `label INCLUDE path IF test THEN line/statement [ELSE line/statement] INPUT [“prompt”, ]var INPUT #N, var {LET }var{$}=expr{$} (default statement) LIF test THEN statement{ : statement} LIST {start {, end}} LIST #N{ start {, end}} LOAD path MD path MEMORY NEW NEXT [var] ON expr, GOSUB line0,line1,line2,…,lineN ON expr, GOTO line0,line1,line2,…,lineN ONERROR GOTO line ONEVENT @specialvar, GOSUB line Copyright©1998-2015 by ACS, Sarasota, Florida Exit from within FOR / NEXT or WHILE / WEND loops {optionally going to a line / `label] Searches program for string then prompts for replacement Erase variables Close file #N(0 – 9) opened with OPEN statement Defines one or more constant variables that can’t be modified after they are created Continues the next iteration of FOR / NET or WHILE / WEND loops Inline DATA statements for READ and ORDER statements Delete CF card files Pause program execution for value * 20mSEC Dimension numeric or string variable to hold up to size1 elements {optional up to 3 dimensions] Show files on the SD card with optional path / wildcards Edit line on connected ANSI terminal Terminate program with no message Force a program error Perform counted loop of statements until NEXT statement with optional BREAK / CONTINUE Get the value for one or more variables from a single line from previously opened file #N Write the value of one or more expressions to a single line into previously opened file #N Open file #N for fixed length record I/O Reads ASCII data from fixed length record file #N at recordnumber into variables Writes ASCII data to fixed length record file #N at recordnumber from variables Inserts ASCII data to fixed length record file #N at recordnumber from variables Deletes recordnumber from fixed length record file #N Define a user function name with zero or more integer or string parameters Ends a user defined function Call a subroutine starting at line / `label Jump to program line / `label Include ACS Basic statements from file path IF test evaluates non-zero jump to program line or execute statement, optional ELSE clause Get value of variable from serial port with optional prompt Get value of variable from file #N Sets variable = expression, LET is optional IF test evaluates non-zero execute statements to end of line LIST program lines to the serial port LIST program lines to OPENed file #N LOAD (or chain to) program from SD card Makes a new Directory on SD card Displays the currently available program, resource and SD card memory Erase all program statements and clear variables End of a counted loop of statements from FOR statement Case statement subroutine dispatch Case statement execution dispatch One-shot error handling Semi-asynchronous event handling via subroutine Special Variable Event event occurs one time whenever the timer counts down to zero. @TIMER[x] Special variable @TIMER(0) is the highest priority, followed by @TIMER(1), … then @TIMER(9). 0 <= x <= 9 event occurs whenever the associated CFSound-4 contact has @CLOSURE[x] closed. 0 <= x <= 55 event occurs whenever the associated CFSound-4 contact has @OPENING[x] opened. 0 <= x <= 55 @FEOF[#N] event occurs after FREAD #N reaches end of file #N @SECOND event occurs once per second. @MINUTE event occurs once per minute. 9 of 13 ALL RIGHTS RESERVED event occurs once per hour. event occurs once per day. event occurs once per day. event occurs once per month. event occurs once per year. event occurs after receipt of a serial character stream delineated by @MSG$ the @SOM and @EOM characters. @EOT event occurs after complete transmission of serial data stream event occurs after the last queued @SOUND$ sound has finished @SOUND$ playing. OPEN filename path as file #N for access via DIR #, INPUT # or PRINT# statements Position READ data pointer to statement line number Play sound file and wait for completion PRINT one or more numeric or string expressions to the serial port PRINT one or more numeric or string expressions to opened file #N PRINT zero or more formatted numeric or string expressions to the serial port PRINT zero or more formatted numeric or string expressions to opened file #N READ data from DATA statements into numeric or string variables RETURN from subroutine invoked via GOSUB statement Comment, remainder of line is ignored REName oldfile to newfile on SD card Resequences program lines start through end and writes them to programname.RSQ Execute program in memory or from path at lowest or line number SAVE the current program to a SD card file Performs case insensitive search for string in memory or optional filename with wildcards SIGNAL event associated with specialvar Sorts an integer or string array variable in ascending order Prepares the SMTP network stack for subsequent SMTP.SEND operation Sends a text message via the previously configured SMTP.SERVER Sends the contents of a previously opened file #N via the previously configured SMTP.SERVER Initiates an outgoing asynchronous network socket connection as file #N on ip address / port number where execution is controlled by the connect( ), send( ) and recv( ) functions Initiates an incoming asynchronous network socket reception as file #N on ip port number where execution is controlled by the connect( ), recv( ) and send( ) functions Terminate program and display message Display SD card file on serial port Displays a table of the name, type and current value of variables currently defined or used Pause execution until systemvar event occurs Conditional execution code block loop with BREAK / CONTINUE @HOUR @DOW @DATE @MONTH @YEAR OPEN #N,”path”,”options” ORDER line PLAY file PRINT expr{$} {, expr{$} …} PRINT #N, expr{$} {, expr{$} …} PRINT USING fmt$ expr{$} {, expr{$} …} PRINT #N, USING fmt$ expr{$} {, expr{$} …} READ var{$} {, var{$} …} RETURN REM REN oldfile, newfile RESQ {start{-end}{, new}{, incr}} RUN {line} / RUN {path} SAVE {path} SEARCH string {filename} SIGNAL @specialvar SORT var{$} SMTP.SERVER name, ipaddr{,port{,userb64,passb64}} SMTP.SEND from, to, cc, subject, message SMTP.SEND #N, from, to, cc, subject{,header} SOCKET.ASYNC.CONNECT #N, “ip:port”, connect( ), send( ), recv( ) SOCKET.ASYNC.LISTEN #N, “:port”, connect( ), recv( ), send( ) STOP TYPE path VARS WAIT @systemvar WHILE test : statement{s} : WEND Operators Operator NOT ~ * , / , % + << , >> = , <> < , <= , > , >= & , | , ^ AND , OR Description Logical NOT Unary minus (negate) Bitwise NOT (1’s complement) Multiplication, division, modulus Addition, string concatenation Subtraction Left Shift, Right Shift Assign / test equal, test NOT equal (numeric or string) LT, LE, GT, GE (numeric only) AND, OR, Exclusive OR Logical AND, OR Copyright©1998-2015 by ACS, Sarasota, Florida 10 of 13 Priority 7 7 7 6 5 5 4 3 3 2 1 ALL RIGHTS RESERVED Functions ASC(char) ABS(expr) CHR$(expr) COS(expr) ERR( ) ERR$( ) FILE.EXISTS(path$) FIND(var$,searchstr$ {, startpos}) FMT$(fmt$ {,expr{$}, … , expr{$}}) GETCH(expr) HEX.STR$(expr {,digits}) HEX.VAL(expr$) INSERT$(var$, start, var2$) LEFT$(var$,length) LEN(var$) MID$(var$,start,length) MULDIV(number,multiplier,divisor) MULMOD(number,multiplier,divisor) RIGHT$(var$,length) REPLACE$(var$, start, var2$) RND(expr) SIN(expr) STR$(expr) SOCKET.SYNC.CONNECT(#N, “ip:port”, connect( ), send( ), recv( )) Returns integer value of ASCII character argument Returns absolute value of numeric expression argument Returns character equivalent of expression value argument Returns an integer scaled cosine value of the degree expression where -1024 ≤ COS( ) ≤ 1024 Returns last error number Returns string error message of last error number Returns one of the file specified by “path” exists else returns zero Returns zero based position of searchstr$ in string variable argument starting at zero (or optional startpos) or 1 if not found Returns formatted ASCII string of zero or more expressions using printf() style fmt$ argument: % {Flags}{Width}{.Precision}Type Required character that determines whether the associated argument is interpreted as a character, a string, or a number: c character d signed decimal integer i signed decimal integer Type u unsigned decimal integer s string o unsigned octal integer x unsigned hexadecimal integer X unsigned HEXADECIMAL integer Optional character or characters that control justification of output and printing of signs, blanks, and octal and hexadecimal prefixes. More than one flag can appear in a format specification. left align the result in the given field width + prefix the output with a sign (+/-) if the type is signed if Width is prefixed with 0, zeros are added until the minimum width is 0 reached. If 0 and – appear, the 0 is ignored. If 0 is specified with an integer Flags format, the 0 is ignored. prefix the output with a blank if the result is signed and positive; the blank is blank(‘ ‘) ignored if both the blank and + flags appear when used with o, x or X format, prefix any nonzero output value with 0, 0x # or 0X respectively, otherwise ignored Nonnegative decimal integer controlling the minimum number of characters printed. If the number of characters in the output value is less than the specified width, blanks are added to the left or the right of the values — depending on whether the – flag (for left alignment) is specified — until the minimum width is reached. If Width is prefixed with 0, zeros are added until the Width minimum width is reached (not useful for left-aligned numbers). The Width specification never causes a value to be truncated. If the number of characters in the output value is greater than the specified width, or if Width is not given, all characters of the value are printed (subject to the Precision specification). Specifies a nonnegative decimal integer, preceded by a period (.), which specifies the number of characters to be printed, the number of decimal places, or the number of significant digits. Unlike the Width specification, the precision specification can cause truncation of the output value. If Precision is specified as 0 and the value to be converted is 0, the result is no characters output. c Precision has no effect Precision Precision specifies the minimum number of digits to be output. If the number of d,i,u,o, digits is less than Precision, the output is padded on the left with zeroes. The x,X value is not truncated when the number of digits exceeds Precision Precision specifies the maximum number of characters to be output. Characters s in excess of Precision are not output Returns next available serial character or -1 if none available if expression is zero else waits for and returns next character Returns a string hex representation of expression optionally constrained to digits length Returns the numeric value of the string hex expression Returns string variable with string variable2 inserted at zero based start character position Returns leftmost length characters of string variable argument Returns length of string variable argument Returns length number of characters of string variable from zero based start character position Returns a 32 bit result of ((number * multiplier) / divisor) where number, multiplier and divisor are 64-bit internally Returns a 32 bit result of ((number * multiplier) % divisor) where number, multiplier and divisor are 64-bit internally Returns rightmost length characters of string variable argument Returns string variable overwritten with string variable2 at zero based start character position Returns a pseudo random number from 0 to value of expression – 1 Returns an integer scaled sine value of the degree expression where -1024 ≤ SIN( ) ≤ 1024 Returns a string representation of numeric expression Initiates an outgoing synchronous network socket connection as file #N on ip address / port number where execution is controlled by the connect( ), send( ) and recv( ) functions Copyright©1998-2015 by ACS, Sarasota, Florida 11 of 13 ALL RIGHTS RESERVED SOCKET.SYNC.LISTEN(#N, “:port”, connect( ), recv( ), send( )) UBOUND(dimVar{[dimNumber]} VAL(expr$) Initiates an incoming synchronous network socket reception as file #N on ip port number where execution is controlled by the connect( ), recv( ) and send( ) functions Returns the size of dimVar dimension zero as declared in the DIM statement optionally other dimensions. Returns numeric value of string expression representation of a number Errors Error # 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 – 57 58 57 - 32767 Error Message "Syntax error in line dd" "Illegal program command error in line dd" "Illegal direct command error in line dd" "Line number error in line dd" "Wrong expression type error in line dd" "Divide by zero error in line dd" "Nesting error in line dd " "File not open error in line dd " "File already open error in line dd " “File # Out of Range error in line dd “ "Input error in line dd " "Dimension error in line dd " “Index Out of Range error in line dd “ "Data error in line dd " "Out of memory error in line dd " "No File System error in line dd " “Unknown @var error in line dd “ "Timer # out of range error in line dd " "Port # out of range error in line dd " "Contact # out of range error in line dd " "Stack Overflow error in line dd " "No CF card error in line dd " "Invalid .WAV file error in line dd " “LCDx arguments Out of Range” “FWRITE record # Out of Range” “FWRITE exceeds record length error” “FINSERT record # Out of Range” “FINSERT exceeds record length error” “FDELETE past end of file error” “Can’t delete file” “Can’t make directory” “Can’t rename file” “No DMX module error in line dd” “DMX Channel # Out of Range error in line dd” “DMX Analog # Out of Range error in line dd” “DMX Analog # Read Only error in line dd” “Unknown command” “Can’t use @VAR in line dd” “Mis-matched quotes in line dd” “Resource already exists” “Font # out of range” “.fonts file invalid” “Scheme # out of range” “.schemes file invalid” “Obj # out of range” “Screen # out of range” “.screens file invalid” “Config # out of range” “Config Item < min or > max” “DRAW.POLYGON” “SD Card” “File System” “Read Only” “Option # Out of Range” “Data # Out of Range” ACS Internal Usage “SMTP Connection Failed” “x error in line dd” Copyright©1998-2015 by ACS, Sarasota, Florida Causes Incorrect statement format Direct mode only statement in program mode Program mode only statement in direct mode Target line number not in program Numeric value when String expected or vice versa Division by zero NEXT without preceding FOR, RETURN without preceding GOSUB CLOSE#, LIST#, PRINT# or INPUT# without successful OPEN statement OPEN# on already open file #N argument not 0 <= #N <= 9 Numeric value expected in INPUT # statement Subscript on non-dimensioned variable Subscript out of range ORDER line # not DATA statement, READ past DATA statements Insufficient memory ACS Basic running without CF card Unknown special variable @TIMER(x) subscript out of range 0 - 9 @PORT(x) subscript out of range 0 - 255 @CONTACT(x), @CLOSURE(x), @OPENING(x) subscript out of range Too many nested FOR and/or GOSUB and/or events Statement requiring Compact Flash card with no card detected .WAV file format not 44.1KHz 16-bit mono or stereo One or more argument to a LCDx statement are out of range FWRITE record number out of range FWRITE record length exceeds FOPEN record length FINSERT record number out of range FINSERT record length exceeds FOPEN record length FDELETE record number past the current end of file Error deleting file Error creating directory Error renaming file @DMX--- specialvar access attempted with no DMX I/O module present @DMXDATA(x) access where x >= 511 @DMXANALOG(x) access where x >= 7 Attempt to set @DMXANALOG(x) Unknown command Illegal use of specialvar in FOR, DIM, INPUT, READ, FREAD or FINPUT statement Missing one of a pair of double quotes delimiting a string Attempt to write to a CONST variable ERROR x statement 12 of 13 ALL RIGHTS RESERVED Please Read Carefully: Information in this document is provided solely in conjunction with ACS products. ACS reserves the right to make changes, corrections, modifications or improvements, to this document, and the products and services described herein at any time without notice. All ACS products are sold pursuant to ACS’ terms and conditions of sale. Purchasers are solely responsible for the choice, selection and use of the ACS products and services described herein, and ACS assumes no liability whatsoever relating to the choice, selection or use of the ACS products and services described herein. No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. If any part of this document refers to any third party products or services it shall not be deemed a license or grant by ACS for the use of such third party products and services, or any intellectual property contained therein or considered a warranty covering the use in any manner whatsoever of such third party products or services or any intellectual property contained therein. UNLESS OTHERWISE SET FORTH IN ACS’ TERMS AND CONDITIONS OF SALE ACS DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY WITH RESPECT TO THE USE AND/OR SALE OF ACS PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE (AND THEIR EQUIVALENTS UNDER THE LAWS OF ANY JURISDICTION), OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT. ACS PRODUCTS ARE NOT AUTHORIZED FOR USE IN WEAPONS. NOR ARE ACS PRODUCTS DESIGNED OR AUTHORIZED FOR USE IN: (A) SAFETY CRITICAL APPLICATIONS SUCH AS LIFE SUPPORTING OR SYSTEMS WITH PRODUCT FUNCTIONAL SAFETY REQUIREMENTS; (B) AERONAUTICAL APPLICATIONS; (C) AUTOMOTIVE APPLICATIONS OR ENVIRONMENTS, AND/OR (D) AEROSPACE APPLICATIONS. THE PURCHASER SHALL USE PRODUCTS AT PURCHASER’S SOLE RISK, EVEN IF ACS HAS BEEN INFORMED IN WRITING OF SUCH USAGE. Resale of ACS products with provisions different from the statements and/or technical features set forth in this document shall immediately void any warranty granted by ACS for the ACS product or service described herein and shall not create or extend in any manner whatsoever, any liability of ACS. ACS and the ACS logo are trademarks of ACS. Information in this document supersedes and replaces all information previously supplied. ©2015 ACS – All rights reserved www.acscontrol.com Copyright©1998-2015 by ACS, Sarasota, Florida 13 of 13 ALL RIGHTS RESERVED