图片
图片
新闻详情
 
图片
文章搜索
 
 
文章正文
3-The serial communication system
作者:管理员    发布于:2009-12-15 16:21:52    文字:【】【】【

    The serial communication system [emdos] instructions

Ladies and gentlemen, dear friends and relatives:
    Moto Koji will tell you in detail introduces serial communication system [emdos] of the installation, use and technical key points, welcome to my shop.

    The serial communication system [emdos] using z893 packet protocol, generic products are not in a traditional sense. It uses the data format is the standard RS-232 format: a start bit, 8 data bits, 1 stop bit, no parity bit. The software supports: 1200, 2400, 4800, 9600, 14400, 28800, 38400, 57600, 115200 and other traditional baud rate.

    The serial communication system [emdos] has a unique function of some people is very difficult to see:
    [1] can automatically detect the z893 serial baud rate, and the serial port of PC, is automatically set to the same baud rate; of course, can also be set by reverse PC z893 the serial baud rate.
    [2] if the serial port node for the baud rate of non-standard baud rate, would enable a default baud rate, for both temporary communication used, after z893 is restarted, the node will once again return to the original setting of the baud rate.
    The serial communication system [emdos] less resource, the operation is simple, with open type structure, can through the PC, software and hardware system of z893 for remote testing and repair work, for some important parameters in the network configuration settings.
    Emdos serial communication system [] allows to start multiple windows on the desktop, on the same serial, all instructions for the simulation of z893.

    Can be an exaggeration to say, no [emdos] no z893 serial communication system.

    Catalog

    1 emdos serial communication system [tool] work flow
    (1) z893
    (2) the USB serial port
    (3) installation
    (4) start
    (5) the serial port
    (6) the baud rate
    (7) write / length
    (8) read / length
    (9) [] start serial communication function keys
    (10) the maximum expected time
    1.01 [RD]. read operation routines.
    1.02 [WR]. write operation routines.
    1.03 [XCH]. switching operation of routines.
    1.04 [ADD]. plus routine operation.
    1.05 [SUB]. minus operating routines.
    1.06 [CLR]. removal. The routine operation
    1.07 open [ON]. operating routines.
    1.08 [OFF].. The routine operation
    1.09 Reverse routine operation of [CPL]..
    1.10 automatic baud rate configuration ""
    1.11 "the baud rate automatically modify"
    1.12 read (high speed channel)
    1.13 read IP address pointer
    1.14 z893 shorthand lips

    1 emdos serial communication system [tool] work flow
    (1) z893
    Please connect the z893 on the serial port, and good working power supply.
    (2) the USB serial port
    If you are using USB serial port, it must install the driver must.
    (3) installation
    Through QQ, Wangwang, or u, drag and drop the file on the desktop, the software is installed.Software placed on the desktop, you see a chop like icons, engraved with two lines of characters, EM, z893. The words below the icon, indicating this is a what kind of software.
    (4) start
    Using the mouse is key, double-click the icon, the operating system kernel can correctly identify the two versions: Windows XP or windows 7, adjust the different modes of operation, the main window and the serial communication system [emdos], accurately placed right in the middle of the desktop.
    Using the mouse gently across the window, will find the four options, two edit editor window, a function key. The four options are: serial port address, baud rate, write / read / length, length.Two edit editing window: the left for the serial data output work area; right for the serial input data work area. A function key is: "start [serial communication]" function key.
    (5) the serial port.
    Each power up, the initial value is displaying com?, suggest you must enter the correct serial port address. The software does not use the registry mode allows the PC to start, because many exe application window.
    Serial address is a special option, that is "emdos", for the rest of the dat option.
    (6) the baud rate
    Each power up, the initial value of the display is 115200, which is the highest baud rate PC default. Baud rate adjustment range for 1200-115200. High baud rate, must be used in plc.
    The baud rate is a special option, that is "emdos", for the rest of the dat option.
    (7) write / length
    Write / length refers to the output packet length, it should be equal to the data and instruction]+[[], and should not contain two byte packet length itself.
    (8) read / length
    Read / length refers to the length of the input packet, it should be equal to the input data and all. And should not contain two byte packet length itself.
    Read / two special option length, namely "empty" and "*", for the rest of the dat option.
    [1] "empty" as the default option,
    The kernel will automatically record all data, and the data list display.
    The first column is the absolute length of label;
    The second column is the length of the data label;
    The third column for binary data;
    The fourth column is the decimal data;
    [2] "*" for the parameters in the table preferences, the kernel will automatically record all data, and deduct the length identification, character content, list by binary data.
    [3] "dat" as a valid character quantity, the kernel will according to DAT, the interception of data flow, for window display.
    (9) [] start serial communication function keys
    Using the mouse is key, click "start [serial communication]" function button once, the kernel will be sampled once: "the serial data output work area" of the data, according to the packet length, output to z893. If the packet length is greater than the actual input data, will be 0 as an alternative data, at the same time waiting for feedback information in z893. If the feedback information, the kernel will display information in the "serial input data in the work area" according to the user setting mode.
    [serial communication software support "combo continuous mining" function: click the N times, the kernel will sample n times.
    (10) the maximum expected time
    Start kernel output and input process output, in general, are usually relatively quickly, while the input is not necessarily, it is affected by many factors:
    [1] serial port baud rate matching device node,
    [2] The baud rate of router,
    [3] Processing capability of target cpu,
    [4] packet length,
    [5] Updated display window.
    These factors generally add up to no more than 1 seconds, but if the baud rate of z893 do not match, or network failure, it will lead to the kernel lock.
    [single watchdog serial communication], the maximum expected time is about 5 seconds. If you use a "combo continuous mining" function, click n times, will be the corresponding extended to 5 N seconds.

    1.01 [RD]. read operation routines.

    The z893 instruction format:
    [01][H][L][] [RD]. The length of read
    [default: length is #00H =256 bytes
    As shown in fig.:
    In [write / fill length] workspace: [4];
    Fill in the [write edit] workspace: [1][0][0][4];
    Its meaning is: "from the beginning of [HL] address of the 0000 places, to read 4 bytes of data".
    Using the mouse is kin, click "start [serial communication]" function keys, immediately appeared in the input data in the edit window.
    In the input data, the first 2 byte packet length, 0005 is 5 bytes in length.
    The first 4 bytes for [HL] data,
    The last one is the end of [#55h] code.

    1.02 [WR]. write operation routines.

    The z893 instruction format:
    [02][H][L][... ] [WR]. The length of write
    [default: length is #00H =256 bytes
    As shown in fig.:
    In [write / fill length] workspace: [8];
    Fill in the [write edit] workspace: [2][0][0][4][1][2][3][4];
    Its meaning is: "from the beginning of [HL] address 0000 place, write 4 bytes of data".
    Using the mouse is kin, click "start [serial communication]" function keys, immediately appeared in the input data in the edit window.
    In the input data, the first 2 byte packet length, 0005 is 5 bytes in length.
    The first 4 bytes for [HL] data,
    The last one is the end of [#55h] code.

    1.03 [XCH]. switching operation of routines.

    The z893 instruction format:
    [03][H][L][... [XCH]. The length of exchange
    [default: length is #00H =256 bytes
    As shown in fig.:
    In [write / fill length] workspace: [8];
    Fill in the [write edit] workspace: [3][0][0][4][1][2][3][4];
    Its meaning is: "from the beginning of [HL] address 0000 place, read the original 4 bytes of data, and write a new 4 bytes of data".
    Using the mouse is kin, click "start [serial communication]" function keys, immediately appeared in the input data in the edit window.
    In the input data, the first 2 byte packet length, 0005 is 5 bytes in length.
    The first 4 bytes for [HL] data,
    The last one is the end of [#55h] code.

    1.04 [ADD]. plus routine operation.

    The z893 instruction format:
    [04][H][L][... ] [ADD]. The length of plus
    [default: length is #00H =256 bytes
    [default: overflow (C) the maximum byte length for =256]
    As shown in fig.:
    In [write / fill length] workspace: [8];
    Fill in the [write edit] workspace: [4][0][0][4][1][2][3][4];
    Its meaning is: "from the beginning of [HL] address 0000 place, add 4 bytes of data".
    Using the mouse is kin, click "start [serial communication]" function keys, immediately appeared in the input data in the edit window.
    In the input data, the first 2 byte packet length, 0005 is 5 bytes in length.
    The first 4 bytes for [HL] data,
    The last one is the end of [#55h] code.

    1.05 [SUB]. minus operating routines.

    The z893 instruction format:
    The length of [05][H][L][... ] [SUB]. reduction
    [default: length is #00H =256 bytes
    [default: overflow (C) the maximum byte length for =256]
    As shown in fig.:
    In [write / fill length] workspace: [8];
    Fill in the [write edit] workspace: [5][0][0][4][1][2][3][4];
    Its meaning is: "from the beginning of [HL] address 0000 place, reduced into 4 bytes of data".
    Using the mouse is kin, click "start [serial communication]" function keys, immediately appeared in the input data in the edit window.
    In the input data, the first 2 byte packet length, 0005 is 5 bytes in length.
    The first 4 bytes for [HL] data,
    The last one is the end of [#55h] code.

    1.06 [CLR]. removal. The routine operation

    The z893 instruction format:
    The length of [06][H][L][] [CLR]. clearance
    [default: length is #00H =256 bytes
    As shown in fig.:
    In [write / fill length] workspace: [4];
    Fill in the [write edit] workspace: [6][0][0][4];
    Its meaning is: "from the beginning of [HL] address of the 0000 places, the clearance of 4 bytes of data".
    Using the mouse is kin, click "start [serial communication]" function keys, immediately appeared in the input data in the edit window.
    In the input data, the first 2 byte packet length, 0005 is 5 bytes in length.
    The first 4 bytes for [HL] data,
    The last one is the end of [#55h] code.

    1.07 open [ON]. operating routines.

    The z893 instruction format:
    [07][H][L][D] [ON]. open
    [address HL data according to the results of OUT] D 1 Series
    As shown in fig.:
    In [write / fill length] workspace: [4];
    Fill in the [write edit] workspace: [7][0][0][4];
    Its meaning is: "the [HL] address 0000 data according to D 1 results on the OUT".
    Using the mouse is kin, click "start [serial communication]" function keys, immediately appeared in the input data in the edit window.
    In the input data, the first 2 byte packet length, 0002 is 2 bytes in length.
    Before a byte to the data in the [HL],
    The last one is the end of [#55h] code.

    1.08 [OFF].. The routine operation

    The z893 instruction format:
    [08][H][L][D] [OFF]. off
    [address HL data according to the results of OUT] D 0 series
    As shown in fig.:
    In [write / fill length] workspace: [4];
    Fill in the [write edit] workspace: [8][0][0][4];
    Its meaning is: "the [HL] address 0000 data according to D 0 results on the OUT".
    Using the mouse is kin, click "start [serial communication]" function keys, immediately appeared in the input data in the edit window.
    In the input data, the first 2 byte packet length, 0002 is 2 bytes in length.
    Before a byte to the data in the [HL],
    The last one is the end of [#55h] code.

    1.09 Reverse routine operation of [CPL]..

    The z893 instruction format:
    [09][H][L][D] [CPL].Reverse
    [address HL data by D. The results on inverse OUT]
    As shown in fig.:
    In [write / fill length] workspace: [4];
    Fill in the [write edit] workspace: [9][0][0][4];
    Its meaning is: "the [HL] address in the 0000 data by D. The results on inverse OUT".
    Using the mouse is kin, click "start [serial communication]" function keys, immediately appeared in the input data in the edit window.
    In the input data, the first 2 byte packet length, 0002 is 2 bytes in length.
    Before a byte to the data in the [HL],
    The last one is the end of [#55h] code.

    1.10 automatic configuration of the PC serial port baud rate ""

    As shown in fig.:
    [1] choose the right "serial port address".
    [2] is the key with the mouse, click the "baud" the window menu, select"@emdos".
    Its meaning is: "automatically read z893 the serial baud rate, and the parameters of PC serial port placement".
    Using the mouse is kin, click "start [serial communication]" function keys, immediately appeared in the input data in the edit window.
    The following data input window display:
    0   -  00  0
    1   -  04  4
    2  00  00  0
    3  01  FF  255
    4  02  E8  232
    5  03  55  85
    [baud rate =115200]
    [crystal =44236800]
    [CPU=88473600]
    [3] if the baud rate of z893 in 1200-115200, PC will according to the actual baud rate matching.
    Z893 user port baud rate, can be perfectly compatible with 1200, 2400, 4800, 9600, 14400, 19200, 28800, 38400, 57600, 115200 etc. the baud rate, and the deviation coefficient of 0%.
    [4] if the baud rate of z893 >115200, PC will be the other temporary design into 1200, and one's own is also designed to be 1200, forming the communication matching.
    [5]z893 serial port baud rate, the minimum of 1200 nodes, usually the default is 115200, which is also the highest baud rate of PC terminal.
    The PC end of the baud rate, the adjusting range is 1200-115200 bp/s, and z893 practical support user terminal baud rate, far higher than the 115200.
    The maximum baud rate of z893 by the CPU working frequency limit, with 88.4736MHz-12 clock as an example, the baud rate adjustment range for 1200-2.7648M bp/s.
    Higher than the baud rate of 115200bp/s, it is not compatible with the existing PC operating system.
    Integer z893 recommends the use of 115200bp/s, the advantage of this is that in the compatible PC baud rate, coefficient to obtain zero deviation.
    Z893 crystal active commonly have four frequency points, which is 29.4912 MHz, 36.8640MHz, 44.2368MHz, 49.7664MHz; the four frequency points are integer times 115200, respectively 16 times, 20 times, 24 times, 27 times.
    As shown below:
    Active crystal 29.4912MHz, CPU frequency of 58.9824MHz, the highest baud rate of 1.8432Mbp/s, rate of 16.
    Active crystal 36.8640MHz, CPU frequency of 73.7280MHz, the highest baud rate of 2.3040Mbp/s, rate of 20.
    Active crystal 44.2368MHz, CPU frequency of 88.4736MHz, the highest baud rate of 2.7648Mbp/s, rate of 24.
    Active crystal 49.7664MHz, CPU frequency of 99.5328MHz, the highest baud rate of 3.1104Mbp/s, rate of 27.
    Because of cost considerations, we present the choice is the FSB crystal 44.2368MHz, CPU 88.4736 MHz operating frequency (OC 10%), 12 cycle instruction, the maximum baud rate is 2.764Mbp/s.
    The speed is very fast, the token rate of about 6-7 million times per second, the response time can reach 10-20us. While the token speed of similar products is only 1000 times / sec, the response time is about 1ms. Compared the two, it is a big gap, took over the CAN bus more than 50 times faster about!

    1.11 automatic modification of z893 serial port baud rate ""

    Automatic modification of z893 serial "baud" must follow the two steps:
    [1] is first detected in z893 serial baud rate to PC memory,
    [2] by reverse PC settings in z893 serial baud rate.

    [1] choose the right "serial port address".
    [2] is the key with the mouse, click the "baud" the window menu, select"@emdos".
    Its meaning is: "automatically read z893 the serial baud rate, and the parameters of PC serial port placement".
    Using the mouse is kin, click "start [serial communication]" function keys, immediately appeared in the input data in the edit window.
    The following data input window display:
    0   -  00  0
    1   -  04  4
    2  00  00  0
    3  01  FF  255
    4  02  E8  232
    5  03  55  85
    [baud rate =115200]
    [crystal =44236800]
    [CPU=88473600]
    [3] if the baud rate of z893 in 1200-115200, PC will according to the actual baud rate matching.
    [4] if the baud rate of z893 >115200, PC will be the other temporary design into 1200, and one's own is also designed to be 1200, forming the communication matching.

    [5] is the key with the mouse, click the "serial port address" the window menu, select"@emdos".
    Its meaning is: "automatic reverse configuration in z893 serial baud rate".
    [6] is the key with the mouse, click the "baud" the window menu, "115200".
    Its meaning is: "reverse configuration in z893 serial port baud rate to 115200".
    [7] use the mouse is kin, click "start [serial communication]" function key.
    Will pop up a reminder: "baud rate setting is [115200]?" ;

    Tip with two function keys: "Yes", "no".
    Using the mouse is key, click "yes".
    Then a pop-up hint: "the current wave rate has been set to [115200]";

    Tip attached to a function key: "Yes".
    Using the mouse is key, click "yes".
    The following data input window display:
    [baud rate =115200]
    [crystal =44236800]
    [CPU=88473600]
    The new serial port baud rate
    New baud rate started successfully

    The above routines can also apply to other baud rate.
    Z893 user port baud rate, can be perfectly compatible with 1200, 2400, 4800, 9600, 14400, 19200, 28800, 38400, 57600, 115200 etc. the baud rate, and the deviation coefficient of 0%.
    Z893 serial port baud rate matching node minimum 1200, maximum baud rate by the CPU working frequency limit.
    Theory:
    Using 100MHz-12 cycle of CPU, the maximum baud rate is 3.125Mbp/s;
    Using 100MHz- 1 cycle CPU, maximum baud rate is 6.25Mbp/s;
    The baud rate is usually higher than that of 115200bp/s, for use with PLC, it is not compatible with the existing PC operating system. The maximum baud rate z893 the default is integer times of 115200bp/s, the advantage of this is that in the compatible PC baud rate, coefficient to obtain zero deviation.
    At present, the default specifications as shown below (12 cycle):
    Active crystal 29.4912MHz, CPU frequency of 58.9824MHz, the highest baud rate of 1.8432Mbp/s, rate of 16.
    Active crystal 36.8640MHz, CPU frequency of 73.7280MHz, the highest baud rate of 2.3040Mbp/s, rate of 20.
    Active crystal 44.2368MHz, CPU frequency of 88.4736MHz, the highest baud rate of 2.7648Mbp/s, rate of 24.
    Active crystal 49.7664MHz, CPU frequency of 99.5328MHz, the highest baud rate of 3.1104Mbp/s, rate of 27.

1.12 read (high speed channel)

    The z893 instruction format:
    [length =1]
    [IN.DAT=00H] (high speed channel) [read]
    [1] The editor window to fill in the "first byte in edit 0";
    [2] will "write / length" is set to 1.
    [3] is the key with the mouse, click "start [serial communication]" function key.
    The following data input window display:
    0   -  00  0
    1   -  05  5
    2  00  2F  47
    3  01  03  3
    4  02  00  0
    5  03  C8  200
    6  04  55  85
    The input data, the first 2 byte packet length, the 3-6 byte DAT byte code, tail end.

1.13 read IP address pointer

    The z893 instruction format:
    [length =1]
    [IN.DAT=01H] [IP] read address pointer
    [1] The editor window to fill in the "first byte in edit 1";
    [2] will "write / length" is set to 1.
    [3] is the key with the mouse, click "start [serial communication]" function key.
    The following data input window display:
    0   -  00  0
    1   -  02  2
    2  00  00  0
    3  01  55  85
    The input data, the first 2 byte packet length, third byte IP address,... The tail end, byte code.
    If z893 is a multistage network, IP data will increase, the maximum is 128 level.           Identification code for each level of IP 256 (binary code is 00-ffh), the total number of nodes in theory for 128 to the power of 256, much larger than the traditional Internet IPv4, IPv6.

    1.14 z893 shorthand lips

    Data package in front of station,
    1 2 3 exchange,
    4 plus 5 minus 6 clear,
    7 on 8 off 9 inversion.

    The 0 is to retain the 1 effective,
    Switch for anti bit dawn,
    Addition and subtraction overflow with page,
    Low after the former high to remember.

    Welcome to my shop, thanks again for about!

 

 
脚注信息
版权所有 Mes.电子印 1985-2019
亲:购物请点击  http://shop119129292.taobao.com   登陆我的淘宝店