EasyManua.ls Logo

Eletech EM38A - Serial Command Reference Guide; Playback and Loop Control Commands; Script Execution and Relay Control Commands

Default Icon
8 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...
EM38A / EM38A-R / EM38A-X User’s Manual Page 6 of 8
Serial Commands
The communication protocol uses software handshake on a per-
byte basis. That is, for every byte it receives, the system sends an
confirmation byte to the DTE. The DTE must not send the next byte
until it receives the confirmation byte.
Play File
DTE Sends: F### (### is the three-digit file number)
System Confirms: f### (### is the same file number as above)
If the file exists, it will be played once. If the file does not exist, the
system will simply ignore the command.
If the system is playing/paused when the ‘F’ letter is received, it will
return the error code ‘e’ instead of ‘f’. At this point the command
should be aborted. You should use the Stop Playback command to
stop the currrent playback first before starting a new one.
Loop File
DTE Sends: L### (### is the three-digit file number)
System Confirms: l### (### is the same file number as above)
If the file exists, it will be played repeatedly. If the file does not exist,
the system will simply ignore the command.
If the system is playing/paused when the ‘L’ letter is received, it will
return the error code ‘e’ instead of ‘l’ (lower case L). At this point
the command should be aborted. You should use the Stop Play-
back command to stop the currrent playback first before starting a
new one.
Stop Playback
DTE Sends: S
System Confirms: s
If the system is not playing/paused, it will simply ignore the com-
mand. Otherwise it will terminate the current playback.
Pause Playback
DTE Sends: P
System Confirms: p
If the system is not playing, it will simply ignore the command.
When the system is being paused, its Busy output (terminal BY) is
still active.
Resume Playback
DTE Sends: R
System Confirms: r
If the system is not paused, it will simply ignore the command.
Busy?
DTE Sends: B
System Confirms: b (if playing/paused) or s (otherwise)
Query Parallel Input Status
DTE Sends: Q
System Confirms: one status byte read from the parallel input
This command is usually used when the parallel inputs are con-
nected to switches, sensors and/or other similar devices, and you
want to know the on/off status of these devices. Note that, although
the status of these devices can be read, they cannot be used to
trigger the audio because the Parallel Interface is disabled when
the Serial Port is enabled.
The status byte has T1 as the LSB and T8 as the MSB. Note that
an input is at logic “1” when connected to +5V or left unconnected,
and it is at logic “0” when connected to 0V (the ground).
This command can be issued at any time.
Script Command
DTE Sends: C###C (### is one line of script commands)
System Confirms: c###c (### is an echo of the script line)
For example, if you send “CF001W00020F002C” then the system
would confirm with “cf001w00020f002c” as the characters are be-
ing received. Upon receipt of the second ‘C’, the system would
execute this script line as described below: play file 001 (F001),
wait 2 seconds (W00020), play file 002 (F002).
Refer to the ‘Script Playback Mode’ section for details on how to
write the script.
Relay On (EM38A-R & EM38A-X only)
DTE Sends: XN# (# is the relay number)
System Confirms: xn# (# is the same relay number as above)
For example, “XN3” turns on relay #3. To turn on all relays, use
“XNN”. This command can be issued at any time.
Relay Off (EM38A-R & EM38A-X only)
DTE Sends: XF# (# is the relay number)
System Confirms: xf# (# is the same relay number as above)
For example, “XF2” turns off relay #2. To turn off all relays, use
“XFF”. This command can be issued at any time.
Send Binary to Relay (EM38A-R & EM38A-X only)
DTE Sends: Xnnn (nnn is a 3-digit number with leading zeros)
System Confirms: xnnn (nnn is the same number as above)
For example, “X005” turns on relay #1 and #3 and turns off all
others because the binary code for 005 is 00000101.
Serial Command Error Code
The system will confirm with an “e” if an invalid command is re-
ceived, or if a valid command is received at the wrong time. At this
point, the command should be aborted.
Trouble Shooting Guide
1. The DTE device receives strange characters.
Make sure the DTE device’s serial port setting is 9600 baud, 8
data bits, no parity, 1 stop bit.