Application programming principle of the communicator S1503 of long distance
Summary: S1503 is the long distance communicator that Swedish TagMaster AB Company produces, there is extensive application in the automatic recognition system. This text introduces S1503 system architecture and employs the programming principle especially, and explain its characteristic and application prospect. Keyword: S1503 the intersection of communicator and the intersection of incident and radio frequency discern S1503 long distance communicator that Company produces, TagMaster AB of Swedish, operating frequency is 2.45GHz, the read/write work station with wave speed of the circularly polarized antenna; Used for reading / making the identification label of the radio frequency in CONFIDENT system, there is extensive application in the system of discerning etc. to charge the train number of management, vehicle imports and exports management of parking lot and train in the vehicle. Its leading particulars is: Have reading the distance long of 6m; Can monitor the inner sports of 5m range; Offer the drive interface programs of C, Delphi and VB; Database with flash EEPROM; Offer DTMF and LED interface; Offer it with RS232 of main frame communication and 2/4 of the wiring system RS485 interfaces; Have DC/DC converter against EMI; Adopt the working power of 24V/12V. Fig. 1 is the internal structural representation of S1503. A system architecture (1)The structure CONFIDENT automatic recognition system of the hardware generally includes labels (such as S1251) , communicator ( S1503) And a host computer. The communicator passes RS232/485 and host computer connectionist implementation and communicates. Communicator and label realize communication through the microwave. ( 2) The software structure chart 2 is the structural representation of the software system. Confilib: CONFIDENT function library name. Include hundreds of communicators and manage function and ConfiTalk communication protocol interface function in this storehouse, offer at the same time and is suitable for Confilib edition that DOS, Windows3.1 and Windows 95 / different platforms of NT required. Confilib application program interface of PC platform offers in the form of C/C dynamic link library DLL, offer Visual Basic, Delphi language interface at the same time, Confilib which is suitable for the communicator is language C storehouse. Storehouse of these functions includes for example reading, the load, formatting label, read, write, search the database, the software and hardware is set up, read, write the I/O interface, send, receive the ConfiTalk command, the timer, such functions as management and mail of buffering area are managed. ConfiTalk: Standard communication protocol. This agreement stipulates communicator conveying and receive data, handles data flow, convey repeatedly, check-up and diaphanous way of data. This agreement can also be used for point-to-point communication and multi-point network communication, and adopt and inquire about the way. The frame stucture of information is: STXADRMESSAGECSETXSTX: Start character; ADR: Address and array; MESSAGE: Data needing conveying; CS: Check sum; ETX: End marker. Users can write the communication protocol by oneself to substitute ConfiTalk. Pyramid: Standard utility program that S1503 preassembled when being dispatched from the factory. S1503 which is installed Pyramid can make judgement and decision by oneself while reading labels or detecting sports; S1503 can receive the CohnfiTalk command of concurrent execution through the serial interface too at the same time. Paramid has four movement modes: On, Off, Read beep and Program beep. Under the intersection of On and mode, S1503 can single machine run, built-in database in S1503 keep message to register the label, when reading labels or detecting sports, the utility program changes the states of electrical relay, luminotron and beeper. Employ the intensity to send recorded information to the host computer through the mail at the same time. At the time of Off mode, the communicator is in running passively state, utilized ConfiTalk command control communicator S1503 by the host computer at this moment, Pyramid always listens to ConfiTalk command and mail information of the host computer. The communicator does not produce and record the content, does not do any movement. As needing host computer to utilize the Confilib command through the serial port ‘ Long-range function reference) While controlling the communicator, adopt this kind of mode. Read beep mode used for confirming in the installation communicator it reads the area. Under Read beep mode, reads a label, the same and transient buzz each time with communicator, but the label read will not be recorded. Program beep mode used for confirming the communicator writes the area of label. Under this mode, Pyramid is trying to write information to labels constantly, finishes writing after a series of information each time, the procedure sends out transient buzz. 2 tools programming the principle and developing S1503 system software include compiler, loading bin, driver program and function storehouse,etc.. Utilize, cross the intersection of compiler and Conficomp, can develop, debug the intersection of the communicator and utility program at the intersection of PC and platform, then utilize Confiload to download the software and download the utility program of the communicator. PC utility program all right for the intersection of use and any software to develop, including using Confilib function storehouse. In CONFIDENT system, how to program the communicator is a key, four kinds of control modes are suitable for consulting. ( 1) The communicator, utility program this way, is to replace the standard communicator utility program Pyramid with utility program that users write on the basis of Confilib storehouse function, all logic is judged the communicator utility program written by user is finished. The host computer can couple to communicator and read the communicator recorded information non-periodically, and upgrade the communicator database. The advantage of this way is to run fast, but the single machine runs; The shortcoming is to need PROM write device, lack the convenient interface. ( 2) Utilize the host computer utility program of the Confilib command in this way, the communicator S1503 is totally utilized host computer program control of Confilib storehouse function or other software development, the intellectual part of the system is in the host computer, do not do any logic to judge with communicator. When the application program of the host computer transfers Confilib function, translate the Confilib command into a ConfiTalk command automatically, then transmit to S1503. S1503 entertains the correspondent Confilib command according to the this command. The advantage of this way is: Compared with communicator utility program Pyramid control mode, have more convenient interfaces, the utility program of the host computer is more easy to develop, debug; The shortcoming is to carry out slowly. ( 3) Utility program and Pyramid of the host computer communicate in this way and is similar to second way. The main difference lies in the standard utility programs Pyramid of host computer and S1503 communicate, but not directness is the same as Confilib communication. Mainframe program and standard utility program of the communicator realize communication through mutually sending mails. The advantage of adopting this way is: Host computer utility program simple, some logic judge, can assign communicator utility program, and obtain faster running speed; The shortcoming is: Pyramid mail does not support to write label and database management function, however, these functions can be realized through the Confilib/Confitalk command. ( 4) User’s agreement, this way, is besides Confilib in the communicator, all software is written by users, when the system uses the agreement beyond ConfiTalk, adopts this way. The advantage of this way is: Can realize the agreement communication beyond the communicator ConfiTalk; Shortcoming writer quantity loud, development cycle is long. 3 employs programming incident to refer to the irregular thing that happens beyond normal program execution. The incident can come from the outside ‘ Such as key set) ,Also can come from inside ‘ Such as timer) . The core of S1503 program library is a piece of module which is called the incident device, its application of majority is driven by the incident. The incident that there are seven pieces of module to emerge in Confilib storehouse, the incident that may be produced includes: DTMF (the interface of dual tone multifrequency is input) , Push_Button (the key set on communicator control panel is pushed) , Doppler_Radar (Doppler radar detects the body in motion) , Par_In (run side by side in the input aperture and input) , Timer (the time-recorder arrival time when sets up) , Tag (succeed in reading a label) , Tamper_Switch (protect on off action) , Null_Event (after inquiry, there was not incident to happen since last time) , Reset_Event (system reset) . Except protecting the switch, all other incident module can produce the incident after initialisation. When emerging in incident, the system responds to and combines the write communicator incident processor in time, utility program communication transfers Bsw_Event_Handler_Get_Event ‘ )Read the incident from the communicator; Have incident happen, call above function return their incident type, corresponding data; Except for the incident happens, return Null_Event. So, the utility program should be a dead loop which waits for the incident. When the incident happens, the utility program adjusts and responds to this incident with appropriate incident handler. Employ the flow of program to be shown as in Fig. 3. 4 communication programming communicators S1503 and host computers carry on the communication exchange message, there are three kinds of methods: Dynamic buffer of utilizing CONFIDENT storehouse function to support; Exploit the communication protocol that one grade of Apparatus driving function came from defining of byte of serial communication interface offered by company’s institute; Exploit the mail interchange system offered by CONFIDENT software library. In the real application of S1503, it is very extensive that the mail interchange system is employed. The communicator uses the mail interchange system by transferring function Msw_Mail_Init, Msw_Mail_Send and Msw_Mail_Receive,etc.. The prerequisite of using the mail interchange system is a at least one idle dynamic buffer of the system. In the initialized mail system, the function will occupy and number the most high dynamic buffer. Use the mail interchange system including two parts: Main frame communication procedure ( Fig. 4) And communicator communicate procedure ‘ Fig. 5) ,Function host computer receive communicator send mail that come, the content for display of the mail at the screen; Meanwhile, whenever the space bar is pushed, change the communicator quiet mode; The incident of reading labels of the communicator, and send the label data to the host computer through the mail. Host computer can set up communicator as quiet mode through mail, host computer read the intersection of label and the intersection of data and mail at for non- quiet mode communicator. In real application, can be chosen appropriate system architecture and control mode. It is very flexible to employ programming too, users can choose the appropriate language according to one’s own characteristic. So, S1503 and like product have extensive application prospect in the control system of automatic recognition.