当前位置:文档之家› tcl多线程编程的使用说明

tcl多线程编程的使用说明

tcl多线程编程的使用说明
tcl多线程编程的使用说明

321C H A P T E R II. Advanced Tcl

21Multi-Threaded Tcl Scripts This chapter describes the Thread extension for creating multi-threaded Tcl

scripts.

This Chapter is from Practical Programming in Tcl and Tk, 4th Ed.

Copyright 2003 ? Brent Welch, Ken Jones

https://www.doczj.com/doc/2510315500.html,/book/

T hread support, a key feature of many

languages, is a recent addition to Tcl. That’s because the Tcl event loop supports features implemented by threads in most other languages, such as graphical user interface management, multi-client servers, asynchronous communication,and scheduling and timing operations. However, although Tcl’s event loop can replace the need for threads in many circumstances, there are still some instances where threads can be a better solution:

?Long-running calculations or other processing, which can “starve” the event

loop

?Interaction with external libraries or processes that don’t support asynchro-

nous communication

?Parallel processing that doesn’t adapt well to an event-driven model

?Embedding Tcl into an existing multi-threaded application

What are Threads?

Traditionally , processes have been limited in that they can do only one thing at a time. If your application needed to perform multiple tasks in parallel, you designed the application to create multiple processes. However, this approach has its drawbacks. One is that processes are relatively “heavy” in terms of the resources they consume and the time it takes to create them. For applications that frequently create new processes — for example, servers that create a new

322 Multi-Threaded Tcl Scripts Chap. 21 process to handle each client connection — this can lead to decreased response time. And widely parallel applications that create many processes can consume so many system resources as to slow down the entire system. Another drawback is that passing information between processes can be slow because most inter-process communication mechanisms — such as files, pipes, and sockets —involve intermediaries such as the file system or operating system, as well as requiring a context switch from one running process to another.

Threads were designed as a light-weight alternative. Threads are multiple flows of execution within the same process. All threads within a process share the same memory and other resources. As a result, creating a thread requires far fewer resources than creating a separate process. Furthermore, sharing informa-tion between threads is much faster and easier than sharing information between processes.

The operating system handles the details of thread creation and coordina-tion. On a single-processor system, the operating system allocates processor time to each of an application’s threads, so a single thread doesn’t block the rest of the application. On multi-processor systems, the operating system can even run threads on separate processors, so that threads truly can run simultaneously.

The drawback to traditional multi-threaded programming is that it can be difficult to design a thread-safe application — that is, an application in which one thread doesn’t corrupt the resources being used by another thread. Because all resources are shared in a multi-threaded application, you need to use various locking and scheduling mechanisms to guard against multiple threads modifying resources concurrently.

Thread Support in Tcl

Tcl added support for multi-threaded programming in version 8.1. The Tcl core was made thread-safe. Furthermore, new C functions exposed “platform-neutral”thread functionality. However, no official support was provided for multi-threaded scripting. Since then, the Thread extension — originally written by Brent Welch and currently maintained by Zoran Vasiljevic — has become the accepted mechanism for creating multi-threaded Tcl scripts. The most recent version of the Thread extension as this was being written was 2.5. In general, this version requires Tcl 8.3 or later, and several of the commands provided require Tcl 8.4 or later.

At the C programming level, Tcl’s threading model requires that a Tcl interpreter be managed by only one thread. However, each thread can create as many Tcl interpreters as needed running under its control. As is the case in even a single-threaded application, each Tcl interpreter has its own set of variables and procedures. A thread can execute commands in another thread’s Tcl inter-preter only by sending special messages to that interpreter’s event queue. Those messages are handled in the order received along with all other types of events.

Thread Support in Tcl 323

II. Advanced Tcl Obtaining a Thread-Enabled Tcl Interpreter

Most binary distributions of Tcl are not thread-enabled, because the default options for building the Tcl interpreters and libraries do not enable thread sup-port. Thread safety adds overhead, slowing down single-threaded Tcl applica-tions, which constitute the vast majority of Tcl applications. Also, many Tcl extensions aren’t thread safe, and naively trying to use them in a multi-threaded application can cause errors or crashes.

Unless you can obtain a thread-enabled binary distribution of Tcl, you must compile your own from the Tcl source distribution. This requires running the configure command with the --enable-threads option during the build pro-cess. (See Chapter 48, “Compiling Tcl and Extensions” for more information.)

You can test whether a particular Tcl interpreter is thread-enabled by checking for the existence of the tcl_platform(threaded) element. This ele-ment exists and contains a Boolean true value in thread-enabled interpreters,whereas it doesn't exist in interpreters without thread support.

Using Extensions in Multi-Threaded Scripts

Because each interpreter has its own set of variables and procedures, you must explicitly load an extension into each thread that wants to use it. Only the Thread extension itself is automatically loaded into each interpreter.

You must be careful when using extensions in multi-threaded scripts. Many Tcl extensions aren’t thread-safe. Attempting to use them in multi-threaded scripts often results in crashes or corrupted data.

Tcl-only extensions are generally thread-safe. Of course, they must make no use of other commands or extensions that aren’t thread-safe. But otherwise,multi-threaded operation doesn’t add any new issues that don't already affect single-threaded scripts.

You should always assume that a binary extension is not thread-safe unless its documentation explicitly says that it is. And even thread-safe binary exten-sions must be compiled with thread support enabled for you to use them in multi-threaded applications. (The default compilation options for most binary extensions don’t include thread support.)

Tk isn’t truly thread-safe.

Most underlying display libraries (such as X Windows) aren’t thread safe —or at least aren’t typically compiled with thread-safety enabled. However, signif-icant work has gone into making the Tk core thread-safe. The result is that you can safely use Tk in a multi-threaded Tcl application as long as only one thread uses Tk commands to manage the interface. Any other thread that needs to update the interface should send messages to the thread controlling the inter-face.

324 Multi-Threaded Tcl Scripts Chap. 21 Getting Started with the Thread Extension

You start a thread-enabled tclsh or wish the same as you would a non-threaded tclsh or wish. When started, there is only one thread executing, often referred to as the main thread, which contains a single Tcl interpreter. If you don’t create any more threads, your application runs like any other single-threaded applica-tion.

Make sure that the main thread is the last one to terminate.

The main thread has a unique position in a multi-threaded Tcl script. If it exits, then the entire application terminates. Also, if the main thread terminates while other threads still exist, Tcl can sometimes crash rather than exiting cleanly. Therefore, you should always design your multi-threaded applications so that your main thread waits for all other threads to terminate before it exits.

Before accessing any threading features from your application, you must load the Thread extension:

package require Thread

The Thread extension automatically loads itself into any new threads your application creates with thread::create. All other extensions must be loaded explicitly into each thread that needs to use them. The Thread extension creates commands in three separate namespaces:

?The thread namespace contains all of the commands for creating and man-aging threads, including inter-thread messaging, mutexes, and condition variables.

?The tsv namespace contains all of the commands for creating and managing thread shared variables.

?The tpool namespace contains all of the commands for creating and manag-ing thread pools.

Creating Threads

The thread::create command creates a new thread containing a new Tcl interpreter. Any thread can create another thread at will; you aren’t limited to starting threads from only the main thread. The thread::create command returns immediately, and its return value is the ID of the thread created. The ID is a unique token that you use to interact with and manipulate the thread, in much the same way as you use a channel identifier returned by open to interact with and manipulate that channel. There are several commands available for introspection on thread IDs: thread::id returns the ID of the current thread; thread::names returns a list of threads currently in existence; and thread::exists tests for the existence of a given thread.

The thread::create command accepts a Tcl script as an argument. If you provide a script, the interpreter in the newly created thread executes it and then terminates the thread. Example 21–1 demonstrates this by creating a thread to perform a recursive search for files in a directory. For a large directory structure,

Getting Started with the Thread Extension 325II. Advanced Tcl this could take considerable time. By performing the search in a separate thread,the main thread is free to perform other operations in parallel. Also note how the “worker” thread loads an extension and opens a file, completely independent of any extensions loaded or files opened in other threads.

Example 21–1Creating a separate thread to perform a lengthy operation.

package require Thread

# Create a separate thread to search the current directory # and all its subdirectories, recursively, for all files # ending in the extension ".tcl". Store the results in the # file "files.txt".

thread::create {# Load the Tcllib fileutil package to use its # findByPattern procedure.

package require fileutil

set files [fileutil::findByPattern [pwd] *.tcl]

set fid [open files.txt w]puts $fid [join $files \n]

close $fid }# The main thread can perform other tasks in parallel...

If you don’t provide a script argument to thread::create , the thread’s interpreter enters its event loop. You then can use the thread::send command,described on page 328, to send it scripts to evaluate. Often though, you’d like to perform some initialization of the thread before having it enter its event loop. To do so, use the thread::wait command to explicitly enter the event loop after per-forming any desired initialization, as shown in Example 21–2. You should always use thread::wait to cause a thread to enter its event loop, rather than vwait or tkwait , for reasons discussed in “Preserving and Releasing Threads” on page 330.

Example 21–2Initializing a thread before entering its event loop.

set httpThread [thread::create {package require http thread::wait

}]After creating a thread, never assume that it has started executing.

There is a distinction between creating a thread and starting execution of a thread. When you create a thread, the operating system allocates resources for

326 Multi-Threaded Tcl Scripts Chap. 21 the thread and prepares it to run. But after creation, the thread might not start execution immediately. It all depends on when the operating system allocates execution time to the thread. Be aware that the thread::create command returns when the thread is created, not necessarily when it has started. If your application has any inter-thread timing dependencies, always use one of the thread synchronization techniques discussed in this chapter.

Creating Joinable Threads

Remember that the main thread must be the last to terminate. Therefore you often need some mechanism for determining when it’s safe for the main thread to exit. Example 21–3 shows one possible approach: periodically checking thread::names to see if the main thread is the only remaining thread.

Example 21–3Creating several threads in an application.

package require Thread

puts "*** I'm thread [thread::id]"

# Create 3 threads

for {set thread 1} {$thread <= 3} {incr thread} {

set id [thread::create {

# Print a hello message 3 times, waiting

# a random amount of time between messages

for {set i 1} {$i <= 3} {incr i} {

after [expr { int(500*rand()) }]

puts "Thread [thread::id] says hello"

}

}] ;# thread::create

puts "*** Started thread $id"

} ;# for

puts "*** Existing threads: [thread::names]"

# Wait until all other threads are finished

while {[llength [thread::names]] > 1} {

after 500

}

puts "*** That's all, folks!"

A better approach in this situation is to use joinable threads, which are supported in Tcl 8.4 or later. A joinable thread allows another thread to wait upon its termination with the thread::join command. You can use

Getting Started with the Thread Extension 327II. Advanced Tcl

thread::join only with joinable threads, which are created by including the thread::create -joinable option. Attempting to join a thread not created with -joinable results in an error. Failing to join a joinable thread causes memory and other resource leaks in your application. Example 21–4 revises the program from Example 21–3 to use joinable threads.

Example 21–4Using joinable threads to detect thread termination.

package require Thread

puts "*** I'm thread [thread::id]"

# Create 3 threads

for {set thread 1} {$thread <= 3} {incr thread} {set id [thread::create -joinable {# Print a hello message 3 times, waiting # a random amount of time between messages

for {set i 1} {$i <= 3} {incr i} {after [expr { int(500*rand()) }]

puts "Thread [thread::id] says hello"

}}] ;# thread::create

puts "*** Started thread $id"

lappend threadIds $id

} ;# for

puts "*** Existing threads: [thread::names]"

# Wait until all other threads are finished

foreach id $threadIds {thread::join $id }

puts "*** That's all, folks!"

The thread::join command blocks.

Be aware that thread::join blocks. While the thread is waiting for thread::join to return, it can’t perform any other operations, including servic-ing its event loop. Therefore, make sure that you don’t use thread::join in situ-ations where a thread must be responsive to incoming events.

328 Multi-Threaded Tcl Scripts Chap. 21 Sending Messages to Threads

The thread::send command sends a script to another thread to execute. The target thread’s main interpreter receives the script as a special type of event added to the end of its event queue. A thread evaluates its messages in the order received along with all other types of events. Obviously, a thread must be in its event loop for it to detect and respond to messages. As discussed on page 324, a thread enters its event loop if you don’t provide a script argument to thread::create, or if you include the thread::wait command in the thread’s initialization script.

Synchronous Message Sending

By default, thread::send blocks until the target thread finishes executing the script. The return value of thread::send is the return value of the last com-mand executed in the script. If an error occurs while evaluating the script, the error condition is “reflected” into the sending thread; thread::send generates the same error code, and the target thread’s stack trace is included in the value of the errorInfo variable of the sending thread:

Example 21–5Examples of synchronous message sending.

set t [thread::create];# Create a thread

=> 1572

set myX 42;# Create a variable in the main thread

=> 42

# Copy the value to a variable in the worker thread

thread::send $t [list set yourX $myX]

=> 42

# Perform a calculation in the worker thread

thread::send $t {expr { $yourX / 2 } }

=> 21

thread::send $t {expr { $yourX / 0 } }

=> divide by zero

catch {thread::send $t {expr { $yourX / 0 } } } ret

=> 1

puts $ret

=> divide by zero

puts $errorInfo

=> divide by zero

while executing

"expr { $yourX / 0 } "

invoked from within

"thread::send $t {expr { $yourX / 0 } } "

If you also provide the name of a variable to a synchronous thread::send, then it behaves analogously to a catch command; thread::send returns the return code of the script, and the return value of the last command executed in

Sending Messages to Threads 329II. Advanced Tcl

the script — or the error message — is stored in the variable. Tcl stores the tar-get thread’s stack trace in the sending thread’s errorInfo variable.

Example 21–6Using a return variable with synchronous message sending.

thread::send $t {incr yourX 2} myY => 0puts $myY => 44thread::send $t {expr { acos($yourX) } } ret => 1puts $ret => domain error: argument not in valid range puts $errorInfo => domain error: argument not in valid range while executing

"expr { acos($yourX) } "While the sending thread is waiting for a synchronous thread::send to return, it can’t perform any other operations, including servicing its event loop.Therefore, synchronous sending is appropriate only in cases where:

?you want a simple way of getting a value back from another thread;

?you don’t mind blocking your thread if the other thread takes a while to

respond; or

?you need a response from the other thread before proceeding.

Watch out for deadlock conditions with synchronous message sending.

If Thread A performs a synchronous thread::send to Thread B, and while evaluating the script Thread B performs a synchronous thread::send to Thread A, then your application is deadlocked. Because Thread A is blocked in its thread::send , it is not servicing its event loop, and so can’t detect Thread B’s message.

This situation arises most often when the script you send calls procedures in the target thread, and those procedures contain thread::send commands.Under these circumstances, it might not be obvious that the script sent will trig-ger a deadlock condition. For this reason, you should be cautious about using synchronous thread::send commands for complex actions. Sending in asynchro-nous mode, described in the next section, avoids potential deadlock situations like this.

Asynchronous Message Sending

With the -async option, thread::send sends the script to the target thread in asynchronous mode. In this case, thread::send returns immediately .

By default, an asynchronous thread::send discards any return value of the script. However, if you provide the name of a variable as an additional argument to thread::send , the return value of the last command executed in the script is

330 Multi-Threaded Tcl Scripts Chap. 21 stored as the value of the variable. You can then either vwait on the variable or create a write trace on the variable to detect when the target thread responds. For example:

thread::send -async $t [list ProcessValues $vals] result

vwait result

In this example, the thread::send command returns immediately; the sending thread could then continue with any other operations it needed to per-form. In this case, it executes a vwait on the return variable to wait until the tar-get thread finishes executing the script. However, while waiting for the response, it can detect and process incoming events. In contrast, the following synchronous thread::send blocks, preventing the sending thread from processing events until it receives a response from the target thread:

thread::send $t [list ProcessValues $vals] result Preserving and Releasing Threads

A thread created with a script not containing a thread::wait command termi-nates as soon as the script finishes executing. But if a thread enters its event loop, it continues to run until its event loop terminates. So how do you terminate a thread’s event loop?

Each thread maintains an internal reference count. The reference count is set initially to 0, or to 1 if you create the thread with the thread::create -pre-served option. Any thread can increment the reference count afterwards by exe-cuting thread::preserve, and decrement the reference count by executing thread::release. These commands affect the reference count of the current thread unless you specify the ID of another thread. If a call to thread::release results in a reference count of 0 or less, the thread is marked for termination.

The use of thread reference counts allows multiple threads to preserve the existence of a worker thread until all of the threads release the worker thread. But the majority of multi-threaded Tcl applications don’t require that degree of thread management. In most cases, you can simply create a thread and then later use thread::release to terminate it:

set worker [thread::create]

thread::send -async $worker $script

# Later in the program, terminate the worker thread

thread::release $worker

A thread marked for termination accepts no further messages and discards any pending events. It finishes processing any message it might be executing currently, then exits its event loop. If the thread entered its event loop through a call to thread::wait, any other commands following thread::wait are executed before thread termination, as shown in Example 21–7. This can be useful for per-forming “clean up” tasks before terminating a thread.

Error Handling 331II. Advanced Tcl

Example 21–7Executing commands after thread::wait returns.

set t [thread::create {puts "Starting worker thread"thread::wait # This is executed after the thread is released

puts "Exiting worker thread"

}]Note that if a thread is executing a message script when thread::release is called (either by itself or another thread), the thread finishes executing its message script before terminating. So, if a thread is stuck in an endless loop,calling thread::release has no effect on the thread. In fact, there is no way to kill such a “runaway thread.”

Always use thread::wait to enter a thread’s event loop.This system for preserving and releasing threads works only if you use the thread::wait command to enter the thread’s event loop (or if you did not provide a creation script when creating the thread). If you use vwait or tkwait to enter the event loop, thread::release cannot terminate the thread.

Error Handling

If an error occurs while a thread is executing its creation script (provided by thread::create ), the thread dies. In contrast, if an error occurs while processing a message script (provided by thread::send ), the default behavior is for the thread to stop execution of the message script, but to return to its event loop and continue running. To cause a thread to die when it encounters an uncaught error, use the thread::configure command to set the thread’s -unwindonerror option to true:

thread::configure $t -unwindonerror 1

Error handling is determined by the thread creating the thread or sending the message. If an error occurs in a script sent by a synchronous thread::send ,then the error condition is “reflected” to the sending thread, as described in “Syn-chronous Message Sending” on page 328. If an error occurs during thread cre-ation or an asynchronous thread::send , the default behavior is for Tcl to send a stack trace to the standard error channel. Alternatively , you can specify the name of your own custom error handling procedure with thread::errorproc . Tcl automatically calls your procedure whenever an “asynchronous” error occurs,passing it two arguments: the ID of the thread generating the error, and the stack trace. (This is similar to defining your own bgerror procedure, as described in “The bgerror Command” on page 202.) For example, the following code logs all uncaught errors to the file errors.txt :

332 Multi-Threaded Tcl Scripts Chap. 21 Example 21–8Creating a custom thread error handler.

set errorFile [open errors.txt a]

proc logError {id error} {

global errorFile

puts $errorFile "Error in thread $id"

puts $errorFile $error

puts $errorFile ""

}

thread::errorproc logError

Shared Resources

The present working directory is a resource shared by all interpreters in all threads. If one thread changes the present working directory, then that change affects all interpreters and all threads. This can pose a significant problem, as some library routines temporarily change the present working directory during execution, and then restore it before returning. But in a multi-threaded applica-tion, another thread could attempt to access the present working directory dur-ing this period and get incorrect results. Therefore, the safest approach if your application needs to access the present working directory is to store this value in a global or thread-shared variable before creating any other threads. The follow-ing example uses tsv::set to store the current directory in the pwd element of the application shared variable:

package require Thread

# Save the pwd in a thread-shared variable

tsv::set application pwd [pwd]

set t [thread::create {#...}]

Environment variables are another shared resource. If one thread makes a change to an environment variable, then that change affects all threads in your application. This might make it tempting to use the global env array as a method for sharing information between threads. However, you should not do so, because it is far less efficient than thread-shared variables, and there are subtle differ-ences in the way environment variables are handled on different platforms. If you need to share information between threads, you should instead use thread-shared variables, as discussed in “Shared Variables” on page 337.

The exit command kills the entire application.

Although technically not a shared resource, it’s important to recognize that the exit command kills the entire application, no matter which thread executes it. Therefore, you should never call exit from a thread when your intention is to terminate only that thread.

Managing I/O Channels 333II. Advanced Tcl

Managing I/O Channels

Channels are shared resources in most programming languages. But in Tcl,channels are implemented as a per-interpreter resource. Only the standard I/O channels (stdin , stdout , and stderr ) are shared.

Be careful with standard I/O channel on Windows and Macintosh.

When running wish on Windows and Macintosh prior to OS X, you don’t have real standard I/O channels, but simulated stdout and stderr channels direct output to the special console window . As of Thread 2.5, these simulated channels appear in the main thread’s channel list, but not in any other thread’s channel list. Therefore, you’ll cause an error if you attempt to access these chan-nels from any thread other than the main thread.

Accessing Files from Multiple Threads

In a multi-threaded application, avoid having the same file open in multiple threads. Having the same file open for read access in multiple threads is safe,but it is more efficient to have only one thread read the file and then share the information with other threads as needed. Opening the same file in multiple threads for write or append access is likely to fail. Operating systems typically buffer information written to a disk on a per-channel basis. With multiple chan-nels open to the same file, it’s likely that one thread will end up overwriting data written by another thread. If you need multiple threads to have write access to a single file, it’s far safer to have one thread responsible for all file access, and let other threads send messages to the thread to write the data. Example 21–9shows the skeleton implementation of a logging thread. Once the log file is open,other threads can call the logger’s AddLog procedure to write to the log file.

Example 21–9A basic implementation of a logging thread.

set logger [thread::create {proc OpenLog {file} {global fid set fid [open $file a]}proc CloseLog {} {global fid

close $fid

}proc AddLog {msg} {global fid puts $fid $msg }thread::wait }]

334 Multi-Threaded Tcl Scripts Chap. 21 Transferring Channels between Threads

As long as you’re working with Tcl 8.4 or later, the Thread extension gives

you the ability to transfer a channel from one thread to another with the thread::transfer command. After the transfer, the initial thread has no fur-ther access to the channel. The symbolic channel ID remains the same in the tar-

get thread, but you need some method of informing the target thread of the ID,

such as a thread-shared variable. The thread::transfer command blocks until

the target thread has incorporated the channel. The following shows an example

of transferring a channel, and simply duplicating the value of the channel ID in

the target thread rather than using a thread-shared variable:

set fid [open myfile.txt r]

# ...

set t [thread::create]

thread::transfer $t $fid

# Duplicate the channel ID in the target thread

thread::send $t [list set fid $fid]

Another option for transferring channels introduced in Thread 2.5 is thread::detach, which detaches a channel from a thread, and thread::attach, which attaches a previously detached channel to a thread. The advantage to this approach is that the thread relinquishing the channel doesn’t need to know which thread will be acquiring it. This is useful when your application uses thread pools, which are described on page 342.

The ability to transfer channels between threads is a key feature in imple-

menting a multi-thread server, in which a separate thread is created to service

each client connected. One thread services the listening socket. When it receives

a client connection, it creates a new thread to service the client, then transfers

the client’s communication socket to that thread.

Transferring socket channels requires special handling.

A complication arises in that you can’t perform the transfer of the commu-

nication socket directly from the connection handler, like this:

socket -server ClientConnect 9001

proc ClientConnect {sock host port} {

set t [thread::create { ... }]

# The following command fails

thread::transfer $t $sock

}

The reason is that Tcl maintains an internal reference to the communica-

tion socket during the connection callback. The thread::transfer command

(and the thread::detach command) cannot transfer the channel while this addi-

tional reference is in place. Therefore, we must use the after command to defer

the transfer until after the connection callback returns, as shown in Example

21–10.

Managing I/O Channels 335II. Advanced Tcl

Example 21–10Deferring socket transfer until after the connection callback.

proc _ClientConnect {sock host port} {

after 0 [list ClientConnect $sock $host $port]

}proc ClientConnect {sock host port} {# Create the client thread and transfer the channel }

One issue in early versions of Tcl 8.4 was a bug that failed to initialize Tcl’s socket support when a socket channel was transferred into a thread. The work-around for this bug is to explicitly create a socket in the thread (which can then be immediately closed) to initialize the socket support, and then transfer the desired socket. This bug has been fixed, but Example 21–11 illustrates how you can perform extra initialization in a newly created thread before it enters its event loop:

Example 21–11Working around Tcl’s socket transfer bug by initializing socket support.

set t [thread::create {# Initialize socket support by opening and closing # a server socket.

close [socket -server {} 0]

# Now sockets can be transferred safely into this thread.thread::wait }]

Example 21–12 integrates all of these techniques to create a simple multi-threaded echo server. Note that the server still uses event-driven interaction in each client thread. Technically , this isn’t necessary for such a simple server,because once a client thread starts it doesn’t expect to receive messages from any other thread. If a thread needs to respond to messages from other threads, it must be in its event loop to detect and service such messages. Because this requirement is common, this application demonstrates the event-driven approach.

Example 21–12A multi-threaded echo server.

package require Tcl 8.4package require Thread 2.5

if {$argc > 0} {set port [lindex $argv 0]} else {set port 9001}

336 Multi-Threaded Tcl Scripts Chap. 21 socket -server _ClientConnect $port

proc _ClientConnect {sock host port} {

# Tcl holds a reference to the client socket during

# this callback, so we can't transfer the channel to our

# worker thread immediately. Instead, we'll schedule an

# after event to create the worker thread and transfer

# the channel once we've re-entered the event loop.

after 0 [list ClientConnect $sock $host $port]

}

proc ClientConnect {sock host port} {

# Create a separate thread to manage this client. The

# thread initialization script defines all of the client

# communication procedures and puts the thread in its

# event loop.

set thread [thread::create {

proc ReadLine {sock} {

if {[catch {gets $sock line} len] || [eof $sock]} {

catch {close $sock}

thread::release

} elseif {$len >= 0} {

EchoLine $sock $line

}

}

proc EchoLine {sock line} {

if {[string equal -nocase $line quit]} {

SendMessage $sock \

"Closing connection to Echo server"

catch {close $sock}

thread::release

} else {

SendMessage $sock $line

}

}

proc SendMessage {sock msg} {

if {[catch {puts $sock $msg} error]} {

puts stderr "Error writing to socket: $error"

catch {close $sock}

thread::release

}

}

# Enter the event loop

thread::wait

}]

Shared Variables 337

II. Advanced Tcl

# Release the channel from the main thread. We use # thread::detach/thread::attach in this case to prevent # blocking thread::transfer and synchronous thread::send # commands from blocking our listening socket thread.

thread::detach $sock

# Copy the value of the socket ID into the # client's thread

thread::send -async $thread [list set sock $sock]

# Attach the communication socket to the client-servicing # thread, and finish the socket setup.

thread::send -async $thread {thread::attach $sock fconfigure $sock -buffering line -blocking 0fileevent $sock readable [list ReadLine $sock]

SendMessage $sock "Connected to Echo server"

}}

vwait forever

Shared Variables

Standard Tcl variables are a per-interpreter resource; an interpreter has no access to variables in another interpreter. For the simple exchange of informa-tion between threads, you can substitute the values of variables into a script that you send to another thread, and obtain the return value of a script evaluated by another thread. But this technique is inadequate for sharing information among multiple threads, and inefficient when transferring large amounts of informa-tion.

The Thread extension supports the creation of thread-s hared variables ,which are accessible by all threads in an application. Thread-shared variables are stored independent of any interpreter, so if the thread that originally created a shared variable terminates, the shared variable continues to exist. Shared variables are stored in collections called arrays . The term is somewhat unfortu-nate, because while shared variable arrays are similar to standard Tcl arrays,they do not use the same syntax. Your application can contain as many shared variable arrays as you like.

Because of the special nature of shared variables, you cannot use the stan-dard Tcl commands to create or manipulate shared variables, or use standard variable substitution syntax to retrieve their values. (This also means that you cannot use shared variables as a widget’s -textvariable or -listvariable ,

338 Multi-Threaded Tcl Scripts Chap. 21 with vwait or tkwait, or with variable traces.) All commands for interacting with shared variables are provided by the Thread extension in the tsv namespace. Most of the tsv commands are analogous to Tcl commands for creat-ing and manipulating standard Tcl variables. Table 21–3 on page 346 describes all of the tsv commands.

You create a shared variable with tsv::set, specifying the array name, the variable name (sometimes also referred to as the shared array element), and the value to assign to it. For example:

tsv::set application timeout 10

To retrieve the value of a shared variable, either use tsv::set without a value or call tsv::get. The two commands shown below are equivalent: tsv::set application timeout

tsv::get application timeout

All shared variable commands are guaranteed to be atomic. A thread locks the variable during the entire command. No other thread can access the variable until the command is complete; if a thread attempts to do so, it blocks until the variable is unlocked. This simplifies the use of shared variables in comparison to most other languages, which require explicit locking and unlocking of variables to prevent possible corruption from concurrent access by multiple threads.

This locking feature is particularly useful in the class of tsv commands that manipulate lists. Standard Tcl commands like linsert and lreplace take a list value as input, and then return a new list as output. Modifying the value of a list stored in a standard Tcl variable requires a sequence like this:

set states [linsert $states 1 California Nevada]

Doing the same with shared variables is problematic:

tsv::set common cities \

[linsert [tsv::get common cities] 1 Yreka Winnemucca] After reading the shared variable with tsv::get, another thread could modify the value of the variable before the tsv::set command executes, result-ing in data corruption. For this reason, the tsv commands that manipulate list values actually modify the value of the shared variable. Data corruption by another thread won’t occur because the shared variable is locked during the entire execution of the command:

tsv::linsert common cities 1 Yreka Winnemucca

Mutexes and Condition Variables 339II. Advanced Tcl Mutexes and Condition Variables

Mutexes and condition variables are thread synchronization mechanisms.Although they are used frequently in other languages, they aren’t needed as often in Tcl because of Tcl’s threading model and the atomic nature of all shared variable commands. All mutex and condition variable commands are provided by the Thread extension in the thread namespace.

Mutexes

A mutex , which is short for mutual exclusion , is a locking mechanism. You use a mutex to protect shared resources — such as shared variables, serial ports,databases, etc. — from concurrent access by multiple threads. Before accessing the shared resource, the thread attempts to lock the mutex. If no other thread currently holds the mutex, the thread successfully locks the mutex and can access the resource. If another thread already holds the mutex, then the attempt to lock the mutex blocks until the other thread releases the mutex.

This sequence is illustrated in Example 21–13. The first step is creating a mutex with the thread::mutex create operation, which returns a unique token representing the mutex. The same token is used in all threads, and so you must make this token available (for example, through a shared variable) to all threads that access the shared resource.

Example 21–13Using a mutex to protect a shared resource.

# Create the mutex, storing the mutex token in a shared # variable for other threads to access.

tsv::set db mutex [thread::mutex create]

# ...

# Lock the mutex before accessing the shared resource.

thread::mutex lock [tsv::get db mutex]

# Use the shared resource, and then unlock the mutex.

thread::mutex unlock [tsv::get db mutex]# Lather, rinse, repeat as needed...

thread::mutex destroy [tsv::get db mutex]

Mutexes rely on threads being “good citizens.”

Mutexes work only if all threads in an application use them properly . A “rogue” thread can ignore using a mutex and access the shared resource directly .Therefore, you should be very careful to use your mutexes consistently when designing and implementing your application.

340 Multi-Threaded Tcl Scripts Chap. 21 Condition Variables

A condition variable is a synchronization mechanism that allows one or more threads to sleep until they receive notification from another thread. A con-dition variable is associated with a mutex and a boolean condition known as a predicate. A thread uses the condition variable to wait until the boolean predi-cate is true. A different thread changes the state of the predicate to true, and then notifies the condition variable. The mutex synchronizes thread access to the data used to compute the predicate value. The general usage pattern for the sig-nalling thread is:

?Lock the mutex

?Change the state so the predicate is true

?Notify the condition variable

?Unlock the mutex

The pattern for a waiting thread is:

?Lock the mutex

?Check the predicate

?If the predicate is false, wait on the condition variable until notified

?Do the work

?Unlock the mutex

In practice, a waiting thread should always check the predicate inside a while loop, because multiple threads might be waiting on the same condition variable. A waiting thread automatically releases the mutex when it waits on the condition variable. When the signalling thread notifies the condition variable, all threads waiting on that condition variable compete for a lock on the mutex. Then when the signalling thread releases the mutex, one of the waiting threads gets the lock. It is quite possible for that thread then to change the state so that the predicate is no longer true when it releases the lock. For example, several worker threads forming a thread pool might wait until there is some type of job to pro-cess. Upon notification, the first worker thread takes the job, leaving nothing for the other worker threads to process.

This sequence for using a condition variable sounds complex, but is rela-tively easy to code. Example 21–14 shows the sequence for the signalling thread. The first step is creating a condition variable with the thread::cond create operation, which returns a unique token representing the condition variable. As with mutexes, the same token is used in all threads, and so you must make this token available (for example, through a shared variable) to all threads that access the condition variable. When the thread is ready to update the predicate, it first locks the associated mutex. Then it notifies the condition variable with thread::cond notify and finally unlocks the mutex.

空调操作使用说明书样本

空调机组 操作使用说明书 ( 程序版本号: FLCCU3212_V1.5) 广东申菱空调设备有限公司

空调机组用户说明 在手操器上我们能够看到总共有6个轻触式按钮, 在每一个轻触式按钮的下面, 都有一个指示灯, 当按下其中一个键或者同时按下两个按键时, 屏幕显示相对应的菜单。为了方便以后的叙述, 将上述各键自左至右, 从上到下定义如下: 1.故障( ALARM) 键; 2.程序( Prg) 键; 3.退出( Esc) 键; 4.UP( ) 键; 5.ENTER( ) 键; 6.DOWN( ) 键; 当同时按下和键, 您能够切换各个菜单, 然后按键能够进入您所选择的菜单里; 按或键, 您能够查看所选择菜单里的各项内容。 因为控制面板菜单有中文和英文两种, 您能够经过按键和键来切换中英文画面。 当需要设定或者修改机组的各项参数时, 您能够按键来选择需要修改的参数项, 然后按/键来修改数值, 修改完毕后按键确认。当按下Esc键时, 您就能够退出该栏菜单。 当机组出现故障时, 手操器左上角的ALARM键会亮红灯; 此时按下该键您就能够在显示屏幕上看到相应的故障信息。当机组存在多项故障时, 您能够经过按/键来翻看各项故障信息。当故障排除后, 您能够按ALARM键来复位故障报警。 机组开停控制: 在遥控按Prg键可在手操器显示任何画面时开/停机组。Prg 键和遥控开关的关系为: 控制空调机开机后, 空调机开关状态即受异地遥控开

关的控制。此时如果遥控开关断开, 空调机停机; 遥控开关闭合, 空调机正常运行。 如果机组使用PLAN网络以实现机组之间的轮值备用功能, 网络中机组数目当然大于一台, 此时可经过同时按键和键来切换不同机组的画面, 屏幕右上角的数字表示机组编号, 如显示”01”表示第一号机组。 1.输入及输出 1.1模拟量输入 REFERENCE Small Version Medium Version B1 回风压差回风压差 B2 回风湿度回风湿度(0~10V或4~20mA) B3 外部设定温度( 0~10VDC) 外部设定温度( 0~10VDC) B4 回风温度( NTC) 回风温度( NTC) B5 新风温度( NTC) 新风温度( NTC) B6 N/A 回风温度(0~10V或4~20mA) B7 N/A 外部设定湿度( 0~10VDC) B8 N/A 备用 1.2数字量输入 REFERENCE Small Version Medium Version 1 风机电机过载风机电机过载 2 欠风保护开关欠风保护开关 3 客户自设报警客户自设报警 4 压缩机一电流过载或高压保护压缩机一电流过载或高压保护 5 压缩机一低压保护压缩机一低压保护 6 电加热过热保护电加热过热保护 7 遥控开关遥控开关 8 遥控值班功能( 该点闭合, 机组值班运行) 遥控值班功能( 该点闭合, 机组值班运行) 9 N/A 压缩机二电流过载或高压保护 10 N/A 压缩机二低压保护 11 N/A 压缩机三电流过载或高压保护 12 N/A 压缩机三低压保护 13 N/A 初效滤网堵塞/直冷或冷冻水选择 14 N/A 中效滤网堵塞/电加热或热水选择 1.3 数字量输出 REFERENCE Small Version Medium Version R1 送风机电机送风机电机 R2 压缩机一压缩机一 R3 电加热一电加热一

座机使用说明

座机电话的使用方法和常用按键说明。 如今,电话已经成为我们日常生活中不可缺少的工具,当然即便手机再普及,座机电话还是家庭尤其是办公室必不可少的,座机电话除了打/接之外的一些功能想必很多人还没用过,下面就以“步步高HCD007(182)TSDL ”型号的座机电话为例,给大家介绍下座机电话的使用方法及常用按键说明,虽然座机电话的功能不一,布局也不同,但主要的功能都差不多,希望给读者一个参考。 座机电话的使用方法及常用按键说明 在以下使用方法叙述中,除特别说明外,其他操作均指在座机挂机状态下进行。 接听电话 听到电话铃声,拿起手柄或按(免提)键即可与对方通话,通话完毕挂好手柄或按(免提)键。在用手柄通话时若需转为免提通话,则按一下(免提)键,放回手柄即可转为免提通话;在用免提通话时若需转为手柄通话,则拿起手柄即可。 拨打电话 拿起手柄或按(免提)键,听到拨号音后拨号,当听到回铃音时,等待对方应答。 如果听到忙音,只按(重拨/回拨)键即可将刚才所拨的电话号码拨出去,通话完毕挂好手柄或按(免提)键。 预置拨号 预拨电话号码,如果输入错误,可按匠删除/刚键删除再重新输入。待确认无误,按(重拨/回拨)键即可拨出。 重拨键 拨出电话号码,听到忙音时,可以收线后再摘机,听到拨号音后,再按(重拨/回拨)键;或无须收线直接按(重拨/回拨)键,本机就会自动拨出您前次输入的号码。 闪断键 (闪断)键又称快速收线键。在摘机状态下按(闪断/铃声)键,可实现与按下收线开关同样的效果,当您连续拨打几个电话时,该键就显得尤其方便、快捷。 该键作用时间可作更改,具体操作请见后述第四页中的“设置闪断时间”。 暂停键

空调操作使用说明书分析.doc

空调机组 操作使用说明书(程序版本号:FLCCU3212_V1.5) 广东申菱空调设备有限公司

空调机组用户说明 在手操器上我们可以看到总共有6个轻触式按钮, 在每一个轻触式按钮的下面,都有一个指示灯,当按下其中一个键或者同时按下两个按键时,屏幕显示相对应的菜单。为了方便以后的叙述,将上述各键自左至右,从上到下定义如下: 1.故障(ALARM)键; 2.程序(Prg)键; 3.退出(Esc)键; 4.UP()键; 5.ENTER()键; 6.DOWN()键; 当同时按下和键,您可以切换各个菜单,然后按键可以进入您所选择的菜单里;按或键,您可以查看所选择菜单里的各项内容。 因为控制面板菜单有中文和英文两种,您可以通过按键和键来切换中英文画面。 当需要设定或者修改机组的各项参数时,您可以按键来选择需要修改的参数项,然后按/键来修改数值,修改完毕后按键确认。当按下Esc键时,您就可以退出该栏菜单。 当机组出现故障时,手操器左上角的ALARM键会亮红灯;此时按下该键您就可以在显示屏幕上看到相应的故障信息。当机组存在多项故障时,您可以通过按/键来翻看各项故障信息。当故障排除后,您可以按ALARM键来复位故障报警。 机组开停控制:在遥控按Prg键可在手操器显示任何画面时开/停机组。Prg键和遥控开关的关系为:控制空调机开机后,空调机开关状态即受异地遥控开关的控制。此时如果遥控开关断开,空调机停机;遥控开关闭合,空调机正常运行。 如果机组使用PLAN网络以实现机组之间的轮值备用功能,网络中机组数目当然大于一台,此时可通过同时按键和键来切换不同机组的画面,屏幕右上角的数字表示机组编号,如显示“01”表示第一号机组。 1.输入及输出 1.1模拟量输入 REFERENCE Small Version Medium Version B1 回风压差回风压差 B2 回风湿度回风湿度(0~10V或4~20mA) B3 外部设定温度(0~10VDC)外部设定温度(0~10VDC) B4 回风温度(NTC)回风温度(NTC) B5 新风温度(NTC)新风温度(NTC) B6 N/A 回风温度(0~10V或4~20mA) B7 N/A 外部设定湿度(0~10VDC) B8 N/A 备用 REFERENCE Small Version Medium Version 1 风机电机过载风机电机过载 2 欠风保护开关欠风保护开关 3 客户自设报警客户自设报警 4 压缩机一电流过载或高压保护压缩机一电流过载或高压保护 5 压缩机一低压保护压缩机一低压保护

电话机使用说明书

2007 多功能来电显示电话机 使用说明书 来电显示电话机是 采用微电脑技术,结合先 进电子线路设计而成,具 有完善的来电显示功能。 本机适合于家庭、企业、 行政事业单位以及宾馆、 酒店等作通话联络。为了 您能正确地使用本机,从而充分发挥本机各项功能,请详细阅读本说明书。 FSK/DTMF双制式来电显示(按**#进行制式转换) 50组来电,16组去电 2组手动IP功能可设置 5级亮度可调 预拨号及消号,回拨功能 自动追拨功能 音乐保留功能 产品简介 主要功能

06. 1 计算器功能 1. 使用条件 环境温度:-10℃~+40℃ 相对湿度:10%-95% 大气压力:86-106kpa 环境噪声:≤60dB (A ) 2. 主要技术指标 1) 传输指标发送频率响应,接收频率响应符合国家标准。 2) 双音频拨号特性: 标准频率低频群频率:697HZ 、770HZ 、852HZ 、941HZ 。 标准频率高频群频率:1209HZ 、1336HZ 、1477HZ 。 单一频率的偏差在标准频率的±1.5%范围内。 双音多频信号中低频群单一频率的电平:-9±3dBm 双音多频信号中高频群单一频率的电平:-7±3dBm 3) 电话铃特性:响铃声级≥70dB 。 (一)话机要实现来电显示功能,必须到当地电信局申请开通此项 业务。 (二)话机应安放在干燥、通风处,切勿放在阳光直射、高温、强 磁场干扰的地方。 技术条件 注意事项

2007 (三)切勿使用天那水、甲苯等腐蚀性液体擦洗话机。 1. 本机要求使用前请装上高性能五号电池。打开电池盖,按正常极性装入电池,并盖上电池盖。当发现显示暗淡和个别功能不能使用,请及时更换电池。 2. 将四芯曲线的一端插入手柄尾部的插座内,另一端插入话机左侧的插座内。 3. 将直线的插头插入话机顶部的外线插座内,叉头与外线接线盒相连。 1.接听电话: 当外线来电,本机响铃,此时提起手柄或按“免提”键即可与对方通话。 2.拨打电话: 当需要拨打电话时,提起手柄或按“免提”键听到信号音后,即可进行拨号,显示屏显示所拨打的电话号码,通话完毕,放下手柄即可挂机。 3.重拨功能: 摘机状态下按此键,重拨前次所拨号码;拨号、预拨号期间,按此键为暂停键。 4.收线功能: 摘机状态按“闪断/设置”键话机将自动收线600ms ,闪断时间可 安装说明 普通功能操作

空调器使用说明书

空调使用说明书 1.安全注意事项 安装环境请不要在有易燃易爆气体或有腐蚀性气体的地方安装空调器。电线、排水管和管路需要正确连接,若连接不正确可能引起空调器不工作、工作一端时间后效果变差、漏水、制冷剂泄露、触电甚至发生火灾。 请不要在洗衣房和浴室使用本空调器。 2、使用注意事项 请使用规定的交流电源,电压过高或过底可能会使压缩机无法正常工作,并对制冷系统造成损害。 使用指定规格的电源线,请勿自行改制。必须安装漏电断路器。 请不要将手指、棍棒伸入空调器的进、出风口,由于风扇高速运转,可能会造成人受伤或损坏空调器。 请不要在空调器的室内或室外机组上吊或放置物品。请不要忘记经常给室内通风,尤其是室内有煤气设备时。长期不使用时,请切断空调器电源。请不要用导线或铁丝代替断路器。 请不要将接地线与自来水管、煤气管道相连,接地不充分可能会导 致触电。 请不要在空调器运转时切断电源。 异常时(如有烧焦煳味),立即关机,切断电源,并立即报告相关领导。 请不要在可能泄露易燃气体的地方安装空调器。

请勿将空调器的风直接吹向动、植物,否则可能导致不良影响。 修理时,请与经销商或维修站联系,不当的修理可能会导致意外的事故。清扫前务必关闭空调器,切断电源,确认风扇已完全停止。 手潮湿时,请勿操作,分之可能触电。 当环境湿度过大时,在制冷或除湿运转方式下,出风口可能会滴水。 确保空调器正下放无电器设备和贵重物品。 3.重要参数 工作温度范围 室内控制板电流熔断器规格:T5AL 220V-50 HZ,额定值:60A。 本空调器额定工作大气压为一个标准大气压。 4.空调器操作方法 温度设定必须在运行模式确定之后进行(送风模式下无设定温度) 温度设定范围:19C -30 C。 温度设定也可在开机后进行。 单冷时,无自动和制热模式。制热时为防止吹出冷风,开机后室内风扇不会立即运转,将延迟一段时间。

宝捷讯HCD8899电话机使用说明书

宝捷讯HCD8899电话机使用说明书 (一)、挂机设置:挂机状态下按设置键进入设置状态,LCD显示SE 12345678,并且12345678闪烁,此时按数字键进入每项设置(本机共有8大项设置,每大项设置有1-3小项设置,部分设置项未用),再按数字键进入每小项设置,LCD右上角同时显示对应的设置项。(输入时如有错,可用删除键改错),设置完成后,按设置键确认,按删除键退回上一目录再进行下项设置。 1.设置日期/时间:按设置键,LCD显示SE 12345678,并且12345678闪烁,此时按1表示进入日期(1-DATE)及时间(2-CL)的设置。 ①设置日期:在1-DA TE 2-CL闪烁时,按数字键1,进入日期的设置,此时LCD显示 D 2003 01-01,并且03 01-01闪烁(若已设置了日期,则显示设置的日期),表示进入年(03)月(01)日(01)的设置,同时LCD右上角显示11,表示进入设置中的第一大项第一小项设置,即日期设置。此时按各数字键输入年、月、日,再按设置键确认。例如2004年5月28日的设置是:按设置键,按数字键1,再按数字键1,然后依次按数字键040528,按设置键确认。同时LCD上排的日期修改为设置的日期,中排的星期会自动显示对应的星期,右上角显示的11中,后一个1闪烁,表示可设置第一大项中的其它小项。 ②设置时间:在上项设置完成后,即右上角显示的11中,后一个1闪烁时,按数字键2,右上角显示12,即进入时间的设置。LCD显示CL 00-00,并且00-00闪烁(若已设置了时间,则显示设置的时间),此时按各数字键输入小时和分钟。例如21点8分的设置是:依次按数字键2108,按设置键确认。同时LCD上排的时间修改为设置的时间。完成设置后,按删除键退回上一目录再进行下项设置。也可按删除键退出设置。2.本地码设定:按设置键,再按数字键6,LCD显示1-LOC 2-OL,再按1显示L0C….,并且…闪烁表示进入本地码设定,此时按数字键输入要设定的本地码,按设置键确认。本机可设定为8位本地码,用户可根据具体情况设定本地码。选择2进入出局码设定屏幕显示UT OFF直接输入数字按设置确认。当前默认为OFF 3.显示亮度调节:按设置键,再按数字键7,LCD显示LCD CON3,此时按上、下查键选择满意亮度后按设置确认。 4.IP功能设定:自动IP设定:按设置键,再按数字键8、1,LCD显示AU IP OFF,并且OFF闪烁(本机初始化自动IP为关,即OFF),表示进入自动IP设定,则按上、下查键选择所需的IP号码。(197 17969 190 17951等等IP接入号码)。设定好后按设置键确认。(拨长途时会自动加入所设置IP网络号) (二)挂机功能操作: 1.来电接收:当有来电时,话机自动显示来电号码、日期、时间,同时记录这是第几个来电。若是新号码会有新来电标志出现。若是已有号码则有重复标志。若是来电保密则显示P。若是来电出范围则显示0。若是来电信号不正确则显示E。当话机移至另一处使用时,若无来电,则在挂机状态下按**#即可。 2.来电查询:按上/下查键进入来电查询状态,此时可向上/向下翻查,LCD显示来电的号码、日期及时间等信息。 3.去电查询:按去电键进入去电查询状态,配合上/下键可循环查询最近拨出的号码和时间。4.预拨号:在挂机状态下,通过各数字键键入要拨出的号码。若有输入错误,用删除键修改,输入完成以后,提起手柄后号码将自动拨出。 5.取销IP功能:话机在每次长途拨号时都会自动加拨所设置的自动IP网络号,如想取消本次拨号的自动IP网络号码,可在摘机后按删除键,再进行拨长途号码时,则本次拨号不会加拨所设置的自动IP号码。挂机后,自动返回原IP状态。 注:所有设定均用设置键开始,按设置键确认,按删除键退回上一目录。

申菱空调PGDFLCCU操作说明书

空调机组 操作使用说明书(程序版本号:FlCCU3212) 广东申菱空调设备有限公司

空调机组用户说明 在PGD手操器上我们可以看到总共有6个轻触式按钮,在每一个轻触式按钮的下面,都有一个指示灯,当按下其中一个键或者同时按下两个按键时,屏幕显示相对应的菜单。为了方便以后的叙述,将上述各键自左至右,从上到下定义如下: 1.故障(ALARM)键; 2.程序(Prg)键; 3.退出(Esc)键; ()键; ()键; ()键; 当同时按下键,您可以切换各个菜单,然后按键可以进入您所选择的菜单里;按/键,您可以查看所选择菜单里的各项内容。 因为控制面板菜单有中文和英文两种,您可以通过按Esc键和键来切换中英文画面。 当需要设定或者修改机组的各项参数时,您可以按键来选择需要修改的参数项,然后按/键来修改数值,修改完毕后按键确认。当按下Esc键时,您就可以退出该栏菜单。 当机组出现故障时,手操器左上角的ALARM键会亮红灯;此时按下该键您就可以在显示屏幕上看到相应的故障信息。当机组存在多项故障时,您可以通过按/键来翻看各项故障信息。当故障排除后,您可以按ALARM键来复位故障报警。 机组开停控制:在手操器显示主画面时,按键可开/停机组;按Prg键可在手操器显示任何画面时开/停机组。 1.输入及输出 模拟量输入 REFERENCE Small Version Medium Version B1 回风压差回风压差 B2 回风湿度回风湿度(0~10V或4~20mA) B3 外部设定温度(0~10VDC)外部设定温度(0~10VDC) B4 回风温度(NTC)回风温度(NTC) B5 备用备用 B6 N/A 回风温度(0~10V或4~20mA) B7 N/A 外部设定湿度(0~10VDC) B8 N/A 备用 REFERENCE Small Version Medium Version 1 风机电机过载风机电机过载 2 欠风保护开关欠风保护开关 3 客户自设报警客户自设报警 4 压缩机一电流过载或高压保护压缩机一电流过载或高压保护 5 压缩机一低压保护压缩机一低压保护 6 电加热过热保护电加热过热保护 7 遥控开关遥控开关 8 遥控值班功能(该点闭合,机组值班运行)遥控值班功能(该点闭合,机组值班运行) 9 N/A 压缩机二电流过载或高压保护 10 N/A 压缩机二低压保护 11 N/A 压缩机三电流过载或高压保护 12 N/A 压缩机三低压保护 13 N/A 初效滤网堵塞/直冷或冷冻水选择

中诺电话机使用说明书

中诺电话机使用说明书(c199) 中诺电话机使用说明书CHINO>E(C19;一、本机特点:;.24首风格多样铃声.FSK/DTMF双制式兼容;.62组8位来电存储.16组8位去电存储;.5级亮度调节功能.5位本地码;.预拨号及消号、回拨功能.贵宾防删除.来电响特殊;.防盗功能.R键功能;.闹钟功能.单键记忆功能;.手柄特大声.音量可调;二、安装方法:;1必须向当地电信局申请开涌来电显中诺电话机使用说明书CHINO> E(C199) 一、本机特点: .24首风格多样铃声. FSK/DTMF双制式兼容.FSK自动校时 .62组8位来电存储.16组8位去电存储 .5级亮度调节功能.5位本地码 .预拨号及消号、回拨功能.贵宾防删除.来电响特殊铃声 .防盗功能.R键功能 .闹钟功能.单键记忆功能 .手柄特大声.音量可调 二、安装方法: 1必须向当地电信局申请开涌来电显示服务。 本机才能正常接收来电号码。 2将机身底座的电池盖打开,按“ + ”“ - ”极性要求装入电池; 注:本机只有装上电池,来电背光灯才会亮。 3, 将电话曲线插头插入座机左侧的插座及手柄的描座,将电话直线插头插入座机背后的外线插座、另一端插入接线盒和话网点钱连接。4,电话机安装在干燥, 通风、无腐蚀气休的地方。

三、按键操作说明: a.设置操作: 在挂机状态下按"设置/存储" 键,话机进入设置状态,液晶屏幕显示"SET 1 DATE 此时用“上翻”“下翻”可改变设置项,液晶屏幕同时显示对应的设置项。再按"设置/存储" 键进入该项设置在某项 1 设置完成以后,按“设置/存储" 键进入下一项设置所有设置均用“上翻"“下翻”健修改该具体设置项,用删除/R键退出设置状态。 b、设置日期/时间: 液晶屏幕显示“SET 1 DATE”,按"设置/存储" 键确认,进入日期/时间设置后,年的显示闪烁,可按“上翻”“下翻”修改完成后再按"设置/存储" 键进行月的设置,修改方法和年的相同,再按"设置/存储" 键依次进行日、小时和分钟的, C、设置五位区域码: 液晶屏幕显示“SET 2 DATE”,按"设置/存储" 键确认,液晶屏幕会显示“co d E.....”,进入区号的设置,第一个“—”闪 烁(若已设置了区号,则显示设置的区号,区号第一个号码闪烁)按“上翻”“下翻”可设置或修改为0到9,完成第一位设置后,,按"设置/存储" 键进行第二位设置,依次类推。, D、设置出局码: 液晶屏幕显示“SET 3 PCO d E”,按"设置/存储" 键确认,液晶屏幕会显示“PCO d E.....”,进入出局码的设置,“—”闪烁(若已设置了出局码,则显示出局 码且闪烁,)按“上翻”“下翻”可设置或修改为0到9,完成设置后,按"设置/存储" 键确认并进行下一项的设置。 设置了出局码后,在回拨号码大于6位且首位和出局码不同的来电时话机会自动添加出局码,而回拨去电、预拨号则不考虑添加出局码,当话机设置了自动IP号码时,将先拨出局码后自动暂停1秒2

TCL电话机使用说明

1.话机设置: 在挂机状态按“设置”键液晶屏显示“set 1 date”,按“上翻”、“下翻”键选择设置的项目,按“删除”键回到挂机状态。 2.时间设置: 在挂机状态下按“设置”键,可进入设置状态,液晶屏显示“set 1 date”,再按“设置”键,液晶屏显示年份的闪烁,此时可按“上翻”、“下翻”键可修改,正确后按“设置”键进入月、日、时、分的设置,其设置方法与年份设置相同,调好后按“设置”键进入区码设置。 3.区码设置: 时间设置完后,当液晶屏显示“set 2 c0de”,按“设置”键可进入区码设置,液晶屏显示“0----”,此时按“上翻”、“下翻”键设置相应的区号,按“设置”键可移向下一位(不足四位的可直接移出)。如本地码已设为“0752”,当地交换机所送的号码为“8”,按“重拨/回拨”键时,液晶屏只显示“22888”。完成后按“设置”键可进入外线码设置。 4.外线码设置(若普通用户可跳过此项): 区码设置完后,当液晶屏显示“set 3 pcode”,按“设置”键可进入外线码设置,液晶屏显示“-”并闪烁,此时按“上翻”、“下翻”键可修改为“0—9或—(无)”,此项设置适用于小型交换机或汇线通业务,当话机设置好外线码后,用户在回拨来电号码时会自动在号码前加上外线码。完成后按“设置”键进入液晶屏亮度调节设置。 5.液晶屏亮度调节: 外线码设置完后,当液晶屏显示“set 4 lcd”,此时按“设置”键确认,液晶屏显示“lcd 3”,按“上翻”、“下翻”键可改变液晶屏的亮度级别(共八级),完成后按“设置”键进入“r”键时间设置。 6.设置“r”键时间:

“r”键时间固定为100ms。“r”键与*、#键配合使用即可实现程控交换机提供的特殊服务功能。至于何种功能,请到本地电信部门查询。 7.设置自动ip号码: 设置完“闪断”时间后,当液晶屏显示“set 6 lp0”,按“设置”键,液晶屏显示“--------”,键盘直接输入固定ip号码(如中国电信的ip号17909),按“删除”键可删除当前位。 设了自动ip后,预拨号或翻查来电,如是长途号码,按“重拨/回拨”键,话机将自动在号码前加拨所设的ip号码“17909”,如不是长途号码则可直接拨出。设置完后按“设置”键进入ip1卡设置。 8.设置ip卡号: 在设置完自动ip0号码后按“设置”键,当液晶屏显示“set 6 lp1”,按“设置”键,液晶屏显示“--------”由键盘直接输入相应的ip卡号码,按“删除”键可删除当前位。设置参照如下: 1)在挂机状态下,ip卡号存储及修改操作需根据ip卡的语音提示进行相应的存储操作,以下操作均为普通话 (1)为准,卡号为“”,密码为“88”。设置中国电信17900/网通17930/吉通17920卡,在卡号和密码结束后应加“#”:17900/17930/17920+暂停 +1++#+88+#+设置。设置中国联通17910操作为:17910+暂停+1++88+#+设置。设置200/300卡操作为:200/300+暂停+1+暂停++暂停+88+暂停+1+设置。 2)ip卡的速拨操作: 预拨、来电、去电的长途号码显示在屏上后按“ip”键可在号码前自动加上所设ip卡号或特服号码拨出。若有设置外线码,只有来电号码显示在屏上后按“ip”键,话机才会在号码前加拨所设的出局码、ip卡号。3)ip卡拨号时,话机按所设ip卡号进行自动拨号,检测到语音后,自动拨出后面的号码。如果设置有暂停,则会暂停 3.6秒。设置完后按“设置”键确认进入防盗功能设置。

电话机使用说明

—、使用注意事项 1、电话机应安装在干燥、通风、无腐蚀气体的地方. 2、来电显示功能必须要本地电信局开通并向电信局申请才能显示对方号码.没有开通来电显示的地方不影响话机普通功能使用. 二、主要功能 1、8种普通铃声+ 1组贵宾铃声,普通铃声可选。 2、DTMF/FSK多制式兼容,来电自动识别。 3、来电30组(16位显示),去电5组(16位显示),贵宾35组,回拨功能. 4、键盘设置防盗功能. 5,全自动IP(32位)快速、保密拨号. 6、机械锁―0 ‖. 7、预拨号及消号、回拨功能. 8、2位出局码,适应虚拟网. 9、本地区号过滤功能. 三、操作说明 1、铃声设置 挂机状态下连续按―铃声选择‖犍,当LCD屏幕显示―TING 1至8 ‖,表示有八种铃声可选. 2、功能设置 挂机状态按―设置‖键进入设置菜单,LCD显示―SET 1 DRTE ‖ ,此时用上、下查健可改变设置项,再按设置键进入该项设置。在设置完成该项后,按设置键进入下一项设置。所有设置均用上、下查键修改该具体设置项.用―删除‖键退出设置状态. 具体设置如下: (1)日期/时间设置:按―设置‖键LCD显示―SET 1 DRTE ‖,此时按设置键确认。进入设置后,年的显示闪烁,可按上、下查键修改,完成后再按设置健进入月的设置,修改方法与年的设置相同,再按设置键可依次修改日、小时和分钟。小时和分钟的设置可分十位和个位分别设置. (2)设置区域码(即本地区号):LCD会提示―SET 2 CODE ‖ ,此时按设置键确认,LCD会显示―CODE - - - - - ‖,进入区号的设置,第一个―-‖闪烁(若已设置了区号,则显示设置的区号,区号第一个号码闪烁)。按上、下查健可设置或修改为0-9,完成第一位设置后,按设置键进入第二位设置,以此类推。如北京用户则设置区域码为:CODE 010--。 (3)设置出局码:LCD提示―SEt 3 PCODE‖,按设置键确认,LCD会显示―PCODE - - ‖,第一个―-‖闪烁(若已设置了出局码,则显示已设置的号码,号码的第一位闪烁)。按上、下查键可设置或修改为 0-9,完成第一位设置后,按设置键进入第二位设置。 (4)设置自动IP :LCD提示―Set 4 RutO IP ‖ ,按设置键确认,LCD会显示―RutO IP OFF ‖ ,并且―OFF‖闪动。此时按上查、下查键可设置自动IP开或关。 选择到―RutO IP ON ‖ ,技设置键确认,则LCD会显示―InPUt CODE ‖,此时请根据不同电信公司IP服务的不同方式输入特服号码、卡号、密码,输入过程中可用删除键进行修改,输入完成后按设置键进入下—项设置. 在设置了自动IP号码以后,在无锁状态,挂机预拨号时,如拨号首位号码为― 0 ‖,则话机会自动在预拨号前加拨所设置的IP号码,或者在回拨以―0‖开始的来电或去电号码时,都会自动在所回拨的号码前加拨设置的IP号码。

步步高电话机说明书

步步高电话机HCD007(118)TSDL的说明书, 你看看能不能用 ATTENTION:在以下使用方法叙述中,除特别说明外,其他操作均指在座机挂机状态下进行。 1 接断电话 不考虑来电显示:听到电话铃声,拿起手柄或按【免提】键,即可与对方通话,此时显示屏灯亮。 考虑来电显示:等到第二声铃声响起后,看显示屏上所显示的内容,您可决定是否接听。 2 拨打电靖 拿起手柄或按【免提】键,显示屏灯亮,听到拨号音,即可拨号。当听到回铃音(断四秒续一秒的蜂音)时,等待对方应答。如果听到忙音(嘟…嘟…嘟…声),只需按【重拨/回拨】键,即可将刚才所拨的电话号码拨出去,通话完毕后要挂好手柄或按【免提】键。 3 手柄通话与免提通话间的转换 由手柄转为免提通话时,只需按一下【免提】键,放回手柄,即可转为免提通话。 由免提转为手柄通话时,只需拿起手柄即可。

4 铃声大小开关转换 本机后部设有铃声大小转换开关,可根据需要选择铃声大小。 5 预置拨号 按【0】至【9】数字键,如果输入号码错误,可按【删除/退出】键删除错误号码,重新输入正确号码。确认输入号码正确后,按【重拔/回拨】键即可拨出该电话号码。 6 重拨键 拨出电话号码,听到忙音时,可以收线后再摘机,听到拨号音后,再按【重拨/回拨】键;或无须收线,直接按【重拔/回拨】键,本机就会自动拨出您前次输入的号码。 7 暂停键 在本机作为内线分机使用时,该键可以配合您拨打外线时识别外线是否繁忙。例如:假定拨【9】是接外线,则您可以在打外线时先拨【9】,然后按【暂停】键,再输入要拨的外线号码。这样,在您重拨时,本机会在“9”字后面自动插入一段3.6秒的暂停时间间隔,以识别外线是否繁忙,保证您的拨号快速、准确、省时。 8 r键

佳力图精密空调安装使用说明书

佳力图机房精密空调南京佳力图空调机电有限公司

2 目录 一、佳力图设备相关技术资料 (1) 1、佳力图MEAU402技术参数表 (1) 2、佳力图ME系列精密空调介绍 (2) 3、精密空调主要零部件介绍 (8) 4、佳力图ME系列精密空调的技术优势 (13) 5、佳力图ME系列精密空调节能措施描述 (14) 6、佳力图机房空调实物图片 (15) 7、机房空调的安装 ................................................................................................................... - 16 - 二、机型报价 ...................................................................................................... 错误!未定义书签。 三、佳力图公司介绍 .......................................................................................... 错误!未定义书签。 四、佳力图公司售后服务简介 .......................................................................... 错误!未定义书签。 1、佳力图原厂售后服务陈述 ....................................................................... 错误!未定义书签。 2、售后服务承诺 ........................................................................................... 错误!未定义书签。 3、售后服务响应时间承诺 ........................................................................... 错误!未定义书签。 4、售后服务内容 ........................................................................................... 错误!未定义书签。 5、佳力图外驻办事机构图 ........................................................................... 错误!未定义书签。 6、成都办事处简介 ....................................................................................... 错误!未定义书签。 五、佳力图公司四川医疗行业部分用户名单 .................................................. 错误!未定义书签。

中诺电话机使用说明书

中诺电话机使用说明书 安装方法 1、必须向当地电信局申请开通来电显示服务,本机才能正常接收来电号码。 2、将机身底部的电池盖打开,按“+”、“-”极性要求装入电池,当显示模糊时,应及时更换电池。 (注:本机只有装上电池,来电彩色背光灯才会亮,才有和弦音乐。) 特别注意:装上电池来电就有报号和和弦音乐,要使用其它响铃方式请参照"铃声选择"。 3、将电话曲线插头插入座机左侧插座及手柄的插座,将电话直线插头插入座机背后的外线插座;另一端接入接线盒与市话 网直线连接。 4、电话机应安装在干燥、通风、无腐蚀气体的地方。 使用方法 一、设置功能操作 在挂机状态下按“设置 /存储”键,进入设置状态,液晶屏幕显示“SET 1 DATE”此时用“上翻”、“下翻”键可改 变设置项,液晶屏幕同时显示对应的设置项。再按“设置/存储”键进入该项设置。在某项设置完成以后,按“设置/存储” 键进入下一项设置所有设置均用“上翻”、“下翻”键修改该具体设置项,用“删除/退出”键退出设置状态。 设置日期、时间 在挂机状态下按“设置/存储”键,选择并进入日期/时间设置状态,液晶屏幕显示“SET 1 DATE” ,按“设置/存储”键 确认。进入日期/时间设置后,年的显示闪烁可按“上翻” 、“下翻”键修改,完成后再按“设置/存储”键进入月的设置,修 改方法与年的设置相同,再按“设置/存储”键可依次修改日、小时和分钟。小时和分钟的设置可分十位和个位分别设置。 设置区域码 在挂机状态下按“设置/存储”键,选择并进入区域码设置状态,液晶屏幕显示“SET 2 COdE” ,按“设置/存储”键确 认,液晶屏幕会显示“Cod E -----”,第一个“ -”闪烁(若已设置了区号,则显示设置的区号,区号第一个号码闪烁)。按“上 翻”、“下翻”键设置或修改为 0 到9完成第一位设置后,按“设置/存储”键进入第二位设置,以此类推。可设置 5 位区域码。 设置出局码 在挂机状态下按“设置 /存储”键,选择并进入出局码设置状态,液晶屏幕显示“SET 3 PCOdE” ,按“设置 /存储” 键确认,此时液晶屏幕会显示出“PcodE--”,第一个号码“-”闪烁(若已设置

电话机使用说明书 (2)

多功能来电显示电话机使用说明书 来电显示电话机是 采用微电脑技术,结合先 进电子线路设计而成,具 有完善的来电显示功能。 本机适合于家庭、企业、 行政事业单位以及宾馆、 酒店等作通话联络。为了 您能正确地使用本机,从而充分发挥本机各项功能,请详细阅读本说明书。 FSK/DTMF双制式来电显示(按**#进行制式转换) 50组来电,16组去电 2组手动IP功能可设置 5级亮度可调 预拨号及消号,回拨功能 自动追拨功能 音乐保留功能 计算器功能 产品简介 主要功能

技术条件 1.使用条件 环境温度:-10℃~+40℃ 相对湿度:10%-95% 大气压力:86-106kpa 环境噪声:≤60dB(A) 2.主要技术指标 1)传输指标发送频率响应,接收频率响应符合国家标准。 2)双音频拨号特性: 标准频率低频群频率:697HZ、770HZ、852HZ、941HZ。 标准频率高频群频率:1209HZ、1336HZ、1477HZ。 单一频率的偏差在标准频率的±1.5%范围内。 双音多频信号中低频群单一频率的电平:-9±3dBm 双音多频信号中高频群单一频率的电平:-7±3dBm 3)电话铃特性:响铃声级≥70dB。 注意事项 (一)话机要实现来电显示功能,必须到当地电信局申请开通此项 业务。 (二)话机应安放在干燥、通风处,切勿放在阳光直射、高温、强 磁场干扰的地方。 (三)切勿使用天那水、甲苯等腐蚀性液体擦洗话机。 安装说明

1. 本机要求使用前请装上高性能五号电池。打开电池盖,按正常极性装入电池,并盖上电池盖。当发现显示暗淡和个别功能不能使用,请及时更换电池。 2. 将四芯曲线的一端插入手柄尾部的插座内,另一端插入话机左侧的插座内。 3. 将直线的插头插入话机顶部的外线插座内,叉头与外线接线盒相连。 普通功能操作 1.接听电话: 当外线来电,本机响铃,此时提起手柄或按“免提”键即可与对方通话。 2.拨打电话: 当需要拨打电话时,提起手柄或按“免提”键听到信号音后,即可进行拨号,显示屏显示所拨打的电话号码,通话完毕,放下手柄即可挂机。 3.重拨功能: 摘机状态下按此键,重拨前次所拨号码;拨号、预拨号期间,按此键为暂停键。 4.收线功能: 摘机状态按“闪断/设置”键话机将自动收线600ms,闪断时间可选择。 设置功能操作

空调说明书

恒温恒湿空调机组操作使用说明 申菱恒温恒湿空调机组采用德国西门子S7 22X系列PLC控制器,人机界面为德国西门子TD-200简体中文文本显示器,在机身上可以看到文本显示器的外观如下图所示: TD200文本显示器的面板上包括有4个功能按键(1-4),5个命令按键(5-9)及1个2x20 的点阵液晶显示器(10)。 4个功能键与键5配合可提供8种不同的功能组合:如直接按功能键控制器将提供键上第一行说明的功能。例如按键1为开机或停机,按键2为选择制冷或制热等等。按键5,在显示器右下角显示一个闪烁的S,然后再按功能键,控制器将提供键上第二行说明的功能。例如按键5及键1为设置默认参数,按键5及键2为显示定时功能菜单。各键的功能如下:运行/停机(键1)用于改变机组的运行状态,使正在运行的机组停机或令停止的机组运行。 默认参数(键5+键1)用于在控制器第一次上电时设定机组的运行参数,平时无用。并且,只有当机组停止并且显示主画面时,该功能才有效。 附加功能(键5+键2)用于显示与附加功能相关的菜单。 用户菜单(键3)用于显示与用户使用相关的菜单。 工厂菜单(键5+键3)用于显示与运行参数设定相关的菜单,请用户不要随便更改里面的参数。 故障显示(键4)用于显示故障信息。按下后显示故障信息,当有多个故障时,在TD200

显不区的右方显示一个至两个闪烁的箭头。此时按键8或键9可查看前一条或后一条故障信息。 功能设定(键5+键4)用于一些特殊功能的设定如数据清零,故障复位等等。 SHIFT(键5)用于切换功能键的功能。按下后在TD200显示区的右下方显示一个闪烁的S。 ESC(键6)用于转换Display Message方式和Menu方式,或紧急停止一个编辑。此功能需要输入口令(与工厂设定菜单口令相同),用户请勿操作。内容参看相关资料。 ENTER(键7)用于写入新数据或确认信息。 UP ARROW(键8)用于递增数据和向上翻页。 DOWN ARROW(键9)用于递减数据和向下翻页。 一、用户菜单 U1. 主画面 说明:1、所有菜单的温度值均为摄氏度,温度值为相对湿 度。 2、右上角所示为机组的运行状态。 3、右上角所示为机组的故障状态。 4、只有在显示本菜单时才能安装默认参数。 U2.温度及定时功能设定 U3.模拟量输入点读数 1.AIWO及AIW2分别为温度及湿度变送器的读数,若该 读数小于6400表示变送器出现故障。 U4.输入/输出点状念 说明:1.输入/输出点的状态“C”表示闭合;“0” 表示断开。输入/输出表请参看附表。 U5.机组运行时间 U6.压缩机一运行时间

中诺电话机使用说明书

本机特点 1 dtmf/fsk 来电双制式兼容、全国通用 2 50 组来电号码显示(8 位)、来电翻查、回拨、加0 回拨 3 16 组去电号码(8 位)查询、实时显示通话时间 4 日期、时钟及星期显示,lcd 亮度 5 级可调 5 1 6 首铃声选择 6 r 键功能 ip 直接拨号 7 闪断时间90/95/100/120/180/300/600/1000ms 可选 8 3 组闹铃设置功能 9 8 位本地码设置,来电自动过滤 10 超强防雷、抗电磁干扰 安装方法 1.必须向当地电信局申请开通来电显示服务,本机才能正常接收来电号码。 2.首先,请按电池的正负极性将电池装在电池盒里。如发现显示淡时,请尽快更换电池。 3.将电话曲线两端插头分别插入座机左侧插座及手柄插座。 4.将两芯直线插在主机的外线插座上,另一端与市话网连接。 5.电话机应安装在干燥,通风,无腐蚀气体的地方。. 使用说明 挂机状态下按“设置/闪断”键, lcd 显示:set 12345678 ,表示进入主菜单,此时按“上翻”、“下翻”键或直接输入数字(1~8)进入下一菜单设置。在某项功能设置完成后,再按“设置/闪断”键进行确认,后按“删除/免ip”键退回上一目录或按“免提”键完全退出而回到待机状态。待机状态下,lcd 显示:2005, 具体功能设置项目如下:

以上所有设定按“设置”键确认,按“删除”键退回上一目录,按“免提”键退出。 日期、时间设置 挂机状态下按“设置/闪断”键,直接输入数字“1”,液晶屏幕显示:1-date 2-cl ,表示进入日期和时间设置子菜单,再直接输入数字“1”,液晶屏幕显示:d 2005 01-01 ,进入日期设置状态,同时数字光标在闪烁,提示输入日期,输入完后,再按“设置/闪断”键确认。日期设置成功后,按“删除/免ip”键退回上一菜单,液晶屏幕显示:1-date 2-cl ,输入数字“2”进行时间设置,时间设定状态下液晶屏幕显示:cl 00-00 ,其设定与日期设定的方法相同。设置成功后,按“删除/免ip”键退到主菜单或按“免提”键退到待机状态。 铃声选择与铃声音量调节 挂机状态下按“设置/闪断”键,直接输入数字“2”,液晶屏幕显示:r 1r 2vip3vol ,表示进入铃声设置子菜单,直接输入数字“1”此时进入铃声选择状态,液晶屏幕会提示:ring type 01 ,(若已设置了某种铃声,则显示已设置的铃声代号),按“上翻”、“下翻”键选择所需铃声后按“设置/闪断”键确认。选择铃声成功后,按“删除/免ip”键退回到上一菜单即铃声设置子菜单,输入数字“3”,液晶屏幕显示:ring vol 04 ,表示进入铃声音量选择状态,同时字体04 在闪烁,按“上翻”、“下翻”键选择所需铃声音量后按“设置/闪断”键确认(铃声音量为01~04 四级调节,黩认值为最大档)。铃声音量选择成功后,按“删除/免ip”键退到主菜单或按“免提”键退到待机状态。 闹铃设置 挂机状态下按“设置/闪断”键,直接输入数字“3”,液晶屏幕显示:al 1-2-3 ,进入闹铃设置子菜单,同时字体1-2-3在闪烁,直接输入数字“1”进入第一组闹铃设置,此时屏幕显示:alar off ,字体off 在闪烁(表示其初始状态为关,如已设置了闹铃时间则显示已设置的时间),直接输入闹铃所需时间(或在字体off 在闪烁时,按“上翻”、“下翻”键,液晶屏幕显示00 - 00 后再输入时间),按“设置/闪断”键确认;如要关闭闹铃则按“上翻”、“下翻”键选择,屏幕显示alar off ,后按“设置/闪断”键确认。其他2 组闹铃的设定与第1 组的设定方法相同。第2 组闹铃,初始状态为关,相应的液晶屏幕显示为:dayal1 off ;第3 组闹铃,初始状态为关,相应的液晶屏幕显示为:dayal2 off(注:第1组为单次闹铃,即每次启动后只有当次有效,第2、3 组为每日闹铃,即该两组一经启动后,每日到有效时间都会闹铃。每组闹铃的铃声都不相同,闹铃过程中,按任意键可退出)。闹铃设置成功后,按“删除/免ip”键退到主菜单或按“免提”键退到待机状态。 免打扰时间设置 挂机状态下按“设置/闪断”键,直接输入数字“4”,液晶屏幕显示:off_r 00-00 ,进入免打扰设置子菜单,同时00-0 0字体闪动(“-”之前的两个零表示小时,后面的两个零表示分钟),输入所需的免打扰时间按“设置/闪断”键确认。免打扰功能启动后,屏幕会显示免打扰时间并倒计时到00-00 后自动取消免打扰;或免打扰功能启动后,提机或按“免提”键也可退出。免打扰期间来电不振铃。免打扰功能设置成功后,按“删除/免ip”键退到主菜单或按“免提”键退到待机状态。 特殊功能选择设定 挂机状态下按“设置/闪断”键,直接输入数字“5”,液晶屏幕显示:1-f 2-pt 3-d ,进入闪断时间、p/t 转换和防盗功能设置子菜单,此时输入数字“1”,进入下一层的闪断时间设定状态,液晶屏幕会提示:flash 600,同时闪断时间在闪烁,按“上翻”、“下翻”键选择闪断时间按“设置/闪断”键确认(闪断时间有:90、95、100、120、180、300、600、1 000 毫秒供选择,默认值为600 毫秒);在闪断时间、p/t 转换和防盗功能设置子菜单输入数字“2”,进入p/t 转换状态,液晶屏幕提示:pt tone ,同时字体tone 在闪烁,表示拨号的初始状态为音频状态(拨号方式有音频和脉冲选择),按“上翻”、“下翻”键选择所需拨号方式后按“设置/闪断”键确认,若要选择为脉冲拨号,液晶屏幕应显示为:pt pu lse ;在闪断时间、p/t 转换和防盗功能设置子菜单输入数字“3”,进入防盗选择状态,lcd 提示:defend off ,同时字体off在闪烁,表示防盗的初始状态为关,此时按“上翻”、“下翻”键开启防盗按“设置/闪断”键确认,防盗功能打开,液晶屏幕显示为:defend on ,同样要关闭防盗,则在防盗选择子菜单下按“上翻”、“下翻”键选择后按“设置/ 闪断”键确认即可。该项功能设置成功后,按“删除/免ip”键退到主菜单或按“免提”键退到待机状态。 特殊码设定

相关主题
文本预览
相关文档 最新文档