Eletech DM2218C User Manual Download Page 3

DM2218C / EM2218C  User’s Manual  -  Page 3 of 8

Script Playback Mode

Instead of playing just a single file, Script Playback mode executes
a script of commands for each trigger.

Written in the configuration file using plain ASCII text, the script
consists of multiple lines each containing the commands for a par-
ticular trigger in the following format:

?nnn=Command1,Command2...

Here “nnn” is the trigger number and “?” is one of the following:

N - Non-interruptible

Execution of this trigger is not interruptible.

I - Interruptible

Execution of this trigger can be interrupted by any trigger including
itself.

H - Holdable

Execution of this trigger continues for as long as the trigger is
present, repeating itself if necessary. The execution stops immedi-
ately when the trigger is no longer present.

In the DS and RS modes, there are 8 direct triggers (001 ~ 008,
corresponding to T1 ~ T8). In the BS mode, there are 128 direct
triggers (001 ~ 128, corresponding to the binary code on T1 ~ T7).

In addition to the direct triggers, there are also indirect triggers. An
indirect trigger can be activated only by jumping from another trig-
ger using the Jump command.

In the DS and RS modes, there are 991 indirect triggers (009 ~
999). In the BS mode, there are 871 indirect triggers (129 ~ 999).

These are the script commands:

Fnnn - play File #nnn

Example: F168 plays file #168.

Wnnnnn - wait nnnnn units of 0.1 second

Example: W00020 waits 2 seconds.

Jnnn - jump to trigger #nnn

Example: J007 jumps to trigger 007.

BF - turn off the Busy output

The Busy output is always turned off at the end of the script. Use
this command to turn it off before the end of the script.

BN - turn on the Busy output

The Busy output is always turned on at the beginning of the script.
Use this command to turn it on if it has been turned off previously
by the BF command.

END

Always add the word END at the end of the entire script. You may
add any comments for your own reference after END.

Important Notes

- Script lines must be separated by carriage returns (the Enter key).
- A script line is limited to 128 characters, excluding ‘=’ and ‘,’. If
  more space is needed, use the Jump command.

Automatic Execution of Script 000

Upon powerup or reset, the system will automatically executes script
000 once if it exists.

Script Examples

DS
N001=F007,BF,W00030,BN,F899,J168
I168=F001,W36000,J168
H033=F273
END

DS is not really a script command, but it tells the system to enter the
Direct Script mode. You can also use RS or BS to enter the Round-
Robin Script mode or the Binary Script mode.

When the T1 input is triggered, the system start executing trigger
N001. Since this trigger is non-interruptible, it will always executes
to the end. Trigger N001 is executed as the following:

- play file #007,
- turn off the Busy output,
- wait 3 seconds,
- turn on the Busy output,
- play file #899,
- jump to trigger 168 (I168).

Trigger  I168 is executed as the following:

- play file #001,
- wait 60 minutes,
- jump back to itself.

Since trigger I168 is interruptible, this endless loop can be broken
by any future trigger.

Trigger H033 will never be executed because it is an indirect trig-
ger in the DS mode, yet it is not jumped to by any other trigger.

Background Music Example

The automatic execution feature can be used to play background
music while no trigger is being executed. For example,

DS
I000=F123,J000
N001=F001,J000
N002=F002,J000
N003=F003,J000
END

Here file #123 will be looped since power-up but can be interrupted
by trigger inputs T1, T2, and T3. After interruption, it always jumps
back to trigger 000 so file #123 starts to loop again, although from
the beginning instead of where it left off.

Summary of Contents for DM2218C

Page 1: ...t to accept a 9 12 VDC supply voltage with jumper J3 at the 12V position If the supply voltage is 6 VDC move jumper J3 to the 6V position Speaker Output Terminals S1 S2 This is a 1 watt bridged balanc...

Page 2: ...because File 003 is missing The Sequential Trigger is prioritized from T1 the highest to T8 the lowest However it does not mean a higher priority input can interrupt a lower one It only means that if...

Page 3: ...ng of the script Use this command to turn it on if it has been turned off previously by the BF command END Always add the word END at the end of the entire script You may add any comments for your own...

Page 4: ...using a Windows utility pro gram called HyperTerminal HyperTerminal allows you to send and receive data through the PC s serial port All you need to do is type the letters on the keyboard to send them...

Page 5: ...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 Paus...

Page 6: ...01tiger wav Note that if you want to store the maximum number of files 512 on a single flash card you should keep the filenames including the file number within 8 characters Any filename longer than 8...

Page 7: ...ODE TXT DS N001 F001 J888 N002 F002 J888 H888 J888 END Notes The system will stay in the H888 J888 endless loop for as long as the button is held down 4 Play only when the button is held down Intended...

Page 8: ...Application Examples Using Normally Closed Switches Sensors Normally closed switches and sensors are often used in security systems 1 Play when the switch sensor opens with no priorities Intended Ope...

Reviews: