亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ldmicro.txt

?? 用PIC單片機與AVR單片機製作PLC控制的階梯圖程序。
?? TXT
?? 第 1 頁 / 共 4 頁
字號:
    the exact string printed will be `Pressure:  35\r\n' (note the extra
    space). If instead `var' were equal to 1432, then the behaviour would
    be undefined, because 1432 has more than three digits. In that case
    it would be necessary to use `\4' instead.

    If the variable might be negative, then use `\-3d' (or `\-4d'
    etc.) instead. That will cause LDmicro to print a leading space for
    positive numbers, and a leading minus sign for negative numbers.

    If multiple formatted string instructions are energized at once
    (or if one is energized before another completes), or if these
    instructions are intermixed with the UART TX instructions, then the
    behaviour is undefined.

    It is also possible to use this instruction to output a fixed string,
    without interpolating an integer variable's value into the text that
    is sent over serial. In that case simply do not include the special
    escape sequence.

    Use `\\' for a literal backslash. In addition to the escape sequence
    for interpolating an integer variable, the following control
    characters are available:
        * \r   -- carriage return
        * \n   -- newline
        * \f   -- formfeed
        * \b   -- backspace
        * \xAB -- character with ASCII value 0xAB (hex)

    The rung-out condition of this instruction is true while it is
    transmitting data, else false. This instruction consumes a very
    large amount of program memory, so it should be used sparingly. The
    present implementation is not efficient, but a better one will
    require modifications to all the back-ends.


A NOTE ON USING MATH
====================

Remember that LDmicro performs only 16-bit integer math. That means
that the final result of any calculation that you perform must be an
integer between -32768 and 32767. It also mean that the intermediate
results of your calculation must all be within that range.

For example, let us say that you wanted to calculate y = (1/x)*1200,
where x is between 1 and 20. Then y goes between 1200 and 60, which
fits into a 16-bit integer, so it is at least in theory possible to
perform the calculation. There are two ways that you might code this:
you can perform the reciprocal, and then multiply:

   ||         {DIV  temp  :=}          ||
   ||---------{ 1 / x       }----------||
   ||                                  ||
   ||          {MUL  y  :=  }          ||
   ||----------{ temp * 1200}----------||
   ||                                  ||

Or you could just do the division directly, in a single step:

   ||           {DIV  y  :=}           ||
   ||-----------{ 1200 / x }-----------||

Mathematically, these two are equivalent; but if you try them, then you
will find that the first one gives an incorrect result of y = 0. That
is because the variable `temp' underflows. For example, when x = 3,
(1 / x) = 0.333, but that is not an integer; the division operation
approximates this as temp = 0. Then y = temp * 1200 = 0. In the second
case there is no intermediate result to underflow, so everything works.

If you are seeing problems with your math, then check intermediate
results for underflow (or overflow, which `wraps around'; for example,
32767 + 1 = -32768). When possible, choose units that put values in
a range of -100 to 100.

When you need to scale a variable by some factor, do it using a multiply
and a divide. For example, to scale y = 1.8*x, calculate y = (9/5)*x
(which is the same, since 1.8 = 9/5), and code this as y = (9*x)/5,
performing the multiplication first:

   ||         {MUL  temp  :=}          ||
   ||---------{ x * 9       }----------||
   ||                                  ||
   ||           {DIV  y  :=}           ||
   ||-----------{ temp / 5 }-----------||

This works for all x < (32767 / 9), or x < 3640. For larger values of x,
the variable `temp' would overflow. There is a similar lower limit on x.


CODING STYLE
============

I allow multiple coils in parallel in a single rung. This means that
you can do things like this:

   ||       Xa               Ya        ||
 1 ||-------] [--------------( )-------||
   ||                                  ||
   ||       Xb               Yb        ||
   ||-------] [------+-------( )-------||
   ||                |                 ||
   ||                |       Yc        ||
   ||                +-------( )-------||
   ||                                  ||

Instead of this:

   ||       Xa               Ya        ||
 1 ||-------] [--------------( )-------||
   ||                                  ||
   ||                                  ||
   ||                                  ||
   ||                                  ||
   ||       Xb               Yb        ||
 2 ||-------] [--------------( )-------||
   ||                                  ||
   ||                                  ||
   ||                                  ||
   ||                                  ||
   ||       Xb               Yc        ||
 3 ||-------] [--------------( )-------||
   ||                                  ||

This means that in theory you could write any program as one giant rung,
and there is no need to use multiple rungs at all. In practice that
would be a bad idea, because as rungs become more complex they become
more difficult to edit without deleting and redrawing a lot of logic.

Still, it is often a good idea to group related logic together as a single
rung. This generates nearly identical code to if you made separate rungs,
but it shows that they are related when you look at them on the ladder
diagram.

                  *                 *                  *

In general, it is considered poor form to write code in such a way that
its output depends on the order of the rungs. For example, this code
isn't very good if both Xa and Xb might ever be true:

   ||       Xa         {v  :=       }  ||
 1 ||-------] [--------{ 12      MOV}--||
   ||                                  ||
   ||       Xb         {v  :=       }  ||
   ||-------] [--------{ 23      MOV}--||
   ||                                  ||
   ||                                  ||
   ||                                  ||
   ||                                  ||
   ||      [v >]             Yc        ||
 2 ||------[ 15]-------------( )-------||
   ||                                  ||

I will break this rule if in doing so I can make a piece of code
significantly more compact, though. For example, here is how I would
convert a 4-bit binary quantity on Xb3:0 into an integer:

   ||                                   {v  :=       }  ||
 3 ||-----------------------------------{ 0       MOV}--||
   ||                                                   ||
   ||       Xb0                  {ADD  v  :=}           ||
   ||-------] [------------------{ v + 1    }-----------||
   ||                                                   ||
   ||       Xb1                  {ADD  v  :=}           ||
   ||-------] [------------------{ v + 2    }-----------||
   ||                                                   ||
   ||       Xb2                  {ADD  v  :=}           ||
   ||-------] [------------------{ v + 4    }-----------||
   ||                                                   ||
   ||       Xb3                  {ADD  v  :=}           ||
   ||-------] [------------------{ v + 8    }-----------||
   ||                                                   ||

If the MOV statement were moved to the bottom of the rung instead of the
top, then the value of v when it is read elsewhere in the program would
be 0. The output of this code therefore depends on the order in which
the instructions are evaluated. Considering how cumbersome it would be
to code this any other way, I accept that.


BUGS
====

LDmicro does not generate very efficient code; it is slow to execute, and
wasteful of flash and RAM. In spite of this, a mid-sized PIC or AVR can
do everything that a small PLC can, so this does not bother me very much.

The maximum length of variable names is highly limited. This is so that
they fit nicely onto the ladder diagram, so I don't see a good solution
to that.

If your program is too big for the time, program memory, or data memory
constraints of the device that you have chosen then you probably won't
get an error. It will just screw up somewhere.

Careless programming in the file load/save routines probably makes it
possible to crash or execute arbitrary code given a corrupt or malicious
.ld file.

Please report additional bugs or feature requests to the author.

Thanks to:
    * Marcelo Solano, for reporting a UI bug under Win98
    * Serge V. Polubarjev, for not only noticing that RA3:0 on the
      PIC16F628 didn't work but also telling me how to fix it
    * Maxim Ibragimov, for reporting and diagnosing major problems
      with the till-then-untested ATmega16 and ATmega162 targets
    * Bill Kishonti, for reporting that the simulator crashed when the
      ladder logic program divided by zero
    * Mohamed Tayae, for reporting that persistent variables were broken
      on the PIC16F628
    * David Rothwell, for reporting several user interface bugs and a
      problem with the "Export as Text" function


COPYING, AND DISCLAIMER
=======================

You may redistribute LDmicro in unmodified form however you would
like. You may not modify LDmicro. The source code to LDmicro is not
generally available. Commercial use is permitted, within the constraints
given above. Contact me for support or enhancements.

THIS PROGRAM IS DISTRIBUTED WITH NO WARRANTY, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. DO NOT USE CODE GENERATED BY LDMICRO IN APPLICATIONS IN
WHICH SOFTWARE FAILURE COULD RESULT IN DANGER TO HUMAN LIFE OR DAMAGE
TO PROPERTY. THE AUTHOR ASSUMES NO LIABILITY FOR ANY DAMAGES RESULTING
FROM THE OPERATION OF LDMICRO OR CODE GENERATED BY LDMICRO.


Jonathan Westhues

Rijswijk      -- Dec 2004
Waterloo ON   -- Jun, Jul 2005
Cambridge MA  -- Sep, Dec 2005
                 Feb, Mar 2006
                 Feb 2007

Email: user jwesthues, at host cq.cx


?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
麻豆久久一区二区| 亚洲一区中文日韩| 欧美成人一区二区三区在线观看| 色综合色综合色综合| 99久久久精品| 91在线视频免费观看| 97se亚洲国产综合自在线| 成人福利电影精品一区二区在线观看| 国产精品一品视频| 成人av网在线| 欧美在线小视频| 777久久久精品| 日韩欧美一二三四区| 欧美一区二区三级| 欧美mv日韩mv国产网站app| 精品99999| 一色屋精品亚洲香蕉网站| 亚洲欧美福利一区二区| 亚洲成av人综合在线观看| 日韩二区在线观看| 国产乱人伦偷精品视频不卡 | 99久久精品情趣| av在线这里只有精品| 91影院在线观看| 欧美狂野另类xxxxoooo| 久久品道一品道久久精品| 欧美激情一区在线| 亚洲第一搞黄网站| 狠狠色伊人亚洲综合成人| 成人一区二区三区中文字幕| 91久久精品一区二区| 欧美一区二区三区视频| 亚洲国产精品成人综合色在线婷婷| 亚洲国产经典视频| 日韩中文欧美在线| 国产成人免费视频网站高清观看视频| 99精品视频一区| 91麻豆精品国产| 一区二区中文视频| 久久99精品国产麻豆婷婷洗澡| 国产99精品国产| 欧美一区二区三区免费视频| 欧美激情一区二区三区不卡| 午夜伦理一区二区| 成人一区二区三区在线观看| 51精品秘密在线观看| 国产精品久线观看视频| 免费观看一级欧美片| 色欧美88888久久久久久影院| 欧美成va人片在线观看| 亚洲一区二区三区四区在线观看| 国产精品一二三| 欧美一区二区三区喷汁尤物| 一区二区三区四区激情| 国产老妇另类xxxxx| 欧美一级欧美三级| 亚洲国产毛片aaaaa无费看| av一区二区三区四区| 久久综合久久综合亚洲| 日本亚洲一区二区| 欧洲人成人精品| 中文字幕日韩精品一区| 国产99久久久精品| 亚洲精品一区二区三区在线观看| 亚洲国产精品麻豆| 在线中文字幕一区二区| 日韩理论片一区二区| 国产99久久久国产精品| 久久久99久久| 国产精品996| 国产亚洲精品aa| 国产综合色视频| 精品国产一区二区三区忘忧草| 日韩国产在线观看一区| 欧美视频一区二区三区在线观看| 亚洲欧美自拍偷拍| 91在线观看美女| 亚洲欧美日韩国产成人精品影院 | 国产成人亚洲精品青草天美| 欧美一级黄色大片| 毛片基地黄久久久久久天堂| 91精品国产综合久久久久久久 | 国产精品区一区二区三区| 国产成a人亚洲| 中文字幕不卡的av| 成人午夜电影小说| 国产精品久久久久久久久动漫| 国产不卡视频一区| 亚洲欧洲综合另类| 欧美日韩中文字幕精品| 日韩精品久久久久久| 欧美v日韩v国产v| 91日韩在线专区| 亚洲v精品v日韩v欧美v专区| 在线播放欧美女士性生活| 久久99蜜桃精品| 久久久久国产精品厨房| 97久久久精品综合88久久| 亚洲综合自拍偷拍| 在线91免费看| 国产精品综合在线视频| 亚洲欧美日韩成人高清在线一区| 色悠久久久久综合欧美99| 婷婷国产v国产偷v亚洲高清| 精品国产一区二区三区不卡 | 91豆麻精品91久久久久久| 午夜亚洲国产au精品一区二区| 日韩欧美国产三级电影视频| 国产九色精品成人porny| ●精品国产综合乱码久久久久| 欧美精品tushy高清| 国产成人在线视频免费播放| 一区二区欧美在线观看| 久久久一区二区三区捆绑**| 色综合激情久久| 国产主播一区二区| 亚洲综合一区二区精品导航| 久久久三级国产网站| 欧美体内she精高潮| 国产剧情av麻豆香蕉精品| 亚洲综合无码一区二区| 久久久精品日韩欧美| 欧美日韩一区视频| 成人动漫一区二区三区| 日本不卡的三区四区五区| 国产精品你懂的在线| 日韩免费一区二区| 欧美综合一区二区| 波多野结衣在线一区| 激情综合五月婷婷| 午夜视频在线观看一区二区| 欧美国产精品中文字幕| 日韩精品一区在线| 欧美日韩一区二区在线观看| 成人app网站| 国产一区二区三区四区在线观看 | 日韩一区二区在线观看视频播放| 99久久精品国产一区二区三区| 蜜桃久久久久久久| 日韩精品久久久久久| 亚洲国产wwwccc36天堂| 亚洲激情一二三区| 亚洲图片另类小说| 男女激情视频一区| 亚洲电影视频在线| 亚洲国产成人av网| 一区二区三区欧美亚洲| 亚洲欧美二区三区| 中文字幕视频一区二区三区久| 国产欧美中文在线| 精品裸体舞一区二区三区| 日韩一区二区三区电影在线观看| 4438亚洲最大| 91精品国产91久久久久久一区二区| 欧美图片一区二区三区| 欧美性三三影院| 欧美美女视频在线观看| 制服丝袜成人动漫| 日韩欧美中文字幕精品| 欧美xxxx老人做受| 久久这里只精品最新地址| 精品国产免费一区二区三区香蕉| 日韩欧美一区中文| 欧美xxxxxxxx| 欧美激情在线看| 中文字幕一区二区三区不卡| 亚洲欧美日韩中文字幕一区二区三区| 亚洲免费观看高清完整| 午夜亚洲国产au精品一区二区| 日韩av中文字幕一区二区三区| 日产国产欧美视频一区精品| 美美哒免费高清在线观看视频一区二区| 久久66热re国产| 成人免费三级在线| 欧美视频中文字幕| 精品美女被调教视频大全网站| 国产亚洲一区二区三区| 亚洲乱码一区二区三区在线观看| 亚洲观看高清完整版在线观看| 日本欧美在线看| 国产成人av电影免费在线观看| 91麻豆文化传媒在线观看| 欧美另类videos死尸| 久久精品亚洲乱码伦伦中文 | 欧美性生活久久| 精品乱码亚洲一区二区不卡| 中文字幕不卡在线播放| 亚洲电影第三页| 国产精品66部| 欧美日本一区二区| 国产午夜精品一区二区三区视频 | 7777精品久久久大香线蕉| 精品国产亚洲在线| 一区二区在线观看视频 | 国产精品天干天干在观线| 亚洲一区二区三区在线看| 国产伦精品一区二区三区视频青涩| 91麻豆国产精品久久| 精品国产凹凸成av人网站| 一区二区三区欧美视频|